_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
0ce2c92df932695d4d276e2bf851ce85e5760d4eaefd7644db9f469cfc02caa5
Clozure/ccl-tests
maplist.lsp
;-*- Mode: Lisp -*- Author : Created : Sun Apr 20 07:24:00 2003 Contains : Tests of MAPLIST (in-package :cl-test) (compile-and-load "cons-aux.lsp") (deftest maplist.1 (maplist #'list nil) nil) (deftest maplist.2 (let* ((x (copy-list '(a b c))) (xcopy (make-scaffold-copy x)) (result (mapli...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/maplist.lsp
lisp
-*- Mode: Lisp -*- Error tests
Author : Created : Sun Apr 20 07:24:00 2003 Contains : Tests of MAPLIST (in-package :cl-test) (compile-and-load "cons-aux.lsp") (deftest maplist.1 (maplist #'list nil) nil) (deftest maplist.2 (let* ((x (copy-list '(a b c))) (xcopy (make-scaffold-copy x)) (result (maplist #'identity x))) (...
c3b6fde2aecfd7219baf96d6e532a1fde4f0d48a8372340ce1880570ccf4e0d3
penpot/penpot
exports.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.main.ui.viewer.inspect.exports (:require [app.common.data :as d] [app.main.data.exports :as de...
null
https://raw.githubusercontent.com/penpot/penpot/87a264ae405f8ba2f64b548850f348f84d7f602f/frontend/src/app/main/ui/viewer/inspect/exports.cljs
clojure
Copyright (c) KALEIDOS INC In other all cases we only allowed to have a single shape-id because multiple shape-ids are handled separately by the export-modal.
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.main.ui.viewer.inspect.exports (:require [app.common.data :as d] [app.main.data.exports :as de] [app.main.refs :as refs] ...
fbb88c776464bf1e56a12794626818949b527d8781b358ff375e3dfe255ea67d
qfpl/reflex-tutorial
Exercise.hs
# LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} module Ex06.Exercise where import Control.Monad.Fix (MonadFix) import Data.Text (Text) import qualified Data.Map as Map import Reflex #ifndef ghcjs_HOST_OS import Util.Run #endif import Ex06.Common import Ex06.Run ex06 :: ( Reflex t , MonadFix m , MonadHol...
null
https://raw.githubusercontent.com/qfpl/reflex-tutorial/07c1e6fab387cbeedd031630ba6a5cd946cc612e/code/exercises/src/Ex06/Exercise.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE CPP # module Ex06.Exercise where import Control.Monad.Fix (MonadFix) import Data.Text (Text) import qualified Data.Map as Map import Reflex #ifndef ghcjs_HOST_OS import Util.Run #endif import Ex06.Common import Ex06.Run ex06 :: ( Reflex t , MonadFix m , MonadHold t m ) => Inputs t -> m (Out...
6955c989256bff858b130388b94bd0fb16fb734378eeff5fd7ff224e449b7baa
nuvla/ui
portal.cljs
(ns dev.portal (:require [portal.shadow.remote :as r] [portal.web :as p])) (defn- submit [value] (p/submit value) (r/submit value)) (defn- error->data [ex] (merge (when-let [data (.-data ex)] {:data data}) {:runtime :portal :cause (.-message ex) :via [{:type (symb...
null
https://raw.githubusercontent.com/nuvla/ui/844e5c4092bbdee1bb726fb4673196b0d5e00026/code/src/cljs/dev/portal.cljs
clojure
With this line the portal window opens when browsing to nui.localhost (p/open) We could also put it in a rich comment block and just eval this here To close it
(ns dev.portal (:require [portal.shadow.remote :as r] [portal.web :as p])) (defn- submit [value] (p/submit value) (r/submit value)) (defn- error->data [ex] (merge (when-let [data (.-data ex)] {:data data}) {:runtime :portal :cause (.-message ex) :via [{:type (symb...
77a0001c84a977d16843e7569cc2a639e01840d8f7b7bcc82bcb4aea84057dd5
henryw374/cljc.java-time
year_month.cljs
(ns cljc.java-time.year-month (:refer-clojure :exclude [abs get range format min max next name resolve short]) (:require [cljc.java-time.extn.calendar-awareness] [goog.object] [java.time :refer [YearMonth]])) (clojure.core/defn length-of-year {:arglists (quote (["java.time.YearMonth"]))} (^int [^js/JSJoda.YearMonth thi...
null
https://raw.githubusercontent.com/henryw374/cljc.java-time/2e47e8104bc2ec7f68a01bf751a7b9a2dee391b4/src/cljc/java_time/year_month.cljs
clojure
(ns cljc.java-time.year-month (:refer-clojure :exclude [abs get range format min max next name resolve short]) (:require [cljc.java-time.extn.calendar-awareness] [goog.object] [java.time :refer [YearMonth]])) (clojure.core/defn length-of-year {:arglists (quote (["java.time.YearMonth"]))} (^int [^js/JSJoda.YearMonth thi...
6f9806e73745521c915034e5efda0d7b937f6e1ed0d9ac96215933f6d0e3beda
Soyn/sicp
Ex3.03.rkt
#lang racket Ex3.03 ;; Created by Soyn. 2/8/15. ;; @Brief:Modify the make-account procedure so that it creates password-protected accounts. ;; That is, make-account should take a symbol as an additional argument, as in ( define acc ( make - account 100 ' secret - password ) ) ;; The resulting account object shou...
null
https://raw.githubusercontent.com/Soyn/sicp/d2aa6e3b053f6d4c8150ab1b033a18f61fca7e1b/CH3/CH3.1/Ex3.03.rkt
racket
Created by Soyn. 2/8/15. @Brief:Modify the make-account procedure so that it creates password-protected accounts. That is, make-account should take a symbol as an additional argument, as in The resulting account object should process a request only if it is accompanied by the password with which the account was cr...
#lang racket Ex3.03 ( define acc ( make - account 100 ' secret - password ) ) ( ( acc ' secret - password ' withdraw ) 40 ) 60 ( ( acc ' some - other - password ' deposit ) 50 ) ( define ( make-account balance password) ( define ( withdraw amount) ( if ( >= balance amount) ( begin ( set! balance ...
f41e0ff5a9c307d254ef69496e89c0c926ee96de5e309b4aa690657be055576d
Mayvenn/storefront
frontend_effects.cljs
(ns storefront.frontend-effects (:require [ajax.core :as ajax] api.orders [api.catalog :refer [select]] [storefront.accessors.contentful :as contentful] [clojure.set :as set] [mayvenn.concept.email-capture :as email-capture] [mayvenn.concept.hard...
null
https://raw.githubusercontent.com/Mayvenn/storefront/246c6906e2152a55683d5e8bf642208d7d082513/src-cljs/storefront/frontend_effects.cljs
clojure
In a timeout so that changes to the advertised promo aren't changing the scroll too. Enables Kustomer Chat 2.0 not= false If browser doesn't support timezone, lookup anyway limit lookup to central timezone Remove when experiments/add-on-services is removed A user has clicked a link The URL has already changed. S...
(ns storefront.frontend-effects (:require [ajax.core :as ajax] api.orders [api.catalog :refer [select]] [storefront.accessors.contentful :as contentful] [clojure.set :as set] [mayvenn.concept.email-capture :as email-capture] [mayvenn.concept.hard...
d50da956bab6621fdbe9f2ac8e108f5ba808658f45c40dd088562cdab7aaecb8
McParen/croatoan
border_set.lisp
(in-package :de.anvi.croatoan) (defun draw-wide-border (window &key left right top bottom top-left top-right bottom-left bottom-right) "Draw a border around the window using (wide) unicode line-drawing characters. If no border chars are given, the default ncurses WACS chars will be u...
null
https://raw.githubusercontent.com/McParen/croatoan/46a5aba653389d15ae16dc0a581fd67a33378b62/src/border_set.lisp
lisp
take a list of (wide) character codes and empty cchar_t pointers, return a list of cchar_t pointers or null pointers. if nil, then null-pointer, then the default wacs will be used if not nil, pointer to cchar_t blank the wch array in the struct copy the char code to the wch array assemble the cchar_t using %setcc...
(in-package :de.anvi.croatoan) (defun draw-wide-border (window &key left right top bottom top-left top-right bottom-left bottom-right) "Draw a border around the window using (wide) unicode line-drawing characters. If no border chars are given, the default ncurses WACS chars will be u...
5a6fe2affff26f3cd9588840a9bb202cfe494bc031c71a1cf814b5f33d39321e
rizo/snowflake-os
printinstr.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/plugins/ocamlopt.opt/bytecomp/printinstr.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 . $ Id$ open Format open Lambda open ...
e46800364db9bd1bfc3a9933bb5f9598ea8ae394c27aed1baad456f204e94e65
jgrodziski/set-game
prod.cljs
(ns set-game.prod (:require [set-game.core :as core])) ;;ignore println statements in prod (set! *print-fn* (fn [& _])) (core/init!)
null
https://raw.githubusercontent.com/jgrodziski/set-game/4f918f53f26fe1b7744773cf1786ccf7272a121d/backend/env/prod/cljs/set_game/prod.cljs
clojure
ignore println statements in prod
(ns set-game.prod (:require [set-game.core :as core])) (set! *print-fn* (fn [& _])) (core/init!)
e43809cf52584a3e55dfb7ca0c71e4833caa65ac52c5b43b1c6367ce2000c0c1
martinklepsch/tenzing
styles.clj
(ns {{name}}.styles (:require [garden.def :refer [defrule defstyles]] [garden.stylesheet :refer [rule]])) (defstyles screen (let [body (rule :body)] (body {:font-family "Helvetica Neue" :font-size "16px" :line-height 1.5})))
null
https://raw.githubusercontent.com/martinklepsch/tenzing/d147f988128f3377be7d94c6cbf78d01d481c86e/resources/leiningen/new/tenzing/styles.clj
clojure
(ns {{name}}.styles (:require [garden.def :refer [defrule defstyles]] [garden.stylesheet :refer [rule]])) (defstyles screen (let [body (rule :body)] (body {:font-family "Helvetica Neue" :font-size "16px" :line-height 1.5})))
9d1d7abc94dd4e797f0492366ccc904568dfb48be8843cbd30dcd8b06e0f746b
diprism/perpl
Show.hs
module Struct.Show where import Data.List (intercalate) import Util.Helpers import Struct.Exprs import Struct.Helpers {- Convert back from elaborated terms to user terms -} toUsTm :: Term -> UsTm toUsTm (TmVarL x _) = UsVar x toUsTm (TmVarG gv x tgs tis as _tp) = let x' = TmV (intercalate " " (show x : ["[" ++ p ++...
null
https://raw.githubusercontent.com/diprism/perpl/65a69a5cf2dc62d0f478a427314ed5b4e325e654/src/Struct/Show.hs
haskell
Convert back from elaborated terms to user terms Show Instances
module Struct.Show where import Data.List (intercalate) import Util.Helpers import Struct.Exprs import Struct.Helpers toUsTm :: Term -> UsTm toUsTm (TmVarL x _) = UsVar x toUsTm (TmVarG gv x tgs tis as _tp) = let x' = TmV (intercalate " " (show x : ["[" ++ p ++ "]" | p <- (show <$> tgs) ++ (show <$> tis)])) in fo...
a81b31356bef8f273e5bcec31f95cd41be83d0a9455c6c2dee8987cf53d0f247
tfausak/patrol
AppContextSpec.hs
# LANGUAGE QuasiQuotes # module Patrol.Type.AppContextSpec where import qualified Data.Aeson as Aeson import qualified Data.Aeson.QQ.Simple as Aeson import qualified Data.Text as Text import qualified Data.Time as Time import qualified Patrol.Type.AppContext as AppContext import qualified Test.Hspec as Hspec spec ::...
null
https://raw.githubusercontent.com/tfausak/patrol/1cae55b3840b328cda7de85ea424333fcab434cb/source/test-suite/Patrol/Type/AppContextSpec.hs
haskell
# LANGUAGE QuasiQuotes # module Patrol.Type.AppContextSpec where import qualified Data.Aeson as Aeson import qualified Data.Aeson.QQ.Simple as Aeson import qualified Data.Text as Text import qualified Data.Time as Time import qualified Patrol.Type.AppContext as AppContext import qualified Test.Hspec as Hspec spec ::...
f1afd63b8dc12effb18009cb999d486d0670d8895c3e68b8495d943ecada24bd
processone/xmpp
xep0153.erl
Created automatically by XML generator ( fxml_gen.erl ) %% Source: xmpp_codec.spec -module(xep0153). -compile(export_all). do_decode(<<"x">>, <<"vcard-temp:x:update">>, El, Opts) -> decode_vcard_xupdate(<<"vcard-temp:x:update">>, Opts, El); do_decode(...
null
https://raw.githubusercontent.com/processone/xmpp/88c43c3cf5843a8a0f76eac390980a3a39c972dd/src/xep0153.erl
erlang
Source: xmpp_codec.spec
Created automatically by XML generator ( fxml_gen.erl ) -module(xep0153). -compile(export_all). do_decode(<<"x">>, <<"vcard-temp:x:update">>, El, Opts) -> decode_vcard_xupdate(<<"vcard-temp:x:update">>, Opts, El); do_decode(<<"photo">>, <<"vcard-temp:...
9e6a1eaf410b72c84b71dce682ee6fc2b2e2119954966a3e017b72bb6384d539
hspec/sensei
EventQueueSpec.hs
module EventQueueSpec (spec) where import Helper import EventQueue withGitRepository :: (FilePath -> IO a) -> IO a withGitRepository action = withTempDirectory $ \ dir -> do readProcess "git" ["-C", dir, "init"] "" >> action dir spec :: Spec spec = do describe "processEvents" $ do around...
null
https://raw.githubusercontent.com/hspec/sensei/f43a9386bafd46812dd68088b5fdfadfef722d0b/test/EventQueueSpec.hs
haskell
module EventQueueSpec (spec) where import Helper import EventQueue withGitRepository :: (FilePath -> IO a) -> IO a withGitRepository action = withTempDirectory $ \ dir -> do readProcess "git" ["-C", dir, "init"] "" >> action dir spec :: Spec spec = do describe "processEvents" $ do around...
aedf34fd1c72cf9b5a1f5d1b44a40d933cd008c9f4ba7b94334d34e8c31f53dc
clojupyter/clojupyter
heartbeat_process.clj
(ns clojupyter.zmq.heartbeat-process (:require [clojupyter.log :as log] [clojupyter.shutdown :as shutdown] [clojupyter.state :as state] [clojupyter.util :as u] [clojupyter.util-actions :as u!] [clojupyter.zmq-specs :as zp] [clojupyter.zmq-util :a...
null
https://raw.githubusercontent.com/clojupyter/clojupyter/b54b30b5efa115937b7a85e708a7402bd9efa0ab/src/clojupyter/zmq/heartbeat_process.clj
clojure
term-signal-ch is exclusively used for testing, to verify hb termination: heartbeat arrived error on socket term signal arrived
(ns clojupyter.zmq.heartbeat-process (:require [clojupyter.log :as log] [clojupyter.shutdown :as shutdown] [clojupyter.state :as state] [clojupyter.util :as u] [clojupyter.util-actions :as u!] [clojupyter.zmq-specs :as zp] [clojupyter.zmq-util :a...
da30a7164edccf01c8cceac1b4bf24cf780502da7e814fc380046f186c2893f1
tweag/pirouette
Process.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # module PureSMT.Process where import Control.Monad import Data.ByteString.Builder (Builder, hPutBuilder) import qualified Data.ByteString.Lazy.Char8 as LBS import PureSMT.SExpr hiding (not) import qualified SMTLIB.Backends as SMT ...
null
https://raw.githubusercontent.com/tweag/pirouette/840569bebf4eb7e386043d7f809ef2f3676bc273/src/PureSMT/Process.hs
haskell
# LANGUAGE OverloadedStrings # | Launch a solver. Here we just initialize a new context for the Z3 C API to work with. In debug mode we disable queuing commands with no interesting output. | Whether or not to debug the interaction This forces the queued commands to be evaluated as well, but their results are *not...
# LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # module PureSMT.Process where import Control.Monad import Data.ByteString.Builder (Builder, hPutBuilder) import qualified Data.ByteString.Lazy.Char8 as LBS import PureSMT.SExpr hiding (not) import qualified SMTLIB.Backends as SMT import qualified SMTLIB.Backends.Z3...
9fedaf92bc6193386307e8a7ef5be6cc00c77d0d387c4c0849e72d255fe28c5c
dpiponi/Moodler
zero.hs
do plane <- currentPlane (x, y) <- fmap (quantise2 quantum) mouse panel <- container' "panel_3x1.png" (x, y) (Inside plane) lab <- label' "zero" (x-25.0, y+75.0) (Inside plane) parent panel lab name <- new' "zero" out <- plugout' (name ++ ".result") (x+20, y) (Inside plane) setColour ou...
null
https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/zero.hs
haskell
do plane <- currentPlane (x, y) <- fmap (quantise2 quantum) mouse panel <- container' "panel_3x1.png" (x, y) (Inside plane) lab <- label' "zero" (x-25.0, y+75.0) (Inside plane) parent panel lab name <- new' "zero" out <- plugout' (name ++ ".result") (x+20, y) (Inside plane) setColour ou...
888c7cefb1f8affcd94d0b3d7553550a751407b095e7358d99486cd8b191fb42
Zulu-Inuoe/clution
reload.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; indent - tabs - mode : nil ; coding : utf-8 ; show - trailing - whitespace : t -*- ;;; Copyright ( C ) 2001 , 2003 Copyright ( C ) 2005 " the conditions and ENSURE - SSL - FUNCALL are by . " ;;; ;;; See LICENSE for details. ;;; We do this in an extra file so...
null
https://raw.githubusercontent.com/Zulu-Inuoe/clution/b72f7afe5f770ff68a066184a389c23551863f7f/cl-clution/qlfile-libs/cl%2Bssl-20171227-git/src/reload.lisp
lisp
Syntax : COMMON - LISP ; indent - tabs - mode : nil ; coding : utf-8 ; show - trailing - whitespace : t -*- See LICENSE for details. We do this in an extra file so that it happens - after the asd file has been loaded, so that users can customize *libssl-pathname* between loading the asd and LOAD-OPing ...
Copyright ( C ) 2001 , 2003 Copyright ( C ) 2005 " the conditions and ENSURE - SSL - FUNCALL are by . " - but not every time ffi.lisp is re - loaded as would happen if we put this directly into ffi.lisp #+xcvb (module (:depends-on ("package"))) (in-package :cl+ssl) OpenBSD needs to load ...
1445b12e864917de8e4a1b8083448f0eb9a6a9207e4b9b8a293c617aa6defe9c
BranchTaken/Hemlock
array.ml
open Rudiments0 module List = List0 module T = struct type 'a t = 'a array type 'a elm = 'a let get i t = Stdlib.Array.get t Uns.(trunc_to_int i) let length t = Uns.extend_of_int (Stdlib.Array.length t) let range t = 0L =:< length t module Cursor = struct module T = struct type '...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/1c2109aaf351a25c16cee357987c173e3d110b2b/bootstrap/src/basis/array.ml
ocaml
== is excessively vague in OCaml. Special-purpose, for fold[i]_map . Special-purpose, for fold[i]2_map . == is excessively vague in OCaml. Choose direction such that overlapping ranges don't corrupt the source. Merge a pair of adjacent runs. Input runs may be in increasing or decreasing order; the * out...
open Rudiments0 module List = List0 module T = struct type 'a t = 'a array type 'a elm = 'a let get i t = Stdlib.Array.get t Uns.(trunc_to_int i) let length t = Uns.extend_of_int (Stdlib.Array.length t) let range t = 0L =:< length t module Cursor = struct module T = struct type '...
ba1fe2ae7e29004e5c4b68ff83d4fa1d88486bfaaad1ba0ffa467f92dc69fd9e
openvstorage/alba
asd_bench.ml
Copyright ( C ) iNuron - This file is part of Open vStorage . For license information , see < LICENSE.txt > Copyright (C) iNuron - This file is part of Open vStorage. For license information, see <LICENSE.txt> *) open! Prelude open Lwt.Infix open Cmdliner open Cli_common open Cli_bench_common (* TODO...
null
https://raw.githubusercontent.com/openvstorage/alba/459bd459335138d6b282d332fcff53a1b4300c29/ocaml/src/asd_bench.ml
ocaml
TODO bench_asd_no_network
Copyright ( C ) iNuron - This file is part of Open vStorage . For license information , see < LICENSE.txt > Copyright (C) iNuron - This file is part of Open vStorage. For license information, see <LICENSE.txt> *) open! Prelude open Lwt.Infix open Cmdliner open Cli_common open Cli_bench_common TODO ...
aef9036266c5c8992db50795229370c8d7e839e6f1c479fef2a2be7f0404eb24
upenn-cis1xx/camelot
arthur.ml
type t = Arthur_parse.arthur let lint_config_file : string ref = ref "arthur.json" let print_config : t -> unit = fun v -> print_string @@ Arthur_parse.pp_arthur v let parse : unit -> t lazy_t = fun _ -> lazy (Arthur_parse.json_to_arthur (Arthur_parse.from_file !lint_config_file)) let extract : t -> (string ...
null
https://raw.githubusercontent.com/upenn-cis1xx/camelot/2d7e8db8abb8c1ad8187bfeb94499fe1746bb664/lib/arthur/arthur.ml
ocaml
If the config has no rule - only globals apply
type t = Arthur_parse.arthur let lint_config_file : string ref = ref "arthur.json" let print_config : t -> unit = fun v -> print_string @@ Arthur_parse.pp_arthur v let parse : unit -> t lazy_t = fun _ -> lazy (Arthur_parse.json_to_arthur (Arthur_parse.from_file !lint_config_file)) let extract : t -> (string ...
dc4d53faaa88995b1307dd413bee2294c18e030f2f4a374071531b71381d5847
Frama-C/Frama-C-snapshot
obfuscator_kind.mli
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/obfuscator/obfuscator_kind.mli
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
6ffa1bcb28dfc27aae1373206eec76134d15c2a7e0db6344d6fdcb17b63bca6f
refuge/cowdb
cowdb_basic_tests.erl
%%-*- mode: erlang -*- %% This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% -module(cowdb_basic_tests). -include("cowdb_tests.hrl"). -define(setup(F), {setup, fun setup/0, fun teardown/1, F...
null
https://raw.githubusercontent.com/refuge/cowdb/40d72119a59407c7dddc140443b518a90338e347/test/cowdb_basic_tests.erl
erlang
-*- mode: erlang -*-
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(cowdb_basic_tests). -include("cowdb_tests.hrl"). -define(setup(F), {setup, fun setup/0, fun teardown/1, F}). -define(foreach(Fs), {for...
82de3df53980a450e2ba510733fbcabdd1f0c207d41e08326aafe8644e06cdc6
anoma/juvix
FromInternal.hs
module Juvix.Compiler.Backend.C.Translation.FromInternal ( module Juvix.Compiler.Backend.C.Translation.FromInternal, module Juvix.Compiler.Backend.C.Data.Types, ) where import Data.HashMap.Strict qualified as HashMap import Data.Text qualified as T import Juvix.Compiler.Abstract.Translation.FromConcrete.Data.C...
null
https://raw.githubusercontent.com/anoma/juvix/58a0f196da301ccf56e280ca4bd28abd35e0a75a/src/Juvix/Compiler/Backend/C/Translation/FromInternal.hs
haskell
Assumption: All clauses have the same number of patterns TODO: _declName is never Nothing by construction, fix the types
module Juvix.Compiler.Backend.C.Translation.FromInternal ( module Juvix.Compiler.Backend.C.Translation.FromInternal, module Juvix.Compiler.Backend.C.Data.Types, ) where import Data.HashMap.Strict qualified as HashMap import Data.Text qualified as T import Juvix.Compiler.Abstract.Translation.FromConcrete.Data.C...
78a58cdb233bd70a69476fa322ae5aa19eee1387ee70cfd62a9084a36c87ccac
dnaeon/cl-ssh-keys
package.lisp
Copyright ( c ) 2020 Nikolov < > ;; All rights reserved. ;; ;; 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 co...
null
https://raw.githubusercontent.com/dnaeon/cl-ssh-keys/544f2631f07d7b94de498aabded1267358b49268/src/package.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer in this position and unchanged. notice, this list of conditions and the fo...
Copyright ( c ) 2020 Nikolov < > 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S ) ` ` AS IS '' AND ANY EXPRESS OR INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES...
ab2b96eee20a33fd053a33d5cbc6f35090acd06b15b0a507e4df661742af7f76
xtdb/core2
operator_test.clj
(ns core2.operator-test (:require [clojure.test :as t] [core2.api :as c2] [core2.expression.metadata :as expr.meta] [core2.node :as node] [core2.metadata :as meta] [core2.test-util :as tu]) (:import (core2.metadata IMetadataManager) (java.time L...
null
https://raw.githubusercontent.com/xtdb/core2/3adeb391ca4dd73a3f79faba8024289376597d23/src/test/clojure/core2/operator_test.clj
clojure
to prevent same-ms transactions
(ns core2.operator-test (:require [clojure.test :as t] [core2.api :as c2] [core2.expression.metadata :as expr.meta] [core2.node :as node] [core2.metadata :as meta] [core2.test-util :as tu]) (:import (core2.metadata IMetadataManager) (java.time L...
7ace76fc46b549a7c28b3b43dd55be823e5e8777b0005cfd88c94735265823f3
haskell/cabal
Environment.hs
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # {-# LANGUAGE RankNTypes #-} {-# OPTIONS_HADDOCK hide #-} module Distribution.Compat.Environment ( getEnvironment, lookupEnv, setEnv, unsetEnv ) where import Prelude () import qualified Prelude import Distribution.Compat.Prelude import qualified System.Envi...
null
https://raw.githubusercontent.com/haskell/cabal/f72c86e4bee4fcfb26b593152e4200c5364854dd/Cabal/src/Distribution/Compat/Environment.hs
haskell
# LANGUAGE RankNTypes # # OPTIONS_HADDOCK hide # often given in mixed-case (e.g. "PATH" is "Path"), so we have to normalise them. | @setEnv name value@ sets the specified environment variable to @value@. Throws `Control.Exception.IOException` if either @name@ or @value@ is the empty string or contains an equals s...
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # module Distribution.Compat.Environment ( getEnvironment, lookupEnv, setEnv, unsetEnv ) where import Prelude () import qualified Prelude import Distribution.Compat.Prelude import qualified System.Environment as System import System.Environment (lookupEnv, u...
f0e2673ad42bae6a2ae57b0eef17c1d6bf5688d4b0787ab44603ee1e351683e4
bobbae/gosling-emacs
current-line.ml
(defun (current-line lineno (save-excursion (beginning-of-line) (set-mark) (setq lineno 1) (beginning-of-file) (while (< (dot) (mark)) (next-line) (setq lineno (+ lineno 1)) ) (setq lineno lineno) ) ) )
null
https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/maclib/current-line.ml
ocaml
(defun (current-line lineno (save-excursion (beginning-of-line) (set-mark) (setq lineno 1) (beginning-of-file) (while (< (dot) (mark)) (next-line) (setq lineno (+ lineno 1)) ) (setq lineno lineno) ) ) )
933d384686bdceb23b293aeb21ac43ef8624f67389291dd21156a53b7101c7dc
2600hz-archive/whistle
webmachine_decision_core.erl
@author < > @author < > @author < > 2007 - 2009 Basho Technologies %% 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 requir...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/webmachine-1.8.0/src/webmachine_decision_core.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. limitations under the License. @doc D...
@author < > @author < > @author < > 2007 - 2009 Basho Technologies Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , See the License for the specific language governing permissions and -module(web...
cb0f9a09c3654a3e547b5200f80027d2ca37036d786536def98c4cda857a772f
TrustInSoft/tis-kernel
Factory.ml
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/Factory.ml
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of WP plug - in of Frama - C. Copyright ( C ) 2007 - 2015 ...
5171cfc6bd52f22b736f73ed41b6e3525628631a196efeb93fbc464445a054fa
clj-kafka/franzy
consumer_metrics.clj
(ns franzy.examples.consumer.consumer-metrics (:require [franzy.clients.consumer.client :as consumer] [franzy.clients.consumer.types :as ct] [franzy.common.models.types :as mt] [franzy.clients.consumer.protocols :refer :all] [franzy.common.metadata.protocols :refer :all...
null
https://raw.githubusercontent.com/clj-kafka/franzy/6c2e2e65ad137d2bcbc04ff6e671f97ea8c0e380/examples/src/franzy/examples/consumer/consumer_metrics.clj
clojure
Consumer Metrics This is a simple example of how to query a consumer's metrics. You'll want to tweak the properties more in reality, so read up on the metric related config settings. This example should dump out some results for you to think about what you can gather and how you might want to use that information...
(ns franzy.examples.consumer.consumer-metrics (:require [franzy.clients.consumer.client :as consumer] [franzy.clients.consumer.types :as ct] [franzy.common.models.types :as mt] [franzy.clients.consumer.protocols :refer :all] [franzy.common.metadata.protocols :refer :all...
661a481c2f9bdc74b8bcab02beea828387bf704d2605c235c8c7496a6bccca34
huangz1990/SICP-answers
11-rec.scm
;;; 11-rec.scm (define (f n) (if (< n 3) n (+ (f (- n 1)) (* 2 (f (- n 2))) (* 3 (f (- n 3))))))
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp1/code/11-rec.scm
scheme
11-rec.scm
(define (f n) (if (< n 3) n (+ (f (- n 1)) (* 2 (f (- n 2))) (* 3 (f (- n 3))))))
f06c4072c0c0a4e3b4ee69af2623945dd85ad29b229be580c994fe16867229bf
vollcheck/aoc
day04.clj
(ns y16.day04 (:require [clojure.string :as str])) (defn load-input ([] (load-input "input04.txt")) ([filename] (str/split-lines (slurp (str "src/y16/" filename))))) (defn by-count-then-alphabetically [[c1 v1] [c2 v2]] ;; NOTE: `a` is less than `b` (let [vv (compare v2 v1)] ;; NOTE: reversed! (if ...
null
https://raw.githubusercontent.com/vollcheck/aoc/4b198f5557da7d8d5148a3c58e514ed57da8e64e/src/y16/day04.clj
clojure
NOTE: `a` is less than `b` NOTE: reversed! _ (prn "old: " c ", new: " (char new)) => true => "qzmt zixmtkozy ivhz" => java.lang.Character => java.lang.Character => \v => {:letters ([\a 5] [\b 3] [\x 1] [\y 1] [\z 1]), :commons "abxyz"}
(ns y16.day04 (:require [clojure.string :as str])) (defn load-input ([] (load-input "input04.txt")) ([filename] (str/split-lines (slurp (str "src/y16/" filename))))) (defn by-count-then-alphabetically [[c1 v1] [c2 v2]] (if (not= vv 0) vv (compare c1 c2)))) (defn parse-room [room] (let [...
bdd7a197cda7ce5ccb5a65a2a03c9b525f7cd8b84a10f3c53e03f5b92949aa4d
input-output-hk/cardano-sl
Signing.hs
# LANGUAGE MonoLocalBinds # # LANGUAGE RecordWildCards # -- | Signing done with public/private keys. module Pos.Crypto.Signing.Types.Signing ( -- * Keys PublicKey (..) , SecretKey (..) , toPublic , encodeXPrv , decodeXPrv , formatFullPublicKey , fullP...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/crypto/Pos/Crypto/Signing/Types/Signing.hs
haskell
| Signing done with public/private keys. * Keys * Signing and verification * Proxy signature scheme -------------------------------------------------------------------------- -------------------------------------------------------------------------- ------------------------------------------------------------------...
# LANGUAGE MonoLocalBinds # # LANGUAGE RecordWildCards # module Pos.Crypto.Signing.Types.Signing ( PublicKey (..) , SecretKey (..) , toPublic , encodeXPrv , decodeXPrv , formatFullPublicKey , fullPublicKeyF , fullPublicKeyHexF , shortPublicKeyH...
2e8c4caefbfd8d53febdb70ead250c35e60c7e10cbd0ff19d8182da1182db490
racket/redex
traces.rkt
#lang racket/base (require redex "eiswim.rkt" "../traces-colors.rkt" "../space-snip.rkt") (define err0 (term (/ ((λ x (/ 1 x)) 7) 2))) (define err1 (term (/ ((λ x (+ (/ 1 x) (err 2))) 7) 2))) (define ((layout hspace) tns) (let* ([root (find-root tns)] [one (car (term-node-children root))] [two...
null
https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-test/redex/tests/sewpr/extend/traces.rkt
racket
#lang racket/base (require redex "eiswim.rkt" "../traces-colors.rkt" "../space-snip.rkt") (define err0 (term (/ ((λ x (/ 1 x)) 7) 2))) (define err1 (term (/ ((λ x (+ (/ 1 x) (err 2))) 7) 2))) (define ((layout hspace) tns) (let* ([root (find-root tns)] [one (car (term-node-children root))] [two...
d1621f13f456e4bf981c6d0bd1d47eee33b668e87041b38b285729c8033523ef
fpco/unliftio
MVar.hs
-- | Unlifted "Control.Concurrent.MVar". -- @since 0.1.0.0 module UnliftIO.MVar ( MVar , newEmptyMVar , newMVar , takeMVar , putMVar , readMVar , swapMVar , tryTakeMVar , tryPutMVar , isEmptyMVar , withMVar , withMVarMasked , modifyMVar , modifyMVar_ , modifyMVarMasked , modifyMVarMask...
null
https://raw.githubusercontent.com/fpco/unliftio/d7ac43b9ae69efea0ca911aa556852e9f95af128/unliftio/src/UnliftIO/MVar.hs
haskell
| Unlifted "Control.Concurrent.MVar". | Lifted 'M.newEmptyMVar'. | Lifted 'M.newMVar'. | Lifted 'M.takeMVar'. | Lifted 'M.readMVar'. | Lifted 'M.tryPutMVar'. | Lifted 'M.isEmptyMVar'. | Lifted 'M.tryReadMVar'. | Unlifted 'M.withMVar'. | Unlifted 'M.withMVarMasked'. | Unlifted 'M.modifyMVar_'. ...
@since 0.1.0.0 module UnliftIO.MVar ( MVar , newEmptyMVar , newMVar , takeMVar , putMVar , readMVar , swapMVar , tryTakeMVar , tryPutMVar , isEmptyMVar , withMVar , withMVarMasked , modifyMVar , modifyMVar_ , modifyMVarMasked , modifyMVarMasked_ , tryReadMVar , mkWeakMVar ) where...
c053355f5ba1e11cc36bed52e565c8dbdaf71f560b07e788ae10bd0ad46412ac
myuon/minilight
Layer.hs
module Data.Component.Layer where import Control.Lens import Control.Lens.TH.Rules import Control.Monad import Data.Aeson import Linear import MiniLight import qualified SDL import qualified SDL.Vect as Vect import qualified Data.Component.Basic as Basic data Config = Config { basic :: Basic.Config, image :: File...
null
https://raw.githubusercontent.com/myuon/minilight/3c6a4f6b9ed15c97c7de02a281c31152442fb4d7/src/Data/Component/Layer.hs
haskell
module Data.Component.Layer where import Control.Lens import Control.Lens.TH.Rules import Control.Monad import Data.Aeson import Linear import MiniLight import qualified SDL import qualified SDL.Vect as Vect import qualified Data.Component.Basic as Basic data Config = Config { basic :: Basic.Config, image :: File...
a49dc1ef4564a344a5deb3dd97e525c34eb5ae1f72be4da19a7a5e35b351710c
huangz1990/SICP-answers
p94-flip-vect.scm
;;; p94-flip-vert.scm (define (flip-vect painter) (transform-painter painter (make-vect 0.0 1.0) (make-vect 1.0 1.0) (make-vect 0.0 0.0)))
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/p94-flip-vect.scm
scheme
p94-flip-vert.scm
(define (flip-vect painter) (transform-painter painter (make-vect 0.0 1.0) (make-vect 1.0 1.0) (make-vect 0.0 0.0)))
89ea5f88f73f060ac2fbc81c1f2c44c06f27caabbe4b7f8befe1fd62ab46a09a
fetburner/Coq2SML
elimschemes.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/tactics/elimschemes.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Induction/recursion schemes * Cas...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Ind_tables val rect_sc...
585def74f4004d2cd69473a4ef515c8de351613562f25737fb64284e6dff3bd2
stathissideris/spectacles
impl.cljc
(ns spectacles.impl (:require [clojure.spec.alpha :as s] #?(:cljs [goog.string.format :as gsf]))) #?(:cljs (def format goog.string.format)) (defn- spec-form-type [x] (cond (seq? x) (first x) (and (keyword? x) (namespace x)) :spec-ref :else :default)) (defmulti valid-keys spec-form-typ...
null
https://raw.githubusercontent.com/stathissideris/spectacles/2a596cc3df1bcd6c9798a9feaa96ad9aea8be05e/src/spectacles/impl.cljc
clojure
so that it works with spell-spec.alpha/strict-keys so that it works with spell-spec.alpha/strict-keys so that it works with spell-spec.alpha/strict-keys so that it works with spell-spec.alpha/strict-keys
(ns spectacles.impl (:require [clojure.spec.alpha :as s] #?(:cljs [goog.string.format :as gsf]))) #?(:cljs (def format goog.string.format)) (defn- spec-form-type [x] (cond (seq? x) (first x) (and (keyword? x) (namespace x)) :spec-ref :else :default)) (defmulti valid-keys spec-form-typ...
5c45d3acc9edb517fca2af0c51ecccf00038b531810c32b357a0bac1cdbaa92c
hasura/graphql-data-specification
Scalar.hs
module DDL.Scalar ( Scalar (..), ScalarName (..), ScalarProfile (..), Operator (..), AggregationFunction (..), AggregationFunctionName (..), ) where import Data.Aeson qualified as Json import Data.Hashable (Hashable) import Data.Text (Text) import GHC.Generics (Generic) import Prelude hiding (E...
null
https://raw.githubusercontent.com/hasura/graphql-data-specification/b82b899a7d015c810a571d31322619aff2154b81/tooling/lib/DDL/Scalar.hs
haskell
module DDL.Scalar ( Scalar (..), ScalarName (..), ScalarProfile (..), Operator (..), AggregationFunction (..), AggregationFunctionName (..), ) where import Data.Aeson qualified as Json import Data.Hashable (Hashable) import Data.Text (Text) import GHC.Generics (Generic) import Prelude hiding (E...
ae62bc307f35c4564de0e718e9d4128038e151559afaafa0b0cd762313f3e72f
Helium4Haskell/helium
Guards1.hs
main :: Bool -> () main _ | False = ()
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/staticwarnings/Guards1.hs
haskell
main :: Bool -> () main _ | False = ()
124512699b0b46806c6d7edafad035c62341892b5657d5fc280bc8164e212f5b
zen-lang/zd
core_test.clj
(ns zd.core-test)
null
https://raw.githubusercontent.com/zen-lang/zd/c31f7d1cc37040da9a787154141f609f90df0147/test/zd/core_test.clj
clojure
(ns zd.core-test)
3bc27850139749acb9411d5a74f30b3abb948582077a1fab74cf5c3321f62380
Gopiandcode/petrol
petrol.mli
type table_name (** Uniquely identifies a table in the system. *) type ('ret_ty, 'query_kind) query (** [('ret_ty, 'query_tag) query] represents an SQL query that returns values of type ['ret_ty] and is a SQL query of kind ['query_kind] -- see {!Petrol.Query.t}. *) module Type : sig (** Defines all ...
null
https://raw.githubusercontent.com/Gopiandcode/petrol/48b57e5996997e50911d7d5bb0701a9bdd794fb2/lib/petrol.mli
ocaml
* Uniquely identifies a table in the system. * [('ret_ty, 'query_tag) query] represents an SQL query that returns values of type ['ret_ty] and is a SQL query of kind ['query_kind] -- see {!Petrol.Query.t}. * Defines all supported SQL types. * Represents a SQL type. * [real] represents the SQL REAL type...
type table_name type ('ret_ty, 'query_kind) query module Type : sig type 'a t = 'a Type.t val bool : bool t * [ bool ] represents the SQL boolean type ( or INTEGER if does not exist ) . val int : int t * [ int ] represents the SQL INTEGER type . val real : float t val text : string t val blob : ...
d325e122854949c0f2caf88710f030e17f2eb4a4414c2f246679b8949918b7bc
danilkolikov/dfl
Substitution.hs
| Module : Frontend . Inference . Substitution Description : Class for objects which support substitution Copyright : ( c ) , 2019 License : MIT Class for objects which support substitution Module : Frontend.Inference.Substitution Description : Class for objects which suppo...
null
https://raw.githubusercontent.com/danilkolikov/dfl/698a8f32e23b381afe803fc0e353293a3bf644ba/src/Frontend/Inference/Substitution.hs
haskell
| Mapping of variable names to objects | Class for types which support substitution of values in place of variables | Substitute variables in the object
| Module : Frontend . Inference . Substitution Description : Class for objects which support substitution Copyright : ( c ) , 2019 License : MIT Class for objects which support substitution Module : Frontend.Inference.Substitution Description : Class for objects which suppo...
d554afa20bf5e39c1aa41b91b5d45e7cfab8c8d1837fe0cb3881fff0c2a3e31b
lanl/APPFL
zip.hs
module Zip where import AppflPrelude import APPFL.Prim zip' :: [a] -> [b] -> [(a,b)] zip' [] [] = [] zip' [] _bs = [] zip' _as [] = [] zip' (a:as) (b:bs) = (a,b) : zip' as bs list = [True, False, True, False] list2 = [True, False] main = head (zip' list list2) == (True, True)
null
https://raw.githubusercontent.com/lanl/APPFL/0f29f390d4735e863904348711a48b8f38ca5d03/test/hs/zip.hs
haskell
module Zip where import AppflPrelude import APPFL.Prim zip' :: [a] -> [b] -> [(a,b)] zip' [] [] = [] zip' [] _bs = [] zip' _as [] = [] zip' (a:as) (b:bs) = (a,b) : zip' as bs list = [True, False, True, False] list2 = [True, False] main = head (zip' list list2) == (True, True)
550508785a321d688ebf9d6e40e800250a09d557370d55b9e14f616022763930
scgilardi/artem
project.clj
(defproject artem "0.5.1-SNAPSHOT" :description "Clojure support for the MiGLayout layout manager" :dependencies [[org.clojure/clojure "1.2.1"] [com.miglayout/miglayout "3.7.4"]])
null
https://raw.githubusercontent.com/scgilardi/artem/68b5fd573754cba7e90b9901bce84937c7124be7/project.clj
clojure
(defproject artem "0.5.1-SNAPSHOT" :description "Clojure support for the MiGLayout layout manager" :dependencies [[org.clojure/clojure "1.2.1"] [com.miglayout/miglayout "3.7.4"]])
3d13f0ec6c38e519652a9f9b84f38b1916c2c0c76da56dc9d1804d44f29a53e9
freckle/faktory_worker_haskell
Client.hs
module Faktory.Client ( -- * Client operations Client(..) , newClient , closeClient -- * High-level Client API , command_ , commandOK , commandJSON , commandByteString ) where import Faktory.Prelude import Control.Concurrent.MVar import Crypto.Hash (Digest, SHA256(..), hashWith) import Data.A...
null
https://raw.githubusercontent.com/freckle/faktory_worker_haskell/1d58f03a54205430defc611356f31772421149be/library/Faktory/Client.hs
haskell
* Client operations * High-level Client API | <-Lifecycle#initial-handshake> TODO: Orphan ToJSON ProcessID | Close a @'Client'@ | Send a command, read and discard the response | Send a command, assert the response is @OK@ | Send a command, parse the response as JSON | Send a command to the Server socket Do n...
module Faktory.Client ( Client(..) , newClient , closeClient , command_ , commandOK , commandJSON , commandByteString ) where import Faktory.Prelude import Control.Concurrent.MVar import Crypto.Hash (Digest, SHA256(..), hashWith) import Data.Aeson import Data.Bitraversable (bimapM) import Data.By...
e280bbc984388a1b9dd163862f806cb1e8899c133e1b71fa6e0bf65321eefaa6
smanek/trivial-lisp-webapp
cffi-clisp.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; cffi-clisp.lisp --- CFFI - SYS implementation for CLISP . ;;; Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2005 - 2006 , < > ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated do...
null
https://raw.githubusercontent.com/smanek/trivial-lisp-webapp/36816c17ea378822e02a123c1be960fd9ce3e29d/aux/cffi_0.10.5/src/cffi-clisp.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to...
cffi-clisp.lisp --- CFFI - SYS implementation for CLISP . Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2005 - 2006 , < > files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions ...
c299c1dc000bb8d0d3dbd00b52d1f9eca026d55468aec5c9ad7170270461e88d
eeng/shevek
dashboard_test.clj
(ns shevek.acceptance.dashboard-test (:require [clojure.test :refer [deftest use-fixtures is]] [shevek.acceptance.test-helper :refer [wrap-acceptance-tests click has-css? has-no-css? it has-title? has-text? login visit click-tid fill wait-exists refresh element-value refresh click-text double-click has-no...
null
https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/test/clj/shevek/acceptance/dashboard_test.clj
clojure
(ns shevek.acceptance.dashboard-test (:require [clojure.test :refer [deftest use-fixtures is]] [shevek.acceptance.test-helper :refer [wrap-acceptance-tests click has-css? has-no-css? it has-title? has-text? login visit click-tid fill wait-exists refresh element-value refresh click-text double-click has-no...
7adcf1b69c597dc01a16824bf6a85b19fa474ce9a1199a57194eebd74947261d
mbutterick/beautiful-racket
test-sources.rkt
#lang at-exp br (require br/test rackunit) (check-equal? (run-source "sample.rkt") "one three 4 ")
null
https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/basic-demo-2a/test-sources.rkt
racket
#lang at-exp br (require br/test rackunit) (check-equal? (run-source "sample.rkt") "one three 4 ")
846d577572548f94bd7ae305ef9ea3267268f2d545b1829394d4b2f883e20333
digital-asset/ghc
tc256.hs
# LANGUAGE TypeFamilies , ConstraintKinds , UndecidableInstances , UndecidableSuperClasses # module Ctx where import Data.Kind ( Type, Constraint ) type family Indirect :: Type -> Constraint type instance Indirect = Show class Indirect a => Cls a where foo :: Cls a => a -> String foo = show
null
https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_compile/tc256.hs
haskell
# LANGUAGE TypeFamilies , ConstraintKinds , UndecidableInstances , UndecidableSuperClasses # module Ctx where import Data.Kind ( Type, Constraint ) type family Indirect :: Type -> Constraint type instance Indirect = Show class Indirect a => Cls a where foo :: Cls a => a -> String foo = show
7fb4bd67fdce3e397642e8ab3d0362ed1a043fb8560991b2e0bb303e8558755a
iokasimov/pandora
Straight.hs
module Pandora.Pattern.Morphism.Straight where import Pandora.Pattern.Semigroupoid (Semigroupoid ((.))) import Pandora.Pattern.Category (Category (identity)) import Pandora.Pattern.Functor.Covariant (Covariant ((<-|-))) newtype Straight (v :: * -> * -> *) a e = Straight (v a e) instance Semigroupoid m => Semigroupoi...
null
https://raw.githubusercontent.com/iokasimov/pandora/bec2def1649a90d26d805bc3bce7dc22763b904a/Pandora/Pattern/Morphism/Straight.hs
haskell
module Pandora.Pattern.Morphism.Straight where import Pandora.Pattern.Semigroupoid (Semigroupoid ((.))) import Pandora.Pattern.Category (Category (identity)) import Pandora.Pattern.Functor.Covariant (Covariant ((<-|-))) newtype Straight (v :: * -> * -> *) a e = Straight (v a e) instance Semigroupoid m => Semigroupoi...
e52e703bc56767f3e090839599a1a45a692c1ab31e5eb929dc9386b696125059
andrejbauer/plzoo
syntax.ml
(** Abstract syntax. *) (** Arithmetical expressions. *) type expression = | Variable of string (* a variable *) | Numeral of int (* non-negative integer constant *) | Plus of expression * expression (* Addition [e1 + e2] *) | Minus of expression * expression (* Difference [e1 - e2] *) | Times of expression...
null
https://raw.githubusercontent.com/andrejbauer/plzoo/ae6041c65baf1eebf65a60617819efeb8dcd3420/src/calc_var/syntax.ml
ocaml
* Abstract syntax. * Arithmetical expressions. a variable non-negative integer constant Addition [e1 + e2] Difference [e1 - e2] Product [e1 * e2] Quotient [e1 / e2] Opposite value [-e] * Conversion of expresions to strings.
type expression = * Toplevel commands are expressions and definitions . type command = | Expression of expression | Definition of string * expression let string_of_expression e = let rec to_str n e = let (m, str) = match e with | Variable x -> (3, x) | Numeral n -> (3, string_o...
631ffad227f73730e8b4ed2224216934bfcce65fe7b92719d8ab44de5fd6b120
ds-wizard/engine-backend
Api.hs
module Wizard.Api.Handler.App.Plan.Api where import Servant import Servant.Swagger.Tags import Wizard.Api.Handler.App.Plan.Detail_DELETE import Wizard.Api.Handler.App.Plan.Detail_PUT import Wizard.Api.Handler.App.Plan.List_Current_GET import Wizard.Api.Handler.App.Plan.List_POST import Wizard.Model.Context.BaseContex...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-wizard/src/Wizard/Api/Handler/App/Plan/Api.hs
haskell
module Wizard.Api.Handler.App.Plan.Api where import Servant import Servant.Swagger.Tags import Wizard.Api.Handler.App.Plan.Detail_DELETE import Wizard.Api.Handler.App.Plan.Detail_PUT import Wizard.Api.Handler.App.Plan.List_Current_GET import Wizard.Api.Handler.App.Plan.List_POST import Wizard.Model.Context.BaseContex...
cff0ed134fe07a20b31ad36573d2cf41ff3ada8aeec7a545b2bb0f7cc959bac8
dym/movitz
ratios.lisp
;;;;------------------------------------------------------------------ ;;;; Copyright ( C ) 2003 - 2004 , Department of Computer Science , University of Tromso , Norway . ;;;; ;;;; For distribution policy, see the accompanying file COPYING. ;;;; ;;;; Filename: ratios.lisp ;;;; Description: Aut...
null
https://raw.githubusercontent.com/dym/movitz/56176e1ebe3eabc15c768df92eca7df3c197cb3d/losp/muerte/ratios.lisp
lisp
------------------------------------------------------------------ For distribution policy, see the accompanying file COPYING. Filename: ratios.lisp Description: Created at: Tue Jul 20 00:39:59 2004 ---------------------------------------------------------------...
Copyright ( C ) 2003 - 2004 , Department of Computer Science , University of Tromso , Norway . Author : < > $ I d : , v 1.14 2008 - 07 - 09 20:05:36 ffjeld Exp $ (require :muerte/basic-macros) (require :muerte/arithmetic-macros) (require :muerte/defstruct) (provide :muerte/ratios) (in-packa...
a262b3ae46f37da47b3fd186c4214f0ea5f0a3cf34ce2e2896c935c08fa43530
fractalide/fractalide
mesg.rkt
#lang racket (require fractalide/modules/rkt/rkt-fbp/def) (provide (contract-out [struct mesg ((id string?) (x number?) (y number?) (mesg string?))])) (struct mesg (id x y mesg) #:prefab #:mutable)
null
https://raw.githubusercontent.com/fractalide/fractalide/9c54ec2615fcc2a1f3363292d4eed2a0fcb9c3a5/modules/rkt/rkt-fbp/edges/hyperflow/graph/mesg.rkt
racket
#lang racket (require fractalide/modules/rkt/rkt-fbp/def) (provide (contract-out [struct mesg ((id string?) (x number?) (y number?) (mesg string?))])) (struct mesg (id x y mesg) #:prefab #:mutable)
10f836a7749f69d123794a8cce79c9c76937027acd6fa15ae5646a4fc61d8f94
achirkin/vulkan
VK_KHR_create_renderpass2.hs
# OPTIONS_GHC -fno - warn - missing - pattern - synonym - signatures # # OPTIONS_GHC -fno - warn - orphans # # OPTIONS_HADDOCK not - home # {-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE ForeignFunctionInterface # {-# LANGUAGE MagicH...
null
https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_KHR_create_renderpass2.hs
haskell
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE MagicHash # # LANGUAGE PatternSynonyms # # LANGUAGE Strict # # LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns # | supported: @vulkan@ type: @device@ Extension...
# OPTIONS_GHC -fno - warn - missing - pattern - synonym - signatures # # OPTIONS_GHC -fno - warn - orphans # # OPTIONS_HADDOCK not - home # # LANGUAGE FlexibleInstances # # LANGUAGE ForeignFunctionInterface # module Graphics.Vulkan.Ext.VK_KHR_create_renderpass2 * Vulkan extension : @VK_KHR_create_renderpass2@...
5e7a80fcdcd3397923a5fad07a9caf827a95de4e50641275efcf70b23e30437c
eglaysher/rldev
app.ml
vaconv : VisualArt 's bitmap format converter Copyright ( C ) 2006 Haeleth 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 op...
null
https://raw.githubusercontent.com/eglaysher/rldev/e59103b165e1c20bd940942405b2eee767933c96/src/vaconv/app.ml
ocaml
vaconv : VisualArt 's bitmap format converter Copyright ( C ) 2006 Haeleth 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 op...
6554c19d4dde6590100216f1b4d0b1b088c0bdec758656f0ea78fe30c9cc8c30
ghcjs/jsaddle-dom
SVGTransform.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.SVGTransform (setMatrix, setTranslate, setScale, setRotate, setSkewX, setSkewY, pattern SVG_TRANSFORM_UNKNO...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/SVGTransform.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/SVGTransform.matrix Mozilla SVGTransform.matrix documentation>
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.SVGTransform (setMatrix, setTranslate, setScale, setRotate, setSkewX, setSkewY, pattern SVG_TRANSFORM_UNKNOWN, pattern SVG_TRANSFORM_MATRIX, pattern SVG_TRANSFORM_TRANSLATE, pattern SVG_TRANSFORM_SC...
2fbb3e613d9bca574af61a98e885b933cb2a594b1f1eafd49dbd2bb8d4b6083a
fission-codes/fission
Types.hs
module Fission.Text.Encoded.Types (Encoded (..)) where import Data.Kind import RIO import qualified RIO.ByteString.Lazy as Lazy import qualified RIO.Text as Text import Fission.Text.Encoding.Types -- | Tag some text representation with the base it's encoded w...
null
https://raw.githubusercontent.com/fission-codes/fission/ae177407dccc20be67948a901956b99f40d37ac8/fission-core/library/Fission/Text/Encoded/Types.hs
haskell
| Tag some text representation with the base it's encoded with NOTE that this is by no means a perfect method, and is mostly to make tracing encoding through code less painful. Character encoding can always be forgotten, mislabelled, and so on. NOTE This function performs no checks to ensure that the data is...
module Fission.Text.Encoded.Types (Encoded (..)) where import Data.Kind import RIO import qualified RIO.ByteString.Lazy as Lazy import qualified RIO.Text as Text import Fission.Text.Encoding.Types newtype (enc :: Encoding) `Encoded` (carrierText :: Type) = ...
50da9815d0190cc86c4b20432513cf4b0ee2e791c2499c5daaddc8a19c3d915c
realworldocaml/book
action_exec.mli
open Import * Type for dependency requested by the dynamic action . Must be different from [ Dep.t ] type because we require it to be marshallable . Must be different from [Dep.t] type because we require it to be marshallable. *) module Dynamic_dep : sig type t = | File of Path.t | Glob...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_engine/action_exec.mli
ocaml
* [root] should be the root of the current build context, or the root of the sandbox if the action is sandboxed. Some Jane Street actions use [None]
open Import * Type for dependency requested by the dynamic action . Must be different from [ Dep.t ] type because we require it to be marshallable . Must be different from [Dep.t] type because we require it to be marshallable. *) module Dynamic_dep : sig type t = | File of Path.t | Glob...
f3987a7fd405939fcc6f9cee56bf45592e31b7fc3b5a67be1b415a54948710dd
Idorobots/spartan
alpha-conversion.rkt
#lang racket (require "../testing.rkt") (require "../../src/compiler/utils/gensym.rkt") (require "../../src/compiler/passes/alpha-conversion.rkt") (require "../../src/compiler/substitute.rkt") ;; Alpha conversion tests. (describe "alpha-rename" (it "substitutes occurances for renamed symbols" (check ((s gen-...
null
https://raw.githubusercontent.com/Idorobots/spartan/01c6b5c30e87ba9cd5587a6ffcdc0979d7e4bff5/test/compiler/alpha-conversion.rkt
racket
Alpha conversion tests.
#lang racket (require "../testing.rkt") (require "../../src/compiler/utils/gensym.rkt") (require "../../src/compiler/passes/alpha-conversion.rkt") (require "../../src/compiler/substitute.rkt") (describe "alpha-rename" (it "substitutes occurances for renamed symbols" (check ((s gen-valid-symbol) ...
96ae47551d9278f0c74cfbd3ba1aaebf794d7e48ddd879331a0c1fed14a6c85e
pariyatti/kosa
storage_fixtures.clj
(ns kuti.fixtures.storage-fixtures (:require [kuti.storage.core :as storage-core] [mount.core :as mount])) (defn set-service-config [t] (mount/stop #'storage-core/service-config) (-> (mount/with-args {:storage {:service :disk :root "tmp/storage/" ...
null
https://raw.githubusercontent.com/pariyatti/kosa/d060659686450ebef28d8ad50e665c926c69f8a0/test/kuti/fixtures/storage_fixtures.clj
clojure
(ns kuti.fixtures.storage-fixtures (:require [kuti.storage.core :as storage-core] [mount.core :as mount])) (defn set-service-config [t] (mount/stop #'storage-core/service-config) (-> (mount/with-args {:storage {:service :disk :root "tmp/storage/" ...
db09aa5b4c63e05ec5be2974858fb673041808d8c1e13034c75c8af8ddba6f77
ryanpbrewster/haskell
HelloWorld.hs
import Graphics.UI.GLUT main :: IO () main = do (_progName, _args) <- getArgsAndInitialize _window <- createWindow "Hello World" displayCallback $= display mainLoop display :: DisplayCallback display = do clear [ ColorBuffer ] flush
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/OpenGL/HelloWorld.hs
haskell
import Graphics.UI.GLUT main :: IO () main = do (_progName, _args) <- getArgsAndInitialize _window <- createWindow "Hello World" displayCallback $= display mainLoop display :: DisplayCallback display = do clear [ ColorBuffer ] flush
b766d0dc7dce6eedd3904b3d13ef0c1fc6807d2b193065a65226ee77c361fc8d
Incanus3/ExiL
prs-base.lisp
(in-package :exil-parser) ;; template- and generic fact and pattern parsers - front-end template-object ;; specification parsing ;; functions that (potentially) create template objects are defined as methods ;; of environment, as they need access to environment's template list ;; used by front-end:deftemplate (defge...
null
https://raw.githubusercontent.com/Incanus3/ExiL/de0f7c37538cecb7032cc1f2aa070524b0bc048d/src/parser/prs-base.lisp
lisp
template- and generic fact and pattern parsers - front-end template-object specification parsing functions that (potentially) create template objects are defined as methods of environment, as they need access to environment's template list used by front-end:deftemplate used by front-end:assert, retract and modify...
(in-package :exil-parser) (defgeneric parse-template (name slots) (:documentation "create template from external representation")) (defgeneric parse-fact (env fact-spec) (:documentation "create fact from external representation")) (defgeneric modify-fact (fact mod-list) (:documentation "create new fact from fa...
a9403877c14b6b530aec2ac33c003e2f9deea1244117c0d4312b16e60eb8796e
GaloisInc/msf-haskell
Concurrent.hs
|Higher - level concurrency in support of functions in " " . module MSF.Concurrent where import MSF.Monad import Control.Concurrent (forkIO) import Control.Concurrent.Async (Async,async,waitCatchSTM) import Control.Concurrent.STM (STM,orElse,retry,atomically) import Control.Exception (SomeException) import Control...
null
https://raw.githubusercontent.com/GaloisInc/msf-haskell/76cee10771f9e9d10aa3301198e09f08bde907be/src/MSF/Concurrent.hs
haskell
| Wait until all children have finished. |Waits for a thread to finish and immediately runs the given function on all of the values in the clReturns stack in waitForChildren if you want to process the return values as they come in. after forking with the handle for the threads. | Simple fork / async.
|Higher - level concurrency in support of functions in " " . module MSF.Concurrent where import MSF.Monad import Control.Concurrent (forkIO) import Control.Concurrent.Async (Async,async,waitCatchSTM) import Control.Concurrent.STM (STM,orElse,retry,atomically) import Control.Exception (SomeException) import Control...
195d11518104583f09436a672cb3d94b1a04b23389d6bd3955a26bf7995a9f33
NixOS/cabal2nix
Setup.hs
module Main ( main ) where import Distribution.Simple main :: IO () main = defaultMain
null
https://raw.githubusercontent.com/NixOS/cabal2nix/0d1a5a7d227683e9d099665f645a8618ec48ef94/hackage-db/Setup.hs
haskell
module Main ( main ) where import Distribution.Simple main :: IO () main = defaultMain
f82c615fbc5b057e0ec68ac94b65d5fe2e806b673d758bb20f5adf5b15417238
acl2/acl2
screen-printing.lisp
Event Macros Library ; Copyright ( C ) 2023 Kestrel Institute ( ) ; License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 . ; Author : ( ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package "ACL2") (include-book "std/util/defenum" :dir :...
null
https://raw.githubusercontent.com/acl2/acl2/467e5a03fa3ad9972b593889a0b3d960caf7d4e1/books/kestrel/event-macros/screen-printing.lisp
lisp
Event Macros Library Copyright ( C ) 2023 Kestrel Institute ( ) License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 . Author : ( ) (in-package "ACL2") (include-book "std/util/defenum" :dir :system) (include-book "xdoc/constructors" :dir :system) (defxdoc event-macro-screen-p...
31052f238201b220c5d8a21e0512781dd6ee860679fed2b9179424bcc3242baa
gwathlobal/CotD
effects.lisp
(in-package :cotd) (defclass effect-type () ((id :initarg :id :accessor id) (name-func :initarg :name-func :accessor name-func) (color-func :initform #'(lambda (effect actor) (declare (ignore effect actor)) nil) :initarg :color-func :acce...
null
https://raw.githubusercontent.com/gwathlobal/CotD/d01ef486cc1d3b21d2ad670ebdb443e957290aa2/src/effects.lisp
lisp
(in-package :cotd) (defclass effect-type () ((id :initarg :id :accessor id) (name-func :initarg :name-func :accessor name-func) (color-func :initform #'(lambda (effect actor) (declare (ignore effect actor)) nil) :initarg :color-func :acce...
f538af4e1db8d057bd395e19c8eb6666ea51b5b87b9c408a638070b33cee5384
votinginfoproject/data-processor
spatial_boundary.clj
(ns vip.data-processor.validation.v6.spatial-boundary (:require [vip.data-processor.validation.v5.util :as util] [vip.data-processor.errors :as errors])) (def validate-spatial-boundary (util/build-xml-tree-value-query-validator :errors :spatial-boundaries :missing :missing-external-geospatial-featur...
null
https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/src/vip/data_processor/validation/v6/spatial_boundary.clj
clojure
(ns vip.data-processor.validation.v6.spatial-boundary (:require [vip.data-processor.validation.v5.util :as util] [vip.data-processor.errors :as errors])) (def validate-spatial-boundary (util/build-xml-tree-value-query-validator :errors :spatial-boundaries :missing :missing-external-geospatial-featur...
701576a9d501c8a199a2fcfea9baf503eab3ae0e4697de9bd45e54b59dad0fd0
Xandaros/abnf
Types.hs
| Module : Text . ABNF.ABNF.Types Description : Types used by the parser Copyright : ( c ) , 2016 License : BSD2 Maintainer : < > Stability : experimental Portability : portable These types are used by the parser and are loosely modeled after the ABNF privded in < #section-4 R...
null
https://raw.githubusercontent.com/Xandaros/abnf/347a2fbe49aeb380f5d07632036cfbc0e6bb1a6a/src/Text/ABNF/ABNF/Types.hs
haskell
look like this: @ CRLF = %x0D.0A @
| Module : Text . ABNF.ABNF.Types Description : Types used by the parser Copyright : ( c ) , 2016 License : BSD2 Maintainer : < > Stability : experimental Portability : portable These types are used by the parser and are loosely modeled after the ABNF privded in < #section-4 R...
b9339d9b26906fc01c18ca48f85a1b23d6043cca5567acbf5e3ade18e6f414f2
otto-de/leinsync
table_pretty_print.clj
(ns leiningen.leinsync.table-pretty-print (:require [leiningen.core.main :as m] [clojure.string :as str])) (defn get-formatter [keys widths] (fn [left middle right row] (str left (str/join (interpose middle (for [[col fmt] (...
null
https://raw.githubusercontent.com/otto-de/leinsync/744bab6d59cf2a17a2c9f613f75410a9bc6d7152/src/leiningen/leinsync/table_pretty_print.clj
clojure
(ns leiningen.leinsync.table-pretty-print (:require [leiningen.core.main :as m] [clojure.string :as str])) (defn get-formatter [keys widths] (fn [left middle right row] (str left (str/join (interpose middle (for [[col fmt] (...
3412ac00f9532ff8cd2a9b1312c1f458974620f25b11e260437241abad1a6bbd
ayazhafiz/plts
lift_ir.ml
* Lambda - Lifting and Linearization pass module C = Cast_ir module CE = Cast_ir.Expr module L = Language open Util type ty = | TUnknown | TNat | TBool | TArrow of ty * ty (** An arrow type, which can either be a closure or raw function pointer. *) | TNamedTup of (string * ty) list | TBox of ty (**...
null
https://raw.githubusercontent.com/ayazhafiz/plts/2971814f57c25d3d665126e70b717dc18e6d3dd4/gtlc/lift_ir.ml
ocaml
* An arrow type, which can either be a closure or raw function pointer. * A boxed type lives on the heap. * A projection of a variable stored in a closure env * Packages a function pointer and its environment into a closure * A raw function pointer * Mutable declaration. * Constant declaration. In this pass we ...
* Lambda - Lifting and Linearization pass module C = Cast_ir module CE = Cast_ir.Expr module L = Language open Util type ty = | TUnknown | TNat | TBool | TArrow of ty * ty | TNamedTup of (string * ty) list type expr = | Nat of int | Bool of bool | Name of string | Apply of elaborated * elaborated ...
9584c3bc208f2673984d1a2b67cffb08e8cc78174d7d16b51a918a42a9dd9aee
dieu/consulerl
consulerl_util.erl
-module(consulerl_util). -include("consulerl.hrl"). %% API -export([ do/2, receive_response/1, to_interval/1, to_interval/2, to_binary/1, list_of_strings_to_binary/1, base64encode/1, base64decode/1 ]). -export([ build_url/4, dec/1 ]). -spec do(ref(), return()) -> ok. do({Pid, _} = From, Response...
null
https://raw.githubusercontent.com/dieu/consulerl/a8c003dbc380911a1ad90a3468e60017aef38c79/src/consulerl_util.erl
erlang
API ignore what can't covert
-module(consulerl_util). -include("consulerl.hrl"). -export([ do/2, receive_response/1, to_interval/1, to_interval/2, to_binary/1, list_of_strings_to_binary/1, base64encode/1, base64decode/1 ]). -export([ build_url/4, dec/1 ]). -spec do(ref(), return()) -> ok. do({Pid, _} = From, Response) when ...
ae953dc50b4531337675daacb9eb2db30c98075f45012d845d7542a34f0923a9
cofree-coffee/cofree-bot
Options.hs
module Options ( module Config, module Env, module Parser, module Types, ) where -------------------------------------------------------------------------------- import Options.Config as Config import Options.Env as Env import Options.Parser as Parser import Options.Types as Types
null
https://raw.githubusercontent.com/cofree-coffee/cofree-bot/2466a444f17c560bfbadcad328f8a8c08d8da896/cofree-bot/src/Options.hs
haskell
------------------------------------------------------------------------------
module Options ( module Config, module Env, module Parser, module Types, ) where import Options.Config as Config import Options.Env as Env import Options.Parser as Parser import Options.Types as Types
66d477ad0ec36efd624d7c3951cfaa1ee603e8d98d3a8c4916ece70807e58458
matterandvoid-space/subscriptions
trace.cljc
(ns space.matterandvoid.subscriptions.impl.trace "Tracing copied from re-frame." #?(:cljs (:require-macros [net.cgrand.macrovich :as macros] [space.matterandvoid.subscriptions.impl.trace :refer [with-trace merge-trace!]])) (:require [space.matterandvoid.subscriptions.impl.loggers :refe...
null
https://raw.githubusercontent.com/matterandvoid-space/subscriptions/131699e9a66733649587a1764343d17650f14011/src/main/space/matterandvoid/subscriptions/impl/trace.cljc
clojure
currentTimeMillis may count backwards in some scenarios, but as this is used for tracing it is preferable to the slower but more accurate System.nanoTime. We can remove this extra step of type hinting indirection once our minimum CLJS version includes -1439 we can deliver them in batches. This aids us in effici...
(ns space.matterandvoid.subscriptions.impl.trace "Tracing copied from re-frame." #?(:cljs (:require-macros [net.cgrand.macrovich :as macros] [space.matterandvoid.subscriptions.impl.trace :refer [with-trace merge-trace!]])) (:require [space.matterandvoid.subscriptions.impl.loggers :refe...
5f2e6c422fd931854b2a5b8c044ea0bfe7df801cc8cfe21703b56c20f397e238
Licenser/clj-sandbox
core_test.clj
(ns clj-sandbox.core-test (:use [net.licenser.sandbox] [net.licenser.sandbox matcher tester] :reload-all) (:use [clojure.test])) (defn run-in-sandbox [code] (let [s (stringify-sandbox (new-sandbox :tester debug-tester :timeout 50))] (s code))) (defn run-in-sandbox-compiler [code] (let [s (stringify-sand...
null
https://raw.githubusercontent.com/Licenser/clj-sandbox/e73433e955c5f1b11efc25151a925ad752b78f5a/test/clj_sandbox/core_test.clj
clojure
(ns clj-sandbox.core-test (:use [net.licenser.sandbox] [net.licenser.sandbox matcher tester] :reload-all) (:use [clojure.test])) (defn run-in-sandbox [code] (let [s (stringify-sandbox (new-sandbox :tester debug-tester :timeout 50))] (s code))) (defn run-in-sandbox-compiler [code] (let [s (stringify-sand...
9bdf1023a22581b1d8d51ddf572ad3364c92d8dc9da96f83a4f75f3cf390e21e
JohnLato/language-objc
RList.hs
----------------------------------------------------------------------------- -- | Module : Language . ObjC.Data . RList Copyright : ( c ) [ 2007 .. 2008 ] , ( c ) 2012 -- License : BSD-style Maintainer : -- Stability : experimental Portability : ghc -- -- Due to t...
null
https://raw.githubusercontent.com/JohnLato/language-objc/8e9455f15b32229f7caf13769c8945d8544c79f0/src/Language/ObjC/Data/RList.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style Stability : experimental Due to the way the grammar is constructed we very often have to build lists in reverse. To make sure we do this consistently and correctly we have a newtype to wrap the reversed style...
Module : Language . ObjC.Data . RList Copyright : ( c ) [ 2007 .. 2008 ] , ( c ) 2012 Maintainer : Portability : ghc module Language.ObjC.Data.RList ( RList,Reversed(..), empty,singleton,snoc,rappend,appendr,rappendr,rmap,reverse, viewr, ) where import Prelude...
8435bf3346ebd806035068591c914e3a0bb2066522a3bf83accdaa615b5eff83
LoupVaillant/Monokex
proto_log.ml
open Utils module P = Proto type hash = Hash of int (* lone intermediate hash *) | Htag of int * int (* hash + authentication tag *) | Hkey of int * int (* hash + encryption key *) type plain = Payload of int (* message number *) | Key of P.cs_key type crypt = Plain of ...
null
https://raw.githubusercontent.com/LoupVaillant/Monokex/ea8a16156164644dab25f6e7aefd85b169a4e7ee/src/proto_log.ml
ocaml
lone intermediate hash hash + authentication tag hash + encryption key message number encryption key number current hash number current tag number current key number current message number message + hash message + hash
open Utils module P = Proto | Key of P.cs_key type crypt = Plain of plain type mix_input = Hcrypt of crypt | Exchange of P.exchange | Prelude | No_input type mix = { next : hash only H < nb > ; input : mix_input } ...
5c8d0ce3bd42dedb5106a453a9b7b8e4490d0237ec2749adb32fef379c58f93e
russell/cl-git
remote.lisp
-*- Mode : Lisp ; Syntax : COMMON - LISP ; Base : 10 -*- ;; cl-git is a Common Lisp interface to git repositories. Copyright ( C ) 2011 - 2022 < > ;; ;; This program is free software: you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public License as published by the Free ...
null
https://raw.githubusercontent.com/russell/cl-git/ab58b1dcf34649899085e9df95962ef1c9d902c3/tests/remote.lisp
lisp
Syntax : COMMON - LISP ; Base : 10 -*- cl-git is a Common Lisp interface to git repositories. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;...
Copyright ( C ) 2011 - 2022 < > as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public (in-package #:cl-git-tests) (in-suite :cl-git) (def-test list-remotes (:fixture repo...
8d441a56c0b89831e9d7a7d8b91d6c00926a1cf8d72c1ca2660fa608ed2f93e6
serokell/importify
09-BoolTypeAndConstructorUsed.hs
module BoolTypeAndConstructorUsed where import Data.Bool (Bool(False)) func :: Bool func = False
null
https://raw.githubusercontent.com/serokell/importify/09f31d851b2152ae6ce880b81abc3554ade29f37/test/test-data/base%40basic/09-BoolTypeAndConstructorUsed.hs
haskell
module BoolTypeAndConstructorUsed where import Data.Bool (Bool(False)) func :: Bool func = False
ba6c70cf5a24d242cffda86b48fea28ff1b70da980b242e870a5395516da6015
erlang/otp
proc_lib.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2023 . All Rights Reserved . %% 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 applicab...
null
https://raw.githubusercontent.com/erlang/otp/b0afc29474f9625aa0b466b6672e0bbcefd07535/lib/stdlib/src/proc_lib.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 1996 - 2023 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(proc_lib). Then a process terminates the is checked and a crash report is generated if the was not exp...
38f8784902723189c13b851002dd3c7f67c86fc73a530d857e02d49ad6aab779
paurkedal/viz
test_prereq.ml
open OUnit open Camlviz.Prereq let test_list () = let xs = List.init 5 ident in assert (List.split_before ((=) 2) xs = ([0; 1], [2; 3; 4])); assert (List.split_after ((=) 2) xs = ([0; 1; 2], [3; 4])); assert (List.drop_while (fun x -> x <= 2) xs = [3; 4]); () let tests = "pervasives" >::: [ "list" >:: tes...
null
https://raw.githubusercontent.com/paurkedal/viz/ab1f1071fafdc51eae69185ec55d7a6e7bb94ea9/camlviz-tests/test_prereq.ml
ocaml
open OUnit open Camlviz.Prereq let test_list () = let xs = List.init 5 ident in assert (List.split_before ((=) 2) xs = ([0; 1], [2; 3; 4])); assert (List.split_after ((=) 2) xs = ([0; 1; 2], [3; 4])); assert (List.drop_while (fun x -> x <= 2) xs = [3; 4]); () let tests = "pervasives" >::: [ "list" >:: tes...
bedb6aa86a2289f1c672576ebbebfee103fd38e9341b9cb5ae80ec76260dda11
locusmath/locus
morphism.clj
(ns locus.set.tree.cospan.core.morphism (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.set.mapping.general.core.object :refer :all] [locus.set.logic.structure.protocols :r...
null
https://raw.githubusercontent.com/locusmath/locus/b94caabdbec71294c8fb320887646ddf0312ef24/src/clojure/locus/set/tree/cospan/core/morphism.clj
clojure
and a target function. Together they make up the components of a natural transformation. A it has all attendant presheaf theoretic properties associated with it such as subobjects, quotients, products, and coproducts. Component arrows Subobject classifiers in the topos Sets^{[2,1]}
(ns locus.set.tree.cospan.core.morphism (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.set.mapping.general.core.object :refer :all] [locus.set.logic.structure.protocols :r...
94587ac78a546ab77d4c803d3f1bf7b39fb4a56a193752a8cb244ca9cac949eb
marick/Midje
t_three_levels_outside.clj
(ns behaviors.background-nesting.t-three-levels-outside (:require [clojure.test :refer :all] [midje.sweet :refer :all] [midje.test-util :refer :all])) ;; This is a separate file because we're making namespace-wide changes (unfinished outermost middlemost innermost) (background (outermost) =...
null
https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/test/behaviors/background_nesting/t_three_levels_outside.clj
clojure
This is a separate file because we're making namespace-wide changes deftest intentional
(ns behaviors.background-nesting.t-three-levels-outside (:require [clojure.test :refer :all] [midje.sweet :refer :all] [midje.test-util :refer :all])) (unfinished outermost middlemost innermost) (background (outermost) => 2 (middlemost) => 'a) (against-background [ (middlemos...
fa52ad685db6356c78c885eefbce630b8337c5385761a1318f2db888aca34c35
evturn/haskellbook
18.04-maybe-monad.hs
data Cow = Cow { name :: String , age :: Int , weight :: Int } deriving (Eq, Show) noEmpty :: String -> Maybe String noEmpty "" = Nothing noEmpty str = Just str noNegative :: Int -> Maybe Int noNegative n | n >= 0 = Just n | otherwise = Nothing weightCheck :: Cow -> Maybe Cow we...
null
https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/18/18.04-maybe-monad.hs
haskell
data Cow = Cow { name :: String , age :: Int , weight :: Int } deriving (Eq, Show) noEmpty :: String -> Maybe String noEmpty "" = Nothing noEmpty str = Just str noNegative :: Int -> Maybe Int noNegative n | n >= 0 = Just n | otherwise = Nothing weightCheck :: Cow -> Maybe Cow we...
7c47757b50972ec1e521446b9f346401c73aab8ab574278f8e97f53548a113c4
karamellpelle/grid
ShadeSceneBegin.hs
grid is a game written in Haskell Copyright ( C ) 2018 -- -- This file is part of grid. -- -- grid 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 optio...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/source/Game/Run/RunData/Fancy/ShadeSceneBegin.hs
haskell
This file is part of grid. grid is free software: you can redistribute it and/or modify (at your option) any later version. grid 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 GN...
grid is a game written in Haskell Copyright ( C ) 2018 it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License module Game.Run.RunData.Fancy.ShadeSceneBegin ( ...
cefd7ce8a940a327d9af0d934a3e9bfe274e8d3d35171aae5ca3a995393849ac
haskellweekly/haskellweekly
Advertising.hs
module HW.Handler.Advertising ( handler, ) where import qualified HW.Handler.Common as Common import qualified HW.Template.Advertising as Advertising import qualified HW.Type.App as App import qualified HW.Type.Config as Config import qualified Network.HTTP.Types as Http import qualified Network.Wai as Wai handle...
null
https://raw.githubusercontent.com/haskellweekly/haskellweekly/615526de6f1e590fff3bac5a7911aaaacf149b09/source/library/HW/Handler/Advertising.hs
haskell
module HW.Handler.Advertising ( handler, ) where import qualified HW.Handler.Common as Common import qualified HW.Template.Advertising as Advertising import qualified HW.Type.App as App import qualified HW.Type.Config as Config import qualified Network.HTTP.Types as Http import qualified Network.Wai as Wai handle...
b73336723d74e1bdcd45709f2c3a416dd1b036b146a738d79774218f6d8ebf94
jonsterling/dreamtt
Distiller.ml
open Basis open Core open Code module L = struct type local = string Env.t end module M = Reader.Make (L) open Monad.Notation (M) module StringMapUtil = Monad.MapUtil (M) (StringMap) include M let scope k = reader @@ fun env -> let x = "x" ^ string_of_int @@ Env.int_of_lvl @@ Env.fresh env in run (Env.append ...
null
https://raw.githubusercontent.com/jonsterling/dreamtt/aa30a57ca869e91a295e586773a892c6601b5ddb/frontend/Distiller.ml
ocaml
open Basis open Core open Code module L = struct type local = string Env.t end module M = Reader.Make (L) open Monad.Notation (M) module StringMapUtil = Monad.MapUtil (M) (StringMap) include M let scope k = reader @@ fun env -> let x = "x" ^ string_of_int @@ Env.int_of_lvl @@ Env.fresh env in run (Env.append ...
9145a88813710c05c4b210eed433655bc568bb23bd4c572ee27f659a6497908c
nbloomf/webdriver-w3c
InvalidElementState.hs
# LANGUAGE BangPatterns , OverloadedStrings # module Web.Api.WebDriver.Monad.Test.Session.InvalidElementState ( invalidElementStateExit ) where import Data.Typeable (Typeable) import System.IO import Web.Api.WebDriver import Test.Tasty.WebDriver import qualified Data.Text as Text import qualified Test.Tasty ...
null
https://raw.githubusercontent.com/nbloomf/webdriver-w3c/e48dbd65597631c694e039dde493ca02333a3a4a/test/Web/Api/WebDriver/Monad/Test/Session/InvalidElementState.hs
haskell
# LANGUAGE BangPatterns , OverloadedStrings # module Web.Api.WebDriver.Monad.Test.Session.InvalidElementState ( invalidElementStateExit ) where import Data.Typeable (Typeable) import System.IO import Web.Api.WebDriver import Test.Tasty.WebDriver import qualified Data.Text as Text import qualified Test.Tasty ...
b2d5e3dca9c43a10392bc2839be24aca85a359322925209dbf13c415f47cd550
c-cube/printbox
lambda.ml
(** Example of printing trees: lambda-term evaluation *) type term = | Lambda of string * term | App of term * term | Var of string let _gensym = let r = ref 0 in fun () -> let s = Printf.sprintf "x%d" !r in incr r; s module SSet = Set.Make(String) module SMap = Map.Make(String) let rec fvar...
null
https://raw.githubusercontent.com/c-cube/printbox/36c9558b5dea9e37d4b3124253ca27719ecb41a3/examples/lambda.ml
ocaml
* Example of printing trees: lambda-term evaluation replace [var] with the term [by] no risk rename [t] so that [var] doesn't occur in it
type term = | Lambda of string * term | App of term * term | Var of string let _gensym = let r = ref 0 in fun () -> let s = Printf.sprintf "x%d" !r in incr r; s module SSet = Set.Make(String) module SMap = Map.Make(String) let rec fvars t = match t with | Var s -> SSet.singleton s | Lamb...
e7a6fd3947db5c6a5cb6b6367f719ed5e94b1ddfb43cb26662861e53cb560816
mzp/coq-ruby
pptactic.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/parsing/pptactic.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Extensions ***********************...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * $ I d : pptactic.ml 12581...
390e1625ec83af9410f9b55525c7f0600e66380fb0d6cb59df13ac3060ee5b1c
dimitri/pgloader
command-db-uri.lisp
;;; ;;; The main target parsing ;;; COPY postgresql@localhost:5432 / dbname?foo ;;; (in-package :pgloader.parser) ;; Parse PostgreSQL database connection strings ;; ;; at postgresql://[user[:password]@][netloc][:port][/dbname]?table-name ;; ;; -connect.html#LIBPQ-CONNSTRING ;; ;; Also parse MySQL connection str...
null
https://raw.githubusercontent.com/dimitri/pgloader/999791d0131b0c81df3bd648733756b954054cfb/src/parsers/command-db-uri.lisp
lisp
The main target parsing at postgresql://[user[:password]@][netloc][:port][/dbname]?table-name -connect.html#LIBPQ-CONNSTRING Also parse MySQL connection strings and syslog service definition strings, using the same model. password looks like '(":" "password") socket directory is unix only, so we can for...
COPY postgresql@localhost:5432 / dbname?foo (in-package :pgloader.parser) Parse PostgreSQL database connection strings (defrule dsn-port (and ":" (* (digit-char-p character))) (:lambda (port) (bind (((_ digits &aux (port (coerce digits 'string))) port)) (list :port (if (null digits) digits ...
6f2d4bf87d1dd6c2a28a297bb977b5d1911e8d10f8c909a0d9d6d6bbea1457ad
zmeadows/sunwm
Main.hs
import Sunwm.Core import Sunwm.STree import Graphics.X11 import Data.Bits hiding (shift) import qualified Data.Map as M import Sunwm.Plugins.Bars.XMobar main :: IO () main = sunwm defaultConfig [xmobar myBarConf] >>= print myBarConf :: BarConf myBarConf = BarConf { _focusColor = ("#222222", "#077D8A"), ...
null
https://raw.githubusercontent.com/zmeadows/sunwm/d905dbe97ea5bb090d3d83c0f3b29d0ce48c96f6/app/Main.hs
haskell
workspaceNames = ["web","comm","code1","code2","code3","mus","misc1","misc2"] , ((0, xK_f), toggleFullScreen)
import Sunwm.Core import Sunwm.STree import Graphics.X11 import Data.Bits hiding (shift) import qualified Data.Map as M import Sunwm.Plugins.Bars.XMobar main :: IO () main = sunwm defaultConfig [xmobar myBarConf] >>= print myBarConf :: BarConf myBarConf = BarConf { _focusColor = ("#222222", "#077D8A"), ...
06206979919c6cd087c095bbe7ac6925b0db7e2a4dd538648edf9d2b741f2e36
2600hz/kazoo
kapi_websockets.erl
%%%----------------------------------------------------------------------------- ( C ) 2011 - 2020 , 2600Hz %%% @doc This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %%% %%% @end %%%--------...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_amqp/src/api/kapi_websockets.erl
erlang
----------------------------------------------------------------------------- @doc @end ----------------------------------------------------------------------------- ------------------------------------------------------------------------------ @doc Get all API definitions of this module. @end --------------------...
( C ) 2011 - 2020 , 2600Hz This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(kapi_websockets). -export([api_definitions/0, api_definition/1]). -export([get_req/1 ,get_req_v/...
1c2cd12ec4d9af8d593f8740c577dfc6051abf94dc8a901faf18ff80cd197562
tweag/lagoon
SqlType.hs
Copyright 2020 Pfizer Inc. 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 th...
null
https://raw.githubusercontent.com/tweag/lagoon/2ef0440db810f4f45dbed160b369daf41d92bfa4/src/backend/src/Lagoon/Util/PostgreSQL/Schema/SqlType.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permiss...
Copyright 2020 Pfizer Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , module Lagoon.Util.PostgreSQL.Schema.SqlType ( SqlType(..) ) where import Lagoon.Interface import Lagoon.Util import Lagoon.Util.PostgreSQ...
dee967f14d3389c2ed41cde1c90377571bbf3c51efd9d41215eb5c0045ac028e
ocaml-ppx/ppx_deriving
test_ppx_deriving.ml
open OUnit2 let test_inline ctxt = let sort = List.sort [%derive.ord: int * int] in assert_equal ~printer:[%derive.show: (int * int) list] [(1,1);(2,0);(3,5)] (sort [(2,0);(3,5);(1,1)]) let test_inline_shorthand ctxt = assert_equal ~printer:(fun x -> x) "[(1, 1); (2, 0)]" ([%show: ...
null
https://raw.githubusercontent.com/ocaml-ppx/ppx_deriving/7211546d6527bf57d3eff8174c90fc3c22250dae/src_test/deriving/test_ppx_deriving.ml
ocaml
open OUnit2 let test_inline ctxt = let sort = List.sort [%derive.ord: int * int] in assert_equal ~printer:[%derive.show: (int * int) list] [(1,1);(2,0);(3,5)] (sort [(2,0);(3,5);(1,1)]) let test_inline_shorthand ctxt = assert_equal ~printer:(fun x -> x) "[(1, 1); (2, 0)]" ([%show: ...
b8612cb5643374fc65b828a428520ba4aab8d529cab4e42e46b92a0eff6b7e40
caiorss/Functional-Programming
BookStore3.hs
data BookInfo = Book Int String [String] deriving (Show) data MagazineInfo = Magazine Int String [String] deriving (Show) type CustomerID = Int --- Type synonym type ReviewBody = String data BookReview = BookReview BookInfo CustomerID String data BetterReviw = Bette...
null
https://raw.githubusercontent.com/caiorss/Functional-Programming/ef3526898e3014e9c99bf495033ff36a4530503d/haskell/rwh/ch03/BookStore3.hs
haskell
- Type synonym
data BookInfo = Book Int String [String] deriving (Show) data MagazineInfo = Magazine Int String [String] deriving (Show) type ReviewBody = String data BookReview = BookReview BookInfo CustomerID String data BetterReviw = BetterReviw BookInfo CustomerID ReviewBody type Bo...