_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
658dfcf7a13564e08ff55f2b7bb15967bd07edbfd26758533f5c1a017976697b
processone/tsung
ts_fs.erl
%%% Copyright 2009 © INRIA %%% Author : < > Created : 20 août 2009 by < > %%% %%% 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 y...
null
https://raw.githubusercontent.com/processone/tsung/b0ed22981b534ee3becefb2124a6e168c664d434/src/tsung/ts_fs.erl
erlang
This program is free software; you can redistribute it and/or modify (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 PURPOSE. See the GNU Genera...
Copyright 2009 © INRIA Author : < > Created : 20 août 2009 by < > it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or You should have received a copy of the GNU General Public License Foundation , Inc. , 59 T...
457a73879b3cda39082a7e356a2988f59e8efbd9407dd2d93265840e1b9c0a61
rixed/ramen
CodeGenLib_Factors.ml
open Batteries open RamenHelpers open RamenLog module Files = RamenFiles module N = RamenName module T = RamenTypes (* * Factors possible values: *) type possible_values_index = { min_time : float ; (* Name of the previous file where that set was saved. * This file is renamed after every write. *) fn...
null
https://raw.githubusercontent.com/rixed/ramen/8674ddc3928a7fa457b8a80580ef40d20ea12a1f/src/CodeGenLib_Factors.ml
ocaml
* Factors possible values: Name of the previous file where that set was saved. * This file is renamed after every write. Just a placeholder to init the initial array. We are going to write a new file and delete the former one. * We only need a lock when that's the same file. Although we though we wou...
open Batteries open RamenHelpers open RamenLog module Files = RamenFiles module N = RamenName module T = RamenTypes type possible_values_index = { min_time : float ; fname : N.path ; mutable values : T.value Set.t } let possible_values_empty = { min_time = max_float ; fname = N.path "" ; values = Set...
b6c89393ed6251238baded783726004ebf8e00f939bbc14c9c6ba0dc29e12b80
PacktWorkshops/The-Clojure-Workshop
repl.clj
(in-ns 'garden) (def vegetables ["cucumber" "carrot"]) (def fruits ["orange" "apple" "melon"]) (in-ns 'shops) (clojure.core/refer 'garden :rename '{fruits owoce}) vegetables fruits owoce (use '[clojure.string :only [split]]) (split "Clojure workshop" #" ") (use '[clojure.edn :rename {read-string string-read}...
null
https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter08/Exercise8.06/repl.clj
clojure
(in-ns 'garden) (def vegetables ["cucumber" "carrot"]) (def fruits ["orange" "apple" "melon"]) (in-ns 'shops) (clojure.core/refer 'garden :rename '{fruits owoce}) vegetables fruits owoce (use '[clojure.string :only [split]]) (split "Clojure workshop" #" ") (use '[clojure.edn :rename {read-string string-read}...
8df3753a2539c59627e2c6f7bfe79d34d210ebef476c67af82618fee724fc52b
guicho271828/alien
debug.lisp
(in-package :alien.lib) (sb-c:defknown nop () null (sb-c::always-translatable) :overwrite-fndb-silently t) (sb-c:defknown nop2 (*) null (sb-c::always-translatable) :overwrite-fndb-silently t) (in-package "SB-VM") (define-vop (alien.lib::nop) (:policy :fast-safe) (:translate alien.lib::nop) (:results (res...
null
https://raw.githubusercontent.com/guicho271828/alien/6987d034426b8928adf67f498dc6cb06fd7f923e/lib/debug.lisp
lisp
(in-package :alien.lib) (sb-c:defknown nop () null (sb-c::always-translatable) :overwrite-fndb-silently t) (sb-c:defknown nop2 (*) null (sb-c::always-translatable) :overwrite-fndb-silently t) (in-package "SB-VM") (define-vop (alien.lib::nop) (:policy :fast-safe) (:translate alien.lib::nop) (:results (res...
9702050f8b41d65877b95dc004728e4472566a6b38b62c8151b683983e617e2a
ntoronto/drbayes
functions.rkt
#lang racket (module untyped-defs racket/base (require "../set/value.rkt") (provide (all-defined-out)) (define (any->value v f fail) (let loop ([v v]) (define x (f v)) (cond [(or (null? x) (boolean? x)) x] [(pair? x) (cons (loop (car x)) (loop (cdr x)))] [(real? x)...
null
https://raw.githubusercontent.com/ntoronto/drbayes/e59eb7c7867118bf4c77ca903e133c7530e612a3/drbayes/private/language/functions.rkt
racket
#lang racket (module untyped-defs racket/base (require "../set/value.rkt") (provide (all-defined-out)) (define (any->value v f fail) (let loop ([v v]) (define x (f v)) (cond [(or (null? x) (boolean? x)) x] [(pair? x) (cons (loop (car x)) (loop (cdr x)))] [(real? x)...
c3ba5aacdd9124592ba8c1bfdd0d89bd1ee16c454beb85a8b9de2e33e521885a
dktr0/estuary
RenderOp.hs
module Estuary.Render.RenderOp where A RenderOp represents a command that can be sent to Estuary 's render engine putRenderOp from Estuary . Widgets . R is used to send a command to the render engine ( and the render engine uses takeRenderOps to receive those commands ) import Estuary.Types.Definition import Es...
null
https://raw.githubusercontent.com/dktr0/estuary/c08a4790533c983ba236468e0ae197df50f2109f/client/src/Estuary/Render/RenderOp.hs
haskell
module Estuary.Render.RenderOp where A RenderOp represents a command that can be sent to Estuary 's render engine putRenderOp from Estuary . Widgets . R is used to send a command to the render engine ( and the render engine uses takeRenderOps to receive those commands ) import Estuary.Types.Definition import Es...
4890a47b4648804c47dda11fa8148cee23c3be883dd5a3c8b1e01ac843984f5d
ruhler/smten
Solver.hs
module Smten.Runtime.Solver ( Solver(..), solverFromAST, ) where import Smten.Runtime.Model import Smten.Runtime.Result import Smten.Runtime.Formula.Finite import Smten.Runtime.Formula.BoolF import Smten.Runtime.SmtenHS import Smten.Runtime.SolverAST import Smten.Runtime.Build newtype Solver = Solver { ...
null
https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-lib/Smten/Runtime/Solver.hs
haskell
solve s vars formula s - the solver to use formula - the formula for the query Returns: Just a model if the query is satisfiable, Nothing if the query is unsatisfiable The model contains values for all user-level variables that appear in the formula. TODO: why do we need this? # SCC "Build" # # S...
module Smten.Runtime.Solver ( Solver(..), solverFromAST, ) where import Smten.Runtime.Model import Smten.Runtime.Result import Smten.Runtime.Formula.Finite import Smten.Runtime.Formula.BoolF import Smten.Runtime.SmtenHS import Smten.Runtime.SolverAST import Smten.Runtime.Build newtype Solver = Solver { ...
9ae2f289a1602d2ccc8901f34599766b12998f8871a7ff9ed371e6148a1ea84e
binaryage/chromex
permissions.clj
(ns chromex.app.permissions "Use the chrome.permissions API to request declared optional permissions at run time rather than install time, so users understand why the permissions are needed and grant only those that are necessary. * available since Chrome 36 * " (:refer-clojure :only [defmacro defn a...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/apps/chromex/app/permissions.clj
clojure
for example, if you -- events ----------------------------------------------------------------------------------------------------------------- docs: /#tapping-events -- convenience ------------------------------------------------------------------------------------------------------------ -----------------------...
(ns chromex.app.permissions "Use the chrome.permissions API to request declared optional permissions at run time rather than install time, so users understand why the permissions are needed and grant only those that are necessary. * available since Chrome 36 * " (:refer-clojure :only [defmacro defn a...
3797a9201f88e065fb9734b33beccaa82e0df1cc3f1631b72434de9e92919712
input-output-hk/cardano-wallet
Paths.hs
-- | Copyright : © 2018 - 2020 IOHK -- License: Apache-2.0 -- -- Utility function for finding the package test data directory. module Test.Utils.Paths ( getTestData , getTestDataPath , inNixBuild ) where import Prelude import Control.Monad.IO.Class ( liftIO ) import Data.FileEmbed ( makeRel...
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet/4dd33e7842f5cf3d33ffdfde35a3398504cc7dc0/lib/test-utils/src/Test/Utils/Paths.hs
haskell
| License: Apache-2.0 Utility function for finding the package test data directory. It combines the current source file location and cabal file to locate the package directory in such a way that works in both the stack/cabal package build and ghci. makes the test data path relative to the current directory. ...
Copyright : © 2018 - 2020 IOHK module Test.Utils.Paths ( getTestData , getTestDataPath , inNixBuild ) where import Prelude import Control.Monad.IO.Class ( liftIO ) import Data.FileEmbed ( makeRelativeToProject ) import Language.Haskell.TH.Syntax ( Exp, Q, liftData ) import System.Enviro...
294a46aa109917bea8420331ccd517ec2e4c44c990c553d9e6ad21cd1affeac9
composewell/streamly
Utf8.hs
-- | Module : Streamly . Internal . Unicode . Utf8 Copyright : ( c ) 2021 Composewell Technologies -- License : BSD-3-Clause -- Maintainer : -- Stability : experimental Portability : GHC XXX We can move this to stream - core / streamly - unicode - core , and provide an additional module in s...
null
https://raw.githubusercontent.com/composewell/streamly/449d48d379310d1b2a1b22be0c49a9ae29925dff/src/Streamly/Internal/Unicode/Utf8.hs
haskell
| License : BSD-3-Clause Maintainer : Stability : experimental which will have a dependency on unicode-data. * Type * Creation and elimination ------------------------------------------------------------------------------ Imports --------------------------------------------------------------------------...
Module : Streamly . Internal . Unicode . Utf8 Copyright : ( c ) 2021 Composewell Technologies Portability : GHC XXX We can move this to stream - core / streamly - unicode - core , and provide an additional module in streamly - unicode for case conversions ( because it depends on unicode - data ) ....
b20ef94b165256fbc88437a0c27c09454e8887083f8f8ae7ac114b57127a8d24
tezos/tezos-mirror
init_storage.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > Copyright ( c...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/6cce98810919826c01005f2ffbd02a2302aa91bb/src/proto_alpha/lib_protocol/init_storage.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > Copyright ( c ) 2019 - 2020 Nomadic Labs < > Copyright ( c ) 2021 DaiLambda , Inc. < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit pers...
40e08d80447871057d08751858c91223ef46528aac01ff02e29f0d35c0888f02
zarkone/stumpwm.d
mpd.lisp
;;;; mpd.lisp (in-package #:mpd) MPD client & formatters for stumpwm ;;; Copyright 2007 - 2008 , Ivy Foster . ;;; Maintainer : ;;; ;;; This module 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 ; ei...
null
https://raw.githubusercontent.com/zarkone/stumpwm.d/021e51c98a80783df1345826ac9390b44a7d0aae/modules/minor-mode/mpd/mpd.lisp
lisp
mpd.lisp This module is free software; you can redistribute it and/or modify either version 2 , or ( at your option ) any later version. This module 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 PU...
(in-package #:mpd) MPD client & formatters for stumpwm Copyright 2007 - 2008 , Ivy Foster . Maintainer : it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License #-(or sbcl clisp lispworks6 ccl) (error "Unimplemented for ~S."...
efa954fcdde71abeeb46378e34afeeadd0e2249b6aa680222720da7940d61339
mkhan45/RustScript2
preprocess.ml
open Base open Types let inline_threshold = 3 let assoc_add ls x = if List.Assoc.mem ls ~equal:String.equal x then ls else (x, List.length ls)::ls type tree_node = | ExprNode of (expr Located.t) | PatNode of pattern let unwrap_expr_node = function | ExprNode n -> n | _ -> as...
null
https://raw.githubusercontent.com/mkhan45/RustScript2/01d8d67f4328f5cf8abb45fefa3dfa0e49fac98e/lib/preprocess.ml
ocaml
open Base open Types let inline_threshold = 3 let assoc_add ls x = if List.Assoc.mem ls ~equal:String.equal x then ls else (x, List.length ls)::ls type tree_node = | ExprNode of (expr Located.t) | PatNode of pattern let unwrap_expr_node = function | ExprNode n -> n | _ -> as...
db9c5ad7d959ff73db11c951edd9d21cee7488ac6865223cbc10afd2aafe7c0e
pelle/oauthentic
ring.clj
(ns oauthentic.ring (:use [oauthentic.core] [ring.util.response :only [redirect]]) (:import (java.net URI))) (defn oauthentic-error-handler [req] (redirect "/")) (defn oauthentic-login-handler [req] (assoc (redirect "/") :session {:oauthentic-token (req :oauthentic-token)})) (defn oauthentic-handler...
null
https://raw.githubusercontent.com/pelle/oauthentic/20d85e9bcc4510af52e77f88fe8994fb7d137546/src/oauthentic/ring.clj
clojure
(ns oauthentic.ring (:use [oauthentic.core] [ring.util.response :only [redirect]]) (:import (java.net URI))) (defn oauthentic-error-handler [req] (redirect "/")) (defn oauthentic-login-handler [req] (assoc (redirect "/") :session {:oauthentic-token (req :oauthentic-token)})) (defn oauthentic-handler...
5c40d9427fd37ed88497485d76888abc916598049ac3b2c4755ef6fc03c6d044
racket/parser-tools
info.rkt
#lang info (define compile-omit-paths '("private-lex/error-tests.rkt"))
null
https://raw.githubusercontent.com/racket/parser-tools/d76cb89c36c22ce569475b628164393c9ed35fb6/parser-tools-lib/parser-tools/info.rkt
racket
#lang info (define compile-omit-paths '("private-lex/error-tests.rkt"))
672da1b0db7d0a80d3121b873c94220151b75ebd77d4911f20f71661eaa2bfe0
namachan10777/scad-ml
rendered_sphere.ml
open Scad_ml let rendered_sphere = Scad.sphere ~fn:100 5. |> Scad.render let () = print_string (Scad.to_string rendered_sphere)
null
https://raw.githubusercontent.com/namachan10777/scad-ml/b254d9c52ad406d4301b3faac5b566f9aa480273/test/rendered_sphere.ml
ocaml
open Scad_ml let rendered_sphere = Scad.sphere ~fn:100 5. |> Scad.render let () = print_string (Scad.to_string rendered_sphere)
3db44a46761dd7d71f4591795b387fa68565828959b1fb00dd1868c6864725d1
ptaoussanis/carmine
ring.clj
(ns taoensso.carmine.ring "Carmine-backed Ring session store." {:author "Peter Taoussanis"} (:require [ring.middleware.session] [taoensso.encore :as enc] [taoensso.carmine :as car :refer (wcar)])) (defrecord CarmineSessionStore [conn-opts prefix ttl-secs extend-on-read?] ring.middlewar...
null
https://raw.githubusercontent.com/ptaoussanis/carmine/7e8b808a054d0d236775ada9bd7d6378f0127bcf/src/taoensso/carmine/ring.clj
clojure
1.x backwards compatiblity
(ns taoensso.carmine.ring "Carmine-backed Ring session store." {:author "Peter Taoussanis"} (:require [ring.middleware.session] [taoensso.encore :as enc] [taoensso.carmine :as car :refer (wcar)])) (defrecord CarmineSessionStore [conn-opts prefix ttl-secs extend-on-read?] ring.middlewar...
b5228b54f4ade45b04b3ec208e3f99966d5d715c3dddba3e7f67119ae93f5696
pdarragh/camlrack
testParse.ml
open OUnit2 open Camlrack.Parse let test_parse (input, sexp : string * sexp) _ = assert_equal sexp (parse_exn input) let parse_tests = [ ("123", Integer 123) ; ("-10", Integer (-10)) ; ("123.", Float 123.) ; ("-123.", Float (-123.)) ; ("1e1", Float 10.) ; ("13.e-1", Float 1.3) ; ("foo", Symbol "foo")...
null
https://raw.githubusercontent.com/pdarragh/camlrack/6006c2708e729fb1ca7d6358cfb33fe5fcd07616/camlrack/test/testParse.ml
ocaml
open OUnit2 open Camlrack.Parse let test_parse (input, sexp : string * sexp) _ = assert_equal sexp (parse_exn input) let parse_tests = [ ("123", Integer 123) ; ("-10", Integer (-10)) ; ("123.", Float 123.) ; ("-123.", Float (-123.)) ; ("1e1", Float 10.) ; ("13.e-1", Float 1.3) ; ("foo", Symbol "foo")...
195fcc27795c0a8dc803eab9468bda654c2668d08e99ee8f72ad70e27f53dc19
sirherrbatka/vellum
tests.lisp
(cl:in-package #:vellum.table) (prove:plan 45889) (let* ((data-frame (vellum:to-table (cl-ds.alg:on-each (cl-ds:iota-range :to 308) #'list) :columns '(column) :enable-restarts nil)) (transformed (vellum:transform data-frame ...
null
https://raw.githubusercontent.com/sirherrbatka/vellum/3fc8b605125d280819798594244d554469e2149b/src/table/tests.lisp
lisp
(cl:in-package #:vellum.table) (prove:plan 45889) (let* ((data-frame (vellum:to-table (cl-ds.alg:on-each (cl-ds:iota-range :to 308) #'list) :columns '(column) :enable-restarts nil)) (transformed (vellum:transform data-frame ...
191e9cf6a741ba6f70b63fb36f3b31447fa89a298a2c67977dc64d96f0c36b42
digitallyinduced/ihp-blog-example-app
Routes.hs
module Web.Routes where import IHP.RouterPrelude import Generated.Types import Web.Types -- Generator Marker instance AutoRoute PostsController instance AutoRoute CommentsController
null
https://raw.githubusercontent.com/digitallyinduced/ihp-blog-example-app/a79824f2587701f537487d86d514b86dae9f6834/Web/Routes.hs
haskell
Generator Marker
module Web.Routes where import IHP.RouterPrelude import Generated.Types import Web.Types instance AutoRoute PostsController instance AutoRoute CommentsController
91bf915042e82b02a8b4448ec3c901adb23048ddabd6c48668bd0fcabd239c45
evdubs/chart-simulator
range-rally.rkt
#lang racket/base (require racket/stream racket/vector "../structs.rkt" "../technical-indicators.rkt") (provide range-rally-execution) (struct range-rally-in (dohlc sma-50 sma-50-slope satr-50 dc-25-high dc-25-low dc-50-high dc-50-low csr-3) #:transparent) (def...
null
https://raw.githubusercontent.com/evdubs/chart-simulator/a615e2a5c05a73bd712fdf6d7070a83d354754a8/strategy/range-rally.rkt
racket
timeframe entry stop target position history market data inputs (+ dc-25-low satr)) (- dc-25-high satr)) satisfactory conditions no longer exist for entry satisfactory conditions exist for entry and open price leads to execution satisfactory conditions exist for entry and price range leads to execution have p...
#lang racket/base (require racket/stream racket/vector "../structs.rkt" "../technical-indicators.rkt") (provide range-rally-execution) (struct range-rally-in (dohlc sma-50 sma-50-slope satr-50 dc-25-high dc-25-low dc-50-high dc-50-low csr-3) #:transparent) (i...
eba74ac595967f349921eb6ef5b863c9e445f0d044afbd7fc5bd33be84b1a069
qitab/qmynd
command-debug.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Free Software published under an MIT - like license . See LICENSE ; ; ; ;;; ;;; Copyright ( c ) 2012 G...
null
https://raw.githubusercontent.com/qitab/qmynd/7e56daf73f0ed5f49a931c01af75fb874bcf3445/src/mysql-protocol/text-protocol/command-debug.lisp
lisp
;;; ; ; ;;; ; ; ;;; ; ; ;;; 15.6.14 command-debug...
(in-package :qmynd-impl) ( ( tag : mysql - type ( integer 1 ) Returns EOF or ERR packet (defun send-command-debug () (mysql-command-init +mysql-command-debug+) (mysql-write-packet (vector +mysql-command-debug+)) (parse-response (mysql-read-packet)))
a15db8081835c783b9cf87c444d6c41561d624e4230bc69d5825f26f8b5d7420
evilbinary/scheme-lib
builder.scm
( ) --- Guile JSON implementation . Copyright ( C ) 2013 Flaque < > Copyright ( C ) 2015,2016 Jan Nieuwenhuizen < > ;; ;; This file is part of guile-json. ;; ;; guile-json is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public License as published b...
null
https://raw.githubusercontent.com/evilbinary/scheme-lib/6df491c1f616929caa4e6569fa44e04df7a356a7/packages/json/builder.scm
scheme
This file is part of guile-json. guile-json is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either guile-json is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS...
( ) --- Guile JSON implementation . Copyright ( C ) 2013 Flaque < > Copyright ( C ) 2015,2016 Jan Nieuwenhuizen < > version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , Fifth Floo...
f18ccc7eaf4708af45ed1ae12859fa1e5bf5ae6275fd090d7190dc27be98ef01
dharrigan/startrek
locales.clj
(ns startrek.shared.middleware.locales {:author "David Harrigan"} (:require [clojure.tools.logging :as log]) (:import [java.util Locale Locale$LanguageRange])) (set! *warn-on-reflection* true) (defn ^:private parse-accept-language [header] (mapv (fn [language-range] (-> ^String (.getRange ^L...
null
https://raw.githubusercontent.com/dharrigan/startrek/a91caa3f504ffea502b79cfd29d0499574aaced6/src/startrek/shared/middleware/locales.clj
clojure
(ns startrek.shared.middleware.locales {:author "David Harrigan"} (:require [clojure.tools.logging :as log]) (:import [java.util Locale Locale$LanguageRange])) (set! *warn-on-reflection* true) (defn ^:private parse-accept-language [header] (mapv (fn [language-range] (-> ^String (.getRange ^L...
3aabe343863539a1492707abca8eef8ea4b967db9907e9ba3977f12826ff87f6
locusmath/locus
object.clj
(ns locus.order.general.symmetric.object (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.mapping.general.core.object :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.con.core.setpart :refer :all] ...
null
https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/order/general/symmetric/object.clj
clojure
Thin categories include all preorders such as equivalence relations. As thin categories, equivalence relations have all inverses for each morphism. It follows that equivalence relations are also thin groupoids, which are also called setoids. Every thin category is a function Conversion routines Relational setoids...
(ns locus.order.general.symmetric.object (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.mapping.general.core.object :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.con.core.setpart :refer :all] ...
c6b518a141a07410e31d0c4553eb4de329f379f01a289682cc9597261ce7c0b4
janestreet/bonsai
main.ml
open! Core open! Bonsai_web open! Bonsai.Let_syntax let center = Vdom.Attr.style (Css_gen.text_align `Center) let modal_1_contents = Bonsai.const (Vdom.Node.div ~attr:center [ Vdom.Node.text "Surprise!" ]) ;; let modal_2_contents n = let%sub got_ya = match%arr n with | 1 -> "Got ya!" | n -> sprintf "...
null
https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/examples/modal/main.ml
ocaml
open! Core open! Bonsai_web open! Bonsai.Let_syntax let center = Vdom.Attr.style (Css_gen.text_align `Center) let modal_1_contents = Bonsai.const (Vdom.Node.div ~attr:center [ Vdom.Node.text "Surprise!" ]) ;; let modal_2_contents n = let%sub got_ya = match%arr n with | 1 -> "Got ya!" | n -> sprintf "...
a1b6e29dda997669ddc81443d79b021b38c345bb7c9754a2c97e79db121a03c3
qitab/ace.core
fast-ops-test.lisp
Copyright 2020 Google LLC ;;; Use of this source code is governed by an MIT - style ;;; license that can be found in the LICENSE file or at ;;; . ;;; Test for fast-ops ;;; ;;; This only contains test for some helper functions. ;;; Most of this is tested in fx-test.lisp. ;;; (defpackage #:ace.core.fast-ops-test ...
null
https://raw.githubusercontent.com/qitab/ace.core/e6eb21ff67b0c5eaec21c9b543b6dce18d7c8e6d/fast-ops-test.lisp
lisp
license that can be found in the LICENSE file or at . Test for fast-ops This only contains test for some helper functions. Most of this is tested in fx-test.lisp.
Copyright 2020 Google LLC Use of this source code is governed by an MIT - style (defpackage #:ace.core.fast-ops-test (:use #:cl #:ace.test #:ace.core.fast-ops) (:import-from #:ace.core.fast-ops ace.core.fast-ops::%dostack)) (in-package #:ace.core.fast-ops-test) (defun my+ (&rest args) (dec...
cfa739bb0532a815d6a552f5c32d0466dcdac6d45638813ba671d503188455c6
OpenBookStore/openbookstore
utils.lisp
(defpackage :bookshops.utils (:use :cl :parse-float :bookshops.parameters) (:export #:isbn-p #:asciify #:clean-isbn #:extract-float #:ensure-float #:price-float-to-integer #:format-date #:i18n-load #:_ ...
null
https://raw.githubusercontent.com/OpenBookStore/openbookstore/3036d3cef2196f4282a91c55310142b44aa50423/src/utils.lisp
lisp
local-time extras the regexp should be enough, given we parse a known html beforehand. XXX: copied from scraper-fr the application code. log or warning? Both! Beware of single floats: Commas don't work: i18n disabled until we ship the translation files into the binary release. (defun _ (a) (cl-i18n:translate a...
(defpackage :bookshops.utils (:use :cl :parse-float :bookshops.parameters) (:export #:isbn-p #:asciify #:clean-isbn #:extract-float #:ensure-float #:price-float-to-integer #:format-date #:i18n-load #:_ ...
f5098519d23ebca6cc9fd4e5e3be527a3311222210520cc69c9dfb2b4076c86d
samply/blaze
comp_spec.clj
(ns blaze.async.comp-spec (:require [blaze.async.comp :as ac] [blaze.executors :as ex] [clojure.spec.alpha :as s]) (:import [java.util.concurrent TimeUnit])) (s/fdef ac/completable-future? :args (s/cat :x any?) :ret boolean?) (s/fdef ac/future :args (s/cat) :ret ac/completable-future?) ...
null
https://raw.githubusercontent.com/samply/blaze/cbf6431a254f347a704f1abe1de4f4fe8a249ac9/modules/async/src/blaze/async/comp_spec.clj
clojure
(ns blaze.async.comp-spec (:require [blaze.async.comp :as ac] [blaze.executors :as ex] [clojure.spec.alpha :as s]) (:import [java.util.concurrent TimeUnit])) (s/fdef ac/completable-future? :args (s/cat :x any?) :ret boolean?) (s/fdef ac/future :args (s/cat) :ret ac/completable-future?) ...
c2b34a8425888749fde85fe5bff8fb1ea308a51d2345bf28722cb2a385ca13ef
ygrek/mldonkey
napigator.mli
val load_servers_list : string -> ((string * Ip.t * int * string) list -> unit) -> unit
null
https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/networks/opennap/napigator.mli
ocaml
val load_servers_list : string -> ((string * Ip.t * int * string) list -> unit) -> unit
94a9dbfb8f842daa016021f8cfa04eb190ba006e78899dbf3f843c991b5616f3
prl-julia/juliette-wa
wa-optimized-examples.rkt
#lang racket (require redex) (require "../core/wa-full.rkt") ; import language semantics (require "../optimizations/wa-optimized.rkt") ; import optimized language (provide (all-defined-out)) ; export all definitions ;;;;;;;;;;;;;;;;; ;; Expressions ;;;;;;;;;;;;;;;;; func ( ) = 1 (define func1 (term (mdef "func" (...
null
https://raw.githubusercontent.com/prl-julia/juliette-wa/1d1a2154e7b4e232ea2166fba485a3bf574ebd88/src/redex/optimizations/wa-optimized-examples.rkt
racket
import language semantics import optimized language export all definitions Expressions id(w) func() func(x) id(w);id(w);id(w) addNumNum(x :: Number, y :: Number) = x+y f(var1) f(var1);add(var1,var2) addNumNum(1.1,1.1 ) 1+x Type Environments ((w Int64)) ((x Bool)) ((y Float64) (b Bool)) Method Tabl...
#lang racket (require redex) func ( ) = 1 (define func1 (term (mdef "func" () 1))) func(x : : Int64 ) = 3 (define func3-with-x (term (mdef "func" ((:: x Int64)) 3))) id(x : : Int64 ) = x (define idInt (term (mdef "id" ((:: x Int64)) x))) (define call-id-with-w (term (mcall id w))) (define call-func (term (mca...
d2aff1ac206bc835465edbb74651bca8fb9c7e069818a04324486b95710007b6
rizo/snowflake-os
queue.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet Cris...
null
https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/libraries/stdlib/queue.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 2002 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 : queue.ml , v 1.10 2005 - 08 - 26 ...
5e0c5d10b74965386c2f47f0cec3b2aa56acb4c1827658363453d00acd3aacaa
mauke/data-default
Default.hs
Copyright ( c ) 2013 All rights reserved . 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 notice , this list of conditions and the follo...
null
https://raw.githubusercontent.com/mauke/data-default/b1a08788ca3d6a714319726e3768cf93df92458e/data-default/Data/Default.hs
haskell
| This module defines a class for types with a default value. Instances are 'Float', 'Double', and many others (see below).
Copyright ( c ) 2013 All rights reserved . 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 notice , this list of conditions and the follo...
d54bc2685a3f964229e284d768a1960317be45a4430ca93bda411974e98c860e
yzhs/ocamlllvm
reload.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/asmcomp/sparc/reload.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 Q Public License version 1.0 . $ I d : reload.ml 2553 1999 - 11 - 17...
04fd7eca94b29115bbb3ba721c004cd2d6f2b47f984af1960578b42730d81578
Chris00/ocaml-benchmark
func_record.ml
module F(E : sig val f : float -> float val g : float -> float end) = struct let h x = 1. +. E.f x +. E.g x end module A = F(struct let f x = x +. 1. let g x = 2. *. x end) type env = { f : float -> float; g : float -> float } let h_rec e x = 1. +. e.f x +. e.g x let h_fun f g x = 1. +. f x +. g x let f ...
null
https://raw.githubusercontent.com/Chris00/ocaml-benchmark/72965ad1558c6f5d47b1559cee74423cbc5e970f/examples/func_record.ml
ocaml
Local Variables: End:
module F(E : sig val f : float -> float val g : float -> float end) = struct let h x = 1. +. E.f x +. E.g x end module A = F(struct let f x = x +. 1. let g x = 2. *. x end) type env = { f : float -> float; g : float -> float } let h_rec e x = 1. +. e.f x +. e.g x let h_fun f g x = 1. +. f x +. g x let f ...
cf9cd2bd9f4c03255a096d02872797bf548b7bb9270f82ea3dcd4f231af13eaf
incoherentsoftware/defect-process
Render.hs
module Configs.All.Settings.Render ( RenderConfig(..) ) where import Data.Aeson.Types (FromJSON, genericParseJSON, parseJSON) import GHC.Generics (Generic) import Window.Graphics.Util import Util data RenderConfig = RenderConfig { _winWidth :: Int , _winHeight :: Int , _winMode ...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Configs/All/Settings/Render.hs
haskell
module Configs.All.Settings.Render ( RenderConfig(..) ) where import Data.Aeson.Types (FromJSON, genericParseJSON, parseJSON) import GHC.Generics (Generic) import Window.Graphics.Util import Util data RenderConfig = RenderConfig { _winWidth :: Int , _winHeight :: Int , _winMode ...
ad153e0bc0da820a04bd92f4a33d2d3d45064caa2e76b27df1b24ff0f0a7b177
TrustInSoft/tis-kernel
name_projects.ml
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/aorai/tests/aorai/name_projects.ml
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 let run () = let print_one p = Kernel.feedback "Found %a" Project.pretty p in Project.iter_on_projects pr...
cb74db176e96fb81f568d3b8dd57288d4ee86949100b920f728219e64244f04f
Sintrastes/Montague
Typed.hs
# LANGUAGE ScopedTypeVariables , TypeOperators , DataKinds , KindSignatures , TypeApplications , TypeFamilies , GADTs , FlexibleInstances , FlexibleContexts , MultiParamTypeClasses , LambdaCase # TypeFamilies, GADTs, FlexibleInstances, FlexibleContexts, MultiParamTypeClasses, LambdaCase #-} # LANGUAGE Function...
null
https://raw.githubusercontent.com/Sintrastes/Montague/b98780be9f7080a083aa311e3d21c306f99e833a/src/Montague/Experimental/Typed.hs
haskell
This also will include things like indexicals and possible world semantics. | Type family to get the semantic interpretation of a lambek type. eval :: Term x -> Bracket x eval = \case Atom x -> x Maybe this would work better with functional dependencies? eval :: Term x -> a | A type of terms in the lambe...
# LANGUAGE ScopedTypeVariables , TypeOperators , DataKinds , KindSignatures , TypeApplications , TypeFamilies , GADTs , FlexibleInstances , FlexibleContexts , MultiParamTypeClasses , LambdaCase # TypeFamilies, GADTs, FlexibleInstances, FlexibleContexts, MultiParamTypeClasses, LambdaCase #-} # LANGUAGE Function...
3451aec5477a9f0548b0c03c94276b4f9c2776fa6242432092c019a4e75be2ed
barrel-db/barrel
barrel_doc.erl
Copyright 2016 , %% 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 Li...
null
https://raw.githubusercontent.com/barrel-db/barrel/1695ca4cfe821808526f9ecb2e019bc1b8eff48e/src/db/barrel_doc.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 limitation...
Copyright 2016 , 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(barrel_doc). -export([ revid/3 , parse_revision/1 , encode_revisions/1 , parse_revisions/1 , trim_history/3 , comp...
810ff703d5be29e2e3d735f9457491e51d52bad9801f2f91beca220cea65acc5
garrigue/labltk
balloontest.ml
(***********************************************************************) (* *) MLTk , Tcl / Tk interface of OCaml (* *) , , and ...
null
https://raw.githubusercontent.com/garrigue/labltk/c7f50b4faed57f1ac03cb3c9aedc35b10d36bdb6/jpf/balloontest.ml
ocaml
********************************************************************* described in file LICENSE found in the...
MLTk , Tcl / Tk interface of OCaml , , and projet Cristal , INRIA Rocquencourt , Kyoto University RIMS Copyright 2002 Institut National de Recherche en Informatique et en Automatique and...
bf67e1eee394be3c266c782c37dfabeb169e1784bdeab73103390c2df6ce746e
facebookarchive/pfff
gPack.ml
(**************************************************************************) (* Lablgtk *) (* *) (* This program is free software; you can redistribute it *) and/or ...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/external/ocamlgtk/src/gPack.ml
ocaml
************************************************************************ Lablgtk This program is free software; you can redistribute it comes with the library. ...
and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation version 2 , with the exception described in file COPYING which GNU Library General Public License for more details . You should have r...
122c90f135f41f415b7423db9a7afdd0d49a90c906da3ff79ccedfa101faaa35
avsm/eeww
seq.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/avsm/eeww/4d65720b5dd51376842ffe5c8c220d5329c1dc10/boot/ocaml/stdlib/seq.mli
ocaml
************************************************************************ OCaml ...
Copyright 2017 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the * Sequences . A sequence of type [ ' a Seq.t ] can be thought of as a { b delayed list } , that i...
9c8c4a5c7ad7b97589150d95bd2906c391fae167ee4297b881192db161a9e77a
lexi-lambda/racket-collections
contract.rkt
#lang racket/base (require data/collection/collection racket/contract racket/generic racket/function racket/stream racket/set unstable/function) (provide (contract-out [sequenceof ([contract?] [#:chaperone? any/c] . ->* . contract?)])) (define (add-sequence-context blame) (blame-add-context blame ...
null
https://raw.githubusercontent.com/lexi-lambda/racket-collections/c4822fc200b0488922cd6e86b4f2ea7cf8c565da/collections-lib/data/collection/contract.rkt
racket
a helper function for impersonating or chaperoning sequences --------------------------------------------------------------------------------------------------- check for lists to get nicer contract errors force some values to streams for the contract checking (only allowed for non-chaperone contracts)
#lang racket/base (require data/collection/collection racket/contract racket/generic racket/function racket/stream racket/set unstable/function) (provide (contract-out [sequenceof ([contract?] [#:chaperone? any/c] . ->* . contract?)])) (define (add-sequence-context blame) (blame-add-context blame ...
345068cb19d9be858ad92733e948196a5817f7fdbce7d9d7e58a3a212525a377
pdarragh/parsing-with-zippers-paper-artifact
benchmarking.ml
(* Helpers for writing benchmarks. Used by only `main.ml` Copied almost exactly from: *) open Core open Core_bench let load_measurements ~filenames = List.map ~f:(fun filename -> Bench.Measurement.load ~filename) filenames let analyze_and_display ~measurements ?analysis_configs ?display_config () = let ...
null
https://raw.githubusercontent.com/pdarragh/parsing-with-zippers-paper-artifact/c5c08306cfe4eec588237c7fa45b794649ccb68a/benchmark/pwz_bench/generate/static/benchmarking.ml
ocaml
Helpers for writing benchmarks. Used by only `main.ml` Copied almost exactly from:
open Core open Core_bench let load_measurements ~filenames = List.map ~f:(fun filename -> Bench.Measurement.load ~filename) filenames let analyze_and_display ~measurements ?analysis_configs ?display_config () = let results = List.map ~f:(Bench.analyze ?analysis_configs) measurements in let results = List...
6d417195ce193670c10b24f2b8803b0b5944f9a5fe0aa4a8f180fa669b145e61
BillHallahan/G2
AddTyVars.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} module G2.Liquid.AddTyVars ( addTyVarsEEnvTEnv , addTyVarsMeasures , PhantomTyVars) where import G2.Initialization.Types import G2.Language hiding (State (..), Bindings (..)) import G2.Liquid.Types ...
null
https://raw.githubusercontent.com/BillHallahan/G2/696975222c54341a8e22c37e31ff3dfc72b02c52/src/G2/Liquid/AddTyVars.hs
haskell
# LANGUAGE OverloadedStrings # | Identifies data constructors with unused polymorphic arguments ----------------------------- Adjust TypeEnv ----------------------------- ----------------------------- ----------------------------- ----------------------------- ----------------------------- ---------------------------...
# LANGUAGE FlexibleContexts # module G2.Liquid.AddTyVars ( addTyVarsEEnvTEnv , addTyVarsMeasures , PhantomTyVars) where import G2.Initialization.Types import G2.Language hiding (State (..), Bindings (..)) import G2.Liquid.Types import qualified Data.HashMap.Lazy...
169f4f7f1b5d2ca2eeb42f50c8e644767ea0ca1ce6ae3594262cad25282cd040
mistupv/cauder
cauder_semantics.erl
-module(cauder_semantics). %% API -export([]). -include("cauder_semantics.hrl"). -export_type([ semantics/0, rule/0 ]). -type semantics() :: ?SEM_FWD | ?SEM_BWD. -type rule() :: ?RULE_LOCAL | ?RULE_SELF | ?RULE_NODE | ?RULE_NODES | ?RULE_START | ?RULE_SPAWN | ?RULE_SEND ...
null
https://raw.githubusercontent.com/mistupv/cauder/c9bfb72a4aed70979e53f4b3ca4a085a19b6c195/src/cauder_semantics.erl
erlang
API
-module(cauder_semantics). -export([]). -include("cauder_semantics.hrl"). -export_type([ semantics/0, rule/0 ]). -type semantics() :: ?SEM_FWD | ?SEM_BWD. -type rule() :: ?RULE_LOCAL | ?RULE_SELF | ?RULE_NODE | ?RULE_NODES | ?RULE_START | ?RULE_SPAWN | ?RULE_SEND | ?R...
038de47a7cfd6f98ab1fdd9a8cc9eafe0519f8b7c9cedc516a173005bbf6f052
typeable/octopod
Main.hs
# LANGUAGE TemplateHaskell # module Main (main) where import qualified Data.Text as T import Development.GitRev import Octopod.Server main :: IO () main = runOctopodServer (T.pack $gitHash)
null
https://raw.githubusercontent.com/typeable/octopod/372f5dd63585f07fa36ab76b70a67d9c94636e6b/octopod-backend/app/Main.hs
haskell
# LANGUAGE TemplateHaskell # module Main (main) where import qualified Data.Text as T import Development.GitRev import Octopod.Server main :: IO () main = runOctopodServer (T.pack $gitHash)
783f7d8b2ea5cf455c404e14b7fb9a9a330ba0a506b1d8448257581f679ac06e
mauny/the-functional-approach-to-programming
load.ml
#directory "../Util";; load_object "prelude";; #open "prelude";; load_object "circular_list";; #open "circular_list";; load_object "queue";; #open "queue";; load_object "double_circular_list";; #open "double_circular_list";;
null
https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/Imper/load.ml
ocaml
#directory "../Util";; load_object "prelude";; #open "prelude";; load_object "circular_list";; #open "circular_list";; load_object "queue";; #open "queue";; load_object "double_circular_list";; #open "double_circular_list";;
0738d36c4dc06d3459ff60f74b9f123c83e494fc6b1342dc8d96f84f5598682e
otpcl/otpcl
otpcl_core.erl
@doc Core OTPCL commands . These commands are technically optional , but % leaving them out (i.e. in a custom interpreter state) can create some rather % peculiar results, in particular since this is where basic commands like % `return' and `|' live (yes, the OTPCL standard pipe is internally an ordinary % command,...
null
https://raw.githubusercontent.com/otpcl/otpcl/b174e6dce625f7bca4772c1bca65f4a9e7bbd769/src/otpcl_core.erl
erlang
leaving them out (i.e. in a custom interpreter state) can create some rather peculiar results, in particular since this is where basic commands like `return' and `|' live (yes, the OTPCL standard pipe is internally an ordinary command, so you can call it on its own; you can also define your own pipe-commands, as d...
@doc Core OTPCL commands . These commands are technically optional , but -module(otpcl_core). -include("otpcl.hrl"). -export(['CMD_return'/2, return/2, 'CMD_|'/2, '|'/2]). 'CMD_return'(Args, State) -> return(Args, State). 'CMD_|'(Args, State) -> '|'(Args, State). -spec return(any(), state()) -> {any(), ...
9da35c575e092a25a8ff0ca55dba08d26bcf1877c650bcb8b1cc8e9a3407c76a
georgegarrington/Syphon
ADT.hs
module Transpile.ADT where import qualified Data.Map as M import Data.List import AST.Definition import AST.Type import Transpile.Util writeADT :: Dfn -> String writeADT (ADT name lineNum constrs) = concatMap writeConstructor constrs where writeConstructorArgs n = intercalate ", " $ map (\num -> "arg" ++ show nu...
null
https://raw.githubusercontent.com/georgegarrington/Syphon/402a326b482e3ce627a15b651b3097c2e09e8a53/src/Transpile/ADT.hs
haskell
module Transpile.ADT where import qualified Data.Map as M import Data.List import AST.Definition import AST.Type import Transpile.Util writeADT :: Dfn -> String writeADT (ADT name lineNum constrs) = concatMap writeConstructor constrs where writeConstructorArgs n = intercalate ", " $ map (\num -> "arg" ++ show nu...
6f6e274d71f37433301d8fe8eadb535ecacb0e11e06df7bececa6f4ab17cd9a6
ecpeterson/OCaml-Agenda
Agenda.ml
open AnsiLib open Date open ReadKey open Schedule type loop_msg = ErrMsg of string | Notice of string | No_msg exception Refresh (* default item choice *) let last_idx = ref 1 (* active group filter *) let group = ref (None: int option) (* generic error string *) let invalid_string = "Invalid choice." (* routines ...
null
https://raw.githubusercontent.com/ecpeterson/OCaml-Agenda/71a2512d11939f9873f3fb3b0b5f5ef948946e31/Agenda.ml
ocaml
default item choice active group filter generic error string routines to print out the left-most column of the schedule display display the working schedule iterate through the sorted items check to see if we need to display the current date print either the date, a dateless line, or a continuation thing...
open AnsiLib open Date open ReadKey open Schedule type loop_msg = ErrMsg of string | Notice of string | No_msg exception Refresh let last_idx = ref 1 let group = ref (None: int option) let invalid_string = "Invalid choice." let print_spacer () = print_string " |-" let display_schedule () = let our_...
226f4fef6f6312c8dec9bf4cae2179a123403474c1dbbece188baa3bc7ea97c5
imdea-software/leap
tsl.ml
(***********************************************************************) (* *) LEAP (* *) , IMDEA ...
null
https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/progs/tsl/tsl.ml
ocaml
********************************************************************* ...
LEAP , IMDEA Software Institute Copyright 2011 IMDEA Software Institute Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compl...
ebf52b213b0ca457335faf8cc3dcbf0203c8b6826eac2fb73f7aa57fef3cd29f
pmh/funkyweb
controller.clj
(ns funkyweb.controller (:use funkyweb.controller.router funkyweb.controller.helpers)) (defmacro defcontroller [controller-name & forms] `(do (binding [*controller-name* (controller-name-to-route '~controller-name)] ~@forms) nil)) (defmacro GET [name args & forms] `(do (construct-ur...
null
https://raw.githubusercontent.com/pmh/funkyweb/b3731c5664c3b6a40db32a1fef18a59777d9156d/src/funkyweb/controller.clj
clojure
(ns funkyweb.controller (:use funkyweb.controller.router funkyweb.controller.helpers)) (defmacro defcontroller [controller-name & forms] `(do (binding [*controller-name* (controller-name-to-route '~controller-name)] ~@forms) nil)) (defmacro GET [name args & forms] `(do (construct-ur...
a713bc25a18788a105f771e901c81d12649f6adc2e705edf9e4c6d2e64b75b8f
input-output-hk/cardano-rt-view
PageBody.hs
# LANGUAGE LambdaCase # module Cardano.RTView.GUI.Markup.PageBody ( mkPageBody ) where import Control.Concurrent.STM.TVar (TVar) import Control.Monad (forM, forM_, void, when) import Control.Monad.Extra (whenJustM) import Data.Text (Text) import qualified Data.Text as T...
null
https://raw.githubusercontent.com/input-output-hk/cardano-rt-view/0ff669a5acc8d81a35aa5a924cbb79978d0999a8/src/Cardano/RTView/GUI/Markup/PageBody.hs
haskell
Register clickable selector for nodes (to be able to show only one or all of them). Charts for different metrics. By default Errors switcher is disabled (it will be cative only if there are some errors). | If all checkboxes are checked - "Show all" button should be disabled. | If all checkboxes are unchecked - "Hi...
# LANGUAGE LambdaCase # module Cardano.RTView.GUI.Markup.PageBody ( mkPageBody ) where import Control.Concurrent.STM.TVar (TVar) import Control.Monad (forM, forM_, void, when) import Control.Monad.Extra (whenJustM) import Data.Text (Text) import qualified Data.Text as T...
78d23d00e66a72c5b2002a26d34e47adb3c7ecbf5f97128f4317f75f27bda601
mirage/irmin-server
sync.ml
open Lwt.Syntax module Store = Irmin_mem.KV.Make (Irmin.Contents.String) module Client = Irmin_client_unix.Make (Store) module Sync = Irmin.Sync.Make (Store) let main = let uri = Utils.get_url in let* client = Client.connect uri in let* main = Client.main client in let* repo = Store.Repo.v (Irmin_mem.config ()...
null
https://raw.githubusercontent.com/mirage/irmin-server/ff4e22cacf8c02773e5d022eda0e5c077610bf28/examples/sync.ml
ocaml
open Lwt.Syntax module Store = Irmin_mem.KV.Make (Irmin.Contents.String) module Client = Irmin_client_unix.Make (Store) module Sync = Irmin.Sync.Make (Store) let main = let uri = Utils.get_url in let* client = Client.connect uri in let* main = Client.main client in let* repo = Store.Repo.v (Irmin_mem.config ()...
a433044ae71d4d040287ca05e9bdc88bd0046ff2feee4315401f5508a375515b
facebookincubator/hsthrift
Internal.hs
Copyright ( c ) Facebook , Inc. and its affiliates . # LANGUAGE TemplateHaskell # module Util.Log.Internal ( vlogIsOn , c_glog_verbose , c_glog_info , c_glog_warning , c_glog_error , c_glog_fatal , c_glog_flush ) where import Control.Monad.IO.Class (MonadIO, liftIO) import Foreign.C (CString, CInt(...
null
https://raw.githubusercontent.com/facebookincubator/hsthrift/f50fec7b8083c71cfe45d926c274e01c202592bb/common/util/Util/Log/Internal.hs
haskell
Copyright ( c ) Facebook , Inc. and its affiliates . # LANGUAGE TemplateHaskell # module Util.Log.Internal ( vlogIsOn , c_glog_verbose , c_glog_info , c_glog_warning , c_glog_error , c_glog_fatal , c_glog_flush ) where import Control.Monad.IO.Class (MonadIO, liftIO) import Foreign.C (CString, CInt(...
5098b4ba9c0161eddae5ca0847518a9e1569c508f192ed52e0d91502a9f49cf6
rabbitmq/ra-kv-store
web.clj
(ns jepsen.web "Web server frontend for browsing test results." (:require [jepsen.store :as store] [clojure.string :as str] [clojure.edn :as edn] [clojure.java.io :as io] [clojure.tools.logging :refer :all] [clojure.pprint :refer [pprint]] [clj...
null
https://raw.githubusercontent.com/rabbitmq/ra-kv-store/faf36863bb3822ef4dcd99de5635007273d35997/jepsen/jepsen/src/jepsen/web.clj
clojure
Incomplete test Um??? "} ")} "} "} "} "}] "}])]] Wrong, but we like seeing it in-browser Ditto (info :req (with-out-str (pprint req)))
(ns jepsen.web "Web server frontend for browsing test results." (:require [jepsen.store :as store] [clojure.string :as str] [clojure.edn :as edn] [clojure.java.io :as io] [clojure.tools.logging :refer :all] [clojure.pprint :refer [pprint]] [clj...
649dd2c6ee2b0f0f49d2416b8ef29fe19395c19ab7267f5a0ddb5d5891bf8001
sbcl/sbcl
compiler-1.impure-cload.lisp
miscellaneous compiler tests with side effects ( e.g. DEFUN ;;;; changing FDEFINITIONs and globaldb stuff) This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; While most of SBCL is derived from the CMU CL system , the test ;;;; files (like this one) were written from sc...
null
https://raw.githubusercontent.com/sbcl/sbcl/5d0ee10bf7c22d1cb38b54ff1e4582f4c9dda6f5/tests/compiler-1.impure-cload.lisp
lisp
changing FDEFINITIONs and globaldb stuff) more information. files (like this one) were written from scratch after the fork This software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. (The effectiveness of the test also depends on th...
miscellaneous compiler tests with side effects ( e.g. DEFUN This software is part of the SBCL system . See the README file for While most of SBCL is derived from the CMU CL system , the test from CMU CL . (declaim (optimize (debug 3) (speed 2) (space 1))) Until version 0.6.9 or so , SBCL 's version of Pyth...
1dd3fb4084006e7637035d75b0f86146452d668b683a9e9f1e2f42764bb4e98f
Soyn/sicp
Ex2.36.rkt
#lang racket Ex 2.36 (define (accumulate op init sequence) (if (null? sequence) init (op (car sequence) (accumulate op init (cdr sequence))))) (define (select-cars sequences) (map car sequences)) (define (select-cdrs sequences) (map cdr sequences)) ;test (define t (list (list 1 2 3) (list 40...
null
https://raw.githubusercontent.com/Soyn/sicp/d2aa6e3b053f6d4c8150ab1b033a18f61fca7e1b/CH2/CH2.2/Ex2.36.rkt
racket
test
#lang racket Ex 2.36 (define (accumulate op init sequence) (if (null? sequence) init (op (car sequence) (accumulate op init (cdr sequence))))) (define (select-cars sequences) (map car sequences)) (define (select-cdrs sequences) (map cdr sequences)) (define t (list (list 1 2 3) (list 40 50 60...
92b8ec7089187cc6cee846bc95949181f0805232d54b92bb216ae98144212ea6
racket/typed-racket
contract-struct-equality.rkt
#lang racket/load (module typed typed/racket (provide g) (struct: (A) foo ((v : A))) (: f (foo Byte)) (define f (foo 2)) (: g (-> (foo Byte))) (define (g) f)) (module typed-client typed/racket (require 'typed) (unless (equal? (g) (g)) (error 'typed2 "Failed"))) (module untyped-client racket (require...
null
https://raw.githubusercontent.com/racket/typed-racket/0236151e3b95d6d39276353cb5005197843e16e4/typed-racket-test/succeed/contract-struct-equality.rkt
racket
#lang racket/load (module typed typed/racket (provide g) (struct: (A) foo ((v : A))) (: f (foo Byte)) (define f (foo 2)) (: g (-> (foo Byte))) (define (g) f)) (module typed-client typed/racket (require 'typed) (unless (equal? (g) (g)) (error 'typed2 "Failed"))) (module untyped-client racket (require...
9b603f135c8779c1f660d62336cbf063f5bab5740b800e1adfffe1e06760d12b
palletops/log-config
slf4j_test.clj
(ns com.palletops.log-config.slf4j-test (:require [clojure.test :refer :all] [taoensso.timbre :refer [example-config info log]] [com.palletops.log-config.tools-logging :refer :all] [com.palletops.log-config.timbre :refer [add-var format-with-context]] [com.palletops.log-config.timbre.tools-logging ...
null
https://raw.githubusercontent.com/palletops/log-config/ff924ac9ea900999324ce44645b2969781cf4b12/test/com/palletops/log_config/slf4j_test.clj
clojure
(ns com.palletops.log-config.slf4j-test (:require [clojure.test :refer :all] [taoensso.timbre :refer [example-config info log]] [com.palletops.log-config.tools-logging :refer :all] [com.palletops.log-config.timbre :refer [add-var format-with-context]] [com.palletops.log-config.timbre.tools-logging ...
93a7f6627abb1c62e43e57dab0d33385e727a019407e1bbcc46fe8bd4d62ffb6
KDr2/kittle-buffer
kbf-cli.rkt
#lang racket (require kittle-buffer/interpreter) ;; test (define (test) (let ([hello-world "++++++++[>++++[>++>+++>+++>+<<<<-] >+>+>->>+[<]<-]>>.>---.+++++++..++ +.>>.<-.<.+++.------.--------.>>+.>++."] [code1 "^0^1>+21^2>>+50^3>>>+50@2^0."]) (display (parse hello-world)) ...
null
https://raw.githubusercontent.com/KDr2/kittle-buffer/92aa48f4aacb401a0010386b671b2496bbe94a85/kbf-cli.rkt
racket
test (test) entrance
#lang racket (require kittle-buffer/interpreter) (define (test) (let ([hello-world "++++++++[>++++[>++>+++>+++>+<<<<-] >+>+>->>+[<]<-]>>.>---.+++++++..++ +.>>.<-.<.+++.------.--------.>>+.>++."] [code1 "^0^1>+21^2>>+50^3>>>+50@2^0."]) (display (parse hello-world)) (disp...
2aad45c0340335da23118f7a2e9a1d96b639168f57a80f1172806456794c01a6
hopv/homusat
typeCheck.ml
(* Type checks for argument formulas *) module Env = Id.IdMap module Delta = LTS.Delta module States = LTS.States module FmlMap = ACG.FmlMap module Tau = Types.Tau module Sigma = Types.Sigma module Gamma = Types.Gamma module Theta = Types.Theta module Epsilon = Types.Epsilon let memo = ref FmlMap.empty let reset_memo...
null
https://raw.githubusercontent.com/hopv/homusat/cc05711a3f9d45b253b83ad09a2d0288115cc4f4/typeCheck.ml
ocaml
Type checks for argument formulas Check if the formula fml can be typed with tau assert (Types.is_prop tau); assert (Types.is_prop tau); assert (Types.is_prop tau); assert (Types.is_prop tau); Return the set of types that fml can be typed under delta let _ = cnt := !cnt - 1; print_endline (string_of_int ...
module Env = Id.IdMap module Delta = LTS.Delta module States = LTS.States module FmlMap = ACG.FmlMap module Tau = Types.Tau module Sigma = Types.Sigma module Gamma = Types.Gamma module Theta = Types.Theta module Epsilon = Types.Epsilon let memo = ref FmlMap.empty let reset_memo = fun () -> memo := FmlMap.empty let r...
25cc1957cd700e510d34daaf0c051a98f171bc148835a50bd5ca53303227e664
coccinelle/coccinelle
ctlcocci_integration.ml
* This file is part of Coccinelle , licensed under the terms of the GPL v2 . * See copyright.txt in the Coccinelle source code for more information . * The Coccinelle source code can be obtained at * This file is part of Coccinelle, licensed under the terms of the GPL v2. * See copyright.txt in the Cocci...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/2df29c1740c8639d181e83eb58b36599686a0b62/engine/ctlcocci_integration.ml
ocaml
*************************************************************************** Debugging functions *************************************************************************** *************************************************************************** Labeling function **************************************************...
* This file is part of Coccinelle , licensed under the terms of the GPL v2 . * See copyright.txt in the Coccinelle source code for more information . * The Coccinelle source code can be obtained at * This file is part of Coccinelle, licensed under the terms of the GPL v2. * See copyright.txt in the Cocci...
4babe005fffa063bed226a02240cfd46627d41342a565780f62273afec190307
eltonlaw/donkeyblend
py_test.clj
(ns donkeyblend.tools.emitter.py-test (:require [clojure.test :refer [deftest testing is]] [donkeyblend.tools.analyzer.py :as analyzer] [donkeyblend.tools.emitter.py :as emitter] [donkeyblend.reader :as reader])) (defn- to-py [s] (-> (reader/read-string s) analyzer/analyze...
null
https://raw.githubusercontent.com/eltonlaw/donkeyblend/563812a80c63d2ccfa4bb5f203bc63814795f922/test/donkeyblend/tools/emitter/py_test.clj
clojure
(ns donkeyblend.tools.emitter.py-test (:require [clojure.test :refer [deftest testing is]] [donkeyblend.tools.analyzer.py :as analyzer] [donkeyblend.tools.emitter.py :as emitter] [donkeyblend.reader :as reader])) (defn- to-py [s] (-> (reader/read-string s) analyzer/analyze...
c02e6a3df04e6cf047da5bd36aa8df5455091f06cda41d7ab5cc0b756976ae4f
spell-music/amsterdam
Network.hs
additional parameters : ifqm , imax , ibegkdyn , ibegae , imid , ibreakp , iend , irvt , ileft The instrument has a variable amplitude envelope and a variable modulation index contour . Part of the sound is reverberated and mixed with the unreverberated portion . For this instrument , a network score genera...
null
https://raw.githubusercontent.com/spell-music/amsterdam/ab491022c7826c74eab557ecd11794268f5a5ae0/20-fm/Network.hs
haskell
additional parameters : ifqm , imax , ibegkdyn , ibegae , imid , ibreakp , iend , irvt , ileft The instrument has a variable amplitude envelope and a variable modulation index contour . Part of the sound is reverberated and mixed with the unreverberated portion . For this instrument , a network score genera...
a9ee691a68a19b9daf578bbb5cd0bda20de9c52f49d8d15f7089df596a193dda
patrikja/autosar
ServerTest.hs
Copyright ( c ) 2014 - 2015 , , , , and All rights reserved . 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 copyr...
null
https://raw.githubusercontent.com/patrikja/autosar/2b8d3a22eb99812dca645a1c3c18ce18fbf6d539/oldARSim/ServerTest.hs
haskell
# LANGUAGE RankNTypes # Simple server returning unique tickets to clients. Create a port for remote operation. Variable holding number of issued tickets. Code of the remote operation: return the ticket number and update state. Export the port of the operation. Create a port for calling a remote operation and an o...
Copyright ( c ) 2014 - 2015 , , , , and All rights reserved . 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 copyr...
e47531e0c0eb7c38448dadbf8b8413f880681eacadd7b76256b6360646837900
akazukin5151/kpxhs
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import qualified Brick.AttrMap as A import Brick.BChan (BChan, newBChan) import qualified Brick.Focus as F import qualified Brick.Main as M import qualified Brick.Widgets.Edit as E import Control.Monad (void, when...
null
https://raw.githubusercontent.com/akazukin5151/kpxhs/42874fa144404a51fcdf6dc54c99b49559a868b4/src/kpxhs/Main.hs
haskell
# LANGUAGE OverloadedStrings # doesn't really matter here `head` is safe because the cmd is hardcoded by me, not passed in by the user | Aborts if either config or theme exists, before writing, to prevent inconsistency Logs the write because if one failed and the other succeeded for some reason,
module Main where import qualified Brick.AttrMap as A import Brick.BChan (BChan, newBChan) import qualified Brick.Focus as F import qualified Brick.Main as M import qualified Brick.Widgets.Edit as E import Control.Monad (void, when) import qualified Data.ByteString ...
b6bc58c9f2531f634ee42828e654fccc79b32a8d15d36fc341aaa29fa85de97b
ruricolist/overlord
specials.lisp
(defpackage #:overlord/specials (:use #:cl :overlord/types :alexandria :serapeum) (:import-from :overlord/asdf :asdf-system-version) (:import-from #:lparallel #:*task-priority*) (:export #:*base* #:*cli* #:*db-version* #:db-version #:*suppress-phonies* ...
null
https://raw.githubusercontent.com/ruricolist/overlord/4694911996c36da6661d7f469c99fc28b348ebd2/specials.lisp
lisp
Propagating trace output makes debugging much easier. Guard against someone trying to alter the list of worker specials from within a worker.
(defpackage #:overlord/specials (:use #:cl :overlord/types :alexandria :serapeum) (:import-from :overlord/asdf :asdf-system-version) (:import-from #:lparallel #:*task-priority*) (:export #:*base* #:*cli* #:*db-version* #:db-version #:*suppress-phonies* ...
3e3689d02a991a5cc8982e177db91281e9a4df9f98c0bbd63372b0522079371a
redsolution/xabber-websocket
xabber_ws_sup.erl
-module(xabber_ws_sup). -behaviour(supervisor). %% API. -export([start_link/0]). %% supervisor. -export([init/1]). %% API. -spec start_link() -> {ok, pid()}. start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). %% supervisor. init([]) -> Procs = [], {ok, {{one_for_one, 10, 10}, Procs}}.
null
https://raw.githubusercontent.com/redsolution/xabber-websocket/82c46ee3e74fb71dbd065c6efee6964328f6bc4f/src/xabber_ws_sup.erl
erlang
API. supervisor. API. supervisor.
-module(xabber_ws_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -spec start_link() -> {ok, pid()}. start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). init([]) -> Procs = [], {ok, {{one_for_one, 10, 10}, Procs}}.
d49052c2f007740d705db70423804cc5c570f5bc557e573a451d1d1a780ab9ea
pmatos/darwin
non-posts.rkt
#lang racket/base (require markdown-ng racket/file racket/match racket/path racket/string rackjure/threading "../config/private/load.rkt" "bodies-page.rkt" "paths.rkt" "post-struct.rkt" "read-scribble.rkt" "stale.rkt" ...
null
https://raw.githubusercontent.com/pmatos/darwin/311df33cc83f67859ed9db8b236d227dec83d895/darwin/private/non-posts.rkt
racket
NOTE: Since the user may manually plop HTML files anywhere in (www-path), we can't just go around deleting those. Instead, we need to iterate sources and delete only HTMLs corresponding to those. First h1 header, if any -- Scribble style with <a> anchor First h1 header, if any -- otherwise Else name of the sourc...
#lang racket/base (require markdown-ng racket/file racket/match racket/path racket/string rackjure/threading "../config/private/load.rkt" "bodies-page.rkt" "paths.rkt" "post-struct.rkt" "read-scribble.rkt" "stale.rkt" ...
5f4f5e99c49163628972a950b8dfc943810a730d23a6f67fa537c31f9c3d7b26
gonimo/gonimo
Internal.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecursiveDo #-} # LANGUAGE ScopedTypeVariables # module Gonimo.Client.MessageBox.Internal where import Control.Lens import Data.Text (Text) import Reflex.Dom.Core import qualified...
null
https://raw.githubusercontent.com/gonimo/gonimo/f4072db9e56f0c853a9f07e048e254eaa671283b/front/src/Gonimo/Client/MessageBox/Internal.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # LANGUAGE RecursiveDo # Lenses for Config t:
# LANGUAGE ScopedTypeVariables # module Gonimo.Client.MessageBox.Internal where import Control.Lens import Data.Text (Text) import Reflex.Dom.Core import qualified Gonimo.Client.App.Types as App import Gonimo.Client.Server hiding (Config) import qualified Gonim...
621d1b21e17c4bae12c7e77011d24eda16391e3e2b4edb65ff09605ff9bb5b0f
mindreframer/clojure-stuff
nrepl_service.clj
(ns puppetlabs.trapperkeeper.services.nrepl.nrepl-service (:require [clojure.tools.logging :as log] [clojure.tools.nrepl.server :as nrepl] [puppetlabs.kitchensink.core :refer [to-bool]] [puppetlabs.trapperkeeper.core :refer [defservice]])) If no port is specified in the config then 7888 is used (d...
null
https://raw.githubusercontent.com/mindreframer/clojure-stuff/1e761b2dacbbfbeec6f20530f136767e788e0fe3/github.com/puppetlabs/trapperkeeper/src/puppetlabs/trapperkeeper/services/nrepl/nrepl_service.clj
clojure
(ns puppetlabs.trapperkeeper.services.nrepl.nrepl-service (:require [clojure.tools.logging :as log] [clojure.tools.nrepl.server :as nrepl] [puppetlabs.kitchensink.core :refer [to-bool]] [puppetlabs.trapperkeeper.core :refer [defservice]])) If no port is specified in the config then 7888 is used (d...
2267f7e76ae55b3362d4bb5b4f525f84871641d0c58940acf59c7facb094d1ca
ocaml-sf/learn-ocaml-corpus
master.ml
open Seq (* -------------------------------------------------------------------------- *) (* The size of a tree. *) let rec size (t : tree) : int = (* BEGIN INCLUDE *) (* TO DO: Define this function. *) raise TODO (* END INCLUDE *) BEGIN EXCLUDE match t with | TLeaf _ - > 1 | TNonLeaf off...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/alpha_beta/master.ml
ocaml
-------------------------------------------------------------------------- The size of a tree. BEGIN INCLUDE TO DO: Define this function. END INCLUDE BEGIN INCLUDE TO DO: Define this function. END INCLUDE BEGIN EXCLUDE match offspring() with | Nil -> 0 | Cons ((_move, t), offspring) -> ...
open Seq let rec size (t : tree) : int = raise TODO BEGIN EXCLUDE match t with | TLeaf _ - > 1 | TNonLeaf offspring - > 1 + size_offspring offspring END EXCLUDE match t with | TLeaf _ -> 1 | TNonLeaf offspring -> 1 + size_offspring offspring END EXCLUDE *...
7425a5c08e4e533838ffbd356e3bbfd60e824ae04c6cab5806c32997bd3b6c81
discus-lang/salt
Corpus.hs
-- | Strings used for generating moderately readable names and things. module Waves.Gen.Corpus where import Data.String letters :: IsString a => [a] letters = map (fromString . (:[])) ['a' .. 'z'] colours :: IsString a => [a] colours = [ "amber" , "beige" , "black" , "blue" , "brown" , "green" , "grey...
null
https://raw.githubusercontent.com/discus-lang/salt/33c14414ac7e238fdbd8161971b8b8ac67fff569/src/waves/Waves/Gen/Corpus.hs
haskell
| Strings used for generating moderately readable names and things.
module Waves.Gen.Corpus where import Data.String letters :: IsString a => [a] letters = map (fromString . (:[])) ['a' .. 'z'] colours :: IsString a => [a] colours = [ "amber" , "beige" , "black" , "blue" , "brown" , "green" , "grey" , "indigo" , "navy" , "ochre" , "pink" , "purple" , "red" ...
f9731ee2f8fb7947a8fe4cd73f19904d52456f8bf1bffe53ec4a4356cb178f01
ml-in-barcelona/server-reason-react
main.ml
(* To run as a standalone binary, run the registered drivers *) let () = Ppxlib.Driver.standalone ()
null
https://raw.githubusercontent.com/ml-in-barcelona/server-reason-react/a5d22907eb2633bcb8e77808f6c677802062953a/lib/ppx/test_snapshot/main.ml
ocaml
To run as a standalone binary, run the registered drivers
let () = Ppxlib.Driver.standalone ()
ba0aaf8405fc94a3ac721196b75e7119e2dc9355ee18d6bd573a12d1392aaeab
quark-lang/quark
Help.hs
# LANGUAGE LambdaCase , TupleSections # module Core.CLI.Commands.Help where import Core.CLI.Type import Core.Utility.Color helpCmd :: CommandExecution helpCmd _ i = do putStrLn $ bold "Quark " ++ bMagenta "0.0.1" ++ bBlack " - A functionnal programming language." putStrLn "" putStrLn $ "Usage: " ++...
null
https://raw.githubusercontent.com/quark-lang/quark/d5a8e246a6b894b1e09f522fd562015780b1ff90/app/Core/CLI/Commands/Help.hs
haskell
# LANGUAGE LambdaCase , TupleSections # module Core.CLI.Commands.Help where import Core.CLI.Type import Core.Utility.Color helpCmd :: CommandExecution helpCmd _ i = do putStrLn $ bold "Quark " ++ bMagenta "0.0.1" ++ bBlack " - A functionnal programming language." putStrLn "" putStrLn $ "Usage: " ++...
74eac3664b072a8c95f92f84ab7775501ba67b80d7ecbfb3cc80d2c41dc44a17
haskell-suite/haskell-tc
Class2.hs
module Class2 where data String data Bool = True | False class Show a where show :: a -> String instance Show Bool false x = show False falseFn x = show (x False) show' x = show x
null
https://raw.githubusercontent.com/haskell-suite/haskell-tc/abf5e3cc624e0095cae14c3c1c695b76ea8ffcb9/tests/Class2.hs
haskell
module Class2 where data String data Bool = True | False class Show a where show :: a -> String instance Show Bool false x = show False falseFn x = show (x False) show' x = show x
0ce1e39fb38077d747acf0807cab5fd9cc9365c42779dab0454704eaa02b326a
composewell/fusion-plugin
Plugin.hs
-- | -- Module : Fusion.Plugin Copyright : ( c ) 2019 Composewell Technologies -- License : Apache-2.0 -- Maintainer : -- Stability : experimental Portability : GHC -- Stream fusion depends on the GHC case - of - case transformations eliminating -- intermediate constructors. Case-of-case transfor...
null
https://raw.githubusercontent.com/composewell/fusion-plugin/3c6535a7027d60d88c37b9a601cb180b805e7431/src/Fusion/Plugin.hs
haskell
| Module : Fusion.Plugin License : Apache-2.0 Maintainer : Stability : experimental intermediate constructors. Case-of-case transformation in turn depends on internal bindings (e.g. join points) which may not get inlined because their fusion the resulting code would be smaller and more efficient....
Copyright : ( c ) 2019 Composewell Technologies Portability : GHC Stream fusion depends on the GHC case - of - case transformations eliminating inlining . During core - to - core transformations GHC may create several size is bigger than GHC 's inlining threshold . Even though we know that after stream f...
765ebc7c28df9dbdc3f62a4d835cfdd5fef0bdc3c9319bf81c7c3d381d3040b7
McCLIM/McCLIM
bordered-output.lisp
;;; --------------------------------------------------------------------------- ;;; License: LGPL-2.1+ (See file 'Copyright' for details). ;;; --------------------------------------------------------------------------- ;;; ( c ) copyright 2002 < > ( c ) copyright 2007 < > ( c ) copyright 2017 < > ...
null
https://raw.githubusercontent.com/McCLIM/McCLIM/eb6c974e9bb16cbb32ba7f1ef402dfe2be6538fd/Core/extended-output/bordered-output.lisp
lisp
--------------------------------------------------------------------------- License: LGPL-2.1+ (See file 'Copyright' for details). --------------------------------------------------------------------------- --------------------------------------------------------------------------- kinds of borders and decora...
( c ) copyright 2002 < > ( c ) copyright 2007 < > ( c ) copyright 2017 < > ( c ) copyright 2021 Jan Moringen < > Macros and functions surrounding stream output with different ink , but the CLX backend is n't there yet . A stopgap measure could After hours of trial and error we know , ...
136e1e39a4a3946bbed04810e03e40378df97096798e97aa071b4bb9fc30e856
totakke/cavia
project.clj
(defproject cavia "0.6.2" :description "Test resource manager for Clojure project" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"] [com.cognitect.aws/api "0.8.561"] ...
null
https://raw.githubusercontent.com/totakke/cavia/b01f7e29ea5ff59c12a5ed2eda39b9087c352fdb/project.clj
clojure
(defproject cavia "0.6.2" :description "Test resource manager for Clojure project" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.11.1"] [clj-http "3.12.3"] [com.cognitect.aws/api "0.8.561"] ...
2a91056ba747a217992975568fcd84f905b0059bb953fb299830776dd83b36ef
ahrefs/esgg
query.ml
open Printf open ExtLib open Common type var_list = [ `List of Tjson.var list | `Var of Tjson.var ] let var_list_of_json ~desc = function | `List l -> `List (List.filter_map (function `Var v -> Some v | _ -> None) l) | `Var _ as x -> x | _ -> fail "bad %s : expecting list or variable" desc type query_t = | Bool of ...
null
https://raw.githubusercontent.com/ahrefs/esgg/c7c3475754af6cae2f1da3b0f51757a26acb7783/query.ml
ocaml
get and mget probably can/should share most of the type? term level queries full text queries single variable group should be named same as variable XXX * Filter out the [_esgg] field from the json if it exist.
open Printf open ExtLib open Common type var_list = [ `List of Tjson.var list | `Var of Tjson.var ] let var_list_of_json ~desc = function | `List l -> `List (List.filter_map (function `Var v -> Some v | _ -> None) l) | `Var _ as x -> x | _ -> fail "bad %s : expecting list or variable" desc type query_t = | Bool of ...
9c8dd7c852fd40417f0ca6be243743975aaea94dc223259ce27d90759e6a8ee9
robert-strandh/SICL
binary-divide-defgeneric.lisp
(cl:in-package #:sicl-arithmetic) (defgeneric binary-divide (dividend divisor))
null
https://raw.githubusercontent.com/robert-strandh/SICL/8822ce17afe352923e0a08c79b010c4ef73d2011/Code/Arithmetic/binary-divide-defgeneric.lisp
lisp
(cl:in-package #:sicl-arithmetic) (defgeneric binary-divide (dividend divisor))
3705d813400f2fecde0b3f798f987e13fd6fc932daa07b6defd3811fffe60df1
TurtleKitty/Vaquero
eval_apply.scm
(define (vaquero-eval code env) (define compile-env (vaquero-environment env)) (define prog (vaquero-compile (vaquero-expand code compile-env))) (prog env top-cont top-err)) (define (vaquero-apply obj xs opts cont err) (define (apply-or-die) (vaquero-send obj 'apply (lambda (af)...
null
https://raw.githubusercontent.com/TurtleKitty/Vaquero/4c7d06b13f71fe6d674b85041f0ef1d24eab5083/interpreter/eval_apply.scm
scheme
(define (vaquero-eval code env) (define compile-env (vaquero-environment env)) (define prog (vaquero-compile (vaquero-expand code compile-env))) (prog env top-cont top-err)) (define (vaquero-apply obj xs opts cont err) (define (apply-or-die) (vaquero-send obj 'apply (lambda (af)...
8b0061c22b265631293369bff07520a482330306131a0ea81a795bdab9b2e4aa
someodd/waffle
Draw.hs
-- | Functions for actually drawing the application state according to the current ` RenderMode ` , which is used by this Brick application 's ` Brick . Main.appDraw ` . module BrickApp.Draw where import Data.Maybe import Brick.Types as B import BrickApp.Draw.Open ( openConfigModeUI ) import BrickApp.Types import ...
null
https://raw.githubusercontent.com/someodd/waffle/71586b271878df4cb2368ae3bd6e2961cb79fa15/src/BrickApp/Draw.hs
haskell
| Functions for actually drawing the application state according to the current | The draw handler which will choose a UI based on the browser's mode. | Picks a UI/draw function based on the current gbsRenderMode.
` RenderMode ` , which is used by this Brick application 's ` Brick . Main.appDraw ` . module BrickApp.Draw where import Data.Maybe import Brick.Types as B import BrickApp.Draw.Open ( openConfigModeUI ) import BrickApp.Types import BrickApp.Types.Names import BrickApp.Draw.Menu import BrickApp.Draw.Help import Bri...
c0a6424e65de2e93e49d9d947345212a329249b82de03f6c61edb8d4ff9e9322
ChrisPenner/rasa
Vim.hs
{-# Language OverloadedStrings #-} module Rasa.Ext.Vim ( vim ) where import Rasa.Ext import Rasa.Ext.Views import Rasa.Ext.Files (save) import Rasa.Ext.Cursors import Control.Monad import Control.Lens import Data.Default import Data.Maybe (fromMaybe) import Data.Typeable import qualified Yi.Rope as Y -- | A type...
null
https://raw.githubusercontent.com/ChrisPenner/rasa/a2680324849088ee92f063fab091de21c4c2c086/rasa-ext-vim/src/Rasa/Ext/Vim.hs
haskell
# Language OverloadedStrings # | A type representing the current mode of a buffer | A history of any keypresses which haven't matched a pattern | The main export for the vim keybinding extension. Add this to your user config. e.g. > rasa $ do > vim > ... | The event listener which listens for keypresses...
module Rasa.Ext.Vim ( vim ) where import Rasa.Ext import Rasa.Ext.Views import Rasa.Ext.Files (save) import Rasa.Ext.Cursors import Control.Monad import Control.Lens import Data.Default import Data.Maybe (fromMaybe) import Data.Typeable import qualified Yi.Rope as Y data VimMode = Normal | Insert deriving ...
74f6cd5e317039264770bc9173c6eba583d9403243405a4d5e519d8560016dff
mvaldesdeleon/aoc18
Day12Main.hs
module Day12Main where import Day12 (day12) main :: IO () main = day12
null
https://raw.githubusercontent.com/mvaldesdeleon/aoc18/1a6f6de7c482e5de264360e36f97a3c7487e2457/app/Day12Main.hs
haskell
module Day12Main where import Day12 (day12) main :: IO () main = day12
c5ca8204897cbb275cdca7e7ad0da2a2d2f689cdf1db0ab94785bd7ee49f71ae
reactiveml/rml
check_version.ml
open Pervasives let parse_version s = let rec aux s = try let (i,rest) = Scanf.sscanf s ".%i%s" (fun i s -> i,s) in i::(aux rest) with | _ -> [] in let (major,minor) = Scanf.sscanf s " %i%s" (fun i s -> i,s) in major::(aux minor) let rec get_version_line () = let s = Pervasives.inp...
null
https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/toplevel-alt/js/js-of-ocaml/tools/check_version.ml
ocaml
open Pervasives let parse_version s = let rec aux s = try let (i,rest) = Scanf.sscanf s ".%i%s" (fun i s -> i,s) in i::(aux rest) with | _ -> [] in let (major,minor) = Scanf.sscanf s " %i%s" (fun i s -> i,s) in major::(aux minor) let rec get_version_line () = let s = Pervasives.inp...
f7862661fa2908caf6113578521a5daa24bbd1efcc881a643df815f6519cc87b
google/ormolu
parens-trailing-idempotence.hs
foo = quux (\x -> foo -- foo ) bar
null
https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/other/parens-trailing-idempotence.hs
haskell
foo
foo = quux (\x -> foo ) bar
5f71f6730fca2388dbe68941919a36df1583d1b65a822f75a4bfb24f5c259505
district0x/district-registry
district.cljs
(ns district-registry.ui.contract.district (:require [bignumber.core :as bn] [cljs-web3.core :as web3] [cljs-web3.eth :as web3-eth] [cljs.spec.alpha :as s] [clojure.string :as string] [district-registry.ui.contract.ens :as ens] [district.format :as format] [district.parsers :as parsers...
null
https://raw.githubusercontent.com/district0x/district-registry/d3a4b6fcf84cdfd817057f26f400d22eea983f4c/src/district_registry/ui/contract/district.cljs
clojure
(ns district-registry.ui.contract.district (:require [bignumber.core :as bn] [cljs-web3.core :as web3] [cljs-web3.eth :as web3-eth] [cljs.spec.alpha :as s] [clojure.string :as string] [district-registry.ui.contract.ens :as ens] [district.format :as format] [district.parsers :as parsers...
0d5e9f354ba82c96c6fca55c1515528269d8f80018cab16860f696187cad9bd5
bmeurer/ocaml-experimental
syntaxerr.mli
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/bmeurer/ocaml-experimental/fe5c10cdb0499e43af4b08f35a3248e5c1a8b541/parsing/syntaxerr.mli
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1997 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ Id$ open Format type error = ...
ee7621cbd9ead079b34c12e9a8bb2f6094a0b0346b02833a978ee40f9d78afe1
BitGameEN/bitgamex
erlcloud_xml.erl
-module(erlcloud_xml). -export([decode/2, decode/3, get_bool/2, get_float/2, get_integer/2, get_integer/3, get_list/2, get_text/1, get_text/2, get_text/3, get_time/2]). -include_lib("xmerl/include/xmerl.hrl"). decode(Values, Node) -> lists:reverse( lists:foldl( fun ({Name, XPath, T...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/erlcloud/src/erlcloud_xml.erl
erlang
-module(erlcloud_xml). -export([decode/2, decode/3, get_bool/2, get_float/2, get_integer/2, get_integer/3, get_list/2, get_text/1, get_text/2, get_text/3, get_time/2]). -include_lib("xmerl/include/xmerl.hrl"). decode(Values, Node) -> lists:reverse( lists:foldl( fun ({Name, XPath, T...
0814367dc79cc8a39046d8c4a10e774f8797bba77d2a3280d3a6a1f5d7ccf9eb
denisshevchenko/breadu.info
IndexPage.hs
| Module : BreadU.Pages . . IndexPage Description : HTML markup for the index page . Stability : experimental Portability : POSIX HTML markup for the index page . Module : BreadU.Pages.Markup.IndexPage Description : HTML markup for the index page. Stability : experimental Portability : POS...
null
https://raw.githubusercontent.com/denisshevchenko/breadu.info/b613fa28a4b527f1459876348a72e7748f16cd88/src/lib/BreadU/Pages/Markup/IndexPage.hs
haskell
Render HTML for fake index page. Render markup for the real, localized index page. We're using blaze-html DSL to build HTML. It's building from the parts in the same context. sometimes it's useful. | HTML-based redirection to language-specific index page. | Block for the main food form. This button should be su...
| Module : BreadU.Pages . . IndexPage Description : HTML markup for the index page . Stability : experimental Portability : POSIX HTML markup for the index page . Module : BreadU.Pages.Markup.IndexPage Description : HTML markup for the index page. Stability : experimental Portability : POS...
ac99abc8a6e36def897f1dfc22fa7efc3035482b44d6423f8cc36ee95f54d3f2
nikita-volkov/binary-parser
BinaryParser.hs
# LANGUAGE CPP # module BinaryParser ( BinaryParser, run, failure, byte, matchingByte, bytesOfSize, bytesWhile, unitOfSize, unitOfBytes, unitWhile, remainders, fold, endOfInput, sized, -- * Extras storableOfSize, beWord16, leWord16, beWord32, ...
null
https://raw.githubusercontent.com/nikita-volkov/binary-parser/478eb25770f2d2b5f4296630e4669684715f167e/library/BinaryParser.hs
haskell
* Extras | Supports the roll-back and alternative branching on the basis of the 'Alternative' interface. Does not generate fancy error-messages, which contributes to its efficiency. | Apply a parser to bytes. | Fail with a message. | Consume a single byte. | Consume a single byte, which satisfies the pr...
# LANGUAGE CPP # module BinaryParser ( BinaryParser, run, failure, byte, matchingByte, bytesOfSize, bytesWhile, unitOfSize, unitOfBytes, unitWhile, remainders, fold, endOfInput, sized, storableOfSize, beWord16, leWord16, beWord32, leWord32, ...
3d2ccc90de2155c25a3558d3eb053cd2428cd03da246f619e3731fff3a555fbb
MastodonC/kixi.datastore
schemaextracter_test.clj
(ns kixi.datastore.schemaextracter-test (:require [clojure.test :refer :all] [kixi.datastore.schemaextracter :refer :all])) (deftest basic-selections (is (= string (schema-for :header "foo"))) (is (= string (schema-for :header "123"))) (is (= numeric (schema-for :value "1...
null
https://raw.githubusercontent.com/MastodonC/kixi.datastore/f33bba4b1fdd8c56cc7ac0f559ffe35254c9ca99/test/kixi/datastore/schemaextracter_test.clj
clojure
(ns kixi.datastore.schemaextracter-test (:require [clojure.test :refer :all] [kixi.datastore.schemaextracter :refer :all])) (deftest basic-selections (is (= string (schema-for :header "foo"))) (is (= string (schema-for :header "123"))) (is (= numeric (schema-for :value "1...
2f4f452990ca40732809d88f4a3f3b2b80b7ee7a16240b156067671605f76b62
fission-codes/fission
Server.hs
-- | Top level web application and API module Fission.Web.Server (app, server) where import Network.IPFS import Network.IPFS.Client.Streaming.Pin import Servant import Servant.API.Generic import Servant.Server.Generic import qualified Web.UCAN.Resolver ...
null
https://raw.githubusercontent.com/fission-codes/fission/8b47050418c3ebf5736c0a09504230578341865d/fission-web-server/library/Fission/Web/Server.hs
haskell
| Top level web application and API | Top level web API type. Handled by 'server'. | Web handlers for the 'API'
module Fission.Web.Server (app, server) where import Network.IPFS import Network.IPFS.Client.Streaming.Pin import Servant import Servant.API.Generic import Servant.Server.Generic import qualified Web.UCAN.Resolver as Proof import ...
ab29b587d83920eb818cd957cb22d144fd2682210c3db936e29a1391a9b5b301
sirherrbatka/clusters
random.lisp
(cl:in-package #:clusters.utils) (-> draw-random-vector (vector positive-fixnum &optional vector) vector) (defun draw-random-vector (input size &optional (result (make-array size :element-type (array-element-type input)))) (when (ar...
null
https://raw.githubusercontent.com/sirherrbatka/clusters/20b8b60005ac8e27d12d05d277b26d8b5ca5c238/source/utils/random.lisp
lisp
(cl:in-package #:clusters.utils) (-> draw-random-vector (vector positive-fixnum &optional vector) vector) (defun draw-random-vector (input size &optional (result (make-array size :element-type (array-element-type input)))) (when (ar...
06e1748d0ed0854d0a41a01b3a426c29a8bc9a71902e494f183c79cc09f68921
OlafChitil/hat
HatStackText.hs
HatStack main program import LowLevel (openHatFile,FileNode(..),nil,getParentNode ,getErrorLoc,getErrorMessage ,getSrcRef) import SrcRef (SrcRef(..),readSrcRef) import SExp (SExp(..),Label,fileNode2SExp,sExp2Doc,prune) import Pre...
null
https://raw.githubusercontent.com/OlafChitil/hat/8840a480c076f9f01e58ce24b346850169498be2/tools/HatStackText.hs
haskell
HatStack main program import LowLevel (openHatFile,FileNode(..),nil,getParentNode ,getErrorLoc,getErrorMessage ,getSrcRef) import SrcRef (SrcRef(..),readSrcRef) import SExp (SExp(..),Label,fileNode2SExp,sExp2Doc,prune) import Pre...
73b92df98aad133f5a31037cea03fca4342d20a9fa3993986616ab28143844ab
juxt/bolt
main.clj
Copyright © 2015 , JUXT LTD . (ns bolt.dev.main "Main entry point" (:require clojure.pprint) (:gen-class)) (defn -main [& args] ;; We eval so that we don't AOT anything beyond this class (eval '(do (require 'bolt.dev.main) (require 'dev) (require 'com.stuartsierra.co...
null
https://raw.githubusercontent.com/juxt/bolt/f77be416f82c1ca19d5dc20a15942375edc9b740/dev/src/bolt/dev/main.clj
clojure
We eval so that we don't AOT anything beyond this class
Copyright © 2015 , JUXT LTD . (ns bolt.dev.main "Main entry point" (:require clojure.pprint) (:gen-class)) (defn -main [& args] (eval '(do (require 'bolt.dev.main) (require 'dev) (require 'com.stuartsierra.component) (require '[modular.component.co-depende...
0c605e68050b60ecabec5c2779fd58045a5b9ff71a70a5e42ceb540cc8842545
JustusAdam/language-haskell
T0018.hs
SYNTAX TEST " source.haskell " " Module exporting a module " module Main ( module M -- ^^^^^^ meta.declaration.exports.haskell keyword.other.module.haskell , M ^ meta.declaration.exports.haskell storage.type.haskell , foo entity.name.function.haskell ) where
null
https://raw.githubusercontent.com/JustusAdam/language-haskell/c9ee1b3ee166c44db9ce350920ba502fcc868245/test/tickets/T0018.hs
haskell
^^^^^^ meta.declaration.exports.haskell keyword.other.module.haskell
SYNTAX TEST " source.haskell " " Module exporting a module " module Main ( module M , M ^ meta.declaration.exports.haskell storage.type.haskell , foo entity.name.function.haskell ) where