_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
1a3a7105cfceadb56df16daad437ee174b8312f3a6f2b8b0aa1f22ebb756ebd5
oxidizing/sihl
core_container.ml
include Core_lifecycle module Service = Core_service let start_services = Core_service.start_services let stop_services = Core_service.stop_services
null
https://raw.githubusercontent.com/oxidizing/sihl/3f23bb9e6d163278e10bac719cd434194f50baaf/sihl/src/core_container.ml
ocaml
include Core_lifecycle module Service = Core_service let start_services = Core_service.start_services let stop_services = Core_service.stop_services
a6f5e71f8d6ff98c0f7cc0e35cccc84a92bdf21d3e74efd82adc6868930d0dfa
dmjio/stripe
Transfer.hs
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # ------------------------------------------- -- | -- Module : Web.Stripe.Transfer Copyright : ( c ) , 2014 -- Maintainer : -- Stability : experimental -- Portabil...
null
https://raw.githubusercontent.com/dmjio/stripe/967334629933fcb55247eb3270c7801c05d6bf61/stripe-core/src/Web/Stripe/Transfer.hs
haskell
----------------------------------------- | Module : Web.Stripe.Transfer Maintainer : Stability : experimental Portability : POSIX @ main :: IO () main = do case result of (Left stripeError) -> print stripeError result <- stripe config $ createTransfer recipientid (Amount 100) USD ...
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # Copyright : ( c ) , 2014 < https:/\/\stripe.com / docs / api#transfers > { -\ # LANGUAGE OverloadedStrings \#- } import Web . Stripe import Web . Stripe . Transfe...
f60fc180894f47a50e67f9d63eb0e58f8f46e96311248a837facdfcb6bc29555
broom-lang/broom
FcSigs.ml
module Tx = Transactional module Type = FcType.Type type plicity = Util.plicity module type EXPR = sig type def type stmt type coercer type var = {plicity : Util.plicity; name : Name.t; vtyp : Type.t} type t = {term : t'; typ : Type.t; pos : Util.span} and t' = private | Fn of {unive...
null
https://raw.githubusercontent.com/broom-lang/broom/62cfc08fdd1409f6b1c3a45018ec7d9c351cd59b/compiler/lib/Fc/FcSigs.ml
ocaml
module Tx = Transactional module Type = FcType.Type type plicity = Util.plicity module type EXPR = sig type def type stmt type coercer type var = {plicity : Util.plicity; name : Name.t; vtyp : Type.t} type t = {term : t'; typ : Type.t; pos : Util.span} and t' = private | Fn of {unive...
1e210c87ebe7cd712bd55af5b6075f83a519bbec01c8926208d2dfa70041017b
arrdem/sad
hooks.clj
(ns me.arrdem.sad.runtime.hooks) (defn- nothing [] nil) (def ^:dynamic *pre-hook-ns* nil) (def ^:dynamic *post-hook-ns* nil) (defn get-pre-hook "Wrapper on get-prefixed-hook which instructs it to look for a \"pre\" hook." [sym] (if (and *pre-hook-ns* (symbol? *pre-hook-ns*) (find-ns *pre-...
null
https://raw.githubusercontent.com/arrdem/sad/11aca91ec38009069d6d7f50de7fd2326cc627b8/src/me/arrdem/sad/runtime/hooks.clj
clojure
(ns me.arrdem.sad.runtime.hooks) (defn- nothing [] nil) (def ^:dynamic *pre-hook-ns* nil) (def ^:dynamic *post-hook-ns* nil) (defn get-pre-hook "Wrapper on get-prefixed-hook which instructs it to look for a \"pre\" hook." [sym] (if (and *pre-hook-ns* (symbol? *pre-hook-ns*) (find-ns *pre-...
50a84a9931d03ea3c9187e3319aace37dedeeaabb526d2d10bc11cc62bc74e14
etnt/eopenid
eopenid_v1.erl
%%%------------------------------------------------------------------- Copyright ( c ) 2008 - 2009 Torbjorn Tornkvist See the ( MIT ) LICENSE file for licensing information . %%% Created : 3 Apr 2008 by < > Re - worked : 7 Feb 2009 by < > Desc . : Implementation of OpenID v1.1 %%% %%%-----...
null
https://raw.githubusercontent.com/etnt/eopenid/8eed6007c868a4fe751172e5127441425a4b1877/src/eopenid_v1.erl
erlang
------------------------------------------------------------------- ------------------------------------------------------------------- --- TEST --- Does DISCOVER, ASSOCIATE and returns the Url to be used for CHECKID_SETUP. Returns: {Url, Dict} Verify the Url you are "returned_to" as: ----------------------...
Copyright ( c ) 2008 - 2009 Torbjorn Tornkvist See the ( MIT ) LICENSE file for licensing information . Created : 3 Apr 2008 by < > Re - worked : 7 Feb 2009 by < > Desc . : Implementation of OpenID v1.1 -module(eopenid_v1). -export([discover/1 ,discover/2 ,discover/3 ,...
14719617b8f67dd24367a3ae58b7f32ae94c13195e0137fcc73d20ddfc57eccc
mikera/clojure-utils
test_error.clj
(ns mikera.cljutils.test-error (:use clojure.test) (:use [mikera.cljutils error])) (deftest test-error (testing "Error" (is (thrown? Throwable (error "foo"))))) (deftest test-error? (testing "error?" (is (error? (error "foo"))) (is (not (error? (+ 1 2)))))) (deftest test-stacktrace-str (let [ss...
null
https://raw.githubusercontent.com/mikera/clojure-utils/92f7fd7a40c9cf22ab7004a304303e45ea4d4284/src/test/clojure/mikera/cljutils/test_error.clj
clojure
(ns mikera.cljutils.test-error (:use clojure.test) (:use [mikera.cljutils error])) (deftest test-error (testing "Error" (is (thrown? Throwable (error "foo"))))) (deftest test-error? (testing "error?" (is (error? (error "foo"))) (is (not (error? (+ 1 2)))))) (deftest test-stacktrace-str (let [ss...
8eaa0ad22fed3689227bc5694ec90954d4c08b7445399de8f087cbf34cca7003
glguy/advent2020
DLX.hs
{-# Language BlockArguments, ImportQualifiedPost #-} module DLX (DlxLimit(..), dlx, dlxOpt) where import Foreign.C import Foreign.Ptr import Foreign.Marshal.Array import Control.Exception import Data.Foldable import Data.IORef import Data.List import Data.Map qualified as Map import Data.IntMap qualified as IntMap imp...
null
https://raw.githubusercontent.com/glguy/advent2020/ed247131684efa699bd34b846b5d939e9db749fc/dlx/DLX.hs
haskell
# Language BlockArguments, ImportQualifiedPost #
module DLX (DlxLimit(..), dlx, dlxOpt) where import Foreign.C import Foreign.Ptr import Foreign.Marshal.Array import Control.Exception import Data.Foldable import Data.IORef import Data.List import Data.Map qualified as Map import Data.IntMap qualified as IntMap import System.IO.Unsafe data Dlx_ type Dlx = Ptr Dlx_ ...
43d36afac13679a81b93f346292b8d4761ef09fd19fd54611e2537ce8758e390
qnikst/okasaki
LeftishHeap.hs
module Data.LeftishHeap where import Data.Heap.Class import Test.QuickCheck import Test.Hspec import Test.Hspec.QuickCheck data LeftishHeap a = E | H Int a (LeftishHeap a) (LeftishHeap a) deriving (Eq, Show) instance Heap LeftishHeap where empty = E isEmpty E = True isEmpty _ = False insert x h = ...
null
https://raw.githubusercontent.com/qnikst/okasaki/f6f3c4211df16e4dde3a5cb4d6aaf19a68b99b0e/ch03/Data/LeftishHeap.hs
haskell
module Data.LeftishHeap where import Data.Heap.Class import Test.QuickCheck import Test.Hspec import Test.Hspec.QuickCheck data LeftishHeap a = E | H Int a (LeftishHeap a) (LeftishHeap a) deriving (Eq, Show) instance Heap LeftishHeap where empty = E isEmpty E = True isEmpty _ = False insert x h = ...
c4ddd4344d1cea5cf5a08c6304e5ebed295480b91e9f6788e1a38915cea4c63a
felixengelmann/act-r-sentence-parser-em
sentences.lisp
-*- mode : LISP ; Syntax : COMMON - LISP ; Base : 10 -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; ACT-R Sentence Parsing Model ;;; Copyright ( C ) 2006 , ;;; Extended by 2012/2013 to work with the EMMA eye ;;; movement model in ACT-R 6 ;;; ;;; Inclu...
null
https://raw.githubusercontent.com/felixengelmann/act-r-sentence-parser-em/0d063c8772a367ac57e7fc9f2e1611b2956734df/LewisVasishth2005/sentences.lisp
lisp
Syntax : COMMON - LISP ; Base : 10 -*- ACT-R Sentence Parsing Model movement model in ACT-R 6 Includes the ACT-R Sentence Parsing Model processing Filename : Bugs : To do : ----- History ----- : * LONG SUBJECTS Deep RIGHT BRANCHING Post-verbal...
Copyright ( C ) 2006 , Extended by 2012/2013 to work with the EMMA eye German negative and positive polarity items as described in the Cognitive Science article , Bruessow & Lewis ( 2007 ) . The original English model is described in the Cognitive Science article Lewis & Vasishth ( 2004 ) . vd11 ...
77cb69cb9e37ac945f394b2a43a560e723d18249413f5faa48e7082a0d748d40
jordanthayer/ocaml-search
anytime_aseps.ml
(** Anytime Variant of A* epsilon *) type 'a node = { f : float; g : float; d : float; (* position in q if applicable, or presence on closed *) mutable q_pos : int; (* Q position of geq *) mutable i_pos : int; (* Q position of inconsistent *) data : 'a; } (* Sorting Predicates *) let just_f a b = (**...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/anytime/anytime_aseps.ml
ocaml
* Anytime Variant of A* epsilon position in q if applicable, or presence on closed Q position of geq Q position of inconsistent Sorting Predicates * quality ordering predicate. distinctions between nodes with the same f are made by the convenience ordering predicate. * convenience ordering predicate * r...
type 'a node = { f : float; g : float; d : float; data : 'a; } let just_f a b = a.f <= b.f let d_then_f_then_g a b = (a.d < b.d) || ((a.d = b.d) && ((a.f < b.f) || ((a.f = b.f) && (a.g >= b.g)))) let get_q_pos n = n.q_pos let set_q_pos n pos = n.q_pos <- pos let get_i_pos n = n.i_pos l...
175168e3a279599d3e81fc712b1afb076c097f2b69d48647484d58d23a49a8d3
bcc32/advent-of-code
main.ml
open! Core open! Async open! Import module Input = struct module Person = struct type t = string [@@deriving sexp_of] let answers t = String.to_list t |> Set.of_list (module Char) end module Group = struct type t = Person.t list [@@deriving sexp_of] let union t = List.map t ~f:Person.answers |...
null
https://raw.githubusercontent.com/bcc32/advent-of-code/86a9387c3d6be2afe07d2657a0607749217b1b77/2020/day_06/main.ml
ocaml
open! Core open! Async open! Import module Input = struct module Person = struct type t = string [@@deriving sexp_of] let answers t = String.to_list t |> Set.of_list (module Char) end module Group = struct type t = Person.t list [@@deriving sexp_of] let union t = List.map t ~f:Person.answers |...
838209143e4d0fa058edbc744122e34d5c485d435d70c032b468338b1e738a76
audreyt/openafp
BMO.hs
module OpenAFP.Records.AFP.BMO where import OpenAFP.Types import OpenAFP.Internals data BMO = BMO { bmo_Type :: !N3 ,bmo_ :: !N3 ,bmo :: !NStr } deriving (Show, Typeable)
null
https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/AFP/BMO.hs
haskell
module OpenAFP.Records.AFP.BMO where import OpenAFP.Types import OpenAFP.Internals data BMO = BMO { bmo_Type :: !N3 ,bmo_ :: !N3 ,bmo :: !NStr } deriving (Show, Typeable)
8a4ec4c4d985cdcc81806bfb9825863708bc757e5b9f5fdc1fe54fdc42ab06b9
seek-oss/serverless-haskell
TextValue.hs
# LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE TemplateHaskell #-} | Module : Data . Aeson . TextValue Description : Type for things that can be embedded in a JSON string Provides @FromJSON@ and @ToJSON@ instan...
null
https://raw.githubusercontent.com/seek-oss/serverless-haskell/dbea96e657e23fd4a3fef03bdf182f060dc2590d/src/Data/Aeson/TextValue.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE TemplateHaskell #
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RecordWildCards # | Module : Data . Aeson . TextValue Description : Type for things that can be embedded in a JSON string Provides @FromJSON@ and @ToJSON@ instances for anything that has @FromText@ and @ToText@ instances , e.g. @TextValue Text@ , ...
e31bd04ff7e003e20a5b3604affdbb9a3d6a1f35c6321c8a0db0e9268af35024
marigold-dev/deku
random.ml
let () = Stdlib.Random.self_init (); Mirage_crypto_rng_unix.initialize () let generate bits = Mirage_crypto_rng.generate bits let int32 = Stdlib.Random.int32 let int n = Int32.(to_int (int32 (of_int n)))
null
https://raw.githubusercontent.com/marigold-dev/deku/21ec2bf05ce688c5b6012be16545175e75403f06/deku-p/src/core/crypto/random.ml
ocaml
let () = Stdlib.Random.self_init (); Mirage_crypto_rng_unix.initialize () let generate bits = Mirage_crypto_rng.generate bits let int32 = Stdlib.Random.int32 let int n = Int32.(to_int (int32 (of_int n)))
5557359e502c1dcf7b7221164510cb9b012c78e62d7e26e6ec573fc46f3a8c12
unbounce/encors
types.clj
(ns com.unbounce.encors.types (:require [schema.core :as s])) (def match-origin :match-origin) (def star-origin :star-origin) (s/defschema CorsPolicySchema {(s/required-key :allowed-origins) (s/cond-pre (s/enum match-origin star-origin) #{s/Str}) (s/requi...
null
https://raw.githubusercontent.com/unbounce/encors/323d7e06816d0767197727ddb4720beeaca5822e/src/com/unbounce/encors/types.clj
clojure
(ns com.unbounce.encors.types (:require [schema.core :as s])) (def match-origin :match-origin) (def star-origin :star-origin) (s/defschema CorsPolicySchema {(s/required-key :allowed-origins) (s/cond-pre (s/enum match-origin star-origin) #{s/Str}) (s/requi...
792ef95ae027ac19af8b9a8b817400e8f6f2829c934c33e2d13f81c669b96ae2
hjcapple/reading-sicp
exercise_4_44.scm
#lang sicp P292 - [ 练习 4.44 ] (#%require "ambeval.scm") (easy-ambeval 200 '(begin (define (require p) (if (not p) (amb))) (define (an-integer-between low high) (require (<= low high)) (amb low (an-integer-between (+ low 1) high))) (define (for-each-n proc items n) (cond ((not (null? items)) (pr...
null
https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_4/exercise_4_44.scm
scheme
(row . col)
#lang sicp P292 - [ 练习 4.44 ] (#%require "ambeval.scm") (easy-ambeval 200 '(begin (define (require p) (if (not p) (amb))) (define (an-integer-between low high) (require (<= low high)) (amb low (an-integer-between (+ low 1) high))) (define (for-each-n proc items n) (cond ((not (null? items)) (pr...
42151618aa1a7a395a868c5b7e3463eae483aadca02916015d8c804fdd371ad4
TorXakis/TorXakis
Choice.hs
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} {-# LANGUAGE OverloadedStrings #-} modul...
null
https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/test/sqatt/src/Benchmarks/Choice.hs
haskell
# LANGUAGE OverloadedStrings #
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} module Benchmarks.Choice (benchmarksSet)...
27de7f7ad018aa994356119d5d9fdeb0cbeb1886f5b455ce8ceebbc9edd93296
input-output-hk/cardano-base
CompactSum.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # -- | A key evolving signatures imp...
null
https://raw.githubusercontent.com/input-output-hk/cardano-base/b2058e5f38bfb463b3e414d8fca6656d78f0236d/cardano-crypto-class/src/Cardano/Crypto/KES/CompactSum.hs
haskell
| A key evolving signatures implementation. It is a naive recursive implementation of the sum composition from /Composition and Efficiency Tradeoffs for Forward-Secure Digital Signatures/ <> binary tree version. This relies on "Cardano.Crypto.KES.CompactSingle" for the base case. @ (A) / \ ...
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # section 3.1 of the \"MMM\ " pape...
110e2d72708a56995d65e18beb42056d2eaa50c43ec80cb0123e350a12506ce1
maranget/hevea
util.mli
(***********************************************************************) (* *) (* HEVEA *) (* *) , projet , INRIA R...
null
https://raw.githubusercontent.com/maranget/hevea/226eac8c506f82a600d453492fbc1b9784dd865f/util.mli
ocaml
********************************************************************* HEVEA ...
, projet , INRIA Rocquencourt Copyright 2001 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . $ I d : util.mli , v 1.5 2001 - 05 - 28 17:28:56 maranget Exp $ val cost : ('a -> int * int) -> 'a Tree...
82ccc47e5e69dbaa39f6397b1635c92f6eae90e104dd777b8f751981361f3169
FailWhaleBrigade/water-wars
Events.hs
# LANGUAGE GeneralizedNewtypeDeriving # module WaterWars.Core.Game.Events ( module WaterWars.Core.Game.Events , module WaterWars.Core.Game.State , module WaterWars.Core.Game.Base ) where import ClassyPrelude import WaterWars.Core.Game.Base import WaterWars.Core.Game.State...
null
https://raw.githubusercontent.com/FailWhaleBrigade/water-wars/bdd0616b1eed281ace499f059b4cc1e72bc50d05/library/WaterWars/Core/Game/Events.hs
haskell
# LANGUAGE GeneralizedNewtypeDeriving # module WaterWars.Core.Game.Events ( module WaterWars.Core.Game.Events , module WaterWars.Core.Game.State , module WaterWars.Core.Game.Base ) where import ClassyPrelude import WaterWars.Core.Game.Base import WaterWars.Core.Game.State...
a08193c20651ce0e3a99e71acf8ce122ebeb0fc93ed50f0dfb495e3f5a96f9f1
vbmithr/ocaml-kraken
kraken.mli
open Json_encoding module Pair : sig type t = { base: string ; quote: string ; } [@@deriving sexp] val compare : t -> t -> int val pp : Format.formatter -> t -> unit val to_string : t -> string val of_string : string -> t option val of_string_exn : string -> t val encoding : t Json_encoding....
null
https://raw.githubusercontent.com/vbmithr/ocaml-kraken/a330826b5f2ce1a20d34c67f5080e6d7ebccd177/src/kraken.mli
ocaml
*/*
open Json_encoding module Pair : sig type t = { base: string ; quote: string ; } [@@deriving sexp] val compare : t -> t -> int val pp : Format.formatter -> t -> unit val to_string : t -> string val of_string : string -> t option val of_string_exn : string -> t val encoding : t Json_encoding....
11161f9f769b0897f4a6619e3cd61fe29c9d0f2100dca49b4d73abf459c26339
logseq/logseq
undo_redo.cljs
(ns frontend.modules.editor.undo-redo (:require [datascript.core :as d] [frontend.db.conn :as conn] [frontend.modules.datascript-report.core :as db-report] [frontend.state :as state] [clojure.set :as set])) ;;;; APIs (def ^:private undo-redo-states (atom {})) (def *pa...
null
https://raw.githubusercontent.com/logseq/logseq/6a5b0c819975a36aa91b84f73dec32d2ed483503/src/main/frontend/modules/editor/undo_redo.cljs
clojure
APIs same block
(ns frontend.modules.editor.undo-redo (:require [datascript.core :as d] [frontend.db.conn :as conn] [frontend.modules.datascript-report.core :as db-report] [frontend.state :as state] [clojure.set :as set])) (def ^:private undo-redo-states (atom {})) (def *pause-listen...
b916d268ec8f7af3094f0ae2597aada8f20aad72bd36e5b7b0ae48d97c7edcab
aeternity/aeternity
aehttp_dispatch_int.erl
-module(aehttp_dispatch_int). -export([forbidden/2]). -export([handle_request/3]). -import(aeu_debug, [pp/1]). -import(aehttp_helpers, [ parse_map_to_atom_keys/0 , read_required_params/1 , read_optional_params/1 , api_decode/1 ...
null
https://raw.githubusercontent.com/aeternity/aeternity/7038703a1ff281f1b6544037e4c7039cc1c5441a/apps/aehttp/src/aehttp_dispatch_int.erl
erlang
TODO: rethink this from the perspective of HCs this function is intended to produce unsigned transactions that can be wrapped in a paying for transaction. Please don't move paying for transactions
-module(aehttp_dispatch_int). -export([forbidden/2]). -export([handle_request/3]). -import(aeu_debug, [pp/1]). -import(aehttp_helpers, [ parse_map_to_atom_keys/0 , read_required_params/1 , read_optional_params/1 , api_decode/1 ...
5dbc0703b1f998af2c564c09b02a30ac7980bde0b18d939989cbd8dd42819ac6
ahrefs/lwt_named_threads
myocamlbuild.ml
OASIS_START DO NOT EDIT ( digest : 1e8e0c85ce5d845644c081b5d5829972 ) module OASISGettext = struct # 22 " src / oasis / OASISGettext.ml " let ns_ str = str let s_ str = str let f_ (str: ('a, 'b, 'c, 'd) format4) = str let fn_ fmt1 fmt2 n = if n = 1 then fmt1^^"" else ...
null
https://raw.githubusercontent.com/ahrefs/lwt_named_threads/c922727a73da16b451a292dce024805f01f1f7bd/myocamlbuild.ml
ocaml
these functions are not really officially exported ocamlfind command This lists all supported packages. Mock to list available syntaxes. By using Before_options one let command line options have an higher * priority on the contrary using After_options will guarantee to have * the higher p...
OASIS_START DO NOT EDIT ( digest : 1e8e0c85ce5d845644c081b5d5829972 ) module OASISGettext = struct # 22 " src / oasis / OASISGettext.ml " let ns_ str = str let s_ str = str let f_ (str: ('a, 'b, 'c, 'd) format4) = str let fn_ fmt1 fmt2 n = if n = 1 then fmt1^^"" else ...
e81b7501746d8ad6746990c686e8b14c7a575c1367c1c2f3d80fd9caf0e72f81
AvramRobert/omnia
information.clj
(ns omnia.schema.information (:require [schema.core :as s] [omnia.schema.view :refer [View]])) (def ^:const none :none) (def ^:const suggestion :suggestion) (def ^:const signature :signature) (def ^:const documentation :documentation) (def InformationType (s/enum none suggestion si...
null
https://raw.githubusercontent.com/AvramRobert/omnia/af515fb75d7492251436a3d844c0616c82d4eee0/src/omnia/schema/information.clj
clojure
(ns omnia.schema.information (:require [schema.core :as s] [omnia.schema.view :refer [View]])) (def ^:const none :none) (def ^:const suggestion :suggestion) (def ^:const signature :signature) (def ^:const documentation :documentation) (def InformationType (s/enum none suggestion si...
0d1c8b5e298d8d6394ddcc6f282a2f00775332e72066543942ab187c93445d62
glguy/advent2016
Day09.hs
{-# Language LambdaCase #-} module Main where import Common import Control.Monad import Text.Megaparsec import Text.Megaparsec.Char main :: IO () main = do xs <- lines <$> readInputFile 9 print (sum (map decode1 xs)) print (sum (map decode2 xs)) decode1 :: String -> Int decode1 = mkDecode (\n xs -> n * l...
null
https://raw.githubusercontent.com/glguy/advent2016/0e2670743ac10f54517f00023b8082c492ad0d8e/Day09.hs
haskell
# Language LambdaCase # ^ repeated segment logic ^ input string ^ decoded length
module Main where import Common import Control.Monad import Text.Megaparsec import Text.Megaparsec.Char main :: IO () main = do xs <- lines <$> readInputFile 9 print (sum (map decode1 xs)) print (sum (map decode2 xs)) decode1 :: String -> Int decode1 = mkDecode (\n xs -> n * length xs) decode2 :: String...
b638521cb206902561432d1233d5f0ff879beb48cf0b480cc1ef4f35382ca6bf
trchopan/scheduled-blocks
ArmadaNonce.hs
# LANGUAGE DeriveGeneric # module Domain.ArmadaNonce where import Data.Aeson ( (.:) , FromJSON(parseJSON) , KeyValue((.=)) , ToJSON(toJSON)...
null
https://raw.githubusercontent.com/trchopan/scheduled-blocks/7cfd401aacf4afbf45ec4bd89b02c100d96edb94/src/Domain/ArmadaNonce.hs
haskell
# LANGUAGE DeriveGeneric # module Domain.ArmadaNonce where import Data.Aeson ( (.:) , FromJSON(parseJSON) , KeyValue((.=)) , ToJSON(toJSON)...
5586a23fd024342a2633ee2670bcedb72fef99c881cc90db421ad12388797fde
OdonataResearchLLC/weyl
algebraic-extension.lisp
-*- Mode : Lisp ; Package : ; ; Lowercase : T ; Syntax : Common - Lisp -*- ;;; =========================================================================== ;;; Finite Algebraic Extension ;;; =========================================================================== ( c ) Copyright 1989 , 1993 Cornell Univers...
null
https://raw.githubusercontent.com/OdonataResearchLLC/weyl/299898c075795a7fb0b06907e6db13158e06b686/algebraic-extension.lisp
lisp
Package : ; ; Lowercase : T ; Syntax : Common - Lisp -*- =========================================================================== Finite Algebraic Extension =========================================================================== Use the polynomial print-object method for now This returns the term li...
( c ) Copyright 1989 , 1993 Cornell University algebraic - extension.lisp , v 1.5 1994/10/04 22:30:39 rz Exp (in-package :weyli) DELETE ( make::adjust - version - numbers " 1.5 " ) (eval-when (:compile-toplevel :load-toplevel) (define-domain-creator factor-ring ((ring ring) (ideal ideal)) (cond ((eql (...
5ba4f7788f1c4a98a44a40e62109d1fd4ac233f61cda6a422be8d3663527067a
facebookincubator/hsthrift
FilePathTest.hs
Copyright ( c ) Facebook , Inc. and its affiliates . module FilePathTest (main) where import Data.Text (Text) import Test.HUnit import TestRunner import Util.FilePath dirEnv :: DirEnv dirEnv = DirEnv{ homeDir = "/home/sweethome/", currentDir = "/herp" } homeDirTest :: Test homeDirTest = TestLabel "~/ handled" ....
null
https://raw.githubusercontent.com/facebookincubator/hsthrift/d3ff75d487e9d0c2904d18327373b603456e7a01/common/util/tests/FilePathTest.hs
haskell
Copyright ( c ) Facebook , Inc. and its affiliates . module FilePathTest (main) where import Data.Text (Text) import Test.HUnit import TestRunner import Util.FilePath dirEnv :: DirEnv dirEnv = DirEnv{ homeDir = "/home/sweethome/", currentDir = "/herp" } homeDirTest :: Test homeDirTest = TestLabel "~/ handled" ....
43f748ed7270948399f4c57f965d24f36164f2c9c0ba7c562518e3c48a1ac3e0
Firobe/nes-ml
input_sdl.ml
open Tsdl module M = struct type t = unit module Keymap = Map.Make (Input.Keys) type binding = { key : Sdl.keycode; kmod : Sdl.keymod } let create () = () (* Hardcoded, for now *) let bindings = let open Sdl.K in (* Bare key *) let b k = { key = k; kmod = Sdl.Kmod.none } in (* Key with ...
null
https://raw.githubusercontent.com/Firobe/nes-ml/a5ea6acd262ca03dc84a114d3d74f8100ff18dd0/src/input_sdl.ml
ocaml
Hardcoded, for now Bare key Key with shift modifier
open Tsdl module M = struct type t = unit module Keymap = Map.Make (Input.Keys) type binding = { key : Sdl.keycode; kmod : Sdl.keymod } let create () = () let bindings = let open Sdl.K in let b k = { key = k; kmod = Sdl.Kmod.none } in let shift k = { key = k; kmod = Sdl.Kmod.lshift } in l...
f7828f573733e82295df483d342514febafad100ba4e11f68b0eaf488b1f420b
MaybeJustJames/zephyr
Eval.hs
# LANGUAGE NumericUnderscores # module Test.Eval (spec) where import qualified Data.Map as Map import Language.PureScript.AST.Literals import Language.PureScript.AST.SourcePos (SourceSpan(..), SourcePos(..)) import Language.PureScript.CoreFn import Language.PureScript.DCE import qualified Language.PureScript.DCE.Con...
null
https://raw.githubusercontent.com/MaybeJustJames/zephyr/30b6d25813592123dd4dadc34b4df4eb0d150a0b/test/Test/Eval.hs
haskell
TODO: need to generate valid `PSExpr`s. Left err -> assertFailure $ "compilation error: " ++ show err Left err -> assertFailure $ "compilation error: " ++ show err Left err -> assertFailure $ "compilation error: " ++ show err f eqBoolean True True Left err -> assertFailure $ "compilation error: " ++ show err Lef...
# LANGUAGE NumericUnderscores # module Test.Eval (spec) where import qualified Data.Map as Map import Language.PureScript.AST.Literals import Language.PureScript.AST.SourcePos (SourceSpan(..), SourcePos(..)) import Language.PureScript.CoreFn import Language.PureScript.DCE import qualified Language.PureScript.DCE.Con...
6f76e13e0879bcba32f524290e89a9d8ca789e9708e1bcfe5b7c52acd3118184
Suikaba/SelingerQuantumLambdaCalculus
eval.ml
open OUnit2 open Core open Qlambda open Qlambda.Cui open Qlambda.Syntax let bit_ty = ITySum (ITySingleton, ITySingleton) let new_ty = ITyFun (bit_ty, ITyQbit) let meas_ty = ITyFun (ITyQbit, bit_ty) let h_ty = ITyFun (ITyQbit, ITyQbit) let cnot_ty = ITyFun (ITyProd (ITyQbit, ITyQbit), ITyProd (ITyQbit, ITyQbit)) let i...
null
https://raw.githubusercontent.com/Suikaba/SelingerQuantumLambdaCalculus/6a5160d38ad0333278a3f1c068284e3028068a0a/tests/eval.ml
ocaml
open OUnit2 open Core open Qlambda open Qlambda.Cui open Qlambda.Syntax let bit_ty = ITySum (ITySingleton, ITySingleton) let new_ty = ITyFun (bit_ty, ITyQbit) let meas_ty = ITyFun (ITyQbit, bit_ty) let h_ty = ITyFun (ITyQbit, ITyQbit) let cnot_ty = ITyFun (ITyProd (ITyQbit, ITyQbit), ITyProd (ITyQbit, ITyQbit)) let i...
8f25e4ce78d9c830ad05d50caa3dbc32a3235539f854edf135109cab2e2b0683
returntocorp/semgrep
ast_ruby.ml
* * Copyright ( C ) 2010 * Copyright ( C ) 2020 r2c * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are met : * * Redistributions of source code must retain the above copyright * notic...
null
https://raw.githubusercontent.com/returntocorp/semgrep/dcea978347df81cbc8f2c2b49b80c1980f6194cf/languages/ruby/ast/ast_ruby.ml
ocaml
*************************************************************************** Prelude *************************************************************************** *************************************************************************** Names **************************************************************************...
* * Copyright ( C ) 2010 * Copyright ( C ) 2020 r2c * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are met : * * Redistributions of source code must retain the above copyright * notic...
828a49eb3f3a25c9d994f96d0aee02108f7f48766a88c05924d67a5928b09aee
jonascarpay/apecs
Util.hs
{-| Stability : experimental This module is experimental, and its API might change between point releases. Use at your own risk. --} module Apecs.Experimental.Util ( -- * Spatial hashing -- $hash quantize, flatten, inbounds, region, flatten', ) where import Control.Applicative (liftA2) -- $hash -- The fol...
null
https://raw.githubusercontent.com/jonascarpay/apecs/19c9dc15b31bfd4173230a327dec98e2aa959936/apecs/src/Apecs/Experimental/Util.hs
haskell
| Stability : experimental This module is experimental, and its API might change between point releases. Use at your own risk. - * Spatial hashing $hash $hash The following are helper functions for spatial hashing. - The cell size vector contains real components and dictates how large each cell in your ta...
module Apecs.Experimental.Util quantize, flatten, inbounds, region, flatten', ) where import Control.Applicative (liftA2) Your spatial hash is defined by two vectors ; # INLINE quantize # quantize :: (Fractional (v a), Integral b, RealFrac a, Functor v) -> v b quantize cell vec = floor <$> vec/cell ...
a7d1e811d02feea782b70d449851aaa3689637e45f78dd2c737660e583b67ef7
wavewave/hoodle
Transform.hs
# LANGUAGE TypeFamilies # module Hoodle.ModelAction.Select.Transform where import Control.Category ((.)) import Control.Lens (set, view) import Control.Monad.Identity (runIdentity) import Data.Bifunctor (second) import Data.Hoodle.BBox ( BBoxed (..), makeBBoxed, ) import Data.Hoodle.Generic ( GLayer (..), ...
null
https://raw.githubusercontent.com/wavewave/hoodle/fa7481d14a53733b2f6ae9debc95357d904a943c/core/src/Hoodle/ModelAction/Select/Transform.hs
haskell
| | | modify stroke using a function | | | | | modify the whole selection using a function | special case of offset modification |
# LANGUAGE TypeFamilies # module Hoodle.ModelAction.Select.Transform where import Control.Category ((.)) import Control.Lens (set, view) import Control.Monad.Identity (runIdentity) import Data.Bifunctor (second) import Data.Hoodle.BBox ( BBoxed (..), makeBBoxed, ) import Data.Hoodle.Generic ( GLayer (..), ...
69641d3e653feb5717fc36af590566268e8c29b6cd124ddf9430d56770a75c53
effectfully-ou/sketches
Except.hs
# LANGUAGE FunctionalDependencies # module Except where class Except f e | f -> e where throw :: e -> f a
null
https://raw.githubusercontent.com/effectfully-ou/sketches/7b512a529292e8c4bce80526b3f2b938f8cc8e60/validation-leak/src/Except.hs
haskell
# LANGUAGE FunctionalDependencies # module Except where class Except f e | f -> e where throw :: e -> f a
e99efc7b7a58516bab8b50b41a537a1dc80e0fc25b6a75c74f993f402ef12411
swannodette/cljs-bootstrap
brepl.clj
(require '[cljs.build.api :as b]) (require '[cljs.repl :as repl]) (require '[cljs.repl.browser :as browser]) (b/build (b/inputs "src/browser") {:main 'cljs-bootstrap.dev :asset-path "/js" :output-to "resources/js/main.js" :output-dir "resources/js" :verbose true :static-fns true}) (cljs.repl/repl (...
null
https://raw.githubusercontent.com/swannodette/cljs-bootstrap/1cdb45c7c4422cc49215860e77b56d2f273059b7/script/brepl.clj
clojure
(require '[cljs.build.api :as b]) (require '[cljs.repl :as repl]) (require '[cljs.repl.browser :as browser]) (b/build (b/inputs "src/browser") {:main 'cljs-bootstrap.dev :asset-path "/js" :output-to "resources/js/main.js" :output-dir "resources/js" :verbose true :static-fns true}) (cljs.repl/repl (...
12fe9f0509e93a291331e44e3f01df5ae301b6215e93629b00297c4c4d551c0a
sondresl/AdventOfCode
Day12.hs
# LANGUAGE DeriveFunctor # # LANGUAGE RecordWildCards # module Day12 where import Control.Lens import Lib import Data.List.Extra import Text.ParserCombinators.Parsec import qualified Data.Map as Map import Data.Map (Map) import qualified Data.Vector as V import Data.Functor.Foldable type Memory = Map Char Int data C...
null
https://raw.githubusercontent.com/sondresl/AdventOfCode/224cf59354c7c1c31821f36884fe8909c5fdf9a6/2016/Haskell/src/Day12.hs
haskell
print $ part2 input
# LANGUAGE DeriveFunctor # # LANGUAGE RecordWildCards # module Day12 where import Control.Lens import Lib import Data.List.Extra import Text.ParserCombinators.Parsec import qualified Data.Map as Map import Data.Map (Map) import qualified Data.Vector as V import Data.Functor.Foldable type Memory = Map Char Int data C...
f711403d2483be4e528ca9ec9c02a678b03cc1b4b5438807cf6c822c7ba202e6
seanomlor/programming-in-haskell
exp.hs
import Prelude hiding ((^)) (^) :: Int -> Int -> Int m ^ 0 = 0 m ^ n = m * (m * (n - 1))
null
https://raw.githubusercontent.com/seanomlor/programming-in-haskell/e05142e6709eeba2e95cf86f376a32c9e629df88/06-recursive-functions/exp.hs
haskell
import Prelude hiding ((^)) (^) :: Int -> Int -> Int m ^ 0 = 0 m ^ n = m * (m * (n - 1))
ef82fefb83908be9adde51ddbba3f2d095bc691d0a620ba799c1ec48db1962c2
HaskellZhangSong/Introduction_to_Haskell_2ed_source
Kind.hs
Kind.hs {-# LANGUAGE GADTs, KindSignatures, FlexibleInstances #-} data T :: * -> * where NIL :: T a CONS :: a -> T a -> T a data AbsTree k a = Leaf a | Node (k (AbsTree k a)) data Tree :: (* -> *) -> * -> * where L :: a -> Tree k a N :: k (Tree k a) -> Tree k a type RoseTree a ...
null
https://raw.githubusercontent.com/HaskellZhangSong/Introduction_to_Haskell_2ed_source/140c50fdccfe608fe499ecf2d8a3732f531173f5/C08/Kind.hs
haskell
# LANGUAGE GADTs, KindSignatures, FlexibleInstances #
Kind.hs data T :: * -> * where NIL :: T a CONS :: a -> T a -> T a data AbsTree k a = Leaf a | Node (k (AbsTree k a)) data Tree :: (* -> *) -> * -> * where L :: a -> Tree k a N :: k (Tree k a) -> Tree k a type RoseTree a = Tree [] a instance Show a => Show (RoseTree a) where ...
76e5c16f5cdb2dbaaa47b2b1a177953f2b6c05d707a30c0f9813b7f1e564565d
mbutterick/typesetting
text.rkt
#lang debug racket/base (require "core.rkt" "page.rkt" "annotation.rkt" "font.rkt" "vector.rkt" "color.rkt" racket/class racket/match racket/string racket/list sugar/unstable/dict racket/promise fontland/glyph-position) (provide text string-width) #| approximates |# (define (do-horiz-line d...
null
https://raw.githubusercontent.com/mbutterick/typesetting/4220033f3770d1870e0e651ef2e48ac187f0be68/pitfall/pitfall/text.rkt
racket
approximates underline-position field is negative, by convention, so we change the sign that is adjusted for the tracking that would've happened so we can move the text position. Move the text position and flush just the current character If the last character had an offset, reset the text position Group segme...
#lang debug racket/base (require "core.rkt" "page.rkt" "annotation.rkt" "font.rkt" "vector.rkt" "color.rkt" racket/class racket/match racket/string racket/list sugar/unstable/dict racket/promise fontland/glyph-position) (provide text string-width) (define (do-horiz-line doc x y width [underl...
0e9843c0a6fc0671bd690a944efd1e65a8117df119ca83f4fe44e9f69fd010bd
kostyushkin/erlworld
image.erl
%%% %%% Image %%% @author %%% @doc %%% This is for handling image loading and defines the structure of an image. %%% %%% It offers functions for also retrieving the properties of an image, such as %%% it's size. %%% %%% Internally this image actually gets the given graphics device to crea...
null
https://raw.githubusercontent.com/kostyushkin/erlworld/1c55c9eb0d12db9824144b4ff7535960c53e35c8/src/image.erl
erlang
Image @doc This is for handling image loading and defines the structure of an image. It offers functions for also retrieving the properties of an image, such as it's size. Internally this image actually gets the given graphics device to create the image. This is because only the graph...
@author WX and OpenGL calls needed to create the image . -module(image). -author("Joseph Lenton"). -include("image.hrl"). -export([ new/2, get_size/1, get_width/1, get_height/1, destroy/1 ]). ( ) , FileName::string ( ) ) - > Image::image ( ) new(G, FileName)...
0f32592cd8185a90afa0afce0a049e7dddc728a09398ef7f773f35abca196158
coot/ghc-tags-plugin
GhcTags.hs
# LANGUAGE CPP # {-# LANGUAGE BangPatterns #-} # LANGUAGE GADTs # # LANGUAGE NamedFieldPuns # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # OPTIONS_GHC -Wno - incomplete - uni - patterns # module Plugin.GhcTags ( ...
null
https://raw.githubusercontent.com/coot/ghc-tags-plugin/af6a46d205cec67d73ec5f823ff09fda7d3f01cf/ghc-tags-plugin/lib/Plugin/GhcTags.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE RankNTypes # | The GhcTags plugin. It will run for every compiled module and have access to parsed syntax tree. It will inspect it and: * update a global mutable state variable, which stores a tag map. * update 'tags' file. The global mutable variable save u...
# LANGUAGE CPP # # LANGUAGE GADTs # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # OPTIONS_GHC -Wno - incomplete - uni - patterns # module Plugin.GhcTags ( plugin, Options (..) ) where import Control.Exception import ...
49693e97f06fc2066945bea06c232dd494de52c9aea82483d7603cb858a98e43
Javran/advent-of-code
Day25.hs
module Javran.AdventOfCode.Y2022.Day25 ( ) where import Control.Monad import Data.Char import Data.List import Javran.AdventOfCode.Prelude import Text.ParserCombinators.ReadP hiding (count, get, many) data Day25 deriving (Generic) snafuP :: ReadP Int snafuP = do let digitP = ('0' ~> 0) <++ ('1'...
null
https://raw.githubusercontent.com/Javran/advent-of-code/8e86d86fa0020192861e364a4a421329c3a5ddb3/src/Javran/AdventOfCode/Y2022/Day25.hs
haskell
module Javran.AdventOfCode.Y2022.Day25 ( ) where import Control.Monad import Data.Char import Data.List import Javran.AdventOfCode.Prelude import Text.ParserCombinators.ReadP hiding (count, get, many) data Day25 deriving (Generic) snafuP :: ReadP Int snafuP = do let digitP = ('0' ~> 0) <++ ('1'...
ac7c284b6a847eb21990025ffcc6bd6c20f1a25f0b4676e026a51322097a4d30
taylorwood/advent-of-code
19.clj
(ns advent-of-code.2017.19 (:require [clojure.java.io :as io] [clojure.string :as cs])) (def raw-input (slurp (io/resource "data_2017/19.txt"))) (def grid "2D vector of chars in circuit diagram." (->> (cs/split-lines raw-input) (mapv (comp vec seq)))) (defn nth* [coll i & is] (reduce #(nt...
null
https://raw.githubusercontent.com/taylorwood/advent-of-code/c6b08f4b618875a45c8083a04ae2c669626c43bf/src/advent_of_code/2017/19.clj
clojure
turn at intersections collect visited letters and proceed ran out of circuit follow circuit
(ns advent-of-code.2017.19 (:require [clojure.java.io :as io] [clojure.string :as cs])) (def raw-input (slurp (io/resource "data_2017/19.txt"))) (def grid "2D vector of chars in circuit diagram." (->> (cs/split-lines raw-input) (mapv (comp vec seq)))) (defn nth* [coll i & is] (reduce #(nt...
09e6d059682c9d8debc57d5616416849dad2ad2074d507202c1320c3a35d1a38
cojna/iota
HLD.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE RecordWildCards # module Data.Graph.Tree.HLD where import Control.Monad import Control.Monad.ST import Data.Function import qualified Data.Vector.Fusion.Stream.Monadic as MS import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Unboxed.Mutable as UM import Da...
null
https://raw.githubusercontent.com/cojna/iota/6d2ad5b71b1b50bca9136d6ed84f80a0b7713d7c/src/Data/Graph/Tree/HLD.hs
haskell
# LANGUAGE BangPatterns # | Heavy-Light-Decomposition | /O(V)/
# LANGUAGE RecordWildCards # module Data.Graph.Tree.HLD where import Control.Monad import Control.Monad.ST import Data.Function import qualified Data.Vector.Fusion.Stream.Monadic as MS import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Unboxed.Mutable as UM import Data.Graph.Sparse import My.Prel...
81ee22adc0dac652668c4660ba4b95d18d56e12e6f0ae4844267ceea511f37d8
mgree/kmt
decide.ml
open Kat open BatSet open Hashcons open Word (* Decision procedure based on rewriting via normalization *) let decide_log_src = Logs.Src.create "kmt.decide" ~doc:"logs KMT equivalence via normalization" module Log = (val Logs.src_log decide_log_src : Logs.LOG) module Decide (T : THEORY) = ...
null
https://raw.githubusercontent.com/mgree/kmt/f3d96e0922287332f7077c25db49b4ee32ac7f3c/src/decide.ml
ocaml
Decision procedure based on rewriting via normalization module C = CompleteTheory(T) locally unambiguous... same type, but useful as documentation nf insert nf union some weird optimization? MMG Slide Expand ss_with_i = ss no pruning here---if a=0, leave it in and we'll clear it up in the locally_una...
open Kat open BatSet open Hashcons open Word let decide_log_src = Logs.Src.create "kmt.decide" ~doc:"logs KMT equivalence via normalization" module Log = (val Logs.src_log decide_log_src : Logs.LOG) module Decide (T : THEORY) = struct module K = T.K type nf_elt = K.Test.t * K.Term.t ...
df3e8e6504d6319aee94c97781d9562891a08eac289769139f2952a0f3c74948
amnh/PCG
NetworkUnitTests.hs
----------------------------------------------------------------------------- -- | Module : Bio . Graph . ReferenceDAG.Test . NetworkUnitTests Copyright : ( c ) 2015 - 2021 Ward Wheeler -- License : BSD-style -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -------...
null
https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/core/data-structures/test/Bio/Graph/ReferenceDAG/Test/NetworkUnitTests.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style Maintainer : Stability : provisional Portability : portable --------------------------------------------------------------------------- # LANGUAGE LambdaCase # | Test-suite of property-based test...
Module : Bio . Graph . ReferenceDAG.Test . NetworkUnitTests Copyright : ( c ) 2015 - 2021 Ward Wheeler # LANGUAGE OverloadedLists # # LANGUAGE RecordWildCards # # LANGUAGE TypeApplications # module Bio.Graph.ReferenceDAG.Test.NetworkUnitTests ( candidateNetworkEdgesCases ) where import ...
ae26cfd0218412f0f8de0fa0023475a19e206391fb9f8b0365bcacb144c60ca7
racket/redex
contract.rkt
#lang racket ;; a model of contracts in a call-by-value functional language (require redex "common.rkt") ;; ----------------------------------------------------------------------------- ;; syntax (define-language Lambda (e ::= x (lambda (x) e) (e e) n (+ e e) (if0 e e e) (c · e x x) ;; monitor...
null
https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-doc/redex/scribblings/extended-exercises/contract.rkt
racket
a model of contracts in a call-by-value functional language ----------------------------------------------------------------------------- syntax monitor a contract ----------------------------------------------------------------------------- examples -------------------------------------------------------------...
#lang racket (require redex "common.rkt") (define-language Lambda (e ::= x (lambda (x) e) (e e) n (+ e e) (if0 e e e) (blame x)) (n ::= number) (c ::= num? even? odd? pos? (c -> c)) (x ::= variable-not-otherwise-mentioned)) (define a-module (term {(even? -> pos?) · (lambda (x) (+ x 1)) ...
2a84d28d2b4074ec983fdcabdd426eac49cabfa4069c99d01b62d493b533d4ed
hidaris/thinking-dumps
chap2.rkt
#lang racket (require "mk.rkt") ;;; Teaching Old Toys New Tricks (let ((x (lambda (a) a)) (y 'c)) (x y)) ; => 'c (run* (r) (fresh (y x) (== `(,x ,y) r))) ; => '((_.0 _.1)) (run* (r) (fresh (v w) (== (let ((x v) (y w)) `(,x ,y)) r))) ; => '((_.0 _.1)) (car '(grape raisin pear)) ; => 'grape (car...
null
https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/the-little-series/the-reasoned-schemer/chap2.rkt
racket
Teaching Old Toys New Tricks => 'c => '((_.0 _.1)) => '((_.0 _.1)) => 'grape => 'a => '(a) => '(#t) => '(pear) Here is the definition of caro (define caro (lambda (p a) (fresh (d) (== (cons a d) p)))) => '(grape a) => '(grape a) => '(raisin pear) => 'c => '(c) Here is the definition of c...
#lang racket (require "mk.rkt") (let ((x (lambda (a) a)) (y 'c)) (x y)) (run* (r) (fresh (y x) (== `(,x ,y) r))) (run* (r) (fresh (v w) (== (let ((x v) (y w)) `(,x ,y)) r))) (car '(grape raisin pear)) (car '(a c o r n)) (run* (r) (caro '(a c o r n) r)) (run* (q) (caro '(a c o r n) 'a) ...
49cf1c99b44c988e74a8a1a59e8e64e62e5d405619fb298f02873de4330a95b1
takikawa/racket-ppa
find-module-path-completions.rkt
#lang racket/base (require racket/contract/base racket/system racket/port racket/contract racket/list pkg/lib compiler/module-suffix) (define current-library-collection-links-info/c (listof (or/c #f (and/c path? complete-path?) (h...
null
https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/drracket-tool-text-lib/drracket/find-module-path-completions.rkt
racket
these functions just hide filesystem permission errors, but still check that their arguments match the contracts they are supposed to returns a list of all of the directories that are being treated as collections, (together with the names of the collections)
#lang racket/base (require racket/contract/base racket/system racket/port racket/contract racket/list pkg/lib compiler/module-suffix) (define current-library-collection-links-info/c (listof (or/c #f (and/c path? complete-path?) (h...
be5e9a0868c0df6d103324688c09fbd6d614f636d4e98969d463f0d8f2f93e12
dmotz/GildedGauge
scrape.clj
(ns gilded-gauge.scrape (:require [net.cgrand.enlive-html :refer [html-resource select text]] [clojure.core.async :refer [go <!!]] [clojure.string :refer [replace trim]] [clojure.java.io :as io] [clojure.pprint :refer [pprint]]) (:import (java.net HttpURLConnection))...
null
https://raw.githubusercontent.com/dmotz/GildedGauge/16b745c137f13a53ef49affdf7abba5f7a82cf49/scripts/scrape.clj
clojure
(ns gilded-gauge.scrape (:require [net.cgrand.enlive-html :refer [html-resource select text]] [clojure.core.async :refer [go <!!]] [clojure.string :refer [replace trim]] [clojure.java.io :as io] [clojure.pprint :refer [pprint]]) (:import (java.net HttpURLConnection))...
50da161fbd4f4524270310993847cf2271bc2cd654d31f8ebc710115c11f9443
haskell-works/avro
FixedTypes.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE NumDecimals # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGE StandaloneDeriving #...
null
https://raw.githubusercontent.com/haskell-works/avro/aeea12b07a1c6fcc3708d1afe7209c5497665296/test/Avro/Data/FixedTypes.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE DeriveTraversable # # LANGUAGE OverloadedStrings # # LANGUAGE QuasiQuotes # # LANGUAGE RankNTypes # # LANGUAGE StandaloneDeriving #
# LANGUAGE DeriveGeneric # # LANGUAGE NumDecimals # # LANGUAGE ScopedTypeVariables # # LANGUAGE StrictData # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # module Avro.Data.FixedTypes where import Data.Avro.Deriving (deriveAvroFromByteSt...
a7744aa52363c16814ae4d9fd8e5b207b39829e02e748105d14eff8403e0d801
anwarmamat/cmsc330fall20
student.ml
open P4b open OUnit2 open TokenTypes open SmallCTypes open Eval open Utils open TestUtils open EvalUtils let test_sanity _ = assert_equal 1 1 let suite = "student" >::: [ "sanity" >:: test_sanity ] let _ = run_test_tt_main suite
null
https://raw.githubusercontent.com/anwarmamat/cmsc330fall20/1f185a757ad86c37587ec15d580ea0ff728d9472/project4b/test/student/student.ml
ocaml
open P4b open OUnit2 open TokenTypes open SmallCTypes open Eval open Utils open TestUtils open EvalUtils let test_sanity _ = assert_equal 1 1 let suite = "student" >::: [ "sanity" >:: test_sanity ] let _ = run_test_tt_main suite
b3657cc9bd5f9c5978f3d31048fbf806fda40b314f49108dce3b25fa5c1afcdb
jgm/filestore
MercurialCommandServer.hs
{-# LANGUAGE DeriveDataTypeable #-} | Module : Data . FileStore . MercurialCommandServer Copyright : Copyright ( C ) 2011 ( ) License : BSD 3 Maintainer : < > Stability : alpha Portability : GHC 6.10 required In version 1.9 , mercurial introduced a command...
null
https://raw.githubusercontent.com/jgm/filestore/cb1425ef1d3935524ebc566c1bcfae5db1b978c7/Data/FileStore/MercurialCommandServer.hs
haskell
# LANGUAGE DeriveDataTypeable # | Maximum number of servers to keep around | Run a mercurial command and return error status, error output, standard output. The repository is used as working directory. | Run a mercurial command directly without using the server. | Create a new command server for the given reposit...
| Module : Data . FileStore . MercurialCommandServer Copyright : Copyright ( C ) 2011 ( ) License : BSD 3 Maintainer : < > Stability : alpha Portability : GHC 6.10 required In version 1.9 , mercurial introduced a command server which allows a single i...
93ff7554ebeedf90ef378a0b8e403095cb5f331fb7dd646c7a89c2d88d5bc2d4
arcadia-unity/catcon
repl.clj
(ns arcadia.repl (:refer-clojure :exclude [with-bindings]) (:require [clojure.main :as main]) (:import [UnityEngine Debug] [System.IO EndOfStreamException] [System.Collections Queue] [System.Net IPEndPoint IPAddress] [System.Net.Sockets UdpClient] [System.Threading Thread ThreadStart] ...
null
https://raw.githubusercontent.com/arcadia-unity/catcon/6c69f424d3c14639ff11a3ea7d9da6aa81328f8a/Arcadia/Libraries/arcadia/repl.clj
clojure
need some stuff in here about read-eval maybe not sure about this
(ns arcadia.repl (:refer-clojure :exclude [with-bindings]) (:require [clojure.main :as main]) (:import [UnityEngine Debug] [System.IO EndOfStreamException] [System.Collections Queue] [System.Net IPEndPoint IPAddress] [System.Net.Sockets UdpClient] [System.Threading Thread ThreadStart] ...
c2cf1d046013880abc011853f62bf6eb92470f164158cd5427eee1fdbfab58f1
haskell-foundation/foundation
Additive.hs
# LANGUAGE CPP # # LANGUAGE FlexibleInstances # {-# LANGUAGE MagicHash #-} {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE UndecidableInstances # # LANGUAGE DefaultSignatures # # OPTIONS_GHC -fno - prof - auto # module Basement.Numerical.Additive ( Additive(..) ) where #include "MachDep...
null
https://raw.githubusercontent.com/haskell-foundation/foundation/9a2d2a545c3fbdd6c4e4c1d47fd2023bb7cf05de/basement/Basement/Numerical/Additive.hs
haskell
# LANGUAGE MagicHash # # LANGUAGE TypeSynonymInstances # | Represent class of things that can be added together, contains a neutral element and is commutative. > x + azero = x > azero + x = x > x + y = y + x the identity element over addition the addition scale: repeated addition
# LANGUAGE CPP # # LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # # LANGUAGE DefaultSignatures # # OPTIONS_GHC -fno - prof - auto # module Basement.Numerical.Additive ( Additive(..) ) where #include "MachDeps.h" import Basement.Compat.Base import Basement.Com...
e1f88ed7961435f489dd5565b3660f8e8aac585a39c1dcf451d0875c747fc309
ekmett/reactive
Chan.hs
# LANGUAGE CPP # # OPTIONS_GHC -Wall # ----------------------------------------------------------------------------- -- | Module : FRP.Reactive . Internal . Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stab...
null
https://raw.githubusercontent.com/ekmett/reactive/61b20b7a2e92af372b5bd9a2af294db0fbdfa9d8/src/FRP/Reactive/Internal/Chan.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : experimental Portability : non-portable (concurrency) Unbounded channels. ---------------------------------------------------------------...
# LANGUAGE CPP # # OPTIONS_GHC -Wall # Module : FRP.Reactive . Internal . Copyright : ( c ) The University of Glasgow 2001 module FRP.Reactive.Internal.Chan ( * The ' ' type : : IO ( a ) : : a - > IO ( ) : : IO a : : IO ( a ) : : a - > IO ( ) : : IO Bool : ...
5ade3df9eabd7b249f3cd9e676c0428bb8ddde48807642a8b1533554f2546454
clojars/clojars-web
config.clj
{:port 8080 :bind "0.0.0.0" :db {:classname "org.sqlite.JDBC" :subprotocol "sqlite" :subname "data/dev_db"} :base-url ":8080" :repo "data/dev_repo" :deletion-backup-dir "data/dev_deleted_items" :bcrypt-work-factor 12 :mail {:hostname "localhost" :from "" :ssl false} :nrepl-port 7991}...
null
https://raw.githubusercontent.com/clojars/clojars-web/f9bdc3ce08c4debe560c4d8d5a037f2b072eed93/dev-resources/config.clj
clojure
{:port 8080 :bind "0.0.0.0" :db {:classname "org.sqlite.JDBC" :subprotocol "sqlite" :subname "data/dev_db"} :base-url ":8080" :repo "data/dev_repo" :deletion-backup-dir "data/dev_deleted_items" :bcrypt-work-factor 12 :mail {:hostname "localhost" :from "" :ssl false} :nrepl-port 7991}...
daa68f19895d6f6a524190adb55070dace6ef85a5a7924d9c3b8baf7c565103a
muoncore/photon
security.clj
(ns photon.security (:require [buddy.auth :refer [authenticated?]] [buddy.auth.middleware :refer [wrap-authentication]] [buddy.auth.backends.httpbasic :refer [http-basic-backend]] [buddy.hashers :as hashers] [buddy.sign.jwt :as jws] [clojure.tools.logging :a...
null
https://raw.githubusercontent.com/muoncore/photon/622e664f8712de32b9a3c6f3ce2d5e445f31d8b4/src/photon/security.clj
clojure
TODO: Improve security with buddy/hashers
(ns photon.security (:require [buddy.auth :refer [authenticated?]] [buddy.auth.middleware :refer [wrap-authentication]] [buddy.auth.backends.httpbasic :refer [http-basic-backend]] [buddy.hashers :as hashers] [buddy.sign.jwt :as jws] [clojure.tools.logging :a...
78a813ac4159d7dee22795f4e838eaa028a7bec84a68eadc4e567ea5468b4183
codedownio/sandwich
Contexts.hs
# LANGUAGE MonoLocalBinds # -- | Functions for retrieving context information from within tests. module Test.Sandwich.Contexts where import Control.Monad.Reader import GHC.Stack import Test.Sandwich.Types.ArgParsing import Test.Sandwich.Types.RunTree import Test.Sandwich.Types.Spec -- | Get a context by its label....
null
https://raw.githubusercontent.com/codedownio/sandwich/9c8f56b5aee94ba65c70b3e52bde8959010aecc1/sandwich/src/Test/Sandwich/Contexts.hs
haskell
| Functions for retrieving context information from within tests. | Get a context by its label. | Get the root folder of the on-disk test tree for the current run. Will be 'Nothing' if the run isn't configured to use the disk. | Get the on-disk folder corresponding to the current node. Will be 'Nothing' if the ru...
# LANGUAGE MonoLocalBinds # module Test.Sandwich.Contexts where import Control.Monad.Reader import GHC.Stack import Test.Sandwich.Types.ArgParsing import Test.Sandwich.Types.RunTree import Test.Sandwich.Types.Spec getContext :: (Monad m, HasLabel context l a, HasCallStack, MonadReader context m) => Label l a -> m ...
5e062812ed51891809bfa78d267a180d8b5b9ab1fe91f6d8ed012ac19449a0b0
racket/macro-debugger
stepper.rkt
#lang racket/base (require racket/class racket/contract/base racket/class/iop macro-debugger/model/trace "view/interfaces.rkt" "view/view.rkt") (define (create-stepper deriv) (define director (new macro-stepper-director%)) (define stepper (send/i director director<%> ne...
null
https://raw.githubusercontent.com/racket/macro-debugger/d4e2325e6d8eced81badf315048ff54f515110d5/macro-debugger/macro-debugger/stepper.rkt
racket
mutated
#lang racket/base (require racket/class racket/contract/base racket/class/iop macro-debugger/model/trace "view/interfaces.rkt" "view/view.rkt") (define (create-stepper deriv) (define director (new macro-stepper-director%)) (define stepper (send/i director director<%> ne...
9474d164de6b766fde41a9e7afbe7e17a08369da64fb863352068d4423556cb2
Odie/gd-edit
gdd.clj
(ns gd-edit.io.gdd (:require clojure.inspector [clojure.java.io :as io] [gd-edit.io.gdc :as gdc] [gd-edit.structure :as s] [gd-edit.utils :as u]) (:import [java.nio ByteBuffer])) (declare read-block read-block-start read-and-verify-block-end) (def FilePreamble (s/...
null
https://raw.githubusercontent.com/Odie/gd-edit/651d3367dc083f0d678dffe9608c9b5cc12038ad/src/gd_edit/io/gdd.clj
clojure
Tokens block :state :int32 :in-progress :byte :objectives (s/array :int32 :read-length-fn objectives-count :skip-write-length true) Quests block Verify we've reached the expected position Verify we have the correct enc-state at this point _ (u/print-line "Reading bloc...
(ns gd-edit.io.gdd (:require clojure.inspector [clojure.java.io :as io] [gd-edit.io.gdc :as gdc] [gd-edit.structure :as s] [gd-edit.utils :as u]) (:import [java.nio ByteBuffer])) (declare read-block read-block-start read-and-verify-block-end) (def FilePreamble (s/...
f61cbe4ea9eac57bfe26ee32894fc076a4547ae8f3ad42323d846c0cd3646e64
cognitect-labs/vase
service_test.clj
(ns vasebi.service-test (:require [clojure.test :refer :all] [io.pedestal.test :refer :all] [io.pedestal.http :as http] [vasebi.test-helper :as helper] [vasebi.service :as service])) ;; To test your service, call `(helper/service` to get a new service instance. ;; If y...
null
https://raw.githubusercontent.com/cognitect-labs/vase/d882bc8f28e8af2077b55c80e069aa2238f646b7/samples/vasebi/test/vasebi/service_test.clj
clojure
To test your service, call `(helper/service` to get a new service instance. If you need a constant service over multiple calls, use `(helper/with-service ...) All generated services will have randomized, consistent in-memory Datomic DBs if required by the service `helper` also contains shorthands for common `resp...
(ns vasebi.service-test (:require [clojure.test :refer :all] [io.pedestal.test :refer :all] [io.pedestal.http :as http] [vasebi.test-helper :as helper] [vasebi.service :as service])) like GET , POST , , post - edn , and others (deftest about-page-test (helper/w...
80d37020ea61622eae578b1a6863862f2ff911beb80c97aead94eb30b79ae465
Beluga-lang/Beluga
loc.ml
open Support (** A location inside an input stream. *) type t = { line : int (** The line that the parser is on. *) ; offset : int (** The offset that the parser is on inside the file. *) ; bol : int (** The offset at which the current line begins on. *) } let offset l = l.offset let column l = l.offset -...
null
https://raw.githubusercontent.com/Beluga-lang/Beluga/23b6dea4d2f2ba81e2a82a3a57a7ca016757a2e7/src/replay/loc.ml
ocaml
* A location inside an input stream. * The line that the parser is on. * The offset that the parser is on inside the file. * The offset at which the current line begins on.
open Support type t = } let offset l = l.offset let column l = l.offset - l.bol let inc_by_char c loc = { line = (if c = '\n' then loc.line + 1 else loc.line) ; offset = loc.offset + 1 ; bol = (if c = '\n' then loc.offset + 1 else loc.bol) } let initial = { line = 1; offset = 1; bol = 1 } include ((val ...
55fbd9db9f7149bdf2b1b1fa1e208ef52d7ca7869bbf5b46595caf54dae527b7
dzhus/snaplet-redis
RedisDB.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE FlexibleContexts # # LANGUAGE TemplateHaskell # {-# LANGUAGE Rank2Types #-} | Redis DB snaplet . Redis DB snaplet. -} module Snap.Snaplet.RedisDB (RedisDB(..) , runRedisDB , redisConnection , redisDBInit , redisDBInitConf) where import Contro...
null
https://raw.githubusercontent.com/dzhus/snaplet-redis/e6ae02a7b06aaf23fd6ad1af598ad59b5e4d3c5a/src/Snap/Snaplet/RedisDB.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE Rank2Types # ^ DB connection pool. | Instance to allow port to be either a path to a unix socket or a port number. | A lens to retrieve the connection to Redis from the 'RedisDB' wrapper. > runRedisDB database $ do > set "hello" "world" the application config (e.g. ....
# LANGUAGE FlexibleContexts # # LANGUAGE TemplateHaskell # | Redis DB snaplet . Redis DB snaplet. -} module Snap.Snaplet.RedisDB (RedisDB(..) , runRedisDB , redisConnection , redisDBInit , redisDBInitConf) where import Control.Lens import Control.Monad.State import Database.Redis hiding...
d510d51de1aeeee5be7d9eea8967bcab82302205905da0413c2f56be2c0f2960
xapi-project/xen-api
context.ml
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
null
https://raw.githubusercontent.com/xapi-project/xen-api/48cc1489fff0e344246ecf19fc1ebed6f09c7471/ocaml/xapi/context.ml
ocaml
* Every operation has an origin: either the HTTP connection it came from or an internal subsystem (eg synchroniser thread / event handler thread) * A Context is used to represent every API invocation. It may be extended to include extra data without changing all the autogenerated signatures * Calls coming...
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
18a7bd408062abd888782bcfea58b623d1cd47921ce13a1305f5d59aa46eb4b5
slyrus/abcl
install.lisp
(in-package :cl-user) (prove:plan 1) (prove:ok (abcl/build:xdg/abcl-install-root #P"-ant-1.9.4-bin.zip")) (prove:plan 2) (let ((path (ext:make-temp-directory)) (uri #p"-eu.apache.org/dist/ant/binaries/apache-ant-1.10.7-bin.zip")) (prove:diag (format nil "Testing binary unzip installation of~%~,2t<~a>~%to...
null
https://raw.githubusercontent.com/slyrus/abcl/881f733fdbf4b722865318a7d2abe2ff8fdad96e/contrib/abcl-build/build/t/install.lisp
lisp
(in-package :cl-user) (prove:plan 1) (prove:ok (abcl/build:xdg/abcl-install-root #P"-ant-1.9.4-bin.zip")) (prove:plan 2) (let ((path (ext:make-temp-directory)) (uri #p"-eu.apache.org/dist/ant/binaries/apache-ant-1.10.7-bin.zip")) (prove:diag (format nil "Testing binary unzip installation of~%~,2t<~a>~%to...
fc84a613b20fac20e740a1f662d423135ae030df18566d50c0e0cd4bfc839c44
neongreen/haskell-ex
Main.hs
data Expr = Number Int | Add Expr Expr | Sub Expr Expr | Mul Expr Expr | Div Expr Expr showExpr :: Expr -> String showExpr expr = case expr of Add e1 e2 -> showExpr e1 ++ "+" ++ showExpr e2 Sub e1 e2 -> showExpr e1 ++ "-" ++ parenExpr e2 Mul e1 e2 -> parenExpr e1 ++ "*" ++ parenExpr e2 D...
null
https://raw.githubusercontent.com/neongreen/haskell-ex/345115444fdf370a43390fd942e2851b9b1963ad/week3/expr/thalesmg/Main.hs
haskell
data Expr = Number Int | Add Expr Expr | Sub Expr Expr | Mul Expr Expr | Div Expr Expr showExpr :: Expr -> String showExpr expr = case expr of Add e1 e2 -> showExpr e1 ++ "+" ++ showExpr e2 Sub e1 e2 -> showExpr e1 ++ "-" ++ parenExpr e2 Mul e1 e2 -> parenExpr e1 ++ "*" ++ parenExpr e2 D...
3debeb98079ec9f3bfddeccaff3ec25495757ad470d3abb0cfa4f8d519f161ab
mzp/coq-ruby
protectedtoplevel.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/toplevel/protectedtoplevel.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i i
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : protectedtoplevel...
f204381b78d6fabaf4c5b181d924372c100399041b69579be4fca3c21e22e3b3
static-analysis-engineering/codehawk
bCHDataBlock.mli
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Co...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/dd2c3b9f84b4b5f3c88898505ee912e1e461e809/CodeHawk/CHB/bchlib/bCHDataBlock.mli
ocaml
chutil bchlib
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Co...
8a7b524dc664d3763a165080d335714efacd5f4a9fc1e8bbef5780201ee9aa05
IBM/wcs-ocaml
ws_cond.ml
* This file is part of the Watson Conversation Service OCaml API project . * * Copyright 2016 - 2017 IBM Corporation * * 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...
null
https://raw.githubusercontent.com/IBM/wcs-ocaml/b237b7057f44caa09d36e466be015e2bc3173dd5/examples/rulebot/src/workspaces/ws_cond.ml
ocaml
* This file is part of the Watson Conversation Service OCaml API project . * * Copyright 2016 - 2017 IBM Corporation * * 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...
77e02ad301201a36a89c2d0a935a2b82a54fed1289734402bd765d8caa8de28c
haskell-opengl/OpenGLRaw
ConvolutionBorderModes.hs
# LANGUAGE PatternSynonyms # -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.SUN.ConvolutionBorderModes Copyright : ( c ) 2019 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- ---------...
null
https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/SUN/ConvolutionBorderModes.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.GL.SUN.ConvolutionBorderModes License : BSD3 Stability : stable Portability : portable ------------------------------------------------------------------------------ * Extension Support * Enums
# LANGUAGE PatternSynonyms # Copyright : ( c ) 2019 Maintainer : < > module Graphics.GL.SUN.ConvolutionBorderModes ( glGetSUNConvolutionBorderModes, gl_SUN_convolution_border_modes, pattern GL_WRAP_BORDER_SUN ) where import Graphics.GL.ExtensionPredicates import Graphics.GL.Tokens
7a759b25b0c45d42c1fe81cb55487512c588137fb91e9aa2f9f2498ab32bc32a
eproxus/meck
meck_ret_spec_tests.erl
%%%============================================================================ Copyright 2010 - 2017 , 2010 - 2011 Erlang Solutions Ltd %%% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %%% you may not use this file except in compliance with the License. %%% You may obtain a copy of the L...
null
https://raw.githubusercontent.com/eproxus/meck/3efce27e01fcb442f0ec7dc3af587745510fdc19/test/meck_ret_spec_tests.erl
erlang
============================================================================ you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expr...
Copyright 2010 - 2017 , 2010 - 2011 Erlang Solutions Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(meck_ret_spec_tests). -include_lib("eunit/include/eunit.hrl"). ret_spec_test_() -> {foreach, fun setup...
8af63ae9d432f78215a7d367be3e9eedaedbdf5d87278c3349d930761652ee44
dterei/SafeHaskellExamples
Untrusted.hs
{-# LANGUAGE Safe #-} -- | Untrusted client code. module Untrusted where import TypeClassSafe -- CAN'T DO -- import TypeClassUnsafe import ReexportInstances run :: Int -> Int run x = x * (same 2) runB :: Bool -> Bool -- runB b = not b -- CAN'T DO (unless import ReexportInstances..., but doesn't matter what modul...
null
https://raw.githubusercontent.com/dterei/SafeHaskellExamples/0f7bbb53cf1cbb8419ce3a4aa4258b84be30ffcc/typeclasses/Untrusted.hs
haskell
# LANGUAGE Safe # | Untrusted client code. CAN'T DO import TypeClassUnsafe runB b = not b CAN'T DO (unless import ReexportInstances..., but doesn't matter what XXX can't access the 'escape' symbol without importing something that exports it (which is an explicit act unlike instances). runI i = escape (bad i)
module Untrusted where import TypeClassSafe import ReexportInstances run :: Int -> Int run x = x * (same 2) runB :: Bool -> Bool modules importing Untrusted have access to ) runB b = not (same b) runI :: Int -> Int runI i = i + 4 CAN'T DO as while ReexportInstances gives us access to instances , we still ba...
468c0cdaf6603e4ba73926a7272b70cd838ae709f6ed41493119b48737a7b49a
maybevoid/casimir
Computation.hs
module Casimir.Computation ( BaseComputation , Computation (..) , OpsHandler , FunctorComp (..) , Return (..) , Arrow (..) , ReturnCtx (..) , Pipeline (..) , BasePipeline , TransformerHandler (..) , BaseOpsHandler , SimplePipeline , GenericPipeline , genericComputation , genericReturn , ...
null
https://raw.githubusercontent.com/maybevoid/casimir/ebbfa403739d6f258e6ac6793549006a0e8bff42/casimir/src/lib/Casimir/Computation.hs
haskell
module Casimir.Computation ( BaseComputation , Computation (..) , OpsHandler , FunctorComp (..) , Return (..) , Arrow (..) , ReturnCtx (..) , Pipeline (..) , BasePipeline , TransformerHandler (..) , BaseOpsHandler , SimplePipeline , GenericPipeline , genericComputation , genericReturn , ...
d1fce4b7670fde6c93b8bd8b2c62e193d9680fa5ad9fbf9b93d657a9a8cf1b83
KaroshiBee/weevil
mdb_stepper_config.mli
type t val setup_mockup_rpc_client_config : base_dir:string -> Tezos_client_base.Client_context.printer -> Tezos_crypto.Protocol_hash.t option -> t tzresult Lwt.t val chain_id : t -> Tezos_crypto.Chain_id.t val mock_context : t -> Tezos_client_base_unix.Client_context_unix.unix_mockup val make_alpha_context ...
null
https://raw.githubusercontent.com/KaroshiBee/weevil/ddb8d0fa8618db3ed2a7eaf4f635200e7a1cc8b6/bin/weevil_mdb_011/src/mdb_stepper_config.mli
ocaml
type t val setup_mockup_rpc_client_config : base_dir:string -> Tezos_client_base.Client_context.printer -> Tezos_crypto.Protocol_hash.t option -> t tzresult Lwt.t val chain_id : t -> Tezos_crypto.Chain_id.t val mock_context : t -> Tezos_client_base_unix.Client_context_unix.unix_mockup val make_alpha_context ...
9dbdb04502e8576bf6db7935bba94d0fc82bc3e04f9221267015d32fccc027a0
mchakravarty/lazy-lambda
Pipes.hs
module Pipes where import Graphics.SpriteKit import Actions import Constants import Convenience import GameState (pipeUpTexture, pipeUpWidth, pipeUpHeight) = defineTexture "PipeUp.png" (pipeDownTexture, pipeDownWidth, pipeDownHeight) = defineTexture "PipeDown.png" spawnPipePair :: GFloat -> LambdaNode -> T...
null
https://raw.githubusercontent.com/mchakravarty/lazy-lambda/ccdde0d3e54525ef580d483a28562985519224aa/LazyLambda.hsproj/Pipes.hs
haskell
module Pipes where import Graphics.SpriteKit import Actions import Constants import Convenience import GameState (pipeUpTexture, pipeUpWidth, pipeUpHeight) = defineTexture "PipeUp.png" (pipeDownTexture, pipeDownWidth, pipeDownHeight) = defineTexture "PipeDown.png" spawnPipePair :: GFloat -> LambdaNode -> T...
8b4a1073a4ebe330ac7679a28e4c0a99b15a249b41a716373b31ab761f631ae2
stylewarning/cl-permutation
utilities.lisp
;;;; utilities.lisp Copyright ( c ) 2011 - 2014 Various portable utilities used in CL - PERMUTATION . (in-package #:cl-permutation) (deftype vector-size (&key (down-by 0)) "Possible sizes of a vector." (check-type down-by (integer 0 #.array-total-size-limit)) `(integer 0 ,(- array-total-size-limit down-b...
null
https://raw.githubusercontent.com/stylewarning/cl-permutation/631b17541ad9fb5e2fbf89b09bc0d5a98d718e1c/src/utilities.lisp
lisp
utilities.lisp Queue Implementation from tarballs_are_good/lisp-random/stack-queue.lisp reference to the singleton list is shared by both QUEUE-ELEMENTS and QUEUE-LAST. We can now append elements to QUEUE-ELEMENTS simply by modifying QUEUE-LAST, whose reference is shared by QUEUE-ELEMENTS, QUEUE-LAST. Member...
Copyright ( c ) 2011 - 2014 Various portable utilities used in CL - PERMUTATION . (in-package #:cl-permutation) (deftype vector-size (&key (down-by 0)) "Possible sizes of a vector." (check-type down-by (integer 0 #.array-total-size-limit)) `(integer 0 ,(- array-total-size-limit down-by))) (deftype vecto...
df5742303682032eea736e438d0b62f6d4671e56c4d52a421eeef25b96e966f8
rbkmoney/erlang_capi_v2
capi_client_categories.erl
-module(capi_client_categories). -export([get_categories/1]). -export([get_category_by_ref/2]). -type context() :: capi_client_lib:context(). -spec get_categories(context()) -> {ok, term()} | {error, term()}. get_categories(Context) -> {Url, PreparedParams, Opts} = capi_client_lib:make_request(Context, #{}), ...
null
https://raw.githubusercontent.com/rbkmoney/erlang_capi_v2/438d0a603475c57dddade8c419f0d70fdf86438d/apps/capi_client/src/capi_client_categories.erl
erlang
-module(capi_client_categories). -export([get_categories/1]). -export([get_category_by_ref/2]). -type context() :: capi_client_lib:context(). -spec get_categories(context()) -> {ok, term()} | {error, term()}. get_categories(Context) -> {Url, PreparedParams, Opts} = capi_client_lib:make_request(Context, #{}), ...
e9674f6e879993c78c6df5cf6c4bba08c74409293599949dd5753e34f246d93c
RolfRolles/PandemicML
Main.ml
let string_of_type_decl f_base e = let open TypeDecl in let rec aux = function | Type(a) -> f_base a | Arrow(l,r) -> (aux l)^" -> "^(aux r) | Tuple(l,r) -> "("^(aux l)^" * "^(aux r)^")" in aux e let string_of_variant f_variant f_base = function | v,TypeDecl.NoRecord -> f_variant v | v,TypeDecl.Reco...
null
https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/Projects/Compiler/Main.ml
ocaml
let string_of_type_decl f_base e = let open TypeDecl in let rec aux = function | Type(a) -> f_base a | Arrow(l,r) -> (aux l)^" -> "^(aux r) | Tuple(l,r) -> "("^(aux l)^" * "^(aux r)^")" in aux e let string_of_variant f_variant f_base = function | v,TypeDecl.NoRecord -> f_variant v | v,TypeDecl.Reco...
4f6f2292e005906f7169fccba472c5bc7faf2973043e166abdbc816bcab4b182
troy-west/wire
wire.clj
(ns troy-west.wire " ## Description A small Clojure library for explicitly wiring together functions into declarative computation graphs. This approach has some similarities to [Dataflow Programming](). Unlike Dataflow Programming this library simply provides an approach to composing pure functions, it ...
null
https://raw.githubusercontent.com/troy-west/wire/75f4d323902039cd52aaf668a2d5dabd86ab94fd/src/troy_west/wire.clj
clojure
(ns troy-west.wire " ## Description A small Clojure library for explicitly wiring together functions into declarative computation graphs. This approach has some similarities to [Dataflow Programming](). Unlike Dataflow Programming this library simply provides an approach to composing pure functions, it ...
ddd20b3744b6b741e1e253a4ebcbf68265c933ea795caef7a73b386a1597a79f
PacktWorkshops/The-Clojure-Workshop
core.cljs
(ns ^:figwheel-hooks hello-clojurescript.core (:require [goog.dom :as gdom] [rum.core :as rum])) (println "This text is printed from src/hello_clojurescript/core.cljs. Go ahead and edit it and see reloading in action.") ;; define your app data so that it doesn't get over-written on reload (defonce app-state (...
null
https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter09/tests/Exercise9.08/hello-clojurescript.core/src/hello_clojurescript/core.cljs
clojure
define your app data so that it doesn't get over-written on reload (rum/defc hello-world [] [:div [:h3 "Edit this in src/hello_clojurescript/core.cljs and watch it change!"]]) conditionally start your application based on the presence of an "app" element this is particularly helpful for testing this ns without ...
(ns ^:figwheel-hooks hello-clojurescript.core (:require [goog.dom :as gdom] [rum.core :as rum])) (println "This text is printed from src/hello_clojurescript/core.cljs. Go ahead and edit it and see reloading in action.") (defonce app-state (atom {:text "Hello world!" :counter 0})) (defn get-app-element [] (...
abe95c662c50e6abe1a73f4bcc399ba243fc5b434d3833cb62fc9e0913857b2c
sharplispers/clawk
packages.lisp
-*- Mode : Lisp ; Syntax : Common - Lisp ; Base : 10 -*- (defpackage CLAWK #+:Genera (:use COMMON-LISP CLOS REGEX) #-:Genera (:use COMMON-LISP REGEX) #+:Genera (:import-from "SCL" DEFINE-SYMBOL-MACRO) (:export ;; install the #/../ reader "INSTALL-REGEX-SYNTAX" ;; convert any accepted represen...
null
https://raw.githubusercontent.com/sharplispers/clawk/3a91634df686417114044a98c063cbe76bfac7b6/packages.lisp
lisp
Syntax : Common - Lisp ; Base : 10 -*- install the #/../ reader convert any accepted representation of a pattern into a compiled pattern Specials Handy macros iterate across a stream or file, evaluating the body for each line iterate across a stream or file, splitting the lines and evaluating the body...
(defpackage CLAWK #+:Genera (:use COMMON-LISP CLOS REGEX) #-:Genera (:use COMMON-LISP REGEX) #+:Genera (:import-from "SCL" DEFINE-SYMBOL-MACRO) (:export "INSTALL-REGEX-SYNTAX" "GET-MATCHER-FOR-PATTERN" "*CURFILE*" "*CURLINE*" "*FS*" "*RSTART*" "*RLENGTH*" "*REND*" "*REGS*" "*FIELDS*" "*...
f2ac50464f5d772865c405eac713b38b1e2d5b222032e2fbd28f68e157480e13
titola/incudine
play-function.lisp
(in-package :incudine-tests) (enable-sharp-square-bracket-syntax) (let ((x 0)) (declare (fixnum x)) (defun noise-func-init (node) (setf x 12345) node) (defun noise-func-test () (declare (optimize speed (safety 0))) (setf x (logand (+ 17711 (* x 9227465)) #xffffff)) (incf (audio-out 0) (* (- ...
null
https://raw.githubusercontent.com/titola/incudine/325174a54a540f4daa67bcbb29780073c35b7b80/tests/play-function.lisp
lisp
(in-package :incudine-tests) (enable-sharp-square-bracket-syntax) (let ((x 0)) (declare (fixnum x)) (defun noise-func-init (node) (setf x 12345) node) (defun noise-func-test () (declare (optimize speed (safety 0))) (setf x (logand (+ 17711 (* x 9227465)) #xffffff)) (incf (audio-out 0) (* (- ...
5b3dfef5913a7d92d7174a01b0134d342b7546a51e46d2736fcdd09a2dc2b987
re-ops/re-core
cog.clj
(ns re-mote.repl.cog "Running re-cog functions on hosts" (:require [taoensso.timbre :refer (refer-timbre)] [com.rpl.specter :refer (ALL MAP-VALS transform select multi-path filterer)] [re-mote.zero.pipeline :refer (run-hosts)] [re-cog.plan :refer (execution-plan)] re-mote.repl.base) (:import [re_mo...
null
https://raw.githubusercontent.com/re-ops/re-core/077fe28c972ccc03459d29dcf9f0d150f66fa5c7/src/re_mote/repl/cog.clj
clojure
(ns re-mote.repl.cog "Running re-cog functions on hosts" (:require [taoensso.timbre :refer (refer-timbre)] [com.rpl.specter :refer (ALL MAP-VALS transform select multi-path filterer)] [re-mote.zero.pipeline :refer (run-hosts)] [re-cog.plan :refer (execution-plan)] re-mote.repl.base) (:import [re_mo...
7c9bb13579a2afa447c95527bc3d19fecb667dbd910dd2aae21ae60c6893b6bf
Dasudian/DSDIN
dsdo_register_tx.erl
-module(dsdo_register_tx). -include("oracle_txs.hrl"). -behavior(dsdtx). %% Behavior API -export([new/1, type/0, fee/1, ttl/1, nonce/1, origin/1, check/5, process/5, accounts/1, signers/2, serialization_template/1, se...
null
https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/dsdoracle/src/dsdo_register_tx.erl
erlang
Behavior API Additional getters Account should exist, and have enough funds for the fee. swagger schema name -- Local functions -------------------------------------------------------
-module(dsdo_register_tx). -include("oracle_txs.hrl"). -behavior(dsdtx). -export([new/1, type/0, fee/1, ttl/1, nonce/1, origin/1, check/5, process/5, accounts/1, signers/2, serialization_template/1, serialize/1, ...
0ce52757f73514343efe8811fccfc646621b579e061e73236bfe0979055f800f
oliyh/martian
yaml.clj
(ns martian.yaml "Handle OpenAPI specs in YAML." (:require [clojure.walk :as w] [clojure.string :as string] [clj-yaml.core :as yaml])) NOTE : Currently only for CLJ (defn yaml-url? "Predicate that returns true if the `url` has a YAML extension. False otherwise." [url] (boolean (o...
null
https://raw.githubusercontent.com/oliyh/martian/adc961c07f17a1b313d6408ec6bdee1a1ee22096/core/src/martian/yaml.clj
clojure
See -commons/clj-yaml/pull/18 make sure all the keys of maps are keywords, including keys that were numbers See -commons/clj-yaml/blob/master/src/clojure/clj_yaml/core.clj#L128-L129 otherwise do nothing
(ns martian.yaml "Handle OpenAPI specs in YAML." (:require [clojure.walk :as w] [clojure.string :as string] [clj-yaml.core :as yaml])) NOTE : Currently only for CLJ (defn yaml-url? "Predicate that returns true if the `url` has a YAML extension. False otherwise." [url] (boolean (o...
866891bfa85312321f4c7e57652d5bfcfa00e5c54e0379f309c48b6f34c1747e
FreeAndFair/STAR-Vote
Voter.hs
# LANGUAGE DeriveDataTypeable , TemplateHaskell # module Application.Star.Voter where import Control.Lens.TH import Data.SafeCopy import Data.Typeable import qualified Data.Text as T data Voter = Voter { _voterName :: T.Text , _voterAddress :: T.Text } deriving (Read, Show, Typeable) $(deriveSafeCopy 0 'bas...
null
https://raw.githubusercontent.com/FreeAndFair/STAR-Vote/2555cbae8794ec6f34889fdabac314ff9f22b437/star-types/src/Application/Star/Voter.hs
haskell
# LANGUAGE DeriveDataTypeable , TemplateHaskell # module Application.Star.Voter where import Control.Lens.TH import Data.SafeCopy import Data.Typeable import qualified Data.Text as T data Voter = Voter { _voterName :: T.Text , _voterAddress :: T.Text } deriving (Read, Show, Typeable) $(deriveSafeCopy 0 'bas...
42e84686ea88840d907c872fb2ee88ee4782810f240e6cb89e2c5a59cfae0687
dannypsnl/plt-research
main.rkt
#lang racket (require (for-syntax syntax/parse)) (begin-for-syntax without begin - for - syntax , the define - syntax - class would define in phase 0(runtime ) . begin - for - syntax lift it to phase 1 (define-syntax-class foo (pattern (a b c)))) (define-syntax (macro stx) (syntax-parse stx ;; thus `f:...
null
https://raw.githubusercontent.com/dannypsnl/plt-research/1776291ce867fad951b563e43d3bde50c7f1ebd3/racket/macro/main.rkt
racket
thus `f:foo` can reference to foo class
#lang racket (require (for-syntax syntax/parse)) (begin-for-syntax without begin - for - syntax , the define - syntax - class would define in phase 0(runtime ) . begin - for - syntax lift it to phase 1 (define-syntax-class foo (pattern (a b c)))) (define-syntax (macro stx) (syntax-parse stx [(_ f:foo) ...
d7d0ced973b943360a0c3a3c6db903df3dc8592bfd69fecf434139da15f8e165
ocsigen/ocaml-eliom
quicksort.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/misc-unsafe/quicksort.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the let rec qsort lo hi (a : int array) = if lo < hi then begin let i = ref lo in let j = ref hi i...
8e263d61dd5e878ae6ad220b4f557b479cd5202e415af9058fb5687388aa7958
ArulselvanMadhavan/haskell-first-principles
registeredUser1.hs
module RegisteredUser where newtype Username = Username String newtype AccountNumber = AccountNumber Integer data User = UnregisteredUser | RegisteredUser Username AccountNumber printUser :: User -> IO() printUser UnregisteredUser = putStrLn "UnregisteredUser" printUser (RegisteredUser (Username name) ...
null
https://raw.githubusercontent.com/ArulselvanMadhavan/haskell-first-principles/06e0c71c502848c8e75c8109dd49c0954d815bba/chapter7/src/registeredUser1.hs
haskell
module RegisteredUser where newtype Username = Username String newtype AccountNumber = AccountNumber Integer data User = UnregisteredUser | RegisteredUser Username AccountNumber printUser :: User -> IO() printUser UnregisteredUser = putStrLn "UnregisteredUser" printUser (RegisteredUser (Username name) ...
e9f65a5cd71d364e79a1b667b317c76c6549e5287063f4efd84542db1353a2f2
ghc/packages-Cabal
Bar.hs
main = putStrLn "Hello Bar"
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/NewBuild/CmdBench/MultipleBenchmarks/Bar.hs
haskell
main = putStrLn "Hello Bar"
3c297f4c1ab810e6e8af1f38a84db2182e93fed953593fee5cc5573e715e301c
hopv/MoCHi
refTyp.ml
open Util open Combinator (** Refinement types *) type t = | Base of Idnt.t * Type.t * Formula.t | Fun of Idnt.t * t * t * (Idnt.t * Formula.t) * { 6 Printers } let rec pr_bind ppf (x, rty) = Format.fprintf ppf "(%a : %a)" Idnt.pr x pr rty and pr ppf rty = match rty with | Base(x, ty, t) -> Format.fprin...
null
https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/fpat/refTyp.ml
ocaml
* Refinement types @todo let r1 = para f rty1 in let r2 = para f rty2 in f#farrow x rty1 r1 rty2 r2 y phi @todo @todo
open Util open Combinator type t = | Base of Idnt.t * Type.t * Formula.t | Fun of Idnt.t * t * t * (Idnt.t * Formula.t) * { 6 Printers } let rec pr_bind ppf (x, rty) = Format.fprintf ppf "(%a : %a)" Idnt.pr x pr rty and pr ppf rty = match rty with | Base(x, ty, t) -> Format.fprintf ppf "@[<hov>"; (i...
b8bfcd6255987ee38e611bf511b67218384a7198177a8aa709c4f8d4a49de93a
hannesm/patch
patch.ml
module String = struct let is_prefix ~prefix str = let pl = String.length prefix in if String.length str < pl then false else String.sub str 0 (String.length prefix) = prefix let cut sep str = try let idx = String.index str sep and l = String.length str in let si...
null
https://raw.githubusercontent.com/hannesm/patch/1d09bbf317519e200e7925b9d9f64ead6bbdd320/src/patch.ml
ocaml
input being "?19,23" input: "@@ -19,23 +19,12 @@ bla" diff: 'No newline at end of file' turns out to be context-sensitive so: -xxx\n\\No newline... means mine didn't have a newline but +xxx\n\\No newline... means theirs doesn't have a newline even if create/delete, /dev/null is not used in this header acco...
module String = struct let is_prefix ~prefix str = let pl = String.length prefix in if String.length str < pl then false else String.sub str 0 (String.length prefix) = prefix let cut sep str = try let idx = String.index str sep and l = String.length str in let si...
9f6b158d0039fa2aee23937dc1961f198e1d8252be55d8ff19fcfeaa7f2ad66c
lascar-pacagi/MiniJava
print_tokens.mli
* Prints the tokens of the source file on an output channel . (** [print out lexbuf show_loc] prints the tokens obtained from [lexbuf] on the [out] channel. If [show_loc] is true, prints position informations too. *) val print: out_channel -> Lexing.lexbuf -> bool -> unit
null
https://raw.githubusercontent.com/lascar-pacagi/MiniJava/9ac4e851667421ea92e9924bc374b4b450387e56/print_tokens.mli
ocaml
* [print out lexbuf show_loc] prints the tokens obtained from [lexbuf] on the [out] channel. If [show_loc] is true, prints position informations too.
* Prints the tokens of the source file on an output channel . val print: out_channel -> Lexing.lexbuf -> bool -> unit
fecf42166078790374b21c480a1b33bd988556534a1f259cfd21c24140149914
griffinbank/titan
project.clj
(defproject titan-app/lein-template "0.1.0-minor1" :description "A Leiningen template for a Titan web application." :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :eval-in-leiningen true)
null
https://raw.githubusercontent.com/griffinbank/titan/990a7ab083ad1e6680f8f088ce43a095194b376a/template/project.clj
clojure
(defproject titan-app/lein-template "0.1.0-minor1" :description "A Leiningen template for a Titan web application." :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :eval-in-leiningen true)
05e392625008cf4e32b486f761223f7490392138d78988272ee79a05d00942a6
SchornacklabSLCU/amfinder
imgBrush.mli
AMFinder - img / imgBrush.mli * * MIT License * Copyright ( c ) 2021 * * Permission is hereby granted , free of charge , to any person obtaining a copy * of this software and associated documentation files ( the " Software " ) , to * deal in the Software without restriction , including without ...
null
https://raw.githubusercontent.com/SchornacklabSLCU/amfinder/1053045b431b9e9e85a7bcebea2e38cda92a8dcd/amfbrowser/sources/img/imgBrush.mli
ocaml
* Image drawing functions. * Returns tile size. * Returns drawing origin on X axis. * Returns drawing origin on Y axis. * Registers a function to update the overall view. * Ensure the given tile is within the visible window. * @return True when drawing has to be updated. * Returns the range of visible rows....
AMFinder - img / imgBrush.mli * * MIT License * Copyright ( c ) 2021 * * Permission is hereby granted , free of charge , to any person obtaining a copy * of this software and associated documentation files ( the " Software " ) , to * deal in the Software without restriction , including without ...
3022141726cc8e386104386ab0170f514e2b495c692168618f47ea4bbdbde586
vincent-hugot/qtest
Runner_test.ml
let passing = QCheck.Test.make ~count:1000 ~name:"list_rev_is_involutive" QCheck.(list small_int) (fun l -> List.rev (List.rev l) = l);; let failing = QCheck.(Test.make ~count:10 ~name:"failing_test" (list small_int) (fun l -> l = List.sort compare l));; let () = let _ = QChe...
null
https://raw.githubusercontent.com/vincent-hugot/qtest/77ce69df3ff40d1e611ca2a636892cf516e395a4/tests/Runner_test.ml
ocaml
let passing = QCheck.Test.make ~count:1000 ~name:"list_rev_is_involutive" QCheck.(list small_int) (fun l -> List.rev (List.rev l) = l);; let failing = QCheck.(Test.make ~count:10 ~name:"failing_test" (list small_int) (fun l -> l = List.sort compare l));; let () = let _ = QChe...
8fa8d85eb917eddbe5a6d80bcc62f702cde13d11686dd91dd0d5ea4b95219342
fetburner/compelib
pArray.mli
(* persistent array *) type 'a t val init : int -> (int -> 'a) -> 'a t val make : int -> 'a -> 'a t val of_list : 'a list -> 'a t val get : 'a t -> int -> 'a val set : 'a t -> int -> 'a -> 'a t (* [set a n x] returns a persistent array replacing element number [n] of [a] with [x]. [a] is not modified. *) val length...
null
https://raw.githubusercontent.com/fetburner/compelib/d8fc5d9acd04e676c4d4d2ca9c6a7140f1b85670/lib/container/pArray.mli
ocaml
persistent array [set a n x] returns a persistent array replacing element number [n] of [a] with [x]. [a] is not modified.
type 'a t val init : int -> (int -> 'a) -> 'a t val make : int -> 'a -> 'a t val of_list : 'a list -> 'a t val get : 'a t -> int -> 'a val set : 'a t -> int -> 'a -> 'a t val length : 'a t -> int val to_list : 'a t -> 'a list val iter : ('a -> unit) -> 'a t -> unit val iteri : (int -> 'a -> unit) -> 'a t -> unit val f...