_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
2e8dbc226a03ccea8fc16959aaf2960273ac2938acae58bfd128571cffa56a23
haskell-mafia/mafia
Arbitrary.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # # OPTIONS_GHC -fno - warn - missing - signatures # # OPTIONS_GHC -fno - warn - orphans # module Test.Mafia.Arbitrary where import qualified Data.List as DL import qualified Data.Text as T import Hedgehog.Corpus (m...
null
https://raw.githubusercontent.com/haskell-mafia/mafia/529440246ee571bf1473615e6218f52cd1e990ae/test/Test/Mafia/Arbitrary.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE NoImplicitPrelude # # LANGUAGE TemplateHaskell # # OPTIONS_GHC -fno - warn - missing - signatures # # OPTIONS_GHC -fno - warn - orphans # module Test.Mafia.Arbitrary where import qualified Data.List as DL import qualified Data.Text as T import Hedgehog.Corpus (muppets, cooking) import ...
4cf89bedd190ecc35577ac54cd87db63463e0fede4dd46e996fe698c159c9668
mindreframer/clojure-stuff
services.clj
(ns puppetlabs.trapperkeeper.services (:require [clojure.tools.macro :refer [name-with-attributes]] [clojure.set :refer [difference]] [plumbing.core :refer [fnk]] [schema.core :as schema] [plumbing.graph :as g] [puppetlabs.kitchensink.core :refer [select-val...
null
https://raw.githubusercontent.com/mindreframer/clojure-stuff/1e761b2dacbbfbeec6f20530f136767e788e0fe3/github.com/puppetlabs/trapperkeeper/src/puppetlabs/trapperkeeper/services.clj
clojure
Look into re-using an existing protocol for the life cycle instead of creating our own; just didn't want to introduce the dependency for now. this should be a vector of vectors. service map for prismatic graph arguments list to specify an explicit output schema for the fnk
(ns puppetlabs.trapperkeeper.services (:require [clojure.tools.macro :refer [name-with-attributes]] [clojure.set :refer [difference]] [plumbing.core :refer [fnk]] [schema.core :as schema] [plumbing.graph :as g] [puppetlabs.kitchensink.core :refer [select-val...
27cd06ad031c01e670cb70ea95c1ca376903eaf21adc678deb86574203b8f9fa
ertugrulcetin/konva-cljs
deps.cljs
{:npm-dev-deps {"shadow-cljs" "2.11.4" "karma" "5.2.3" "karma-chrome-launcher" "3.1.0" "karma-cljs-test" "0.1.0" "karma-junit-reporter" "2.0.1"} :npm-deps {"konva" "^7.1.3" "react-konva" "^16.13.0...
null
https://raw.githubusercontent.com/ertugrulcetin/konva-cljs/338e3e76a10857e12880ddf10ca05b0b4a2a653e/src/cljs/deps.cljs
clojure
{:npm-dev-deps {"shadow-cljs" "2.11.4" "karma" "5.2.3" "karma-chrome-launcher" "3.1.0" "karma-cljs-test" "0.1.0" "karma-junit-reporter" "2.0.1"} :npm-deps {"konva" "^7.1.3" "react-konva" "^16.13.0...
ed60e53825f76cd0594159ec5ea0b1d313bb6f0140367d9030827960dfb0c355
cubicle-model-checker/cubicle
num.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet Crista...
null
https://raw.githubusercontent.com/cubicle-model-checker/cubicle/00f09bb2d4bb496549775e770d7ada08bc1e4866/try-cubicle/lib-num/num.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with $ I d : num.ml 9547 2010 - 01 - 22 12:48:24Z do...
962bdf79d83b96df61f9dd860cac026be11fb5070e11bd8653b9fc1bc9269c10
aelve/guide
Matomo.hs
| Functions for interacting with ( < / > , our web -- analytics). -- -- Matomo docs: <-reference/tracking-api>. module Guide.Matomo ( Matomo(..), postMatomo, ) where import Imports import Control.Concurrent.Async (async) import Control.Monad.Extra (whenJust) import Data.IP (IP) import Network.HTTP.Client (http...
null
https://raw.githubusercontent.com/aelve/guide/96a338d61976344d2405a16b11567e5464820a9e/back/src/Guide/Matomo.hs
haskell
analytics). Matomo docs: <-reference/tracking-api>. | Notify Matomo that an edit has been made. The ID of the website we're tracking a visit/action for. Required for tracking, must be set to one. The full URL for the current action. An override value for the User-Agent HTTP header field. The full HTTP Referrer...
| Functions for interacting with ( < / > , our web module Guide.Matomo ( Matomo(..), postMatomo, ) where import Imports import Control.Concurrent.Async (async) import Control.Monad.Extra (whenJust) import Data.IP (IP) import Network.HTTP.Client (httpLbs, parseRequest, setQueryString) import Network.HTTP.Client...
324d611777286a9655a177d5034cc33db03efb9c7523fb1a96d091263fa92bf6
rowangithub/DOrder
179_27_invgen.ml
let rec loopb k i n = if i < n then loopb k (i+1) n else () let rec loopc k i n = if i < n then (assert (1 <= k); loopc k (i+1) n) else () let rec loopa k l n = if k < n then (loopb k l n; loopc k l n; loopa (k+1) l n) else () let main l n = if (l>0) then loopa 1 l n else ()
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/mochi2/benchs/179_27_invgen.ml
ocaml
let rec loopb k i n = if i < n then loopb k (i+1) n else () let rec loopc k i n = if i < n then (assert (1 <= k); loopc k (i+1) n) else () let rec loopa k l n = if k < n then (loopb k l n; loopc k l n; loopa (k+1) l n) else () let main l n = if (l>0) then loopa 1 l n else ()
72bf4cda8df0ee48d1a8bfc5d451387b88f2f1fe27a3df67186419970b1d27e8
zwizwa/rai
meta.rkt
#lang racket/base ;; Work with stream forms in a plain Racket module. (require (for-syntax racket/base)) (provide (all-defined-out)) (define-syntax (begin-stream stx) (syntax-case stx () ((_ . forms) #`(begin (module stream-forms "stream.rkt" (provide (all-defined-out)) . for...
null
https://raw.githubusercontent.com/zwizwa/rai/6bcacb7da4172971816027fd88a0209adbd60e30/meta.rkt
racket
Work with stream forms in a plain Racket module.
#lang racket/base (require (for-syntax racket/base)) (provide (all-defined-out)) (define-syntax (begin-stream stx) (syntax-case stx () ((_ . forms) #`(begin (module stream-forms "stream.rkt" (provide (all-defined-out)) . forms) (require 'stream-forms))))) ...
daf4ff453d02272bd714081777386e634adf0ab35dc9e473d17b2bf6532ecb49
danielsz/system
konserve.clj
(ns system.components.konserve (:require [com.stuartsierra.component :as component] [konserve.filestore :refer [new-fs-store]] [konserve.memory :refer [new-mem-store]] [clojure.core.async :as async :refer [<!!]])) (defrecord Konserve [type path serializer] component/Lifecycle ...
null
https://raw.githubusercontent.com/danielsz/system/4c8bf677e9988eec59033b3af4352567c459b50c/src/system/components/konserve.clj
clojure
(ns system.components.konserve (:require [com.stuartsierra.component :as component] [konserve.filestore :refer [new-fs-store]] [konserve.memory :refer [new-mem-store]] [clojure.core.async :as async :refer [<!!]])) (defrecord Konserve [type path serializer] component/Lifecycle ...
23068c56761f1d9fd0cab5194e2ee08e23e3ecbcada7041da21c03dd1a6e2e60
clj-commons/rewrite-clj
test_clj_watch.clj
#!/usr/bin/env bb (ns test-clj-watch (:require [helper.env :as env] [helper.main :as main] [helper.shell :as shell] [lread.status-line :as status])) (defn -main [& args] ;; we simply pass along any args to kaocha, it will validate them (env/assert-min-versions) (status/line...
null
https://raw.githubusercontent.com/clj-commons/rewrite-clj/979edf61754b98a48cee1981aaf1452efc0936a7/script/test_clj_watch.clj
clojure
we simply pass along any args to kaocha, it will validate them
#!/usr/bin/env bb (ns test-clj-watch (:require [helper.env :as env] [helper.main :as main] [helper.shell :as shell] [lread.status-line :as status])) (defn -main [& args] (env/assert-min-versions) (status/line :head "launching kaocha watch on clojure sources") (apply shell/c...
cbba4ccbd28e19dc19f26bdf1e61ca863ad45d868f8a91722277cecc13f42b14
altsun/My-Lisps
(MOFF) Offset sang 2 ben hang loat.lsp
(defun c:mOff (/ ss tmp) (vl-load-com) (or *moff (setq *moff 10.0)) (if (setq ss (ssget '((0 . "ARC,CIRCLE,ELLIPSE,*LINE")))) (progn (initget 6) (and (setq tmp (getdist (strcat "\nSpecify Offset <" (vl-princ-to-string *moff) "> : "))) (setq *moff tmp)) (mapcar (function ...
null
https://raw.githubusercontent.com/altsun/My-Lisps/85476bb09b79ef5e966402cc5158978d1cebd7eb/Common/Offset/(MOFF)%20Offset%20sang%202%20ben%20hang%20loat.lsp
lisp
(defun c:mOff (/ ss tmp) (vl-load-com) (or *moff (setq *moff 10.0)) (if (setq ss (ssget '((0 . "ARC,CIRCLE,ELLIPSE,*LINE")))) (progn (initget 6) (and (setq tmp (getdist (strcat "\nSpecify Offset <" (vl-princ-to-string *moff) "> : "))) (setq *moff tmp)) (mapcar (function ...
655cb73a167bdd7f0798a2367e804d1af7144dd1bc06c825fb2bc7f1fb1ceef8
15Galan/asignatura-204
AVLDemo.hs
------------------------------------------------------------------------------- -- Demos for AVL Trees -- Data Structures . en Informática . UMA . , 2011 ------------------------------------------------------------------------------- module Demos.SearchTree.AVLDemo where import Data.List(nub) import DataStruct...
null
https://raw.githubusercontent.com/15Galan/asignatura-204/894f33ff8e0f52a75d8f9ff15155c656f1a8f771/Recursos/data.structures/haskell/Demos/SearchTree/AVLDemo.hs
haskell
----------------------------------------------------------------------------- Demos for AVL Trees -----------------------------------------------------------------------------
Data Structures . en Informática . UMA . , 2011 module Demos.SearchTree.AVLDemo where import Data.List(nub) import DataStructures.SearchTree.AVL import DataStructures.Util.Random import DataStructures.Graphics.DrawTrees drawAVL :: (Show a) => AVL a -> IO () drawAVL = drawOn "AVL.png" outlineAVL :: AVL a -> ...
c9bbbd40595c9f96a9d299778fdeaa9c9dec75e55d68df3f74d4451d911932bb
ocharles/engine.io
Yesod.hs
# LANGUAGE OverloadedStrings , FlexibleContexts # module Network.EngineIO.Yesod (yesodAPI) where import Control.Applicative import Data.Maybe (maybeToList) import Control.Arrow (second) import Data.Text (pack) import Data.Conduit (($$)) import Data.Conduit.Lift (runCatchC) import Data.Conduit.Attoparsec (sinkParser) i...
null
https://raw.githubusercontent.com/ocharles/engine.io/04c6092f91cecd34558766564e50ede0cb3c8081/engine-io-yesod/src/Network/EngineIO/Yesod.hs
haskell
------------------------------------------------------------------------------
# LANGUAGE OverloadedStrings , FlexibleContexts # module Network.EngineIO.Yesod (yesodAPI) where import Control.Applicative import Data.Maybe (maybeToList) import Control.Arrow (second) import Data.Text (pack) import Data.Conduit (($$)) import Data.Conduit.Lift (runCatchC) import Data.Conduit.Attoparsec (sinkParser) i...
3b15a137effae4a4fd01109688fec2926f40d2035f267b3acf8fb43a2f80bfb6
apache/couchdb-rebar
perl.erl
-*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*- %% ex: ts=4 sw=4 ft=erlang et -module(perl). -export(['$_'/0]). -compile({parse_transform, lisp}). '$_'() -> anything.
null
https://raw.githubusercontent.com/apache/couchdb-rebar/8578221c20d0caa3deb724e5622a924045ffa8bf/inttest/erlc_dep_graph/src/perl.erl
erlang
ex: ts=4 sw=4 ft=erlang et
-*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*- -module(perl). -export(['$_'/0]). -compile({parse_transform, lisp}). '$_'() -> anything.
7697c5bd2876689d7a79815140ffcd46d7806291c1d84427e6eeb9d2675ef6a2
aumouvantsillage/Hydromel-lang
type-concat-unbounded-operand.mel.rkt
#lang racket (require "type-concat-unbounded-operand.mel") (C)
null
https://raw.githubusercontent.com/aumouvantsillage/Hydromel-lang/90ae81a4a0299d4e47897444ed04065c65b5be98/hydromel/tests/errors/type-concat-unbounded-operand.mel.rkt
racket
#lang racket (require "type-concat-unbounded-operand.mel") (C)
6057253bf05cfa98b946c35306e6c1cfcb6f0bf3ac47b26f2f5ed0f054dad944
bvaugon/obytelib
value.ml
(*************************************************************************) (* *) (* OByteLib *) (* *) ...
null
https://raw.githubusercontent.com/bvaugon/obytelib/1b5de4e010ff2be6ab4e38c394ca5b669d6d33ef/src/value.ml
ocaml
*********************************************************************** OByteLib ...
This file is distributed under the terms of the CeCILL license . open Tools type t = | Int of int | Int32 of Int32.t | Int64 of Int64.t | Nativeint of Nativeint.t | Float of float | Float_array of float array...
e03e5bfc6a6d293e1c0a9b71a2716873a3ff3045b1c270970acf41a1fc91d047
brendanhay/amazonka
DescribeMailboxExportJob.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused -...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workmail/gen/Amazonka/WorkMail/DescribeMailboxExportJob.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Module : Amazonka.WorkMail.DescribeMailboxExportJob Stability : auto-generated Describes the current status of a mailbox export job. * Creating a Request * Request Lenses * Destructuring the Response * Response Lenses | The mailbox export job ID....
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # De...
3f9e5934522c63f6f48955141e8dedb9a491f134df024ee0af2d23ad12b08dea
chetmurthy/ensemble
stacke.ml
(**************************************************************) STACKE.ML Author : , 4/96 (**************************************************************) open Trans open Util open View open Event (**************************************************************) let name = Trace.file "STACKE" let failwith s = Tra...
null
https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/infr/stacke.ml
ocaml
************************************************************ ************************************************************ ************************************************************ ************************************************************ Hack: this is necessary because otherwise the * states will not type co...
STACKE.ML Author : , 4/96 open Trans open Util open View open Event let name = Trace.file "STACKE" let failwith s = Trace.make_failwith name s let log = Trace.log name let init_stack glue alarm ranking state (ls,vs) up = let stack = Proto.layers_of_id vs.proto_id in log ( fun ( ) - > sprintf " proto=%s " (...
05f149107c269576d014433d42431deb8737531d1f32cb9e742c5a04ca6903d1
janestreet/expect_test_helpers_async
test_uncaught_exn.ml
open! Core open! Async open! Import let () = Backtrace.elide := true let%expect_test "without an [%expect]" = Printexc.record_backtrace false; failwith "foo" [@@expect.uncaught_exn {| (monitor.ml.Error (Failure foo) ("<backtrace elided in test>" "Caught by monitor block_on_async")) |}] ;; let%expect_test "wi...
null
https://raw.githubusercontent.com/janestreet/expect_test_helpers_async/af7042e6aa1fa18529a7cacbc45bd56ed3b33b89/test/test_uncaught_exn.ml
ocaml
open! Core open! Async open! Import let () = Backtrace.elide := true let%expect_test "without an [%expect]" = Printexc.record_backtrace false; failwith "foo" [@@expect.uncaught_exn {| (monitor.ml.Error (Failure foo) ("<backtrace elided in test>" "Caught by monitor block_on_async")) |}] ;; let%expect_test "wi...
80233da52d888e0c8003682a86a5d0d8d5a20ecd9d3b1bcf9a0175b84885bef0
cognitect/clojure-lab
functions.clj
gorilla-repl.fileformat = 1 ;; ** ;;; # Clojure Functions ;;; Clojure is a functional language . Functions are first - class and can be passed - to or returned - from other functions . Most Clojure code consists primarily of pure functions ( no side effects ) , so invoking with the same inputs yields the same out...
null
https://raw.githubusercontent.com/cognitect/clojure-lab/f32947e75c999310a84bf0650c22beea18271a94/src/cljlab/functions.clj
clojure
** # Clojure Functions `defn` defines a named function. ** @@ ----- ------ ------------------- @@ ** This function has a single parameter `name`, however you may include any number of arguments in the params vector. ** @@ @@ => <= ** Functions can be defined to take different numbers of...
gorilla-repl.fileformat = 1 Clojure is a functional language . Functions are first - class and can be passed - to or returned - from other functions . Most Clojure code consists primarily of pure functions ( no side effects ) , so invoking with the same inputs yields the same output . # # Creating Functions ...
e79eceb689d7cabc88390ec155367b4b6c3b14123ce278fd15a63f095b8a44f8
digital-asset/ghc
T11647.hs
import T11647Sub (main)
null
https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_run/T11647.hs
haskell
import T11647Sub (main)
e6d99e72c8199745f0207740ca18ec0723241e3abb17ce60b3996bc73fc9d66e
tail-reversion/elle
ordering.rkt
#lang elle/private/prebase {require racket/contract #:exposing -> any/c} ; ordered? : {-> any/c boolean?} ; <? : {-> ordered? ordered? boolean?} ; >? : {-> ordered? ordered? boolean?} {provide gen:ordered ordered? <? >?} {require racket/generic #:exposing-all} {require racket/base #:exposing define #:as def...
null
https://raw.githubusercontent.com/tail-reversion/elle/ed113df48d37c0481d2e6d068635e4699ea33d65/elle-lib/private/ordering.rkt
racket
ordered? : {-> any/c boolean?} <? : {-> ordered? ordered? boolean?} >? : {-> ordered? ordered? boolean?}
#lang elle/private/prebase {require racket/contract #:exposing -> any/c} {provide gen:ordered ordered? <? >?} {require racket/generic #:exposing-all} {require racket/base #:exposing define #:as def} {require rebellion/base/comparator #:exposing make-comparator compare comparison? lesser greater equivalent} ...
74e76d5eac507b8bf8d35810ffbcc43236e6a044c407cae043f4c300f945b40c
discus-lang/ddc
CreateDC.hs
module DDC.War.Create.CreateDC (create) where import DDC.War.Create.Way import DDC.War.Driver import System.FilePath import DDC.War.Job () import Data.Set (Set) import qualified DDC.War.Job.CompileDC as CompileDC import qualified DDC.War.Jo...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-tools/src/ddc-war/DDC/War/Create/CreateDC.hs
haskell
| Create test jobs for the test file with the given path. We handle files called Main.dcX, where 'X' specifies the language fragment. Compilation way. All files in the same directory as the one we're inspecting. Name of the file to inspect. Maybe a chain of test jobs to do. Check if the file looks like a cor...
module DDC.War.Create.CreateDC (create) where import DDC.War.Create.Way import DDC.War.Driver import System.FilePath import DDC.War.Job () import Data.Set (Set) import qualified DDC.War.Job.CompileDC as CompileDC import qualified DDC.War.Jo...
728eb8801a83dd2b43edafa333c9b816e50fab99427b035270a6f10fcc1dcc92
district0x/cljs-ipfs-http-client
lib_version.clj
(ns lib-version) (def lib 'district0x/cljs-ipfs-http-client) ; ends up as <group-id>/<artifact-id> in pom.xml (def version "1.1.0-SNAPSHOT")
null
https://raw.githubusercontent.com/district0x/cljs-ipfs-http-client/e4473f5d205ea2b36cb2d0c54d48008998c71f55/lib_version.clj
clojure
ends up as <group-id>/<artifact-id> in pom.xml
(ns lib-version) (def version "1.1.0-SNAPSHOT")
ee0ebca478691b7eb4de5c5fa461bd897d2ea502870548baed684d1dba2d0bfc
binaryage/cljs-oops
debug.clj
(ns oops.debug "Some debug utils." (:require [clojure.pprint] [clojure.string :as string] [oops.config :as config])) (defn trimr-nl [s] (string/replace s #"\n$" "")) (defn pprint [v] (if (= v "\n") v (trimr-nl (with-out-str (binding [clojure.pprint/*print-right-...
null
https://raw.githubusercontent.com/binaryage/cljs-oops/a2b48d59047c28decb0d6334e2debbf21848e29c/src/lib/oops/debug.clj
clojure
(ns oops.debug "Some debug utils." (:require [clojure.pprint] [clojure.string :as string] [oops.config :as config])) (defn trimr-nl [s] (string/replace s #"\n$" "")) (defn pprint [v] (if (= v "\n") v (trimr-nl (with-out-str (binding [clojure.pprint/*print-right-...
dff1726adab646bba118f43e41f56ff8d9a019b0bbfd34d015eb8a20be11a4e0
markcox80/basic-binary-ipc
system-calls.lisp
(in-package "BASIC-BINARY-IPC") ;; The code in this file provides an abstraction for invoking ;; functions provided by the operating system, or more succinctly, ;; system calls. A common pattern with system calls is the manner in ;; which errors are communicated from the operating system to the ;; calling process. Bel...
null
https://raw.githubusercontent.com/markcox80/basic-binary-ipc/9a80a2e0ea9eba94b9bd357917c7066bbdf1b1aa/src/system-calls.lisp
lisp
The code in this file provides an abstraction for invoking functions provided by the operating system, or more succinctly, system calls. A common pattern with system calls is the manner in which errors are communicated from the operating system to the calling process. Below are examples on different operating syst...
(in-package "BASIC-BINARY-IPC") // On based systems : // On Windows ( ): if ( h = = ) { (defgeneric system-function-caller (condition) (:documentation "The name of the function which invoked the system function that failed.")) (defgeneric system-function-name (condition) (:documentation "The ...
86a75cac9a7aee7a001917abceceb0f8f112e0b0f0c4222c904d1e97ea1d8375
racket/eopl
data-structures.rkt
#lang eopl ;; data structures for call-by-need language (require "lang.rkt") ; for expression? (require "store.rkt") ; for reference? (require "pairvals.rkt") (provide (all-defined-out)) ; too many things to list ;;;;;;;;;;;;;;;; expressed values ;;;;;;;;;;;;;;;; ;;; an ...
null
https://raw.githubusercontent.com/racket/eopl/43575d6e95dc34ca6e49b305180f696565e16e0f/tests/chapter4/call-by-need/data-structures.rkt
racket
data structures for call-by-need language for expression? for reference? too many things to list expressed values ;;;;;;;;;;;;;;;; an expressed value is either a number, a boolean, a procval, a reference, or a mutable pair. extractors: procedures ;;;;;;;;;;;;;;;; environment data structures ;;;;;;;;;;;;;;;; ...
#lang eopl (require "pairvals.rkt") (define-datatype expval expval? (num-val (value number?)) (bool-val (boolean boolean?)) (proc-val (proc proc?)) (ref-val (ref reference?)) (mutpair-val (p mutpair?)) ) (define expval->num (lambda (v) (cases expval v (num-val (num) num)...
9501726203ba7aace479093c267b94bfb92dbdbb36809cee3e694318cc6ae3af
michaelliao/cljweb
urlhandlers.clj
(ns cljweb.urlhandlers (:use [compojure.core :only [GET POST PUT DELETE defroutes]] [compojure.route :only [not-found]] korma.db korma.core [ring.util.response :only [response]])) (defdb korma-db (mysql {:db "test", :host "localhost", :p...
null
https://raw.githubusercontent.com/michaelliao/cljweb/d833635a334f1e821e2e7144782b41a7bda700b5/src/cljweb/urlhandlers.clj
clojure
(ns cljweb.urlhandlers (:use [compojure.core :only [GET POST PUT DELETE defroutes]] [compojure.route :only [not-found]] korma.db korma.core [ring.util.response :only [response]])) (defdb korma-db (mysql {:db "test", :host "localhost", :p...
09651f8099df554be9f3c6c9d73093244c048c6d7c785d3f774c4b3b05a5e444
wdebeaum/step
wireless.lisp
;;;; ;;;; W::wireless ;;;; (define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::wireless (SENSES ((meta-data :origin calo-ontology :entry-date 20060426 :change-date nil :wn ("wireless%1:10:01") :comments nil) (example "does the hotel have free wireless access") (LF-PARENT ONT::WIRELESS) ...
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/wireless.lisp
lisp
W::wireless
(define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::wireless (SENSES ((meta-data :origin calo-ontology :entry-date 20060426 :change-date nil :wn ("wireless%1:10:01") :comments nil) (example "does the hotel have free wireless access") (LF-PARENT ONT::WIRELESS) (templ mass-pred-templ...
15215c72527b6d68999003d4037953a6eb25a8a47382abae4005b55d56682ba3
kostmo/circleci-failure-tracker
TestHelpers.hs
module TestHelpers where import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans.Except (ExceptT (ExceptT), except, runExceptT) import Data.Bifunctor (first) import qualified Data.ByteString as B import ...
null
https://raw.githubusercontent.com/kostmo/circleci-failure-tracker/393d10a72080bd527fdb159da6ebfea23fcd52d1/app/oneoff/app/TestHelpers.hs
haskell
module TestHelpers where import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans.Except (ExceptT (ExceptT), except, runExceptT) import Data.Bifunctor (first) import qualified Data.ByteString as B import ...
d52e587c5a13ffa03a334e03cb69bba842a4eadaba3a070ed792fa7e5e0d6ec1
comby-tools/comby
test_pipeline.ml
open Configuration open Command_configuration open Comby_kernel open Matchers let configuration (module E : Engine.S) = { matcher = (module E.Generic : Matchers.Matcher.S) ; sources = `String "source" ; specifications = [] ; run_options = { verbose = false ; match_timeout = 3 ; dump_statistic...
null
https://raw.githubusercontent.com/comby-tools/comby/a36c63fb1e686adaff3e90aed00e88404f8cda78/test/common/test_pipeline.ml
ocaml
open Configuration open Command_configuration open Comby_kernel open Matchers let configuration (module E : Engine.S) = { matcher = (module E.Generic : Matchers.Matcher.S) ; sources = `String "source" ; specifications = [] ; run_options = { verbose = false ; match_timeout = 3 ; dump_statistic...
5c7a97691392c1a7f8ea51330b27dafe3af540f753b16639be694ca21d893d2a
nniclausse/manderlbot
irc_lib.erl
%%%---------------------------------------------------------------------- %%% File : irc_lib.erl Author : < > %%% Purpose : This library gathers all functions to format and send IRC commands . It manage IRC server connexion , automatically answer to %%% server pings (necessar...
null
https://raw.githubusercontent.com/nniclausse/manderlbot/a65cfffc50801c09551b70d6bbd7a19e6b2c57dd/src/irc_lib.erl
erlang
---------------------------------------------------------------------- File : irc_lib.erl Purpose : This library gathers all functions to format and send server pings (necessary to stay online) and behaviour management. ---------------------------------------------------------------------- ...
Author : < > IRC commands . It manage IRC server connexion , automatically answer to Created : 11 Sep 2001 , < > it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or the EPL license and distr...
f0ffc2aafa9ecaccb03ea55d5e8afe368075f40458b2d42b8e98e271de675be3
discus-lang/ddc
Main.hs
| Command - line interface to the DDC type checker , which is also -- possible via the plain 'ddc' command. -- This code is provided as an example of how to drive the DDC -- compiler framework. -- module Main where import Config import DDC.Build.Language import DDC.Build.Pipeline import DDC.Core.Codec.Text.P...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-tools/src/ddc-check/Main.hs
haskell
possible via the plain 'ddc' command. compiler framework. Get the source text. Check with the configured language fragment. In quiet mode just drop the checked module on the floor. Loading the core code automatically check it against the provided fragment. If the pipeline died with errors, then print th...
| Command - line interface to the DDC type checker , which is also This code is provided as an example of how to drive the DDC module Main where import Config import DDC.Build.Language import DDC.Build.Pipeline import DDC.Core.Codec.Text.Pretty import System.IO import System.Environment import qualified DDC.Core...
5336d720e2f2e77633f5e260321cf77e7677511138f6c592a0bb92d41a188626
CryptoKami/cryptokami-core
Lrc.hs
-- | Leaders and richmen computation. -- Can't use autoexporter, because some part is in another package. { - # OPTIONS_GHC -F -pgmF autoexporter # - } module Pos.Lrc ( module Pos.Arbitrary.Lrc , module Pos.Lrc.RichmenComponent , module Pos.Lrc.Consumer , module Pos.Lrc.Consumers ...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/block/src/Pos/Lrc.hs
haskell
| Leaders and richmen computation. Can't use autoexporter, because some part is in another package.
{ - # OPTIONS_GHC -F -pgmF autoexporter # - } module Pos.Lrc ( module Pos.Arbitrary.Lrc , module Pos.Lrc.RichmenComponent , module Pos.Lrc.Consumer , module Pos.Lrc.Consumers , module Pos.Lrc.Context , module Pos.Lrc.Core , module Pos.Lrc.DB , module Pos.Lrc.E...
9dd8a8bfe92dad3c25dc879d8f164ef1e95350c7633f251b9d3bcfef9f7e718c
LCBH/UKano
queue.mli
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
null
https://raw.githubusercontent.com/LCBH/UKano/13c046ddaca48b45d3652c3ea08e21599e051527/src/queue.mli
ocaml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
f96ccfc0f5bce96a51965172545db30d6ff9a2154f7e82cf2e4c42feb5d06d52
music-suite/music-suite
Woodwind.hs
# OPTIONS_GHC -fno - warn - name - shadowing -fno - warn - unused - imports -fno - warn - redundant - constraints # -fno-warn-unused-imports -fno-warn-redundant-constraints #-} module Music.Parts.Instrument.Woodwind ( WoodwindInstrument, woodwindInstrument, isWoodwindInstrument, ) where import...
null
https://raw.githubusercontent.com/music-suite/music-suite/7f01fd62334c66418043b7a2d662af127f98685d/src/Music/Parts/Instrument/Woodwind.hs
haskell
# OPTIONS_GHC -fno - warn - name - shadowing -fno - warn - unused - imports -fno - warn - redundant - constraints # -fno-warn-unused-imports -fno-warn-redundant-constraints #-} module Music.Parts.Instrument.Woodwind ( WoodwindInstrument, woodwindInstrument, isWoodwindInstrument, ) where import...
dc92c4d7fab1c065a75f202ad9c56d431830eb8fec3f1f6b82d1e2dc42c28267
waddlaw/haskell-stack-trace-plugin
Plugin.hs
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE CPP # module StackTrace.Plugin (plugin) where import Control.Arrow (first) import Data.Monoid (Any(Any, getAny)) import GHC.Types.SrcLoc #if __GLASGOW_HASKELL__ >= 900 import GHC.Plugins #else import GhcPlugins #endif #if __GLASGOW_HASKELL__ >=...
null
https://raw.githubusercontent.com/waddlaw/haskell-stack-trace-plugin/9951809f0c73dc07eda8ca7cc8bee8283bdaff5a/src/StackTrace/Plugin.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE OverloadedStrings # ...this should not interfere with other imports... about unused imports. Even if the import is used See: -stack-trace-plugin/issues/16 constraint we set a flag in a (Any,) functor. Only import GHC.Stack if needed for a constraint we introduced ------------ Ma...
# LANGUAGE CPP # module StackTrace.Plugin (plugin) where import Control.Arrow (first) import Data.Monoid (Any(Any, getAny)) import GHC.Types.SrcLoc #if __GLASGOW_HASKELL__ >= 900 import GHC.Plugins #else import GhcPlugins #endif #if __GLASGOW_HASKELL__ >= 810 import GHC.Hs #endif #if __GLASGOW_HASKELL__ < 810 import ...
27ee14485785a547f6cbd8387303b2b0751466c54feeb1952f601c9f8fa58b74
maximedenes/native-coq
evd.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/pretyping/evd.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** The kinds of existential variable ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Pp open Errors open Util...
ad6f588326c3b96b5867df8b0f2957082cf998f4213de89d8f465944b467169a
ryszard/clsql
postgresql-package.lisp
-*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: postgresql-package.cl ;;;; Purpose: Package definition for low-level PostgreSQL interface Programmer : Date ...
null
https://raw.githubusercontent.com/ryszard/clsql/9aafcb72bd7ca1d7e908938b6a5319753b3371d9/db-postgresql/postgresql-package.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 -*- ************************************************************************* FILE IDENTIFICATION Name: postgresql-package.cl Purpose: Package definition for low-level PostgreSQL interface (), also known as the LLGPL. **********************************...
Programmer : Date Started : Feb 2002 $ Id$ This file , part of CLSQL , is Copyright ( c ) 2002 by CLSQL users are granted the rights to distribute and use this software as governed by the terms of the Lisp Lesser GNU Public License (in-package #:cl-user) (defpackage #:pgsql #-(and :lispwor...
5873adf6d08748da96c024fd2a5c363a8bab7f8ce64868b9ec5be74f397fbf2a
archimag/cl-closure-template
python-backend.lisp
;;;; python-backend.lisp ;;;; ;;;; This file is part of the cl-closure-template library, released under Lisp-LGPL. ;;;; See file COPYING for details. ;;;; Author : < > (in-package #:closure-template) (defvar *gen-name-index* 0) (defun gen-name () (format nil "gn~A" (incf *gen-name-index*))) (defun indent (li...
null
https://raw.githubusercontent.com/archimag/cl-closure-template/f1983aa525045691e128027d2a2d74831c873d6e/src/python-backend.lisp
lisp
python-backend.lisp This file is part of the cl-closure-template library, released under Lisp-LGPL. See file COPYING for details. TODO: replace ''' to \'\'\' expression template command print-tag if switch foreach for with call namespace compile template
Author : < > (in-package #:closure-template) (defvar *gen-name-index* 0) (defun gen-name () (format nil "gn~A" (incf *gen-name-index*))) (defun indent (lines) (mapcar (lambda (line) (concatenate 'string " " line)) (flatten lines))) (defun string-to-class-name (str) (coerce (iter (with force-u...
4124b2b134fc527b34b434f4f19fd3cce78063fb1c8ad0303725810b05da7b1e
nponeccop/HNC
Visualise.hs
# LANGUAGE FlexibleContexts , GADTs , , ScopedTypeVariables , LambdaCase , NoMonomorphismRestriction # module HN.Optimizer.Visualise (foo, formatGraph) where import Compiler.Hoopl import Data.Functor.Foldable import HN.Optimizer.Node (Node(..), DefinitionNode(..)) import HN.Intermediate (ExpressionF(..)) import Utils ...
null
https://raw.githubusercontent.com/nponeccop/HNC/d8447009a04c56ae2cba4c7c179e39384085ea00/HN/Optimizer/Visualise.hs
haskell
# LANGUAGE FlexibleContexts , GADTs , , ScopedTypeVariables , LambdaCase , NoMonomorphismRestriction # module HN.Optimizer.Visualise (foo, formatGraph) where import Compiler.Hoopl import Data.Functor.Foldable import HN.Optimizer.Node (Node(..), DefinitionNode(..)) import HN.Intermediate (ExpressionF(..)) import Utils ...
eab8a288b9cbb19bec1d0513e7daebb6e9c0616c459b8fe91877edb49da5bac1
backtracking/astro
ronde.ml
open Printf open Graphics open Astro open Planets let size = 600 let _ = open_graph (sprintf " %dx%d" size size) let _ = auto_synchronize false 40 . let factor = float size /. univers_radius let xy long r = size / 2 + truncate ((r *. factor) *. cos long), size / 2 + truncate ((r *. factor) *. sin long) let cl...
null
https://raw.githubusercontent.com/backtracking/astro/adb8020b8a56692f3d2b50d26dce2ccc442c6f39/ronde.ml
ocaml
!jj <= jj2
open Printf open Graphics open Astro open Planets let size = 600 let _ = open_graph (sprintf " %dx%d" size size) let _ = auto_synchronize false 40 . let factor = float size /. univers_radius let xy long r = size / 2 + truncate ((r *. factor) *. cos long), size / 2 + truncate ((r *. factor) *. sin long) let cl...
992e8cd5677f17399798247c3733f83363d8fa529a5560d5de603c988c82ce6b
reifyhealth/specmonstah
handlers.cljs
(ns specmonstah-demo.handlers (:require [re-frame.core :as rf] [sweet-tooth.frontend.paths :as p] [cljs.reader :as reader] [specmonstah-demo.examples.schemas :as schemas])) (rf/reg-event-db :init [rf/trim-v] (fn [db] (-> db (assoc-in (p/full-path :form [:schema :bu...
null
https://raw.githubusercontent.com/reifyhealth/specmonstah/afe38e7a39149836c31719f7e36a7504c14dbb80/demo/src/specmonstah_demo/handlers.cljs
clojure
(ns specmonstah-demo.handlers (:require [re-frame.core :as rf] [sweet-tooth.frontend.paths :as p] [cljs.reader :as reader] [specmonstah-demo.examples.schemas :as schemas])) (rf/reg-event-db :init [rf/trim-v] (fn [db] (-> db (assoc-in (p/full-path :form [:schema :bu...
a436d04667dbc2a9e45518a14c01fdc11cc210b6efa40fa774331371965b5e9a
zalora/aws-ec2
DescribeRegions.hs
# LANGUAGE TemplateHaskell , MultiParamTypeClasses , TypeFamilies # , MultiParamTypeClasses , TypeFamilies #-} module Aws.Ec2.Commands.DescribeRegions where import Aws.Ec2.TH data DescribeRegions = DescribeRegions [Text] d...
null
https://raw.githubusercontent.com/zalora/aws-ec2/60b7ad4464edf3c69da8c2f023db4ba2fa7ffc48/src/Aws/Ec2/Commands/DescribeRegions.hs
haskell
# LANGUAGE TemplateHaskell , MultiParamTypeClasses , TypeFamilies # , MultiParamTypeClasses , TypeFamilies #-} module Aws.Ec2.Commands.DescribeRegions where import Aws.Ec2.TH data DescribeRegions = DescribeRegions [Text] d...
bcfac1f210df295a819e0889c426b2c80c09a35d4460c50b977228805c7f68da
lem-project/lem
method.lisp
(in-package :lem-language-server) (defvar *debug-on-error* nil) (defvar *method-classes* '()) (define-condition uninitialized-error (jsonrpc:jsonrpc-error) ((code :initform -32002) (message :initform "\"initialize\" request has not been called."))) (defgeneric call-lsp-method (lsp-method json)) (defgeneric call...
null
https://raw.githubusercontent.com/lem-project/lem/bcf7944f28578a16abe16d16f04ac3f6c63ad59b/lib/language-server/method.lisp
lisp
(in-package :lem-language-server) (defvar *debug-on-error* nil) (defvar *method-classes* '()) (define-condition uninitialized-error (jsonrpc:jsonrpc-error) ((code :initform -32002) (message :initform "\"initialize\" request has not been called."))) (defgeneric call-lsp-method (lsp-method json)) (defgeneric call...
da3a04a80c8fb9e96019582c5345ac7ec6d4608504ee66a5cfd2f75bb4ced07d
ChillkroeteTTS/fischer
frontend_test.clj
(ns fischer.components.frontend-test (:require [clojure.test :refer :all] [fischer.components.frontend :as fe] [clj-http.client :as client] [com.stuartsierra.component :as cp] [ring.mock.request :as mock] [clojure.data.json :as json] [compojure.c...
null
https://raw.githubusercontent.com/ChillkroeteTTS/fischer/2f479ac0d410f536f5bd89659d7f69113422784a/test/clj/fischer/components/frontend_test.clj
clojure
(ns fischer.components.frontend-test (:require [clojure.test :refer :all] [fischer.components.frontend :as fe] [clj-http.client :as client] [com.stuartsierra.component :as cp] [ring.mock.request :as mock] [clojure.data.json :as json] [compojure.c...
55e669ba50dba54dd0c4faa932433d28bda9e37677691fba333dd074cebe8ed0
zadean/xqerl
fn_xml_to_json_SUITE.erl
-module('fn_xml_to_json_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['xml-to-json-001'/1]). -export(['xml-to-json-002'/1]). -export(['xml-to-json-003...
null
https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/fn/fn_xml_to_json_SUITE.erl
erlang
-module('fn_xml_to_json_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['xml-to-json-001'/1]). -export(['xml-to-json-002'/1]). -export(['xml-to-json-003...
20c8c5445b07369bf86604ba00e6df3b484bdde03e659a2d85c291768c761555
Odie/gd-edit
mod.clj
(ns gd-edit.commands.mod (:require [gd-edit.globals :as globals] [gd-edit.utils :as u] [gd-edit.stack :as stack] [gd-edit.app-util :as au] [gd-edit.game-dirs :as dirs] [clojure.java.io :as io] [gd-edit.watcher :as watcher])) (defn- on-mod-change...
null
https://raw.githubusercontent.com/Odie/gd-edit/651d3367dc083f0d678dffe9608c9b5cc12038ad/src/gd_edit/commands/mod.clj
clojure
Update the global state and save the settings file
(ns gd-edit.commands.mod (:require [gd-edit.globals :as globals] [gd-edit.utils :as u] [gd-edit.stack :as stack] [gd-edit.app-util :as au] [gd-edit.game-dirs :as dirs] [clojure.java.io :as io] [gd-edit.watcher :as watcher])) (defn- on-mod-change...
9b5634441a24383f77dcd1a49b823bb0abf6f08f12b323f19cd01ffea1990f39
lisp/de.setf.thrift
ConstantsDemo-types.lisp
;;; -*- Package: thrift-generated -*- ;;; Autogenerated by Thrift ;;; DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING (def-package :thrift-generated) (thrift:def-enum "enumconstants" (("ONE" . 1) ("TWO" . 2))) (thrift:def-struct "thing" (("hello" nil :type i32 :id 1) ("goodbye" nil :typ...
null
https://raw.githubusercontent.com/lisp/de.setf.thrift/32b0d1ca3d9fa95327165b8090e1021bc563ed3e/test/gen-cl/ConstantsDemo-types.lisp
lisp
-*- Package: thrift-generated -*- DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
Autogenerated by Thrift (def-package :thrift-generated) (thrift:def-enum "enumconstants" (("ONE" . 1) ("TWO" . 2))) (thrift:def-struct "thing" (("hello" nil :type i32 :id 1) ("goodbye" nil :type i32 :id 2))) (thrift:def-struct "thing2" (("val" 2 :type (enum "enumconstants") :id 1))) (thrift:def-exc...
9c77ca412f6e0073be868a719ba3771b953aac13664448541ad9bec26a968190
flipstone/haskell-for-beginners
1_loading_modules.hs
-- Import the following modules -- -- Control.Applicative -- Control.Exception, just the throw and catch functions -- Control.Concurrent, but not the forkOS function -- Data.ByteString, but we'll want use the functions via the full module name -- Data.ByteString.Lazy, but we'll want to use the functions via the name LB...
null
https://raw.githubusercontent.com/flipstone/haskell-for-beginners/e586a1f3ef08f21d5181171fe7a7b27057391f0b/answers/chapter_07/1_loading_modules.hs
haskell
Import the following modules Control.Applicative Control.Exception, just the throw and catch functions Control.Concurrent, but not the forkOS function Data.ByteString, but we'll want use the functions via the full module name Data.ByteString.Lazy, but we'll want to use the functions via the name LBS
import Control.Applicative import Control.Exception (throw, catch) import Control.Concurrent hiding (forkOS) import qualified Data.ByteString import qualified Data.ByteString.Lazy as LBS
98ac749ad7ec57a71531bc67bbf319be008befea6081ddc68e70806b633979b9
purenix-org/purenix
Print.hs
# LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE NoImplicitPrelude # {-# OPTIONS_GHC -Wno-name-shadowing #-} module PureNix.Print (renderExpr) where import Data.Fol...
null
https://raw.githubusercontent.com/purenix-org/purenix/4c124481ff6e2b1679badeab56ccbc57ad06be10/src/PureNix/Print.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # OPTIONS_GHC -Wno-name-shadowing # | Turn a Nix 'Expr' into an actual piece of text. | Expression precedence. See: /#sec-language-operators | Define whether a subexpression needs to be parenthesized, based on its associativity and precedence.
# LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE NoImplicitPrelude # module PureNix.Print (renderExpr) where import Data.Foldable (toList) import Data.List (intersperse) import Data.Semigroup (mtimesDefault) import qualified Da...
7a45d4c394d360425e670bdad4b0223760a9e2655206818ad7ec632191c62b48
bobbae/gosling-emacs
boobmail.ml
(declare-global inmail outmail mailbox oldbuff ermsg) (setq outmail (concat (getenv "HOME") "/outgoing")) (setq mailbox (concat (getenv "HOME") "/mbox")) (defun (quit-mail msgno (setq msgno 1) (while (> (switch-to-message) -1) (if (> (buffer-size) 1) (progn (beginning-of-file) (set-mark) ...
null
https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/lib/maclib/utah/boobmail.ml
ocaml
(declare-global inmail outmail mailbox oldbuff ermsg) (setq outmail (concat (getenv "HOME") "/outgoing")) (setq mailbox (concat (getenv "HOME") "/mbox")) (defun (quit-mail msgno (setq msgno 1) (while (> (switch-to-message) -1) (if (> (buffer-size) 1) (progn (beginning-of-file) (set-mark) ...
a9b30acc009ab1a6c3bc4a85334ec2d6b53c632b6941f88cc25544b7dae5ccbd
softwarelanguageslab/maf
R5RS_gambit_cat-2.scm
; Changes: * removed : 0 * added : 0 * swaps : 1 ; * negated predicates: 0 ; * swapped branches: 0 * calls to i d fun : 1 (letrec ((inport #f) (outport #f) (catport (lambda (port) (let ((x (read-char port))) (if (eof-object? x) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_gambit_cat-2.scm
scheme
Changes: * negated predicates: 0 * swapped branches: 0
* removed : 0 * added : 0 * swaps : 1 * calls to i d fun : 1 (letrec ((inport #f) (outport #f) (catport (lambda (port) (let ((x (read-char port))) (if (eof-object? x) (close-output-port outport) (beg...
781908e66e99dfdc3290d2c5768cbf5abd47aef6c9a3cbadfa5d01dbb60c545e
drewt/scmus
log-view.scm
;; Copyright 2014 - 2020 ;; ;; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the ;; License, or (at your option) any later version. ;; ;; This program is distributed in ...
null
https://raw.githubusercontent.com/drewt/scmus/5041ec376cb17db463117b8fa212b16b23fe770d/src/log-view.scm
scheme
This program is free software; you can redistribute it and/or either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS...
Copyright 2014 - 2020 modify it under the terms of the GNU General Public License as You should have received a copy of the GNU General Public License (declare (hide)) (import (scmus base) (scmus config) (scmus event) (scmus log) (scmus tui) (scmus view) (scmus ...
adcaeabd6720cb62b412b51b061ccef305239b513d52eb27b757bf0e76b2b931
someodd/waffle
Progress.hs
{-# LANGUAGE OverloadedStrings #-} FIXME : implement network error dialog boxes here and return state if fail ? -- this would imply the need to have a fallback state, right? | Handle indication of download progress for various UI.Util . RenderMode types , like downloading -- menus, text files, and binary file down...
null
https://raw.githubusercontent.com/someodd/waffle/71586b271878df4cb2368ae3bd6e2961cb79fa15/src/BrickApp/ModeAction/Progress.hs
haskell
# LANGUAGE OverloadedStrings # this would imply the need to have a fallback state, right? menus, text files, and binary file downloads. TODO: implement OPEN Things to do when switching modes! Namely reset viewports... FIXME: could reset the scroll here...? | The entrypoint for using "progress mode" which... This...
FIXME : implement network error dialog boxes here and return state if fail ? | Handle indication of download progress for various UI.Util . RenderMode types , like downloading module BrickApp.ModeAction.Progress where import qualified Data.Map as Map import Control.Exception import Data.Text.E...
12f9e54894522dd89e0c8f7242adb241e6b47a2f9895b190316f2158791aa5d9
cryptosense/pkcs11
p11_user_type.ml
type t = | CKU_SO | CKU_USER | CKU_CONTEXT_SPECIFIC | CKU_CS_UNKNOWN of P11_ulong.t [@@deriving eq, ord, show] let to_string = function | CKU_SO -> "CKU_SO" | CKU_USER -> "CKU_USER" | CKU_CONTEXT_SPECIFIC -> "CKU_CONTEXT_SPECIFIC" | CKU_CS_UNKNOWN x -> Unsigned.ULong.to_string x let of_string = functi...
null
https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/lib/p11_user_type.ml
ocaml
type t = | CKU_SO | CKU_USER | CKU_CONTEXT_SPECIFIC | CKU_CS_UNKNOWN of P11_ulong.t [@@deriving eq, ord, show] let to_string = function | CKU_SO -> "CKU_SO" | CKU_USER -> "CKU_USER" | CKU_CONTEXT_SPECIFIC -> "CKU_CONTEXT_SPECIFIC" | CKU_CS_UNKNOWN x -> Unsigned.ULong.to_string x let of_string = functi...
4473d2b2f538119d21be9b19ce70791ac64d6d13a69ddb3eb3776a0c3a74e522
boot-clj/boot-cljs
impl_test.clj
(ns adzerk.boot-cljs.impl-test (:require [clojure.test :refer :all] [adzerk.boot-cljs.impl :refer :all] [clojure.java.io :as io] [clojure.string :as string] [boot.from.io.aviso.exception :as pretty] [boot.from.io.aviso.ansi :as ansi] [boot.util :...
null
https://raw.githubusercontent.com/boot-clj/boot-cljs/9ee43c278cfd3d56699242912e3e95195f549277/test/adzerk/boot_cljs/impl_test.clj
clojure
Setup mock source for finding the original source path
(ns adzerk.boot-cljs.impl-test (:require [clojure.test :refer :all] [adzerk.boot-cljs.impl :refer :all] [clojure.java.io :as io] [clojure.string :as string] [boot.from.io.aviso.exception :as pretty] [boot.from.io.aviso.ansi :as ansi] [boot.util :...
fa22a9e991d9a8c1b3fb8fb140d6a97b299a6ac312299f3201157a04541a21fc
nervous-systems/fink-nottle
util.cljc
(ns fink-nottle.test.util (:require [glossop.core :as g #? (:clj :refer :cljs :refer-macros) [go-catching <?]] #?@ (:clj [[clojure.test :as test] [clojure.core.async :as async]] :cljs [[cljs.test]])) #? (:cljs (:require-ma...
null
https://raw.githubusercontent.com/nervous-systems/fink-nottle/4fe25f2d89dc272e70b16742bca82455e3a43edb/test/fink_nottle/test/util.cljc
clojure
(ns fink-nottle.test.util (:require [glossop.core :as g #? (:clj :refer :cljs :refer-macros) [go-catching <?]] #?@ (:clj [[clojure.test :as test] [clojure.core.async :as async]] :cljs [[cljs.test]])) #? (:cljs (:require-ma...
95c61f85506a5fd0d40cb3f2381fb1511c790667e6baf3e7f621fbc38f402b04
katox/neanderthal-stick
generator.clj
Copyright ( c ) . All rights reserved . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 2.0 (-2.0) or later ;; which can be found in the file LICENSE at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by...
null
https://raw.githubusercontent.com/katox/neanderthal-stick/b8f92e46327a54c065232a1fb0f0bebef38c4b40/test/neanderthal_stick/generator.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 2.0 (-2.0) or later which can be found in the file LICENSE at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns neanderthal-stick.generator (:require [clojure.test.check.generators :as gen] [neanderthal-stick.test-util :refer [MAX-SIZE]] [neanderthal-stick.internal.common :refer [entry-type-kw]])) (def gen-size (gen/frequency [[5 (gen/return 0)] ...
65885b765c660f5dad1d6d13c6b3241fa322b9fcef23d88527e74c370c0edd45
tommaisey/aeon
floor.help.scm
;; (u:floor a) ;; Round signal down. (let* ((x (mouse-x kr 65 95 0 0.1)) (f (midi-cps (u:floor x)))) (audition (out 0 (mul (sin-osc ar f 0) 0.1))))
null
https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/unary-ops/floor.help.scm
scheme
(u:floor a) Round signal down.
(let* ((x (mouse-x kr 65 95 0 0.1)) (f (midi-cps (u:floor x)))) (audition (out 0 (mul (sin-osc ar f 0) 0.1))))
78041447ca5321d4a30fb0da1fcfdb08cd323477c97a49952a050de566f29ecb
BranchTaken/Hemlock
test_operators.ml
open! Basis.Rudiments open! Basis open! Hmc open! ScanTest let test () = scan_str "~ ~-+*/%@^$<=>|:.~?"; scan_str "? ?-+*/%@^$<=>|:.~?"; scan_str "* *-+*/%@^$<=>|:.~?"; scan_str "** **-+*/%@^$<=>|:.~?"; scan_str "% %-+*/%@^$<=>|:.~?"; scan_str "+ +-+*/%@^$<=>|:.~?"; scan_str "- --+*/%@^$<=>|:.~?"; scan...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/32a1c18af4a55b82b4f6a4db78a756e67ef5acae/bootstrap/test/hmc/scan/test_operators.ml
ocaml
open! Basis.Rudiments open! Basis open! Hmc open! ScanTest let test () = scan_str "~ ~-+*/%@^$<=>|:.~?"; scan_str "? ?-+*/%@^$<=>|:.~?"; scan_str "* *-+*/%@^$<=>|:.~?"; scan_str "** **-+*/%@^$<=>|:.~?"; scan_str "% %-+*/%@^$<=>|:.~?"; scan_str "+ +-+*/%@^$<=>|:.~?"; scan_str "- --+*/%@^$<=>|:.~?"; scan...
b6d9734c3f4901f7466e8f680c6f2f081d8f41a9da7262cea7e90884981fe038
tmattio/js-bindings
node_util.mli
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]] open Es2020 open Node_globals module AnonymousInterface0 : sig type t val t_to_js : t -> Ojs.t val t_of_js : Ojs.t -> t end module AnonymousInterface1 : sig type t val t_to_js : t -> Ojs.t val t_of_js : Ojs.t -> t...
null
https://raw.githubusercontent.com/tmattio/js-bindings/ca3bd6a12db519c8de7f41b303f14cf70cfd4c5f/lib/node/node_util.mli
ocaml
FIXME: unknown type '{ [K in Style]: string }' FIXME: unknown type 'unique symbol' FIXME: unknown type 'unique symbol'
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]] open Es2020 open Node_globals module AnonymousInterface0 : sig type t val t_to_js : t -> Ojs.t val t_of_js : Ojs.t -> t end module AnonymousInterface1 : sig type t val t_to_js : t -> Ojs.t val t_of_js : Ojs.t -> t...
a3612b5329799e441b4ddc006f130814cddbb1198c7656848c4e1dd56d10ec1c
dbmcclain/vmath
nr-glue.lisp
(defpackage nrglue (:nicknames nrg) (:export laguer zroots memcof evlmem fixrts predic )) (in-package :nrglue) (defun dfloat (x) (declare (type number x)) (the double-float (coerce x 'double-float))) (defmacro fproclaim (x) `(eval-when (compile load eval) (proclaim ,x))) (defmacro fref...
null
https://raw.githubusercontent.com/dbmcclain/vmath/4f811af1a5ae80d864fbe9505054498d29f90e7a/nr-glue.lisp
lisp
------------------------------------------------------------------------- (setq mp1 (1+ m)) ------------------------------------------------------------------------- a is vector of polynomial coefficients in ascending orders return a vector of polynomial roots in the complex plane (check-type a (array number (*)))...
(defpackage nrglue (:nicknames nrg) (:export laguer zroots memcof evlmem fixrts predic )) (in-package :nrglue) (defun dfloat (x) (declare (type number x)) (the double-float (coerce x 'double-float))) (defmacro fproclaim (x) `(eval-when (compile load eval) (proclaim ,x))) (defmacro fref...
302ebb4f9da3815f8dac534c65f9e525dc7036be0730fd9799984552ff17ad92
tolysz/ghcjs-stack
Time.hs
module UnitTests.Distribution.Client.Compat.Time (tests) where import Control.Concurrent (threadDelay) import System.FilePath import Distribution.Simple.Utils (withTempDirectory) import Distribution.Verbosity import Distribution.Client.Compat.Time import Test.Tasty import Test.Tasty.HUnit tests :: Int -> [TestTree...
null
https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/cabal-install/tests/UnitTests/Distribution/Client/Compat/Time.hs
haskell
module UnitTests.Distribution.Client.Compat.Time (tests) where import Control.Concurrent (threadDelay) import System.FilePath import Distribution.Simple.Utils (withTempDirectory) import Distribution.Verbosity import Distribution.Client.Compat.Time import Test.Tasty import Test.Tasty.HUnit tests :: Int -> [TestTree...
ecc21637a9470ede2073e09f66149c0af6cdd4c0726e7e664a56c9c5a390ef67
Simre1/neorg-haskell-parser
Main.hs
module Neorg.Parser.Main ( parse, document, module Neorg.Parser.Paragraph, module Neorg.Parser.Block, module Neorg.Parser.Utils, module Neorg.Parser.Types, ) where import Cleff import Control.Arrow (left) import Data.Text (Text) import qualified Data.Text as T import Neorg.Document import Neorg...
null
https://raw.githubusercontent.com/Simre1/neorg-haskell-parser/78e6003843571b06e6655d9f487000dc14162736/src/Neorg/Parser/Main.hs
haskell
module Neorg.Parser.Main ( parse, document, module Neorg.Parser.Paragraph, module Neorg.Parser.Block, module Neorg.Parser.Utils, module Neorg.Parser.Types, ) where import Cleff import Control.Arrow (left) import Data.Text (Text) import qualified Data.Text as T import Neorg.Document import Neorg...
3321a800ac66a1ce81c47a6c205779294043490a1c1195f292f7f77563f910f3
threatgrid/asami-loom
index.cljc
(ns ^{:doc "Extension of Asami in-memory index to Loom protocols" :author "Paula Gearon"} asami-loom.index (:require [asami.graph :as gr :refer [graph-add graph-delete resolve-triple]] [clojure.set :as set] [loom.graph :as loom :refer [nodes edges has-node? successors* build-graph ...
null
https://raw.githubusercontent.com/threatgrid/asami-loom/48bb93d433171e2f7ca62d130670226f9700075c/src/asami_loom/index.cljc
clojure
drops duplicates for different predicates!
(ns ^{:doc "Extension of Asami in-memory index to Loom protocols" :author "Paula Gearon"} asami-loom.index (:require [asami.graph :as gr :refer [graph-add graph-delete resolve-triple]] [clojure.set :as set] [loom.graph :as loom :refer [nodes edges has-node? successors* build-graph ...
dc3027180bea418d0c6f02fa85d11f5a60dcd6011d99fa03cd55a36bd6e6dd64
esl/MongooseIM
mongoose_graphql_server_admin_mutation.erl
-module(mongoose_graphql_server_admin_mutation). -behaviour(mongoose_graphql). -export([execute/4]). -export([await_execution/4]). -import(mongoose_graphql_helper, [make_error/2]). -ignore_xref([execute/4]). -include("../mongoose_graphql_types.hrl"). execute(#{method := cli}, server, <<"joinCluster">>, #{<<"node">>...
null
https://raw.githubusercontent.com/esl/MongooseIM/3321ef4ad328e452e4a05bab9bf33f32657c685f/src/graphql/admin/mongoose_graphql_server_admin_mutation.erl
erlang
Helpers
-module(mongoose_graphql_server_admin_mutation). -behaviour(mongoose_graphql). -export([execute/4]). -export([await_execution/4]). -import(mongoose_graphql_helper, [make_error/2]). -ignore_xref([execute/4]). -include("../mongoose_graphql_types.hrl"). execute(#{method := cli}, server, <<"joinCluster">>, #{<<"node">>...
6ea2abf2c26a82b8c35569e28bc8694536f87ee3b1302c8afb9bb039c9c7995f
fortytools/holumbus
Sum.hs
module Holumbus.MapReduce.Examples.Sum where import Holumbus.MapReduce.Examples.SimpleDMapReduceIO import Holumbus.MapReduce.Types import GHC.Int type Options=() type K1 = Int type V1 = [Int64] type K2 = Int type V2 = Int64 type V3 = V2 type V4 = Int64 {- The mapping function -} sumMap :: MapFunction Options K1...
null
https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/mapreduce/Examples2/Sum/Sum_2/source/Holumbus/MapReduce/Examples/Sum.hs
haskell
The mapping function The reduce function
module Holumbus.MapReduce.Examples.Sum where import Holumbus.MapReduce.Examples.SimpleDMapReduceIO import Holumbus.MapReduce.Types import GHC.Int type Options=() type K1 = Int type V1 = [Int64] type K2 = Int type V2 = Int64 type V3 = V2 type V4 = Int64 sumMap :: MapFunction Options K1 V1 K2 V2 sumMap env _opts ke...
61114c194337b583f61dee4f8825b12cdadeb4bcfa3eba0fc7cfa3b0ac7efbaf
tonyg/rmacs
search.rkt
#lang racket/base Knuth - Morris - Pratt string & rope search . (provide search-generator search-string search-rope Warning : these do n't act like ` findf ` , quite . findf-in-generator findf-in-rope) (require racket/set) (require racket/match) (require "rope.rkt") (require "...
null
https://raw.githubusercontent.com/tonyg/rmacs/8c99dd5dfa22f1f34707bbe957de268dc6a7a632/rmacs/search.rkt
racket
String String -> (Option Index) String Rope -> (Option Index)
#lang racket/base Knuth - Morris - Pratt string & rope search . (provide search-generator search-string search-rope Warning : these do n't act like ` findf ` , quite . findf-in-generator findf-in-rope) (require racket/set) (require racket/match) (require "rope.rkt") (require "...
f0d5a29a2d5d529d7f0b26aa2d9da10ede77aae3aea581a0694b8e696f38c919
frodwith/cl-urbit
common.lisp
(defpackage #:urbit/tests/common (:use #:cl #:fiveam #:named-readtables #:urbit/tests #:urbit/hoon/syntax #:urbit/nock/common #:urbit/nock/data) (:shadowing-import-from #:fiveam #:!!)) (in-package #:urbit/tests/common) (in-readtable hoon) (def-suite denoun-tests :description "test noun destruc...
null
https://raw.githubusercontent.com/frodwith/cl-urbit/65af924ee58c4c974056f369158bbc1401308fea/t/common.lisp
lisp
(defpackage #:urbit/tests/common (:use #:cl #:fiveam #:named-readtables #:urbit/tests #:urbit/hoon/syntax #:urbit/nock/common #:urbit/nock/data) (:shadowing-import-from #:fiveam #:!!)) (in-package #:urbit/tests/common) (in-readtable hoon) (def-suite denoun-tests :description "test noun destruc...
d11218c4b5dcb18ca00306d60a416d40fe7adbcb4292d2e65f89e1e9925c348a
mk270/ocaml-prolog
operator.mli
open Types exception Invalid_arithmetic_operator val string_of_binary_op : binary_operator -> string val function_of_operation : binary_operator -> int -> int -> int
null
https://raw.githubusercontent.com/mk270/ocaml-prolog/72b4d956eda1c86e35dde8e31b29977de6962120/lib/operator.mli
ocaml
open Types exception Invalid_arithmetic_operator val string_of_binary_op : binary_operator -> string val function_of_operation : binary_operator -> int -> int -> int
d27c834887cc13ce2dff34819917b7282104cd80d2b20c2e11e910d48e31968c
gstew5/snarkl
Field.hs
# LANGUAGE GADTs , TypeSynonymInstances , FlexibleInstances # module Field where import Data.Ratio import Errors class (Show a,Eq a,Ord a) => Field a where zero :: a one :: a add :: a -> a -> a mult :: a -> a -> a neg :: a -> a inv :: a -> Maybe a instance Field Rational where ze...
null
https://raw.githubusercontent.com/gstew5/snarkl/d6ce72b13e370d2965bb226f28a1135269e7c198/src/Field.hs
haskell
License: -1.2.html such that ax + by = g, where g = gcd(a,b). Note that x or y may be negative. return Nothing. /End cited code/ | The finite field of integers mod 'field_p'.
# LANGUAGE GADTs , TypeSynonymInstances , FlexibleInstances # module Field where import Data.Ratio import Errors class (Show a,Eq a,Ord a) => Field a where zero :: a one :: a add :: a -> a -> a mult :: a -> a -> a neg :: a -> a inv :: a -> Maybe a instance Field Rational where ze...
046672ec47e44d4a0949a7b7ebf57cf04a3a4e1e2e9c41190d3f39e741fae8be
softwarelanguageslab/maf
R5RS_various_eta-2.scm
; Changes: * removed : 0 * added : 1 * swaps : 0 ; * negated predicates: 0 ; * swapped branches: 0 ; * calls to id fun: 0 (letrec ((do-something (lambda () (<change> () (display 10)) 10)) (id (lambda...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_various_eta-2.scm
scheme
Changes: * negated predicates: 0 * swapped branches: 0 * calls to id fun: 0
* removed : 0 * added : 1 * swaps : 0 (letrec ((do-something (lambda () (<change> () (display 10)) 10)) (id (lambda (y) (do-something) y)) (r1 ((id (lambda (a) ...
25f424ef3c4f8d6fbf99c5e9470200db35d62ae28fb14d8a1d013cb79eba5f99
apache/couchdb-mango
mango_error.erl
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not % use this file except in compliance with the License. You may obtain a copy of % the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " AS ...
null
https://raw.githubusercontent.com/apache/couchdb-mango/312e2c45535913c190cdef51f6ea65066ccd89dc/src/mango_error.erl
erlang
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 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations u...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(mango_error). -include_lib("couch/include/couch_db.hrl"). -export([ info/2 ]). info(mango_cursor, {no_usable_index, no_indexes_defined}) -...
aeb3b05ed4dbc4ba3457bf815addbf5f2b24ce1e2614b988b68d8126e68304d0
draperlaboratory/cbat_tools
cbat_ai_representation.ml
(***************************************************************************) (* *) Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc. (* *) (* This...
null
https://raw.githubusercontent.com/draperlaboratory/cbat_tools/334523cb4415f187e33f190a691e34b73733ef24/vsa/value_set/lib/src/cbat_ai_representation.ml
ocaml
************************************************************************* This file is provided under the license found in the LICENSE file in the top-level director...
Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc. This work is funded in part by ONR / NAWC Contract N6833518C0107 . Its content does not necessarily reflect the position or policy of the US open !Core_kernel include Bap.Std include Cbat_vsa_utils module MapLattice = Cbat_map_l...
5f72324b9f6f16f53f07c032f2fd3e7a77c62a2f0f6fdb5b1809ecd9013654e8
usocket/usocket
package.lisp
-*- Mode : LISP ; Base : 10 ; Syntax : ANSI - Common - lisp ; Package : CL - USER -*- ;;;; See the LICENSE file for licensing information. (defpackage :usocket (:use #-genera :common-lisp #+genera :future-common-lisp #+abcl :java :split-sequence) (:export #:*version* #:*wildcard-host* ...
null
https://raw.githubusercontent.com/usocket/usocket/e843f021519ca55d883ac8d5b52df5a970d6ad18/package.lisp
lisp
Base : 10 ; Syntax : ANSI - Common - lisp ; Package : CL - USER -*- See the LICENSE file for licensing information. socket constructors and methods udp function (send) udp function (receive) waiting for input-ready state (select() like) convenience macros socket object and accessors IPv6 utility functions IPv...
(defpackage :usocket (:use #-genera :common-lisp #+genera :future-common-lisp #+abcl :java :split-sequence) (:export #:*version* #:*wildcard-host* #:*auto-port* #:+max-datagram-packet-size+ #:socket-listen #:socket-accept #...
9373c3e82f667af1f37f73cdee27a27694391c8903f96a3529f6dd72b9812b65
shirok/Gauche
charconv.scm
;;; ;;; charconv - character code conversion module ;;; Copyright ( c ) 2000 - 2022 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Redistributions of source code must retain ...
null
https://raw.githubusercontent.com/shirok/Gauche/e97efb5e54f9ab97746369b8ac748f338224c746/ext/charconv/charconv.scm
scheme
charconv - character code conversion module Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the foll...
Copyright ( c ) 2000 - 2022 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (define-module gauche.charconv (use scheme...
f1726e9e9c66e4597c8acdc3e23bb74815ca28fcb228cbdad8b71f6b80b548fe
cnuernber/dtype-next
tensor.clj
(ns tech.v3.tensor Autogenerated from tech.v3.tensor - api-- DO NOT EDIT "ND bindings for the tech.v3.datatype system. A Tensor is conceptually just a tuple of a buffer and an index operator that is capable of converting indexes in ND space into a single long index into the buffer. Tensors implement the tech....
null
https://raw.githubusercontent.com/cnuernber/dtype-next/228b88af967fef743ef95f3bf3372d08a356d2e8/src/tech/v3/tensor.clj
clojure
(ns tech.v3.tensor Autogenerated from tech.v3.tensor - api-- DO NOT EDIT "ND bindings for the tech.v3.datatype system. A Tensor is conceptually just a tuple of a buffer and an index operator that is capable of converting indexes in ND space into a single long index into the buffer. Tensors implement the tech....
f126d09d1fd3dde8897826941a18edb916700029803588603e7bcc46141ea449
JHU-PL-Lab/jaylang
argparse.ml
open Core open Sato_args let timeout_parser : Time.Span.t Command.Arg_type.t = Command.Arg_type.create (fun s -> Scanf.sscanf s "%d" Time.Span.of_int_sec) let parse_commandline_config () = let config = ref default_config in let command = Command.basic ~summary:"Sato top to run ODEFA or NATODEFA file" ...
null
https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/c1ec1566cd3d5429fe344748218b342738d0226a/src/sato/utils/argparse.ml
ocaml
let%map_open target = flag "-t" (required target_parser) ~doc:"target_point" and is_instrumented = flag "-a" (optional_with_default false bool) ~doc:"instrumented" and expected_inputs = flag "-i" (optional int_option_list_parser) ~doc:"expected inputs" target; engine; is...
open Core open Sato_args let timeout_parser : Time.Span.t Command.Arg_type.t = Command.Arg_type.create (fun s -> Scanf.sscanf s "%d" Time.Span.of_int_sec) let parse_commandline_config () = let config = ref default_config in let command = Command.basic ~summary:"Sato top to run ODEFA or NATODEFA file" ...
6660343196951818495bffdf203547a121a3cb22986f83a980d817c8e63ef9b9
amnh/phylocaml
sequence_o.ml
type t = unit type spec = unit let filter_codes _ _ = failwith "TODO" let filter_codes_comp _ _ = failwith "TODO" let get_codes _ = failwith "TODO" let recode _ _ = failwith "TODO" let cardinal _ = failwith "TODO" let mem _ _ = failwith "TODO" let union _ _ _ = failwith "TODO" let compare _ _ = failwith "TODO" let ...
null
https://raw.githubusercontent.com/amnh/phylocaml/86aebc4f2664752668b16707214b3cad099434c0/lib/sequence_o.ml
ocaml
type t = unit type spec = unit let filter_codes _ _ = failwith "TODO" let filter_codes_comp _ _ = failwith "TODO" let get_codes _ = failwith "TODO" let recode _ _ = failwith "TODO" let cardinal _ = failwith "TODO" let mem _ _ = failwith "TODO" let union _ _ _ = failwith "TODO" let compare _ _ = failwith "TODO" let ...
6630a2e8c4bfa0520221086583897bba07d01f43507ad2840ebeb61e6e013330
ragkousism/Guix-on-Hurd
base.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2016 , 2017 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of t...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/tests/base.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2016 , 2017 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu tests base) #:use-module (gnu tests) #:use-module (gnu system) #:use-module (gnu ...
95bd17cd04262bf837eca65afab14d0e338232a2256efb4a3d68eab6010dd1cd
sras/servant-examples
JsonOutput.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # module JsonOutput where import Servant ( Get , JSON , Proxy(..) , type (:>) -- Syntax for importing type operator ...
null
https://raw.githubusercontent.com/sras/servant-examples/923b54a13e14a4c2a37a3633dc7e2fa8fe49adc6/src/JsonOutput.hs
haskell
# LANGUAGE OverloadedStrings # Syntax for importing type operator In this example we see how to output json encoded data from the endpoints. This is our json payload that we will output from the endpoint. curl -v :4000/payload > GET /payload HTTP/1.1 > User-Agent: curl/7.47.0 > Accept: */* > < Transfer-Encod...
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # module JsonOutput where import Servant ( Get , JSON , Proxy(..) ) import Servant.Server (Handler, Server, Application, serve) import Network.Wai.Handler.Warp (...
345204aeb5d89b70c9151c3376c80a6a447350f97b79678ca908be080b1efda9
fluree/db
user.cljs
(ns user) ; commands to test cljs (comment (fluree.db.util.log/set-level! :finest) (def my-conn (flureedb/connect ":8090")) (def my-db (flureedb/db my-conn "test/chat")) (def my-query {:select ["*"] :from "_collection"}) (-> (flureedb/ledger-stats my-conn "test/chat") (.then #(print %)) (.catc...
null
https://raw.githubusercontent.com/fluree/db/7c8a8b80787a6c565f9cbd510891a9ee02108184/dev/user.cljs
clojure
commands to test cljs returns transaction id to be used in a query Timeout of 6000ms reached without transaction being included in new block. (.then #(print %)) (.catch #(print "Error: " %)))) (let [my-query "SELECT ?chat ?message ?person ?instant ?comments WHERE { ?chat fd:chat/message ?message; f...
(ns user) (comment (fluree.db.util.log/set-level! :finest) (def my-conn (flureedb/connect ":8090")) (def my-db (flureedb/db my-conn "test/chat")) (def my-query {:select ["*"] :from "_collection"}) (-> (flureedb/ledger-stats my-conn "test/chat") (.then #(print %)) (.catch #(print (str "Error: "...
593a9bd335072ec3bc242f49e7a4c90e2266327d258d767ee9b996ef0e426c7c
javalib-team/sawja
jCFAPrinter.ml
* This file is part of SAWJA * Copyright ( c)2013 ( INRIA ) * * This program is free software : you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation , either version 3 of * the License , or ( at your option ) a...
null
https://raw.githubusercontent.com/javalib-team/sawja/da39f9c1c4fc52a1a1a6350be0e39789812b6c00/src/jCFAPrinter.ml
ocaml
* This file is part of SAWJA * Copyright ( c)2013 ( INRIA ) * * This program is free software : you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation , either version 3 of * the License , or ( at your option ) a...
d8eb838b48168dec1935cbb4dab94c71d98d704946ce94e2f7f2c2e7c944adb7
jayrbolton/coursework
young_tableau.hs
import Data.List data Tableau a = Tableau [[Maybe a]] deriving Show t0 = Tableau [[(Just 2),(Just 3),(Just 4),(Just 5)], [(Just 8),(Just 9),(Just 12), Nothing], [(Just 14), Nothing, Nothing, Nothing], [(Just 16), Nothing, Nothing, Nothing]] extract_min t@(Tableau [[]]) = (N...
null
https://raw.githubusercontent.com/jayrbolton/coursework/f0da276527d42a6751fb8d29c76de35ce358fe65/student_originated_software/analysis/midterm/young_tableau.hs
haskell
import Data.List data Tableau a = Tableau [[Maybe a]] deriving Show t0 = Tableau [[(Just 2),(Just 3),(Just 4),(Just 5)], [(Just 8),(Just 9),(Just 12), Nothing], [(Just 14), Nothing, Nothing, Nothing], [(Just 16), Nothing, Nothing, Nothing]] extract_min t@(Tableau [[]]) = (N...
73612bc55bf90f7f9f01630e8a1efe5826aab5f58e03f2f9048364e1347b6a75
0install/0install
static_0install.ml
Copyright ( C ) 2013 , the README file for details , or visit . * See the README file for details, or visit . *) * The main executable for static ( native or bytecode ) builds . Portable bytecode uses instead . Portable bytecode uses 0install.ml instead. *) (* Use the Unix module we're compile...
null
https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/static_0install.ml
ocaml
Use the Unix module we're compiled with, rather than loading it dynamically.
Copyright ( C ) 2013 , the README file for details , or visit . * See the README file for details, or visit . *) * The main executable for static ( native or bytecode ) builds . Portable bytecode uses instead . Portable bytecode uses 0install.ml instead. *) module RealSystem = Support.System.R...
c0f248bc75456f8fe68a516046c349664a093c8e3bc2a3bedd889f3c10e3a411
alanz/ghc-exactprint
T9867.hs
{-# LANGUAGE PatternSynonyms, ScopedTypeVariables #-} module T9867 where pattern Nil = [] :: [a]
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/T9867.hs
haskell
# LANGUAGE PatternSynonyms, ScopedTypeVariables #
module T9867 where pattern Nil = [] :: [a]
2c6d677b3981d706f05c98de6b1cd019cc3c22ff22be16dd44c4c5c92b2a2b45
inconvergent/weird
ex.lisp
#!/usr/local/bin/sbcl --script (load "~/quicklisp/setup.lisp") (ql:quickload :weird) (veq:vdef* init-weir () (let ((wer (weir:make :max-verts 1000 :name :weirinst))) (weir:2add-vert! wer 70f0 200f0) (weir:2add-vert! wer 20f0 300f0) (weir:2add-verts! wer (veq:f2$+ (rnd:2nin-square 20 500f0) ...
null
https://raw.githubusercontent.com/inconvergent/weird/106d154ec2cd0e4ec977c3672ba717d6305c1056/examples/ex.lisp
lisp
silly alteration example. use :db to print alteration code. :mode :warn wil print a warning because a? depends on v?, but v? does not exist for every a?. use :mode :t to ignore, or :mode :strict to throw an error. any of the alterations are applied. for that reason we use with-gs to names are used to reference th...
#!/usr/local/bin/sbcl --script (load "~/quicklisp/setup.lisp") (ql:quickload :weird) (veq:vdef* init-weir () (let ((wer (weir:make :max-verts 1000 :name :weirinst))) (weir:2add-vert! wer 70f0 200f0) (weir:2add-vert! wer 20f0 300f0) (weir:2add-verts! wer (veq:f2$+ (rnd:2nin-square 20 500f0) ...
f1b0010563cfe4b6eda729927b26a4520413e84bdab8c2ad2c639cea02bbab05
hoon0612/Lisp-in-OCaml
builtin.ml
open Environment;; open Types;; let unbox s_exp = function | Types . Cons ( car , cdr ) - > raise ( Error " Invalid " ) | _ as s - > Types . String let unbox s_exp = function | Types.Cons (car, cdr) -> raise (Error "Invalid") | _ as s -> Types.String *) let rec eval_list s_exp environment = match s...
null
https://raw.githubusercontent.com/hoon0612/Lisp-in-OCaml/498ace173018af8f7772b3db803872e76b5902cf/builtin.ml
ocaml
let eval_define arg1 arg2 environment = "define", NormalTypeN eval_define;
open Environment;; open Types;; let unbox s_exp = function | Types . Cons ( car , cdr ) - > raise ( Error " Invalid " ) | _ as s - > Types . String let unbox s_exp = function | Types.Cons (car, cdr) -> raise (Error "Invalid") | _ as s -> Types.String *) let rec eval_list s_exp environment = match s...
363dc57cd4c4afcdad7f92a421751759d75c6300fe31c33d3f44fcbcdf9658d8
oakmac/chessboard2
data_transforms_test.cljs
(ns test.chessboard2.util.data-transforms-test (:require [cljs.test :refer [deftest is]] [com.oakmac.chessboard2.util.data-transforms :refer [js-map->clj]] [goog.object :as gobj])) (deftest js-map->clj-test (let [empty-map (js/Map.)] (is (= (js-map->clj empty-map) {}))) (let [map1 (js/Map.)] (.s...
null
https://raw.githubusercontent.com/oakmac/chessboard2/f6cca1d9e8a76b495147b95ced83e9beb48dbd11/src-cljs/test/chessboard2/util/data_transforms_test.cljs
clojure
(ns test.chessboard2.util.data-transforms-test (:require [cljs.test :refer [deftest is]] [com.oakmac.chessboard2.util.data-transforms :refer [js-map->clj]] [goog.object :as gobj])) (deftest js-map->clj-test (let [empty-map (js/Map.)] (is (= (js-map->clj empty-map) {}))) (let [map1 (js/Map.)] (.s...
a12ed91e6f1946decaf58ccbee47eb5d980d82532e58faf742d34cd11748fa0e
DSiSc/why3
tptp_typing.ml
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University (* ...
null
https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/plugins/tptp/tptp_typing.ml
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University General Public License version 2.1 , with the special exception open Format open Tptp_ast open Why3 open Wstdlib open Ident open Ty open Term open Decl open Theory let ...
939eb3a0dde831236e0a7ffd82bb50c0ba1522fb693632f916092d1053ab1165
paf31/partial
Partial.hs
module Data.List.Partial where import Control.Partial head :: (Partial) => [a] -> a head (x:_) = x head _ = error "head: empty list" tail :: (Partial) => [a] -> [a] tail (_:xs) = xs tail _ = error "tail: empty list"
null
https://raw.githubusercontent.com/paf31/partial/dd8f65e03fa6dfd7584380cbd1b83c3c0e0731b7/src/Data/List/Partial.hs
haskell
module Data.List.Partial where import Control.Partial head :: (Partial) => [a] -> a head (x:_) = x head _ = error "head: empty list" tail :: (Partial) => [a] -> [a] tail (_:xs) = xs tail _ = error "tail: empty list"
47ceb323b1c3d4f807f6ffc8f299e851776e61052b2cd31698b95c985fc33544
techascent/tech.compute
driver.clj
(ns tech.compute.verify.driver (:require [clojure.test :refer :all] [tech.compute.driver :as drv] [tech.v2.datatype :as dtype] [tech.v2.datatype.functional :as dfn] [tech.compute.verify.utils :as verify-utils] [tech.compute :as compute] [tech.com...
null
https://raw.githubusercontent.com/techascent/tech.compute/716d270da7018915bcdb42d9942d33991b5931c8/src/tech/compute/verify/driver.clj
clojure
(ns tech.compute.verify.driver (:require [clojure.test :refer :all] [tech.compute.driver :as drv] [tech.v2.datatype :as dtype] [tech.v2.datatype.functional :as dfn] [tech.compute.verify.utils :as verify-utils] [tech.compute :as compute] [tech.com...
07804d6d771f1f80978d4f82b7ea03a99726995f9f4b70b2d35f1916c537ee84
seereason/logic-classes
ClauseNormalForm.hs
# LANGUAGE FunctionalDependencies , MultiParamTypeClasses # module Data.Logic.Classes.ClauseNormalForm ( ClauseNormalFormula(clauses, makeCNF, satisfiable) ) where import Control.Monad (MonadPlus) import Data.Logic.ATP.Lit import Data.Set as S |A class to represent formulas in CNF , which is the conjunction...
null
https://raw.githubusercontent.com/seereason/logic-classes/819059218027c3ee77bd2ef3a873fcca230d54b4/Data/Logic/Classes/ClauseNormalForm.hs
haskell
a set of disjuncted literals each which may or may not be negated.
# LANGUAGE FunctionalDependencies , MultiParamTypeClasses # module Data.Logic.Classes.ClauseNormalForm ( ClauseNormalFormula(clauses, makeCNF, satisfiable) ) where import Control.Monad (MonadPlus) import Data.Logic.ATP.Lit import Data.Set as S |A class to represent formulas in CNF , which is the conjunction...
c69caa6579e7fd6e49f1a4d1312146ceea06964251a857f5f8ced899d96f56bb
Kakadu/fp2022
prettyprint.ml
* Copyright 2022 - 2023 , and contributors * SPDX - License - Identifier : LGPL-3.0 - or - later open Format open Parsetree open Typedtree open Errors let pp_expr = let op_to_str = function | Plus -> "+" | Minus -> "-" | Mult -> "*" | Divide -> "/" | Mod -> "mod" | Eq -> "=" | Neq -> ...
null
https://raw.githubusercontent.com/Kakadu/fp2022/5365f2f52e3e173cdb052abcfdbfb66fc70fe799/OCamlLabeledArgs/lib/prettyprint.ml
ocaml
Never happens, if type inference is correct Never happens, if type inference is correct
* Copyright 2022 - 2023 , and contributors * SPDX - License - Identifier : LGPL-3.0 - or - later open Format open Parsetree open Typedtree open Errors let pp_expr = let op_to_str = function | Plus -> "+" | Minus -> "-" | Mult -> "*" | Divide -> "/" | Mod -> "mod" | Eq -> "=" | Neq -> ...
1d81a1c235a8d360c6027bfe4d0cd7c23c249438b4f8eeb2e3da3b373ee17221
haskell/hoopl
PP.hs
# OPTIONS_GHC -Wall # # LANGUAGE RankNTypes , ScopedTypeVariables , GADTs , EmptyDataDecls , PatternGuards , TypeFamilies , NamedFieldPuns # module PP (tuple) where tuple :: [String] -> String tuple [] = "()" tuple [a] = "(" ++ a ++ ")" tuple (a:as) = "(" ++ a ++ concat (map ((++) ", ") as) ++ ")"
null
https://raw.githubusercontent.com/haskell/hoopl/89dde6af5b2fadfad726412c00a1ab01d34fd2a0/testing/PP.hs
haskell
# OPTIONS_GHC -Wall # # LANGUAGE RankNTypes , ScopedTypeVariables , GADTs , EmptyDataDecls , PatternGuards , TypeFamilies , NamedFieldPuns # module PP (tuple) where tuple :: [String] -> String tuple [] = "()" tuple [a] = "(" ++ a ++ ")" tuple (a:as) = "(" ++ a ++ concat (map ((++) ", ") as) ++ ")"
f5074197c7b1f9a72ac8b6178c650842adaed97b84fccac65fd51c61bd6bb2e4
uw-unsat/serval
base.rkt
#lang rosette (require "../lib/bvarith.rkt" (prefix-in core: "../lib/core.rkt")) (provide (all-defined-out) (all-from-out "../lib/bvarith.rkt")) (define-generics register (register-size register) (register-name register) (register-encode register) (register-ref cpu register) (register-set! cpu register...
null
https://raw.githubusercontent.com/uw-unsat/serval/be11ecccf03f81b8bd0557acf8385a6a5d4f51ed/serval/x86/base.rkt
racket
split before truncation split the pc before add bump the pc
#lang rosette (require "../lib/bvarith.rkt" (prefix-in core: "../lib/core.rkt")) (provide (all-defined-out) (all-from-out "../lib/bvarith.rkt")) (define-generics register (register-size register) (register-name register) (register-encode register) (register-ref cpu register) (register-set! cpu register...
4d3ab6caa8a18e1aabd152def746973a5459f1cf3efbe87d375d56c05e1b4dad
ocurrent/ocurrent-deployer
local.ml
(* The ocurrent-deployer-local command, for testing changes locally. *) A low - security Docker Hub user used to push images to the staging area . Low - security because we never rely on the tags in this repository , just the hashes . Low-security because we never rely on the tags in this repository, just th...
null
https://raw.githubusercontent.com/ocurrent/ocurrent-deployer/ba1a1b478482d24ec35432d78d0ba28c9a00fefb/src/local.ml
ocaml
The ocurrent-deployer-local command, for testing changes locally. Placeholder webhook_secret, when running in local mode. The main thread evaluating the pipeline. Command-line parsing
A low - security Docker Hub user used to push images to the staging area . Low - security because we never rely on the tags in this repository , just the hashes . Low-security because we never rely on the tags in this repository, just the hashes. *) open Deployer let staging_user = "ocurrentbuilder" let we...
97686d33555de5196e82a8935878d5f350b17e3cb2fb57ff14eab635d60d02ae
unnohideyuki/bunny
sample333.hs
x :: Double x = pi y :: Float y = pi main = do print $ floatRadix x print $ floatRadix y print (encodeFloat 2 6 :: Double) print (encodeFloat 2 6 :: Float) print (encodeFloat 4 (-4) :: Double) print (encodeFloat 4 (-4) :: Float) print (encodeFloat (-2) (-4) ...
null
https://raw.githubusercontent.com/unnohideyuki/bunny/ecf990bc9b35a8d2df86856c554d9db6d34ff487/compiler/test/samples/sample333.hs
haskell
x :: Double x = pi y :: Float y = pi main = do print $ floatRadix x print $ floatRadix y print (encodeFloat 2 6 :: Double) print (encodeFloat 2 6 :: Float) print (encodeFloat 4 (-4) :: Double) print (encodeFloat 4 (-4) :: Float) print (encodeFloat (-2) (-4) ...
4a71cd91737a9c8fa5ac0313809f07b5eda7169488a31ed5c42984b82c0a27b6
eliben/paip-in-clojure
grammar_as_lisp.clj
Chapter 2 : " A simple Lisp Program " - generative grammar as Lisp functions . ;;; Notes : - Using lists , similar to the original PAIP code . ;;; - Clojure code gets compiled, so functions need to be known before they are ;;; used. We can either modify the definition order or use 'declare'. (ns paip.2-grammar...
null
https://raw.githubusercontent.com/eliben/paip-in-clojure/360f8d420281a2cd0885b220cc61c2a7c90a0b42/src/paip/2_grammar/grammar_as_lisp.clj
clojure
- Clojure code gets compiled, so functions need to be known before they are used. We can either modify the definition order or use 'declare'. Generate some sentences
Chapter 2 : " A simple Lisp Program " - generative grammar as Lisp functions . Notes : - Using lists , similar to the original PAIP code . (ns paip.2-grammar.grammar_as_lisp) (defn one-of "Pick one element of s and make a list of it" [s] (list (rand-nth s))) (declare noun-phrase) (defn Prep [] (one-of '...
f15c9e8c0cd9c98188ab6bdeff9398e4e788f5d2af15dae626e4c71432dd885c
nickzuber/lets-make-a-compiler
time.ml
let format (seconds : float) : string = let minutes = int_of_float (floor (seconds /. 60.)) in let seconds' = mod_float seconds 60. in let seconds_text = if seconds > 0. then Printf.sprintf "%.2fs" seconds' else "" in let minutes_text = if minutes > 0 then Printf.sprintf "%dm " minutes else "" in minutes_tex...
null
https://raw.githubusercontent.com/nickzuber/lets-make-a-compiler/ee2337b116f07c1357f7b70bd09f1503e39fdc88/utils/time.ml
ocaml
let format (seconds : float) : string = let minutes = int_of_float (floor (seconds /. 60.)) in let seconds' = mod_float seconds 60. in let seconds_text = if seconds > 0. then Printf.sprintf "%.2fs" seconds' else "" in let minutes_text = if minutes > 0 then Printf.sprintf "%dm " minutes else "" in minutes_tex...