_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
538d8610b71c07e62e94157944252e00d5f58f3c9a5093142e0b49c4f3f3d25a
rvantonder/CryptOSS
record.ml
open Core type t = { date : Date.t ; cryptocurrency_name : string ; repo_name : string ; is_forked : string ; language : string ; last_updated : string ; commits_24h : int ; commits_7d : int ; changes_24h_loc_added : int ; changes_24h_loc_removed : int ; changes_7d_loc_added : int ; changes_7d_...
null
https://raw.githubusercontent.com/rvantonder/CryptOSS/acd931433f70fd097930b2e62a294af6d31a2a77/xsanitizer/record.ml
ocaml
with fin data without fin data
open Core type t = { date : Date.t ; cryptocurrency_name : string ; repo_name : string ; is_forked : string ; language : string ; last_updated : string ; commits_24h : int ; commits_7d : int ; changes_24h_loc_added : int ; changes_24h_loc_removed : int ; changes_7d_loc_added : int ; changes_7d_...
14250aa41d0966e0658ac5c85f2b790ccbcc1970e5b3b7fcc439bc61ea107170
hodur-org/hodur-example-app
visualizer.cljs
(ns hodur-example-app.visualizer (:require [hodur-engine.core :as engine] [hodur-example-app.schemas :as schemas] [hodur-visualizer-schema.core :as visualizer])) (def meta-db (engine/init-schema schemas/shared schemas/lacinia-pagination schemas/la...
null
https://raw.githubusercontent.com/hodur-org/hodur-example-app/e327080de31ecbd32319794eec84b38f0bd5ec41/src/hodur_example_app/visualizer.cljs
clojure
(ns hodur-example-app.visualizer (:require [hodur-engine.core :as engine] [hodur-example-app.schemas :as schemas] [hodur-visualizer-schema.core :as visualizer])) (def meta-db (engine/init-schema schemas/shared schemas/lacinia-pagination schemas/la...
72415c6698500dfa1d0078c6d804d051a2d3c6e97a16071694f8d0f66a2e5370
triffon/fp-2022-23
17-shortest-path.rkt
#lang racket ;; TODO: решение от лекции
null
https://raw.githubusercontent.com/triffon/fp-2022-23/c6f5ed7264fcd8988cf29f2d04fda64faa8c8562/exercises/inf2/08/17-shortest-path.rkt
racket
TODO: решение от лекции
#lang racket
da868c2d982c52dee2440e395d26276067d1dc3118a886334614c60fb10e1d8f
bcc32/projecteuler-ocaml
sol_205.ml
open! Core open! Import type dist = Percent.t Map.M(Int).t let empty_dist : dist = Map.of_alist_exn (module Int) [ 0, Percent.of_mult 1.0 ] let shift_n dist ~n : dist = let comparator = Map.comparator dist in Map.to_alist dist |> List.map ~f:(Tuple2.map_fst ~f:(( + ) n)) |> Map.Using_comparator.of_alist_exn ...
null
https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/712f85902c70adc1ec13dcbbee456c8bfa8450b2/sol/sol_205.ml
ocaml
open! Core open! Import type dist = Percent.t Map.M(Int).t let empty_dist : dist = Map.of_alist_exn (module Int) [ 0, Percent.of_mult 1.0 ] let shift_n dist ~n : dist = let comparator = Map.comparator dist in Map.to_alist dist |> List.map ~f:(Tuple2.map_fst ~f:(( + ) n)) |> Map.Using_comparator.of_alist_exn ...
4422b30de7ca6445fce452891f4392bccbd6dfed7c8d5beb70b0b31e24dcde80
FreeProving/language-coq
FreeVars.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # For TypeError # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - orphans # module Language.Coq.FreeVars ( -- * Constraint synonyms FreeVars -- ...
null
https://raw.githubusercontent.com/FreeProving/language-coq/99877c7f3596cd86bbec1b2a8af960252a5402f5/src/lib/Language/Coq/FreeVars.hs
haskell
# LANGUAGE ConstraintKinds # * Constraint synonyms * Main query functions Note [Bound variables in patterns] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We cannot quite capture /all/ the free variables that occur in patterns. The like a variable used as a binder in a pattern. So what do we do? The answer same problem, ...
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # For TypeError # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - orphans # module Language.Coq.FreeVars FreeVars , getFreeVars , getFreeVars' , definedBy , NoBinding(..) ) ...
68b305524a0bc0ab03b238a50ffc7b937d71f454680903fa36d244b1bbd512ad
fukamachi/clozure-cl
faslenv.lisp
-*- Mode : Lisp ; Package : CCL -*- ;;; Copyright ( C ) 2009 Clozure Associates Copyright ( C ) 1994 - 2001 Digitool , Inc This file is part of Clozure CL . ;;; Clozure CL is licensed under the terms of the Lisp Lesser GNU Public License , known as the LLGPL and distributed with Clozure CL as the ...
null
https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/xdump/faslenv.lisp
lisp
Package : CCL -*- file "LICENSE". The LLGPL consists of a preamble and the LGPL, conflict, the preamble takes precedence. Clozure CL is referenced in the preamble as the "LIBRARY." The LLGPL is also available online at Compile-time environment for fasl dumper/loader. loader state istruct <nada...
Copyright ( C ) 2009 Clozure Associates Copyright ( C ) 1994 - 2001 Digitool , Inc This file is part of Clozure CL . Clozure CL is licensed under the terms of the Lisp Lesser GNU Public License , known as the LLGPL and distributed with Clozure CL as the which is distributed with Clozure CL as ...
8f7a04dd21d1b6d04f19cf24b26ad2fd6169e1dfdc8da0c66202ab9f58d4a52d
clojure-link/link
project.clj
(def netty-version "4.1.61.Final") (def example-base-command ["trampoline" "with-profile" "default,example" "run" "-m"]) (defproject link "0.12.8-SNAPSHOT" :description "A clojure framework for nonblocking network programming" :url "" :license {:name "Eclipse Public License - v 1.0" :url "-v10.htm...
null
https://raw.githubusercontent.com/clojure-link/link/e6844b1cb67c5201907debd65c8de1b5e2454da1/project.clj
clojure
(def netty-version "4.1.61.Final") (def example-base-command ["trampoline" "with-profile" "default,example" "run" "-m"]) (defproject link "0.12.8-SNAPSHOT" :description "A clojure framework for nonblocking network programming" :url "" :license {:name "Eclipse Public License - v 1.0" :url "-v10.htm...
959868e14a497d4cd795397fe21cca2985f5343c95e8829b73827e594683b7bb
jpmonettas/clindex
schema.clj
(ns clindex.schema) (def schema { ;;;;;;;;;;;;;; ;; Projects ;; ;;;;;;;;;;;;;; ;; A symbol with the project name for named dependencies or clindex/main-project for the project ;; being analyzed :project/name {:db/cardinality :db.cardinality/one} The project version as a string ( only ...
null
https://raw.githubusercontent.com/jpmonettas/clindex/77097d80a23aa85d2ff50e55645a1452f2dcb3c0/src/clindex/schema.clj
clojure
Projects ;; A symbol with the project name for named dependencies or clindex/main-project for the project being analyzed A collection of references to other projects which this one depends on A collection of references to namespaces this project contains Files ;; A string with the file name, can be a local f...
(ns clindex.schema) (def schema { :project/name {:db/cardinality :db.cardinality/one} The project version as a string ( only maven version now ) :project/version {:db/cardinality :db.cardinality/one} :project/depends {:db/valueType :db.type/ref :db/cardinality :db.cardinality/ma...
5f5f0271b841ba1547167b8ba030a1cce76ae754fb079fe0dad68c840b03a71c
mini-monkey/mini-monkey
minimal_SUITE.erl
-module(minimal_SUITE). -include_lib("common_test/include/ct.hrl"). -import(mm_test_tokens, [god_token/0]). -import(mm_test_common, [setup/0]). -export([all/0]). -export([test_failed_auth/1, test_god_token_auth/1, test_successful_auth/1]). all() -> [test_failed_auth, test_god_token_auth, test_successful_aut...
null
https://raw.githubusercontent.com/mini-monkey/mini-monkey/4afa4385256c0f1d23db522c0725c3291a8c86c8/test/minimal_SUITE.erl
erlang
-module(minimal_SUITE). -include_lib("common_test/include/ct.hrl"). -import(mm_test_tokens, [god_token/0]). -import(mm_test_common, [setup/0]). -export([all/0]). -export([test_failed_auth/1, test_god_token_auth/1, test_successful_auth/1]). all() -> [test_failed_auth, test_god_token_auth, test_successful_aut...
a91d065c2fa95af6af759fa648e4afc8b10e222f49f7be586369409f2ed84500
emilaxelsson/syntactic
Tests.hs
import Test.Tasty import qualified AlgorithmTests import qualified NanoFeldsparTests import qualified WellScopedTests import qualified MonadTests import qualified SyntaxTests import qualified TH tests = testGroup "AllTests" [ SyntaxTests.tests , AlgorithmTests.tests , NanoFeldsparTests.tests , WellSco...
null
https://raw.githubusercontent.com/emilaxelsson/syntactic/c51258ed96d4e9704e5842ce15667e7d3e5b77d7/tests/Tests.hs
haskell
import Test.Tasty import qualified AlgorithmTests import qualified NanoFeldsparTests import qualified WellScopedTests import qualified MonadTests import qualified SyntaxTests import qualified TH tests = testGroup "AllTests" [ SyntaxTests.tests , AlgorithmTests.tests , NanoFeldsparTests.tests , WellSco...
902979c20fa5da60edf5eaa896e3e4812778f8189243a9a46de4cdaeb807364b
jkrukoff/llists
lfiles.erl
%%%------------------------------------------------------------------- %%% @doc %%% A lazily evaluated file module. This module provides replicas of %%% functions from the kernel `file' and stdlib `io' modules designed %%% to work with iterators as defined by the `llists' module. %%% %%% All iterators created by this m...
null
https://raw.githubusercontent.com/jkrukoff/llists/2e9b756b81ff85d7e6230612c065aceb9ebed4b4/src/lfiles.erl
erlang
------------------------------------------------------------------- @doc A lazily evaluated file module. This module provides replicas of functions from the kernel `file' and stdlib `io' modules designed to work with iterators as defined by the `llists' module. All iterators created by this module work by side ef...
-module(lfiles). -export([ Iterator construction . read/2, get_chars/3, read_line/1, get_line/2, write/2, put_chars/2 ]). referenced by ` IODevice ' of approximately ` Number ' -spec read(IODevice, Number) -> Iterator when IODevice :: file:io_device(), Number :: non_neg_integer()...
5230d798dbde1491cc2139b7eae4c49d04de01cd2d9a2a4cc1308c1f9da11a23
typelead/eta
T1470.hs
{ - # OPTIONS_GHC -fno - warn - redundant - constraints # - } # LANGUAGE MultiParamTypeClasses , FlexibleContexts , FlexibleInstances , UndecidableInstances , KindSignatures # -- Trac #1470 module Foo where class Sat a class Data (ctx :: * -> *) a instance Sat (ctx Char) => Data ctx Char instance (Sat...
null
https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/compile/T1470.hs
haskell
Trac #1470 # OVERLAPPABLE # # OVERLAPS # # OVERLAPPING # We have this We have this
{ - # OPTIONS_GHC -fno - warn - redundant - constraints # - } # LANGUAGE MultiParamTypeClasses , FlexibleContexts , FlexibleInstances , UndecidableInstances , KindSignatures # module Foo where class Sat a class Data (ctx :: * -> *) a instance Sat (ctx Char) => Data ctx Char instance (Sat (ctx [a]), Da...
c2c78ce39b78906cb8f1e2b28f8fcda6854c2138b2d684ae00b64c65c93da6a5
fwcd/curry-language-server
CodeAction.hs
# LANGUAGE FlexibleInstances , OverloadedStrings # module Curry.LanguageServer.Handlers.CodeAction (codeActionHandler) where Curry Compiler Libraries + Dependencies import qualified Curry.Syntax as CS import qualified Base.Types as CT import Control.Lens ((^.)) import Control.Monad (guard) import Control.Monad.IO.C...
null
https://raw.githubusercontent.com/fwcd/curry-language-server/915cd2e82381612c93b220263429304017a24084/src/Curry/LanguageServer/Handlers/CodeAction.hs
haskell
TODO: Attach diagnostics, ideally the frontend could emit these quick fixes along with the warning messages? TODO: Move the command identifier ('decl.applyTypeHint') to some central place to avoid repetition.
# LANGUAGE FlexibleInstances , OverloadedStrings # module Curry.LanguageServer.Handlers.CodeAction (codeActionHandler) where Curry Compiler Libraries + Dependencies import qualified Curry.Syntax as CS import qualified Base.Types as CT import Control.Lens ((^.)) import Control.Monad (guard) import Control.Monad.IO.C...
442ccc26366fa3d2f84f58e71708725a55b2d200da43918661ed4feda48d3e62
fukamachi/safety-params
number.lisp
(defpackage #:safety-params/fn/number (:use #:cl) (:import-from #:alexandria #:positive-integer-p #:negative-integer-p #:positive-float-p #:negative-float-p) (:export #:integerp #:positive-integer-p #:negative-integer-p ...
null
https://raw.githubusercontent.com/fukamachi/safety-params/13e30916dfce130a6b35c22cd7969a9cba20a8f0/src/fn/number.lisp
lisp
(defpackage #:safety-params/fn/number (:use #:cl) (:import-from #:alexandria #:positive-integer-p #:negative-integer-p #:positive-float-p #:negative-float-p) (:export #:integerp #:positive-integer-p #:negative-integer-p ...
31d11fefda1b3ac05055b2901caf303773ef4ff0d7242d12e8777af9e2ee160f
min-nguyen/prob-fx
Main.hs
module Main (main) where import SIR import LinRegr import LDA import Test.Expected import Test.HUnit import Sampler import System.Exit testSimLinRegr :: Test testSimLinRegr = TestCase $ do output <- sampleIOFixed simulateLinRegr assertEqual "Testing simulateLinRegr" simLinRegrExpected output testLwLinRegr :: Te...
null
https://raw.githubusercontent.com/min-nguyen/prob-fx/870a341f344638887ac63f6e6f7e3a352a03ef62/examples/Test/Main.hs
haskell
module Main (main) where import SIR import LinRegr import LDA import Test.Expected import Test.HUnit import Sampler import System.Exit testSimLinRegr :: Test testSimLinRegr = TestCase $ do output <- sampleIOFixed simulateLinRegr assertEqual "Testing simulateLinRegr" simLinRegrExpected output testLwLinRegr :: Te...
32fbf9f05f475185aee3baa7dc7df6eda137661d15441ba68b9da80e551d7e24
show-matz/CL-STL
cl-stl-move-iterator.lisp
(in-package :cl-stl) #-cl-stl-0x98 (declaim (inline make_move_iterator)) ;;------------------------------------------------------------------------------ ;; ;; move iterator classes ;; ;;------------------------------------------------------------------------------ #-cl-stl-0x98 (progn (defclass move-iterator_in ...
null
https://raw.githubusercontent.com/show-matz/CL-STL/c6ffeac2815fa933121bc4c8b331d9c3516dff88/src/cl-stl-move-iterator.lisp
lisp
------------------------------------------------------------------------------ move iterator classes ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----------------------------------------------------------...
(in-package :cl-stl) #-cl-stl-0x98 (declaim (inline make_move_iterator)) #-cl-stl-0x98 (progn (defclass move-iterator_in (input_iterator) ((itr :initform nil :initarg :iterator :accessor __moveitr-iterator) (rm :type :remove-reference :initarg :rm-ref :accessor __moveitr-rm-ref))) ...
c3170866077e6b477b847416d2425e57fa067527ac0dd10d0f560c621c537479
conal/Fran
Force.hs
The Forceable class containing just one function force . This provides hyperstrict evaluation by forcing the whole data structure to normal form as opposed to just whnf . It is normally used in conjunction with seq , e.g. force x ` seq ` E to ensure that x is evaluated to normal form befo...
null
https://raw.githubusercontent.com/conal/Fran/a113693cfab23f9ac9704cfee9c610c5edc13d9d/src/Force.hs
haskell
Does not force x until x is needed , probably not useful . Does not force x until x is needed, probably not useful. force : : a - > a force :: a -> a
The Forceable class containing just one function force . This provides hyperstrict evaluation by forcing the whole data structure to normal form as opposed to just whnf . It is normally used in conjunction with seq , e.g. force x ` seq ` E to ensure that x is evaluated to normal form befo...
d3895fdb27e38c42e0695752bd717a2ac315eb9fc4efecb5215c1374d3686522
day8/re-com
throbber.cljs
(ns re-demo.throbber (:require [re-com.core :refer [at h-box v-box box gap line button label throbber p]] [re-com.throbber :refer [throbber-parts-desc throbber-args-desc]] [re-demo.utils :refer [panel-title title2 title3 parts-table args-table github-hyperlink status-text]] [...
null
https://raw.githubusercontent.com/day8/re-com/07451b1d19c59eb185548efe93e2d00b5d3eab89/src/re_demo/throbber.cljs
clojure
(ns re-demo.throbber (:require [re-com.core :refer [at h-box v-box box gap line button label throbber p]] [re-com.throbber :refer [throbber-parts-desc throbber-args-desc]] [re-demo.utils :refer [panel-title title2 title3 parts-table args-table github-hyperlink status-text]] [...
aaeeb6f0a9bb6ef1eb3b1fc44959cb85683f3e256c3d395f7896c0cea662b8ef
heechul/crest-z3
mergecil.mli
* * Copyright ( c ) 2001 - 2002 , * < > * < > * < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are * met : * * 1 . Redistributions...
null
https://raw.githubusercontent.com/heechul/crest-z3/cfcebadddb5e9d69e9956644fc37b46f6c2a21a0/cil/src/mergecil.mli
ocaml
* Set this to true to ignore the merge conflicts * Merge a number of CIL files
* * Copyright ( c ) 2001 - 2002 , * < > * < > * < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are * met : * * 1 . Redistributions...
4ce743e9c5be6d75fe3a61862eb775b5eacfa70194246e7ad5d5d5e0426e7cc5
uncomplicate/fluokitten
algo.clj
Copyright ( c ) . All rights reserved . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) or later ;; which can be found in the file LICENSE at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be boun...
null
https://raw.githubusercontent.com/uncomplicate/fluokitten/65dc74881533a202871d9235c52db89c26c0d41d/src/uncomplicate/fluokitten/algo.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) or later which can be found in the file LICENSE at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not rem...
Copyright ( c ) . All rights reserved . (ns uncomplicate.fluokitten.algo (:require [clojure.string :as cs] [uncomplicate.fluokitten [protocols :refer :all] [utils :refer [with-context deref?]]]) (:require [clojure.core.reducers :as r])) (defn default-foldmap ([x g] ...
86f45df2453f6806301afe65af661a79b3211f1ac10111f572734545c52fae62
andersfugmann/amqp-client
thread.ml
module type T = sig module Deferred : sig type 'a t val all_unit : unit t list -> unit t val try_with : (unit -> 'a t) -> [> `Error of exn | `Ok of 'a ] t module List : sig val init : f:(int -> 'a t) -> int -> 'a list t val iter : ?how:[`Sequential | `Parallel] -> f:('a -> unit t) -> 'a l...
null
https://raw.githubusercontent.com/andersfugmann/amqp-client/e6e92225b91742fa8777a02ad9b59a1dde45e752/lib/thread.ml
ocaml
module type T = sig module Deferred : sig type 'a t val all_unit : unit t list -> unit t val try_with : (unit -> 'a t) -> [> `Error of exn | `Ok of 'a ] t module List : sig val init : f:(int -> 'a t) -> int -> 'a list t val iter : ?how:[`Sequential | `Parallel] -> f:('a -> unit t) -> 'a l...
5524612d26e14e7e48b8c6ad60f775350e11f847cb64245f9d7a681332a3a4a7
mirage/ocaml-github
github_json.ml
Adapters used by atdgen to turn Github 's representation of variants into an ATD - compatible representation . Adapters used by atdgen to turn Github's representation of variants into an ATD-compatible representation. *) module Adapter = struct module Ref = Atdgen_runtime.Json_adapter.Type_and_v...
null
https://raw.githubusercontent.com/mirage/ocaml-github/304bd487620d3ea9486812047daf7b5062fc61e5/lib_data/github_json.ml
ocaml
Adapters used by atdgen to turn Github 's representation of variants into an ATD - compatible representation . Adapters used by atdgen to turn Github's representation of variants into an ATD-compatible representation. *) module Adapter = struct module Ref = Atdgen_runtime.Json_adapter.Type_and_v...
c3f23f5f0826a626f598060cd43f8cf55fff5008e5e3feea89731755bbb2f2d0
broadinstitute/firecloud-ui
user.cljs
(ns broadfcui.utils.user (:require [clojure.string :as string] [broadfcui.common :as common] [broadfcui.endpoints :as endpoints] [broadfcui.utils :as utils] )) (defonce ^:private user-listeners (atom {})) (defn add-user-listener [k on-change] (swap! user-listeners assoc k on-change)) (defn remove-u...
null
https://raw.githubusercontent.com/broadinstitute/firecloud-ui/8eb077bc137ead105db5665a8fa47a7523145633/src/cljs/main/broadfcui/utils/user.cljs
clojure
secure cookie initially false to disable redirects until profile is loaded
(ns broadfcui.utils.user (:require [clojure.string :as string] [broadfcui.common :as common] [broadfcui.endpoints :as endpoints] [broadfcui.utils :as utils] )) (defonce ^:private user-listeners (atom {})) (defn add-user-listener [k on-change] (swap! user-listeners assoc k on-change)) (defn remove-u...
244b4e41411d798a22f587025b983b673067bb7a7abd86fcd73b804c7e6b76cb
forward/incanter-BLAS
stats_tests.clj
core-test-cases.clj -- Unit tests of Incanter functions by October 31 , 2009 Copyright ( c ) , 2009 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse ;; Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this...
null
https://raw.githubusercontent.com/forward/incanter-BLAS/da48558cc9d8296b775d8e88de532a4897ee966e/src/test/clojure/incanter/stats_tests.clj
clojure
Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. to run these tests: (use 'tests core-t...
core-test-cases.clj -- Unit tests of Incanter functions by October 31 , 2009 Copyright ( c ) , 2009 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse (ns incanter.stats-tests (:use clojure.test (incanter core stats))) (def A (matrix ...
71817ede9ad6969579fb115479637773226a5619c7307a3d18f51aacdb7d67c7
tamarit/edd
miller_rabin.erl
-module(miller_rabin). -compile([export_all]). basis(N) when N>2 -> 1 + random:uniform(N-2). find_ds(D, S) -> case D rem 2 == 0 of true -> find_ds(trunc(D/2), S+1); false -> {D, S} end. find_ds(N) -> find_ds(N-1, 0). pow_mod(_B, 0, _M) -> 1; pow_mod(B...
null
https://raw.githubusercontent.com/tamarit/edd/867f287efe951bec6a8213743a218b86e4f5bbf7/examples/miller_rabin/miller_rabin.erl
erlang
RIGHT WRONG first_10() -> lists:map(fun(X) -> case is_prime(X) of true -> io:format("~w~n", [X]); false -> false end end, L), ...
-module(miller_rabin). -compile([export_all]). basis(N) when N>2 -> 1 + random:uniform(N-2). find_ds(D, S) -> case D rem 2 == 0 of true -> find_ds(trunc(D/2), S+1); false -> {D, S} end. find_ds(N) -> find_ds(N-1, 0). pow_mod(_B, 0, _M) -> 1; pow_mod(B...
9644ef6f063147e7dee6efd333343a3aa4a702c607b3241a2f0e2250a3365a41
racket/macro-debugger
steps.rkt
#lang racket/base (require racket/contract/base "stx-util.rkt") (provide (struct-out protostep) (struct-out step) (struct-out misstep) (struct-out remarkstep) (struct-out state) (struct-out bigframe) reduction-sequence/c context-fill state...
null
https://raw.githubusercontent.com/racket/macro-debugger/d4e2325e6d8eced81badf315048ff54f515110d5/macro-debugger-text-lib/macro-debugger/model/steps.rkt
racket
A Step is one of A Frame is (Syntax -> Syntax) context-fill : Context Syntax -> Syntax Kinds: rw=rewrite, sc=scope, tr=track, ac=action, er=error rw?
#lang racket/base (require racket/contract/base "stx-util.rkt") (provide (struct-out protostep) (struct-out step) (struct-out misstep) (struct-out remarkstep) (struct-out state) (struct-out bigframe) reduction-sequence/c context-fill state...
1cc35b3b8776f17ef83a48fdfd436525350c0be117f4e1b601b05fbadcf0e21d
avatar29A/hs-aitubots-api
Types.hs
module Aitu.Bot.Types ( module Types ) where -- Types import Aitu.Bot.Types.Audio as Types import Aitu.Bot.Types.Avatar as Types import Aitu.Bot.Types.Bot as Types import Aitu.Bot.Types.Contact as Types import Aitu.Bot.Types.D...
null
https://raw.githubusercontent.com/avatar29A/hs-aitubots-api/9cc3fd1e4e9e81491628741a6bbb68afbb85704e/src/Aitu/Bot/Types.hs
haskell
Types Updates Files
module Aitu.Bot.Types ( module Types ) where import Aitu.Bot.Types.Audio as Types import Aitu.Bot.Types.Avatar as Types import Aitu.Bot.Types.Bot as Types import Aitu.Bot.Types.Contact as Types import Aitu.Bot.Types.Document ...
452e695ce94f9b298715e5ab6843a5903a1ab972375e576952f7e4298f601b10
TorXakis/TorXakis
ControlLoop.hs
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} {-# LANGUAGE OverloadedStrings #-} modu...
null
https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/test/sqatt/src/ExploreModels/ControlLoop.hs
haskell
# LANGUAGE OverloadedStrings #
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} module ExploreModels.ControlLoop (examp...
6825f9e355de8d9d243ca7f0622bb588cbe63cc4362997587b0c5347a1512cdc
LambdaHack/LambdaHack
UIOptions.hs
# LANGUAGE DeriveGeneric # -- | UI client options specified in the config file. module Game.LambdaHack.Client.UI.UIOptions ( UIOptions(..) ) where import Prelude () import Game.LambdaHack.Core.Prelude import Control.DeepSeq import Data.Binary import GHC.Generics (Generic) import Game.LambdaHack.Client...
null
https://raw.githubusercontent.com/LambdaHack/LambdaHack/9dc1b41b756a8e98c157f0917a28abcc6703fb79/engine-src/Game/LambdaHack/Client/UI/UIOptions.hs
haskell
| UI client options specified in the config file. | Options that affect the UI of the client, specified in the config file. More documentation is in the default config file.
# LANGUAGE DeriveGeneric # module Game.LambdaHack.Client.UI.UIOptions ( UIOptions(..) ) where import Prelude () import Game.LambdaHack.Core.Prelude import Control.DeepSeq import Data.Binary import GHC.Generics (Generic) import Game.LambdaHack.Client.UI.HumanCmd import qualified Game.LambdaHack.Client....
cffc98cb5561a63daa895e7b357b2452b58c7a22bc26c25a6ac66bce5c054532
aiya000/haskell-examples
Main.hs
import Control.Zipper -- data Top data h i a -- data a :@ i -- type h :>> a = Zipper h Int a -- -- zipper :: a -> Top :>> a main :: IO () main = do print $ (rezip . zipper) 10
null
https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Control/Zipper/Main.hs
haskell
data Top data a :@ i type h :>> a = Zipper h Int a zipper :: a -> Top :>> a
import Control.Zipper data h i a main :: IO () main = do print $ (rezip . zipper) 10
0405d7c8307cef0320b5483134bd5014f8ebe5426fb54cdb0f01d13e86fb39f2
ocaml-multicore/tezos
proxy.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2020 Nomadic Labs , < > (* ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_011_PtHangz2/lib_client/proxy.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2020 Nomadic Labs , < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN A...
ccff23fddcc371bc1a2059aa99301944aeddeba5f50548e0261d357cd99750b2
green-labs/hands-on-clojure
solution.clj
(ns solution) (comment # 14 functions 8 # 16 hello world (fn [name] (str "Hello, " name "!")) # 17 map '(6 7 8) # 23 reverse a sequence (fn [sx] (reduce conj '() sx)) # 24 sum it all up (fn [sx] (apply + sx)) # 27 palindrom detector (fn [v] (= (vec v) (reverse (vec v)))) # 32 duplicate a seque...
null
https://raw.githubusercontent.com/green-labs/hands-on-clojure/a4770bf053591521d3c39270d5e054cbf1799720/src/solution.clj
clojure
(ns solution) (comment # 14 functions 8 # 16 hello world (fn [name] (str "Hello, " name "!")) # 17 map '(6 7 8) # 23 reverse a sequence (fn [sx] (reduce conj '() sx)) # 24 sum it all up (fn [sx] (apply + sx)) # 27 palindrom detector (fn [v] (= (vec v) (reverse (vec v)))) # 32 duplicate a seque...
788e7a147f2df3c534e951d2bfb785535283cd348327dc97194c130b830ce29b
beamjs/erlv8
gen_server2.erl
This file is a copy of gen_server.erl from the R13B-1 Erlang / OTP %% distribution, with the following modifications: %% 1 ) the module name is gen_server2 %% 2 ) more efficient handling of selective receives in callbacks %% gen_server2 processes drain their message queue into an internal %% buffer before invokin...
null
https://raw.githubusercontent.com/beamjs/erlv8/157a7db0a9c284ea1da107fe3272ff7b19813d26/src/gen_server2.erl
erlang
distribution, with the following modifications: gen_server2 processes drain their message queue into an internal buffer before invoking any callback module functions. Messages are dequeued from the buffer for processing. Thus the effective message queue of a gen_server2 process is the concatenation of the intern...
This file is a copy of gen_server.erl from the R13B-1 Erlang / OTP 1 ) the module name is gen_server2 2 ) more efficient handling of selective receives in callbacks 3 ) gen_server2 : cast is guaranteed to be order - preserving 4 ) The callback module can optionally implement prioritise_call/3 , Message , Fr...
06fcb02e5d0cb10e9e0294cf06c69b148d168852095c36bf9176b6557f2d317f
somnusand/Poker
hackney_connect.erl
%%% -*- erlang -*- %%% This file is part of hackney released under the Apache 2 license . %%% See the NOTICE for more information. %%% -module(hackney_connect). -export([connect/3, connect/4, connect/5, create_connection/4, create_connection/5, maybe_connect/1, reconnect/4, set_so...
null
https://raw.githubusercontent.com/somnusand/Poker/4934582a4a37f28c53108a6f6e09b55d21925ffa/server/deps/hackney/src/hackney_connect.erl
erlang
-*- erlang -*- See the NOTICE for more information. @doc create a connection and return a client state default timeout get mod metrics initial state if we use a pool then checkout the connection from the pool, else connect the socket to the remote @doc connect a socket and create a client state. the socke...
This file is part of hackney released under the Apache 2 license . -module(hackney_connect). -export([connect/3, connect/4, connect/5, create_connection/4, create_connection/5, maybe_connect/1, reconnect/4, set_sockopts/2, ssl_opts/2, check_or_close/1, c...
422d9409d860d7254579a82238f3edb89f5b89e592549665d991e9007837c086
ormf/cm
dk1-answers.lisp
(in-package :cm) ;;; Etude 1: Write a counterpoint receiver that plays back a ;;; transposed version of whatever the performer plays on the ;;; disklavier at a specified time interval in the future. (Risset) ( load " # P"/private / Network / Servers / camilx2.music.uiuc.edu / Users / Faculty / hkt/404b / " ) (set...
null
https://raw.githubusercontent.com/ormf/cm/26843eec009bd6c214992a8e67c49fffa16d9530/doc/404B-SoundSynth-AlgoComp/www-camil.music.uiuc.edu_16080/classes/404B/lisp/dk1-answers.lisp
lisp
Etude 1: Write a counterpoint receiver that plays back a transposed version of whatever the performer plays on the disklavier at a specified time interval in the future. (Risset) Etude 2: Change the receiver to play a "warped" (rescaled) version of the pianists input (Risset) Etude 3: Change the receiver to treat...
(in-package :cm) ( load " # P"/private / Network / Servers / camilx2.music.uiuc.edu / Users / Faculty / hkt/404b / " ) (setq *ms* (midishare-open)) (ms:output (ms:new typeNote :pitch 60 :vel 64 :dur 1000 :port *dk* :chan 0) *ms*) (ms:output (ms:new typeNote :pitch 60 :vel 64 :dur 1...
a9c24b3c1ce5ea1ae0aa7b7e911e73a38afb3a00a690157a1e9c0a336dc243e0
aeternity/aesophia
aeso_scan_lib.erl
%%% -*- erlang-indent-level:4; indent-tabs-mode: nil -*- %%%------------------------------------------------------------------- ( C ) 2017 , Aeternity Anstalt %%% @doc A customisable lexer. %%% @end %%%------------------------------------------------------------------- -module(aeso_scan_lib). -export([compile/1, st...
null
https://raw.githubusercontent.com/aeternity/aesophia/47878308619ea52197f9a35b2b924da704cbc544/src/aeso_scan_lib.erl
erlang
-*- erlang-indent-level:4; indent-tabs-mode: nil -*- ------------------------------------------------------------------- @doc A customisable lexer. @end ------------------------------------------------------------------- -- Exported types -- -- Internal types -- @doc Compile a lexer specification. Takes the regex...
( C ) 2017 , Aeternity Anstalt -module(aeso_scan_lib). -export([compile/1, string/3, token/1, token/2, symbol/0, skip/0, override/2, push/2, pop/1]). -export_type([lexer/0, token_spec/0, token_action/0, token/0, pos/0, regex/0]). -type regex() :: iodata() | unicode:charlist(). -type pos() ...
838a16366f03178581d3da7e9aa75b08e6f39109371f95f805b0eb3595348777
ocaml-obuild/obuild
c.ml
let foo = "B.C.foo"
null
https://raw.githubusercontent.com/ocaml-obuild/obuild/28252e8cee836448e85bfbc9e09a44e7674dae39/tests/full/autopack2/src/b/c.ml
ocaml
let foo = "B.C.foo"
f9b6cea60e0bb434eb6eb0c4ae56aff861c9914f5ab0f62aa0227bcf15599a6e
samply/blaze
spec.clj
(ns blaze.fhir.structure-definition-repo.spec (:require [blaze.fhir.structure-definition-repo.protocols :as p] [clojure.spec.alpha :as s])) (defn structure-definition-repo? [x] (satisfies? p/StructureDefinitionRepo x)) (s/def :blaze.fhir/structure-definition-repo structure-definition-repo?)
null
https://raw.githubusercontent.com/samply/blaze/ccfad24c890c25a87ba4e3cde035ba8dbfd4d239/modules/fhir-structure/src/blaze/fhir/structure_definition_repo/spec.clj
clojure
(ns blaze.fhir.structure-definition-repo.spec (:require [blaze.fhir.structure-definition-repo.protocols :as p] [clojure.spec.alpha :as s])) (defn structure-definition-repo? [x] (satisfies? p/StructureDefinitionRepo x)) (s/def :blaze.fhir/structure-definition-repo structure-definition-repo?)
ffe7e68103c4689b23d372104288fc703b884bc76bc98cafa1adb2c6824d5348
facebook/flow
parser_utils_output_printers_tests.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/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/parser_utils/output/printers/__tests__/parser_utils_output_printers_tests.ml
ocaml
* 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...
8f8de6a9470e5f24c3fd2824025a6633cc6fc689ea22f421d03865f3ec921c40
mbj/stratosphere
VpcConfigProperty.hs
module Stratosphere.SageMaker.DataQualityJobDefinition.VpcConfigProperty ( VpcConfigProperty(..), mkVpcConfigProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value dat...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/DataQualityJobDefinition/VpcConfigProperty.hs
haskell
module Stratosphere.SageMaker.DataQualityJobDefinition.VpcConfigProperty ( VpcConfigProperty(..), mkVpcConfigProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value dat...
fa21f4024f76fe7214268e938ed18b0fc24206259757ce44937141869650b7b6
heyoka/faxe
faxe.erl
Date : 28.04.17 - 23:17 %% faxe api Ⓒ 2017 -module(faxe). -author("Alexander Minichmair"). -include("faxe.hrl"). %% API -export([ register_task/3, register_file_task/2, register_string_task/2, list_tasks/0, start_task/1, start_task/2, stop_task/1, stop_task/2, delete_task/1, delete_...
null
https://raw.githubusercontent.com/heyoka/faxe/59b005aa82e99a130e8a07601ff365f1e540ce0a/apps/faxe/src/faxe.erl
erlang
faxe api API , do_start_task/2 @doc get the graph definition (nodes and edges) as a map flow_changed({flow, Name, register}), flow_changed({template, Name, delete}), @doc update all tasks that exist, use with care update group-members we use just the task-id to stop and restart the task...
Date : 28.04.17 - 23:17 Ⓒ 2017 -module(faxe). -author("Alexander Minichmair"). -include("faxe.hrl"). -export([ register_task/3, register_file_task/2, register_string_task/2, list_tasks/0, start_task/1, start_task/2, stop_task/1, stop_task/2, delete_task/1, delete_task/2, register...
926dcd828142024f166c2d8ce972a9b88e13a1a954c00093a8b58255159322a4
LuKC1024/stacker
io.rkt
#lang plait (define-type-alias Id Symbol) (define-type Constant (c-void) (c-str [it : String]) (c-num [it : Number]) (c-bool [it : Boolean]) (c-char [it : Char]) (c-vec [it : (Listof Constant)]) (c-list [it : (Listof Constant)])) (define-type-alias Program ((Listof Def) * (Listof Expr))) (define (program...
null
https://raw.githubusercontent.com/LuKC1024/stacker/46ccb39d3326c13fc7b0e65f4bb4253b9b71edd8/io.rkt
racket
#lang plait (define-type-alias Id Symbol) (define-type Constant (c-void) (c-str [it : String]) (c-num [it : Number]) (c-bool [it : Boolean]) (c-char [it : Char]) (c-vec [it : (Listof Constant)]) (c-list [it : (Listof Constant)])) (define-type-alias Program ((Listof Def) * (Listof Expr))) (define (program...
0d35824b4ba8c62aee673508405631db8da51676d7af640b0c346b2168ea5f1d
JustusAdam/language-haskell
Role.hs
SYNTAX TEST " source.haskell " " Role annotations " data A n r p where type role A nominal representational phantom ^^^^ keyword.other.type.haskell -- ^^^^ keyword.other.role.haskell ^ storage.type.haskell -- ^^^^^^^ keyword.other.role.nominal.haskell -- ...
null
https://raw.githubusercontent.com/JustusAdam/language-haskell/c9ee1b3ee166c44db9ce350920ba502fcc868245/test/tests/Role.hs
haskell
^^^^ keyword.other.role.haskell ^^^^^^^ keyword.other.role.nominal.haskell ^^^^^^^^^^^^^^^^ keyword.other.role.representational.haskell ^^^^^^^ keyword.other.role.phantom.haskell ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.role-an...
SYNTAX TEST " source.haskell " " Role annotations " data A n r p where type role A nominal representational phantom ^^^^ keyword.other.type.haskell ^ storage.type.haskell type role A ^^^^ keyword.other.type.haskell ^ storage.type.haskell nominal rep...
c389bdee5323b5cca27a0d09c0a7bf861ba23749c73f8da55a193830081a50c3
jacekschae/learn-pedestal-course-files
user.clj
(ns user (:require [io.pedestal.http :as http])) (defonce system-ref (atom nil)) (defn start-dev [] (reset! system-ref (-> {::http/routes #{} ::http/type :jetty ::http/join? false ::http/port 3000} (http/create-server) (http/start))) :started) (defn stop-dev [] ...
null
https://raw.githubusercontent.com/jacekschae/learn-pedestal-course-files/fa60a8f208e80658a4c55f0c094b66f68a2d3c6a/increments/08-routes/src/dev/user.clj
clojure
(ns user (:require [io.pedestal.http :as http])) (defonce system-ref (atom nil)) (defn start-dev [] (reset! system-ref (-> {::http/routes #{} ::http/type :jetty ::http/join? false ::http/port 3000} (http/create-server) (http/start))) :started) (defn stop-dev [] ...
1a840ed1da29b382379f1113b7b0d9193719fd772f718626811110f4a418772b
tari3x/csec-modex
piauth.mli
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
null
https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/deps/proverif1.84/src/piauth.mli
ocaml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
8cc15ba42a114e2fb815783cd805f86250a73690492cdc6758a901c884106c8a
quil-lang/quilc
suite.lisp
;;;; tests/suite.lisp ;;;; Author : (in-package #:libquilc-tests) (defun clean-up () (uiop:with-current-directory ("lib/") (uiop:run-program '("make" "clean"))) (uiop:with-current-directory ("lib/tests/c/") (uiop:run-program '("make" "clean")))) (defun run-libquilc-tests (&key (verbose nil) (headless...
null
https://raw.githubusercontent.com/quil-lang/quilc/5f70950681008fd0dc345d574b8d293c5a638d5d/lib/tests/suite.lisp
lisp
tests/suite.lisp
Author : (in-package #:libquilc-tests) (defun clean-up () (uiop:with-current-directory ("lib/") (uiop:run-program '("make" "clean"))) (uiop:with-current-directory ("lib/tests/c/") (uiop:run-program '("make" "clean")))) (defun run-libquilc-tests (&key (verbose nil) (headless nil)) "Run all libquilc ...
39d521b311838c7479ff0c57fb428e26192d4e5c16a2e46989efbc67e288c777
GU-CLASP/TypedFlow
Layers.hs
module TypedFlow.Layers (module TypedFlow.Layers.Core ,module TypedFlow.Layers.RNN ) where import TypedFlow.Layers.Core import TypedFlow.Layers.RNN
null
https://raw.githubusercontent.com/GU-CLASP/TypedFlow/a8591151ddfa94b4ef9ea7d1d3e24f1339c1e764/TypedFlow/Layers.hs
haskell
module TypedFlow.Layers (module TypedFlow.Layers.Core ,module TypedFlow.Layers.RNN ) where import TypedFlow.Layers.Core import TypedFlow.Layers.RNN
83d2d06d7fed2c4fe6919bd7cc7641b5556f701b48c4a8e792693a4306b1a010
spechub/Hets
incmpl.hs
data Boolx = Minx | Plusx data Natx a = Zx | Sx a | SSx (Natx a) Boolx map1 :: Natx Int -> (Int -> Int) -> Natx Int map1 x = \ f -> case x of Zx -> Sx (f 0) Sx n -> Sx (f n)
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/Haskell/test/HOLCF/incmpl.hs
haskell
data Boolx = Minx | Plusx data Natx a = Zx | Sx a | SSx (Natx a) Boolx map1 :: Natx Int -> (Int -> Int) -> Natx Int map1 x = \ f -> case x of Zx -> Sx (f 0) Sx n -> Sx (f n)
cf772952273654e883827edf1721ee95d103cfcc910adf3caf5242656e921335
mransan/ocaml-protoc
example04.ml
open Example04_types open Example04_pp let ( @+ ) value next = Cons { value; next } let () = let l = 1 @+ 2 @+ 3 @+ 4 @+ 5 @+ Nil in Format.(fprintf std_formatter "l = %a\n" pp_int_list l)
null
https://raw.githubusercontent.com/mransan/ocaml-protoc/e43b509b9c4a06e419edba92a0d3f8e26b0a89ba/src/examples/example04.ml
ocaml
open Example04_types open Example04_pp let ( @+ ) value next = Cons { value; next } let () = let l = 1 @+ 2 @+ 3 @+ 4 @+ 5 @+ Nil in Format.(fprintf std_formatter "l = %a\n" pp_int_list l)
777e99f1d05368d5db599fe95bc707d050f4e93b1634d30843c5853a4bb341c1
matijapretnar/eff
desugarer.ml
(** Desugaring of syntax into the core language. *) open Utils open Language module Sugared = SugaredSyntax module Untyped = UntypedSyntax module T = Type type constructor_kind = Variant of bool | Effect of bool This is so OCaml does n't complain about : Error ( warning 37 ): constructor Effect is never used...
null
https://raw.githubusercontent.com/matijapretnar/eff/1be07f0c7fbaadf5c28437bf11fe818aa76640e7/src/02-parser/desugarer.ml
ocaml
* Desugaring of syntax into the core language. ***** Desugaring of types. ***** * [free_type_params t] returns all free type params in [t]. Then the types themselves ***** Desugaring of expressions and computations. ***** * [fresh_var opt] creates a fresh variable on each call Terms that are desugared into co...
open Utils open Language module Sugared = SugaredSyntax module Untyped = UntypedSyntax module T = Type type constructor_kind = Variant of bool | Effect of bool This is so OCaml does n't complain about : Error ( warning 37 ): constructor Effect is never used to build values . Error (warning 37): construct...
aa18bc434d070a019028a35f8c85a95a8b3db28c7144f758237c77ac24e20bae
Andromedans/andromeda
matching.mli
* Match a value against a pattern . Matches are returned in order of increasing de Bruijn index : if we match the pattern [ ( x , y , z ) ] against the value [ ( " foo " , " bar " , " baz " ) ] , the list returned will be [ [ " baz " , " bar " , " foo " ] ] . if we match the pattern [(x,y,z)] against t...
null
https://raw.githubusercontent.com/Andromedans/andromeda/a5c678450e6c6d4a7cd5eee1196bde558541b994/src/runtime/matching.mli
ocaml
* [match_op_pattern ps p_out vs t_out] matches patterns [ps] against values [vs] and the optional pattern [p_out] against the optional type [t_out].
* Match a value against a pattern . Matches are returned in order of increasing de Bruijn index : if we match the pattern [ ( x , y , z ) ] against the value [ ( " foo " , " bar " , " baz " ) ] , the list returned will be [ [ " baz " , " bar " , " foo " ] ] . if we match the pattern [(x,y,z)] against t...
32d66a6d3695ed7eb51696bf1fbc7df4f5903d83bd1eba5991a1a2a5bea77921
reborg/clojure-essential-reference
7.clj
(import '[java.util.concurrent LinkedBlockingQueue]) < 1 > < 2 > (let [out *out*] (future (binding [*out* out] (dotimes [n 50] (Thread/sleep 1000) (println "buffer" (.size q))))))) (defn lazy-scan [] ; <3> (->> (java.io.File. "/") file-seq (map (memfn getPath)) ...
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Sequences/SequentialCollections/seque/7.clj
clojure
<3> < 5 > "/usr/local/var/homebrew/linked/z3/todo.txt" "/usr/local/var/homebrew/linked/z3/share/z3/examples/c++/CMakeLists.txt") more? < 6 > ... ...
(import '[java.util.concurrent LinkedBlockingQueue]) < 1 > < 2 > (let [out *out*] (future (binding [*out* out] (dotimes [n 50] (Thread/sleep 1000) (println "buffer" (.size q))))))) (->> (java.io.File. "/") file-seq (map (memfn getPath)) (filter (by-type ".txt...
e0937c555bbbb3537aaf2c7e7f4cab0dfa74d965f3af8dbf9f670b5d3a489ff9
rbuchmann/samak
nodes.cljc
(ns samak.nodes (:require [samak.protocols :as p] [samak.api :as api] [samak.pipes :as pipes] [samak.tools :refer [fail log]] [samak.trace :refer [*db-id*]] [samak.code-db :as db])) (def ^:dynamic *manager* nil) (def ^:dynamic *builtins*...
null
https://raw.githubusercontent.com/rbuchmann/samak/ab98d1a180ee02c6cd784962b3c03e473a6d481b/src/samak/nodes.cljc
clojure
(println "evaling module: " module) needs to prep resolve magic when instanciating pipes, to select same runtime maybe simply do so explicitly
(ns samak.nodes (:require [samak.protocols :as p] [samak.api :as api] [samak.pipes :as pipes] [samak.tools :refer [fail log]] [samak.trace :refer [*db-id*]] [samak.code-db :as db])) (def ^:dynamic *manager* nil) (def ^:dynamic *builtins*...
305ab90cc550909255239099d5312d1d17675c321fbd0cecdc842ec9b3cb7621
ROCKTAKEY/roquix
tailscale.scm
(define-module (roquix packages tailscale) #:use-module (guix packages) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix download) #:use-module (gnu packages linux) #:use-module (nonguix build-system binary)) (define-public tailscale (package (name "tailscale") (version "1.24.2"...
null
https://raw.githubusercontent.com/ROCKTAKEY/roquix/03fd20cbef8de72a2d52dec8593f242d1a752d09/roquix/packages/tailscale.scm
scheme
(define-module (roquix packages tailscale) #:use-module (guix packages) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix download) #:use-module (gnu packages linux) #:use-module (nonguix build-system binary)) (define-public tailscale (package (name "tailscale") (version "1.24.2"...
f0036e0e1a9888d7744eb4006cb8b2240b14223538f0c5a7d384a1ad51b31a34
levex/wacc
Emit.hs
module WACC.CodeGen.ARM.Emit where import Data.Char import Data.List import Data.Maybe import Control.Monad.Writer import WACC.CodeGen.Types import WACC.Parser.Types hiding (Add, Sub, Mul, Div) import WACC.Semantics.Types conditions :: [(Condition, String)] conditions = [ (CAl, "") , (CEq, "eq") ...
null
https://raw.githubusercontent.com/levex/wacc/c77164f0c9aeb53d3d13a0370fdedc448b6009a3/src/WACC/CodeGen/ARM/Emit.hs
haskell
mov fp, sp FIXME: proper regsave and div-by-zero check FIXME: proper regsave and div-by-zero check
module WACC.CodeGen.ARM.Emit where import Data.Char import Data.List import Data.Maybe import Control.Monad.Writer import WACC.CodeGen.Types import WACC.Parser.Types hiding (Add, Sub, Mul, Div) import WACC.Semantics.Types conditions :: [(Condition, String)] conditions = [ (CAl, "") , (CEq, "eq") ...
c8c130b0077257cbec7a6fc9a9ba2fda0941754112e849a4c399bb5b3f3d9a9a
ejgallego/coq-serapi
ser_genintern.ml
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * INRIA , CNRS and contributors - Copyright 1999 - 2018 (* <O___,, * (see CREDITS file for the list of authors) *) \VV/ * * * *...
null
https://raw.githubusercontent.com/ejgallego/coq-serapi/61d2a5c092c1918312b8a92f43a374639d1786f9/serlib/ser_genintern.ml
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team <O___,, * (see CREDITS file for the list of authors) // * This file is distributed under the terms of the * (see LICENSE file for...
v * INRIA , CNRS and contributors - Copyright 1999 - 2018 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser General Public License Version 2.1 Copyright 2016 - 2018 MINES ParisT...
58ee67a2c646fe18af7492bc15fc987cf91ac781613e0e95dc9c9cedabd176e7
byorgey/diagrams-play
ToothpickTrees.hs
{- -player.org/2013/joshua-trees-and-toothpicks -} import Control.Arrow (second) import Control.Lens ((&), _1, _2, (%~)) import Data.List (group, sort) import qualified Data.Set as S import Diagrams.Prelude hiding ((&), End) data Dir = H | V deriving (Eq, Show, Ord) fli...
null
https://raw.githubusercontent.com/byorgey/diagrams-play/5362c715db394be6848ff5de1bbe71178e5f173f/ToothpickTrees.hs
haskell
-player.org/2013/joshua-trees-and-toothpicks ------------------------------------------------
import Control.Arrow (second) import Control.Lens ((&), _1, _2, (%~)) import Data.List (group, sort) import qualified Data.Set as S import Diagrams.Prelude hiding ((&), End) data Dir = H | V deriving (Eq, Show, Ord) flipDir H = V flipDir V = H type Loc = (Int, Int) dat...
7df4bdad63897f166fe68613ee63c66faff8a4421ab5448a0a6ad6f39cd3f1f6
nikita-volkov/hasql-transaction
SQL.hs
module Hasql.Transaction.Private.SQL where import qualified ByteString.TreeBuilder as D import Hasql.Transaction.Config import Hasql.Transaction.Private.Prelude beginTransaction :: IsolationLevel -> Mode -> ByteString beginTransaction isolation mode = D.toByteString builder where builder = "BEGIN " <> i...
null
https://raw.githubusercontent.com/nikita-volkov/hasql-transaction/d4bcbb5bdb361b828717962bab085f95b5feb60d/library/Hasql/Transaction/Private/SQL.hs
haskell
module Hasql.Transaction.Private.SQL where import qualified ByteString.TreeBuilder as D import Hasql.Transaction.Config import Hasql.Transaction.Private.Prelude beginTransaction :: IsolationLevel -> Mode -> ByteString beginTransaction isolation mode = D.toByteString builder where builder = "BEGIN " <> i...
1eee5fbf5746aff5eadc58748c80a7901fe5db2aa67b1971f37cf0bae7ce0e80
matt-noonan/justified-containers
Tutorial.hs
# LANGUAGE RankNTypes , DeriveTraversable # -- | -- Module : Data.Map.Justified.Tutorial Copyright : ( c ) 2017 -- License : BSD-style -- Maintainer : -- Portability : portable -- -- = Description -- -- The examples below demonstrate how to use the types and functions in "Data.Map.Justified". --...
null
https://raw.githubusercontent.com/matt-noonan/justified-containers/38233a7faf0e953654ea380ea762b998765148e9/src/Data/Map/Justified/Tutorial.hs
haskell
| Module : Data.Map.Justified.Tutorial License : BSD-style Maintainer : Portability : portable = Description The examples below demonstrate how to use the types and functions in "Data.Map.Justified". You should be able to simply load this module in @ghci@ to play along. The import list is: ...
# LANGUAGE RankNTypes , DeriveTraversable # Copyright : ( c ) 2017 import Prelude hiding ( lookup ) import Data . Map . Justified import Data . ( for ) import Data . ( toUpper ) import Control . ( forM _ ) module Data.Map.Justified.Tutorial where import Prelude hiding (lookup) import Data....
fb74c148149c7bbb957d983cd3b5561e37487a515fcf85db6ef97490f9af1626
jeromesimeon/Galax
top_parse.ml
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/toplevel/top_parse.ml
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2009 . $ Id$ Module : Top_parse Description : This module implements a simple front - end for Galax XML parser / validator and serialization . Description: This module implements a simple front-end for Galax XML ...
0392659129051ef172b9dec21541c575015915e9e337a4d4e3f57a72e1b5a00b
schemeorg-community/index.scheme.org
index.scm
( (r5rs . "types/r5rs.scm") ;; r6rs ((rnrs base (6)) . "types/rnrs.base.6.scm") ((rnrs arithmetic bitwise (6)) . "types/rnrs.arithmetic.bitwise.6.scm") ((rnrs arithmetic fixnum (6)) . "types/rnrs.arithmetic.fixnum.6.scm") ((rnrs arithmetic flonum (6)) . "types/rnrs.arithmetic.flonum.6.scm") ((rnrs bytevectors (6...
null
https://raw.githubusercontent.com/schemeorg-community/index.scheme.org/f93e4454ec03885829fa449b7ec9edc9789afa61/types/index.scm
scheme
r6rs r7rs small r7rs large red r7rs large tangerine srfi 7 -- ?? specific implementation handling
( (r5rs . "types/r5rs.scm") ((rnrs base (6)) . "types/rnrs.base.6.scm") ((rnrs arithmetic bitwise (6)) . "types/rnrs.arithmetic.bitwise.6.scm") ((rnrs arithmetic fixnum (6)) . "types/rnrs.arithmetic.fixnum.6.scm") ((rnrs arithmetic flonum (6)) . "types/rnrs.arithmetic.flonum.6.scm") ((rnrs bytevectors (6)) . "typ...
2c6319537fe8dd90aa08d434595ffa63976e21d8f7591a0508be77112bc227c7
xh4/web-toolkit
functions.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; ;;; functions.lisp --- High-level interface to foreign functions. ;;; Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2005 - 2007 , ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/cffi_0.20.1/src/functions.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- functions.lisp --- High-level interface to foreign functions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, pu...
Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2005 - 2007 , files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOU...
a6eb10f6a3131234b71cfe14f2a7ac25816b87b37c9c2e1328f69f2661df3966
galdor/tungsten
package.lisp
(defpackage :log (:use :cl) (:export #:level #:domain-part #:domain #:message #:message-time #:message-domain #:message-level #:message-text #:message-data #:message-writer #:sink #:write-message #:default-sink #:make-terminal-sink #:*logger* #:logger #:logger-d...
null
https://raw.githubusercontent.com/galdor/tungsten/61bc5e1c91c8027cce9f079f1eec9368316e181c/tungsten-log/src/package.lisp
lisp
(defpackage :log (:use :cl) (:export #:level #:domain-part #:domain #:message #:message-time #:message-domain #:message-level #:message-text #:message-data #:message-writer #:sink #:write-message #:default-sink #:make-terminal-sink #:*logger* #:logger #:logger-d...
7f83fdd5d849e612c39d8769e6f79f84d7d6e2452a6d76165917ed9aeb77d3c1
takano-akio/filelock
interrupt.hs
import Control.Concurrent import Control.Exception import Control.Monad import System.FileLock import System.Exit import System.Timeout main :: IO () main = withFileLock lockFilePath Exclusive $ \_ -> do mvar <- newMVar Nothing _ <- forkIO $ do -- The attempt to lock the file again should block, but it should ...
null
https://raw.githubusercontent.com/takano-akio/filelock/bf09ca2911a0d98720ef0624e9d15a69d40e66e6/tests/interrupt.hs
haskell
The attempt to lock the file again should block, but it should be interrupted by the timeout, returning Nothing. Also masking shouldn't change interruptibility.
import Control.Concurrent import Control.Exception import Control.Monad import System.FileLock import System.Exit import System.Timeout main :: IO () main = withFileLock lockFilePath Exclusive $ \_ -> do mvar <- newMVar Nothing _ <- forkIO $ do r <- timeout 1000000 $ mask $ \_ -> lockFile lockFilePath Exclusiv...
af4bb8101d4a528c9491936654ff5b1f87fa975d3dfe2b6458704df850038032
dgiot/dgiot
dgiot_parse_slave_channel.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy...
null
https://raw.githubusercontent.com/dgiot/dgiot/cae748d4065770bbed34b6f9a3d2b3dc4a2b0391/apps/dgiot_parse/src/sever/dgiot_parse_slave_channel.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 ...
Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(dgiot_parse_slave_channel). -define(TYPE1, <<"PARSESLAVE">>). -author("kenneth"). -inc...
4aabdc142d1c5580fa1501f72d11b77ed6fdd37a57c3ff13cc8309d6fe0f19d5
whamtet/dogfort
cookies.cljs
(ns dogfort.middleware.cookies "Middleware for parsing and generating cookies." #_(:import [org.joda.time DateTime Interval]) (:require [dogfort.util.codec :as codec] [clojure.string :as str] [redlobster.promise :as p]) (:use-macros [redlobster.macros :only [promise let-realised]] ...
null
https://raw.githubusercontent.com/whamtet/dogfort/75c2908355cc18bf350a5b761d2906e013ee9f94/src/dogfort/middleware/cookies.cljs
clojure
(instance? Interval value) (str ";" attr-name "=" (in-seconds value))
(ns dogfort.middleware.cookies "Middleware for parsing and generating cookies." #_(:import [org.joda.time DateTime Interval]) (:require [dogfort.util.codec :as codec] [clojure.string :as str] [redlobster.promise :as p]) (:use-macros [redlobster.macros :only [promise let-realised]] ...
abc67a263c851efc2d4aa7292362ac4481ecdb92168d57a912ef18c0492667a9
fujita-y/ypsilon
core.scm
(library (core) (export &assertion &condition &error &i/o &i/o-decoding &i/o-encoding &i/o-file-already-exists &i/o-file-does-not-exist &i/o-file-is-read-only &i/o-file-protection &i/o-filename &i/o-invalid-position &i/o-port &i/o-read &i/o-write &implem...
null
https://raw.githubusercontent.com/fujita-y/ypsilon/df2f76eff07a76fc6102dcd1eb6ef933ab8b8399/stdlib/core.scm
scheme
(library (core) (export &assertion &condition &error &i/o &i/o-decoding &i/o-encoding &i/o-file-already-exists &i/o-file-does-not-exist &i/o-file-is-read-only &i/o-file-protection &i/o-filename &i/o-invalid-position &i/o-port &i/o-read &i/o-write &implem...
98a788fe00a480f654316de673003df55e215cdb3d7a8b3c1ea9105c766d3085
tsloughter/kuberl
kuberl_v1alpha1_volume_attachment_status.erl
-module(kuberl_v1alpha1_volume_attachment_status). -export([encode/1]). -export_type([kuberl_v1alpha1_volume_attachment_status/0]). -type kuberl_v1alpha1_volume_attachment_status() :: #{ 'attachError' => kuberl_v1alpha1_volume_error:kuberl_v1alpha1_volume_error(), 'attached' := boolean(), 'attachme...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1alpha1_volume_attachment_status.erl
erlang
-module(kuberl_v1alpha1_volume_attachment_status). -export([encode/1]). -export_type([kuberl_v1alpha1_volume_attachment_status/0]). -type kuberl_v1alpha1_volume_attachment_status() :: #{ 'attachError' => kuberl_v1alpha1_volume_error:kuberl_v1alpha1_volume_error(), 'attached' := boolean(), 'attachme...
aaaa47b4edda12a794c26fd6759ccd1099ab4e806925a6511e277d167b483274
UlfNorell/insane
Internal.hs
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies , DeriveDataTypeable , DeriveFunctor , , DeriveTraversable # DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable #-} module Syntax.Internal where import Control.Applicative import Data.Tr...
null
https://raw.githubusercontent.com/UlfNorell/insane/694d5dcfdc3d4dd4f31138228ef8d87dd84fa9ec/typechecker/Syntax/Internal.hs
haskell
Pointers --------------------------------------------------------------- Syntax -----------------------------------------------------------------
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies , DeriveDataTypeable , DeriveFunctor , , DeriveTraversable # DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable #-} module Syntax.Internal where import Control.Applicative import Data.Tr...
03fa08867b0aa946c048a13f025faa502b253846c776debf19be117ba8f562be
jeromesimeon/Galax
shredded_load_sigs.mli
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/shredded/shredded_load_sigs.mli
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . $ I d : shredded_load_sigs.mli , v 1.7 2007/02/01 22:08:54 simeon Exp $ module type Shredded_Load_Store = sig type shredded_store type namespaceid type text val get_store_from_docid : Nodeid.docid -> shredded_store val preorder_of...
fcde98aa6f1fa3dae37255796180c432538fad23fd0c247b5d94fba34713e34b
footprintanalytics/footprint-web
async_test.clj
(ns metabase.query-processor.async-test (:require [clojure.test :refer :all] [metabase.query-processor.async :as qp.async] [metabase.test :as mt] [metabase.test.util.async :as tu.async])) (deftest async-result-metadata-test (testing "Should be able to get result metadata async" ...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/query_processor/async_test.clj
clojure
(ns metabase.query-processor.async-test (:require [clojure.test :refer :all] [metabase.query-processor.async :as qp.async] [metabase.test :as mt] [metabase.test.util.async :as tu.async])) (deftest async-result-metadata-test (testing "Should be able to get result metadata async" ...
ea0e7d42d96e50d4f351becdda9ce1ed4c5a138cf9d65fb30be54ce7fa830a72
tfeb/tfeb-lisp-hax
wrapping-standard.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -*- Mode: Lisp -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; File - wrapping-standard.lisp ;; Description - Wrapping standard method combination Author - ( tfb at lostwithiel ) Created On - We d May 29 17:55:55 2002 Last Modified On - Sun Aug 30 14:...
null
https://raw.githubusercontent.com/tfeb/tfeb-lisp-hax/6a56b40cc90d790be4ee9ad02afe8b459e583cb8/wrapping-standard.lisp
lisp
-*- Mode: Lisp -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; File - wrapping-standard.lisp Description - Wrapping standard method combination Update Count - 4 Status - Unknown Wrapping standard method combination may be used for any purpose whatsoever by anyone. It has no warranty wha...
Author - ( tfb at lostwithiel ) Created On - We d May 29 17:55:55 2002 Last Modified On - Sun Aug 30 14:03:13 2020 Last Modified By - ( tfb at kingston.fritz.box ) $ Id$ wrapping-standard.lisp is copyright 2001,2012 by me , , and (defpackage :org.tfeb.hax.wrapping-standard ...
7b771a131b23aa0d4d90735d61d5d3e4733f05ff500ad3950586863e014e083f
smucclaw/dsl
Lib.hs
# LANGUAGE PostfixOperators # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE DuplicateRecordFields # module Lib where import Text.Megaparsec import Text.Megaparsec.Char import qualified Text.Megaparsec.Char.Lexer as L import Data.Text (Text, pack, unpack) import qualified Data.Text.IO ...
null
https://raw.githubusercontent.com/smucclaw/dsl/9ee9dd7160c05b773ff20754ba8bbdccf37a5380/caseStudies/LPAPCR34/src/Lib.hs
haskell
# LANGUAGE OverloadedStrings # deontic rule "potato" and -- each element must evaluate true only one element is needed to be true set union! inclusive "and" is not a logical "and"! more of an "or" nil ideally spaceless but can contain spaces. Maybe a Mk to s/ /_/g a stanza RULE PARTY X MUST Y DEFINE X IS BLAH...
# LANGUAGE PostfixOperators # # LANGUAGE ScopedTypeVariables # # LANGUAGE DuplicateRecordFields # module Lib where import Text.Megaparsec import Text.Megaparsec.Char import qualified Text.Megaparsec.Char.Lexer as L import Data.Text (Text, pack, unpack) import qualified Data.Text.IO as TIO import Prettyprinter hiding ...
529cfccd803a3b3635d4d177a2f22878d93e3640bcd1800a1ddf62e8487f7a43
bitc/omegagb
Display.hs
OmegaGB Copyright 2007 Bit This program is distributed under the terms of the GNU General Public License ----------------------------------------------------------------------------- -- | -- Module : Display Copyright : ( c ) Bit Connor 2007 < > -- License : GPL -- Maintainer : -- Stability ...
null
https://raw.githubusercontent.com/bitc/omegagb/5ab9c3a22f5fc283906b8af53717d81fef96db7f/src/Display.hs
haskell
--------------------------------------------------------------------------- | Module : Display License : GPL Maintainer : Stability : in-progress OmegaGB Game Boy Emulator This module defines the Display type that represents the Game Boy's LCD colors, ---------------------------------------...
OmegaGB Copyright 2007 Bit This program is distributed under the terms of the GNU General Public License Copyright : ( c ) Bit Connor 2007 < > display . The Game Boy LCD display has a resolution of 144x160 and 4 module Display where import Data.Array.Unboxed import Data.Word type Display = UArray (Int...
e78f2ad2a8f2504bcf5ee3cb6c581ad219673e7416def9c3b55ee295cdd10da0
dnlkrgr/hsreduce
TypeFamilies.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # {-# LANGUAGE GADTs #-} # LANGUAGE InstanceSigs # # LANGUAGE Po...
null
https://raw.githubusercontent.com/dnlkrgr/hsreduce/8f66fdee036f8639053067572b55d9a64359d22c/test-cases/regressions/TypeFamilies.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE GADTs # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators #
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE InstanceSigs # # LANGUAGE PolyKinds # # LANGUAGE TypeApplications # # LANGUAGE UndecidableInstances # import GHC.Generics import GHC.TypeLits arst :: F Int Char -...
30f6bd1445bc24827db8fb645242b8e7ed3dad5aae19e9057d67455e871ceea5
fmi-lab/fp-elective-2017
reverse-digits.scm
(require rackunit rackunit/text-ui) Докато изчерпваме цифрите от number , ги слагаме в reversed (define (reverse-digits n) (define (helper number reversed) Изчерпали сме напълно number reversed ; Съответно reversed e напълнен и готов (helper (quotient number 10) (+ (* revers...
null
https://raw.githubusercontent.com/fmi-lab/fp-elective-2017/e88d5c0319b6d03c0ecd8a12a2856fb1bf5dcbf3/exercises/02/reverse-digits.scm
scheme
Съответно reversed e напълнен и готов
(require rackunit rackunit/text-ui) Докато изчерпваме цифрите от number , ги слагаме в reversed (define (reverse-digits n) (define (helper number reversed) Изчерпали сме напълно number (helper (quotient number 10) (+ (* reversed 10) (remainder number 10))))) (helper n...
1cf4641ec7a6a796e27019b0214f20967971bbc2033b67a1d4f4952b1ee2ca16
dbuenzli/fmt
styled_perf_bug.ml
let n = 10000 let () = while true do let t0 = Unix.gettimeofday () in for _i = 1 to n do ignore @@ Fmt.str "Hello %a" Fmt.string "world" done; let t1 = Unix.gettimeofday () in Printf.printf "Formatted %.0f messages/second\n%!" (float n /. (t1 -. t0)) done
null
https://raw.githubusercontent.com/dbuenzli/fmt/7bb974aafa62ffb97304a34a06cfc1d588e19ea4/test/styled_perf_bug.ml
ocaml
let n = 10000 let () = while true do let t0 = Unix.gettimeofday () in for _i = 1 to n do ignore @@ Fmt.str "Hello %a" Fmt.string "world" done; let t1 = Unix.gettimeofday () in Printf.printf "Formatted %.0f messages/second\n%!" (float n /. (t1 -. t0)) done
660d4c176e94cf8d4d105ff439b7af646598d80993bc5f1a05d7926521219bf0
Verites/verigraph
HSpecTests.hs
-- file test/Spec.hs # OPTIONS_GHC -F - discover -optF --module - name = HSpecTests #
null
https://raw.githubusercontent.com/Verites/verigraph/754ec08bf4a55ea7402d8cd0705e58b1d2c9cd67/tests/HSpecTests.hs
haskell
file test/Spec.hs module - name = HSpecTests #
2a33d950c91718938c840e18c24690d05bee9f4233e3b88f7b49c958d79600e5
bgusach/exercises-htdp2e
ex-290.rkt
#lang htdp/isl+ (require test-engine/racket-tests) (require 2htdp/image) # # # Data Definitions # # # Functions ; [A] [List-of A] [List-of A] -> [List-of A] (check-expect (append-from-fold '(1) '()) '(1)) (check-expect (append-from-fold '(1 2) '(3)) '(1 2 3)) (define (append-from-fold a b) (foldr cons b a) ...
null
https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/3-abstraction/ex-290.rkt
racket
[A] [List-of A] [List-of A] -> [List-of A] Q: What happens if you replace foldr with foldl? See function test-append-from-foldl [A] [List-of A] [List-of A] -> [List-of A] [List-of Number] -> Number Returns the sum of all numbers in the list NOTE: foldl works too. Sum is commutative Returns the product of all...
#lang htdp/isl+ (require test-engine/racket-tests) (require 2htdp/image) # # # Data Definitions # # # Functions (check-expect (append-from-fold '(1) '()) '(1)) (check-expect (append-from-fold '(1 2) '(3)) '(1 2 3)) (define (append-from-fold a b) (foldr cons b a) ) A : The result list contains the eleme...
c006f024a890dcc77de61c11f0a21ee3f9d751b9174a9f5d267b8163608ee792
simmone/racket-simple-xlsx
cell-border-style-test.rkt
#lang racket (require rackunit/text-ui rackunit) (require "../../../../main.rkt") (require racket/runtime-path) (define-runtime-path cell_border_file "cell_border.xlsx") (define-runtime-path cell_border_read_and_write_file "cell_border_read_and_write.xlsx") (define test-writer (test-suite "test-writer" (te...
null
https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/tests/write-and-read/style/cell-border-style/cell-border-style-test.rkt
racket
(void)
#lang racket (require rackunit/text-ui rackunit) (require "../../../../main.rkt") (require racket/runtime-path) (define-runtime-path cell_border_file "cell_border.xlsx") (define-runtime-path cell_border_read_and_write_file "cell_border_read_and_write.xlsx") (define test-writer (test-suite "test-writer" (te...
9487c91ee60e39aa9087aa9382882a73a7403abf01443f762a7f2e8ca697f02b
mentat-collective/emmy
boole_test.cljc
#_"SPDX-License-Identifier: GPL-3.0" (ns emmy.numerical.quadrature.boole-test (:refer-clojure :exclude [+ - * /]) (:require [clojure.test :refer [is deftest testing use-fixtures]] [emmy.abstract.function :as f] [emmy.generic :as g :refer [+ - * /]] [emmy.numerical.quadrature.boo...
null
https://raw.githubusercontent.com/mentat-collective/emmy/90a1de10e78187c70d546c3cfd63c8d32b783bed/test/emmy/numerical/quadrature/boole_test.cljc
clojure
Richardson extrapolation step with t=2, p=2,4,6... since the
#_"SPDX-License-Identifier: GPL-3.0" (ns emmy.numerical.quadrature.boole-test (:refer-clojure :exclude [+ - * /]) (:require [clojure.test :refer [is deftest testing use-fixtures]] [emmy.abstract.function :as f] [emmy.generic :as g :refer [+ - * /]] [emmy.numerical.quadrature.boo...
c84c285015ecf3e20774ab88f9caed4fd2e4340a4bd76d83f953e576770428de
coalton-lang/coalton
iterator.lisp
(coalton-library/utils:defstdlib-package #:coalton-library/iterator (:shadow #:empty) (:use #:coalton #:coalton-library/classes #:coalton-library/hash #:coalton-library/builtin #:coalton-library/functions #:coalton-library/optional #:coalton-library/tuple #:coalton-library/char) (:local-ni...
null
https://raw.githubusercontent.com/coalton-lang/coalton/1d756c71c033fd750cd4757a3c2e91f6272e8814/library/iterator.lisp
lisp
fundamental operators instances should iterator implement applicative or monad? the only law-abiding applicative instances are pathological, so i doubt it. constructors FIXME: avoid underflow in the DONE? test like (>= (- end step)), but without potential underflow combinators these are named with a !, even th...
(coalton-library/utils:defstdlib-package #:coalton-library/iterator (:shadow #:empty) (:use #:coalton #:coalton-library/classes #:coalton-library/hash #:coalton-library/builtin #:coalton-library/functions #:coalton-library/optional #:coalton-library/tuple #:coalton-library/char) (:local-ni...
494904652cf75cf52ef9f89e0aede36697ff5396ef5c52b320030d56888ecdfb
komi1230/kai
main.lisp
scatter.lisp - A collection of scatter plotting ;;; ;;; This code has been placed in the Public Domain. All warranties ;;; are disclaimed. ;;; ;;; This file is composed of a collection of exampeles of plotting. ;;; Here's codes are mainly deal scatter plotting. (in-package :cl-user) (defpackage :kai-example (:use...
null
https://raw.githubusercontent.com/komi1230/kai/7481aae3ca11a79c117dd6fbc4e3bf2122a89627/examples/main.lisp
lisp
This code has been placed in the Public Domain. All warranties are disclaimed. This file is composed of a collection of exampeles of plotting. Here's codes are mainly deal scatter plotting. Parameters These are parameters to plot in the figure. Basic plotting Line and scatter Pie chart pie cahrt with la...
scatter.lisp - A collection of scatter plotting (in-package :cl-user) (defpackage :kai-example (:use :cl) (:import-from :kai :title :line :pie :box :heatmap :contour :line3d :surface ...
07b317b262fa1584b6dead979e4e3ad46ceaa3a7565d86dc8a34126337dbc063
bsansouci/bsb-native
bytelibrarian.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/bytecomp/bytelibrarian.mli
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . Build libraries of .cmo files val c...
adab90be29fb741d26b75616cedc02bf2a5f294b0a7bfcecb2e77c6cf4684ece
HugoPeters1024/hs-sleuth
Encoding.hs
# LANGUAGE BangPatterns , CPP , GeneralizedNewtypeDeriving , MagicHash , UnliftedFFITypes # UnliftedFFITypes #-} # LANGUAGE Trustworthy # # LANGUAGE TypeApplications # -- | -- Module : Data.Text.Encoding Copyright : ( c ) 2009 , 2010 , 2011 , ( c ) 2009 , ( c ) 20...
null
https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/91aa2806ea71b7a26add3801383b3133200971a5/test-project/text-nofusion/src/Data/Text/Encoding.hs
haskell
| Module : Data.Text.Encoding License : BSD-style Maintainer : Portability : portable using several standard encodings. To gain access to a much larger family of encodings, use the <-icu text-icu package>. $strict ** Controllable error handling ** Stream oriented decoding $stream $strict Al...
# LANGUAGE BangPatterns , CPP , GeneralizedNewtypeDeriving , MagicHash , UnliftedFFITypes # UnliftedFFITypes #-} # LANGUAGE Trustworthy # # LANGUAGE TypeApplications # Copyright : ( c ) 2009 , 2010 , 2011 , ( c ) 2009 , ( c ) 2008 , 2009 Functions for converting ' ...
bb067cf9c55f03eace1ccbee384ae6d53da54e2b5c929046836c56ac6e4f799a
arttuka/reagent-material-ui
medical_information_outlined.cljs
(ns reagent-mui.icons.medical-information-outlined "Imports @mui/icons-material/MedicalInformationOutlined as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def m...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/c7cd0d7c661ab9df5b0aed0213a6653a9a3f28ea/src/icons/reagent_mui/icons/medical_information_outlined.cljs
clojure
(ns reagent-mui.icons.medical-information-outlined "Imports @mui/icons-material/MedicalInformationOutlined as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def m...
78333cdf0b3536a0d6c586e08b73f7fc9a0de6e166b4eca34d7a38c81d694232
yangchenyun/learning-sicp
prisoner.scm
;; The play - loop procedure takes as its arguments two prisoner 's ;; dilemma strategies, and plays an iterated game of approximately one hundred rounds . A strategy is a procedure that takes two arguments : a history of the player 's previous plays and ;; a history of the other player's previous plays...
null
https://raw.githubusercontent.com/yangchenyun/learning-sicp/99a19a06eddc282e0eb364536e297f27c32a9145/practices/projects/project2/prisoner.scm
scheme
dilemma strategies, and plays an iterated game of approximately a history of the other player's previous plays. The procedure returns either a "c" for cooperate or a "d" for defect. The following procedures are used to compute and print out the players' scores at the end of an iterated game and that...
The play - loop procedure takes as its arguments two prisoner 's one hundred rounds . A strategy is a procedure that takes two arguments : a history of the player 's previous plays and (define (play-loop strat0 strat1) (define (play-loop-iter strat0 strat1 count history0 history1 limit) (cond ((= c...
778a69e88625acfea6a4711560aaad002b4544b65a85a17590a30c8f5f80c498
Kakadu/fp2022
result.ml
* Copyright 2022 - 2023 , * SPDX - License - Identifier : LGPL-3.0 - or - later type environment = (Ast.id, value, Base.String.comparator_witness) Base.Map.t and rec_flag = | Recursive | NonRecursive and value = * 5 | VString of string (** "apple" *) | VBool of bool (** true *) | VChar of char (** 'a' *...
null
https://raw.githubusercontent.com/Kakadu/fp2022/836230c8130be216d8008c96249b42828b240d7e/SMLEqTypesValRestr/lib/result.ml
ocaml
* "apple" * true * 'a' * () * fun x -> x * x * Unbound value * Unreachable code. If this error is thrown then there is a bug in typechecker * Used unsupported operation * n / 0 * Wildcard is in the right-hand expression * The case is not matched * Pattern-matching is not exhaustive
* Copyright 2022 - 2023 , * SPDX - License - Identifier : LGPL-3.0 - or - later type environment = (Ast.id, value, Base.String.comparator_witness) Base.Map.t and rec_flag = | Recursive | NonRecursive and value = * 5 * [ 1 ; 2 ; 3 ] * ( " abc " , 123 , false ) type error = | `Unreachable ] let rec pp_val...
f4d1efaff0ebce14417ddfe944afb3b716b42a8e3d0797e7716b39639788c4e4
CyberCat-Institute/open-game-engine
AndGateMarkovMC.hs
# LANGUAGE DataKinds # # LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE LambdaCase # # LANGUAGE FlexibleContexts # # LANGUAGE RecordWildCards # {-# LANGUAGE GADTs #-} module Examples.Staking.AndGateMarkovMC where import Debug.Trace import OpenGames hiding (fromLens,Agent,fromFuncti...
null
https://raw.githubusercontent.com/CyberCat-Institute/open-game-engine/86031c42bf13178554c21cd7ab9e9d18f1ca6963/src/Examples/Staking/AndGateMarkovMC.hs
haskell
# LANGUAGE GADTs # DONE What effect happens through the state hack and the discounting? The discounting at least does not seem to make a difference. ------ Types ------------------- ------ Games -: -: -: -: -: -: -: -: -: -: -: -: ------------- continuation extract continuation extract next state (action) extrac...
# LANGUAGE DataKinds # # LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE LambdaCase # # LANGUAGE FlexibleContexts # # LANGUAGE RecordWildCards # module Examples.Staking.AndGateMarkovMC where import Debug.Trace import OpenGames hiding (fromLens,Agent,fromFunctions,discount,nature) im...
9ee9f44909f6312a59843a197fc6dfc4b723ea1651fe21f0cb21f9dcdf178654
sadiqj/ocaml-esp32
types.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/typing/types.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 * [ Types ] defines the representation of types and declarations ( that is , the content of module...
b07a15415cbded9c29a71bdeaede6c55e9e4e96339cbf7159e4e384d3a431c2f
ocsigen/js_of_ocaml
print_runtime.ml
Js_of_ocaml compiler * / * Copyright ( C ) 2020 Hugo Heuzard * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of th...
null
https://raw.githubusercontent.com/ocsigen/js_of_ocaml/6e8200a6f31c2ccfba67fdd1d5db84dd893261ae/compiler/bin-js_of_ocaml/print_runtime.ml
ocaml
Js_of_ocaml compiler * / * Copyright ( C ) 2020 Hugo Heuzard * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of th...
b0b50c8e35cadb0aa98cca3bba12e89925fae5f9037c1f9697a63c9ca6529c99
Eventuria/demonstration-gsd
WriteModelSpec.hs
# LANGUAGE QuasiQuotes # # LANGUAGE InstanceSigs , TypeApplications # module Eventuria.GSD.Write.Model.WriteModel.WriteModelSpec (main, spec) where import Test.Hspec import Test.QuickCheck import Data.Aeson import Eventuria.GSD.Write.Model.WriteModel.PropertyTesting.WriteModel () import Eventuria.GSD.Write.Model.Wr...
null
https://raw.githubusercontent.com/Eventuria/demonstration-gsd/5c7692b310086bc172d3fd4e1eaf09ae51ea468f/test/Eventuria/GSD/Write/Model/WriteModel/WriteModelSpec.hs
haskell
# LANGUAGE QuasiQuotes # # LANGUAGE InstanceSigs , TypeApplications # module Eventuria.GSD.Write.Model.WriteModel.WriteModelSpec (main, spec) where import Test.Hspec import Test.QuickCheck import Data.Aeson import Eventuria.GSD.Write.Model.WriteModel.PropertyTesting.WriteModel () import Eventuria.GSD.Write.Model.Wr...
485b84b6d0329eee56e20179bc38bc4993acae91fac5d68bbb26eea0b3f6a38b
bef/erlswf
swfdt.erl
-module(swfdt). -compile(export_all). -include("swfdt.hrl"). -export([ ui16/1, sb/1, sb/2, encodedu32/1, string/1, rect/1, matrix/1 ]). %% %% primitive datatypes %% @doc decode 16 - bit unsigned integer %% @spec ui16(binary()) -> {integer(), binary()} ui16(<<X:16/unsigned-integer-little, Rest/binary>>) -> ...
null
https://raw.githubusercontent.com/bef/erlswf/1397591d012aaa020f9ffc0ecd5436e65814e668/src/swfdt.erl
erlang
primitive datatypes @spec ui16(binary()) -> {integer(), binary()} @doc decode signed-bit value (aka. sign extension) empty value (this should rarely occur) positive value negative value @doc null-terminated string @spec string(binary()) -> {string(), binary()} not nerminated by 0 ? meta types and helpers ...
-module(swfdt). -compile(export_all). -include("swfdt.hrl"). -export([ ui16/1, sb/1, sb/2, encodedu32/1, string/1, rect/1, matrix/1 ]). @doc decode 16 - bit unsigned integer ui16(<<X:16/unsigned-integer-little, Rest/binary>>) -> {X, Rest}. @spec sb(bitstring ( ) ) - > integer ( ) Size = bit_size(X), <...
704947deae93f25efad1a8f99c0ab56dcb991b0b003b3acf593a0f68941eca69
ucsd-progsys/liquidhaskell
BadDataConType2.hs
{-@ LIQUID "--expect-error-containing=different numbers of fields for `BadDataConType2.C`" @-} module BadDataConType2 where {-@ data T = C { fldX :: Int } @-} data T = C { fldX :: Int, fldY :: Int }
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/errors/BadDataConType2.hs
haskell
@ LIQUID "--expect-error-containing=different numbers of fields for `BadDataConType2.C`" @ @ data T = C { fldX :: Int } @
module BadDataConType2 where data T = C { fldX :: Int, fldY :: Int }
2a3ddce5513adafc368ccf63656304a004e487fba6f176dec15a98e6c66e6103
jbclements/RSound
paste-util.rkt
#lang racket/base (require "rsound.rkt" "private/s16vector-add.rkt" ffi/unsafe ffi/vector) ;; almost-safe (tm) utilities for copying sounds. ;; if you don't lie about the target buffer and its length, ;; you'll be safe. (provide zero-buffer! rs-copy-add! rs-copy-mult-add...
null
https://raw.githubusercontent.com/jbclements/RSound/c699db1ffae4cf0185c46bdc059d7879d40614ce/rsound/paste-util.rkt
racket
almost-safe (tm) utilities for copying sounds. if you don't lie about the target buffer and its length, you'll be safe. given a cpointer and a length in frames, given a target cpointer and an offset in frames and a source rsound and an offset in frames and a number of frames to copy and the length of the targe...
#lang racket/base (require "rsound.rkt" "private/s16vector-add.rkt" ffi/unsafe ffi/vector) (provide zero-buffer! rs-copy-add! rs-copy-mult-add!) (define frame-size (* CHANNELS s16-size)) (define (frames->bytes f) (* frame-size f)) fill it with zeros . (define (zero-b...
a25aca1b8d3cd06c881006e05f557ed95a9dd890824f6ba5a9e97c3afb2a11d2
etarasov/iptadmin
Render.hs
{-# LANGUAGE OverloadedStrings #-} module IptAdmin.EditForm.Render where import Data.Monoid import Data.Set (member) import Data.String import IptAdmin.EditForm.Class import IptAdmin.EditForm.Types import Iptables.Types import Text.Blaze import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attribu...
null
https://raw.githubusercontent.com/etarasov/iptadmin/ceaca3424a0b2891da4d5d91eaf516a3566f2885/src/IptAdmin/EditForm/Render.hs
haskell
# LANGUAGE OverloadedStrings #
module IptAdmin.EditForm.Render where import Data.Monoid import Data.Set (member) import Data.String import IptAdmin.EditForm.Class import IptAdmin.EditForm.Types import Iptables.Types import Text.Blaze import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attributes as A checkBox :: String -> Boo...
430ce955c23e01d8835f712867624b1f3c36026b62846be4fc28a428c476a311
thheller/shadow-cljs
explore_support.clj
(ns shadow.remote.runtime.explore-support (:require [shadow.debug :refer (?> ?-> ?->>)] [shadow.remote.runtime.api :as p] [shadow.remote.runtime.shared :as shared] [shadow.remote.runtime.obj-support :as obj-support] )) (defn namespaces [{:keys [runtime] :as svc} msg] (shared/reply runtime msg ...
null
https://raw.githubusercontent.com/thheller/shadow-cljs/1708acb21bcdae244b50293d17633ce35a78a467/src/main/shadow/remote/runtime/explore_support.clj
clojure
(ns shadow.remote.runtime.explore-support (:require [shadow.debug :refer (?> ?-> ?->>)] [shadow.remote.runtime.api :as p] [shadow.remote.runtime.shared :as shared] [shadow.remote.runtime.obj-support :as obj-support] )) (defn namespaces [{:keys [runtime] :as svc} msg] (shared/reply runtime msg ...
4c750184e76d31b5e0f9dbda675d896c0f2d8a1bc2391d5da8c3c2d5d2960c48
PJK/haskell-pattern-matching
Types.hs
module OptParse.Types where -- | Kept throughout the program data Settings = Settings { setsCommand :: Command , setsDebug :: Bool } deriving (Show, Eq) -- | Command-line arguments data Arguments = Arguments { argsDebug :: Bool } deriving (Show, Eq) -- | Configuration, from config file data Co...
null
https://raw.githubusercontent.com/PJK/haskell-pattern-matching/7ef4a45731beba92ee01614ae563df65be36e8ba/src/OptParse/Types.hs
haskell
| Kept throughout the program | Command-line arguments | Configuration, from config file
module OptParse.Types where data Settings = Settings { setsCommand :: Command , setsDebug :: Bool } deriving (Show, Eq) data Arguments = Arguments { argsDebug :: Bool } deriving (Show, Eq) data Configuration = Configuration deriving (Show, Eq) data Command = Analyze FilePath | An...
c022569b9338bc29d88a3c5a71a750d4f82cddd1cb31ff82293e0e6279446bf4
evilmartians/foundry
fy_topnum.ml
let big_int_of_string = Big_int.big_int_of_string let string_to_big_int = Big_int.big_int_of_string let print_big_int ppf b = Format.fprintf ppf "@[%sI@]@." (Big_int.string_of_big_int b) let print_num ppf b = Format.fprintf ppf "@[Num %s@]@." (Num.string_of_num b) module I = struct open Big_int let (+) = a...
null
https://raw.githubusercontent.com/evilmartians/foundry/ce947c7dcca79ab7a7ce25870e9fc0eb15e9c2bd/vendor/ocaml-num/fy_topnum.ml
ocaml
let big_int_of_string = Big_int.big_int_of_string let string_to_big_int = Big_int.big_int_of_string let print_big_int ppf b = Format.fprintf ppf "@[%sI@]@." (Big_int.string_of_big_int b) let print_num ppf b = Format.fprintf ppf "@[Num %s@]@." (Num.string_of_num b) module I = struct open Big_int let (+) = a...
0fd7c4157ad96c6181fe06b65871a67697c809444d3fff49ae6c833f5b8abe1a
AdRoll/mero
mero_wrk_tcp_txt.erl
Copyright ( c ) 2014 , AdRoll %% All rights reserved. %% %% Redistribution and use in source and binary forms, with or without %% modification, are permitted provided that the following conditions are met: %% %% * Redistributions of source code must retain the above copyright notice, this %% list of conditions and th...
null
https://raw.githubusercontent.com/AdRoll/mero/33808a908f3f37a9af85c9e9bac7f11e26cc05a0/src/mero_wrk_tcp_txt.erl
erlang
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in...
Copyright ( c ) 2014 , AdRoll THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLAR...