_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
89203f34310e0b9050934e00f7ef2848937e4ec46c0bdab7bb6f25c5b6da13a2
jepsen-io/jepsen
ubuntu.clj
(ns jepsen.os.ubuntu "Common tasks for Ubuntu boxes. Tested against Ubuntu 18.04." (:require [clojure.set :as set] [clojure.tools.logging :refer [info]] [jepsen.util :refer [meh]] [jepsen.os :as os] [jepsen.control :as c :refer [|]] [jepsen.control.util :a...
null
https://raw.githubusercontent.com/jepsen-io/jepsen/a75d5a50dd5fa8d639a622c124bf61253460b754/jepsen/src/jepsen/os/ubuntu.clj
clojure
Packages!
(ns jepsen.os.ubuntu "Common tasks for Ubuntu boxes. Tested against Ubuntu 18.04." (:require [clojure.set :as set] [clojure.tools.logging :refer [info]] [jepsen.util :refer [meh]] [jepsen.os :as os] [jepsen.control :as c :refer [|]] [jepsen.control.util :a...
54c42299a88db21f1ad0553bc03b75b57db227dbaa1d56706cc4a3f9c7584287
mransan/ocaml-protoc
pb_codegen_util.ml
module Ot = Pb_codegen_ocaml_type (** [sp x] same as sprintf but prefixed with new line *) let sp x = Printf.sprintf x let let_decl_of_and = function | Some _ -> "and" | None -> "let rec" let string_of_basic_type ?(for_pp = false) = function | Ot.Bt_string -> "string" | Ot.Bt_float -> "float" | Ot.Bt_int -...
null
https://raw.githubusercontent.com/mransan/ocaml-protoc/e43b509b9c4a06e419edba92a0d3f8e26b0a89ba/src/compilerlib/pb_codegen_util.ml
ocaml
* [sp x] same as sprintf but prefixed with new line this function transforms a `lower_case_like_this` into an * ocamlCaseLikeThis
module Ot = Pb_codegen_ocaml_type let sp x = Printf.sprintf x let let_decl_of_and = function | Some _ -> "and" | None -> "let rec" let string_of_basic_type ?(for_pp = false) = function | Ot.Bt_string -> "string" | Ot.Bt_float -> "float" | Ot.Bt_int -> "int" | Ot.Bt_int32 -> "int32" | Ot.Bt_uint32 -> ...
60f4743d867bf2b6ae67acb8534835703917bc8ee2696333edcc9b2cda76b086
ghcjs/ghcjs-dom
IDBObjectStore.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.IDBObjectStore (js_put, put, put_, js_add, add, add_, js_deleteRange, deleteRange, ...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/IDBObjectStore.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/IDBObjectStore.getAllKeys Mozilla IDBObjectStore.getAllKeys documentation> | <-US/docs/Web/API/IDBObjectStore.getAllKeys Mozilla IDBObjectStore.getAllKeys documentation> | <-US/docs/Web/API/IDBObjectSto...
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.IDBObjectStore (js_put, put, put_, js_add, add, add_, js_deleteRange, deleteRange, deleteRange_, js_delete, delete, delete_, js_getRange, getRange, getRange_, js_get, get...
c5591d534e10af7af23d95011f12bf877b8ac8b477f715c81017d0dd7c6f96c7
racket/math
flonum-more-functions.rkt
#lang typed/racket/base (require racket/performance-hint "flonum-functions.rkt" "flonum-constants.rkt" "flonum-exp.rkt" "flonum-log.rkt" "flonum-error.rkt" "flvector.rkt" "utils.rkt") (provide flsqrt1pm1 flsinh flcosh fltanh flasinh flac...
null
https://raw.githubusercontent.com/racket/math/dcd2ea1893dc5b45b26c8312997917a15fcd1c4a/math-lib/math/private/flonum/flonum-more-functions.rkt
racket
--------------------------------------------------------------------------------------------------- sqrt(1+x)-1 --------------------------------------------------------------------------------------------------- Hyperbolic sine Odd function -------------------------------------------------------------------------...
#lang typed/racket/base (require racket/performance-hint "flonum-functions.rkt" "flonum-constants.rkt" "flonum-exp.rkt" "flonum-log.rkt" "flonum-error.rkt" "flvector.rkt" "utils.rkt") (provide flsqrt1pm1 flsinh flcosh fltanh flasinh flac...
f1d88ea22fda93ea0300ad305648dc67a948729f8de038d1f785c8e29b1e6030
ayamada/copy-of-svn.tir.jp
version.scm
#!/usr/bin/env gosh ;;; coding: euc-jp ;;; -*- scheme -*- ;;; vim:set ft=scheme ts=8 sts=2 sw=2 et: $ Id$ (use gauche.test) ;;; ---- (test-start "www.cgi.dispatch-tir.version") (use www.cgi.dispatch-tir.version) (test-module 'www.cgi.dispatch-tir.version) ;;; ---- ;(test-section "check version") (test* "(www....
null
https://raw.githubusercontent.com/ayamada/copy-of-svn.tir.jp/101cd00d595ee7bb96348df54f49707295e9e263/Gauche-www-cgi-dispatch-tir/tags/0.0.5/test/version.scm
scheme
coding: euc-jp -*- scheme -*- vim:set ft=scheme ts=8 sts=2 sw=2 et: ---- ---- (test-section "check version") ----
#!/usr/bin/env gosh $ Id$ (use gauche.test) (test-start "www.cgi.dispatch-tir.version") (use www.cgi.dispatch-tir.version) (test-module 'www.cgi.dispatch-tir.version) (test* "(www.cgi.dispatch-tir-version)" (call-with-input-file "../VERSION" read-line) (www.cgi.disp...
f457b021113ef1641dc72dfa83b67951277365f0568cd7f419a58d5abfd85415
dyzsr/ocaml-selectml
unix.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/otherlibs/unix/unix.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the NOTE : When a new function is added which is not implemented on Windows ( or partially imple...
97bbef86aa404ed23bc245927cbdb6cb61f22da6c2317cd181048b1b325893d3
didi-FP/tcp-streams
OpenSSL.hs
# LANGUAGE ScopedTypeVariables # -- | This module provides convenience functions for interfacing @HsOpenSSL@. @ssl / SSL@ here stand for @HsOpenSSL@ library , not the deprecated SSL 2.0/3.0 protocol . -- -- This module is intended to be imported @qualified@, e.g.: -- -- @ -- import "Data.Connection" -- imp...
null
https://raw.githubusercontent.com/didi-FP/tcp-streams/182a5b5a161aa35ad9c810a73845bd050e697cb2/tcp-streams-openssl/System/IO/Streams/OpenSSL.hs
haskell
| This module provides convenience functions for interfacing @HsOpenSSL@. This module is intended to be imported @qualified@, e.g.: @ import "Data.Connection" import qualified "System.IO.Streams.OpenSSL" as SSL @ * client * server * re-export | Type alias for tls connection. 'OutputStream' pai...
# LANGUAGE ScopedTypeVariables # @ssl / SSL@ here stand for @HsOpenSSL@ library , not the deprecated SSL 2.0/3.0 protocol . module System.IO.Streams.OpenSSL ( TLSConnection , connect , connectWithVerifier , sslToConnection , accept , module Data.OpenSSLSetting ) where import qualified Control.Exceptio...
630caf859d31ee28c8004cbac2260cda2cffb29eb536e66b730e89f9a60c618b
emanjavacas/cosycat
settings.clj
(ns cosycat.routes.settings (:require [compojure.core :refer [routes context POST GET]] [cosycat.routes.utils :refer [make-default-route]] [cosycat.db.users :as users] [cosycat.components.ws :refer [send-clients]] [config.core :refer [env]] [taoensso.timbre ...
null
https://raw.githubusercontent.com/emanjavacas/cosycat/a7186363d3c0bdc7b714af126feb565f98793a6e/src/clj/cosycat/routes/settings.clj
clojure
(ns cosycat.routes.settings (:require [compojure.core :refer [routes context POST GET]] [cosycat.routes.utils :refer [make-default-route]] [cosycat.db.users :as users] [cosycat.components.ws :refer [send-clients]] [config.core :refer [env]] [taoensso.timbre ...
86306094fff6d7d3e2633906b3a2f05e5d63442c292c828b22850fd7af6a51dd
totakke/cavia
downloader_test.clj
(ns cavia.downloader-test (:require [clojure.test :refer :all] [clojure.java.io :as io] [digest] [cavia.test-util :refer :all] [cavia.downloader :as dl]) (:import java.net.MalformedURLException)) ;;; ;;; Setup and teardown ;;; (defn fixture [f] (with-out-null ...
null
https://raw.githubusercontent.com/totakke/cavia/b93a3d953da359c40dc5ba2ffc827e7713c83857/test/cavia/downloader_test.clj
clojure
Setup and teardown Tests virtual hosted style path style others
(ns cavia.downloader-test (:require [clojure.test :refer :all] [clojure.java.io :as io] [digest] [cavia.test-util :refer :all] [cavia.downloader :as dl]) (:import java.net.MalformedURLException)) (defn fixture [f] (with-out-null (prepare-cache!) (f) (c...
4cd8ae818dda95dd217f424d539d8aaf0be0d7576fcae3d022910c81b51100c8
argp/bap
parser.ml
(** Bap interface to the parser. *) open Grammar_private_scope open Grammar_scope (* Note: Even though scope is imperative, we need to return it since the user might not have specified the input scope, but may be interested in the output scope. *) (* Reference: -parse-error-what-token *) let handle_exception l...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/parser.ml
ocaml
* Bap interface to the parser. Note: Even though scope is imperative, we need to return it since the user might not have specified the input scope, but may be interested in the output scope. Reference: -parse-error-what-token
open Grammar_private_scope open Grammar_scope let handle_exception lexbuf exn = let curr = lexbuf.Lexing.lex_curr_p in let line = curr.Lexing.pos_lnum in let cnum = curr.Lexing.pos_cnum - curr.Lexing.pos_bol in let tok = Lexing.lexeme lexbuf in let tail = Lexer.ruleTail "" lexbuf in Printf.fprintf stderr...
0381895561d0edc3432b40e2283645ec501c39497d7b1bd12c49cd8bd8c2649a
redclawtech/vernemq_kinesis
vernemq_kinesis_sup.erl
%%%------------------------------------------------------------------- ( C ) 2018 , Dairon < > %%% 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...
null
https://raw.githubusercontent.com/redclawtech/vernemq_kinesis/b40ff24152cccc6c8f6fbb5350432e7be8c85a44/src/vernemq_kinesis_sup.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 o...
( C ) 2018 , Dairon < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(vernemq_kinesis_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). start_link() -> ...
ca147f986f80327ffe2464c6b7b94d85cdc6a32951926fdb1fea2bf7e8e3f948
c-cube/ocaml-containers
t_het.ml
module Test = (val Containers_testlib.make ~__FILE__ ()) open Test open CCHet;; t @@ fun () -> let k1 : int Key.t = Key.create () in let k2 : int Key.t = Key.create () in let k3 : string Key.t = Key.create () in let k4 : float Key.t = Key.create () in let tbl = Tbl.create () in Tbl.add tbl k1 1; Tbl.add tbl k2 2; Tb...
null
https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/tests/data/t_het.ml
ocaml
module Test = (val Containers_testlib.make ~__FILE__ ()) open Test open CCHet;; t @@ fun () -> let k1 : int Key.t = Key.create () in let k2 : int Key.t = Key.create () in let k3 : string Key.t = Key.create () in let k4 : float Key.t = Key.create () in let tbl = Tbl.create () in Tbl.add tbl k1 1; Tbl.add tbl k2 2; Tb...
a3aaf38580660fe37bbbfccbd23dc4da4e23a9244a2a015719b16d227962b43c
CryptoKami/cryptokami-core
Modifier.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # -- | Wallet info modifier module Pos.Wallet.Web.Tracking.Modifier ( CAccModifier (..) , CachedCAccModifier , VoidModifier , deleteAndInsertVM , deleteAndInsertMM , IndexedMap...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/wallet/src/Pos/Wallet/Web/Tracking/Modifier.hs
haskell
| Wallet info modifier It's (set of added k, set of deleted k) essentially. | `txMempoolToModifier`, once evaluated, is passed around under this type in scope of single request. -------------------------------------------------------------------------- ---------------------------------------------------------------...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module Pos.Wallet.Web.Tracking.Modifier ( CAccModifier (..) , CachedCAccModifier , VoidModifier , deleteAndInsertVM , deleteAndInsertMM , IndexedMapModifier (..) , sor...
fde6fa4ef04ce58ae899d8d91015cacb2f4aa6017d9f3b2c108f7c40776b5cbc
qnikst/okasaki
ex_2_3.hs
# LANGUAGE FlexibleInstances , MultiParamTypeClasses # import Data.UnbalancedSet import Data.Set.Class import Data.Maybe (fromMaybe) -- test & bench import Control.DeepSeq import qualified Data.UnbalancedSet.Strict as S import Data.List (foldl') import Test.Hspec import Test.Hspec.QuickCheck import Test.QuickCheck hi...
null
https://raw.githubusercontent.com/qnikst/okasaki/f6f3c4211df16e4dde3a5cb4d6aaf19a68b99b0e/ch02/ex_2_3.hs
haskell
test & bench using maybe Test and benchmark section TESTS let s = force $ fromList zs
# LANGUAGE FlexibleInstances , MultiParamTypeClasses # import Data.UnbalancedSet import Data.Set.Class import Data.Maybe (fromMaybe) import Control.DeepSeq import qualified Data.UnbalancedSet.Strict as S import Data.List (foldl') import Test.Hspec import Test.Hspec.QuickCheck import Test.QuickCheck hiding (Result) im...
4eb12a763980063ed6ec7ccf4c57def6ffd2f3d44c5c8be44d59926215a1ad4f
EasyCrypt/easycrypt
ecPath.ml
(* -------------------------------------------------------------------- *) open EcUtils open EcMaps open EcSymbols open EcIdent (* -------------------------------------------------------------------- *) type path = { p_node : path_node; p_tag : int } and path_node = | Psymbol of symbol | Pqname of path * symbol...
null
https://raw.githubusercontent.com/EasyCrypt/easycrypt/af067ba87ab4105d577e5371748e10082c140146/src/ecPath.ml
ocaml
-------------------------------------------------------------------- -------------------------------------------------------------------- -------------------------------------------------------------------- -------------------------------------------------------------------- -----------------------------------...
open EcUtils open EcMaps open EcSymbols open EcIdent type path = { p_node : path_node; p_tag : int } and path_node = | Psymbol of symbol | Pqname of path * symbol let p_equal = ((==) : path -> path -> bool) let p_hash = fun p -> p.p_tag let p_compare = fun p1 p2 -> p_hash p1 - p_hash p2 module Hspath = W...
bd9c6755ce0f4d4267839c817e9c8ef7ed172c896d162fc6d4b1537cceab9cc9
dmitryvk/sbcl-win32-threads
create-contrib-doc-list.lisp
;;;; -*- lisp -*- ;;;; "Lisp as scripting language -- discuss" Generate contrib - docs.texi - temp from any texinfo files found in ;;;; the contrib/ sub-tree. (defun nodename (texi-file) (with-open-file (f texi-file) (loop for line = (read-line f) while line do (let ((index (search "@node" ...
null
https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/doc/manual/create-contrib-doc-list.lisp
lisp
-*- lisp -*- "Lisp as scripting language -- discuss" the contrib/ sub-tree.
Generate contrib - docs.texi - temp from any texinfo files found in (defun nodename (texi-file) (with-open-file (f texi-file) (loop for line = (read-line f) while line do (let ((index (search "@node" line))) (when index (return-from nodename (...
ac3ff8bde43ef9dd63901f41e6c26e137a72e54ff2fe911e10bc8c667d503aae
zenspider/schemers
exercise.2.03.scm
#lang racket/base Exercise 2.3 : ;; Implement a representation for rectangles in a plane. (Hint: You may want to make use of * Note Exercise 2 - 2 : : . ) In terms of your ;; constructors and selectors, create procedures that compute the ;; perimeter and the area of a given rectangle. Now implement a ;; different...
null
https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.03.scm
scheme
Implement a representation for rectangles in a plane. (Hint: You constructors and selectors, create procedures that compute the perimeter and the area of a given rectangle. Now implement a different representation for rectangles. Can you design your system with suitable abstraction barriers, so that the same perim...
#lang racket/base Exercise 2.3 : may want to make use of * Note Exercise 2 - 2 : : . ) In terms of your (define rect-width 'whatevs) (define rect-length 'whatevs) (define (rect-perimeter r) (+ (* 2 (rect-width r)) (* 2 (rect-length r)))) (define (rect-area r) (* (rect-width r) (rect-length r))) ...
cea1092237e64a1b40ea5eea086171fcda26d373ebafc9d7b22cd1e25639c937
mbutterick/aoc-racket
01.rkt
#lang br (require racket/file rackunit) (define (fuel-required mass) (- (floor (/ mass 3)) 2)) (define masses (for/list ([ln (in-port read (open-input-file "01.rktd"))]) ln)) 1 (check-eq? (apply + (map fuel-required masses)) 3167282) (define (recursive-fuel mass [acc 0]) (match (fuel-required mass...
null
https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/2019/01.rkt
racket
#lang br (require racket/file rackunit) (define (fuel-required mass) (- (floor (/ mass 3)) 2)) (define masses (for/list ([ln (in-port read (open-input-file "01.rktd"))]) ln)) 1 (check-eq? (apply + (map fuel-required masses)) 3167282) (define (recursive-fuel mass [acc 0]) (match (fuel-required mass...
c0bc70c24d13568353504d2f3e01f201765a68dfd45dd18cb900a1dfb89600b1
exercism/erlang
parallel_letter_frequency.erl
-module(parallel_letter_frequency). -export([dict/1]). dict(_Strings) -> undefined.
null
https://raw.githubusercontent.com/exercism/erlang/57ac2707dae643682950715e74eb271f732e2100/exercises/practice/parallel-letter-frequency/src/parallel_letter_frequency.erl
erlang
-module(parallel_letter_frequency). -export([dict/1]). dict(_Strings) -> undefined.
a32dbc1ea127d323ef6182d84a1ebdaec8899efd2f7921a34af93b60b913d4fc
plow-technologies/ble
Bluetooth.hs
| This module exports all you should need to build a Bluetooth Low Energy -- (BLE) peripheral. -- -- The core concepts involved are: -- -- ['Application'] This contains the entirety of your application, and is composed of zero or more @Service@s . -- [ ' Service ' ] A set of zero or more conceptually re...
null
https://raw.githubusercontent.com/plow-technologies/ble/fc1c2ab91b5fe33e3636e7b75f76219ef01968b9/src/Bluetooth.hs
haskell
(BLE) peripheral. The core concepts involved are: ['Application'] This contains the entirety of your application, and is Identified by it's 'UUID'. ['Characteristic'] @Characteristic@s represent the actual data of your application. They may allow reading, writing, and subscribing. Also identi...
| This module exports all you should need to build a Bluetooth Low Energy composed of zero or more @Service@s . [ ' Service ' ] A set of zero or more conceptually related @Characteristic@s . All four have @IsString@ instances and lens field accessors . The recommended way of using this library is by u...
ae314afda15baec3de77695575cde333b81f8345533d5b93d3981e5d08644770
GillianPlatform/Gillian
codeLoc.mli
type t val curr : Lexing.lexbuf -> t val fname : t -> string val get_start : t -> Lexing.position val get_end : t -> Lexing.position val str : t -> string val from_str : string -> t val json_of_pos : Lexing.position -> Yojson.Safe.t val json : t -> Yojson.Safe.t val json_with_uri : t -> Yojson.Safe.t val merge : t -> ...
null
https://raw.githubusercontent.com/GillianPlatform/Gillian/1c8d65120c04ef87cda689a9d41268e25b5ffa7e/wisl/lib/utils/codeLoc.mli
ocaml
type t val curr : Lexing.lexbuf -> t val fname : t -> string val get_start : t -> Lexing.position val get_end : t -> Lexing.position val str : t -> string val from_str : string -> t val json_of_pos : Lexing.position -> Yojson.Safe.t val json : t -> Yojson.Safe.t val json_with_uri : t -> Yojson.Safe.t val merge : t -> ...
dee3f54633ac7dfc87f1659e758d1c7a9248e235c34667cab3e24b549943af94
dmvianna/haskellbook
Ch27-StrictTest1.hs
{-# LANGUAGE BangPatterns #-} module StrictTest1 where data List a = Nil | Cons !a !(List a) deriving Show sTake :: Int -> List a -> List a sTake n _ | n <= 0 = Nil sTake n Nil = Nil sTake n (Cons x xs) = (Cons x (sTake (n-1) xs)) twoEls = Cons 1 (Cons undefined Nil) oneEl = sTake 1 twoEls threeElements = Cons 2...
null
https://raw.githubusercontent.com/dmvianna/haskellbook/b1fdce66283ccf3e740db0bb1ad9730a7669d1fc/src/Ch27-StrictTest1.hs
haskell
# LANGUAGE BangPatterns #
module StrictTest1 where data List a = Nil | Cons !a !(List a) deriving Show sTake :: Int -> List a -> List a sTake n _ | n <= 0 = Nil sTake n Nil = Nil sTake n (Cons x xs) = (Cons x (sTake (n-1) xs)) twoEls = Cons 1 (Cons undefined Nil) oneEl = sTake 1 twoEls threeElements = Cons 2 twoEls oneElT = sTake 1 three...
ffddc19f291144e5e475d498fadf58b79b6c4104e0225295646b14d2969f35c5
startalkIM/ejabberd
mod_private_sql.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2016 , %%% @doc %%% %%% @end Created : 13 Apr 2016 by < > %%%------------------------------------------------------------------- -module(mod_private_sql). -behaviour(mod_private). %% API -export([init/2, set_data/3...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/mod_private_sql.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API =================================================================== API =================================================================== =========================...
@author < > ( C ) 2016 , Created : 13 Apr 2016 by < > -module(mod_private_sql). -behaviour(mod_private). -export([init/2, set_data/3, get_data/3, get_all_data/2, remove_user/2, import/1, import/2, export/1]). -include("jlib.hrl"). -include("mod_private.hrl"). init(_Host, _Opts) -> ok. set_data...
e478092fd8345092488e62c5c2fd2136261fa9053ad248635b9a7e97e1013d10
aisamanra/s-cargot
Basic.hs
{-# LANGUAGE OverloadedStrings #-} module Data.SCargot.Language.Basic ( -- * Spec $ descr basicParser , basicPrinter , locatedBasicParser , locatedBasicPrinter ) where import Control.Applicative ((<$>)) import Data.Char (isAlphaNum) import Text.Parsec (many1, satisfy) imp...
null
https://raw.githubusercontent.com/aisamanra/s-cargot/71d2ec896f50877110df8622de3efdccfa6b8d59/Data/SCargot/Language/Basic.hs
haskell
# LANGUAGE OverloadedStrings # * Spec The 'basicSpec' describes S-expressions whose atoms are simply text strings that contain alphanumeric characters and a small set of punctuation. It does no parsing of numbers or other data types, and will accept tokens that typical Lisp implementations would find nonsensical ...
module Data.SCargot.Language.Basic $ descr basicParser , basicPrinter , locatedBasicParser , locatedBasicPrinter ) where import Control.Applicative ((<$>)) import Data.Char (isAlphaNum) import Text.Parsec (many1, satisfy) import Data.Text (Text, pack) import ...
7c012a26f89078273d143478292e10e64d430222be9a799eec8468c59d35d78a
anuragsoni/shuttle
status.mli
open! Core (* -status-codes/http-status-codes.xhtml *) type informational = [ RFC7231 , Section 6.2.1 ] | `Switching_protocols (* [RFC7231, Section 6.2.2] *) | `Processing (* [RFC2518] *) | `Early_hints (* [RFC8297] *) ] [@@deriving sexp, compare, hash, quickcheck, enumerate] type success = [ RFC7231 , Se...
null
https://raw.githubusercontent.com/anuragsoni/shuttle/4b6b477cc9cc811ad717e9ac663b4c4e7346f4b6/http11/src/status.mli
ocaml
-status-codes/http-status-codes.xhtml [RFC7231, Section 6.2.2] [RFC2518] [RFC8297] [RFC7231, Section 6.3.3] [RFC7231, Section 6.3.6] [RFC4918] [RFC5842] [RFC7231, Section 6.4.3] [RFC7538] [RFC7235, Section 3.1] [RFC7231, Section 6.5.4] [RFC7235, Section 3.2] [RFC7231, Section 6.5.9] [RFC491...
open! Core type informational = [ RFC7231 , Section 6.2.1 ] ] [@@deriving sexp, compare, hash, quickcheck, enumerate] type success = [ RFC7231 , Section 6.3.1 ] [ RFC7231 , Section 6.3.2 ] [ RFC7231 , Section 6.3.4 ] [ RFC7231 , Section 6.3.5 ] [ RFC7233 , Section 4.1 ] [ RFC3229 ] ] [@@deriving sex...
9214406696d33543aac42c82fc29a1725fd75b83bf67987b1be5378a35423f36
herbelin/coq-hh
subtyping.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/checker/subtyping.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i i This local type is used to subt...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Util open Names open Uni...
672df8f9069e0a7475bc80223de5194294234c6c18768e926807bb33d7517248
mirage/ocaml-tar
tar.ml
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * Copyright ( C ) 2012 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copie...
null
https://raw.githubusercontent.com/mirage/ocaml-tar/aea89ef02ea6756bae43c4dd7adc450336a0f00b/lib/tar.ml
ocaml
* Process and create tar file headers * Map of field name -> (start offset, length) taken from wikipedia: * For debugging: pretty-print a string as hex * Unmarshal an integer field (stored as 0-padded octal) * Unmarshal a string * Unmarshal a pax Extended Header File time It can contain a <period> ( '...
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * Copyright ( C ) 2012 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copie...
7e202a2f01d51b4a80ad0cc1d181ce2d4724433774e2913fb0f4fa88517537fe
ucsd-progsys/nate
topstart.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/toplevel/topstart.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 Q Public License version 1.0 . $ I d : topstart.ml , v 1.1 2002/04/2...
984e9860a97061c5c49e63996980fbd874734b5a996587c7d2fe34f1ddd61922
maoe/lzma
Incremental.hs
module Codec.Compression.LZMA.Incremental ( -- | This module provides incremental monadic compresssion and decompression -- interface. -- * Incremental compression and Decompression -- ** Compression streams I.CompressStream , I.compressIO , I.compressST -- ** Compression parameters , I.Compress...
null
https://raw.githubusercontent.com/maoe/lzma/f567015a2ed07ab0c5c766de7d9cee7fc40911f7/src/Codec/Compression/LZMA/Incremental.hs
haskell
| This module provides incremental monadic compresssion and decompression interface. * Incremental compression and Decompression ** Compression streams ** Compression parameters ** Decompression streams ** Decompression parameters * Incremental decompression with random seek
module Codec.Compression.LZMA.Incremental ( I.CompressStream , I.compressIO , I.compressST , I.CompressParams , I.defaultCompressParams , I.compressPreset , I.compressIntegrityCheck , I.compressBufferSize , I.compressMemoryLimit , I.DecompressStream , I.decompressIO , I.decompressST , ...
72cad48502ee3ec1fe3edc989f637dfa065414a492da80d7c94920074b812efa
nickzuber/lets-make-a-compiler
runner.ml
open OUnit open Ast open Ast.Standard open Pprint_ast exception Unimplemented_testcase let pass = ref 0 let fail = ref 0 let unimplemented = ref 0 let pprint_diff_verbose _formatter results = let (actual, expect) = results in let actual' = string_of_program actual ~padding:2 in let expect' = string_of_program...
null
https://raw.githubusercontent.com/nickzuber/lets-make-a-compiler/ee2337b116f07c1357f7b70bd09f1503e39fdc88/tests/runner.ml
ocaml
open OUnit open Ast open Ast.Standard open Pprint_ast exception Unimplemented_testcase let pass = ref 0 let fail = ref 0 let unimplemented = ref 0 let pprint_diff_verbose _formatter results = let (actual, expect) = results in let actual' = string_of_program actual ~padding:2 in let expect' = string_of_program...
607f3df62bec3cc395fcfb423f0455a71f0828029ee26aac4eefb2312559fed0
zenhack/layout-dsl
RangeMap.hs
# LANGUAGE UndecidableInstances # module Tests.IR.RangeMap where import Control.Applicative ((<$>), (<*>)) import Control.Monad.Identity (Identity(..)) import Test.Framework (testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.QuickCheck.Arbitrary (Arbitrary, arbitrary) import Test.QuickC...
null
https://raw.githubusercontent.com/zenhack/layout-dsl/66782d1e7bda4bcadfab86866c6e4b9bfbf78f28/prototype/Tests/IR/RangeMap.hs
haskell
# LANGUAGE UndecidableInstances # module Tests.IR.RangeMap where import Control.Applicative ((<$>), (<*>)) import Control.Monad.Identity (Identity(..)) import Test.Framework (testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.QuickCheck.Arbitrary (Arbitrary, arbitrary) import Test.QuickC...
8fd08da2fc369aea22c97d116829aa65500590d655462287d5bd8b4a135b3aa5
justinmeiners/exercises
l_2_3.scm
; LEMMA ; an orbit contains at most terminal point. ; PROOF ; suppose f^(n)(x) is terminal and f^(m)(x) is terminal ; where n != m then WLOG n < m ; so f(f^(n)(x)) is not defined, and neither is f^(m)
null
https://raw.githubusercontent.com/justinmeiners/exercises/9491bc16925eae12e048ccd3f424b870ebdc73aa/eop/2/l_2_3.scm
scheme
LEMMA an orbit contains at most terminal point. PROOF suppose f^(n)(x) is terminal and f^(m)(x) is terminal where n != m so f(f^(n)(x)) is not defined, and neither is f^(m)
then WLOG n < m
c1a88dd91cfd5683814b56adcc53472d6fb6f412c52ce95ec0052c66e8e38abb
ktakashi/sagittarius-scheme
sre.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; ;;; text/sre.scm - SRE utilities ;;; Copyright ( c ) 2010 - 2014 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Redistr...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/3ba83ba82b857c21df86ccce99395020310d3af8/sitelib/text/sre.scm
scheme
coding : utf-8 ; -*- text/sre.scm - SRE utilities 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 conditio...
Copyright ( c ) 2010 - 2014 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING SRE -- S - expression regexp notation ...
f776c81b352bb5c9da4333a889064235917664cf93de644b1efb1756337d651c
LdBeth/keim
problem.lisp
-*- syntax : common - lisp ; package : KEIM ; base : 10 ; mode : LISP -*- ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; Copyright ( C ) 1993 by AG Siekmann , , ; ; Universitaet des Sa...
null
https://raw.githubusercontent.com/LdBeth/keim/ed2665d3b0d9a78eaa88b5a2940a4541f0750926/keim/prog/problem/problem.lisp
lisp
package : KEIM ; base : 10 ; mode : LISP -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ; ; All rights reserved. ;; For information about this program...
(in-package "KEIM") (mod~defmod prob :uses (assum conc env keim mod node post sym term type ) :documentation "Datastructures and basic functionality for deduction problems." :exports ( prob+problem prob~create prob~find-problem prob~print prob~read prob~p ...
e436858c403b1001fe3e11290ce2ffcb4ec7f032844cb3d516764fe4e7ff53f2
avsm/mirage-duniverse
test_client.ml
open Lwt open Ex_common let test_client _ = let port = 4433 in let host = "127.0.0.1" in X509_lwt.authenticator `No_authentication_I'M_STUPID >>= fun authenticator -> Tls_lwt.connect_ext Tls.Config.(client ~authenticator ~ciphers:Ciphers.supported ()) (host, port) >>= fun (ic, oc) -> let req = Strin...
null
https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/tls/lwt/examples/test_client.ml
ocaml
open Lwt open Ex_common let test_client _ = let port = 4433 in let host = "127.0.0.1" in X509_lwt.authenticator `No_authentication_I'M_STUPID >>= fun authenticator -> Tls_lwt.connect_ext Tls.Config.(client ~authenticator ~ciphers:Ciphers.supported ()) (host, port) >>= fun (ic, oc) -> let req = Strin...
b6fd3c23ee4d2d3d9ca55417a94ca37ac9a9d5503e3e3dfa0eb9f5422562a829
mikelevins/folio2
make-functions.lisp
;;;; *********************************************************************** ;;;; Name : package.lisp ;;;; Project: folio2 - Functional idioms for Common Lisp Purpose : uniform tools for converting values from one type to another ;;;; Author: mikel evins Copyright : 2015 by mike...
null
https://raw.githubusercontent.com/mikelevins/folio2/a96052f78f0e0358376a498c6351342ece6a9b7b/src/make-functions.lisp
lisp
*********************************************************************** Project: folio2 - Functional idioms for Common Lisp Author: mikel evins *********************************************************************** function make (make type &key &allow-other-keys) => anything --------------------...
Name : package.lisp Purpose : uniform tools for converting values from one type to another Copyright : 2015 by mikel evins (in-package :net.bardcode.folio2.make) (defgeneric make (type &key &allow-other-keys)) (defmethod make ((type (eql 'cl:symbol)) &key (name nil) &allow-other-keys) ...
7848f3bb7167a0289d70d546aa7c0a749056db3c87043553a4121ec86b62357f
igorhvr/bedlam
init2.scm
;; The contents of this file are subject to the Mozilla Public ;; License Version 1.1 (the "License"); you may not use this file ;; except in compliance with the License. You may obtain a copy of the License at / ;; Software distributed under the License is distributed on an " AS ;; IS" basis, WITHOUT WARRANTY ...
null
https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-1.16.6/full-src/sisc/src/sisc/boot/init2.scm
scheme
License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Contributor(s):...
The contents of this file are subject to the Mozilla Public the License at / Software distributed under the License is distributed on an " AS The Original Code is the Second Interpreter of Scheme Code ( SISC ) . The Initial Developer of the Original Code is . Portions created by are Copyright ( C ) 20...
2301c310fc3ce6d74ab5c610267b5ba49679c990d6305ddd9a66d56ba9055e31
bos/bloomfilter
BloomFilter.hs
# LANGUAGE BangPatterns , Rank2Types , ScopedTypeVariables , TypeOperators # -- | -- Module: Data.BloomFilter Copyright : -- License: BSD3 -- Maintainer : < > -- Stability: unstable -- Portability: portable -- A fast , space efficient Bloom filter implementation . A -- filter is a set-like data structure...
null
https://raw.githubusercontent.com/bos/bloomfilter/5df9cd44dc350bfe37fe4a45500d948b246de117/Data/BloomFilter.hs
haskell
| Module: Data.BloomFilter License: BSD3 Stability: unstable Portability: portable filter is a set-like data structure that provides a probabilistic membership test. * Queries do not give false negatives. When an element is added to a filter, a subsequent membership test will definitely return 'True'....
# LANGUAGE BangPatterns , Rank2Types , ScopedTypeVariables , TypeOperators # Copyright : Maintainer : < > A fast , space efficient Bloom filter implementation . A module Data.BloomFilter ( Hash , Bloom , MBloom , freeze , thaw , unsafeFreeze , unfold , fromLi...
ba177eb05cbea5f0308d50972304761209392beea1ae9b6edaa643a8ab3d33a8
wg/epgsql
pgsql_idatetime.erl
Copyright ( C ) 2008 - . All rights reserved . -module(pgsql_idatetime). -export([decode/2, encode/2]). -define(int32, 1/big-signed-unit:32). -define(int64, 1/big-signed-unit:64). -define(postgres_epoc_jdate, 2451545). -define(mins_per_hour, 60). -define(secs_per_minute, 60). -define(usecs_per_day, 86400000...
null
https://raw.githubusercontent.com/wg/epgsql/3318bd5d646cad0623ae9dcc6df015bb85258a63/src/pgsql_idatetime.erl
erlang
Copyright ( C ) 2008 - . All rights reserved . -module(pgsql_idatetime). -export([decode/2, encode/2]). -define(int32, 1/big-signed-unit:32). -define(int64, 1/big-signed-unit:64). -define(postgres_epoc_jdate, 2451545). -define(mins_per_hour, 60). -define(secs_per_minute, 60). -define(usecs_per_day, 86400000...
ba1e8deb65b540c9a2500453d6a0c426789b8f93dc6c37df14a116f66446c5a9
meagtan/99-lisp-problems
p97-p98.lisp
;;;; Sudoku solver (in-package #:99-lisp-problems) ;;; p97 (defun solve-sudoku (array &optional (spot (next-undefined-spot array))) "Return solutions to a valid Sudoku puzzle, represented by a 9x9 array with elements either an integer between 1 and 9 or NIL." (if (null spot) (list array) (mapcan (lam...
null
https://raw.githubusercontent.com/meagtan/99-lisp-problems/82bd35b1c161aaba37306332505700c26721296c/src/90-99%20misc/p97-p98.lisp
lisp
Sudoku solver p97 expensive p22 a list containing bindings for spots add valid solution to list horizontal separators print each column column separators print array[row, col] if not NIL, else print . p98 start from the last row if every cell is compatible with the current state of columns a pair of filled ro...
(in-package #:99-lisp-problems) (defun solve-sudoku (array &optional (spot (next-undefined-spot array))) "Return solutions to a valid Sudoku puzzle, represented by a 9x9 array with elements either an integer between 1 and 9 or NIL." (if (null spot) (list array) (setf (aref a (car spot) (cdr...
d42b225772223e1fbd4e2dd3ae3e904bb12a670b295988bdf3bbffa26d948146
rmculpepper/gamble
ho-functions.rkt
Copyright ( c ) 2014 Released under the terms of the 2 - clause BSD license . ;; See the file COPYRIGHT for details. #lang s-exp "instrumenting-lang.rkt" (require (only-in racket/base [map racket:map])) (provide map filter andmap ormap foldr foldl repeat ...
null
https://raw.githubusercontent.com/rmculpepper/gamble/a5231e2eb3dc0721eedc63a77ee6d9333846323e/gamble/private/ho-functions.rkt
racket
See the file COPYRIGHT for details.
Copyright ( c ) 2014 Released under the terms of the 2 - clause BSD license . #lang s-exp "instrumenting-lang.rkt" (require (only-in racket/base [map racket:map])) (provide map filter andmap ormap foldr foldl repeat build-list) (define map (case-l...
80dd99aff035955a29042ff9abc9d42fd82e3f80d1743a8e538e533fd7dc1248
GaloisInc/macaw
Dwarf.hs
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternGuards # # LANGUAGE PatternSyno...
null
https://raw.githubusercontent.com/GaloisInc/macaw/e4b198ab2dd882e34690ed33056d5231b2d776bf/base/src/Data/Macaw/Dwarf.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE TypeSynonymInstances # | binaries. * Compile units and declarations ** Utility function * Variables * Sub programs * Inlineing * Locations (..) * Type information (..) * Name and Description * Low-level access * Exports of "Data.Dwarf" ---------...
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PatternGuards # # LANGUAGE PatternSynonyms # # LANGUAGE UndecidableInstances # This defines d...
c4e6aa221374d88ef5ab0c857ee21cd29c22b68ef2b12da8a38d2b3eef336376
poscat0x04/telegram-types
RestrictChatMember.hs
module Web.Telegram.Types.Internal.API.RestrictChatMember where import Common import Data.Time.Clock.POSIX import Web.Telegram.Types.Internal.API.ChatId import Web.Telegram.Types.Internal.ChatPermissions data RestrictChatMember = RestrictChatMember { chatId :: ChatId, userId :: Int, permissions :: ChatPermi...
null
https://raw.githubusercontent.com/poscat0x04/telegram-types/3de0710640f5303638a83e409001b0342299aeb8/src/Web/Telegram/Types/Internal/API/RestrictChatMember.hs
haskell
module Web.Telegram.Types.Internal.API.RestrictChatMember where import Common import Data.Time.Clock.POSIX import Web.Telegram.Types.Internal.API.ChatId import Web.Telegram.Types.Internal.ChatPermissions data RestrictChatMember = RestrictChatMember { chatId :: ChatId, userId :: Int, permissions :: ChatPermi...
bb49075adfb66d56ad9c41295612411a3e709ff85a2743699041244c88e25de8
jeffshrager/biobike
array-utils.lisp
;;; -*- mode: Lisp; Syntax: Common-Lisp; Package: utils; -*- (in-package :utils) ;;; +=========================================================================+ | Copyright ( c ) 2002 , 2003 , 2004 JP , , | ;;; | | ;;; | Permission is ...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Utils/array-utils.lisp
lisp
-*- mode: Lisp; Syntax: Common-Lisp; Package: utils; -*- +=========================================================================+ | | | Permission is hereby granted, free of charge, to any person obtaining | | a copy of this software and ...
(in-package :utils) | Copyright ( c ) 2002 , 2003 , 2004 JP , , | | " Software " ) , to deal in the Software without restriction , including | | distribute , sublicense , and/or sell copies of the Software , and to | | permit persons to whom the Software is furnished to do so , subject to ...
93b047aa9f4abdb7da1c2605cbfb7d9523bc3bd4ca54e36182c36aa1cb82ffb2
haskell-servant/servant
RemoteHost.hs
{-# LANGUAGE DeriveDataTypeable #-} module Servant.API.RemoteHost ( -- $remotehost RemoteHost ) where import Data.Typeable (Typeable) -- | Provides access to the host or IP address -- from which the HTTP request was sent. data RemoteHost deriving Typeable -- $remotehost -- -- U...
null
https://raw.githubusercontent.com/haskell-servant/servant/d06b65c4e6116f992debbac2eeeb83eafb960321/servant/src/Servant/API/RemoteHost.hs
haskell
# LANGUAGE DeriveDataTypeable # $remotehost | Provides access to the host or IP address from which the HTTP request was sent. $remotehost Use 'RemoteHost' whenever your request handlers need the host or IP address from which the client issued the HTTP request. The corresponding handlers receive argument...
module Servant.API.RemoteHost RemoteHost ) where import Data.Typeable (Typeable) data RemoteHost deriving Typeable > > > type API = " record - ip " :> RemoteHost :> Post ' [ ] ( )
c5c899e1643afeb324b4d40af75001a67bac28d719489ea44fb362c9ea1a6c7d
inconvergent/weir
vec.lisp
(in-package :vec) (declaim (type double-float PII) (vec *one* *zero*)) (defconstant PII #.(* PI 2d0)) (defparameter *one* #.(vec 1d0 1d0)) (defparameter *zero* #.(vec 0d0 0d0)) (defmacro nxn ((p &key nx sx ny sy mid bx by) &body body) (alexandria:with-gensyms (x y nx* ny** ny* sx* sy** sy* ...
null
https://raw.githubusercontent.com/inconvergent/weir/3c364e3a0e15526f0d6985f08a57b312b5c35f7d/src/vec/vec.lisp
lisp
MATHS total reflection refraction SHAPES
(in-package :vec) (declaim (type double-float PII) (vec *one* *zero*)) (defconstant PII #.(* PI 2d0)) (defparameter *one* #.(vec 1d0 1d0)) (defparameter *zero* #.(vec 0d0 0d0)) (defmacro nxn ((p &key nx sx ny sy mid bx by) &body body) (alexandria:with-gensyms (x y nx* ny** ny* sx* sy** sy* ...
df1218b97703a39bbc5c45a423bc36f58af71e44da881ba9cf0580440260f1d4
input-output-hk/cardano-sl
Json.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # module Test.Pos.Infra.Json ( tests ) where import Universum import Data.Map import Hedgehog (Property) import qualified Hedgehog as H import qualified Hedgehog.Gen as Gen imp...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/infra/test/Test/Pos/Infra/Json.hs
haskell
# LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ NodeMetaData ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ --------------------------------------...
# LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # module Test.Pos.Infra.Json ( tests ) where import Universum import Data.Map import Hedgehog (Property) import qualified Hedgehog as H import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Ran...
8546629e7379fb21e7d7ed5cf63e0cc8ba0dadd6eff8c13958d63fc6853000ca
xapi-project/xen-api
switch_main.ml
* Copyright ( c ) Citrix Systems Inc. * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AN...
null
https://raw.githubusercontent.com/xapi-project/xen-api/8d17b53bc236e23aa1ec455137773f7367665d83/ocaml/message-switch/switch/switch_main.ml
ocaml
In-memory cache We'll wake up all threads blocked in transfer on every queue update. Not very scalable, but at least it is correct. everything should be in sync Make sure we replay the log before processing requests This is the common client disconnection error - no need to log it
* Copyright ( c ) Citrix Systems Inc. * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AN...
e195a6f783c7b990782b8a2d7e48d1cf2a58aecd3d28867fe07bf986bacfcd45
zcaudate/hara
analyser.clj
(ns hara.deploy.analyser (:require [clojure.set :as set] [hara.deploy.common :as common] [hara.deploy.analyser.clj] [hara.deploy.analyser.cljs] [hara.deploy.analyser.java] [hara.io.file :as fs] [hara.io.project :as project] [hara.modu...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/deploy/analyser.clj
clojure
check for circular dependencies
(ns hara.deploy.analyser (:require [clojure.set :as set] [hara.deploy.common :as common] [hara.deploy.analyser.clj] [hara.deploy.analyser.cljs] [hara.deploy.analyser.java] [hara.io.file :as fs] [hara.io.project :as project] [hara.modu...
a925554db02c649b2231796b76732a4f72b066d8fcc01ef3690101d2fc153521
bnbeckwith/orgmode
html.clj
;; ## HTML output ;; ;; Functions to facilitate HTML output (ns orgmode.html (:require [hiccup.core :only [html]] [clojure.walk :as w] [clojure.string :as t]) (:import [org.apache.commons.lang3 StringEscapeUtils])) # # # Helping Items (def img-suffix-re #"(?i)(png|bmp|jpg|jpeg)$") (...
null
https://raw.githubusercontent.com/bnbeckwith/orgmode/39bfb27f33c9caee1233c338bdcea0045861ec3c/src/orgmode/html.clj
clojure
## HTML output Functions to facilitate HTML output
(ns orgmode.html (:require [hiccup.core :only [html]] [clojure.walk :as w] [clojure.string :as t]) (:import [org.apache.commons.lang3 StringEscapeUtils])) # # # Helping Items (def img-suffix-re #"(?i)(png|bmp|jpg|jpeg)$") (def ^:dynamic *user-src-fn* "User-defined function to use ...
1cd9c398a5e7ca8f35d0073296f2259b5ff057b3b8e9e2875bd5d7e2a5a510f8
ghc/testsuite
tcrun036.hs
{-# LANGUAGE Rank2Types #-} -- Another test for the new feature that contexts in a mutually -- recursive group do not need to be of the same length -- I'm putting it here mainly to document the need GHC used to say : -- Bug.lhs:23:10 : -- Inferred type is less polymorphic than expected -- Quantified typ...
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_run/tcrun036.hs
haskell
# LANGUAGE Rank2Types # Another test for the new feature that contexts in a mutually recursive group do not need to be of the same length I'm putting it here mainly to document the need Inferred type is less polymorphic than expected Quantified type variable `c' is mentioned in the environment: ...
GHC used to say : Bug.lhs:23:10 : module Main where class Catalog c where traverse :: c -> Viewer -> IO () instance Catalog Int where traverse i v = viewShowable v i type View a = a -> IO () data Viewer = Viewer { viewShowable :: forall s. Show s => View s, viewCatalog :: forall c. Catalog c => ...
ede019b9e6a039a74a3010f61ff0c7a7e7a2de454e49642235facc64a6052b2e
con-kitty/categorifier-c
KGen.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # LANGUAGE NoMonomorphismRestriction # module Categorifier.C.KGen.KGen ( KGen (..), -- * Helpers c...
null
https://raw.githubusercontent.com/con-kitty/categorifier-c/2cec7b0983592b57ed4c0ab755bd4dd643e38d25/test-lib/Categorifier/C/KGen/KGen.hs
haskell
# LANGUAGE ConstraintKinds # * Helpers * Re-exports for convenience | A value intended for code-generation. result with a symbolic value rather than a concrete one. This causes problems for us both in behavior and in testing of concrete values (against generated C code), so we explicitly codify the What rounding...
# LANGUAGE DataKinds # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # LANGUAGE NoMonomorphismRestriction # module Categorifier.C.KGen.KGen ( KGen (..), compareZerosGuard, SBV.SymVal, SBV.IEEEFlo...
a10fb0977cf2b9967e4c5a72dd30504312cd8fb357e76095f55bef27bb6e39ab
stanfordhaskell/cs43
Main.hs
module Main where main :: IO () main = putStrLn "hello world" --------------------------------- --------------------------------- EXPRESSIONS , VALUES , AND TYPES --------------------------------- --------------------------------- ------------------------------- -- Every expression has a value --------------------...
null
https://raw.githubusercontent.com/stanfordhaskell/cs43/8353da9e27336a7fe23488c3536e0dab4aaabfff/lecture-code/week1/src/Main.hs
haskell
------------------------------- ------------------------------- ------------------------------- ------------------------------- ----------------------------- Every expression has a value ----------------------------- a = False -- immutable order invariant Functions ----------------------------------- > inc 4 othe...
module Main where main :: IO () main = putStrLn "hello world" EXPRESSIONS , VALUES , AND TYPES a = True b = c + 1 inc x = 1 + x inc' x = (+) 1 x absMax x y = if abs x > abs y then abs x else abs y absMax' x y | abs x > abs y = abs x > absMax ( -5 ) 2 applyTwice f ...
d8ce2ee4db958613843b5477693fc6425c2f880b44ca0ab655ff9c20dd28551f
komamitsu/oraft
params.ml
type append_entries_request = { (* leader$B!G(Bs term *) term : int; (* so follower can redirect clients *) leader_id : int; (* index of log entry immediately preceding new ones *) prev_log_term : int; (* term of prevLogIndex entry *) prev_log_index : int; log entries to store ( empty for heartbeat ...
null
https://raw.githubusercontent.com/komamitsu/oraft/fb84c275645658821ae79e36b2ef8a35f54d80b0/lib/params.ml
ocaml
leader$B!G(Bs term so follower can redirect clients index of log entry immediately preceding new ones term of prevLogIndex entry currentTerm, for leader to update itself true if follower contained entry matching * prevLogIndex and prevLogTerm candidate$B!G(Bs term candidate requesting vote curre...
type append_entries_request = { term : int; leader_id : int; prev_log_term : int; prev_log_index : int; log entries to store ( empty for heartbeat ; * may send more than one for efficiency ) * may send more than one for efficiency) *) entries : State.PersistentLogEntry.t list; leader_commit :...
effaff2df8a77a21a6ea3463c13b00db71f29e1253a2771276110c450729c952
ndmitchell/catch
Wheel1.hs
I lazy wheel - sieve . ( ) ; March 1996 . See article " Lazy wheel sieves and spirals of primes " ( to appear , ) . module Wheel1 where data Wheel = Wheel Int [Int] primes :: [Int] primes = sieve wheels primes squares sieve (Wheel s ns:ws) ps qs = [n' | o <- s:[s*2,s*3..(head ps-1)*s], n <- ns,...
null
https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/examples/Nofib/Wheel1.hs
haskell
I lazy wheel - sieve . ( ) ; March 1996 . See article " Lazy wheel sieves and spirals of primes " ( to appear , ) . module Wheel1 where data Wheel = Wheel Int [Int] primes :: [Int] primes = sieve wheels primes squares sieve (Wheel s ns:ws) ps qs = [n' | o <- s:[s*2,s*3..(head ps-1)*s], n <- ns,...
d7f0a9057213f821c6e3e0874753d9748ed155295ce4faf2eecb94a13e6b846b
jgm/yst
Config.hs
Copyright ( C ) 2009 < > This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . This program is distributed in t...
null
https://raw.githubusercontent.com/jgm/yst/572f5fda4bc2e52631c2613efb697e28b9418afc/Yst/Config.hs
haskell
a submenu a page
Copyright ( C ) 2009 < > This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . This program is distributed in t...
b9ab9946e1b2cf0da081b69e8a2d35173dd945d5f6549715798e46794856ef00
200ok-ch/org-parser
transform.cljc
(ns org-parser.transform (:require [clojure.string :as str] [instaparse.core :as insta])) ;; See also parse_org.js in -ch/organice for inspirations (def conjv (comp vec conj)) (def consv (comp vec cons)) (defmulti reducer "The reducer multi method takes a RESULT and an AST and dispatches on the f...
null
https://raw.githubusercontent.com/200ok-ch/org-parser/8c668f18e5ed1643d269b53bbc0a0c3d41cdde34/src/org_parser/transform.cljc
clojure
See also parse_org.js in -ch/organice for inspirations append line to :ast append raw string to :raw add the given ast to the section of the last headline or to the preamble if there are no headlines yet Unused? find tags by regex content-line needs to simply drop the keyword :title just a synonym for :text in...
(ns org-parser.transform (:require [clojure.string :as str] [instaparse.core :as insta])) (def conjv (comp vec conj)) (def consv (comp vec cons)) (defmulti reducer "The reducer multi method takes a RESULT and an AST and dispatches on the first element in AST, which is the type (a keyword) of the ...
321e4f65dedef6027a29f451ffd37b29ad62600ee9d5651e2c8b3f0d2cce9dda
ghcjs/jsaddle-dom
RTCSessionDescription.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.RTCSessionDescription (newRTCSessionDescription, getType, getSdp, RTCSessionDescription(..), gTypeRTCSessio...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/RTCSessionDescription.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/RTCSessionDescription Mozilla RTCSessionDescription documentation>
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.RTCSessionDescription (newRTCSessionDescription, getType, getSdp, RTCSessionDescription(..), gTypeRTCSessionDescription) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(....
26baf7b07580d901510086030aa8a61320dd3d5820016c1caf2f95acb37fd4ff
robert-stuttaford/bridge
ajax.cljs
(ns bridge.ui.ajax (:require ajax.edn day8.re-frame.http-fx [re-frame.core :as rf])) (rf/reg-event-fx ::http-post (fn [db [_ data on-success]] {:http-xhrio (cond-> {:method :post :uri (str "/client/api?" (name (:action data))) :param...
null
https://raw.githubusercontent.com/robert-stuttaford/bridge/867d81354457c600cc5c25917de267a8e267c853/src/bridge/ui/ajax.cljs
clojure
(ns bridge.ui.ajax (:require ajax.edn day8.re-frame.http-fx [re-frame.core :as rf])) (rf/reg-event-fx ::http-post (fn [db [_ data on-success]] {:http-xhrio (cond-> {:method :post :uri (str "/client/api?" (name (:action data))) :param...
7f0f957ebacb7383a940a903fe9bec049d8277adf788671a2b8f353eb7b047a9
gebi/jungerl
tracer.erl
%%%------------------------------------------------------------------------ %%% File: $Id$ %%%------------------------------------------------------------------------ @author < > %%% @doc This module implements tracing support for function calls. It is similar to dbg : c/3 , however it can return the trace as i...
null
https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/lama/src/tracer.erl
erlang
------------------------------------------------------------------------ File: $Id$ ------------------------------------------------------------------------ @doc This module implements tracing support for function calls. It is @end $URL: $ ------------------------------------------------------------------------ ...
@author < > similar to dbg : c/3 , however it can return the trace as its result . @version $ Rev : 359 $ $ LastChangedDate : 2006 - 01 - 11 10:28:26 -0500 ( We d , 11 Jan 2006 ) $ -module(tracer). -author(''). -id("$Id$"). -export([t/3, t/4, tp/3, tp/4, tf/3, tf/4, print_trace/1]). tp(M , F , ) - > Re...
79dc96e1cabbdb0aa43bba410bbdb9cf899d7eb9a7c1bb11fba8e87ed6608cc6
dstcruz/Write-Yourself-A-Scheme-In-48-Hours
exercise_4.hs
# LANGUAGE ExistentialQuantification # module Main where import Char (toLower) import Control.Monad (liftM) import Control.Monad.Error import Data.Array (Array (..), listArray) import Data.Char (toLower) import Data.Ratio (Rational (..), (%)) import Data.Complex (Complex (..)) import Numeric (readOct, readHex) import ...
null
https://raw.githubusercontent.com/dstcruz/Write-Yourself-A-Scheme-In-48-Hours/19765a03fb01d788066259d115c7798518224ad9/ch05/exercise_4.hs
haskell
not sure I understand the type of this function according to ghci to play in ghci Bug: this allows the unquote to appear outside of a quasiquoted list Bug: this allows unquote-splicing to appear outside of a quasiquoted list Show functions Evaluator Evaluator Helpers Primitive functions lookup table ...
# LANGUAGE ExistentialQuantification # module Main where import Char (toLower) import Control.Monad (liftM) import Control.Monad.Error import Data.Array (Array (..), listArray) import Data.Char (toLower) import Data.Ratio (Rational (..), (%)) import Data.Complex (Complex (..)) import Numeric (readOct, readHex) import ...
02f0df33342d8491c82ab592c3e511e97d2ecd3cfdcf47591548d076975e879e
fourmolu/fourmolu
simple-four-out.hs
(*) :: Int -> Int -> Int x * y = z foo :: Int -> Int -> Int x `foo` y = z bar :: Int -> Int -> Int -> Int (x `bar` y) z = z multiline :: Int -> Int -> Int x `multiline` y = z
null
https://raw.githubusercontent.com/fourmolu/fourmolu/1f8903a92c8d5001dc1ec8ecfd4a04a3b61c3283/data/examples/declaration/value/function/infix/simple-four-out.hs
haskell
(*) :: Int -> Int -> Int x * y = z foo :: Int -> Int -> Int x `foo` y = z bar :: Int -> Int -> Int -> Int (x `bar` y) z = z multiline :: Int -> Int -> Int x `multiline` y = z
0f9b3ab30f575a26e90ffbaec5532897d73ed30193d8c94ee253f947e98e4b88
fulcro-legacy/semantic-ui-wrapper
ui_feed_like.cljs
(ns fulcrologic.semantic-ui.views.feed.ui-feed-like (:require [fulcrologic.semantic-ui.factory-helpers :as h] ["semantic-ui-react/dist/commonjs/views/Feed/FeedLike" :default FeedLike])) (def ui-feed-like "A feed can contain a like element. Props: - as (custom): An element type to render as (string...
null
https://raw.githubusercontent.com/fulcro-legacy/semantic-ui-wrapper/b0473480ddfff18496df086bf506099ac897f18f/semantic-ui-wrappers-shadow/src/main/fulcrologic/semantic_ui/views/feed/ui_feed_like.cljs
clojure
(ns fulcrologic.semantic-ui.views.feed.ui-feed-like (:require [fulcrologic.semantic-ui.factory-helpers :as h] ["semantic-ui-react/dist/commonjs/views/Feed/FeedLike" :default FeedLike])) (def ui-feed-like "A feed can contain a like element. Props: - as (custom): An element type to render as (string...
d9371449c662803d4f40a26235a4e409f0b03a57966cc47282396ed19bb20727
sneeuwballen/zipperposition
Literal.ml
This file is free software , part of Zipperposition . See file " license " for more details . * { 1 Equational literals } module T = Term module S = Subst module PB = Position.Build module P = Position module US = Unif_subst module VS = T.VarSet type term = Term.t type t = | True | False | Equation of term...
null
https://raw.githubusercontent.com/sneeuwballen/zipperposition/71798cc0559d2c365ad43a0a54e204a2d079cebd/src/core/Literal.ml
ocaml
regular comparison assert(List.for_all no_prop_invariant [l1;l2]); specific: for the term comparison primary constructor for equations and predicates Maybe the sign will flip, so we have to beta reduce. * Unification-like operation on components of a literal. generic unification structure find substitutio...
This file is free software , part of Zipperposition . See file " license " for more details . * { 1 Equational literals } module T = Term module S = Subst module PB = Position.Build module P = Position module US = Unif_subst module VS = T.VarSet type term = Term.t type t = | True | False | Equation of term...
0c2692bf931927d216c30e5152a6455c8ffc71a5f6faafe3ed75d30463d19a0e
skanev/playground
helpers.scm
(load-relative "syntax.scm") (load-relative "operations.scm") (load-relative "compiler.scm") (load-relative "explicit-evaluator-text.scm") (load-relative "../simulator/simulator.scm") (load-relative "../explicit/controller-text.scm") (define (make-explicit+compile-machine) (make-machine ec-registers cm-operations ex...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/05/showcase/compiler/helpers.scm
scheme
(load-relative "syntax.scm") (load-relative "operations.scm") (load-relative "compiler.scm") (load-relative "explicit-evaluator-text.scm") (load-relative "../simulator/simulator.scm") (load-relative "../explicit/controller-text.scm") (define (make-explicit+compile-machine) (make-machine ec-registers cm-operations ex...
c000b4ba997e0af9ee1a4a4f7511bf68e1c8caa41b2bacb060d453298559ade9
modular-macros/ocaml-macros
class_1.ml
(* class expression are compiled to recursive bindings *) class test = object method x = 1 end
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/letrec/class_1.ml
ocaml
class expression are compiled to recursive bindings
class test = object method x = 1 end
1ce2ff6837cb13e7f2d0729f0d6bd71fa5467ec1ebc35a52ec319d8ad06195aa
dbuenzli/rel
test.ml
--------------------------------------------------------------------------- Copyright ( c ) 2020 The rel programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 2...
null
https://raw.githubusercontent.com/dbuenzli/rel/f95b6bad02a8080eb64f8d0123cd63d40b528e33/test/test.ml
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2020 The rel programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 2...
481bfef3f5cb9d94777bb27f12cd54033f8eeb8425fa910eb70238fce61c2632
avsm/eeww
config.common.ml
#2 "utils/config.common.ml" (**************************************************************************) (* *) (* OCaml *) (* ...
null
https://raw.githubusercontent.com/avsm/eeww/4d65720b5dd51376842ffe5c8c220d5329c1dc10/boot/ocaml/utils/config.common.ml
ocaml
************************************************************************ OCaml ...
#2 "utils/config.common.ml" , projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the The main OCaml version string has moved to .. / ocaml_version.m4 let ve...
261983e47d83f64d38ad86fb895620b851c723e386f38684c48606e4213771d7
markmandel/brute-play-pong
input.clj
(ns ^{:doc "Input system"} brute-play-pong.input (:use [play-clj.core]) (:require [brute-play-pong.paddle :as p]) (:import [brute_play_pong.component PlayerPaddle])) (def speed 200) (defn process-one-game-tick "Render all the things" [system delta] (when (key-pressed? :dpad-left) (...
null
https://raw.githubusercontent.com/markmandel/brute-play-pong/f10c7939e867f913cb35e4155768975fa0f93060/desktop/src-common/brute_play_pong/input.clj
clojure
(ns ^{:doc "Input system"} brute-play-pong.input (:use [play-clj.core]) (:require [brute-play-pong.paddle :as p]) (:import [brute_play_pong.component PlayerPaddle])) (def speed 200) (defn process-one-game-tick "Render all the things" [system delta] (when (key-pressed? :dpad-left) (...
85ac154767d8629aa6f7436b5da7d35800cbdf55db4dab4a12bf00a287e6c428
facebook/flow
hh_json_test.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/4cd23bfa4e1190a810a4cfb5229c02a40e76c179/src/hack_forked/test/unit/utils/hh_json_test.ml
ocaml
* We access exactly as we do above, but "bar" actually is an array instead * of a string, so we should expect to get a Error. we expect it to preserve the leading space!
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
d195cf63d2121862e124e6f2c0a028de977cf7f30defb97cdfe75e5b1f1b0381
perkss/clojure-kafka-examples
processor_api_rekey.clj
(ns kafka-streams-example.processor-api-rekey (:require [clojure.tools.logging :as log] [kafka-streams-example.serdes.json-serdes :refer [json-serde]]) (:import (org.apache.kafka.streams.processor Processor ProcessorSupplier ProcessorContext To) ...
null
https://raw.githubusercontent.com/perkss/clojure-kafka-examples/2c1e3d62b768c0c6919ab36b0f05f469b322f3e6/kafka-streams-example/src/kafka_streams_example/processor_api_rekey.clj
clojure
(ns kafka-streams-example.processor-api-rekey (:require [clojure.tools.logging :as log] [kafka-streams-example.serdes.json-serdes :refer [json-serde]]) (:import (org.apache.kafka.streams.processor Processor ProcessorSupplier ProcessorContext To) ...
5c1e0b4bec91a9f7fe824837b759528f3f6cfa426b080e5f67ee79cd50bd8984
seek-oss/serverless-haskell
Embedded.hs
# LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE TemplateHaskell #-} {-| Module: Data.Aeson.Embedded Description: Type for a JSON value embedded within a JSON string value -} module Data.Aeson.Embedded where import ...
null
https://raw.githubusercontent.com/seek-oss/serverless-haskell/dbea96e657e23fd4a3fef03bdf182f060dc2590d/src/Data/Aeson/Embedded.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE TemplateHaskell # | Module: Data.Aeson.Embedded Description: Type for a JSON value embedded within a JSON string value | Type for a JSON value embedded within a JSON string value
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RecordWildCards # module Data.Aeson.Embedded where import Control.Lens.TH import Data.Aeson import qualified Data.ByteString.Lazy as LBS import Data.Text.Encoding (decodeUtf8, encodeUtf8) import Network.AWS.Data....
8f138aeea12a0f5140d03b65ba3acdf32845b09cd181f718d968b9d4e59ab489
caradoc-org/caradoc
params.ml
(*****************************************************************************) (* Caradoc: a PDF parser and validator *) Copyright ( C ) 2015 ANSSI Copyright ( C ) 2015 - 2017 (* ...
null
https://raw.githubusercontent.com/caradoc-org/caradoc/100f53bc55ef682049e10fabf24869bc019dc6ce/src/params.ml
ocaml
*************************************************************************** Caradoc: a PDF parser and validator This program is free software; you can redistribute it and/or modify ...
Copyright ( C ) 2015 ANSSI Copyright ( C ) 2015 - 2017 it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation . You should have rece...
8691200f1b2a837fec271e39d4e37dd90d607a6b23943b45349150e9c29742fd
zero-one-group/geni
utils_test.clj
(ns zero-one.geni.utils-test (:require [clojure.string] [midje.sweet :refer [facts fact =>]] [zero-one.geni.interop :as interop] [zero-one.geni.utils :refer [ensure-coll with-dynamic-import]]) (:import (scala.collection Seq))) (facts "On dynamic imports" (fact "succeeds with valid import forms" ...
null
https://raw.githubusercontent.com/zero-one-group/geni/4dbabf8315d85cc1526e04bca7e4cb7b75c21ac1/test/zero_one/geni/utils_test.clj
clojure
#(and (= % :succeeded) (= ghi-jkl 123))))
(ns zero-one.geni.utils-test (:require [clojure.string] [midje.sweet :refer [facts fact =>]] [zero-one.geni.interop :as interop] [zero-one.geni.utils :refer [ensure-coll with-dynamic-import]]) (:import (scala.collection Seq))) (facts "On dynamic imports" (fact "succeeds with valid import forms" ...
8e6512d9aa24b68c6f32b58991dc0a9d43cae3ba544f08dd2699a9844a283817
Carnap/Carnap
Semantics.hs
# LANGUAGE TypeSynonymInstances , UndecidableInstances , FlexibleInstances , MultiParamTypeClasses , GADTs , DataKinds , PolyKinds , TypeOperators , ViewPatterns , PatternSynonyms , RankNTypes , FlexibleContexts # module Carnap.Languages.PureFirstOrder.Semantics where import Carnap.Core.Data.Types import Carnap.Core.D...
null
https://raw.githubusercontent.com/Carnap/Carnap/99546e377008247c5a1e8de1e294aac8e22584d7/Carnap/src/Carnap/Languages/PureFirstOrder/Semantics.hs
haskell
------------------------------------ Pure Monadic First Order Logic -- ------------------------------------ -------------------------------- Polyadic First Order Logic -- -------------------------------- Helper function for (safely) building a piece of a relation out of a list of lists of things.
# LANGUAGE TypeSynonymInstances , UndecidableInstances , FlexibleInstances , MultiParamTypeClasses , GADTs , DataKinds , PolyKinds , TypeOperators , ViewPatterns , PatternSynonyms , RankNTypes , FlexibleContexts # module Carnap.Languages.PureFirstOrder.Semantics where import Carnap.Core.Data.Types import Carnap.Core.D...
580e423e337c37f32633e063747a34c26a7a89787d323851663df57cdf1b36e0
mvaldesdeleon/haskell-book
prof1.hs
module Main where f :: IO () f = do print ([1 ..] !! 999999) putStrLn "f" g :: IO () g = do print ([1 ..] !! 9999999) putStrLn "g" main :: IO () main = do f g
null
https://raw.githubusercontent.com/mvaldesdeleon/haskell-book/ee4a70708041686abe2f1d951185786119470eb4/ch28/prof1.hs
haskell
module Main where f :: IO () f = do print ([1 ..] !! 999999) putStrLn "f" g :: IO () g = do print ([1 ..] !! 9999999) putStrLn "g" main :: IO () main = do f g
e27c3d558f072c587384851627bef389a7066d11ed08fde90d6da5c492199343
willdoescode/chuck
Chuck.hs
# LANGUAGE DeriveGeneric # module Main where import Control.Lens (view) import Data.Aeson (FromJSON) import GHC.Generics (Generic) import Network.Wreq (asJSON, get, responseBody) data Chuck = Chuck { icon_url :: String, id :: String, url :: String, value :: String } deriving (Show, Generic) instan...
null
https://raw.githubusercontent.com/willdoescode/chuck/1d85f937d2ddd2551e9071f7a94d5eb16e470ca3/Chuck.hs
haskell
# LANGUAGE DeriveGeneric # module Main where import Control.Lens (view) import Data.Aeson (FromJSON) import GHC.Generics (Generic) import Network.Wreq (asJSON, get, responseBody) data Chuck = Chuck { icon_url :: String, id :: String, url :: String, value :: String } deriving (Show, Generic) instan...
bcfbd253e280b369582de023c14e133bec1178d407b32f9afc0cc55bc4c6f220
returntocorp/semgrep
Gitignore_syntax.ml
(* gitignore syntax, and syntax only. -scm.com/docs/gitignore *) module M = Glob_matcher type selection_event = Selected of M.loc | Deselected of M.loc type path_selector = { loc : M.loc; matcher : Git_path.t -> selection_event option; } type t = path_selector list let show_selection_event x = match x...
null
https://raw.githubusercontent.com/returntocorp/semgrep/88135d1c4affe447c98819b677160069fc4b3270/src/osemgrep/targeting/Gitignore_syntax.ml
ocaml
gitignore syntax, and syntax only. -scm.com/docs/gitignore not sure why it would happen so we let it fail trailing slash anchored pattern = relative to the work directory only, as opposed to being relative to any folder in the subtree. /... **/
module M = Glob_matcher type selection_event = Selected of M.loc | Deselected of M.loc type path_selector = { loc : M.loc; matcher : Git_path.t -> selection_event option; } type t = path_selector list let show_selection_event x = match x with | Selected loc -> Printf.sprintf "selected at %s" (Glob_matcher....
f85458f6e30cb9b98ae90e1ba9a9b9515bd7913df86ad22d2a51c7210b561400
codereport/racket-algorithms
main.rkt
MIT License ; Copyright ( c ) 2020 ; ; Permission is hereby granted, free of charge, to any person obtaining a copy ; of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the rights ; to use, copy, modify, merge, publish...
null
https://raw.githubusercontent.com/codereport/racket-algorithms/4d2de1bd73a409b25c503b9fb27271f0c9325105/main.rkt
racket
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished to do so, subject to the following conditions: The above copyright notice...
MIT License Copyright ( c ) 2020 in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS...
0e14bad593377c5b53cfd733ffb71afc7912859b3d0c130999f5d9c0cef5db6f
poroh/ersip
ersip_hdr_fromto.erl
%%% Copyright ( c ) 2018 , 2020 Dmitry Poroh %%% All rights reserved. Distributed under the terms of the MIT License . See the LICENSE file . %%% %%% SIP From/To headers %%% -module(ersip_hdr_fromto). -export([new/0, make/1, display_name/1, set_display_name/2, uri/1, s...
null
https://raw.githubusercontent.com/poroh/ersip/60afa92a53898f6692f3a30d04b5b88a580c8153/src/message/ersip_hdr_fromto.erl
erlang
All rights reserved. SIP From/To headers =================================================================== Types =================================================================== deprecated: =================================================================== API =============================================...
Copyright ( c ) 2018 , 2020 Dmitry Poroh Distributed under the terms of the MIT License . See the LICENSE file . -module(ersip_hdr_fromto). -export([new/0, make/1, display_name/1, set_display_name/2, uri/1, set_uri/2, tag/1, set_tag/2, set_ra...
a5902c1088944200be14a09a82e7db1f1884bdc8ff49dfb689ea7ee08386edaa
sdiehl/elliptic-curve
Types.hs
module Generate.Edwards.Types ( module Generate.Edwards.Types , module Generate.Types ) where import Protolude import GHC.Natural (Natural) import Generate.Types ------------------------------------------------------------------------------- -- Types -----------------------------------------------------------...
null
https://raw.githubusercontent.com/sdiehl/elliptic-curve/445e196a550e36e0f25bd4d9d6a38676b4cf2be8/generate/Generate/Edwards/Types.hs
haskell
----------------------------------------------------------------------------- Types -----------------------------------------------------------------------------
module Generate.Edwards.Types ( module Generate.Edwards.Types , module Generate.Types ) where import Protolude import GHC.Natural (Natural) import Generate.Types data Curve = Curve { name :: Text , types :: Types , parameters :: Parameters } data Parameters = Parameters { a :: Element ...
4d0912f3f0992fd4957f7260fd6d48b3a12e299acd5801372a76abdfb3859b8e
yrashk/ocaml-traits
partial_ord.mli
* [ PartialOrd ] defines primitives for { { : #Partial_order } partial order } over two types ( [ t ] and [ rhs ] ) In order for a module to implement [ PartialOrd ] , it has to conform to the { ! T } signature , which implies conformance to { ! PartialEq . T } The comparison must satisf...
null
https://raw.githubusercontent.com/yrashk/ocaml-traits/460f43f37c2ffc9b138fde434e6b787dffab9070/lib/partial_ord.mli
ocaml
* Type being compared * Type being compared with * Compares values of {!t} and {!rhs} and returns an ordering if one exists
* [ PartialOrd ] defines primitives for { { : #Partial_order } partial order } over two types ( [ t ] and [ rhs ] ) In order for a module to implement [ PartialOrd ] , it has to conform to the { ! T } signature , which implies conformance to { ! PartialEq . T } The comparison must satisf...
249aba1326084d9975277de8d8544d68d3e05d30563d2d04686ac33a27a2c1f4
swiftbiosciences/primerclip
Paths_primerclip.hs
# LANGUAGE CPP # # OPTIONS_GHC -fno - warn - missing - import - lists # # OPTIONS_GHC -fno - warn - implicit - prelude # module Paths_primerclip ( version, getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception...
null
https://raw.githubusercontent.com/swiftbiosciences/primerclip/5742e717c2dc409a98c2c1691555c7175e83b4ca/.stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/primerclip-181230-5/autogen/Paths_primerclip.hs
haskell
# LANGUAGE CPP # # OPTIONS_GHC -fno - warn - missing - import - lists # # OPTIONS_GHC -fno - warn - implicit - prelude # module Paths_primerclip ( version, getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception...
302e675abc33dbab8545b2aa77567cb8fed0ea2eafbf748f129900b444aa9419
haskell-distributed/distributed-process-simplelocalnet
TestSimpleLocalnet.hs
import System.Environment (getArgs, getProgName) import Control.Distributed.Process (NodeId, Process, liftIO) import Control.Distributed.Process.Node (initRemoteTable) import Control.Distributed.Process.Backend.SimpleLocalnet master :: Backend -> [NodeId] -> Process () master backend slaves = do liftIO . putStrLn $ ...
null
https://raw.githubusercontent.com/haskell-distributed/distributed-process-simplelocalnet/19bf1aa512af7a337e095d3813371158d5677373/tests/TestSimpleLocalnet.hs
haskell
import System.Environment (getArgs, getProgName) import Control.Distributed.Process (NodeId, Process, liftIO) import Control.Distributed.Process.Node (initRemoteTable) import Control.Distributed.Process.Backend.SimpleLocalnet master :: Backend -> [NodeId] -> Process () master backend slaves = do liftIO . putStrLn $ ...
08c82e27ef74429d5fc370951b4380b99d1cb61903124d90724d2e37e4692a1a
btmura/b1
ResourcesTest.hs
module B1.Program.Chart.ResourcesTest ( getTestGroup ) where import Data.Maybe import Graphics.Rendering.FTGL import Graphics.Rendering.OpenGL import Graphics.UI.GLFW import Test.Framework import Test.Framework.Providers.HUnit import Test.HUnit import B1.Control.TaskManager import B1.Graphics.Rendering.OpenGL.Buf...
null
https://raw.githubusercontent.com/btmura/b1/9cf0514ba1e03e9f4da05be9231acde07b199864/tests/B1/Program/Chart/ResourcesTest.hs
haskell
module B1.Program.Chart.ResourcesTest ( getTestGroup ) where import Data.Maybe import Graphics.Rendering.FTGL import Graphics.Rendering.OpenGL import Graphics.UI.GLFW import Test.Framework import Test.Framework.Providers.HUnit import Test.HUnit import B1.Control.TaskManager import B1.Graphics.Rendering.OpenGL.Buf...
a670dfa603e25e6fed5a1357e3b30d2ec6419a795c69303ec1358bb39be5bf18
heraldry/heraldicon
preload.cljs
(ns heraldicon.frontend.preload (:require [devtools.core :as devtools])) (defn- setup-devtools [] (let [{:keys [cljs-land-style]} (devtools/get-prefs)] (devtools/set-pref! :cljs-land-style (str "filter:invert(1);" cljs-land-style))) (devtools/install!)) (setup-devtools)
null
https://raw.githubusercontent.com/heraldry/heraldicon/251a89a8ded67e07ade4f0683fa10b1d10ff0f47/src/heraldicon/frontend/preload.cljs
clojure
(ns heraldicon.frontend.preload (:require [devtools.core :as devtools])) (defn- setup-devtools [] (let [{:keys [cljs-land-style]} (devtools/get-prefs)] (devtools/set-pref! :cljs-land-style (str "filter:invert(1);" cljs-land-style))) (devtools/install!)) (setup-devtools)
92a29f0e29c358397fc0874f77e80530061016afa29301c745b42976f378538c
samply/blaze
stratifier_spec.clj
(ns blaze.fhir.operation.evaluate-measure.measure.stratifier-spec (:require [blaze.fhir.operation.evaluate-measure.cql-spec] [blaze.fhir.operation.evaluate-measure.measure.spec] [blaze.fhir.operation.evaluate-measure.measure.stratifier :as stratifier] [blaze.fhir.operation.evaluate-measure.measure.str...
null
https://raw.githubusercontent.com/samply/blaze/5a2b8d59a7a66f9e53d4550fdd2b10f4d0b4337d/modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure/measure/stratifier_spec.clj
clojure
(ns blaze.fhir.operation.evaluate-measure.measure.stratifier-spec (:require [blaze.fhir.operation.evaluate-measure.cql-spec] [blaze.fhir.operation.evaluate-measure.measure.spec] [blaze.fhir.operation.evaluate-measure.measure.stratifier :as stratifier] [blaze.fhir.operation.evaluate-measure.measure.str...
e087fde350b20eabd910c9389c2578b17cb7c8e0f430d18db9c9bb7e38854a5b
pablo-meier/ScrabbleCheat
move_tests.erl
-module(move_tests). -include_lib("eunit/include/eunit.hrl"). -import(move, [duplicate_moves/2, score/3, new_move/0, add_to_move/2]). -import(lists, [foldl/3]). -import(board, [place_word/4]). -import(game_parser, [new_board/0]). setup() -> case whereis(gameinfos)...
null
https://raw.githubusercontent.com/pablo-meier/ScrabbleCheat/718cb768a910f2ba7ca6cd1d2aae0e342849bf0a/code/server/test/eunit/move_tests.erl
erlang
-module(move_tests). -include_lib("eunit/include/eunit.hrl"). -import(move, [duplicate_moves/2, score/3, new_move/0, add_to_move/2]). -import(lists, [foldl/3]). -import(board, [place_word/4]). -import(game_parser, [new_board/0]). setup() -> case whereis(gameinfos)...
9971d08885fd297cd08d3f9c6c2771f0b018899172f0276fc82a10ad50bea80d
gilith/hol-light
word.ml
(* ========================================================================= *) (* PARAMETRIC THEORY OF WORDS *) (* ========================================================================= *) (* -----------...
null
https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/opentheory/theories/word/word.ml
ocaml
========================================================================= PARAMETRIC THEORY OF WORDS ========================================================================= ------------------------------------------------------------------------- Theory requirem...
import_theories ["base"; "probability"; "natural-bits"; "natural-divides"];; needs "opentheory/theories/tools.ml";; export_interpretation "opentheory/theories/word/word.int";; Parametric theory witness . ...
1531a5efe6af318a69dfe15f07eb4ed1f99e91d152716de53f1ccf97ef2365d6
djblue/portal
charts.cljs
(ns portal.ui.viewer.charts (:require [clojure.spec.alpha :as sp] [portal.colors :as c] [portal.ui.theme :as theme] [portal.ui.viewer.vega-lite :as v])) ;; collection of maps of [{:x 0 :y 0} ...] maps (sp/def :tabular/x number?) (sp/def :tabular/y number?) (sp/def ::data (sp/key...
null
https://raw.githubusercontent.com/djblue/portal/29ed9bc6f6f202d4af1ae331d65f724abf518cd0/src/portal/ui/viewer/charts.cljs
clojure
collection of maps of [{:x 0 :y 0} ...] maps
(ns portal.ui.viewer.charts (:require [clojure.spec.alpha :as sp] [portal.colors :as c] [portal.ui.theme :as theme] [portal.ui.viewer.vega-lite :as v])) (sp/def :tabular/x number?) (sp/def :tabular/y number?) (sp/def ::data (sp/keys :req-un [:tabular/x :tabular/y])) (sp/def ::ta...
507576bfdd1ed36a7c331894531d41211d9e3df4e57f9109181dd6270eac6859
bcc32/advent-of-code
b.ml
open! Core type event = Garbage let parse input ~f = let index = ref 0 in let peek () = if !index < String.length input then Some input.[!index] else None in let advance () = incr index in let rec item () = match peek () with | None -> raise_s [%message "unexpected EOF"] | Some '!' -> advanc...
null
https://raw.githubusercontent.com/bcc32/advent-of-code/653c0f130e2fb2f599d4e76804e02af54c9bb19f/2017/09/b.ml
ocaml
open! Core type event = Garbage let parse input ~f = let index = ref 0 in let peek () = if !index < String.length input then Some input.[!index] else None in let advance () = incr index in let rec item () = match peek () with | None -> raise_s [%message "unexpected EOF"] | Some '!' -> advanc...
c1d5fdc8dae3ab5b61dd4c7bd44d866d8ac9b8d6f3065e91f09a9a9968be00a3
8c6794b6/guile-tjit
t-tail-call-05.scm
;;; Nested tail-call loop, calling the callee twice. Similar to ;;; `t-tail-call-04.scm', difference is the `call' in `f2' uses ;;; different local to hold procedure `f1'. (define (f1 n acc) (if (= n 0) acc (f1 (- n 1) (+ acc n)))) (define (f2 n) (let lp ((n n) (acc 0)) (if (= n 0) acc ...
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-tail-call-05.scm
scheme
Nested tail-call loop, calling the callee twice. Similar to `t-tail-call-04.scm', difference is the `call' in `f2' uses different local to hold procedure `f1'.
(define (f1 n acc) (if (= n 0) acc (f1 (- n 1) (+ acc n)))) (define (f2 n) (let lp ((n n) (acc 0)) (if (= n 0) acc (lp (- n 1) (f1 n (f1 n acc)))))) (f2 100)
aa1fe260945b6777364b7294cfbd037ecc84717060c8581202c01cbbde4f6dde
jgrodziski/metav
display.clj
(ns metav.cli.display (:require [clojure.spec.alpha :as s] [clojure.tools.logging :as log] [clojure.string :as string] [metav.cli.common :as cli-common] [metav.api :as api])) (def cli-options (conj cli-common/cli-options ["-f" "--output-format FORMAT" "Output format (edn, json, tab)" ...
null
https://raw.githubusercontent.com/jgrodziski/metav/23ac1c0f865d853fe60acad4e0ef780bc96efef7/src/metav/cli/display.clj
clojure
(ns metav.cli.display (:require [clojure.spec.alpha :as s] [clojure.tools.logging :as log] [clojure.string :as string] [metav.cli.common :as cli-common] [metav.api :as api])) (def cli-options (conj cli-common/cli-options ["-f" "--output-format FORMAT" "Output format (edn, json, tab)" ...
d84b83a0f3c234a6acb21d010e10982b8e0612a06ba881d543f3beed9a8127df
ocsigen/lwt
lwt.ml
This file is part of Lwt , released under the MIT license . See LICENSE.md for details , or visit . details, or visit . *) Reading guide Welcome to the implementation of the Lwt core ! This is a big file , but we hope that reading it ( parts at a time ! ) will not be scary :) Here is why : ...
null
https://raw.githubusercontent.com/ocsigen/lwt/cc05e2bda6c34126a3fd8d150ee7cddb3b8a440b/src/core/lwt.ml
ocaml
Promises proper. Note: A promise whose state is [Proxy _] is a "proxy" promise. A promise whose state is *not* [Proxy _] is an "underlying" promise. The "underlying promise of [p]" is: - [p], if [p] is itself underlying. - Otherwise, [p] is a proxy and has state [Proxy p']. The underlying...
This file is part of Lwt , released under the MIT license . See LICENSE.md for details , or visit . details, or visit . *) Reading guide Welcome to the implementation of the Lwt core ! This is a big file , but we hope that reading it ( parts at a time ! ) will not be scary :) Here is why : ...
d7fff538b5091e50fe0899749a78fc1faf5a8bb7bd5f9809a4504e67b5ef019f
mirage/alcotest
test.ml
* Copyright ( c ) 2013 - 2016 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND...
null
https://raw.githubusercontent.com/mirage/alcotest/faa683b8074dc86ea75a455201d0461eb1d0dc46/src/alcotest-engine/test.ml
ocaml
compare infinities Flush any test stdout preceding the assert
* Copyright ( c ) 2013 - 2016 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND...
7a1c56dbf7df9e3dd564ff5f58126fbc2e87c4a767941547ee137d08b63ad6a5
acieroid/scala-am
icp_1c_multiple-dwelling-coarse.scm
;; ;;toegevoegd ;; (define true #t) (define false #f) ;; zie deel 1a p. 37 ;; (define (apply-in-underlying-scheme proc args) (cond ((null? args) (proc)) ((null? (cdr args)) (proc (car args))) ((null? (cddr args)) (proc (car args) (cadr args))) ((null? (cdddr args)) (proc (car args) (cadr args) (cad...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/changes/scheme/icp_1c_multiple-dwelling-coarse.scm
scheme
toegevoegd more primitives <=============================================================================================
(define true #t) (define false #f) zie deel 1a p. 37 (define (apply-in-underlying-scheme proc args) (cond ((null? args) (proc)) ((null? (cdr args)) (proc (car args))) ((null? (cddr args)) (proc (car args) (cadr args))) ((null? (cdddr args)) (proc (car args) (cadr args) (caddr args))) ((null? (c...
fbacc66fed0ebffbe9589c6cb708c8b81bdf2ffb6dee2e702bbe17b03a81d6f4
aharisu/Gauche-CV
genstub.scm
;;; genstub - simple stub generator for Gauche ;;; Copyright ( c ) 2000 - 2010 < > ;;; ;;; 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 re...
null
https://raw.githubusercontent.com/aharisu/Gauche-CV/5e4c51501431c72270765121ea4d92693f11d60b/script/genstub.scm
scheme
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistribu...
genstub - simple stub generator for Gauche Copyright ( c ) 2000 - 2010 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING ...
252ddea065377aec92cd79c010745e84a33b4add2b60fa5ffa00a52b8161fe35
ml4tp/tcoq
constr.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/kernel/constr.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * infer printing form from number of...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This file defines the most ...
f575b266f400275d5abeee0f13d97e76ed278a7bebcb2af45aa2f8317c01c3c8
szynwelski/nlambda
Variants.hs
module Nominal.Variants ( Variants, variant, fromVariant, iteV, toList, fromList, satisfying, Nominal.Variants.map, prod, readVariant, variantsRelation) where import Control.Applicative ((<*>)) import Data.Functor ((<$>)) import Data.List.Utils (join) import Data.Map (Map) import qualified Data.Map as Map import Nomin...
null
https://raw.githubusercontent.com/szynwelski/nlambda/8357a5f661180438ca6f08104b3f3395d157c0c2/src/Nominal/Variants.hs
haskell
-------------------------------------------------------------------------------------------------- Variants -------------------------------------------------------------------------------------------------- | Storing values under various mutually exclusive conditions. | Creates a single variant. --------------------...
module Nominal.Variants ( Variants, variant, fromVariant, iteV, toList, fromList, satisfying, Nominal.Variants.map, prod, readVariant, variantsRelation) where import Control.Applicative ((<*>)) import Data.Functor ((<$>)) import Data.List.Utils (join) import Data.Map (Map) import qualified Data.Map as Map import Nomin...
52908e7cc04c8bd137fb772c721256fdeba7832ce9b12f7253b49938f5654d02
soulomoon/haskell-katas
PC.hs
# LANGUAGE ScopedTypeVariables # module Katas.PC where import Kyu1.PC import Test.Hspec import Test.QuickCheck import System.Timeout import Data.Proxy test :: (Nat n, Num n, Eq n, Show n) => Proxy n -> Spec test (p :: Proxy n) = do it "0 + x = x" $ property (\(NonNegative x) -> 0 + from x == from x) it "succe...
null
https://raw.githubusercontent.com/soulomoon/haskell-katas/0861338e945e5cbaadf98138cf8f5f24a6ca8bb3/test/Katas/PC.hs
haskell
# LANGUAGE ScopedTypeVariables # module Katas.PC where import Kyu1.PC import Test.Hspec import Test.QuickCheck import System.Timeout import Data.Proxy test :: (Nat n, Num n, Eq n, Show n) => Proxy n -> Spec test (p :: Proxy n) = do it "0 + x = x" $ property (\(NonNegative x) -> 0 + from x == from x) it "succe...