_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
b25193d0f0d1922583a0141fdd1c2db0d0993c64912a03df416f71737e084848
copton/haskell-examples
Dsl.hs
module Dsl (code) where import Language.Haskell.TH.Quote import Language.Haskell.TH code = QuasiQuoter { quoteExp = parseExp, quotePat = parsePat } parseExp :: String -> ExpQ parseExp s = stringE s parsePat :: String -> PatQ parsePat = undefined
null
https://raw.githubusercontent.com/copton/haskell-examples/27c297848ca0f77aa152ab815d1aacd1e01d0830/template_haskell/dsl/Dsl.hs
haskell
module Dsl (code) where import Language.Haskell.TH.Quote import Language.Haskell.TH code = QuasiQuoter { quoteExp = parseExp, quotePat = parsePat } parseExp :: String -> ExpQ parseExp s = stringE s parsePat :: String -> PatQ parsePat = undefined
28f1ab8c92cf67ad6b1f8dd03b10d219eaf721c463c372c8f576037149633781
ParaPhrase/skel
sk_map_partitioner.erl
%%%---------------------------------------------------------------------------- @author < > 2012 University of St Andrews ( See LICENCE ) @headerfile " skel.hrl " %%% @doc This module contains the simple ' map ' skeleton partitioner logic . %%% %%% The Map skeleton is a parallel map. The skeleton applies ...
null
https://raw.githubusercontent.com/ParaPhrase/skel/bf55de94e64354592ea335f4375f4b40607baf43/src/sk_map_partitioner.erl
erlang
---------------------------------------------------------------------------- The Map skeleton is a parallel map. The skeleton applies a given function to the elements within one or more lists. The partitioner takes the input list, dispatching each partite element to a pool of worker processes. These worker ...
@author < > 2012 University of St Andrews ( See LICENCE ) @headerfile " skel.hrl " @doc This module contains the simple ' map ' skeleton partitioner logic . -module(sk_map_partitioner). -export([ start/3, start_hyb/4 ]). -include("skel.hrl"). -spec start(atom(), workflow() | [pid()...
efb15d4b610aea94b05b8b0b1e752aabb0e65c56afe6a7c235053d23f0f905b3
kyleburton/clj-etl-utils
scratch.clj
(ns clj-etl-utils.scratch (:require [clj-etl-utils.indexer :as indexer] [clojure.data.csv :as csv] [clojure.java.sh :as sh] [clojure.string :as string] [clj-etl-utils.indexer :as indexer] [clj-etl-utils.lang-utils :refer [raise]]) (:import ...
null
https://raw.githubusercontent.com/kyleburton/clj-etl-utils/bcc927b3e05464ecac15cf33540c8a99cdd431a8/src/clj_etl_utils/scratch.clj
clojure
(ns clj-etl-utils.scratch (:require [clj-etl-utils.indexer :as indexer] [clojure.data.csv :as csv] [clojure.java.sh :as sh] [clojure.string :as string] [clj-etl-utils.indexer :as indexer] [clj-etl-utils.lang-utils :refer [raise]]) (:import ...
225f69f1ab2c37e7d3583bf80b39384f58e825ee8a691454d064100ce2b116be
death/constantia
binary-search.lisp
;;;; +----------------------------------------------------------------+ | | ;;;; +----------------------------------------------------------------+ (defpackage #:constantia/binary-search (:documentation "Binary search and related operators for vectors.") (:use #:cl) (:export #:binary-search #:lower-...
null
https://raw.githubusercontent.com/death/constantia/87379e2cf46a2be335e099e24a114717e26d4e96/binary-search.lisp
lisp
+----------------------------------------------------------------+ +----------------------------------------------------------------+ if it is a symbol, return the if it is a function, return it presented in the cppreference.com page for std::lower_bound and std::upper_bound.
| | (defpackage #:constantia/binary-search (:documentation "Binary search and related operators for vectors.") (:use #:cl) (:export #:binary-search #:lower-bound #:upper-bound)) (in-package #:constantia/binary-search) (defun ensure-function (designator &optional default) "Return the function ...
c9d0b47b275145e492f964bea55566a076049649915e61d235bb7a0cc869dea5
fpco/schoolofhaskell.com
UserTutorial.hs
module Handler.UserTutorial where import Data.Text (splitOn) import Handler.User import Import hiding (DList) getUserTutorialR :: UserHandle -> TutorialName -> [TutorialName] -> Handler Html getUserTutorialR (UserHandle uh) tn tns | toLower uh == "school" = redirect $ SchoolTutorialR tn tns getUserTutorialR uh tn tns...
null
https://raw.githubusercontent.com/fpco/schoolofhaskell.com/15ec1a03cb9d593ee9c0d167dc522afe45ba4f8e/src/Handler/UserTutorial.hs
haskell
If we can't find our content at the current location, check past locations. For more information, see: Huh... using getBy404 caused a segfault, the following seems to work just fine. Get related links FIXME: re-enable something like this let path = intercalate "/" $ unUserHandle (profileHandle profil...
module Handler.UserTutorial where import Data.Text (splitOn) import Handler.User import Import hiding (DList) getUserTutorialR :: UserHandle -> TutorialName -> [TutorialName] -> Handler Html getUserTutorialR (UserHandle uh) tn tns | toLower uh == "school" = redirect $ SchoolTutorialR tn tns getUserTutorialR uh tn tns...
ea3ba93d76f7bc1af8ebb66e1803e0def2e44a43ff0a93d7c9bc6aa906af7d82
Andromedans/andromeda
eqchk_common.ml
(** Types for pattern matching *) module Patt = struct type is_type_normal' = | TypeConstructor of Ident.t * argument list | TypeFreeMeta of Nonce.t * is_term' list and is_type' = | TypeAddMeta of int | TypeCheckMeta of int | TypeNormal of is_type_normal' and is_term_normal' = | TermCon...
null
https://raw.githubusercontent.com/Andromedans/andromeda/a5c678450e6c6d4a7cd5eee1196bde558541b994/src/equality/eqchk_common.ml
ocaml
* Types for pattern matching * the exported types also record how many meta-variables we're capturing. * Sets of integers to indicate where the heads are. * Maps of atoms to deal with bound variables * We index rules by the heads of expressions, which can be identifiers or meta-variables (nonces). * Reporting Equa...
module Patt = struct type is_type_normal' = | TypeConstructor of Ident.t * argument list | TypeFreeMeta of Nonce.t * is_term' list and is_type' = | TypeAddMeta of int | TypeCheckMeta of int | TypeNormal of is_type_normal' and is_term_normal' = | TermConstructor of Ident.t * argument lis...
e15480a261f98dc22162240ef4af76d7da394cc892766484f6170b1ad5f298a8
kupl/VeriSmart-public
preprocessExploit.ml
open Lang open Query open Vocab exception Deviation let transfer_deviated = ref false let transferFrom_deviated = ref false let approve_deviated = ref false let balance_deviated = ref false let allowance_deviated = ref false let total_deviated = ref false type interface = string * typ list * typ list let get_inter...
null
https://raw.githubusercontent.com/kupl/VeriSmart-public/99be7ba88b61994f1ed4c0d3a8e6a6db0f790431/src/exploit/preprocessExploit.ml
ocaml
|> (try append [approve gvars c] with Deviation -> id)
open Lang open Query open Vocab exception Deviation let transfer_deviated = ref false let transferFrom_deviated = ref false let approve_deviated = ref false let balance_deviated = ref false let allowance_deviated = ref false let total_deviated = ref false type interface = string * typ list * typ list let get_inter...
b801e6fc7d31f1085f6fdf09567d1ed280bbda168301efc85b9dcc7424fab954
brianhempel/maniposynth
serialize.ml
let to_string ?(failure_location_str = "") a = begin try Marshal.to_string a [Closures] with Invalid_argument msg -> print_endline @@ "Serialization failure (" ^ failure_location_str ^ "): " ^ msg; "" end |> Base64.(encode_exn ~alphabet:uri_safe_alphabet) (* Marshal.to_bytes a [Closures] |> LZ4.By...
null
https://raw.githubusercontent.com/brianhempel/maniposynth/7561fe30b81190b8587b74813dd510fd18bd3473/lib/serialize.ml
ocaml
Marshal.to_bytes a [Closures] |> LZ4.Bytes.compress |> Bytes.to_string |> Base64.(encode_exn ~alphabet:uri_safe_alphabet) str |> Base64.(decode_exn ~alphabet:uri_safe_alphabet) |> Bytes.of_string |> LZ4.Bytes.decompress ~length:10000000000 |> (fun byte_str -> Marshal.from_bytes byte_str 0)
let to_string ?(failure_location_str = "") a = begin try Marshal.to_string a [Closures] with Invalid_argument msg -> print_endline @@ "Serialization failure (" ^ failure_location_str ^ "): " ^ msg; "" end |> Base64.(encode_exn ~alphabet:uri_safe_alphabet) let of_string str = let byte_str = Base64.(...
819aa5acb96e4b672fae8758414c590026a8d4bdf73078f80aa0f1ab37889cd3
ocsigen/ocaml-eliom
pr4466.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/lib-threads/pr4466.ml
ocaml
************************************************************************ OCaml ...
, projet Gallium , INRIA Paris Copyright 2015 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Printf Regression test for PR#4466 : select timeout with simultaneous read and write on sock...
f62bcfbe81644e518602f1b28c1467b72312cd581bce493f0dd13a49de99e493
electric-sql/vaxine
bcountermgr_SUITE.erl
%% ------------------------------------------------------------------- %% Copyright < 2013 - 2018 > < Technische Universität Kaiserslautern , Germany , France Universidade NOVA de Lisboa , Portugal Université catholique de Louvain ( UCL ) , Belgique , Portugal %% > %% This file is provided...
null
https://raw.githubusercontent.com/electric-sql/vaxine/872a83ea8d4935a52c7b850bb17ab099ee9c346b/apps/antidote/test/singledc/bcountermgr_SUITE.erl
erlang
------------------------------------------------------------------- > 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 expressed or implied. See the License for the specific language governing perm...
Copyright < 2013 - 2018 > < Technische Universität Kaiserslautern , Germany , France Universidade NOVA de Lisboa , Portugal Université catholique de Louvain ( UCL ) , Belgique , Portugal This file is provided to you under the Apache License , except in compliance with the License . You...
25c4f46a5888261d6f2158b08c9b5e2ad1f44530f9768c39eaa622dd95e65694
flipstone/orville
Property.hs
module Test.Property ( NamedProperty, namedProperty, singletonNamedProperty, NamedDBProperty, namedDBProperty, singletonNamedDBProperty, singletonProperty, Group (..), group, checkGroups, checkGroup, allPassed, ) where import qualified Control.Monad as Monad import quali...
null
https://raw.githubusercontent.com/flipstone/orville/1f832bab5f1937019ee09fbbc24e2a5ece43e31a/orville-postgresql-libpq/test/Test/Property.hs
haskell
module Test.Property ( NamedProperty, namedProperty, singletonNamedProperty, NamedDBProperty, namedDBProperty, singletonNamedDBProperty, singletonProperty, Group (..), group, checkGroups, checkGroup, allPassed, ) where import qualified Control.Monad as Monad import quali...
6dce8aab026b94c424772a9ad509846bf51f4e9bf2f274edd041e825132dabb6
fission-codes/fission
Proof.hs
module Web.UCAN.Proof ( delegatedInBounds , signaturesMatch , resourceInSubset , potencyInSubset , containsFact -- * Reexport , module Web.UCAN.Proof.Error , module Web.UCAN.Proof.Class ) where import RIO hiding (exp) import Web.UCAN.Proof.Class import ...
null
https://raw.githubusercontent.com/fission-codes/fission/ae177407dccc20be67948a901956b99f40d37ac8/hs-ucan/library/Web/UCAN/Proof.hs
haskell
* Reexport
module Web.UCAN.Proof ( delegatedInBounds , signaturesMatch , resourceInSubset , potencyInSubset , containsFact , module Web.UCAN.Proof.Error , module Web.UCAN.Proof.Class ) where import RIO hiding (exp) import Web.UCAN.Proof.Class import Web.UCAN.Proof...
9af321a99e055606a96017e7856c80e8873e268e84d68848fc5ac4474e34e894
BillHallahan/G2
HigherOrder2.hs
module HigherOrder2 where {-@ f :: (i:Int -> {j:Int | j > i}) -> x:Int -> { y:Int | y > x } @-} f :: (Int -> Int) -> Int -> Int f h i = h i {-@ g :: x:Int -> { y:Int | y > x } @-} g :: Int -> Int g x = x + 1
null
https://raw.githubusercontent.com/BillHallahan/G2/21c648d38c380041a9036d0e375ec1d54120f6b4/tests_lh/Liquid/HigherOrder/HigherOrder2.hs
haskell
@ f :: (i:Int -> {j:Int | j > i}) -> x:Int -> { y:Int | y > x } @ @ g :: x:Int -> { y:Int | y > x } @
module HigherOrder2 where f :: (Int -> Int) -> Int -> Int f h i = h i g :: Int -> Int g x = x + 1
aff5dac8a100d9ed63cd3285f14c00b558ebf878422c920583bf803d39d18dc8
froggey/Mezzano
partition.lisp
;;;; Supervisor level support for various partitioning schemes (in-package :mezzano.supervisor) (declaim (inline memref-ub16/le memref-ub16/be)) (defun memref-ub16/le (base &optional (index 0)) (sys.int::memref-unsigned-byte-16 base index)) (defun memref-ub16/be (base) (logior (ash (sys.int::memref-unsigned-byte...
null
https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/supervisor/partition.lisp
lisp
Supervisor level support for various partitioning schemes Found, scan partitions. FIXME: Little-endian reads. Found, scan partitions. Handle extended partition documentation at: What do to with this error? what to do with this error? Check type. Primary Volume Descriptor. Volume Descriptor Set Terminator. ...
(in-package :mezzano.supervisor) (declaim (inline memref-ub16/le memref-ub16/be)) (defun memref-ub16/le (base &optional (index 0)) (sys.int::memref-unsigned-byte-16 base index)) (defun memref-ub16/be (base) (logior (ash (sys.int::memref-unsigned-byte-8 base) 8) (sys.int::memref-unsigned-byte-8 (+ base ...
c2c5c518598f5d4f1f6c98b7ab25b3d6930a8d9a8f8bc8c804f649964aaed668
rfkm/zou
pseudo_method_test.clj
(ns zou.web.middleware.pseudo-method-test (:require [clojure.test :as t] [midje.sweet :refer :all] [ring.middleware.defaults :as default] [ring.mock.request :as mock] [zou.web.middleware.pseudo-method :as sut])) (t/deftest pseudo-method-middleware-test (facts "wrap-p...
null
https://raw.githubusercontent.com/rfkm/zou/228feefae3e008f56806589cb8019511981f7b01/web/test/zou/web/middleware/pseudo_method_test.clj
clojure
(ns zou.web.middleware.pseudo-method-test (:require [clojure.test :as t] [midje.sweet :refer :all] [ring.middleware.defaults :as default] [ring.mock.request :as mock] [zou.web.middleware.pseudo-method :as sut])) (t/deftest pseudo-method-middleware-test (facts "wrap-p...
d49aefb266bb0e67bea6d929b8a2de4cb547a5a4fed3e6587efab1ed7590b11c
argp/bap
batAvlTree.mli
$ I d : avlTree.mli , v 1.3 2003/06/18 15:11:07 yori Exp $ Copyright 2003 . distributed with LGPL Modified by < > * Internals of ISet and IMap , usable as generic tree library type +'a tree val empty : 'a tree val is_empty : 'a tree -> bool val make_tree : 'a tree -> 'a -> 'a tree -> 'a tree val create...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batAvlTree.mli
ocaml
* [create l v r] is similar to [make_tree l v r] but performs no rebalancing; in other words, you should use this only when you {e know} that [l] and [r] are already balanced. * @raise Not_found if the tree is empty * @raise Not_found if the tree is empty * @raise Not_found if the tree is empty
$ I d : avlTree.mli , v 1.3 2003/06/18 15:11:07 yori Exp $ Copyright 2003 . distributed with LGPL Modified by < > * Internals of ISet and IMap , usable as generic tree library type +'a tree val empty : 'a tree val is_empty : 'a tree -> bool val make_tree : 'a tree -> 'a -> 'a tree -> 'a tree val create...
5d109a4c96e0bb20fb94ddd206ed58b84d8ba9b36f97ca42f496f5a1c0c0cea1
cpsc411/cpsc411-pub
test-v6.rkt
#lang racket (require cpsc411/langs/v6 rackunit) ;; check the new-frame vars get implemented and allocated correctly in the ;; interpreter. (check-equal? (interp-imp-cmf-lang-v6 '(module ((new-frames ((nfv.3 nfv.4)))) (define L.many-input.1 ((new-frames ())) (begin (set!...
null
https://raw.githubusercontent.com/cpsc411/cpsc411-pub/757ececf84d54d86cfa0c2c6c84f1456c8765db9/cpsc411-test/cpsc411/test-suite/public/test-v6.rkt
racket
check the new-frame vars get implemented and allocated correctly in the interpreter.
#lang racket (require cpsc411/langs/v6 rackunit) (check-equal? (interp-imp-cmf-lang-v6 '(module ((new-frames ((nfv.3 nfv.4)))) (define L.many-input.1 ((new-frames ())) (begin (set! tmp-ra.1 r15) (begin (set! x.0 rdi) (set! x.1 rsi) ...
c6b9d8055084549a3f0841467b6f6849fafeaa01db6afd3fd9dde26eaf5d71d1
YoshikuniJujo/shinjukuhs
func2.hs
tax = \n -> n * 108 `div` 100 sec h m s = h*3600 + m*60 + s func fun n = fun(fun(fun n))
null
https://raw.githubusercontent.com/YoshikuniJujo/shinjukuhs/172620a8519665b2fc013dc48975354be9dba735/events/event_004/DaichiSaitoTT/func2.hs
haskell
tax = \n -> n * 108 `div` 100 sec h m s = h*3600 + m*60 + s func fun n = fun(fun(fun n))
b5c891c72936feffd0a2d01d29746d5f9b069976b07d442332a4b2dcb1b0c4ee
bos/bloomfilter
Internal.hs
-- | -- Module: Data.BloomFilter.Mutable.Internal Copyright : -- License: BSD3 -- Maintainer : < > -- Stability: unstable -- Portability: portable module Data.BloomFilter.Mutable.Internal ( -- * Types Hash , MBloom(..) ) where import Data.Array.Base (STUArray) import Data.Bits (shiftL) ...
null
https://raw.githubusercontent.com/bos/bloomfilter/5df9cd44dc350bfe37fe4a45500d948b246de117/Data/BloomFilter/Mutable/Internal.hs
haskell
| Module: Data.BloomFilter.Mutable.Internal License: BSD3 Stability: unstable Portability: portable * Types # UNPACK # # UNPACK # # UNPACK #
Copyright : Maintainer : < > module Data.BloomFilter.Mutable.Internal ( Hash , MBloom(..) ) where import Data.Array.Base (STUArray) import Data.Bits (shiftL) import Data.Word (Word32) import Prelude hiding (elem, length, notElem, (/), (*), div, divMod, mod, rem) |...
43786bda8ea1160713b7b018ac3da223a0753f40435a5d103ffd67b97f4c64ff
gersak/vura
scheduler.clj
(ns vura.sync.scheduler (:require [clojure.tools.logging :refer [error info warn]] [vura.core :as core] [vura.cron :refer [next-timestamp valid-timestamp?]] [vura.sync.jobs :refer [start! stop! at-phase? before-phase? started? reset-job! in-error? defjob wait-for after-...
null
https://raw.githubusercontent.com/gersak/vura/a81e898de9e743205865cbfbf6465a649fcff6fa/cron/src/vura/sync/scheduler.clj
clojure
Schedule definitions Mutable Immutable
(ns vura.sync.scheduler (:require [clojure.tools.logging :refer [error info warn]] [vura.core :as core] [vura.cron :refer [next-timestamp valid-timestamp?]] [vura.sync.jobs :refer [start! stop! at-phase? before-phase? started? reset-job! in-error? defjob wait-for after-...
7b459229b84bbd22373b54687cdeaf36392330652088d290204be3acd84a047c
0x0f0f0f/yasih
ImplementationSpec.hs
module ImplementationSpec where import Test.Hspec --import Test.Quickcheck import Yasih -- Testing functions main :: IO () main = hspec spec spec :: Spec spec = describe "Todo" $ do it "todo" $ True `shouldBe` True
null
https://raw.githubusercontent.com/0x0f0f0f/yasih/d7cedc4e5b4ea5c6c59d2799bbd37524969f2467/test/ImplementationSpec.hs
haskell
import Test.Quickcheck Testing functions
module ImplementationSpec where import Test.Hspec import Yasih main :: IO () main = hspec spec spec :: Spec spec = describe "Todo" $ do it "todo" $ True `shouldBe` True
e44e5db8109cae13048f1a166ece75948dc1c92a1c26b01103dacfadc393132b
cxxxr/apispec
main.lisp
(uiop:define-package #:apispec (:nicknames #:apispec/main) (:mix #:cl #:apispec/classes/schema) (:export #:schema #:schemap #:schema-type #:schema-format #:schema-enum #:schema-default #:schema-has-default-p #:schema-nullable-p ...
null
https://raw.githubusercontent.com/cxxxr/apispec/4bdd238f6b5effed305d284e0e6b7cef214e94a2/src/main.lisp
lisp
(uiop:define-package #:apispec (:nicknames #:apispec/main) (:mix #:cl #:apispec/classes/schema) (:export #:schema #:schemap #:schema-type #:schema-format #:schema-enum #:schema-default #:schema-has-default-p #:schema-nullable-p ...
2d4c7a5cbb64236da90d92869d250396bf4cfb34b342ec01df722ca08157ba50
facebook/flow
autofix_imports_tests.ml
* Copyright ( c ) Meta Platforms , Inc. and 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) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/f360297ed2112e2828d4fe3dc9d75ec2d347ab98/src/services/code_action/__tests__/autofix_imports_tests.ml
ocaml
TODO: ocamlformat mangles indentation.
* Copyright ( c ) Meta Platforms , Inc. and 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) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
f5e4fb1eb35cef601450c1d2077b647fa08129a1a90b7d631c184fb7e7195dc7
haskell-nix/hnix-store
Arbitrary.hs
# language DataKinds # # OPTIONS_GHC -Wno - orphans # module Arbitrary where import qualified Data.ByteString.Char8 as BSC import Test.Tasty.QuickCheck import System.Nix.Internal.StorePath import Crypto.Hash ( SHA256 ...
null
https://raw.githubusercontent.com/haskell-nix/hnix-store/5e55781516178939bf9a86f943e120e6ad775b9d/hnix-store-core/tests/Arbitrary.hs
haskell
ASCII without \NUL
# language DataKinds # # OPTIONS_GHC -Wno - orphans # module Arbitrary where import qualified Data.ByteString.Char8 as BSC import Test.Tasty.QuickCheck import System.Nix.Internal.StorePath import Crypto.Hash ( SHA256 ...
56f780b6d51ab324355a2252fd065a148712f6c65de5af35938ae9ec1dac0a85
jackfirth/lens
alternating-list.rkt
#lang sweet-exp racket/base provide alternating->assoc-list assoc->alternating-list keys+values->assoc-list assoc-list->keys+values keys+values->alternating-list alternating-list->keys+values require racket/list racket/match racket/sequence racket/dict m...
null
https://raw.githubusercontent.com/jackfirth/lens/733db7744921409b69ddc78ae5b23ffaa6b91e37/lens-data/lens/private/util/alternating-list.rkt
racket
#lang sweet-exp racket/base provide alternating->assoc-list assoc->alternating-list keys+values->assoc-list assoc-list->keys+values keys+values->alternating-list alternating-list->keys+values require racket/list racket/match racket/sequence racket/dict m...
071d9df932e2295e21dc0e5f8f5c01f8eb0f9da1952a8b43438986fd4d95349b
metaocaml/ber-metaocaml
untypeast.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ( OCa...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/typing/untypeast.ml
ocaml
************************************************************************ OCaml ...
( OCamlPro ) , ( INRIA Saclay ) Copyright 2007 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Longident open Asttypes open Parsetree open Ast_helper module T = Typedtree type mapper = { attribute: mapper -> T...
58fa88c42833c51d016e800235900431197963220a5b23a30f6ca7ade5eaefce
dbuenzli/brr
glgen.ml
--------------------------------------------------------------------------- Copyright ( c ) 2020 The brr programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 2...
null
https://raw.githubusercontent.com/dbuenzli/brr/3d1a0edd964a1ddfbf2be515fc3a3803d27ad707/attic/glgen.ml
ocaml
Some dupes are not overloadings uncamlcase, lowercase avoids prefix by _ maps eg 2D to 2d not 2_d don't clash with OCaml keywords. The nullables are not always meaningful we can adjust signatures later if we hinder functionality. We drop optional arguments * {{:%s}[%s]}[ c%s] We drop optional argum...
--------------------------------------------------------------------------- Copyright ( c ) 2020 The brr programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 2...
b4a69f6c0afa23d99f2dd7b597c17e8b88043796120c73c0af7fd6d697c7ce23
dbuenzli/ptime
test_date_time.ml
--------------------------------------------------------------------------- Copyright ( c ) 2015 The ptime programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c)...
null
https://raw.githubusercontent.com/dbuenzli/ptime/a193b92b6833e6eebf6eb55cec875662b4272e8b/test/test_date_time.ml
ocaml
Check hour bounds Check minute bounds Convert time zones UTC biased try in UTC start again
--------------------------------------------------------------------------- Copyright ( c ) 2015 The ptime programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c)...
c26c42d6e59de3db7db0a8c6ebb418c7cee2979e2dc0e0266e08075e138cad12
sam46/Paskell
ConvertIR.hs
module ConvertIR where import Grammar as AST import qualified Intermediate as IR import Paskell (parseProgram, parseDecl) import TypeCheck (typechkProgram, TyErr, typechkDecl) import Text.Parsec import Text.Parsec.String import Text.Parsec.Combinator import Utils (p') import Data.List -- Environment is a Func/Proc s...
null
https://raw.githubusercontent.com/sam46/Paskell/634881e980def791b9869d6bf8fa647aff0c5b1d/src/ConvertIR.hs
haskell
Environment is a Func/Proc signatures + stack of Contexts for types and vars Function sig is return type + formal args types Left $ NotInScope x added hidden variable for return value todo: add i to s's env? convert to type annotaed IR args add dummy arg convert to type annotaed IR args
module ConvertIR where import Grammar as AST import qualified Intermediate as IR import Paskell (parseProgram, parseDecl) import TypeCheck (typechkProgram, TyErr, typechkDecl) import Text.Parsec import Text.Parsec.String import Text.Parsec.Combinator import Utils (p') import Data.List type Env = (Sig, [Context], [TC...
9be1a4386a51e92f484a25b8706980f4aa620c9ac5eb15faeb4a6c82c494d640
typelead/eta
UTF16.hs
# LANGUAGE Trustworthy # # LANGUAGE NoImplicitPrelude , BangPatterns , NondecreasingIndentation , MagicHash # , BangPatterns , NondecreasingIndentation , MagicHash #-} # OPTIONS_GHC -funbox - strict - fields # -----------------------------...
null
https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/libraries/base/GHC/IO/Encoding/UTF16.hs
haskell
--------------------------------------------------------------------------- | Module : GHC.IO.Encoding.UTF16 License : see libraries/base/LICENSE Maintainer : Stability : internal Portability : non-portable --------------------------------------------------------------------------- --------...
# LANGUAGE Trustworthy # # LANGUAGE NoImplicitPrelude , BangPatterns , NondecreasingIndentation , MagicHash # , BangPatterns , NondecreasingIndentation , MagicHash #-} # OPTIONS_GHC -funbox - strict - fields # Copyright : ( c ) The ...
b9efae39d55f84118c153e9e095de37bd469167f22b17d54b656486f08d4c898
mhuebert/maria
error.cljs
(ns maria.views.error (:require [chia.view :as v] [maria.eval :as e] [applied-science.js-interop :as j])) (v/defclass error-boundary "Error boundary, per React 16" {:view/did-catch (fn [{:keys [on-error]} error info] (when on-error (on-error error info))) :static/get-derived-st...
null
https://raw.githubusercontent.com/mhuebert/maria/15586564796bc9273ace3101b21662d0c66b4d22/editor/src/maria/views/error.cljs
clojure
(ns maria.views.error (:require [chia.view :as v] [maria.eval :as e] [applied-science.js-interop :as j])) (v/defclass error-boundary "Error boundary, per React 16" {:view/did-catch (fn [{:keys [on-error]} error info] (when on-error (on-error error info))) :static/get-derived-st...
3b5eb436fdb71788229a6606eee246a2c527d84b2f74ef619da81438ee33801e
binaryage/chromex
chrome_port.cljs
(ns chromex.test.chrome-port (:require-macros [cljs.core.async.macros :refer [go]]) (:require [chromex.playground :refer-macros [get-port]] [chromex.protocols.chrome-port :refer [IChromePort]] [chromex.protocols.chrome-port-state :refer [IChromePortState]] [chromex.test-utils :re...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/test/src/chromex/test/chrome_port.cljs
clojure
-- test against mocks ----------------------------------------------------------------------------------------------------- --- CONNECTED ------------------------------------------------------------------------------------------------- --- DISCONNECTED ----------------------------------------------------------------...
(ns chromex.test.chrome-port (:require-macros [cljs.core.async.macros :refer [go]]) (:require [chromex.playground :refer-macros [get-port]] [chromex.protocols.chrome-port :refer [IChromePort]] [chromex.protocols.chrome-port-state :refer [IChromePortState]] [chromex.test-utils :re...
d47b0b4776c0b881ebb083d0f55fef7729480e6f452918e975e2485a6ae85814
azimut/shiny
hexbeat.lisp
(in-package :shiny) (fp 2 40) (fp 0 20) (fg 2f0) (fp 1 40) ;; A - 1010 - up/back/off 8 - 1000 - up / back 2 - 0010 - off ;; C - 1100 - up / back / weak - sincopated 1 - 0001 - weak - syncopated ;; ;; B - 1011 - up/back/weak-sync 4 - 0100 - weak - sync ;; 9 - 1001 - up/weak-sync (at (tempo-sync #[(* .3 16) b]...
null
https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/compositions/drafts/csound-live-code/hexbeat.lisp
lisp
A - 1010 - up/back/off B - 1011 - up/back/weak-sync 9 - 1001 - up/weak-sync returns value within the give k-array table. */ iphase, kvals[] xin indx = int(lenarray:i(kvals) * (iphase % 1)) xout i(kvals, indx) endop /** Given period in beats, return current phase of global xout (i(gk_clock_tick) % i...
(in-package :shiny) (fp 2 40) (fp 0 20) (fg 2f0) (fp 1 40) 8 - 1000 - up / back 2 - 0010 - off C - 1100 - up / back / weak - sincopated 1 - 0001 - weak - syncopated 4 - 0100 - weak - sync (at (tempo-sync #[(* .3 16) b]) #'eval (defpattern h (((parse-pattern (bjorklund 3 12) :true-char #\1) ...
ba4842b6228473383c715d2ef0a8cbbc2ee00341c37c7ab8fbcae4a9fec95476
jedimahdi/soltan
GameResponse.hs
module Hokm.Api.Data.GameResponse where import Control.Lens ( _1, _2, at, cons, elemOf, filtered, folded, has, hasn't, index, indices, itraversed, ix, traversed, view, (%~), (.~), (?~), (^.), (^@..) ) import Data.Aeson ( FromJSON, ToJSON, (.=) ) import qualified Data.Aeson ...
null
https://raw.githubusercontent.com/jedimahdi/soltan/50a97213ec83c81f5ec79898e2855d0c5e78f06c/backend/hokm-api/src/Hokm/Api/Data/GameResponse.hs
haskell
module Hokm.Api.Data.GameResponse where import Control.Lens ( _1, _2, at, cons, elemOf, filtered, folded, has, hasn't, index, indices, itraversed, ix, traversed, view, (%~), (.~), (?~), (^.), (^@..) ) import Data.Aeson ( FromJSON, ToJSON, (.=) ) import qualified Data.Aeson ...
24e1a287fe1641240404d053316f667616654bebbc5d37dbe54e64b851b595cb
opennars/Narjure
termlink_utils.clj
(ns narjure.memory-management.termlink-utils (:require [co.paralleluniverse.pulsar [core :refer :all] [actors :refer :all]] [taoensso.timbre :refer [debug info]] [narjure [global-atoms :refer :all] [bag :as b] [debug-util :refer :all] [control-utils :refer :all] [default...
null
https://raw.githubusercontent.com/opennars/Narjure/cd5a72e6777fc47271d721fef8362aa2dad664ca/src/narjure/memory_management/termlink_utils.clj
clojure
(forget-termlinks) term :termlinks {term [budget]} prefer existing termlinks strengths only these keys which exist in concept bag this one uses the usual priority durability semantics just revise by using the truth value directly (println (str "error in get-termlink-endpoints: " e) now search through termlinks, get th...
(ns narjure.memory-management.termlink-utils (:require [co.paralleluniverse.pulsar [core :refer :all] [actors :refer :all]] [taoensso.timbre :refer [debug info]] [narjure [global-atoms :refer :all] [bag :as b] [debug-util :refer :all] [control-utils :refer :all] [default...
f58b23a66e4002715dfeb77e8de1273ae8a911d2811e3d5effe852d03312b0ba
arcfide/oleg
string-value-ssax.scm
;***************************************************************** ; string-value-ssax ; ; A SSAX benchmark test Computing the string value of the root node of the DOM tree of the XML document . ; An XML document is loaded into memory first ( from a file whose ; name is the single argument to this program). We th...
null
https://raw.githubusercontent.com/arcfide/oleg/c6826870436925fd4c873c01d7fcc24a7a7f95dc/ssax/benchmarks/string-value-ssax.scm
scheme
***************************************************************** string-value-ssax A SSAX benchmark test name is the single argument to this program). We then pass the SSAX to read the document from a string port, to be precise). The computed string value is disregarded. (define OS:file-length file-size) Now ...
Computing the string value of the root node of the DOM tree of the XML document . An XML document is loaded into memory first ( from a file whose content of that buffer one character at a time to SSAX ( we let $ I d : string - value - ssax.scm , v 1.2 2003/04/29 01:40:35 oleg Exp $ (module string-value-ssax ...
af5e0720839fd1e564d37e20bc70135847ee18f6c5bbb8c8fb5c2264b5c15128
kupl/LearnML
original.ml
type lambda = V of var | P of (var * lambda) | C of (lambda * lambda) and var = string let rec check (lambda : lambda) : bool = match lambda with | V a -> false | P (a, b) -> ( match lambda with | V c -> if a = c then true else false | P (c, d) -> check (P (c, d)) || check (P (a, d)) | C...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/lambda/sub117/original.ml
ocaml
type lambda = V of var | P of (var * lambda) | C of (lambda * lambda) and var = string let rec check (lambda : lambda) : bool = match lambda with | V a -> false | P (a, b) -> ( match lambda with | V c -> if a = c then true else false | P (c, d) -> check (P (c, d)) || check (P (a, d)) | C...
06338dd8fec4f17898ff5cc8449b565931f2968236012c5b4a7cb767df1fdeb8
chebert/schemeish
streams.lisp
(in-package #:schemeish.backend) (install-syntax!) ;;; Streams (export (defvar *the-empty-stream* ())) (defmacro stream-cons (first rest) "Construct a stream from an element and a delayed stream." `(cons ,first (delay ,rest))) (export 'stream-cons) (export (define (stream-car stream) "First element of strea...
null
https://raw.githubusercontent.com/chebert/schemeish/93ea08b17e6d8876f086e1a34a21b538174b2c39/src/streams.lisp
lisp
Streams Random-stream does not affect the random-state
(in-package #:schemeish.backend) (install-syntax!) (export (defvar *the-empty-stream* ())) (defmacro stream-cons (first rest) "Construct a stream from an element and a delayed stream." `(cons ,first (delay ,rest))) (export 'stream-cons) (export (define (stream-car stream) "First element of stream." (car ...
dc41a2473fe8319860b6f95febc49d2971dedb55564e6c4cbea07c37d52fd93f
ocaml-flambda/ocaml-jst
pprintast.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/b1f0cf9f9114128db609bdd5a1edfda1e3144a30/parsing/pprintast.ml
ocaml
************************************************************************ OCaml Fabrice L...
, OCamlPro , University of Pennsylvania Copyright 2007 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the Original Code from Ber - metaocaml , modified...
f82bd7e966ce1d38ac7045f49a85c3d94cc1267c5fd12e0343e01babb9f00963
jackrusher/sparkledriver
element.clj
(ns sparkledriver.element (:require [sparkledriver.retry :refer [*retry-fn*]])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; finding elements (defn find-by-id "Return the single element with `id` that's a child of `browser-or-elem` (which can be a browser or element). Throws...
null
https://raw.githubusercontent.com/jackrusher/sparkledriver/375885dcad85e37ae2e0d624bc005016ada2982e/src/sparkledriver/element.clj
clojure
finding elements interrogating elements returned by the previous functions
(ns sparkledriver.element (:require [sparkledriver.retry :refer [*retry-fn*]])) (defn find-by-id "Return the single element with `id` that's a child of `browser-or-elem` (which can be a browser or element). Throws an exception if there's no such element! If called with *retry-fn* bound - for example by using the ...
89cf2794e4cc2505280c12ef2cdb5aaab7537574d2faa619c263113ea3232b4e
twosigma/Cook
fenzo_utils.clj
;; Copyright ( c ) Two Sigma Open Source , LLC ;; 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...
null
https://raw.githubusercontent.com/twosigma/Cook/d6571c5b821397c9b99a9def1919bf3948ed814f/scheduler/test/cook/test/scheduler/fenzo_utils.clj
clojure
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 permi...
Copyright ( c ) Two Sigma Open Source , LLC distributed under the License is distributed on an " AS IS " BASIS , (ns cook.test.scheduler.fenzo-utils (:require [clojure.test :refer :all] [cook.test.postgres] [cook.scheduler.fenzo-utils :as fenzo] [cook.scheduler.scheduler :as sc...
94c29371b55ee08464b4512398e5fbd89c98bf989af3cf50b9d2d3918fe16dbc
darrenldl/ocaml-SeqBox
progress_report.ml
type silence_level = L0 | L1 | L2 type silence_settings = { silent_while_active : bool ; silent_when_done : bool } type ('a, 'b, 'c) progress_print_functions = { print_progress : start_time_src:'a -> units_so_far_src:'b -> total_units_src:'c -> unit ; print_newline_i...
null
https://raw.githubusercontent.com/darrenldl/ocaml-SeqBox/658c623db8745ae1d804c75880b29fb53435860f/src/progress_report.ml
ocaml
interval is estimated dynamically using call count to reduce floating point operations print header once initialise start time should be already initialised if the functions are used properly * but putting it here to avoid exception in case the functions are not used appropriately
type silence_level = L0 | L1 | L2 type silence_settings = { silent_while_active : bool ; silent_when_done : bool } type ('a, 'b, 'c) progress_print_functions = { print_progress : start_time_src:'a -> units_so_far_src:'b -> total_units_src:'c -> unit ; print_newline_i...
b806204045495589d299368c47fb948e505f5df2f6d721da180fd980bacd1a3d
cs3110/textbook-solutions
chapter7.ml
(******************************************************************** * exercise: mutable fields ********************************************************************) type student = {name: string; mutable gpa: float} let alice = {name = "Alice"; gpa = 3.7} let () = alice.gpa <- 4.0 (*************************...
null
https://raw.githubusercontent.com/cs3110/textbook-solutions/b91186d27bf29dec75b44f055ff65c3430d7b96c/chapter7.ml
ocaml
******************************************************************* * exercise: mutable fields ******************************************************************* ******************************************************************* * exercise: refs ******************************************************************...
type student = {name: string; mutable gpa: float} let alice = {name = "Alice"; gpa = 3.7} let () = alice.gpa <- 4.0 let (_ : bool ref) = ref true let (_ : int list ref) = ref [5;3] let (_ : int ref list) = [ref 5; ref 3] let cs3110 = let inc = ref (fun x -> x + 1) in !inc 3109 let (+:=) x y = ...
ab09399ed5b9364dc368f60d5d401173a815f7a256c5efec0f6a81b7bdb7db41
comtihon/social_network_example
sn_top_sup.erl
%%%------------------------------------------------------------------- @author tihon ( C ) 2017 , < COMPANY > %%% @doc %%% %%% @end Created : 14 . May 2017 12:04 %%%------------------------------------------------------------------- -module(sn_top_sup). -author("tihon"). -behaviour(supervisor). %% API -export(...
null
https://raw.githubusercontent.com/comtihon/social_network_example/eed32f43947fc8d88c41e38fc2d31d2371be0c2b/src/main/sn_top_sup.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API Supervisor callbacks =================================================================== API functions =============================================================...
@author tihon ( C ) 2017 , < COMPANY > Created : 14 . May 2017 12:04 -module(sn_top_sup). -author("tihon"). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). -define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}). -spec(start_link() -> {...
3dda326de6895debd180da355a23e20387eaf45185847635b0ffa67c9b57bc3c
domainlanguage/time-count
metajoda.clj
(ns time-count.metajoda (:require [time-count.core :refer :all] ;[CountableTime next-t Interval ->RelationBoundedInterval]] [time-count.relation-bounded-intervals :refer [->RelationBoundedInterval]] [time-count.iso8601 :refer :all] [time-count.allens-algebra :refe...
null
https://raw.githubusercontent.com/domainlanguage/time-count/f2d26a1e5fe1a137f5d1a01be295dde0385cc31e/src/time_count/metajoda.clj
clojure
[CountableTime next-t Interval ->RelationBoundedInterval]] MetaJodaTime is a provided implementation of CountableTime and Interval protocols. It should be possible to replace this with So MetaJodaTime is not a fundamental part of time-count, but there must be SOME implementation in order to run the tests and expl...
(ns time-count.metajoda [time-count.relation-bounded-intervals :refer [->RelationBoundedInterval]] [time-count.iso8601 :refer :all] [time-count.allens-algebra :refer [Interval relation converse-relation]]) (:import [org.joda.time LocalDateTime DateTimeZone ...
8a0dafaa9a77fc683ae5958f4071e013b2d66ee06c217c9dc6739329f175b532
sjl/beast
run.lisp
#+ecl (setf compiler:*user-cc-flags* "-Wno-shift-negative-value") (ql:quickload 'beast :silent t) (asdf:test-system 'beast) (quit)
null
https://raw.githubusercontent.com/sjl/beast/dd80fff520402f73e23aa8d9bdb743ee10777e8c/test/run.lisp
lisp
#+ecl (setf compiler:*user-cc-flags* "-Wno-shift-negative-value") (ql:quickload 'beast :silent t) (asdf:test-system 'beast) (quit)
846fb7dac22cf3635d418601e16f12963c4d8a31a7b301356b976306bf6984e2
GaloisInc/what4
WeightedSum.hs
| Module : . WeightedSum Description : Representations for weighted sums and products in semirings Copyright : ( c ) Galois Inc , 2015 - 2020 License : : Declares a weighted sum type used for representing sums over variables and an offset in one of the supported semirings . This modu...
null
https://raw.githubusercontent.com/GaloisInc/what4/f4912ea9efa8a2ef54c8010383695372af4492b6/what4/src/What4/Expr/WeightedSum.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE GADTs # # LANGUAGE RankNTypes # # LANGUAGE TypeSynonymInstances # * Utilities * Weighted sums * Ring products ------------------------------------------------------------------------------ A.scale expects a signed integer coefficient ------------------------------------------...
| Module : . WeightedSum Description : Representations for weighted sums and products in semirings Copyright : ( c ) Galois Inc , 2015 - 2020 License : : Declares a weighted sum type used for representing sums over variables and an offset in one of the supported semirings . This modu...
c8dcf4c77c94addaf46ff1891ffb0b7dbd61cfa65a26e237015b4c1936cb06d2
futurice/haskell-mega-repo
Common.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # {-# OPTIONS_GHC -freduction-depth=0 #-} module Futurice.App.PlanMillProxy.Logic.Common ( module Futurice.Postgres, module Futurice.App.PlanMillProxy.Logic.Common, ) where import Data.Aeson.Compat (FromJSON) import Data.Binary.Get (Ge...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/e301c08c8dfdcca048fe82fecce6bb2d02e9558a/planmill-proxy/src/Futurice/App/PlanMillProxy/Logic/Common.hs
haskell
# LANGUAGE OverloadedStrings # # OPTIONS_GHC -freduction-depth=0 # ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -----------------...
# LANGUAGE ScopedTypeVariables # module Futurice.App.PlanMillProxy.Logic.Common ( module Futurice.Postgres, module Futurice.App.PlanMillProxy.Logic.Common, ) where import Data.Aeson.Compat (FromJSON) import Data.Binary.Get (Get, runGetOrFail) import Data.Binary.Tagged (Structured, binaryGetMD5, structu...
5fdd572d558ab67ecb56f41dc5ebc9f6f0f1531b3ddda4e96d183141308edb35
daypack-dev/daypack-lib
int64_int64_option_set_utils.ml
include Set_utils.Make (Int64_int64_option_set)
null
https://raw.githubusercontent.com/daypack-dev/daypack-lib/63fa5d85007eca73aa6c51874a839636dd0403d3/src/int64_int64_option_set_utils.ml
ocaml
include Set_utils.Make (Int64_int64_option_set)
18d4c4d8270c5ee9ff7e0cb5cbf7020553f5471ceceb8153fc198b34de5d0d3f
cdepillabout/password
Bcrypt.hs
module Bcrypt where import Test.Tasty import Data.Password.Bcrypt import Internal testBcrypt :: TestTree testBcrypt = testGroup "bcrypt" [ testCorrectPassword "Bcrypt (hashPassword)" (hashPasswordWithParams 4) checkPassword extractParams 4 , testCorrectPassword "Bcrypt (hashPassword 2)" (hashPasswordWithParams...
null
https://raw.githubusercontent.com/cdepillabout/password/ce8262335a011688ad99769257f5811556c10cc9/password/test/tasty/Bcrypt.hs
haskell
module Bcrypt where import Test.Tasty import Data.Password.Bcrypt import Internal testBcrypt :: TestTree testBcrypt = testGroup "bcrypt" [ testCorrectPassword "Bcrypt (hashPassword)" (hashPasswordWithParams 4) checkPassword extractParams 4 , testCorrectPassword "Bcrypt (hashPassword 2)" (hashPasswordWithParams...
78a06d644abaca2e6f4a29e44ed440d3fbbf3a358c54fc5bd8d90f1169314326
arianvp/haskell-fido2
Spec.hs
# LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE ViewPatterns # # OPTIONS_GHC -fno - warn - orphans # module Main ( main, ) where import qualified AttestationSpec import Codec.CBOR.Term (Term (TInt)...
null
https://raw.githubusercontent.com/arianvp/haskell-fido2/d6181dbe427769573166085e27ea0beba2c5d316/tests/Spec.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # Load all files in the given directory, and ensure that all of them can be decoded. The caller can pass in a function to run further checks on the decoded value, but this is mainly there to ensure that `a` occurs after the fat arrow. TODO: How to generate sha25...
# LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE ViewPatterns # # OPTIONS_GHC -fno - warn - orphans # module Main ( main, ) where import qualified AttestationSpec import Codec.CBOR.Term (Term (TInt)) import qualified Crypto.Fido2.Assertion as Fido2 import quali...
579228c22f21f178c67e9969d0df79ad3c1c1753dfa0470c1378615c41d5f829
coq/coq
ccproof.mli
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/8dfd91c074221b973a8d5d9c426cefbe82fbe86b/plugins/cc/ccproof.mli
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
bd6356ebf7dda553d96c5d731b69aa817b8c5b5074f9070d0c95754b3c2c212e
simnalamburt/snucse.pl
k.ml
(* Location Signature *) module type LOC = sig type t val base : t val equal : t -> t -> bool val diff : t -> t -> int val increase : t -> int -> t end module Loc : LOC = struct type t = Location of int let base = Location(0) let equal (Location(a)) (Location(b)) = (a = b) let diff (Location(a)) (Loc...
null
https://raw.githubusercontent.com/simnalamburt/snucse.pl/a130f826c6f27224c88b0dd2e1588f35bccc9ebb/hw3/k.ml
ocaml
Location Signature Memory Signature get empty memory save value : Mem.store mem loc value => mem' Environment Signature get empty environment lookup environment : Env.lookup env key => content id binding : Env.bind env key content => env' Memory Implementation Environment Implementation * K- Interp...
module type LOC = sig type t val base : t val equal : t -> t -> bool val diff : t -> t -> int val increase : t -> int -> t end module Loc : LOC = struct type t = Location of int let base = Location(0) let equal (Location(a)) (Location(b)) = (a = b) let diff (Location(a)) (Location(b)) = a - b let i...
c2475bb656ac66a219d37cab97106e75abfb1b361bcf4bb3e596c34f9749c49c
ostera/serde.ml
sexpr_ser.ml
module S = Sexplib.Sexp let ( let* ) = Result.bind include Serde.Ser.Make (struct type output = S.t type error = unit let initial_output () = Ok (S.List []) let serialize_int _ser _output v = Ok (S.Atom (v |> Int.to_string)) and serialize_bool _ser _output bool = Ok (S.Atom (Bool.to_string bool)) and se...
null
https://raw.githubusercontent.com/ostera/serde.ml/88604884cf3e6a928916f33c4bca1444bc2e12a2/serde_sexpr/sexpr_ser.ml
ocaml
module S = Sexplib.Sexp let ( let* ) = Result.bind include Serde.Ser.Make (struct type output = S.t type error = unit let initial_output () = Ok (S.List []) let serialize_int _ser _output v = Ok (S.Atom (v |> Int.to_string)) and serialize_bool _ser _output bool = Ok (S.Atom (Bool.to_string bool)) and se...
1a9f00c8b636b2b5d8d1366df8e3ea1e2f62edb31062743e4643b100abf3a04e
acieroid/scala-am
polynome.scm
(define (make-point x y) (define (dispatch msg) (cond ((eq? msg 'x-value) x) ((eq? msg 'y-value) y) (else (error "wrong message")))) dispatch) (define (make-segment start end) (define (midpoint) (make-point (/ (+ (start 'x-value) (end 'x-value)) 2) (/ (+ (start 'y-va...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/scp1/polynome.scm
scheme
(define (make-point x y) (define (dispatch msg) (cond ((eq? msg 'x-value) x) ((eq? msg 'y-value) y) (else (error "wrong message")))) dispatch) (define (make-segment start end) (define (midpoint) (make-point (/ (+ (start 'x-value) (end 'x-value)) 2) (/ (+ (start 'y-va...
7c1142934188aa1c5640d50e7b6726c77f9d8ecdf84046b9fad3e3ef82aa3224
mrphlip/aoc
23.hs
# OPTIONS_GHC -Wno - tabs # import Data.List import qualified Data.Map.Strict as M import Data.Maybe import Utils import Intcode getInput :: IO (IntcodeMem Integer) getInput = do dat <- readFile "23.txt" return $ readProg dat type MachineState = (Intcode Integer, [Integer], Bool) type NetworkState = ([MachineState]...
null
https://raw.githubusercontent.com/mrphlip/aoc/06395681eb6b50b838cd4561b2e0aa772aca570a/2019/23.hs
haskell
are all the input streams empty? run the machines if the input stream is empty, feed it -1s run it for a step build the new machine state mark as idle if we consumed a -1 process the messages unset idle on receiving message
# OPTIONS_GHC -Wno - tabs # import Data.List import qualified Data.Map.Strict as M import Data.Maybe import Utils import Intcode getInput :: IO (IntcodeMem Integer) getInput = do dat <- readFile "23.txt" return $ readProg dat type MachineState = (Intcode Integer, [Integer], Bool) type NetworkState = ([MachineState]...
71bd1513618add7c361b600f2f6e8c00f282023e741f7257f896311db9b2b3d3
smallmelon/sdzmmo
pp_mount.erl
%%%-------------------------------------- %%% @Module : pp_mount @Author : xhg %%% @Email : @Created : 2010.06.02 %%% @Description: 坐骑操作 %%%-------------------------------------- -module(pp_mount). -export([handle/3]). -include("common.hrl"). -include("record.hrl"). %% 查询坐骑详细信息 handle(160...
null
https://raw.githubusercontent.com/smallmelon/sdzmmo/254ff430481de474527c0e96202c63fb0d2c29d2/src/pp/pp_mount.erl
erlang
-------------------------------------- @Module : pp_mount @Email : @Description: 坐骑操作 -------------------------------------- 查询坐骑详细信息 乘上坐骑 丢弃坐骑
@Author : xhg @Created : 2010.06.02 -module(pp_mount). -export([handle/3]). -include("common.hrl"). -include("record.hrl"). handle(16001, PlayerStatus, MountId) -> [Res, MountTypeId, BindState, UseState] = gen_server:call(PlayerStatus#player_status.mount_pid, {'info', PlayerStatus, MountId}), ...
ef8eb441d289b3fea8ad960e1ecef15ba343de77d19e8c0a659722ac4684b63c
msakai/toysolver
SHD.hs
{-# LANGUAGE DeriveDataTypeable #-} # OPTIONS_GHC -Wall # {-# OPTIONS_HADDOCK show-extensions #-} ----------------------------------------------------------------------------- -- | Module : ToySolver . Combinatorial . HittingSet . SHD Copyright : ( c ) 2014 -- License : BSD-style -- -- Maintaine...
null
https://raw.githubusercontent.com/msakai/toysolver/6233d130d3dcea32fa34c26feebd151f546dea85/src/ToySolver/Combinatorial/HittingSet/SHD.hs
haskell
# LANGUAGE DeriveDataTypeable # # OPTIONS_HADDOCK show-extensions # --------------------------------------------------------------------------- | License : BSD-style Maintainer : Stability : provisional Portability : non-portable Wrapper for shd command. * Hypergraph Dualization Repository </~u...
# OPTIONS_GHC -Wall # Module : ToySolver . Combinatorial . HittingSet . SHD Copyright : ( c ) 2014 module ToySolver.Combinatorial.HittingSet.SHD ( Options (..) , Failure (..) , minimalHittingSets ) where import Control.Exception (Exception, throwIO) import Control.Monad import Data.Array.Unb...
9c7251659ec844b3c53531e87c81cb86097335885427d696343ff3d92c6bb5b3
retro/konserve-pg
project.clj
(defproject org.clojars.mihaelkonjevic/konserve-pg "0.1.3-SNAPSHOT" :description "A PostgreSQL backend for konserve with HugSQL." :url "-pg" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0" :scope "provided"] [org.clojure/java.jd...
null
https://raw.githubusercontent.com/retro/konserve-pg/b598bdd6a3621e20daed6a55efe9c45c4b07fc15/project.clj
clojure
(defproject org.clojars.mihaelkonjevic/konserve-pg "0.1.3-SNAPSHOT" :description "A PostgreSQL backend for konserve with HugSQL." :url "-pg" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0" :scope "provided"] [org.clojure/java.jd...
2142a0cae238464bf15e7b34edf706c3b9ca3767e7921dccbfb3700001872fb1
Feuerlabs/kvdb
kvdb_db_sup.erl
%%%---- BEGIN COPYRIGHT ------------------------------------------------------- %%% Copyright ( C ) 2012 Feuerlabs , Inc. All rights reserved . %%% This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one ...
null
https://raw.githubusercontent.com/Feuerlabs/kvdb/c8c71bf5422a8fa2e58c608c65629be7a58e27f3/src/kvdb_db_sup.erl
erlang
---- BEGIN COPYRIGHT ------------------------------------------------------- ---- END COPYRIGHT --------------------------------------------------------- @hidden API Supervisor callbacks Helper macro for declaring children of supervisor =================================================================== API f...
Copyright ( C ) 2012 Feuerlabs , Inc. All rights reserved . This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. @author -module(kvdb_db_sup). -behaviour(supervisor). -export([start_link...
f4e7a762d8d570eae9b48d13ba367b7de0c4186ee6afc3920152fc72246fe70e
zadean/xqerl
fn_string_SUITE.erl
-module('fn_string_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['fn-stringint1args-1'/1]). -export(['fn-stringint1args-2'/1]). -export(['fn-stringint...
null
https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/fn/fn_string_SUITE.erl
erlang
-module('fn_string_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['fn-stringint1args-1'/1]). -export(['fn-stringint1args-2'/1]). -export(['fn-stringint...
323a2ad2fd2577e3056778e7f4647e20e1ccc307521ee74bda575c4a0f319976
danr/hipspec
RichToSimple.hs
# LANGUAGE ScopedTypeVariables , DeriveFunctor , FlexibleInstances , MultiParamTypeClasses # -- | Translating the rich language to the simple language -- Lambdas , lets an inner cases are lifted to the top level . -- -- Free vars is calculated relative to the bound variables to not have to be -- able to keep track of...
null
https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/src/HipSpec/Lang/RichToSimple.hs
haskell
| Translating the rich language to the simple language Free vars is calculated relative to the bound variables to not have to be able to keep track of all top-level bound identifiers. f = \ x -> g x In the expression (g x) in this context, only x is free. current derived position emitted lifted functions ...
# LANGUAGE ScopedTypeVariables , DeriveFunctor , FlexibleInstances , MultiParamTypeClasses # Lambdas , lets an inner cases are lifted to the top level . module HipSpec.Lang.RichToSimple where import HipSpec.Lang.Rich as R import HipSpec.Lang.Simple as S import HipSpec.Lang.SimplifyRich (removeScrutinee) import Con...
1986629d5d82ca509998ce8bae6968803c704ba0f7f62e7660dfdaa73d444af6
Cantido/clj-bittorrent
net.clj
(ns clj-bittorrent.net.net (:require [schema.core :as schema] [clj-bittorrent.math.numbers :as n])) (defn port? "Returns true if x is a number within the range of valid port numbers." [x] (and (number? x) (<= 1 x 65535))) (def Port "A network port number." (schema/constrained schema/Int...
null
https://raw.githubusercontent.com/Cantido/clj-bittorrent/5fea93e318f9d07e4bbee6aced12e10ae0f46f2a/src/clj_bittorrent/net/net.clj
clojure
(ns clj-bittorrent.net.net (:require [schema.core :as schema] [clj-bittorrent.math.numbers :as n])) (defn port? "Returns true if x is a number within the range of valid port numbers." [x] (and (number? x) (<= 1 x 65535))) (def Port "A network port number." (schema/constrained schema/Int...
29d110dc09500584eba86509ca9b948037353c1555f5da8d38f1c30b8df4f1df
nikodemus/SBCL
mop.impure.lisp
miscellaneous side - effectful tests of the MOP This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; While most of SBCL is derived from the CMU CL system , the test ;;;; files (like this one) were written from scratch after the fork from CMU CL . ;;;; ;;;; This softwar...
null
https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/tests/mop.impure.lisp
lisp
more information. files (like this one) were written from scratch after the fork This software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. However, this seems a good a way as any of ensuring that we have no regressions. Test for ...
miscellaneous side - effectful tests of the MOP This software is part of the SBCL system . See the README file for While most of SBCL is derived from the CMU CL system , the test from CMU CL . Note that the MOP is not in an entirely supported state . (load "test-util.lisp") (defpackage "MOP-TEST" (:use ...
b23b6ad20f4aa115a88b4c8df4d3ee25088d8019c00f5ea3e6656cb8580d8564
fakedata-haskell/fakedata
Rupaul.hs
# LANGUAGE TemplateHaskell # {-# LANGUAGE OverloadedStrings #-} module Faker.TvShow.Rupaul where import Data.Text import Faker import Faker.Internal import Faker.Provider.Rupaul import Faker.TH $(generateFakeField "rupaul" "queens") $(generateFakeField "rupaul" "quotes")
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/e6fbc16cfa27b2d17aa449ea8140788196ca135b/src/Faker/TvShow/Rupaul.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Faker.TvShow.Rupaul where import Data.Text import Faker import Faker.Internal import Faker.Provider.Rupaul import Faker.TH $(generateFakeField "rupaul" "queens") $(generateFakeField "rupaul" "quotes")
5f6b9a19821d2a410816c880c7f36d07dd86f5fcf29453d96c31e3699ce553ee
bittide/bittide-hardware
MVPs.hs
SPDX - FileCopyrightText : 2022 - 2023 Google LLC -- SPDX - License - Identifier : Apache-2.0 # LANGUAGE FlexibleContexts # # LANGUAGE NumericUnderscores # module Bittide.Instances.MVPs where import Clash.Prelude import Bittide.Instances.Domains import Bittide.ElasticBuffer import Bittide.ClockControl.Callisto i...
null
https://raw.githubusercontent.com/bittide/bittide-hardware/b44dac8ee0fb14b0c6a94fcbe830fdd8d140bec4/bittide-instances/src/Bittide/Instances/MVPs.hs
haskell
all links available | Holds any @a@ which has any bits set for @stickyCycles@ clock cycles. On receiving a new @a@ with non-zero bits, it sets the new incoming value as it output and holds it for @stickyCycles@ clock cycles.
SPDX - FileCopyrightText : 2022 - 2023 Google LLC SPDX - License - Identifier : Apache-2.0 # LANGUAGE FlexibleContexts # # LANGUAGE NumericUnderscores # module Bittide.Instances.MVPs where import Clash.Prelude import Bittide.Instances.Domains import Bittide.ElasticBuffer import Bittide.ClockControl.Callisto impo...
1311114c377897566e05b3e56e8babce3078d18b1089ca0a513822c3205e27e4
herd/herdtools7
ASTUtils.mli
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/lib/ASTUtils.mli
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2014 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
48ac602e91f9e61b052654e335e3e4c5c7ca5db49807390fdad13b954cfe6518
matsumonkie/izuna
App.hs
module IzunaServer.Project.App ( getProjectInfoHandler ) where -- * imports -- ** aeson import qualified Data.Aeson as Aeson -- ** base import qualified Data.Foldable as Foldable import Data.Functor ((<&>)) import quali...
null
https://raw.githubusercontent.com/matsumonkie/izuna/b21915617c4e3bb7d14d75814f72b8258689fb9b/izuna-server/src/IzunaServer/Project/App.hs
haskell
* imports ** aeson ** base ** containers ** directory ** servant ** transformers ** local * get project
module IzunaServer.Project.App ( getProjectInfoHandler ) where import qualified Data.Aeson as Aeson import qualified Data.Foldable as Foldable import Data.Functor ((<&>)) import qualified Data.Traversable ...
656d826dacef112692a58ad0a6e27decc1cf16b6a70a5bdc21d54c9afa806ab2
jackfirth/lens
info.rkt
#lang info (define collection 'multi) (define version "2.0") (define deps '("base" "lens-common" "lens-data" "reprovide-lang-lib" )) (define implies '("lens-common" "lens-data" )) (define update-implies '("lens-common" "lens-data" )) (define build-deps '("rackunit-lib" ...
null
https://raw.githubusercontent.com/jackfirth/lens/733db7744921409b69ddc78ae5b23ffaa6b91e37/lens-lib/info.rkt
racket
#lang info (define collection 'multi) (define version "2.0") (define deps '("base" "lens-common" "lens-data" "reprovide-lang-lib" )) (define implies '("lens-common" "lens-data" )) (define update-implies '("lens-common" "lens-data" )) (define build-deps '("rackunit-lib" ...
b0666aad528b7e3dfe0de83d3705e484ba409626658d7b2ce1e5ba2fc2d8c128
locusmath/locus
object.clj
(ns locus.additive.semifield.core.object (:require [locus.set.logic.core.set :refer :all] [locus.set.mapping.general.core.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.quiver.structure.core.protocols :refer :all] [locus.set.copresheaf....
null
https://raw.githubusercontent.com/locusmath/locus/12061072ccfe6a28f87eb8bd4489397dcf4b93d8/src/clojure/locus/additive/semifield/core/object.clj
clojure
but not necessarily negation. The most basic example is the semifield of non-negative rational numbers. Underlying relations and multirelations for skew semifields Additive and multiplicative semigroups for skew semifields Constructors for semifields
(ns locus.additive.semifield.core.object (:require [locus.set.logic.core.set :refer :all] [locus.set.mapping.general.core.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.quiver.structure.core.protocols :refer :all] [locus.set.copresheaf....
e2201d2cbf815e8123ee1d76893dda95851e679a235d39c48bff3d537ddeb5c2
JohnLato/iteratee
Iteratee.hs
# LANGUAGE KindSignatures , RankNTypes , BangPatterns , FlexibleContexts , NoMonomorphismRestriction , ScopedTypeVariables , TupleSections , DeriveFunctor , DeriveDataTypeable # ,RankNTypes ...
null
https://raw.githubusercontent.com/JohnLato/iteratee/83852cebab1051999d70d2abce86f5ab88c6d7ec/src/Data/Iteratee/Iteratee.hs
haskell
|Monadic and General Iteratees: incremental input parsers, processors and transformers * Types ** Error handling ** Basic Iteratees ** Nested iteratee combinators ** Nested iteratee combinators with leftover handling * Enumerators ** Basic enumerators ** Enumerator Combinators ** Enumerator creation callback...
# LANGUAGE KindSignatures , RankNTypes , BangPatterns , FlexibleContexts , NoMonomorphismRestriction , ScopedTypeVariables , TupleSections , DeriveFunctor , DeriveDataTypeable # ,RankNTypes ...
a657831e3ab7548cd2f7a8ced2c1bcef0b930fa18b1684362cb57651d09af2df
soulomoon/SICP
Exercise5.50.scm
(load "/Users/soulomoon/git/SICP/Chapter4/Exercise4.16.scm") ( load " /Users / soulomoon / git / SICP / Chapter5 / Exercise5.49.scm " ) (load "/Users/soulomoon/git/SICP/Chapter5/Exercise5.49.scm") ; fisrst I have to expand the syntax of compile to enable tranformation of let here I load on 4.16 ; then we have to us...
null
https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter5/Exercise5.50.scm
scheme
fisrst I have to expand the syntax of compile to enable tranformation of let then we have to use the define map inside the interpreter about to be compile then I have to recursively unwrap primitives procedure adding syntax supports (set! eceval-operations (append eceval-operations (list (list 'compiled-procedure? ...
(load "/Users/soulomoon/git/SICP/Chapter4/Exercise4.16.scm") ( load " /Users / soulomoon / git / SICP / Chapter5 / Exercise5.49.scm " ) (load "/Users/soulomoon/git/SICP/Chapter5/Exercise5.49.scm") here I load on 4.16 (define (let? exp) (tagged-list? exp 'let)) (define (compile exp target linkage) (cond ((self...
a7337aed2cbb4fa914ce77230795fd9433ea642276ae72e41124a7c24e009e3e
mlemerre/l-lang
external.ml
Copyright 2014 . This file defines the AST produced after parsing . While it is much more abstract than parsetrees produced by the parser , all identifiers are still named textually by strings , and some of the most complex syntactic sugar ( like handling " include " ) still has to be perform...
null
https://raw.githubusercontent.com/mlemerre/l-lang/88201e861c6cc30bb3b9510d7f55c681eded4085/src/ast/external.ml
ocaml
Identifiers for base objects. Paths to a module. Note: contrary to the next level, the paths here are all to a base module identifier. module path/module path< path > Also called qualified identifiers. This alias is used when a path is used to denote the "main" type it contains. Patterns and...
Copyright 2014 . This file defines the AST produced after parsing . While it is much more abstract than parsetrees produced by the parser , all identifiers are still named textually by strings , and some of the most complex syntactic sugar ( like handling " include " ) still has to be perform...
09e7a2c3b36c2c1185094369fdd0cdfad49d0085eb502c16140dc05a5feabedc
ianthehenry/basilica
Schema.hs
{-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} module Database.Sc...
null
https://raw.githubusercontent.com/ianthehenry/basilica/da80accd601efa0d90187afee90fe6e77cddbd76/Database/Schema.hs
haskell
# LANGUAGE EmptyDataDecls # # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell #
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # module Database.Schema where import ClassyPrelude import Database.Persist.TH type EmailAddress = Text type Token = Text share [mkPersist sqlSettings] [persistLowerCase| UserRow sql=users name Text email EmailAddress UniqueName na...
08e5e97ba7f2888f9346362c36750c19e901ba3ae96a4d063344b4dfa6082977
backtracking/mlpost
metapost.ml
(**************************************************************************) (* *) Copyright ( C ) Johannes Kanig , , and (* *) (* This software is f...
null
https://raw.githubusercontent.com/backtracking/mlpost/e82db2d3766f24392956478496fa26c8837c1fef/src/metapost.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
Copyright ( C ) Johannes Kanig , , and modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking open Format let print fmt i c = let () = Duplicate.commandpic c in let c = Compile.commandpic_cmd ...
eca753806a3181681e575312938f9c0a49242930684c3ccde275b94dd1cf41a7
vmchale/phash
Parser.hs
module Parser ( wrapper ) where import Data.Semigroup ((<>)) import Data.Version as V import Options.Applicative import qualified Paths_perceptual_hash as P phashVersion :: V.Version phashVersion = P.version debug :: Parser Bool debug = switch (long "debug" <...
null
https://raw.githubusercontent.com/vmchale/phash/dd0d70969d4e779b5f98e615fb4aa08acddddf9a/app/Parser.hs
haskell
module Parser ( wrapper ) where import Data.Semigroup ((<>)) import Data.Version as V import Options.Applicative import qualified Paths_perceptual_hash as P phashVersion :: V.Version phashVersion = P.version debug :: Parser Bool debug = switch (long "debug" <...
11804b422200cf5a1404e3e57b6d9303a659300efe70f885a10b7a350475aadb
factisresearch/mq-demo
HasExceptions.hs
# LANGUAGE FlexibleContexts # # LANGUAGE UndecidableInstances # module Mgw.Util.HasExceptions (HasExceptions(..)) where import Control.Monad.Reader (ReaderT, runReaderT, ask) import Control.Monad.Error (ErrorT(ErrorT), Error, runErrorT) import Control.Monad.Trans (lift) import qualified Control.Exception as Exc import...
null
https://raw.githubusercontent.com/factisresearch/mq-demo/0efa1991ca647a86a8c22e516a7a1fb392ab4596/server/src/lib/Mgw/Util/HasExceptions.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE UndecidableInstances # module Mgw.Util.HasExceptions (HasExceptions(..)) where import Control.Monad.Reader (ReaderT, runReaderT, ask) import Control.Monad.Error (ErrorT(ErrorT), Error, runErrorT) import Control.Monad.Trans (lift) import qualified Control.Exception as Exc import...
73d16bbab1d38d0dc61a0bab6f7942faeaedf824bab726ff3df30ce23daa2c49
jaked/orpc
clicks.ml
let (>>=) = Lwt.(>>=) ;; Dom.window#_set_onload begin fun () -> let client = Orpc_js_client.create ~transport:`Xhr_long_poll "/clicks" in let clicks = (Dom.document#getElementById "clicks" : Dom.span) in let set_clicks n = clicks#_set_innerHTML (string_of_int n) in let module M = Comet_js_comet_clnt.Sync(st...
null
https://raw.githubusercontent.com/jaked/orpc/ecb5df8ec928070cd89cf035167fcedf3623ee3c/examples/clicks-comet/clicks.ml
ocaml
let (>>=) = Lwt.(>>=) ;; Dom.window#_set_onload begin fun () -> let client = Orpc_js_client.create ~transport:`Xhr_long_poll "/clicks" in let clicks = (Dom.document#getElementById "clicks" : Dom.span) in let set_clicks n = clicks#_set_innerHTML (string_of_int n) in let module M = Comet_js_comet_clnt.Sync(st...
f2a5a7a6c4fb062a9456cbd22166a669b187c2557a681a5579cbf5b74d1aa699
0day1day/bap
switch_condition.ml
open Asmir_disasm open Big_int_convenience module CS = Cfg.SSA module D = Debug.Make(struct let name = "Switch_condition" and default = `NoDebug end) open D open Ssa open Type module VM = Var.VarMap module VS = Var.VarSet let add_switch_conditions_int origssa optssa vsa_in = let stop_before = function | Ssa.Loa...
null
https://raw.githubusercontent.com/0day1day/bap/eead3c03b5c9fb59d6b2c8ac1e1f3425f8601a2a/ocaml/switch_condition.ml
ocaml
Memory operations, and variables are leafs We found a memory lookup Find a leaf in the memory lookup when olde = olde' Remove this case so we find other switch cases to the same target
open Asmir_disasm open Big_int_convenience module CS = Cfg.SSA module D = Debug.Make(struct let name = "Switch_condition" and default = `NoDebug end) open D open Ssa open Type module VM = Var.VarMap module VS = Var.VarSet let add_switch_conditions_int origssa optssa vsa_in = let stop_before = function | Ssa.Loa...
0770441a02bc40fb82ac9712391d73c42bb6a7e4be422158261dc9ad4008a32e
faylang/fay
console.hs
module Console (main) where import Prelude import FFI main = putStrLn (showInt (fib 10)) fib :: Int -> Int fib 0 = 0 fib 1 = 1 fib n = fib (n - 1) + fib (n - 2) showInt :: Int -> String showInt = ffi "%1+''"
null
https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/examples/console.hs
haskell
module Console (main) where import Prelude import FFI main = putStrLn (showInt (fib 10)) fib :: Int -> Int fib 0 = 0 fib 1 = 1 fib n = fib (n - 1) + fib (n - 2) showInt :: Int -> String showInt = ffi "%1+''"
7e77c2a9da095fb5b88d8969027bd58f21d9fe5b12e25f85d30f47331e8b033e
voice-literate-programming/xunfei-clj
project.clj
(defproject xunfei-clj "0.1.4-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"] [org.json/json "20160810"] [cheshire "5.7.1"]] :resource-paths ["lib/Msc...
null
https://raw.githubusercontent.com/voice-literate-programming/xunfei-clj/56c79013fa2f87cc8b2f38faf18991a7bf7077c4/project.clj
clojure
(defproject xunfei-clj "0.1.4-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"] [org.json/json "20160810"] [cheshire "5.7.1"]] :resource-paths ["lib/Msc...
b889b8a1942722e3fda1d8c024b98a07b2d7ad9fa811591f31c4a1bddc3ae7e7
incoherentsoftware/defect-process
RecallSlashProjectile.hs
module Player.Weapon.All.Scythe.RecallSlashProjectile ( mkRecallSlashProjectile ) where import Control.Monad (guard) import Control.Monad.IO.Class (MonadIO) import Data.Functor ((<&>)) import Data.Maybe (fromMaybe, listToMaybe) import Attack.Description import Attack.Projectile ...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/8797aad1d93bff5aadd7226c39a48f45cf76746e/src/Player/Weapon/All/Scythe/RecallSlashProjectile.hs
haskell
module Player.Weapon.All.Scythe.RecallSlashProjectile ( mkRecallSlashProjectile ) where import Control.Monad (guard) import Control.Monad.IO.Class (MonadIO) import Data.Functor ((<&>)) import Data.Maybe (fromMaybe, listToMaybe) import Attack.Description import Attack.Projectile ...
8114364100f36029b996802d08355548fe88f88d8fc3af9ae15aa879ba9fc720
elaforge/karya
Swam.hs
Copyright 2019 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt -- | Audio Modeling's SWAM. module User.Elaforge.Instrument.Swam (synth) where import qualified Data.Map as Map import qualified Util.Doc as Doc import qualified Util.Seq as Seq import q...
null
https://raw.githubusercontent.com/elaforge/karya/99194874139230dbb9c4d1918082f5a65d2a4d90/User/Elaforge/Instrument/Swam.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt | Audio Modeling's SWAM. defaults apply after the bipolar conversion legato. When there's a string crossing on a portamento, this is ratio of called sustain, but I use that name for something else con sord...
Copyright 2019 module User.Elaforge.Instrument.Swam (synth) where import qualified Data.Map as Map import qualified Util.Doc as Doc import qualified Util.Seq as Seq import qualified Cmd.Instrument.MidiInst as MidiInst import qualified Derive.Args as Args import qualified Derive.Attrs as Attrs import qualified Der...
0f198f2f4bdf1b482ee30a324429013263f1ac062b2c815db9069e853b35aa36
expipiplus1/vulkan
VK_KHR_present_wait.hs
{-# language CPP #-} -- | = Name -- -- VK_KHR_present_wait - device extension -- -- == VK_KHR_present_wait -- -- [__Name String__] -- @VK_KHR_present_wait@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] 249 -- -- [__Revision__] 1 -- -- [__Extension and Version...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/70d8cca16893f8de76c0eb89e79e73f5a455db76/src/Vulkan/Extensions/VK_KHR_present_wait.hs
haskell
# language CPP # | = Name VK_KHR_present_wait - device extension == VK_KHR_present_wait [__Name String__] @VK_KHR_present_wait@ [__Extension Type__] Device extension [__Registered Extension Number__] [__Revision__] [__Extension and Version Dependencies__] - Requires @VK_KHR_swapchain@ ...
249 1 - Requires support for Vulkan 1.0 - < -Docs/issues/new?body=[VK_KHR_present_wait ] @keithp%0A*Here describe the issue or question you have about the VK_KHR_present_wait extension * > 2019 - 05 - 15 - , Valve - , Google - , AMD ...
e4297dbc4761c864d090c15de59861a86009b020f0d54ba9478c0da5bd622726
phadej/staged
Handle.hs
{-# LANGUAGE TemplateHaskellQuotes #-} module Staged.Stream.Handle ( -- * Opening files withBinaryFile, -- * Lifted IOMode sReadMode, sWriteMode, sAppendMode, sReadWriteMode ) where import System.IO (Handle, IOMode (..), hClose, openBinaryFile) import qualified Control.Monad.Trans.Reso...
null
https://raw.githubusercontent.com/phadej/staged/b51c8c508af71ddb2aca4a75030da9b2c4f9e3dd/staged-streams-resourcet/src/Staged/Stream/Handle.hs
haskell
# LANGUAGE TemplateHaskellQuotes # * Opening files * Lifted IOMode ----------------------------------------------------------------------------- Opening files ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --...
module Staged.Stream.Handle ( withBinaryFile, sReadMode, sWriteMode, sAppendMode, sReadWriteMode ) where import System.IO (Handle, IOMode (..), hClose, openBinaryFile) import qualified Control.Monad.Trans.Resource as R import Staged.Commons import Staged.Stream.Type import Staged.Stream.Resou...
7edf066163a524524e0074af7a7f68ef922cdbb8f2498d0666869a78f46cbd65
frenetic-lang/ox
OxPlatform.mli
(** Functions that an Ox controller can use to send OpenFlow messages. *) open Frenetic_OpenFlow0x01 (** [send_packet_out sw xid pkt] sends a [packetOut] message with transaction ID [xid] to switch [sw]. *) val send_packet_out : switchId -> xid -> packetOut -> unit (** [send_flow_mod sw xid mod] sends a [flowMod]...
null
https://raw.githubusercontent.com/frenetic-lang/ox/2c18609fb989ebe841ca9d8836802f5136cbdd86/lib/OxPlatform.mli
ocaml
* Functions that an Ox controller can use to send OpenFlow messages. * [send_packet_out sw xid pkt] sends a [packetOut] message with transaction ID [xid] to switch [sw]. * [send_flow_mod sw xid mod] sends a [flowMod] message with transaction ID [xid] to switch [sw]. * [send_barrier_request sw xid] sends a ba...
open Frenetic_OpenFlow0x01 val send_packet_out : switchId -> xid -> packetOut -> unit val send_flow_mod : switchId -> xid -> flowMod -> unit val send_barrier_request : switchId -> xid -> unit val send_stats_request : switchId -> xid -> request -> unit * [ timeout x callback ] calls the [ callback ] after [ x ] sec...
194846248a184a0bd7eb0238083f1fa7059770ec111b50ed9ecf9230b2994a3d
fakedata-haskell/fakedata
Bank.hs
# LANGUAGE TemplateHaskell # {-# LANGUAGE OverloadedStrings #-} module Faker.Bank where import Data.Text (Text) import Faker (Fake(..)) import Faker.Provider.Bank import Faker.TH $(generateFakeField "bank" "name") $(generateFakeField "bank" "swift_bic")
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/e6fbc16cfa27b2d17aa449ea8140788196ca135b/src/Faker/Bank.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Faker.Bank where import Data.Text (Text) import Faker (Fake(..)) import Faker.Provider.Bank import Faker.TH $(generateFakeField "bank" "name") $(generateFakeField "bank" "swift_bic")
4f64a763dfc1f56113bf3eff76018402e3903c8d6acd188bd0aa474aa2d70931
gsakkas/rite
2301.ml
let rec clone x n = let accum = [] in let rec helper accum n = if n < 1 then accum else helper (x :: accum) (n - 1) in helper accum n;; let padZero l1 l2 = let (a,b) = ((List.length l1), (List.length l2)) in if a < b then ((List.append (clone 0 (b - a)) l1), l2) else if b < a then (l1, (List.append ...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/2301.ml
ocaml
let rec clone x n = let accum = [] in let rec helper accum n = if n < 1 then accum else helper (x :: accum) (n - 1) in helper accum n;; let padZero l1 l2 = let (a,b) = ((List.length l1), (List.length l2)) in if a < b then ((List.append (clone 0 (b - a)) l1), l2) else if b < a then (l1, (List.append ...
3c784b335bbada2559fb270f97ff75c9020f3668e78e360f54862d97758812b5
finnishtransportagency/harja
repl_tyokalut.clj
(ns harja.repl-tyokalut (:require [harja.palvelin.main :as main] [taoensso.timbre :as log] [harja.palvelin.komponentit.http-palvelin :as http-palvelin])) (defn dev-start [] (if main/harja-jarjestelma (log/info "Harja on jo käynnissä!") (main/kaynnista-jarjestelma main/asetukset-tied...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/488b1e096f0611e175221d74ba4f2ffed6bea8f1/src/clj-dev/harja/repl_tyokalut.clj
clojure
(ns harja.repl-tyokalut (:require [harja.palvelin.main :as main] [taoensso.timbre :as log] [harja.palvelin.komponentit.http-palvelin :as http-palvelin])) (defn dev-start [] (if main/harja-jarjestelma (log/info "Harja on jo käynnissä!") (main/kaynnista-jarjestelma main/asetukset-tied...
45cd5a1757612376a88db790e1f070a003843e8362143d968e8a19c2ae49a841
kowainik/tomland
Codec.hs
| Module : Toml . Codec Copyright : ( c ) 2018 - 2022 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > Stability : Stable Portability : Portable This module provides utilities for implementing and using bidire...
null
https://raw.githubusercontent.com/kowainik/tomland/561aefdbcf177498c06e6c6fcee2b3fe299b3af6/src/Toml/Codec.hs
haskell
$types $error $code $di $combinator $generic $bimapConversion $error Core error types, including 'TomlDecodeError' and 'LoadTomlException'. $di Forward and backward mapping functions and combinators (similar to profunctors). $generic Automatic TOML codecs using 'GHC.Generics.Generic'.
| Module : Toml . Codec Copyright : ( c ) 2018 - 2022 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > Stability : Stable Portability : Portable This module provides utilities for implementing and using bidire...
7f6720fd3b19141ce74110219eed969777d0b3d0dd09506e97073f278962bbcb
ocaml-omake/omake
omake_builtin_util.mli
(* Run-time symbols. *) val defined_sym : Omake_env.t -> Omake_value_type.pos -> Lm_location.t -> string -> bool val get_sym : Omake_env.t -> Omake_value_type.pos -> Lm_location.t -> string -> Omake_value_type.t val add_sym : Omake_env.t -> Omake_value_type.pos -> Lm_location.t -> string -> Omake_value_type.t -> O...
null
https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/builtin/omake_builtin_util.mli
ocaml
Run-time symbols. * Map over a sequence and add separators. * Boolean values.
val defined_sym : Omake_env.t -> Omake_value_type.pos -> Lm_location.t -> string -> bool val get_sym : Omake_env.t -> Omake_value_type.pos -> Lm_location.t -> string -> Omake_value_type.t val add_sym : Omake_env.t -> Omake_value_type.pos -> Lm_location.t -> string -> Omake_value_type.t -> Omake_env.t val sequence...
1b837af8f6a7e31d7200ca9c30c3a60de15129fe9587ddfc1c14250f6d5a5eeb
RichiH/git-annex
Status.hs
git - annex command - - Copyright 2013 - 2015 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2013-2015 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Command.Status where import Command import Annex.CatFile import Annex.Content.Direct import...
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Command/Status.hs
haskell
renames not shown in this simplified status Git thinks that present direct mode files are typechanged. (On crippled filesystems, git instead thinks they're modified.) Check their content to see if they are modified or not.
git - annex command - - Copyright 2013 - 2015 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2013-2015 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Command.Status where import Command import Annex.CatFile import Annex.Content.Direct import...
0c150bad817927b534c0e1dfcac3302935ce4f93b74b1976aa1d8a41e8cf8ac0
dfinity/motoko
lexer.mli
raise Source . ParseError val region : Lexing.lexbuf -> Source.region
null
https://raw.githubusercontent.com/dfinity/motoko/399b8e8b0b47890388cd38ee0ace7638d9092b1a/src/idllib/lexer.mli
ocaml
raise Source . ParseError val region : Lexing.lexbuf -> Source.region
1c0d306c074c2c488f88e895e906cc679fb7f1fc3925e98a0913546e4ec243d8
mariorz/folio-deceso
viz.clj
(ns folio-deceso.viz) (defn chart1-line-plot [data-points x-key y-key z-key] {:data {:values data-points} :width 900 :height 400 :encoding {:x {:field x-key :type "temporal" :scale {:domain ["Jan/01/2020", "Feb/14/2021"] :nice false ...
null
https://raw.githubusercontent.com/mariorz/folio-deceso/4fb59e0bdecfb0a39f63beed11d71dbb6adf403e/src/folio_deceso/viz.clj
clojure
:tickExtra true :background "#fcf8e8" :background "#fcf8e8" :background "#fcf8e8" :tickBand "extent" :align "center" :baseline "top" :dy -5 -ciudad-de-mexico-pasa-semaforo-naranja -y-edomex-cierran-actividades-no-esenciales-semaforo-rojo/ :tickBand "extent" :background "#fcf8e8" :resolve {:scale {:y "independent"}}...
(ns folio-deceso.viz) (defn chart1-line-plot [data-points x-key y-key z-key] {:data {:values data-points} :width 900 :height 400 :encoding {:x {:field x-key :type "temporal" :scale {:domain ["Jan/01/2020", "Feb/14/2021"] :nice false ...
3c116ffe7e2ef964a628c32764f168904483da4b42df539d8fd6e2c81d80de6a
dalaing/little-languages
Gen.hs
# LANGUAGE FlexibleContexts # module Term.Gen where import Control.Lens (preview, review) import Data.Foldable (asum) import Data.Maybe (fromMaybe) import Test.QuickCheck (Gen, Arbitrary(..), oneof, sized) import Type import Type.Gen import Term genTmFalse :: Gen (Term l n a) genTmFalse = pure (review _TmFalse ())...
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/multityped/old-stlc-b/src/Term/Gen.hs
haskell
this will produce a term that is ill typed at the outermost constructor use genTermContaining to nest it elsewhere ? this will produce a term that is ill typed at the outermost constructor use genTermContaining to nest it elsewhere? instance Arbitrary (WellTypedTerm l n a) where arbitrary = WellTypedTerm <$> g...
# LANGUAGE FlexibleContexts # module Term.Gen where import Control.Lens (preview, review) import Data.Foldable (asum) import Data.Maybe (fromMaybe) import Test.QuickCheck (Gen, Arbitrary(..), oneof, sized) import Type import Type.Gen import Term genTmFalse :: Gen (Term l n a) genTmFalse = pure (review _TmFalse ())...
d1f77b1f056032015d7c80a9045e63904fbe1d9dd11a68de8b83ecc1b8b189b4
ktakashi/sagittarius-scheme
%3a197.scm
-*- mode : scheme;coding : utf-8 -*- ;;; srfi/%3a197.scm - Pipeline Operators ;;; Copyright ( c ) 2021 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Redistributi...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/9272a0c4e95718204d0b064f4a4304571f6abf4b/sitelib/srfi/%253a197.scm
scheme
coding : utf-8 -*- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. ...
srfi/%3a197.scm - Pipeline Operators Copyright ( c ) 2021 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (library (sr...
933273bb10ace138a690a82f66207bd2215c0732311234a11ece7b0d40ca11a3
ocamllabs/ocaml-modular-implicits
genprintval.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet Cr...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/toplevel/genprintval.mli
ocaml
********************************************************************* OCaml ...
, 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 Q Public License version 1.0 . open Types open Format module type OBJ =...
cde042d59fd02ad0da4f3a8a5e01125b8a6252e1f068d23c87935bc3a4c83a97
binsec/haunted
dba.ml
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2019 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/haunted/f670f9a02fabc64e08c9f7b091b4a71d205d89a9/src/dba/dba.ml
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
dad7b19e7e76aede49500cdbf0da681c41cc9f21eef6b53b54a29fc648650fd9
bdeket/rktsicm
hashtable.rkt
#lang racket/base (provide (all-defined-out)) (define hash-table/get hash-ref) (define hash-table-ref/default hash-ref) (define hash-table/put! hash-set!) (define hash-table-set! hash-set!) (define make-key-weak-eq-hash-table make-weak-hasheq) (define make-eq-hash-table make-hasheq) (define hash-table->alist hash->li...
null
https://raw.githubusercontent.com/bdeket/rktsicm/9a6177d98040f058214add392bd791f5259b83b5/rktsicm/sicm/rkt/hashtable.rkt
racket
#lang racket/base (provide (all-defined-out)) (define hash-table/get hash-ref) (define hash-table-ref/default hash-ref) (define hash-table/put! hash-set!) (define hash-table-set! hash-set!) (define make-key-weak-eq-hash-table make-weak-hasheq) (define make-eq-hash-table make-hasheq) (define hash-table->alist hash->li...
c26229b1268ae3fdbcca8a3245eb7168a7b257fbecbf8b24d5352967c185e06d
pkhuong/Xecto
futures.lisp
(defpackage "FUTURE" (:use "CL" "SB-EXT" "SB-THREAD") (:export "FUTURE" "DEPENDENTS" "STATUS" "WAIT" "CANCEL" "MARK-DEPENDENCIES" "THAW" "MARK-DONE")) ;;; Infrastructure for futures: lenient-evaluated values ;;; ;;; A future is a computation with a set of dependencies; whenever ;;;...
null
https://raw.githubusercontent.com/pkhuong/Xecto/5eb5651f6333b13e8bdf9e52128116444f3a1a37/futures.lisp
lisp
Infrastructure for futures: lenient-evaluated values A future is a computation with a set of dependencies; whenever all the dependencies for a computation have been fully executed, it too is executed. In order to do so, each future also tracks its dependents in list of weak pointers. When the future is marked ...
(defpackage "FUTURE" (:use "CL" "SB-EXT" "SB-THREAD") (:export "FUTURE" "DEPENDENTS" "STATUS" "WAIT" "CANCEL" "MARK-DEPENDENCIES" "THAW" "MARK-DONE")) fullfilled ( depcount is zero ) , the future is recursively executed . to zero and updated on demand . : waitin...