_id stringlengths 64 64 | repository stringlengths 6 84 | name stringlengths 4 110 | content stringlengths 0 248k | license null | download_url stringlengths 89 454 | language stringclasses 7
values | comments stringlengths 0 74.6k | code stringlengths 0 248k |
|---|---|---|---|---|---|---|---|---|
e10b891341fe927cf73b87fc8d33eef5b6960e72bc00853760abde230f856bec | sjl/rldt | panels.lisp | (in-package :rl.panels)
;;;; Data ---------------------------------------------------------------------
(defparameter *panel-initial-layer* 0)
(defvar *panels* (make-array 10
:adjustable t
:fill-pointer 0
:initial-element nil))
(defvar *screen-width* 60)
(defvar... | null | https://raw.githubusercontent.com/sjl/rldt/c22dbcbd2a5bb3a576d30c0680af0b16e404bf3f/src/panels.lisp | lisp | Data ---------------------------------------------------------------------
Class --------------------------------------------------------------------
Geometry -----------------------------------------------------------------
Event Handling -----------------------------------------------------------
Initialization ... | (in-package :rl.panels)
(defparameter *panel-initial-layer* 0)
(defvar *panels* (make-array 10
:adjustable t
:fill-pointer 0
:initial-element nil))
(defvar *screen-width* 60)
(defvar *screen-height* 40)
(defclass* panel ()
(x
y
width
height
layer... |
3d34b71a7da0a94ba1183f8ab3c0bdefc1c365ee4310184e3ec135a44b7c138b | fendor/hsimport | ModuleTest11.hs | import Control.Blub
import Control.Monad
f :: Int -> Int
f = (+ 3)
| null | https://raw.githubusercontent.com/fendor/hsimport/9be9918b06545cfd7282e4db08c2b88f1d8162cd/tests/goldenFiles/ModuleTest11.hs | haskell | import Control.Blub
import Control.Monad
f :: Int -> Int
f = (+ 3)
| |
6aa059179fa45329a351246fa97d219fce3e0c687c17426f43243e703d8cfbf6 | puppetlabs/jvm-ssl-utils | testutils.clj | (ns puppetlabs.ssl-utils.testutils
(:import (java.io ByteArrayOutputStream ByteArrayInputStream)
(java.security.cert X509Certificate)
(java.security MessageDigest PublicKey)
(javax.security.auth.x500 X500Principal)
(org.bouncycastle.asn1.x500 X500Name)
(org.bounc... | null | https://raw.githubusercontent.com/puppetlabs/jvm-ssl-utils/0fade4b3b133578ebb05d331b7aaa2ba4e24194e/test/puppetlabs/ssl_utils/testutils.clj | clojure | so should only be used for testing purposes.
Writing test files
The following helpers can be used to create test fixtures via the repl.
To start the repl, run `lein repl`.
Within the repl, run the following (with your desired function and arguments):
```
(require '[puppetlabs.ssl-utils.testutils :as t])
(t/wri... | (ns puppetlabs.ssl-utils.testutils
(:import (java.io ByteArrayOutputStream ByteArrayInputStream)
(java.security.cert X509Certificate)
(java.security MessageDigest PublicKey)
(javax.security.auth.x500 X500Principal)
(org.bouncycastle.asn1.x500 X500Name)
(org.bounc... |
b8065d5ce3a6f126a0aee69de73264f09cbdf0f1862e8d637062081813e8c7ae | clj-commons/rewrite-clj | removez_test.cljc | (ns rewrite-clj.zip.removez-test
(:require [clojure.test :refer [deftest is are]]
[rewrite-clj.zip :as z]))
(deftest t-whitespace-aware-removal
(are [?in ?n ?expected-out ?expected-out-preserve-newline]
(let [elements (->> (z/of-string ?in)
(iterate z/next))
... | null | https://raw.githubusercontent.com/clj-commons/rewrite-clj/7621126caae5f21dc5150d52a6c9b747dc0aeeff/test/rewrite_clj/zip/removez_test.cljc | clojure | (ns rewrite-clj.zip.removez-test
(:require [clojure.test :refer [deftest is are]]
[rewrite-clj.zip :as z]))
(deftest t-whitespace-aware-removal
(are [?in ?n ?expected-out ?expected-out-preserve-newline]
(let [elements (->> (z/of-string ?in)
(iterate z/next))
... | |
d3c65fccaa3e27afb440b23ef18348ffad5023e69f2fc8a0e1a805b9c475d410 | patricoferris/ocaml-multicore-monorepo | angstrom.mli | ----------------------------------------------------------------------------
Copyright ( c ) 2016 Inhabited Type LLC .
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions
are met :
... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/angstrom/lib/angstrom.mli | ocaml | * A parser for values of type ['a].
* [peek_char_fail] accepts any char and returns it. If end of input has been
reached, it will fail.
This parser does not advance the input. Use it for lookahead.
* [peek_string n] accepts exactly [n] characters and returns them as a
string. If there is not enough input... | ----------------------------------------------------------------------------
Copyright ( c ) 2016 Inhabited Type LLC .
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions
are met :
... |
d4fd6b17565e6ca7ac6c3ae2b163effc7c51e4461cf8cc933550fd2c2e3062b1 | re-ops/re-core | data.clj | (ns re-core.fixtures.data
(:require
[re-cipes.profiles]))
(def redis-kvm
{:machine {:hostname "red1" :user "re-ops" :domain "local"
:os :ubuntu-20.04 :cpu 4 :ram 1}
:kvm {:node :localhost}
:type :redis
:description "redis kvm instance"})
(def redis-lxc
{:machine {:hostname "red1" :user ... | null | https://raw.githubusercontent.com/re-ops/re-core/e13490aedd6d34ff01f11b28adf359beb5c0bb5b/test/re_core/fixtures/data.clj | clojure | (ns re-core.fixtures.data
(:require
[re-cipes.profiles]))
(def redis-kvm
{:machine {:hostname "red1" :user "re-ops" :domain "local"
:os :ubuntu-20.04 :cpu 4 :ram 1}
:kvm {:node :localhost}
:type :redis
:description "redis kvm instance"})
(def redis-lxc
{:machine {:hostname "red1" :user ... | |
b5eeedde79a839452c1a2de5cb780f9229e09b2dd49efdc9d139d53c9e58a7a3 | joearms/elib1 | irc_expt.erl | Copyright ( c ) 2006 - 2009
See MIT - LICENSE for licensing information .
-module(irc_expt).
-compile(export_all).
-import(lists, [member/2]).
test() ->
%% p1, p2, p3, p4 are pids
Gs = [{<<"#mnesia">>, [<<"mnesia-master">>,<<"joe">>,<<"jim">>]},
{<<"#webserver">>, [<<"webserver-master">>, <<"jim"... | null | https://raw.githubusercontent.com/joearms/elib1/d617d0ec70a058ef102749eadf51c024444c28d9/supported/irc/irc_expt.erl | erlang | p1, p2, p3, p4 are pids
add_user
is in mnesia
delete_user_from_group
| Copyright ( c ) 2006 - 2009
See MIT - LICENSE for licensing information .
-module(irc_expt).
-compile(export_all).
-import(lists, [member/2]).
test() ->
Gs = [{<<"#mnesia">>, [<<"mnesia-master">>,<<"joe">>,<<"jim">>]},
{<<"#webserver">>, [<<"webserver-master">>, <<"jim">>]},
{<<"erlang">>, [<<... |
57de497abffb671a73c74ba6a529591d37c4dec816c6bc3fec24cd71b6e818dd | TrustInSoft/tis-kernel | compute_impact.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/impact/compute_impact.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
b7ba8e77001af55d360ac2bef2951f9ab90691214194b76d78305ab29b7f662c | jumarko/clojure-experiments | spotify.clj | (ns clojure-experiments.networking.spotify
"Experiments with Spotify API: -settings/
Motivated by -spotify-api-get-creds"
(:require [clj-http.client :as http]))
;;; Client credentials flow: -credentials/
(defn get-token [{:keys [id secret] :as creds}]
(:body (http/post ""
{#_#_:content-type :x-... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/fba8749644ad152a869f3da77d413c9963baaeed/src/clojure_experiments/networking/spotify.clj | clojure | Client credentials flow: -credentials/
=> {:access_token
"BQB...",
"{\"error\":\"unsupported_grant_type\",\"error_description\":\"grant_type parameter is missing\"}", | (ns clojure-experiments.networking.spotify
"Experiments with Spotify API: -settings/
Motivated by -spotify-api-get-creds"
(:require [clj-http.client :as http]))
(defn get-token [{:keys [id secret] :as creds}]
(:body (http/post ""
{#_#_:content-type :x-www-form-urlencoded
:as :jso... |
ab58b1856e58e9bb865b5000ecc54616020e8ef80f96a97bd4f084cfd6042798 | Novus-School/novus | router.clj | (ns novus.router
(:require
[reitit.ring :as ring]
[ring.adapter.jetty :as jetty]
[ring.util.response :as response]
[clojure.repl :as repl]
[reitit.coercion.spec :as spec-coercion]
;; Routes
[novus.student.routes :as student]
[novus.auth.routes :as auth]
;; Middlewares
[muuntaja.core :as m... | null | https://raw.githubusercontent.com/Novus-School/novus/89f4c18c83460087af1126ede15a4dbee84ed7d3/notes/novus_school/courses/immutable_stack_book_v1/increments/07_aws_cognito/2_auth_with_cognito/novus/src/main/novus/router.clj | clojure | Routes
Middlewares
Custom Middleware
Swagger Integration
| (ns novus.router
(:require
[reitit.ring :as ring]
[ring.adapter.jetty :as jetty]
[ring.util.response :as response]
[clojure.repl :as repl]
[reitit.coercion.spec :as spec-coercion]
[novus.student.routes :as student]
[novus.auth.routes :as auth]
[muuntaja.core :as m]
[reitit.ring.middleware.mu... |
e45d0f33ee23ee09ff1a025cfeaeed378b7a85100881ae750fbd583fed759e18 | footprintanalytics/footprint-web | native_test.clj | (ns metabase.driver.sql-jdbc.native-test
"Tests for running native queries against SQL databases."
(:require [clojure.test :refer :all]
[medley.core :as m]
[metabase.query-processor :as qp]
[metabase.test.data :as data]
[metabase.util.schema :as su]
[schem... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/driver/sql_jdbc/native_test.clj | clojure | (ns metabase.driver.sql-jdbc.native-test
"Tests for running native queries against SQL databases."
(:require [clojure.test :refer :all]
[medley.core :as m]
[metabase.query-processor :as qp]
[metabase.test.data :as data]
[metabase.util.schema :as su]
[schem... | |
87c09235ee4942da5b657c3a0f232aef899cf75724ee53f513e8969f487f975a | li-clutter-org/http2-test | ServedEntry.hs | # LANGUAGE OverloadedStrings , TemplateHaskell , DeriveDataTypeable #
module Rede.HarFiles.ServedEntry(
sreStatus
,sreHeaders
,sreContents
,sreHost
,resolveFromHar
,createResolveCenter
,servedResources
,allSeenHosts
-- ,createResolveCenterFromFilePath
,resourceHandleToByteStrin... | null | https://raw.githubusercontent.com/li-clutter-org/http2-test/38d6706511f93af875273f7702fa0ea8582d5d8e/hs-src/Rede/HarFiles/ServedEntry.hs | haskell | ,createResolveCenterFromFilePath
,hostsFromHarFile
,createResolveCenterFromLazyByteString
import Data.Text(Text)
How do we identify resources that are being
if query-string reordering is an issue, we can supersede
this type somehow...
| Individual entries used on resolution
Status to return to the ... | # LANGUAGE OverloadedStrings , TemplateHaskell , DeriveDataTypeable #
module Rede.HarFiles.ServedEntry(
sreStatus
,sreHeaders
,sreContents
,sreHost
,resolveFromHar
,createResolveCenter
,servedResources
,allSeenHosts
,resourceHandleToByteString
,handleFromMethodAndUrl
,resol... |
945d8c9b138a41479ac7cc3e27a4428c08ccf5b15361b1ecc178a1410995ec6f | kahua/Kahua | worker.scm | -*- mode : scheme ; coding : utf-8 -*-
;;
;; Provides worker<->client protocol.
;;
Copyright ( c ) 2006 - 2007 Scheme Arts , L.L.C. , All rights reserved .
Copyright ( c ) 2006 - 2007 Time Intermedia Corporation , All rights reserved .
;; See COPYING for terms and conditions of using this software
;;
(define-m... | null | https://raw.githubusercontent.com/kahua/Kahua/c90fe590233e4540923e4e5cc9f61da32873692c/src/kahua/protocol/worker.scm | scheme | coding : utf-8 -*-
Provides worker<->client protocol.
See COPYING for terms and conditions of using this software
(define-condition-type <kahua-worker-expired> <kahua-error> kahua-worker-expired?)
(define-condition-type <kahua-entry-not-found> <kahua-error> kahua-entry-not-found?)
Too ugly. FIXME!!
((<kah... | Copyright ( c ) 2006 - 2007 Scheme Arts , L.L.C. , All rights reserved .
Copyright ( c ) 2006 - 2007 Time Intermedia Corporation , All rights reserved .
(define-module kahua.protocol.worker
(use srfi-1)
(use srfi-13)
(use util.list)
(use util.match)
(use file.util)
(use gauche.net)
(use kahua.gsid)
... |
d0d9b3b8823221f887673b5dbaf12fbf5130e8fb0acf0dc75d3de21001621d80 | atongen/setml | api_messages_tests.ml | open OUnit2
open Shared
open Shared.Api_messages
open Lib.Server_api_messages
open Test_lib.Test_util
let convert_player_games_tests =
let p pgs = String.concat ", " (List.map Api_messages.player_game_to_string pgs) in
let check v =
let open Server_api_message_converter in
let d = v |> player... | null | https://raw.githubusercontent.com/atongen/setml/8afee909ba6656506a69f79fd8682b37f2d2928a/src/server_test/api_messages_tests.ml | ocaml | open OUnit2
open Shared
open Shared.Api_messages
open Lib.Server_api_messages
open Test_lib.Test_util
let convert_player_games_tests =
let p pgs = String.concat ", " (List.map Api_messages.player_game_to_string pgs) in
let check v =
let open Server_api_message_converter in
let d = v |> player... | |
cabb23130090390355094f7f8c363fc0903fd722304b6ee2a182fca3c953110a | armedbear/abcl | math-tests.lisp | math-tests.lisp
;;;
Copyright ( C ) 2005
$ Id$
;;;
;;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
;;;
;;... | null | https://raw.githubusercontent.com/armedbear/abcl/36a4b5994227d768882ff6458b3df9f79caac664/test/lisp/abcl/math-tests.lisp | lisp |
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details... | math-tests.lisp
Copyright ( C ) 2005
$ Id$
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307... |
e74d1ae27bb6dd40c3c25a07dcfba9677187ea4cb8507709d9fbf1f9ec71f034 | rvirding/spell1 | spell1.erl | Copyright ( c ) 2009 - 2015
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distributed... | null | https://raw.githubusercontent.com/rvirding/spell1/5f5d58c3a40e6956fc630ee09db005c544b7ca0c/src/spell1.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright ( c ) 2009 - 2015
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
File : spell1.erl
Author :
Purpose : A simple LL(1 ) parser generator .
-module(spell1).
-export([file/1,file/2,format_error/1])... |
9f7e9db1a2af45f95de6f064f274c9956aa11c7fb9063d5e37bf14e3bf414e7e | erlcloud/erlcloud | erlcloud_lambda.erl | -module(erlcloud_lambda).
-author('').
-include("erlcloud.hrl").
-include("erlcloud_aws.hrl").
-include("erlcloud_lambda.hrl").
-define(API_VERSION, "2015-03-31").
Library initialization .
-export([configure/2, configure/3, configure/4,
new/2, new/3, new/4]).
-export([create_alias/4, create_alias/5,
... | null | https://raw.githubusercontent.com/erlcloud/erlcloud/2ffddcd0527414580e9956bea24cebc2953a088b/src/erlcloud_lambda.erl | erlang | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
----... | -module(erlcloud_lambda).
-author('').
-include("erlcloud.hrl").
-include("erlcloud_aws.hrl").
-include("erlcloud_lambda.hrl").
-define(API_VERSION, "2015-03-31").
Library initialization .
-export([configure/2, configure/3, configure/4,
new/2, new/3, new/4]).
-export([create_alias/4, create_alias/5,
... |
da5f472a46538b94eafe27a881f6a801045059a94b32fbac957bae53d25770d2 | mfp/extprot | gen_OCaml.ml |
open Printf
open Ptypes
open Gencode
open Camlp4.PreCast
open ExtList
open ExtString
type container = {
c_name : string;
(* either open (in message definitions) or include (in type defs), needed for
application of record types) *)
c_import_modules : Ast.str_item option;
c_types : Ast.str_item option;
c... | null | https://raw.githubusercontent.com/mfp/extprot/c69eb66398e35b964c4232a7c3c85151fb5eddbe/compiler/gen_OCaml.ml | ocaml | either open (in message definitions) or include (in type defs), needed for
application of record types)
reader
Fast_write.t thunk
same logic as non-constant constructors in sum types
first constant constructor = default
mutable flag not used, we pick false arbitrarily
no quotations for type, wtf?
che... |
open Printf
open Ptypes
open Gencode
open Camlp4.PreCast
open ExtList
open ExtString
type container = {
c_name : string;
c_import_modules : Ast.str_item option;
c_types : Ast.str_item option;
c_reader : Ast.str_item option;
c_io_reader : Ast.str_item option;
c_pretty_printer : Ast.str_item option;
c_wri... |
4b80537360db3b25db3b0b4cb08b1fbe5c2c2ab089464a2dd1137ce4b27a2004 | Practical-Formal-Methods/adiff | C.hs | -----------------------------------------------------------------------------
-- |
-- Module : Language.C
Copyright : ( c ) 2008
[ 1995 .. 2007 ]
-- Betram Felgenhauer
-- License : BSD-style
-- Maintainer :
-- Stabili... | null | https://raw.githubusercontent.com/Practical-Formal-Methods/adiff/c18872faf3e31572437686d766f9972e00274588/language-c-extensible/src/Language/C.hs | haskell | ---------------------------------------------------------------------------
|
Module : Language.C
Betram Felgenhauer
License : BSD-style
Maintainer :
Stability : experimental
Library for analysing and generating C code.
See <>
--------------------------------------------------... | Copyright : ( c ) 2008
[ 1995 .. 2007 ]
Portability : ghc
module Language.C (
module Language.C.Data,
module Language.C.Syntax,
module Language.C.Pretty,
module Language.C.Parser,
SemPhase
)
where
import Language.C.Data
import... |
5285ad32d8acc6b4145cc8718ac8f0dfdfd7bcbfc1b74fe8f61f78dede8228e4 | Relph1119/sicp-solutions-manual | p2-2-point-selector.scm | (define (x-point p)
(car p))
(define (y-point p)
(cdr p)) | null | https://raw.githubusercontent.com/Relph1119/sicp-solutions-manual/f2ff309a6c898376209c198030c70d6adfac1fc1/src/practices/ch02/p2-2-point-selector.scm | scheme | (define (x-point p)
(car p))
(define (y-point p)
(cdr p)) | |
0eeef547287bd473a7062dca23e0e62c11f5ce1818a92179cc3d313ea91dc2a6 | metabase/metabase | native_test.clj | (ns metabase.driver.sql-jdbc.native-test
"Tests for running native queries against SQL databases."
(:require
[clojure.test :refer :all]
[medley.core :as m]
[metabase.query-processor :as qp]
[metabase.test.data :as data]
[metabase.util.schema :as su]
[schema.core :as s]))
(deftest basic-query-test... | null | https://raw.githubusercontent.com/metabase/metabase/18d190cf05df4233aa6d14d6580faa68293ba980/test/metabase/driver/sql_jdbc/native_test.clj | clojure | (ns metabase.driver.sql-jdbc.native-test
"Tests for running native queries against SQL databases."
(:require
[clojure.test :refer :all]
[medley.core :as m]
[metabase.query-processor :as qp]
[metabase.test.data :as data]
[metabase.util.schema :as su]
[schema.core :as s]))
(deftest basic-query-test... | |
41bfe18fc6d947680e213934e737dad84cf2d62f779579496ffc29df963d291c | BranchTaken/Hemlock | test_bit_not.ml | open! Basis.Rudiments
open! Basis
open Zint
let test () =
let rec test = function
| [] -> ()
| x :: xs' -> begin
File.Fmt.stdout
|> Fmt.fmt "bit_not "
|> fmt ~alt:true ~radix:Radix.Hex x
|> Fmt.fmt " -> "
|> fmt ~alt:true ~radix:Radix.Hex (bit_not x)
|> Fmt.fmt... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/zint/test_bit_not.ml | ocaml | No bits, therefore the bitwise not is also no bits. | open! Basis.Rudiments
open! Basis
open Zint
let test () =
let rec test = function
| [] -> ()
| x :: xs' -> begin
File.Fmt.stdout
|> Fmt.fmt "bit_not "
|> fmt ~alt:true ~radix:Radix.Hex x
|> Fmt.fmt " -> "
|> fmt ~alt:true ~radix:Radix.Hex (bit_not x)
|> Fmt.fmt... |
0df199eee5b4637c8c64404e3f9e500c632312762bce4ca37d31dd455ee353c1 | hipsleek/hipsleek | web.ml | #include "xdebug.cppo"
module PrioQueue =
struct
type priority = int
type 'a queue = Empty | Node of priority * 'a * 'a queue * 'a queue
let empty = Empty
let rec insert queue prio elt =
match queue with
Empty -> Node(prio, elt, Empty, Empty)
| Node(p, e, left, right) ->
if prio > p
th... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/web.ml | ocaml | flag is a ref bool denoting if the underlying prover is idle | #include "xdebug.cppo"
module PrioQueue =
struct
type priority = int
type 'a queue = Empty | Node of priority * 'a * 'a queue * 'a queue
let empty = Empty
let rec insert queue prio elt =
match queue with
Empty -> Node(prio, elt, Empty, Empty)
| Node(p, e, left, right) ->
if prio > p
th... |
06bb69a1a65c89c74b61316d07943966f3333b0dd5e5c12e21180d02060a8ce5 | ucsd-progsys/liquidhaskell | Assume00.hs | {-@ LIQUID "--expect-any-error" @-}
GOAL : get the ` assume plus ` in Prelude to be qualified to ` assume LH.plus ` ...
module Assume00 where
import Language.Haskell.Liquid.Prelude
data Thing = Thing
{-@ plus :: x:Thing -> Thing -> {v:Thing | false } @-}
plus :: Thing -> Thing -> Thing
plus x _ = x
| null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/names/neg/Assume00.hs | haskell | @ LIQUID "--expect-any-error" @
@ plus :: x:Thing -> Thing -> {v:Thing | false } @ | GOAL : get the ` assume plus ` in Prelude to be qualified to ` assume LH.plus ` ...
module Assume00 where
import Language.Haskell.Liquid.Prelude
data Thing = Thing
plus :: Thing -> Thing -> Thing
plus x _ = x
|
b738c3671553ec9e59eb9ffd3152beb372883af626a5675e4f3d254b8bbb8231 | caribou/caribou-core | association.clj | (ns caribou.association
(:require [clojure.string :as string]
[clojure.walk :as walk]
[antlers.core :as antlers]
[caribou.config :as config]
[caribou.logger :as log]
[caribou.util :as util]
[caribou.field :as field]))
(defn with-propagation
[s... | null | https://raw.githubusercontent.com/caribou/caribou-core/6ebd9db4e14cddb1d6b4e152e771e016fa9c55f6/src/caribou/association.clj | clojure | (ns caribou.association
(:require [clojure.string :as string]
[clojure.walk :as walk]
[antlers.core :as antlers]
[caribou.config :as config]
[caribou.logger :as log]
[caribou.util :as util]
[caribou.field :as field]))
(defn with-propagation
[s... | |
e7bde405d1ecf4823b4c489b32f47fa99bcd0b9cfced4cb6bb671b995f748ec7 | scravy/simplex | CmdLineOpts.hs | {-# LANGUAGE Haskell2010 #-}
module Simplex.CmdLineOpts (
Opts (..), Flag (..), defOpts, cmdOpts,
parseArgs
) where
import System.Console.GetOpt
import System.Environment (getArgs, getProgName)
import Data.Maybe
data Flag = Help | Verbose | Print | NoClean
| Pdflatex String | Pdfcrop S... | null | https://raw.githubusercontent.com/scravy/simplex/520e17ab5838c45c73c6a3c1601d4c7a386044b4/src/Simplex/CmdLineOpts.hs | haskell | # LANGUAGE Haskell2010 # |
module Simplex.CmdLineOpts (
Opts (..), Flag (..), defOpts, cmdOpts,
parseArgs
) where
import System.Console.GetOpt
import System.Environment (getArgs, getProgName)
import Data.Maybe
data Flag = Help | Verbose | Print | NoClean
| Pdflatex String | Pdfcrop String
| Graphviz St... |
138dbcb0ffee7dda7f06e3d727cf22aa7e210e9315aaa368383d9eb2ba81049c | emqx/emqx | emqx_license_proto_v2.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%--------------------------------------------------------------------
-module(emqx_license_proto_v2).
-behaviour(emqx_bpapi).
-include_lib("emqx/include/bpapi.hrl").... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/lib-ee/emqx_license/src/proto/emqx_license_proto_v2.erl | erlang | --------------------------------------------------------------------
-------------------------------------------------------------------- | Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
-module(emqx_license_proto_v2).
-behaviour(emqx_bpapi).
-include_lib("emqx/include/bpapi.hrl").
-export([introduced_in/0]).
-export([
remote_connection_counts/1
]).
-define(TIMEOUT, 500).
-define(BACKUP_TIMEOUT, 15_000).
introduc... |
e41b5f2569214ee435ef1f66cb43d4377be5e312732bfb34f116fbcae2d06e58 | ocaml-flambda/ocaml-jst | builtin_attributes.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/5fa80fe23f3ddc543bb7ebcb223688a24039a34d/parsing/builtin_attributes.mli | ocaml | ************************************************************************
OCaml
... | , LexiFi
Copyright 2012 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* Support for some of the builtin attributes
- ocaml.deprecated
- ocaml.alert
- ocaml.e... |
bb807e3b923ab0fee88722bcebc52336d248a678e9cc18ee3c3d0e73611de52f | camlp5/camlp5 | test3.ml | let f x =
g (fun repr -> 1)
;;
| null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/testsuite/maquette/files-original/test3.ml | ocaml | let f x =
g (fun repr -> 1)
;;
| |
b163ac2c07a5cc359fcf0ef316ed36173678ae2db80b1abac984eedb1187bf49 | webyrd/Barliman | example-2-reverse.scm | ;; Example 2a: failing to synthesize all of reverse
;; Definitions
,A
;; Test Cases
(reverse '()) => '()
(reverse '(,g1)) => `(,g1)
(reverse '(,g2 ,g3)) => `(,g3 ,g2)
Example 2b : synthesizing reverse with reverse - acc
;; Definitions
(define reverse
(lambda (xs)
(reverse-acc xs '())))
(define reverse-acc
... | null | https://raw.githubusercontent.com/webyrd/Barliman/c2ede326c32fab3c792da782035b5a5a73b08087/talk_examples_20161203/example-2-reverse.scm | scheme | Example 2a: failing to synthesize all of reverse
Definitions
Test Cases
Definitions
Keep Test Cases
Definitions
Keep Test Cases |
,A
(reverse '()) => '()
(reverse '(,g1)) => `(,g1)
(reverse '(,g2 ,g3)) => `(,g3 ,g2)
Example 2b : synthesizing reverse with reverse - acc
(define reverse
(lambda (xs)
(reverse-acc xs '())))
(define reverse-acc
(lambda (xs acc)
,A))
Example 2c : synthesizing reverse with reduce
(define reverse
... |
17147bf46f9a59f6cf0459c5233a4b662173eef916f51c53723b39504269167f | fccm/glMLite | joinoffset.ml |
* FILE :
* joinoffset.ml
*
* FUNCTION :
* this demo demonstrates the various join styles
*
* HISTORY :
* Copyright ( c ) 1995 Linas Vepstas < >
* 2008 - OCaml version by
* FILE:
* joinoffset.ml
*
* FUNCTION:
* this demo demonstrates the various join styles
*
* HISTORY:
* Copyr... | null | https://raw.githubusercontent.com/fccm/glMLite/c52cd806909581e49d9b660195576c8a932f6d33/gle-examples/joinoffset.ml | ocaml | required modules
-------------------------------------------------------
the arrays in which we will store the polyline
the arrays in which we will store the colors
the arrays in which we will store the contour
-------------------------------------------------------
----------------------------------------... |
* FILE :
* joinoffset.ml
*
* FUNCTION :
* this demo demonstrates the various join styles
*
* HISTORY :
* Copyright ( c ) 1995 Linas Vepstas < >
* 2008 - OCaml version by
* FILE:
* joinoffset.ml
*
* FUNCTION:
* this demo demonstrates the various join styles
*
* HISTORY:
* Copyr... |
b4d67c031513906f73538cad73cdff3327dc0ee4f2da9e46522d5df3b495d462 | bobzhang/ocaml-book | arith.ml | type token =
| INTEGER of (int)
| PLUS
| TIMES
open Parsing;;
# 2 "arith.mly"
# 10 "arith.ml"
let yytransl_const = [|
258 (* PLUS *);
TIMES
0|]
let yytransl_block = [|
INTEGER
0|]
let yylhs = "\255\255\
\001\000\001\000\001\000\000\000"
let yylen = "\002\000\
\001\000\003\000\003\000\002\000"
... | null | https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/code/calc/_build/arith.ml | ocaml | PLUS
Entry expr | type token =
| INTEGER of (int)
| PLUS
| TIMES
open Parsing;;
# 2 "arith.mly"
# 10 "arith.ml"
let yytransl_const = [|
TIMES
0|]
let yytransl_block = [|
INTEGER
0|]
let yylhs = "\255\255\
\001\000\001\000\001\000\000\000"
let yylen = "\002\000\
\001\000\003\000\003\000\002\000"
let yydefred = "\0... |
0ebe513e369ce1becb405b1b5fcbe1fb35b07ffb45e8298941fb57fb107d5ea7 | lwhjp/ecmascript | environment.rkt | #lang racket/base
(require (for-syntax racket/base)
racket/stxparam
"../private/environment.rkt"
"../private/primitive.rkt"
"../convert.rkt")
(provide (all-defined-out))
(define-syntax-parameter variable-environment
(make-rename-transformer #'global-environment))
(define-syntax... | null | https://raw.githubusercontent.com/lwhjp/ecmascript/69fcfa42856ea799ff9d9d63a60eaf1b1783fe50/lang/environment.rkt | racket | #lang racket/base
(require (for-syntax racket/base)
racket/stxparam
"../private/environment.rkt"
"../private/primitive.rkt"
"../convert.rkt")
(provide (all-defined-out))
(define-syntax-parameter variable-environment
(make-rename-transformer #'global-environment))
(define-syntax... | |
73d12d4d67ca5d5f562f22e64854e8b960dafc18bfb926f1363a71442aa8e0de | hemmi/coq2scala | undo_lablgtk_lt26.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2-old/ide/undo_lablgtk_lt26.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
An undoable view class | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
class undoable_view : Gtk.te... |
8312b95371b24ec2d01744130c898ebfe5af905898cd2f9dda910842850a38a2 | grin-compiler/ghc-wpc-sample-programs | ShowXml.hs | -- ------------------------------------------------------------
|
Module : Text .
Copyright : Copyright ( C ) 2008 - 9
License : MIT
Maintainer : ( )
Stability : stable
Portability : portable
XML tree conversion to external string representation
Module ... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/hxt-9.3.1.18/src/Text/XML/HXT/DOM/ShowXml.hs | haskell | ------------------------------------------------------------
------------------------------------------------------------
-----------------------------------------------------------------------------
the toString conversion functions
|
convert a list of trees into a string
see also : 'xmlTreesToText' for filte... |
|
Module : Text .
Copyright : Copyright ( C ) 2008 - 9
License : MIT
Maintainer : ( )
Stability : stable
Portability : portable
XML tree conversion to external string representation
Module : Text.XML.HXT.DOM.ShowXml
Copyright : Copyright (C) 2008-... |
f196cb5aefbed46dc403c652658e7a099fccb8f6978f95f60daada0fe5724528 | hugoduncan/makejack | api.clj | (ns makejack.dag.api
(:refer-clojure :exclude [parents])
(:require
[makejack.dag.impl :as impl]))
(defn graph []
(impl/graph))
(defn children
[graph node]
(impl/children graph node))
(defn parents
[graph node]
(impl/parents graph node))
(defn transitive-children
[graph node]
(impl/transitive-ch... | null | https://raw.githubusercontent.com/hugoduncan/makejack/6968c6c8f2433d5a618acf8820eaa27f41464b95/components/dag/src/makejack/dag/api.clj | clojure | (ns makejack.dag.api
(:refer-clojure :exclude [parents])
(:require
[makejack.dag.impl :as impl]))
(defn graph []
(impl/graph))
(defn children
[graph node]
(impl/children graph node))
(defn parents
[graph node]
(impl/parents graph node))
(defn transitive-children
[graph node]
(impl/transitive-ch... | |
d89f028c943cf70467523cc8b6981f1d1027805a5016acc44f4fec08a846e58e | conal/vector-space | Cross.hs | # LANGUAGE FlexibleInstances , FlexibleContexts , TypeOperators
, TypeFamilies , TypeSynonymInstances
, UndecidableInstances #
, TypeFamilies, TypeSynonymInstances
, UndecidableInstances #-}
# OPTIONS_GHC -Wall #
-------------------------------------------------------... | null | https://raw.githubusercontent.com/conal/vector-space/92598e836cd25aa2598d67fb83a1822c1b4ca042/src/Data/Cross.hs | haskell | --------------------------------------------------------------------
|
Module : Data.Cross
License : BSD3
Maintainer :
Stability : experimental
--------------------------------------------------------------------
| Thing with a normal vector (not necessarily normalized).
| Normalized normal ... | # LANGUAGE FlexibleInstances , FlexibleContexts , TypeOperators
, TypeFamilies , TypeSynonymInstances
, UndecidableInstances #
, TypeFamilies, TypeSynonymInstances
, UndecidableInstances #-}
# OPTIONS_GHC -Wall #
Copyright : ( c ) Conal Elliott 2008
Cross pro... |
86ebb9241ab8511b1d3bccb7af95e625a2176af8fa600a62aec727f854e22fa5 | mitchellwrosen/riak2 | RiakMapReduce.hs | -- TODO add modfun mapreduce
-- TODO mapreduce key filter
module RiakMapReduce
( mapReduceKeys
, mapReduceBucket
, mapReduceBinaryIndex
, mapReduceIntIndex
, mapReduceSearch
) where
import RiakBucket (Bucket)
import RiakHandle (Handle)
import RiakHandleError (HandleError)
import RiakBinaryIndex... | null | https://raw.githubusercontent.com/mitchellwrosen/riak2/d3c4ef4389012c70e72623cdf9a4caec0a07e568/riak2/src/RiakMapReduce.hs | haskell | TODO add modfun mapreduce
TODO mapreduce key filter
| Perform a MapReduce job over a list of keys.
^
^
^
^
| Perform a MapReduce job over all keys in a bucket.
/Note/: This is an extremely expensive operation, and should not be used on a
production cluster.
/Note/: If your backend supports secondary indexe... |
module RiakMapReduce
( mapReduceKeys
, mapReduceBucket
, mapReduceBinaryIndex
, mapReduceIntIndex
, mapReduceSearch
) where
import RiakBucket (Bucket)
import RiakHandle (Handle)
import RiakHandleError (HandleError)
import RiakBinaryIndexQuery (BinaryIndexQuery)
import RiakErlangTerm (Erla... |
fa25835875f5151bfcb25c0a87cce6586f864c8daba0dfce666255df1403c030 | RunOrg/RunOrg | dbAPI.ml | (* © 2014 RunOrg *)
open Std
| null | https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/apiLib/dbAPI.ml | ocaml | © 2014 RunOrg |
open Std
|
419bf3ae57cc42717c7d7585832a20b18a5110eaee3c186353944196c0e1985a | babashka/babashka | core.clj | (ns babashka.impl.clojure.core
{:no-doc true}
(:refer-clojure :exclude [future read+string clojure-version with-precision
send-via send send-off sync into-array])
(:require [babashka.impl.common :as common]
[borkdude.graal.locking :as locking]
[clojure.core :as ... | null | https://raw.githubusercontent.com/babashka/babashka/9118c43da3c6b9245f75ea0382c95289553c7d2c/src/babashka/impl/clojure/core.clj | clojure | Agents
End agents
agents
end agents | (ns babashka.impl.clojure.core
{:no-doc true}
(:refer-clojure :exclude [future read+string clojure-version with-precision
send-via send send-off sync into-array])
(:require [babashka.impl.common :as common]
[borkdude.graal.locking :as locking]
[clojure.core :as ... |
a78768db5e07d6812fe5ede83f0bf04fce2283949d7b998fc7f1905e3540dc26 | gedge-platform/gs-broker | eetcd_conn_sup.erl | @private
-module(eetcd_conn_sup).
-behaviour(supervisor).
-include("eetcd.hrl").
%% API
-export([start_link/0, start_child/1, info/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
start_child(Args) ->
supervisor:start_child(?MODULE, Args).
inf... | null | https://raw.githubusercontent.com/gedge-platform/gs-broker/c4c1ad39e563537d46553eae1363317cf75aff26/broker-server/deps/eetcd/src/eetcd_conn_sup.erl | erlang | API
| @private
-module(eetcd_conn_sup).
-behaviour(supervisor).
-include("eetcd.hrl").
-export([start_link/0, start_child/1, info/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
start_child(Args) ->
supervisor:start_child(?MODULE, Args).
info() ->
... |
5912d03447a6a9bf7b75ffda8aeed6233e2fb8a0c3123aa161a863fd9bc544e4 | plum-umd/c-strider | cillower.mli |
*
* Copyright ( c ) 2001 - 2003 ,
* < >
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
* ... | null | https://raw.githubusercontent.com/plum-umd/c-strider/3d3a3743bc28456eb6d50e01805ce484ab3c04e6/tools/cil-1.3.7/src/cillower.mli | ocaml | * Replace enumeration constants with integer constants |
*
* Copyright ( c ) 2001 - 2003 ,
* < >
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
* ... |
857a251d8940ea953481525ffb2e1463c1e28b9bdae1169a36cde9dbac06473b | epiccastle/spire | scp.clj | (ns spire.pod.scp
(:require [spire.ssh :as ssh]
[spire.sudo :as sudo]
[spire.utils :as utils]
[spire.nio :as nio]
[clojure.java.io :as io]
[clojure.string :as string])
(:import [java.io InputStream OutputStream File FileOutputStream
PipedInputS... | null | https://raw.githubusercontent.com/epiccastle/spire/0c36febe9dd03ec2199f47c663214c50340a9e0d/src/clj/spire/pod/scp.clj | clojure |
(prn 'send-ack)
(prn 'read code)
TODO: error should be read over stderr. we have bundled
stderr on stdout. Not elegant.
full chunk
last partial chunk
no progress callback
full chunk
last partial chunk
no progress callback
(prn "files" dir)
this is run on the pod side to create a stream pair
files copied?
f... | (ns spire.pod.scp
(:require [spire.ssh :as ssh]
[spire.sudo :as sudo]
[spire.utils :as utils]
[spire.nio :as nio]
[clojure.java.io :as io]
[clojure.string :as string])
(:import [java.io InputStream OutputStream File FileOutputStream
PipedInputS... |
27c730eed0bf0f78e475c14a5af3136c9eff50db90dbaba277b76351bc585260 | krajj7/BotHack | frame.clj | (ns bothack.frame
(:require [clojure.tools.logging :as log]
[clojure.string :as string]))
(def colormap
[nil :red :green :brown :blue ; non-bold
:magenta :cyan :gray
:bold :orange :bright-green :yellow ; bold
:bright-blue :bright-magenta :bright-cyan :white
:inverse :inverse-red :inverse-gr... | null | https://raw.githubusercontent.com/krajj7/BotHack/70226b3c8ed12d29c64068aec0acc0ca71d57adf/src/bothack/frame.clj | clojure | non-bold
bold
inverse
inverse+bold
character attributes underline or blink etc. are not represented, only the foreground colors (affected by boldness) are important for NetHack | (ns bothack.frame
(:require [clojure.tools.logging :as log]
[clojure.string :as string]))
(def colormap
:magenta :cyan :gray
:bright-blue :bright-magenta :bright-cyan :white
:inverse-blue :inverse-magenta :inverse-cyan :inverse-gray
:inverse-bright-blue :inverse-bright-magenta :inverse-bright... |
a6ce8ac598314d0467a9fafedd98ee8d93cc4eb165bb6a4f6f3a1df8060895de | liangjingyang/everrank | ever_config.erl | LastChange : 2013 - 07 - 03 11:02:38
Copr . ( c ) 2013 - 2015 , Simple < >
-module(ever_config).
-export([init/0]).
-export([reload_all/0,reload/1]).
-export([init/1,list/1]).
-export([find/2]).
-export([find_by_module/2, list_by_module/1]).
-define(FOREACH(Fun,List),lists:foreach(fun(E)-> Fun(E)... | null | https://raw.githubusercontent.com/liangjingyang/everrank/d4d2b86680117304f0ce98c1da5dd71728cc7d02/src/everlib/src/ever_config.erl | erlang | ====================================================================
API Functions
====================================================================
@doc 为了尽量少改动,接口符合ets:lookup方法的返回值规范,
@doc 为了尽量少改动,接口符合ets:lookup方法的返回值规范,
@doc 为了尽量少改动,接口符合ets:lookup方法的返回值规范,
==============================================... | LastChange : 2013 - 07 - 03 11:02:38
Copr . ( c ) 2013 - 2015 , Simple < >
-module(ever_config).
-export([init/0]).
-export([reload_all/0,reload/1]).
-export([init/1,list/1]).
-export([find/2]).
-export([find_by_module/2, list_by_module/1]).
-define(FOREACH(Fun,List),lists:foreach(fun(E)-> Fun(E)... |
2928a63573df77fa63218c47c97e12892e2752792258fe9697bc11d283f335f1 | fyquah/hardcaml_zprize | adder_subtractor_pipe.mli | * Multistage fully - pipelined ripple - carry - adder ( or subtractor ) .
This module computs [ a OP b OP c OP d ... ] in fully - piipelined using
the ripple - carry - add algorithm . Each of the OP are either ( + ) or ( - )
( they do n't have to be the same )
The fully - pipelined adder break... | null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/field_ops/src/adder_subtractor_pipe.mli | ocaml | * Output of the adder/subtractor with carry/borrow bits.
When instantiating a pure adder, the [carry] will be the carry bits with
width = [Int.ceil_log2 num_operands]. For a subtractor, it will the
[borrow] bits. For a mixed adder/subtractor implementation, you can treat
[carry @: result] as your sign... | * Multistage fully - pipelined ripple - carry - adder ( or subtractor ) .
This module computs [ a OP b OP c OP d ... ] in fully - piipelined using
the ripple - carry - add algorithm . Each of the OP are either ( + ) or ( - )
( they do n't have to be the same )
The fully - pipelined adder break... |
ab25165e372a804abf25560c97008d06aac18b15bf5458b04ff2431787c62160 | bytekid/mkbtt | rational.ml | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either ve... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/logic/src/rational.ml | ocaml | ** SUBMODULES **************************************************************
** TYPES *******************************************************************
** GLOBALS *****************************************************************
** FUNCTIONS ***************************************************************
conversion
a... | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either ve... |
4f1b3de1f285d0dc2ddcaee48e3289f69d8a3ca57fd1271a51a959f1a354a8b7 | chef/chef-server | chefp.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92-*-
%% ex: ts=4 sw=4 et
Copyright Chef Software , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License .... | null | https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/chef_db/src/chefp.erl | erlang | ex: ts=4 sw=4 et
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
@doc `chefp'... | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92-*-
Copyright Chef Software , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
... |
da5b5ccac8122b3bfcf97ddbccb7dadfdfdb8fa111231a6a1aa6bc5c31cc77f2 | ralt/network-addresses | conditions.lisp | (in-package #:network-addresses)
(define-condition invalid-format (error) ())
| null | https://raw.githubusercontent.com/ralt/network-addresses/b7ce23eafcdf6e337a09bdf19d0314842d99482e/src/conditions.lisp | lisp | (in-package #:network-addresses)
(define-condition invalid-format (error) ())
| |
6979150129b0b244b486c78c48e44a6daeb889b1f5dd6c9da293988e7f7d1312 | solidsnack/shell-escape | ShellEscape.hs |
| Typed shell escaping for Bourne Shell and Bash .
-}
module Text.ShellEscape
( Data.ByteString.ShellEscape.Escape.Escape(..)
, Data.ByteString.ShellEscape.Sh.Sh()
, Data.ByteString.ShellEscape.Sh.sh
, Data.ByteString.ShellEscape.Bash.Bash()
, Data.ByteString.ShellEscape.Bash.bash
) where
import Data... | null | https://raw.githubusercontent.com/solidsnack/shell-escape/8a4a0e8153c5e2bcc0dc30773b0009e8f4d5e6cc/Text/ShellEscape.hs | haskell |
| Typed shell escaping for Bourne Shell and Bash .
-}
module Text.ShellEscape
( Data.ByteString.ShellEscape.Escape.Escape(..)
, Data.ByteString.ShellEscape.Sh.Sh()
, Data.ByteString.ShellEscape.Sh.sh
, Data.ByteString.ShellEscape.Bash.Bash()
, Data.ByteString.ShellEscape.Bash.bash
) where
import Data... | |
a6151c513f4cdfb2c9e49fbc3f2cb6054b9189eed77b1bd18d7a7afa782ff6cf | kudelskisecurity/scannerl | fp_modbus.erl | Modbus fingerprinting module
%%% returns data from the modbus response
%%%
%%% Output:
%%% true: it is modbus
%%% false: it is modbus but a protocol error is returned
%%%
-module(fp_modbus).
-author("Adrien Giner - ").
-author("David Rossier - ").
-behavior(fp_module).
-include("../includes/args.hrl").
-expor... | null | https://raw.githubusercontent.com/kudelskisecurity/scannerl/8133065030d014401c47b2470e67a36e9df81b1e/src/fpmodules/fp_modbus.erl | erlang | returns data from the modbus response
Output:
true: it is modbus
false: it is modbus but a protocol error is returned
our record for this fingerprint
milli-seconds
transport type
max packet expected
transaction ID
protocol
length
unit ID
function code, Read device identification
subcode
read device... | Modbus fingerprinting module
-module(fp_modbus).
-author("Adrien Giner - ").
-author("David Rossier - ").
-behavior(fp_module).
-include("../includes/args.hrl").
-export([callback_next_step/1]).
-export([get_default_args/0]).
-export([get_description/0]).
-export([get_arguments/0]).
Modbus port
-define(READ_DE... |
ded8cc0817d845659ec2900cc0e19d9cda366119ce22d8969aaf41f04e07e295 | oetr/racket-opencv | 02-load-save-image.rkt | #! /usr/bin/env racket
Author :
;; Load and display an image specified on the command line, then
;; convert the image into grayscale and save it on the hard disk
;; converted from an example in opencv documentation
;;
#lang racket/base
;;; Includes
(require opencv/highgui)
;; Get path to the image from the c... | null | https://raw.githubusercontent.com/oetr/racket-opencv/8124eb6b620769137656547e83f9d9587ab37c23/tutorials/01_introduction/02-load-save-image.rkt | racket | Load and display an image specified on the command line, then
convert the image into grayscale and save it on the hard disk
converted from an example in opencv documentation
Includes
Get path to the image from the command line arguments
Read the file
Convert to gray
Save the gray image
Wait for a keystroke ... | #! /usr/bin/env racket
Author :
#lang racket/base
(require opencv/highgui)
(define arguments (current-command-line-arguments))
(unless (= (vector-length arguments) 2)
(printf "Usage: ./02-load-save-image.rkt in-image out-image~n")
(exit))
(define image-name (vector-ref arguments 0))
(define out-image (vect... |
0d452aa2af105ae6cd45996b84548cdfe1a8ca29ec5242a0a757b29ecbd411ef | mattmundell/nightshade | codegen.lisp | ;;; The implementation-independent parts of the code generator. We use
;;; functions and information provided by the VM definition to convert IR2
;;; into assembly code. After emitting code, we finish the assembly and
;;; then do the post-assembly phase.
(in-package :c)
(in-package :new-assem)
(import '(label gen-... | null | https://raw.githubusercontent.com/mattmundell/nightshade/d8abd7bd3424b95b70bed599e0cfe033e15299e0/src/compiler/codegen.lisp | lisp | The implementation-independent parts of the code generator. We use
functions and information provided by the VM definition to convert IR2
into assembly code. After emitting code, we finish the assembly and
then do the post-assembly phase.
The name and flavor of the fixup. The assembler makes no assumption... |
(in-package :c)
(in-package :new-assem)
(import '(label gen-label emit-label label-position) :c)
(in-package :c)
(export '(component-header-length sb-allocated-size current-nfp-tn
callee-nfp-tn callee-return-pc-tn *code-segment* *elsewhere*
trace-table-entry pack-trace-table note-fixup *assembly-optimize*
... |
489e6c82fcbdce4521a56ceb7c8d324ec0c361b221f25346ffc87fbc782136f7 | kupl/LearnML | original.ml | type nat = ZERO | SUCC of nat
let natadd (n1 : nat) (n2 : nat) : nat =
let rec func_add (n1 : nat) (n2 : nat) : nat =
match n1 with ZERO -> n2 | SUCC n1' -> SUCC (func_add n1' n2)
in
func_add n1 n2
let natmul (n1 : nat) (n2 : nat) : nat =
let rec func_num (n : nat) : int =
match n with ZERO -> 0 | SU... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/nat/sub31/original.ml | ocaml | type nat = ZERO | SUCC of nat
let natadd (n1 : nat) (n2 : nat) : nat =
let rec func_add (n1 : nat) (n2 : nat) : nat =
match n1 with ZERO -> n2 | SUCC n1' -> SUCC (func_add n1' n2)
in
func_add n1 n2
let natmul (n1 : nat) (n2 : nat) : nat =
let rec func_num (n : nat) : int =
match n with ZERO -> 0 | SU... | |
74aed26bb4c7ae6920a15e467388dd8a371a99b576c56d75268dcfff64620f9c | slindley/dependent-haskell | FreeApplicative.hs | {- Free applicative functor over a functor -}
# LANGUAGE
DataKinds ,
GADTs , TypeOperators , TypeFamilies #
DataKinds,
GADTs, TypeOperators, TypeFamilies #-}
import Control.Applicative
heterogeneous lists wrt a functor f :
FList f [ a1, ... ,an ] = = [ f a1 , ... , f ak ]
... | null | https://raw.githubusercontent.com/slindley/dependent-haskell/f0ea64b4e50464e8c60c11a82a7f432b0fccf122/Free/FreeApplicative.hs | haskell | Free applicative functor over a functor
identity functor
type list concatenation
the free applicative functor
The free alternative applicative functor
- proxy stuff -
list of type proxies |
# LANGUAGE
DataKinds ,
GADTs , TypeOperators , TypeFamilies #
DataKinds,
GADTs, TypeOperators, TypeFamilies #-}
import Control.Applicative
heterogeneous lists wrt a functor f :
FList f [ a1, ... ,an ] = = [ f a1 , ... , f ak ]
heterogeneous lists wrt a functor f:
... |
2d0588735621399db1c6bbf215c6b11389d26df14238a29f3f8af3917287808e | TrustInSoft/tis-interpreter | LogicAssigns.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/LogicAssigns.ml | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Soft... |
293b5c8bbe2e7730c8739df957fc51d490e56cae46a8103c8041a960c55ca0fb | elbrujohalcon/hPage | IOServer.hs |
module HPage.IOServer (
start, stop, runIn, ServerHandle
) where
import Control.Exception (try, SomeException)
import Control.Monad
import Control.Monad.Trans
import Control.Concurrent.Process
import Control.Concurrent.MVar
newtype ServerHandle = SH {handle :: Handle (IO ())}
start :: IO ServerHandle
start ... | null | https://raw.githubusercontent.com/elbrujohalcon/hPage/401a039332c7b120f76cbcbd5b33f5dca3d8c369/src/HPage/IOServer.hs | haskell |
module HPage.IOServer (
start, stop, runIn, ServerHandle
) where
import Control.Exception (try, SomeException)
import Control.Monad
import Control.Monad.Trans
import Control.Concurrent.Process
import Control.Concurrent.MVar
newtype ServerHandle = SH {handle :: Handle (IO ())}
start :: IO ServerHandle
start ... | |
f92042279a112683c25736743c860b3978e8d82460fa93c78f8392667df16201 | stevenvar/OMicroB | lchipUarts.mli | open Pic32
type uxmode_param = ON_
| SIDL_
| IREN_
| RTSMD_
| UEN_0
| UEN_1
| UEN_2
| UEN_3
| WAKE_
| LPBACK_
| ABAUD_
| RXINV_
| BRGH_
| PDSEL_0
| PDSEL_1
| PDSEL_2
| PDSEL_3
| STSEL_
type uxsta_pa... | null | https://raw.githubusercontent.com/stevenvar/OMicroB/e4324d0736ac677b3086741dfdefb0e46775642b/targets/pic32/lchip/lchipUarts.mli | ocaml | open Pic32
type uxmode_param = ON_
| SIDL_
| IREN_
| RTSMD_
| UEN_0
| UEN_1
| UEN_2
| UEN_3
| WAKE_
| LPBACK_
| ABAUD_
| RXINV_
| BRGH_
| PDSEL_0
| PDSEL_1
| PDSEL_2
| PDSEL_3
| STSEL_
type uxsta_pa... | |
4a9eb506246c2df06906a6e3f9f06fe0015c0a7431bacec5021c2924cd4d8091 | BinaryAnalysisPlatform/bap | bap_c_data.ml | open Core_kernel[@@warning "-D"]
open Bap.Std
open Format
type model32 = [
| `LP32
| `ILP32
]
type model64 = [
| `ILP64
| `LLP64
| `LP64
]
type model = [model32 | model64]
type value =
| Top
| Set of word list
[@@deriving bin_io, compare, sexp]
type 'd obj =
| Basic of Bap_c_type.basic
| Field of ... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/5a71fb10683f0d865322a9df99951c3b11ba1a50/lib/bap_c/bap_c_data.ml | ocaml | open Core_kernel[@@warning "-D"]
open Bap.Std
open Format
type model32 = [
| `LP32
| `ILP32
]
type model64 = [
| `ILP64
| `LLP64
| `LP64
]
type model = [model32 | model64]
type value =
| Top
| Set of word list
[@@deriving bin_io, compare, sexp]
type 'd obj =
| Basic of Bap_c_type.basic
| Field of ... | |
42d9471fc5cc8445b4a94f767b6db624f9b932444766fed676fa24a40f28215d | rtoy/cmucl | alloc.lisp | ;;; -*- Package: HPPA -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
(ext:file-comment
"$Header: src/compiler/hppa/alloc.lisp $")
;;;
;;; ... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/compiler/hppa/alloc.lisp | lisp | -*- Package: HPPA -*-
**********************************************************************
**********************************************************************
Allocation VOPs for the HPPA port.
Dynamic-Extent (not implemented).
LIST and LIST*
Special purpose inline allocators.
pseudo-atomic, because... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
(ext:file-comment
"$Header: src/compiler/hppa/alloc.lisp $")
Written by .
(in-package "HPPA")
(define-vop (%dynamic-extent-start)
(:args (saved-stack-pointer :scs (any... |
a076157ffd49f6d1bfc00ea817cc6a58ac19820a851a611094ff71c47e9fc967 | ijvcms/chuanqi_dev | careertitle_lib.erl | %%%-------------------------------------------------------------------
@author yubing
( C ) 2015 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 14 . 十二月 2015 11:20
%%%-------------------------------------------------------------------
-module(careertitle_lib).
-include("record.hrl").
-include("cache.hrl").
-incl... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/careertitle/careertitle_lib.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
更新第一称号信息
玩家名称 账号绑定纪录
初始化 第一职业称号基础数据信息
从ets获取玩家关系记录
保存称号信息
根据玩家的id查询出当前的称号信息
更新称号信息
判断等级是否足够,否则不予处理
如果不是自己,那么判断战力,查看是否更新称号信息
更新称号雕像信息
更新玩家的称号信息
更新称号信息
更新称号雕像信息... | @author yubing
( C ) 2015 , < COMPANY >
Created : 14 . 十二月 2015 11:20
-module(careertitle_lib).
-include("record.hrl").
-include("cache.hrl").
-include("common.hrl").
-include("gameconfig_config.hrl").
-export([get_career_title_player_id/2, update_career_title/1, init_title/0, get_ets/1, get_ets_list/0]).
ini... |
d7ac95ac63c4e2062349eccd4e90a62c73036dd1ae5cf5c4e9b263d4afaf0263 | 6502/JSLisp | turtle.lisp | (import * from fsg)
(defvar *turtle* (create-element "img"))
(setf (. *turtle* src) "turtle.png")
(setf (. *turtle* style position) "absolute")
(setf (. *turtle* style WebkitTransformOrigin) "21px 16px")
(append-child (. document body) *turtle*)
(defvar *target-x* 200)
(defvar *target-y* 200)
(defvar *target-angle* 0... | null | https://raw.githubusercontent.com/6502/JSLisp/9a4aa1a9116f0cfc598ec9f3f30b59d99810a728/examples/turtle.lisp | lisp | (import * from fsg)
(defvar *turtle* (create-element "img"))
(setf (. *turtle* src) "turtle.png")
(setf (. *turtle* style position) "absolute")
(setf (. *turtle* style WebkitTransformOrigin) "21px 16px")
(append-child (. document body) *turtle*)
(defvar *target-x* 200)
(defvar *target-y* 200)
(defvar *target-angle* 0... | |
0c49188d9474488f1c6d834c01abf8e2333873823af416aa4a4bd432c93309a8 | russelldb/erlgmail | erlgmail_app.erl | -module(erlgmail_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_Type, _StartArgs) ->
erlgmail_sup:start_link().
stop(_State) ->
ok. | null | https://raw.githubusercontent.com/russelldb/erlgmail/ee25292e01bcd22e58776d6865685d1e0c77151a/src/erlgmail_app.erl | erlang | -module(erlgmail_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_Type, _StartArgs) ->
erlgmail_sup:start_link().
stop(_State) ->
ok. | |
b88675d0202b073f915c09faad8de33241fa00a6a43236ff3fd07819487be665 | adomokos/haskell-katas | Ex13_HofsLambdasSpec.hs | module Solutions.Ex13_HofsLambdasSpec
( spec
) where
import Test.Hspec
main :: IO ()
main = hspec spec
flip' f = (\x y -> f y x)
spec :: Spec
spec = do
describe "Lambdas" $ do
it "can express complex mapping logic" $
{- use map here -}
do
map
(\x ->
if even x
... | null | https://raw.githubusercontent.com/adomokos/haskell-katas/be06d23192e6aca4297814455247fc74814ccbf1/test/Solutions/Ex13_HofsLambdasSpec.hs | haskell | use map here
use zipWith here
The calculation logic should be: (x * 30 + 3) / y)
use map here
create a new function that uses lambda | module Solutions.Ex13_HofsLambdasSpec
( spec
) where
import Test.Hspec
main :: IO ()
main = hspec spec
flip' f = (\x y -> f y x)
spec :: Spec
spec = do
describe "Lambdas" $ do
it "can express complex mapping logic" $
do
map
(\x ->
if even x
then "even"
... |
4dede83e96a4d87ee513c5798130ccb971a73e7ac7d7869818a4950b33c321c6 | michalkonecny/aern2 | Integer.hs | # OPTIONS_GHC -fno - warn - orphans #
module ERC.Integer where
import Prelude
import Debug.Trace (trace)
import Control.Monad.ST.Trans
import ERC.Monad
import ERC.Variables
import ERC.Logic
type INTEGER = Integer
declareINTEGER :: ERC s INTEGER -> ERC s (Var s INTEGER)
declareINTEGER iERC =
do
i <- checkI $ ... | null | https://raw.githubusercontent.com/michalkonecny/aern2/1c8f12dfcb287bd8e3353802a94865d7c2c121ec/aern2-erc/src/ERC/Integer.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module ERC.Integer where
import Prelude
import Debug.Trace (trace)
import Control.Monad.ST.Trans
import ERC.Monad
import ERC.Variables
import ERC.Logic
type INTEGER = Integer
declareINTEGER :: ERC s INTEGER -> ERC s (Var s INTEGER)
declareINTEGER iERC =
do
i <- checkI $ ... | |
1648445dcc67d8365af31857f94d1057c2a8c9f10c94a4e9990a96651e99d25c | iskandr/parakeet-retired | CostModel.ml | (* pp: -parser o pa_macro.cmo *)
open Base
open SSA
type shapes = Shape.t list
class type backend_costs = object
method map_cost : FnTable.t -> SSA.fundef -> shapes -> shapes -> float
method reduce_cost : FnTable.t -> SSA.fundef -> shapes -> shapes -> float
method scan_cost : FnTable.t -> SSA.fundef -> s... | null | https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/Runtime/CostModel/CostModel.ml | ocaml | pp: -parser o pa_macro.cmo
problem: backends are parameterized by pointer/value type---
how to return single backend type?
POSSIBLE SOLUTION: return the name?
NOTE: this assumes we're mapping over only the outermost axis!
since shape information has already been fully inferred in the
TODO: loop over backend... |
open Base
open SSA
type shapes = Shape.t list
class type backend_costs = object
method map_cost : FnTable.t -> SSA.fundef -> shapes -> shapes -> float
method reduce_cost : FnTable.t -> SSA.fundef -> shapes -> shapes -> float
method scan_cost : FnTable.t -> SSA.fundef -> shapes -> shapes -> float
end
cl... |
cb633caa8099edf337b3a474caa85aa9546535828c3307c4d850aa97d3eff952 | prg-titech/baccaml | alpha.ml | (* rename identifiers to make them unique (alpha-conversion) *)
open KNormal
let find x env = try M.find x env with Not_found -> x
let rec g env = function
(* α変換ルーチン本体 (caml2html: alpha_g) *)
| Unit -> Unit
| Int i -> Int i
| Float d -> Float d
| String s -> String s
| Neg x -> Neg (find x env)
| Add ... | null | https://raw.githubusercontent.com/prg-titech/baccaml/a3b95e996a995b5004ca897a4b6419edfee590aa/base/alpha.ml | ocaml | rename identifiers to make them unique (alpha-conversion)
α変換ルーチン本体 (caml2html: alpha_g)
letのα変換 (caml2html: alpha_let) |
open KNormal
let find x env = try M.find x env with Not_found -> x
let rec g env = function
| Unit -> Unit
| Int i -> Int i
| Float d -> Float d
| String s -> String s
| Neg x -> Neg (find x env)
| Add (x, y) -> Add (find x env, find y env)
| Sub (x, y) -> Sub (find x env, find y env)
| Mul (x, y) ->... |
617c3cfe12f7d4189f0db7baab974bdf691f998be493705478b9752cf4615843 | rizo/snowflake-os | set.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/libraries/stdlib/set.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : , v 1.19 2004 - 11 - 25 00:0... |
47a2659a60e4450d8b55323aa037d23cffbfd4bb19779af2066c9d5962ba4947 | dergraf/epmdpxy | epmdpxy.erl | -module(epmdpxy).
-export([start/0,
start/1,
start/2,
status/0,
cut_cables/2,
fix_cables/2]).
start() ->
EPMD_PORT =
case os:getenv("ERL_EPMD_PORT") of
false ->
{ok, DefaultPort} = application:get_env(epmdpxy, port),
DefaultPort;
... | null | https://raw.githubusercontent.com/dergraf/epmdpxy/646506ba2117cb5ac81b9d37c2fe5cb7f042b043/src/epmdpxy.erl | erlang | be sure that you either started the vm with erl -epmd_prot EPMD_PORT
or you have exported the enviroment variable ERL_EPMD_PORT | -module(epmdpxy).
-export([start/0,
start/1,
start/2,
status/0,
cut_cables/2,
fix_cables/2]).
start() ->
EPMD_PORT =
case os:getenv("ERL_EPMD_PORT") of
false ->
{ok, DefaultPort} = application:get_env(epmdpxy, port),
DefaultPort;
... |
dbc4209171c4c763a8d5dc76f2a9aba9f1b32e8582aa09772d29a7eaf9a73ea2 | ethereum/act | Type.hs | {-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE LambdaCase #
{-# Language TypeApplications #-}
{-# Language ScopedTypeVariables #-}
{-# Language NamedFieldPuns #-}
{-# Language DataKinds #-}
# LANGUAGE ApplicativeDo #
module Type (typecheck, bound, lookupVars, defaultStore, Err) where
import Prelude hid... | null | https://raw.githubusercontent.com/ethereum/act/36b65b71eea22ebe4287f066190ecf47f4394fa3/src/Type.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# Language TypeApplications #
# Language ScopedTypeVariables #
# Language NamedFieldPuns #
# Language DataKinds #
abandon in favor of [(a,b)]?
| Main typechecking function.
gathers duplicate entries in list based on a custom equality predicate.
- Finds storage declarations ... | # LANGUAGE LambdaCase #
# LANGUAGE ApplicativeDo #
module Type (typecheck, bound, lookupVars, defaultStore, Err) where
import Prelude hiding (GT, LT)
import EVM.ABI
import EVM.Solidity (SlotType(..))
import Data.Map.Strict (Map,keys,findWithDefault)
import Data.Maybe
import Data.List.NonEmpty (NonEmpty(..))
impor... |
48a9df07a39a73dedf47256c2d0181ac1f821aa3e08fbd4693e5e47631374c4b | fugue/fregot | Extended.hs | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
-}
{-# LANGUAGE Bang... | null | https://raw.githubusercontent.com/fugue/fregot/c3d87f37c43558761d5f6ac758d2f1a4117adb3e/lib/Data/Vector/Extended.hs | haskell | # LANGUAGE BangPatterns # | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
-}
# OPTIONS_GHC -fn... |
59b386f874dfa93b2f4be5d509585f4ca548cc1836047be2c0e8927af5a32b89 | haskell-works/hw-xml | BlankedXmlSpec.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
module HaskellWorks.Data.Xml.Succinct.Cursor.BlankedXmlSpec
( spec
) where
import HaskellWorks.Data.Xml.Succinct.Cursor.BlankedXml
import HaskellWorks.Hspec.Hedgehog
import Hedgehog
import Test.Hspec
HLINT ignore " Redundant do "
spec ... | null | https://raw.githubusercontent.com/haskell-works/hw-xml/e30a4cd8e6dc7451263a3d45c1ae28b3f35d0079/test/HaskellWorks/Data/Xml/Succinct/Cursor/BlankedXmlSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE FlexibleContexts #
module HaskellWorks.Data.Xml.Succinct.Cursor.BlankedXmlSpec
( spec
) where
import HaskellWorks.Data.Xml.Succinct.Cursor.BlankedXml
import HaskellWorks.Hspec.Hedgehog
import Hedgehog
import Test.Hspec
HLINT ignore " Redundant do "
spec :: Spec
spec = describe "HaskellWor... |
9468f60e1d3762e35e213d74541ae40ce91b1a2e5b6855c5c6bd9bafb3a82763 | picty/concerto | listRawByType.ml | open FileOps
let _ =
if Array.length Sys.argv <> 3 then exit 1;
let ops = prepare_data_dir Sys.argv.(1) in
let print_file (name, offset, len) =
Printf.printf "%s:%d:%d\n" name offset len
in iter_raw_metadata ops Sys.argv.(2) print_file
| null | https://raw.githubusercontent.com/picty/concerto/fac5dd04a5a3dcd91782e17b7bd3e0f4a9ddd2e0/listRawByType.ml | ocaml | open FileOps
let _ =
if Array.length Sys.argv <> 3 then exit 1;
let ops = prepare_data_dir Sys.argv.(1) in
let print_file (name, offset, len) =
Printf.printf "%s:%d:%d\n" name offset len
in iter_raw_metadata ops Sys.argv.(2) print_file
| |
993572b34e8cd97fdccfe45aa54001a3e69a3d544492ed6895ac117e7adc42d4 | ocaml-flambda/flambda-backend | matching.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/2eea6bab3ef6e2d90a9bed292b9547eccf86454d/ocaml/lambda/matching.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Typedtree
open Lambda
open Debuginfo.Scoped_location
val for_function:
scopes:scopes -> la... |
769fcb2bccf7e01a247ce90af60080d033c3e674c475ed94abb312a8596b20fb | marigold-dev/chusai | example_tests.ml | open Tools
let test_empty () = check_lists [] (Mtm.to_list Mtm.empty)
let test_from_empty_list () = check_lists [] (Mtm.to_list @@ Mtm.from_list [])
let test_from_one_elem_list () =
check_lists [ "a", 1 ] (Mtm.to_list @@ Mtm.from_list @@ [ "a", 1 ])
;;
let test_from_two_elem_list () =
check_lists [ "a", 1; "b", ... | null | https://raw.githubusercontent.com/marigold-dev/chusai/09f798c585121d3b02bf3fed0f52f15c3bdc79a1/layer2/lib/chusai_merkle_tree_map/test/example_tests.ml | ocaml | open Tools
let test_empty () = check_lists [] (Mtm.to_list Mtm.empty)
let test_from_empty_list () = check_lists [] (Mtm.to_list @@ Mtm.from_list [])
let test_from_one_elem_list () =
check_lists [ "a", 1 ] (Mtm.to_list @@ Mtm.from_list @@ [ "a", 1 ])
;;
let test_from_two_elem_list () =
check_lists [ "a", 1; "b", ... | |
4237e8e38129a233f11356029c1faf44517b6c1cede1733ff2b9b9ceb375c37b | mathematical-systems/clml | dlarft.lisp | ;;; Compiled by f2cl version:
( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:0... | null | https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/lapack/dlarft.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t)
(:relaxed-array-decls t) (:coerce-assigns :as-needed)
(:array-type ':array) (:array-slicing t)
(:declare-common nil) (:float-format double-float)) | ( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:03:25 rtoy Exp $ "
" $ I d :... |
2ae51560fcba23efd52d94809a1368abf4f4c8360aa1231ecbca5a24e32c662c | patrikja/AFPcourse | Promotion.hs | # LANGUAGE TypeFamilies , GADTs , DataKinds #
module Promotion where
data Nat = Zero | Suc Nat
With the extension " DataKinds " data - definitions are " promoted " :
So we get a new _ kind _ with ( empty ) datatypes
Zero : :
Suc : :
The family is unchanged from Families.hs
Live : Copy from Fam... | null | https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/L13/after/src/2015/Promotion.hs | haskell | Some simple functions
Does the definition look familiar?
We have no predefined addition types, so we have to define it
Nothing is stopping us from strange cases
Mention "Promotion": /~ghc/latest/docs/html/users_guide/promotion.html | # LANGUAGE TypeFamilies , GADTs , DataKinds #
module Promotion where
data Nat = Zero | Suc Nat
With the extension " DataKinds " data - definitions are " promoted " :
So we get a new _ kind _ with ( empty ) datatypes
Zero : :
Suc : :
The family is unchanged from Families.hs
Live : Copy from Fam... |
f72b1b18de656eca35360372c170a90ffb119a91ad49a44bc6f10d35eea052a9 | D4ryus/cl-netstat | term-rgb-map.lisp | (in-package #:cl-netstat)
(defparameter *term->rgb*
'(( 0 . ("00" "00" "00")) ( 1 . ("80" "00" "00")) ( 2 . ("00" "80" "00")) ( 3 . ("80" "80" "00"))
( 4 . ("00" "00" "80")) ( 5 . ("80" "00" "80")) ( 6 . ("00" "80" "80")) ( 7 . ("c0" "c0" "c0"))
( 8 . ("80" "80" "80")) ( 9 . ("ff" "00" "00")) ( 10... | null | https://raw.githubusercontent.com/D4ryus/cl-netstat/e7187a4bec2f23b08c7a236f0c52503a444b941d/term-rgb-map.lisp | lisp | (in-package #:cl-netstat)
(defparameter *term->rgb*
'(( 0 . ("00" "00" "00")) ( 1 . ("80" "00" "00")) ( 2 . ("00" "80" "00")) ( 3 . ("80" "80" "00"))
( 4 . ("00" "00" "80")) ( 5 . ("80" "00" "80")) ( 6 . ("00" "80" "80")) ( 7 . ("c0" "c0" "c0"))
( 8 . ("80" "80" "80")) ( 9 . ("ff" "00" "00")) ( 10... | |
7aa3430c2892bc7badca4a77b0c5c26cf5180387b36724ae016c371e924c0d9f | andrewMacmurray/haskell-book-solutions | binaryTree.hs | module BinaryTree where
data BinaryTree a =
Leaf
| Node (BinaryTree a) a (BinaryTree a)
deriving (Eq, Ord, Show)
insert' :: Ord a => a -> BinaryTree a -> BinaryTree a
insert' x Leaf = Node Leaf x Leaf
insert' x (Node left y right)
| x == y = Node left y right
| x < y = Node (insert' x left) y right
| x... | null | https://raw.githubusercontent.com/andrewMacmurray/haskell-book-solutions/f4fd386187c03828d1736d9a43642ab4f0ec6462/src/ch11/binaryTree.hs | haskell | module BinaryTree where
data BinaryTree a =
Leaf
| Node (BinaryTree a) a (BinaryTree a)
deriving (Eq, Ord, Show)
insert' :: Ord a => a -> BinaryTree a -> BinaryTree a
insert' x Leaf = Node Leaf x Leaf
insert' x (Node left y right)
| x == y = Node left y right
| x < y = Node (insert' x left) y right
| x... | |
8cfbaf4badf50dc4598a4f523e71d464535d55c45de490791ab7a302bf568372 | exoscale/clojure-kubernetes-client | v1beta1_daemon_set_status.clj | (ns clojure-kubernetes-client.specs.v1beta1-daemon-set-status
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1beta1-daemon-set-condition :refer :all]
)
(:import (java.io File)))
(declare v1beta1-daemon-set-status-data v1beta... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1beta1_daemon_set_status.clj | clojure | (ns clojure-kubernetes-client.specs.v1beta1-daemon-set-status
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1beta1-daemon-set-condition :refer :all]
)
(:import (java.io File)))
(declare v1beta1-daemon-set-status-data v1beta... | |
0a2d31a54b5686a84c3a6849997af014413166864ebc68194faae2c4f3507028 | Ptival/chick | Free.hs | module Term.Free where
import Data.Foldable (Foldable (toList))
import Data . List
import Term.Term (TermX)
--import Term.Binder
--import Term.Variable
freeVars :: TermX ξ ν -> [ν]
freeVars = toList
isFree :: (Eq ν) => ν -> TermX ξ ν -> Bool
isFree v t = v `elem` freeVars t
freeVars : : TermX ξ - > [ Variable ]... | null | https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/lib/Term/Free.hs | haskell | import Term.Binder
import Term.Variable
could be implemented in terms of ` freeVars ` , but this might be faster ?
could be implemented in terms of `freeVars`, but this might be faster? | module Term.Free where
import Data.Foldable (Foldable (toList))
import Data . List
import Term.Term (TermX)
freeVars :: TermX ξ ν -> [ν]
freeVars = toList
isFree :: (Eq ν) => ν -> TermX ξ ν -> Bool
isFree v t = v `elem` freeVars t
freeVars : : TermX ξ - > [ Variable ]
freeVars = go
where
go = \case ... |
429ecc7ccbd4b2eb03b1b15c8ffae5326fac196d7aaefdec4a1c23063a6a6970 | project-oak/hafnium-verification | quandaryBO.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/quandary/quandaryBO.ml | ocaml | Can be computed more efficiently (in n*log(n)) by using a Map mapping
file name + line number to quandary_issues to match with inferbo_issues |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
a9480e9f25c2cbeb6400696b6f7b40fcacad51d18305909d38c3227586b72dae | ocurrent/ocluster | mock_network.ml | open Capnp_rpc_lwt
open Lwt.Infix
let ( >>!= ) = Lwt_result.bind
module Flow = struct
type flow = {
inbound : Cstruct.t Lwt_stream.t;
outbound : Cstruct.t option -> unit;
mutable closed : bool;
}
type error = |
type write_error = Mirage_flow.write_error
let pp_error _ = function (_ : error) ->... | null | https://raw.githubusercontent.com/ocurrent/ocluster/5a9c0c2304adb9b786178fadc007e0cfa92a8e08/test/mock_network.ml | ocaml | Stretch our local reference to [x] over a fake network link.
[remote_breakable x] is a [(sr, break)] pair, where [sr] is a sturdy-ref that connects to [x] over a fake network.
And [break] is a function that breaks the network. Connecting after breaking the network will succeed. | open Capnp_rpc_lwt
open Lwt.Infix
let ( >>!= ) = Lwt_result.bind
module Flow = struct
type flow = {
inbound : Cstruct.t Lwt_stream.t;
outbound : Cstruct.t option -> unit;
mutable closed : bool;
}
type error = |
type write_error = Mirage_flow.write_error
let pp_error _ = function (_ : error) ->... |
b5dc054182d9f8429d21593525a83955c076ac05b768288aa5478526f040aa2c | esl/elarm | elarm_registry.erl | %%%-------------------------------------------------------------------
Copyright ( C ) 2014 , Erlang Solutions Ltd.
%%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file except in compliance with the License.
%%% You may obtain a copy of the License at
%%%
%%% -... | null | https://raw.githubusercontent.com/esl/elarm/d5af5a9632df104724c8dec85a774a1421c4caae/src/elarm_registry.erl | erlang | -------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express o... | Copyright ( C ) 2014 , Erlang Solutions Ltd.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
-module(elarm_registry).
-behaviour(gen_server).
-export([start_link/0,
subscribe/1,
unsubscr... |
3b8e51a1d5fc07dfa3e6ba1fb744ab6c9646d0c439c1e72228b5667e06405584 | Otann/morse | api_test.clj | (ns morse.api-test
(:require [cheshire.core :as json]
[clojure.test :refer :all]
[morse.api :as api]
[morse.test-utils :as u]
[clojure.core.async :as a]))
(def token "fake-token")
(def chat-id 239)
(def message-id 1)
(def inline-query-id 1337)
(def callback-query-id 13... | null | https://raw.githubusercontent.com/Otann/morse/bbb2efc6a8eb17603a56121fbe10e1592ce5d8ee/test/morse/api_test.clj | clojure | check that it is now post request
check that default params are presented
check that it is now post request
check that default params are presented
check that a option has encoded
check that it is now post request
check that default params are presented
check that a flat option has encoded
check that a nested ... | (ns morse.api-test
(:require [cheshire.core :as json]
[clojure.test :refer :all]
[morse.api :as api]
[morse.test-utils :as u]
[clojure.core.async :as a]))
(def token "fake-token")
(def chat-id 239)
(def message-id 1)
(def inline-query-id 1337)
(def callback-query-id 13... |
c7b6f7b0d1ac9eba43b4a66555379a741cfeefb76240cad05da0e39f224939bc | Covariance/hi-language | T7.hs | module T7 (
group
) where
import Control.Monad (forM_)
import Data.Foldable (Foldable (toList))
import Data.List (null, (\\))
import Data.Maybe (fromJust, isNothing)
import Data.Sequence (fromList)
import Data.Set (empty)
import Data.Text (pack)
import Data.Traversable (forM)
import System.Directory (createDirec... | null | https://raw.githubusercontent.com/Covariance/hi-language/a395277811fdc7a9853c4241ff6ec07d6130480a/test/T7.hs | haskell | Fun fact about this tests - because of it I removed '-threaded' flag
because for some reason (completely unknown reason) it flacked otherwise
This test checks case when neither file, nor folder exist. In such case
we should return null.
Apparently, we MUST NOT accept anything except string in
it "write - bytes"... | module T7 (
group
) where
import Control.Monad (forM_)
import Data.Foldable (Foldable (toList))
import Data.List (null, (\\))
import Data.Maybe (fromJust, isNothing)
import Data.Sequence (fromList)
import Data.Set (empty)
import Data.Text (pack)
import Data.Traversable (forM)
import System.Directory (createDirec... |
86b654ea5d2a0d0132985b88a8e35d83a94d599803b305a554abf0d760e0164d | thierry-martinez/stdcompat | set.mli | module type OrderedType = sig type t val compare : t -> t -> int end
module type S =
sig
type elt
type t
val empty : t
val is_empty : t -> bool
val mem : elt -> t -> bool
val add : elt -> t -> t
val singleton : elt -> t
val remove : elt -> t -> t
val union : t -> t -> t
val i... | null | https://raw.githubusercontent.com/thierry-martinez/stdcompat/83d786cdb17fae0caadf5c342e283c3dcfee2279/interfaces/4.00/set.mli | ocaml | module type OrderedType = sig type t val compare : t -> t -> int end
module type S =
sig
type elt
type t
val empty : t
val is_empty : t -> bool
val mem : elt -> t -> bool
val add : elt -> t -> t
val singleton : elt -> t
val remove : elt -> t -> t
val union : t -> t -> t
val i... | |
4bfe05fd9529c69c4d537bc863ef4922b92022e7090d7615d11599ceaa9681d8 | gar1t/erlang-cli | cli_tests.erl | -module(cli_tests).
-compile([nowarn_unused_function, export_all]).
%% ===================================================================
%% Run
%% ===================================================================
run() ->
cli_debug:init_trace_from_env(os:getenv("TRACE")),
test_cli_opt(),
test_parse_a... | null | https://raw.githubusercontent.com/gar1t/erlang-cli/4f2b097c43a6959f842969c036e2816e8626fabb/src/cli_tests.erl | erlang | ===================================================================
Run
===================================================================
===================================================================
CLI opt
===================================================================
=============================... | -module(cli_tests).
-compile([nowarn_unused_function, export_all]).
run() ->
cli_debug:init_trace_from_env(os:getenv("TRACE")),
test_cli_opt(),
test_parse_args(),
test_parse_pos_args(),
test_opt_convert(),
test_help().
run(Test) ->
cli_debug:init_trace_from_env(os:getenv("TRACE")),
F... |
601c79e692977be6a9787d2dac48aee8cf83bfc5579f8e95cdd77dfc95af29e9 | foggynight/typewriter | main.lisp | (in-package #:typewriter)
(defun main ()
(let* ((args (uiop:command-line-arguments))
(filename (car args))
(cursor (make-instance 'cursor :y 0 :x 0))
(page nil))
(when (or (< (length args) 1)
(> (length args) 1))
(format t "typewriter: Wrong number of arguments~%~
... | null | https://raw.githubusercontent.com/foggynight/typewriter/36f4e91d39401f39f194fa8e427c3917de929685/src/main.lisp | lisp | <CTRL> Command Events
Movement Events
Window Events
Print Events
For any unbound character: if the character is a standard character,
add it to the page and move the cursor, otherwise do nothing. | (in-package #:typewriter)
(defun main ()
(let* ((args (uiop:command-line-arguments))
(filename (car args))
(cursor (make-instance 'cursor :y 0 :x 0))
(page nil))
(when (or (< (length args) 1)
(> (length args) 1))
(format t "typewriter: Wrong number of arguments~%~
... |
3137ef83f1195d86e57475003888d7861de6d5fe3f734d011569ad9f72686702 | nuttycom/aftok | Billing.hs | # LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE TemplateHaskell #
module Aftok.Billing where
import Aftok.Types (Email, ProjectId, UserId)
import Control.Lens (makeLenses, makePrisms, preview, view, _Just)
import qualified Data.Thyme.Clock as C
import qualified Dat... | null | https://raw.githubusercontent.com/nuttycom/aftok/58feefe675cea908cf10619cc88ca4770152e82e/lib/Aftok/Billing.hs | haskell | # LANGUAGE DeriveTraversable #
| SemiMonthly
recurrenceCount SemiMonthly = Nothing
| A potentially recurring billable amount.
| An association between a customer and a (potentially recurring) billable amount.
| A stream of dates upon which the specified subscription
subscription. | # LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE TemplateHaskell #
module Aftok.Billing where
import Aftok.Types (Email, ProjectId, UserId)
import Control.Lens (makeLenses, makePrisms, preview, view, _Just)
import qualified Data.Thyme.Clock as C
import qualified Data.Thyme.Time as T
import Data.UUID ... |
4587bebff1c2cc5e0dabdeb82b056292bf8ccb4bc3aea240946fcbc6a9ba71a8 | sjoerdvisscher/data-category | Category.hs | # LANGUAGE TypeFamilies , GADTs , RankNTypes , PolyKinds , LinearTypes , FlexibleInstances , NoImplicitPrelude #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Category
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer :
-- Stability : e... | null | https://raw.githubusercontent.com/sjoerdvisscher/data-category/11fc0ca8e5cea28e5aef71de3aa5df7cabe8020b/Data/Category.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Category
License : BSD-style (see the file LICENSE)
Maintainer :
Stability : experimental
Portability : non-portable
---------------------------------------------------------------------------
* Categor... | # LANGUAGE TypeFamilies , GADTs , RankNTypes , PolyKinds , LinearTypes , FlexibleInstances , NoImplicitPrelude #
module Data.Category (
Category(..)
, Obj
, Kind
, Op(..)
, obj
) where
import GHC.Exts
import Data.Kind (Type)
infixr 8 .
type Obj k a = k a a
| An instance of k@ declares the arrow @... |
2f1babde3a4b5685f44562c869b95552b0cdb65dce2de4da0858232667c7e28f | futurice/haskell-mega-repo | Config.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE RecordWildCards #
module Futurice.App.HoursApi.Config (
Config(..),
) where
import Futurice.EnvConfig
import Futurice.Integrations
import Futurice.Prelude
import Prelude ()
import qualified FUM.Types.Login as FUM
import qualified PlanMill as PM
data Config =... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/hours-api/src/Futurice/App/HoursApi/Config.hs | haskell | # LANGUAGE DataKinds # | # LANGUAGE RecordWildCards #
module Futurice.App.HoursApi.Config (
Config(..),
) where
import Futurice.EnvConfig
import Futurice.Integrations
import Futurice.Prelude
import Prelude ()
import qualified FUM.Types.Login as FUM
import qualified PlanMill as PM
data Config = Config
{ cfgIntegrationsCfg ... |
dfc105a4b1698dde3c9d8abc95304e415fcd92e67b127e41af2aa033a9006de3 | thheller/shadow-cljsjs | vega_tooltip.cljs | (ns cljsjs.vega-tooltip
(:require ["vega-tooltip" :as vega-tooltip]))
(js/goog.exportSymbol "vegaTooltip" vega-tooltip) | null | https://raw.githubusercontent.com/thheller/shadow-cljsjs/eaf350d29d45adb85c0753dff77e276e7925a744/src/main/cljsjs/vega_tooltip.cljs | clojure | (ns cljsjs.vega-tooltip
(:require ["vega-tooltip" :as vega-tooltip]))
(js/goog.exportSymbol "vegaTooltip" vega-tooltip) | |
64f996b327ade4e2770d59bc36f9c375929adcece0054a513a966369fddbb0df | tonymorris/geo-osm | Home.hs | # LANGUAGE TemplateHaskell #
| The @home@ element of a OSM file .
module Data.Geo.OSM.Home
(
Home
, home
) where
import Text.XML.HXT.Arrow.Pickle
import Data.Geo.OSM.Lens.LatL
import Data.Geo.OSM.Lens.LonL
import Data.Geo.OSM.Lens.ZoomL
import Control.Lens.TH
| The @home@ element of a OSM file .
data Home = H... | null | https://raw.githubusercontent.com/tonymorris/geo-osm/776542be2fd30a05f0f9e867128eca5ad5d66bec/src/Data/Geo/OSM/Home.hs | haskell | ^ The @lon@ attribute.
^ The @zoom@ attribute. | # LANGUAGE TemplateHaskell #
| The @home@ element of a OSM file .
module Data.Geo.OSM.Home
(
Home
, home
) where
import Text.XML.HXT.Arrow.Pickle
import Data.Geo.OSM.Lens.LatL
import Data.Geo.OSM.Lens.LonL
import Data.Geo.OSM.Lens.ZoomL
import Control.Lens.TH
| The @home@ element of a OSM file .
data Home = H... |
6c5d18b475493574de57571077e1c88928a539cf338b09f835af0f37858e1b4f | chef/sqerl | eg1.erl | -module(eg1).
-export([
'#statements'/0
]).
'#statements'() ->
[{test, <<"SELECT * FROM eg1">>}].
| null | https://raw.githubusercontent.com/chef/sqerl/a27e3e58da53240dc9925ec03ecdb894b8231cf9/test/eg1.erl | erlang | -module(eg1).
-export([
'#statements'/0
]).
'#statements'() ->
[{test, <<"SELECT * FROM eg1">>}].
| |
523d054934684462e8cf8673bfa675893fadb5fd3a6d3ad87a2cdbd0e58e558f | lowasser/TrieMap | Tests.hs | module Data.TrieMap.Tests (tests, main) where
import qualified Data.TrieMap.Representation.Instances.Tests as ReprInst
import qualified Data.TrieMap.Representation.TH.Tests as ReprTH
import qualified Data.TrieMap.WordMap.Tests as WordMapTests
import qualified Data.TrieMap.OrdMap.Tests as OrdMapTests
import qualified D... | null | https://raw.githubusercontent.com/lowasser/TrieMap/1ab52b8d83469974a629f2aa577a85de3f9e867a/Data/TrieMap/Tests.hs | haskell | module Data.TrieMap.Tests (tests, main) where
import qualified Data.TrieMap.Representation.Instances.Tests as ReprInst
import qualified Data.TrieMap.Representation.TH.Tests as ReprTH
import qualified Data.TrieMap.WordMap.Tests as WordMapTests
import qualified Data.TrieMap.OrdMap.Tests as OrdMapTests
import qualified D... | |
acbb5e9f5e21ec21d89241b370d1981c4e7f6cfb90b381d973141d9436869450 | realworldocaml/book | test.ml | let sprintf = Printf.sprintf
let ksprintf = Printf.ksprintf
open Ppx_sexp_conv_lib.Conv
module Time : sig
type t
val now : unit -> t
val to_string : t -> string
val to_string_sec : t -> string
val to_string_abs : t -> string
end = struct
type t = string
let now () = "Time.now ()"
let to_string t = "[Ti... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppx_custom_printf/test/test.ml | ocaml | check that custom directives with nothing in between are properly translated
check that things works well when the conversion function take optional arguments
same as above, with empty module paths
testing what happens if the expression to the left of the format string
is a bit complicated
checking sexp: fo... | let sprintf = Printf.sprintf
let ksprintf = Printf.ksprintf
open Ppx_sexp_conv_lib.Conv
module Time : sig
type t
val now : unit -> t
val to_string : t -> string
val to_string_sec : t -> string
val to_string_abs : t -> string
end = struct
type t = string
let now () = "Time.now ()"
let to_string t = "[Ti... |
39784948d398ecc3a8b85728025053145880c14196a27b3796e73795f9f284d4 | johanhaleby/stub-http | port.clj | (ns stub-http.internal.port
(:import (java.net ServerSocket)))
(defn get-free-port! []
(let [socket (ServerSocket. 0)
port (.getLocalPort socket)]
(.close socket)
port))
| null | https://raw.githubusercontent.com/johanhaleby/stub-http/6ad71d8e72e9fca761b647d262f89b84cd54777e/src/stub_http/internal/port.clj | clojure | (ns stub-http.internal.port
(:import (java.net ServerSocket)))
(defn get-free-port! []
(let [socket (ServerSocket. 0)
port (.getLocalPort socket)]
(.close socket)
port))
| |
7843bc534b791e1c9b45c7c6448a0b92ad30ac7eb2b5ee4ede5a7bda3aa0e1b1 | wadehennessey/wcl | globals.lisp | Copyright 1989,1990 by the Massachusetts Institute of Technology ,
Cambridge , Massachusetts .
(in-package "XP")
(defvar *xp-printing-functions*
'(write print prin1 princ pprint format write-to-string princ-to-string
prin1-to-string write-line write-string write-char terpri fresh-line
defstruct finish-o... | null | https://raw.githubusercontent.com/wadehennessey/wcl/841316ffe06743d4c14b4ed70819bdb39158df6a/src/cl/pprint/globals.lisp | lisp | Must do the following in common lisps not supporting *print-shared*
see initialization at end of file.
see initialization at end of file.
If a duplicate is found, a positive integer tag is assigned.
never bound
never bound
The list and the hash-tables contain entries of the
following form. When stored in the has... | Copyright 1989,1990 by the Massachusetts Institute of Technology ,
Cambridge , Massachusetts .
(in-package "XP")
(defvar *xp-printing-functions*
'(write print prin1 princ pprint format write-to-string princ-to-string
prin1-to-string write-line write-string write-char terpri fresh-line
defstruct finish-o... |
21057f94c80c5408960050584ba745863ab8f3e43752e86d481802112411abfe | malcolmreynolds/GSLL | roots-one.lisp | Regression test ROOTS - ONE for GSLL , automatically generated
(in-package :gsl)
(LISP-UNIT:DEFINE-TEST ROOTS-ONE
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST 2.2357177734375d0)
(MULTIPLE-VALUE-LIST
(ROOTS-ONE-EXAMPLE-NO-DERIVATIVE +BISECTION-FSOLVER+ NIL)))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST 2.2... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/tests/roots-one.lisp | lisp | Regression test ROOTS - ONE for GSLL , automatically generated
(in-package :gsl)
(LISP-UNIT:DEFINE-TEST ROOTS-ONE
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST 2.2357177734375d0)
(MULTIPLE-VALUE-LIST
(ROOTS-ONE-EXAMPLE-NO-DERIVATIVE +BISECTION-FSOLVER+ NIL)))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST 2.2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.