_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
807c44489918c34177381968778cb5d63a3a0af8a2eddac60b8bc01e3d528c94
paurkedal/ocaml-caqti
testlib_eio_unix.mli
Copyright ( C ) 2022 < > * * This library 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 , either version 3 of the License , or ( at your * option ) any later version , with the ...
null
https://raw.githubusercontent.com/paurkedal/ocaml-caqti/d0acb83a5ab48d99c97e01133b997c080a7b39ae/caqti-eio/testlib-unix/testlib_eio_unix.mli
ocaml
Copyright ( C ) 2022 < > * * This library 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 , either version 3 of the License , or ( at your * option ) any later version , with the ...
5a49de79de5df5bf392d0fd76a2c7565f450eb6fda6dda8257c9d34583013d19
mlabs-haskell/apropos
Apropos.hs
| Description : Hedgehog testing that sniffs out edge cases Apropos allows you to describe what test data may trigger edge cases in your code , and automatically exhaustively test against them . see the [ README]( / mlabs - haskell / apropos#readme ) for a fuller explanation . Description: Hedgehog testi...
null
https://raw.githubusercontent.com/mlabs-haskell/apropos/17bb6f7b05549fd7ce67f99b5473d19bba93e6b8/src/Apropos.hs
haskell
* Formulas description types. The 'refineDescription' method is a 'Formula', and the 'satisfies' combinator allows using a 'Formula' to create a predicate for passing to the test runners. A 'Formula' is an expression built of attributes, specified using the 'attr' combinator, and operators specified by the cons...
| Description : Hedgehog testing that sniffs out edge cases Apropos allows you to describe what test data may trigger edge cases in your code , and automatically exhaustively test against them . see the [ README]( / mlabs - haskell / apropos#readme ) for a fuller explanation . Description: Hedgehog testi...
a40fd44eae389e2fde8c03176e1ab9945aa6c73561387b30e5cdaca743c61d26
ocaml-gospel/cameleer
toy_compiler.ml
type expr = | Ecte of int | Eplus of expr * expr | Eminus of expr * expr | Emult of expr * expr (*@ function eval_expr (e: expr) : integer = match e with | Ecte n -> n | Eplus e1 e2 -> eval_expr e1 + eval_expr e2 | Eminus e1 e2 -> eval_expr e1 - eval_expr e2 | Emult e1 e2 ...
null
https://raw.githubusercontent.com/ocaml-gospel/cameleer/fcf00fe27e0a41125880043aa9aa633399fc8cc2/examples/in_progress/toy_compiler.ml
ocaml
@ function eval_expr (e: expr) : integer = match e with | Ecte n -> n | Eplus e1 e2 -> eval_expr e1 + eval_expr e2 | Eminus e1 e2 -> eval_expr e1 - eval_expr e2 | Emult e1 e2 -> eval_expr e1 * eval_expr e2 @ r = compile param variant param ensures let r_eval = eval_exp...
type expr = | Ecte of int | Eplus of expr * expr | Eminus of expr * expr | Emult of expr * expr type asm = Apush of int | Aadd | Asub | Amul @ function compute ( s : int list ) ( a : asm list ) : integer list = match a with | [ ] - > s | a : : r - > match a , s with , _ ...
2e90f1a0e82ec60eeef30994e3d0bdd805ad28fbcc992b436b988ab6de8b7f8c
chaoxu/fancy-walks
350.hs
import Test.QuickCheck import Control.Monad import Data.List hiding (union) import Data.Int import Data.Ord import Debug.Trace minus (x:xs) (y:ys) = case (compare x y) of LT -> x : minus xs (y:ys) EQ -> minus xs ys GT -> minus (x:xs) ys minus xs _ = xs unio...
null
https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/projecteuler.net/350.hs
haskell
return interval [i | n `div` i == d]
import Test.QuickCheck import Control.Monad import Data.List hiding (union) import Data.Int import Data.Ord import Debug.Trace minus (x:xs) (y:ys) = case (compare x y) of LT -> x : minus xs (y:ys) EQ -> minus xs ys GT -> minus (x:xs) ys minus xs _ = xs unio...
395ac8c9d85eb9ab3a73f2b6609ee9228003e7d57d52c1592fd52842fc90d3a0
nsg-ethz/O4
factory.rkt
#lang racket/base ; Factory Context ; --------------------------------------- (provide dec-factory factory-call get-factory get-factories-of-scope get-factory-calls-of-scope set-factory set-factory-call remove-factory-call handle-factory-calls ...
null
https://raw.githubusercontent.com/nsg-ethz/O4/870f6f78a6f7bb1e9e1502e29ff0048e5e1723c5/o4/context/factory.rkt
racket
Factory Context --------------------------------------- Implementation --------------------------------------- Structs - For factories, we store the name of its body action/table/instance, the body function itself, as well as the list of factory parameters. For factory calls, we store the name of the factory th...
#lang racket/base (provide dec-factory factory-call get-factory get-factories-of-scope get-factory-calls-of-scope set-factory set-factory-call remove-factory-call handle-factory-calls handle-factory-calls-fold get-factory-call-nam...
560500659415c612e1895f9c7524973ccf287ba325012df3917a0e51d2b726e5
valerauko/kitsune-alpha
oauth.clj
(ns kitsune.spec.oauth (:require [clojure.spec.alpha :as s] [clojure.string :refer [split]] [kitsune.spec.user :as user])) (s/def ::name string?) (s/def ::client-name string?) (s/def ::scopes string?) (s/def ::scope-array (s/coll-of #{"read" "write" "follow" "push"} :distinct true :min-coun...
null
https://raw.githubusercontent.com/valerauko/kitsune-alpha/34ca08e4013541aeaf1a5a5786f3189ff17c1a58/src/kitsune/spec/oauth.clj
clojure
TODO: proper url validation need to sort it for certain equality
(ns kitsune.spec.oauth (:require [clojure.spec.alpha :as s] [clojure.string :refer [split]] [kitsune.spec.user :as user])) (s/def ::name string?) (s/def ::client-name string?) (s/def ::scopes string?) (s/def ::scope-array (s/coll-of #{"read" "write" "follow" "push"} :distinct true :min-coun...
e6ee684001974c8b22af2e00b36a106b0a427c6778c63a01c3f9ee01143f2283
realworldocaml/book
merlin.ml
open Import module Processed = struct The actual content of the file as built by the [ Unprocessed.process ] function from the unprocessed info gathered through [ gen_rules ] . The first three fields map directly to Merlin 's B , S and FLG directives and the last one represents a list of prepro...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_rules/merlin.ml
ocaml
Most of the configuration is shared accros a same lib/exe... ...but modules can have different preprocessing specifications We merge what is easy to merge and ignore the rest And copy for each module the resulting pp flags
open Import module Processed = struct The actual content of the file as built by the [ Unprocessed.process ] function from the unprocessed info gathered through [ gen_rules ] . The first three fields map directly to Merlin 's B , S and FLG directives and the last one represents a list of prepro...
bd5487b072b6da20c853c98b023ce49270eaea9204a355d7ae6de1ad1d4d2ea2
deadcode/Learning-CL--David-Touretzky
8.50.lisp
(defun sublists (x) (cond ((null x) nil) (t (append (list x) (sublists (rest x)))))) (let ((test1 '(sublists '(fee fie foe))) (test2 '(sublists '())) (test3 '(sublists '(fee)))) (format t "~s = ~s~%" test1 (eval test1)) (format t "~s = ~s~%" test2 (eval test2)) ...
null
https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%208/8.50.lisp
lisp
(defun sublists (x) (cond ((null x) nil) (t (append (list x) (sublists (rest x)))))) (let ((test1 '(sublists '(fee fie foe))) (test2 '(sublists '())) (test3 '(sublists '(fee)))) (format t "~s = ~s~%" test1 (eval test1)) (format t "~s = ~s~%" test2 (eval test2)) ...
94a4fb0cedf54a76d181f3615761ef5af6736636d0cb8c5e967e09c5088e854a
thi-ng/geom
io.cljc
(ns thi.ng.geom.mesh.io (:require [thi.ng.geom.core :as g] [thi.ng.geom.utils :as gu] [thi.ng.geom.vector :as v :refer [vec3]] [thi.ng.geom.basicmesh :as bm] [thi.ng.geom.triangle :as t] [thi.ng.dstruct.streams :as streams] [thi.ng.strf.core :as f] [clojure.string :as str]) #?(:clj (:im...
null
https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/src/thi/ng/geom/mesh/io.cljc
clojure
Configuration parameters Stream wrappers Wavefront OBJ OFF
(ns thi.ng.geom.mesh.io (:require [thi.ng.geom.core :as g] [thi.ng.geom.utils :as gu] [thi.ng.geom.vector :as v :refer [vec3]] [thi.ng.geom.basicmesh :as bm] [thi.ng.geom.triangle :as t] [thi.ng.dstruct.streams :as streams] [thi.ng.strf.core :as f] [clojure.string :as str]) #?(:clj (:im...
b2d57bd833c7218178fffca32379949c92623e1a1d0dfe53c95356bd601535d6
mbacarella/portmidi
discover.ml
module C = Configurator.V1 let () = C.main ~name:"foo" (fun c -> let default : C.Pkg_config.package_conf = { libs = [ "-lportmidi" ]; cflags = [ "-I/usr/include" ] } in let conf = match C.Pkg_config.get c with | None -> default | Some pc -> (match C.Pkg_con...
null
https://raw.githubusercontent.com/mbacarella/portmidi/d80458a52d04edaebdf9e48d4248fb308758cef6/config/discover.ml
ocaml
module C = Configurator.V1 let () = C.main ~name:"foo" (fun c -> let default : C.Pkg_config.package_conf = { libs = [ "-lportmidi" ]; cflags = [ "-I/usr/include" ] } in let conf = match C.Pkg_config.get c with | None -> default | Some pc -> (match C.Pkg_con...
6dd21bf62ecca9ff487bdf006f9d16713be63facf5f6161564a7acd96294ac8d
racket/deinprogramm
line3d.rkt
(module line3d mzscheme (require "world.rkt" deinprogramm/DMdA/define-record-procedures) (require (only deinprogramm/DMdA-vanilla empty make-pair empty? first rest)) (provide make-vec3 vec3-x vec3-y vec3-z add-vec3 ...
null
https://raw.githubusercontent.com/racket/deinprogramm/e9fb68455641ae7d409ddb48f5e584c9d014ef4f/deinprogramm/deinprogramm/DMdA/teachpack/line3d.rkt
racket
(module line3d mzscheme (require "world.rkt" deinprogramm/DMdA/define-record-procedures) (require (only deinprogramm/DMdA-vanilla empty make-pair empty? first rest)) (provide make-vec3 vec3-x vec3-y vec3-z add-vec3 ...
355dae518b64d56d795ff5885ebf114a90f5dfa94bf41969c53e9294178b021c
facebook/duckling
Corpus.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE OverloadedStrings #-} module Duckling.Email.EN.Corpus ( corpus , negativeCorpus ) where ...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Email/EN/Corpus.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.Email.EN.Corpus ( corpus , negativeCorpus ) where import Data.String import Prelude import qualified Data.Text as Text import Duckling.Email.Types import Duckling.Testing.Types negativeCorpus :: NegativeCorpus negativeCorpus = (testContext, ...
9b0e3f511751209219782b8affea493b9923e30bca3b7fea3d745d3dc88c685f
dbuenzli/remat
uic.mli
--------------------------------------------------------------------------- Copyright ( c ) 2015 . All rights reserved . Distributed under the BSD3 license , see license at the end of the file . % % NAME%% release % % --------------------------------------------------------------------------- Cop...
null
https://raw.githubusercontent.com/dbuenzli/remat/28d572e77bbd1ad46bbfde87c0ba8bd0ab99ed28/src-www/uic.mli
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2015 . All rights reserved . Distributed under the BSD3 license , see license at the end of the file . % % NAME%% release % % --------------------------------------------------------------------------- Cop...
f83436076667f5054a014774cbad5abe1a9405972fa428162d0109d17eea06db
graninas/Hydra
Functional.hs
# LANGUAGE DuplicateRecordFields # {-# LANGUAGE PackageImports #-} {-# LANGUAGE ScopedTypeVariables #-} module Hydra.Testing.Functional ( module X ) where import Hydra.Testing.Functional.AppInterpreter as X import Hydra.Testing.Functional.TestRuntime as X
null
https://raw.githubusercontent.com/graninas/Hydra/60d591b1300528f5ffd93efa205012eebdd0286c/lib/hydra-free/test-framework/Hydra/Testing/Functional.hs
haskell
# LANGUAGE PackageImports # # LANGUAGE ScopedTypeVariables #
# LANGUAGE DuplicateRecordFields # module Hydra.Testing.Functional ( module X ) where import Hydra.Testing.Functional.AppInterpreter as X import Hydra.Testing.Functional.TestRuntime as X
0c1593a356470d0b40320fdd98ba04da9c35687766e2514b2ebd8e77ce074c0d
felixengelmann/act-r-sentence-parser-em
sentences.lisp
;;;-*-LISP-*- ;;; =================================================================== ;;; ACT-R Sentence Parsing Model ;;; Copyright ( C ) 2006 , , ;;; ;;; This file is part of the ACT-R Sentence Parsing Model processing German negative and positive polarity items as described in the Cognitive Science...
null
https://raw.githubusercontent.com/felixengelmann/act-r-sentence-parser-em/0d063c8772a367ac57e7fc9f2e1611b2956734df/VBLD2008/sentences.lisp
lisp
-*-LISP-*- =================================================================== ACT-R Sentence Parsing Model This file is part of the ACT-R Sentence Parsing Model processing =================================================================== The model is free software; you can redistribute it and/or m...
Copyright ( C ) 2006 , , German negative and positive polarity items as described in the Cognitive Science article Vasishth , Bruessow & Lewis ( 2007 ) . The original English model is described in the Cognitive Science article Lewis & Vasishth ( 2004 ) . Version 2.9 July 15 2006 it under the ter...
92b79ef6bd561d10b819c536402bf14611b3af5ac5bfdb867304c447ab35f1f3
imandra-ai/ocaml-opentelemetry
trace_service_types.ml
[@@@ocaml.warning "-27-30-39"] type export_trace_service_request = { resource_spans : Trace_types.resource_spans list; } type export_trace_partial_success = { rejected_spans : int64; error_message : string; } type export_trace_service_response = { partial_success : export_trace_partial_success option; } le...
null
https://raw.githubusercontent.com/imandra-ai/ocaml-opentelemetry/3dc7d63c7d2c345ba13e50b67b56aff878b6d0bb/src/trace_service_types.ml
ocaml
[@@@ocaml.warning "-27-30-39"] type export_trace_service_request = { resource_spans : Trace_types.resource_spans list; } type export_trace_partial_success = { rejected_spans : int64; error_message : string; } type export_trace_service_response = { partial_success : export_trace_partial_success option; } le...
f3387622d475d6cdcf7b1ae6892063592df9408ade8b5ad24fdfb806d0c0de8e
arrdem/shelving
spec.clj
(ns shelving.spec "Tools for working with `clojure.spec(.alpha)`." {:authors ["Reid \"arrdem\" McKenzie <>"], :license "Eclipse Public License 1.0", :added "0.0.0"} (:require [clojure.spec.alpha :as s] [clojure.core.match :refer [match]] [detritus.update :refer [fix]])) (defn keys...
null
https://raw.githubusercontent.com/arrdem/shelving/27439bfcb2f3438d5b23fcd468360bda491002f1/src/main/clj/shelving/spec.clj
clojure
FIXME indeterminable? spec "equivalence" checker? At least being able to show that `s/keys` forms subset or superset each-other would be nice and useful.
(ns shelving.spec "Tools for working with `clojure.spec(.alpha)`." {:authors ["Reid \"arrdem\" McKenzie <>"], :license "Eclipse Public License 1.0", :added "0.0.0"} (:require [clojure.spec.alpha :as s] [clojure.core.match :refer [match]] [detritus.update :refer [fix]])) (defn keys...
5821a646149686c7785b8d42d29837f7b6ad7c402c3671a802dcb63903cc54eb
CompSciCabal/SMRTYPRTY
factoring.rkt
#lang racket Pollard 's rho factoring algorithm ;; the transformation function from the original paper ;; (there are better ones depending on your n) is ;; f = (x^2 - 1) mod n (define (f) (lambda (x) (lambda (n) (modulo (- (* x x) 1) n)))) (define (f-expanded x n) (modulo (+ (* x x) 1) n)) (define (pollard n...
null
https://raw.githubusercontent.com/CompSciCabal/SMRTYPRTY/4a5550789c997c20fb7256b81469de1f1fce3514/experiments/ynasser/factoring/factoring.rkt
racket
the transformation function from the original paper (there are better ones depending on your n) is f = (x^2 - 1) mod n not magic numbers! returns all factors, hopefully a very naive factoring algorithm this is slower than python's default math library (and less precise?)
#lang racket Pollard 's rho factoring algorithm (define (f) (lambda (x) (lambda (n) (modulo (- (* x x) 1) n)))) (define (f-expanded x n) (modulo (+ (* x x) 1) n)) (define (pollard n func) (define (while-d-equals-1 x y d) (display "x: ")(display x)(display "\n") (display "y: ")(display y)(display "\...
6d3852be05e55a4df31dfa371e8102fe3899abe8d0c0e901beba283be5c852e5
ekmett/profunctors
Monad.hs
# LANGUAGE PolyKinds # {-# LANGUAGE RankNTypes #-} # LANGUAGE TypeOperators # # LANGUAGE QuantifiedConstraints # {-# LANGUAGE Safe #-} ----------------------------------------------------------------------------- -- | Copyright : ( C ) 2014 - 2015 -- License : BSD-style (see the file LICENSE) -- Maintai...
null
https://raw.githubusercontent.com/ekmett/profunctors/31cc18dc8da8980efd9e0cb3b31000351bb6ab5c/src/Data/Profunctor/Monad.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE Safe # --------------------------------------------------------------------------- | License : BSD-style (see the file LICENSE) Stability : experimental Portability : portable -------------------------------------------------------------------------- | Laws: @ 'prom...
# LANGUAGE PolyKinds # # LANGUAGE TypeOperators # # LANGUAGE QuantifiedConstraints # Copyright : ( C ) 2014 - 2015 Maintainer : < > module Data.Profunctor.Monad where import Control.Comonad import Data.Bifunctor.Tannen import Data.Bifunctor.Product import Data.Bifunctor.Sum import Data.Profunctor.Fun...
48e0e72d9afde59fd32cd46e51bf4e599557f6cdcbc57cba115de9b84395c218
Frama-C/Frama-C-snapshot
Slicing.mli
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/slicing/Slicing.mli
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
39dff6d86869ebb4914b9af30baeaa58df9dad4bb6352885aedd27d142026933
gwathlobal/CotD
window-select-obj.lisp
(in-package :cotd) (defclass select-obj-window (window) ((cur-sel :initform 0 :accessor cur-sel) (header-line :initform nil :initarg :header-line :accessor header-line) (line-list :initarg :line-list :accessor line-list :type list) (descr-list :initform nil :initarg :descr-list :accessor descr-list) ...
null
https://raw.githubusercontent.com/gwathlobal/CotD/d01ef486cc1d3b21d2ad670ebdb443e957290aa2/src/windows/window-select-obj.lisp
lisp
find the maximum width among all strings find the maximum height of the description text depending on the found width find the height of the list set x if necessary set y if necessary setting up coordiantes draw rectangle for header draw text for header setting up coordiantes draw rectangle for list ...
(in-package :cotd) (defclass select-obj-window (window) ((cur-sel :initform 0 :accessor cur-sel) (header-line :initform nil :initarg :header-line :accessor header-line) (line-list :initarg :line-list :accessor line-list :type list) (descr-list :initform nil :initarg :descr-list :accessor descr-list) ...
c35a3d009a43d5d410d3ce770e3f441c8747ab8111f1c831f1bebca531b85c11
smimram/mlsub
type.ml
(** Operations on types. *) (** Ground types. *) module Ground = struct type t = Bool | Int | String let to_string = function | Bool -> "bool" | Int -> "int" | String -> "string" end (** Level for type variables. *) type level = int (** Variables. *) type var = { id : int; (* a unique identifier *...
null
https://raw.githubusercontent.com/smimram/mlsub/c63cbead0460f39da5e8b44a91353209ef674d86/src/type.ml
ocaml
* Operations on types. * Ground types. * Level for type variables. * Variables. a unique identifier level for generalization lower bound upper bound * Types. * Type scheme: variables strictly above the level should be instantiated. * Equality between variables. we want _physical_ equality here * String...
module Ground = struct type t = Bool | Int | String let to_string = function | Bool -> "bool" | Int -> "int" | String -> "string" end type level = int type var = { } and t = | Var of var | Ground of Ground.t | Arr of t * t | Record of (string * t) list and scheme = level * t let var_eq (x...
b03beb61288d23bf01b2e54bdafd25e8d7b4b871b64eb94fb4d06ec28f4c6bec
c-cube/batsat-ocaml
par_solver.ml
module B = Batsat let spf = Printf.sprintf module Parse : sig type 'a event = | Add_clause of 'a array type 'a t val make : file:string -> (int -> 'a) -> 'a t val iter : 'a t -> ('a event -> unit) -> unit end = struct module Vec = CCVector module L = Lexer type 'a event = | Add_clause of 'a...
null
https://raw.githubusercontent.com/c-cube/batsat-ocaml/e14719098ba128b6a7087f2b952e8738af54c921/examples/par_solver.ml
ocaml
done solve a single file start workers
module B = Batsat let spf = Printf.sprintf module Parse : sig type 'a event = | Add_clause of 'a array type 'a t val make : file:string -> (int -> 'a) -> 'a t val iter : 'a t -> ('a event -> unit) -> unit end = struct module Vec = CCVector module L = Lexer type 'a event = | Add_clause of 'a...
dcdf92012c06bacffcf064c61068968c1fe8e7c95ca280dbc573bee3a15c18f5
iskandr/parakeet-retired
toy.ml
(*===----------------------------------------------------------------------=== * Main driver code. *===----------------------------------------------------------------------===*) open Llvm open Llvm_executionengine open Llvm_target open Llvm_scalar_opts let main () = ignore (initialize_native_target ()); Insta...
null
https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/LLVM/toy/toy.ml
ocaml
===----------------------------------------------------------------------=== * Main driver code. *===----------------------------------------------------------------------=== highest. Create the JIT. Set up the optimizer pipeline. Start with registering info about how the * target lays out data structures. ...
open Llvm open Llvm_executionengine open Llvm_target open Llvm_scalar_opts let main () = ignore (initialize_native_target ()); Install standard binary operators . * 1 is the lowest precedence . * 1 is the lowest precedence. *) Hashtbl.add Parser.binop_precedence '=' 2; Hashtbl.add Parser.binop_preced...
75d50cc492293b74904f50875171ed5f8bdf9b383671c758d73dddc6ef8a4813
mfikes/fifth-postulate
ns332.cljs
(ns fifth-postulate.ns332) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns332.cljs
clojure
(ns fifth-postulate.ns332) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
73f4773f93d398f06f4508984c202202a1de5ba89176f6a95af89ba75689dc98
FailWhaleBrigade/water-wars
Utils.hs
module WaterWars.Core.Physics.Utils where import ClassyPrelude import WaterWars.Core.Game velocityBoundX :: Float -> VelocityVector -> VelocityVector velocityBoundX maxX v@(VelocityVector vx vy) = if abs vx <= maxX then v else VelocityVector (boundedBy (-maxX, maxX) vx) vy distanceFromLine' :...
null
https://raw.githubusercontent.com/FailWhaleBrigade/water-wars/bdd0616b1eed281ace499f059b4cc1e72bc50d05/library/WaterWars/Core/Physics/Utils.hs
haskell
TODO: test for that.. left border right border bottom border top border
module WaterWars.Core.Physics.Utils where import ClassyPrelude import WaterWars.Core.Game velocityBoundX :: Float -> VelocityVector -> VelocityVector velocityBoundX maxX v@(VelocityVector vx vy) = if abs vx <= maxX then v else VelocityVector (boundedBy (-maxX, maxX) vx) vy distanceFromLine' :...
7796ebbd200af49acb3eab222946efc0584ad96dcf5228c880cc5e3ca333da56
input-output-hk/cardano-sl
Read.hs
-- | Read-only access to the DB module Cardano.Wallet.Kernel.Read ( -- * Read-only access to the DB DB -- opaque -- ** Helper , getWalletCredentials -- ** The only effectful getter you will ever need , getWalletSnapshot -- ** Pure getters acting on a DB snapshot , module Getters ) where imp...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/wallet/src/Cardano/Wallet/Kernel/Read.hs
haskell
| Read-only access to the DB * Read-only access to the DB opaque ** Helper ** The only effectful getter you will ever need ** Pure getters acting on a DB snapshot | Get wallet credentials For wallets without a corresponding secret key we log an error. This indicates a bug somewhere, but there is not much we c...
module Cardano.Wallet.Kernel.Read ( , getWalletCredentials , getWalletSnapshot , module Getters ) where import Universum hiding (State) import Data.Acid.Advanced (query') import Formatting (sformat, (%)) import Serokell.Util (listJson) import Pos.Core.Network...
dca500ac3b467d816de535c7d9af5e06736a445d80d229a254a59034a337c1e9
caisah/sicp-exercises-and-examples
ex.3.65.scm
;; Use the series ln2 = 1 - 1/2 + 1/3 - 1/4 + ... to compute three sequences of approximations to the natural logarithm of 2 , in the ;; same way we did above for Π. How rapidly do these sequences converge? (define (ln2-summands n) (cons-stream (/ 1.0 n) (stream-map - (ln2-summands (...
null
https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/3.5.3-exploiting_the_stream_paradigm/ex.3.65.scm
scheme
Use the series same way we did above for Π. How rapidly do these sequences converge?
ln2 = 1 - 1/2 + 1/3 - 1/4 + ... to compute three sequences of approximations to the natural logarithm of 2 , in the (define (ln2-summands n) (cons-stream (/ 1.0 n) (stream-map - (ln2-summands (+ n 1))))) (define ln2-stream (partial-sums (ln2-summands 1)))
a59a364ba33c5c9c43970d085c82c091041257ac59bbd17e01a71dc52b47cc98
macourtney/Dark-Exchange
self_identity_listener.clj
(ns darkexchange.model.listeners.self-identity-listener (:require [clojure.contrib.logging :as logging] [darkexchange.model.i2p-server :as i2p-server-model] [darkexchange.model.identity :as identity-model] [darkexchange.model.user :as user])) (defn destination-listener [destinatio...
null
https://raw.githubusercontent.com/macourtney/Dark-Exchange/1654d05cda0c81585da7b8e64f9ea3e2944b27f1/src/darkexchange/model/listeners/self_identity_listener.clj
clojure
(ns darkexchange.model.listeners.self-identity-listener (:require [clojure.contrib.logging :as logging] [darkexchange.model.i2p-server :as i2p-server-model] [darkexchange.model.identity :as identity-model] [darkexchange.model.user :as user])) (defn destination-listener [destinatio...
8e28ba3d84a45ad7be54500a87eefc2e55ddfad22eb5de530ed3c163c3707a88
cartazio/tlaps
version.mli
* Copyright ( C ) 2011 INRIA and Microsoft Corporation * Copyright (C) 2011 INRIA and Microsoft Corporation *) val major : int;; val minor : int;; val micro : int;;
null
https://raw.githubusercontent.com/cartazio/tlaps/562a34c066b636da7b921ae30fc5eacf83608280/src/version.mli
ocaml
* Copyright ( C ) 2011 INRIA and Microsoft Corporation * Copyright (C) 2011 INRIA and Microsoft Corporation *) val major : int;; val minor : int;; val micro : int;;
20ef1001a359a0f8225de0c955395756fe995a621aba3e0d4d0e9dc706210b43
John-Nagle/pasv
tests.lisp
; ; Some test cases. These require the rules given here. ; ; ; The declarations ; (setq testdecls '( (x~1 (variable (subrange 1 100))) (y~2 (variable (subrange 1 100))) (z~3 (variable (subrange 1 100))) (b~4 (variable (boolean))) (a~5 (variable (array (subrange 1 100) (subrange 0 300)))) (u~1 (variable (universal))) (...
null
https://raw.githubusercontent.com/John-Nagle/pasv/04fa44aaabc46b2e231ab83f96b8857dc5977754/src/CPC4/tests.lisp
lisp
Some test cases. These require the rules given here. The declarations The rules dummy rule to test if rule engine is working at all The test cases not true not true Predicate tests Array tests record tests Arithmetic tests multiply bounds tests rule tests simplest possible rule test ...
(setq testdecls '( (x~1 (variable (subrange 1 100))) (y~2 (variable (subrange 1 100))) (z~3 (variable (subrange 1 100))) (b~4 (variable (boolean))) (a~5 (variable (array (subrange 1 100) (subrange 0 300)))) (u~1 (variable (universal))) (f (variable (integer))) (p (function (boolean))) (u (function (universal))) (allzer...
f1106e374fd7921c29bee88fd809a16435aa8b682606a85bd053275e409d3de4
RefactoringTools/HaRe
D1.expected.hs
module AddOneParameter.D1 where {-add parameter 'f' to function 'sq' . This refactoring affects module 'D1', 'C1' and 'A1'-} sumSquares (x:xs) = (sq sq_f) x + sumSquares xs sumSquares [] = 0 sq f x = x ^ pow sq_f = undefined pow =2
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/AddOneParameter/D1.expected.hs
haskell
add parameter 'f' to function 'sq' . This refactoring affects module 'D1', 'C1' and 'A1'
module AddOneParameter.D1 where sumSquares (x:xs) = (sq sq_f) x + sumSquares xs sumSquares [] = 0 sq f x = x ^ pow sq_f = undefined pow =2
670882f9c29659c865e212ba3dc5ecd1cc5f6ef2cd0b809ffce8539b798f62a6
hiroshi-unno/coar
copy8.ml
let id x = x let succ x = x + 1 let comp f g x = f (g x) let rec copy f x = if x = 0 then f 0 else copy (comp succ f) (x - 1) let main x = assert (copy id x = x) [@@@assert "typeof(main) <: int -> unit"]
null
https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/benchmarks/OCaml/safety/tacas2015/copy8.ml
ocaml
let id x = x let succ x = x + 1 let comp f g x = f (g x) let rec copy f x = if x = 0 then f 0 else copy (comp succ f) (x - 1) let main x = assert (copy id x = x) [@@@assert "typeof(main) <: int -> unit"]
ccb9b306799855ce59fc187940248364ee73888d8ded62849aacc82ceba24652
fmi-lab/fp-elective-2017
task-2.scm
(require rackunit rackunit/text-ui) (define (remove-at l index) (append (take l index) (drop l (+ index 1)))) (define (remove-column matrix index) (map (lambda (row) (remove-at row index)) matrix)) (define (flat l) (cond ((null? l) '()) ((list? (car l)) (append (car l) (flat (cdr l)))) ...
null
https://raw.githubusercontent.com/fmi-lab/fp-elective-2017/e88d5c0319b6d03c0ecd8a12a2856fb1bf5dcbf3/homework/02/task-2.scm
scheme
(require rackunit rackunit/text-ui) (define (remove-at l index) (append (take l index) (drop l (+ index 1)))) (define (remove-column matrix index) (map (lambda (row) (remove-at row index)) matrix)) (define (flat l) (cond ((null? l) '()) ((list? (car l)) (append (car l) (flat (cdr l)))) ...
1b5b8092d780925299d34e3726bcd299b38f2cb9bf748bc6d768752db657308c
arenadotio/sentry-ocaml
uuid.ml
open Core_kernel type t = Uuidm.t let unwrap t = Uuidm.to_bytes t |> Hex.of_string |> Hex.show let wrap s = Hex.to_string (`Hex s) |> Uuidm.of_bytes |> function | Some uuid -> uuid | None -> failwithf "Failed to parse %s as a UUID" s () ;; let%test_unit "wrap" = let expect = "fc6d8c0c43fc4630ad850ee518f...
null
https://raw.githubusercontent.com/arenadotio/sentry-ocaml/ed103dca16816fee058904f595ccdc09d9d3b79f/src/uuid.ml
ocaml
open Core_kernel type t = Uuidm.t let unwrap t = Uuidm.to_bytes t |> Hex.of_string |> Hex.show let wrap s = Hex.to_string (`Hex s) |> Uuidm.of_bytes |> function | Some uuid -> uuid | None -> failwithf "Failed to parse %s as a UUID" s () ;; let%test_unit "wrap" = let expect = "fc6d8c0c43fc4630ad850ee518f...
76eb0e57689cac1cb226adfd55ec4f0a937673b6ceaba7524984ce1dcf8bcd79
ndmitchell/catch
Factorise.hs
module Analyse.Factorise(factorise) where import General.General type Vec a = [a] -- given a list of items, each being a list of possible choices -- give the maximum factorisations where multiple ones exist , give more than one -- -- [[a,b],[a,c]] == [[[a],[b,c]]] -- -- top is the "highest" element, such that al...
null
https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/catch_1/Analyse/Factorise.hs
haskell
given a list of items, each being a list of possible choices give the maximum factorisations [[a,b],[a,c]] == [[[a],[b,c]]] top is the "highest" element, such that all others are subsets [top] is the only permissable value, since [top,*] == [top] in Catch this is likely to be Any
module Analyse.Factorise(factorise) where import General.General type Vec a = [a] where multiple ones exist , give more than one factorise :: (Show a, Ord a) => a -> [Vec a] -> [Vec [a]] factorise top xs = f top [] (map (map (:[])) xs) where f :: (Show a, Ord a) => a -> [Vec [a]] -> [Vec [a]] -> [Vec...
29b3b783dfb81dee2ee3de22530f934630bcda1b4053daed76c4290679727af1
caradoc-org/caradoc
intset.mli
(*****************************************************************************) (* Caradoc: a PDF parser and validator *) Copyright ( C ) 2015 ANSSI Copyright ( C ) 2015 - 2017 (* ...
null
https://raw.githubusercontent.com/caradoc-org/caradoc/100f53bc55ef682049e10fabf24869bc019dc6ce/src/util/intset.mli
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...
e4d73f8e5f7995bc703753282835f26c2cc0117b07de793a59d6e19728e3a738
codxse/cljs-mui
core_test.clj
(ns id.nadiar.cljs-mui.core-test (:require [clojure.test :refer :all] [id.nadiar.cljs-mui :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1)))) (def ^{:private true} component-api "-org/material-ui/master/packages/material-ui/src/index.js") (def ^{:private true} component-icons "...
null
https://raw.githubusercontent.com/codxse/cljs-mui/0271f16472080fc21c65570c2ecfd303db0106fc/test/id/nadiar/cljs_mui/core_test.clj
clojure
(ns id.nadiar.cljs-mui.core-test (:require [clojure.test :refer :all] [id.nadiar.cljs-mui :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1)))) (def ^{:private true} component-api "-org/material-ui/master/packages/material-ui/src/index.js") (def ^{:private true} component-icons "...
b5bd0055356e3e015198b118a7775c274ad04370ea116a3c6b6afce8b81852e2
pkamenarsky/concur-replica
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Concur.Core (Widget) import Concur.Replica import Data.Maybe import Data.Text (Text) import Replica.VDOM (HTML) import Prelude hiding (div) selectApp :: Maybe Text -> Widget HTML a selectApp mSelected = do newSelection <- div [] [ select [onChange] ...
null
https://raw.githubusercontent.com/pkamenarsky/concur-replica/e15785b3b09e97790ae23c8ae8671c191d039a2c/examples/Select/Main.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import Concur.Core (Widget) import Concur.Replica import Data.Maybe import Data.Text (Text) import Replica.VDOM (HTML) import Prelude hiding (div) selectApp :: Maybe Text -> Widget HTML a selectApp mSelected = do newSelection <- div [] [ select [onChange] [ option [disabled True, sel...
e5f786a2db85ad84fd1f8819580b116cb66ae41f2f1178d5e0607343e2404f3b
Commonfare-net/macao-social-wallet
dev.clj
Freecoin - digital social currency toolkit part of Decentralized Citizen Engagement Technologies ( D - CENT ) R&D funded by the European Commission ( FP7 / CAPS 610349 ) Copyright ( C ) 2015 Dyne.org foundation Copyright ( C ) 2015 Thoughtworks , Inc. designed , written and maintained by < > ;; Wi...
null
https://raw.githubusercontent.com/Commonfare-net/macao-social-wallet/d3724d6c706cdaa669c59da439fe48b0373e17b7/src/freecoin/dev.clj
clojure
With contributions by This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See th...
Freecoin - digital social currency toolkit part of Decentralized Citizen Engagement Technologies ( D - CENT ) R&D funded by the European Commission ( FP7 / CAPS 610349 ) Copyright ( C ) 2015 Dyne.org foundation Copyright ( C ) 2015 Thoughtworks , Inc. designed , written and maintained by < > <...
a47f61a81ab07515c0d750d3ed2e0d8721ed38028ef0c806f850002311fb7d3e
circuithub/haskell-gerber
Tests.hs
# language BlockArguments # module Gerber.Grammar.Tests (tests) where import Test.Tasty ( TestTree, testGroup ) import Test.Tasty.Golden (goldenVsStringDiff) import qualified Data.Text.IO as Text import Text.Megaparsec (errorBundlePretty) import Data.ByteString.Lazy.Char8 (pack) import Gerber.Grammar (parseGerber) imp...
null
https://raw.githubusercontent.com/circuithub/haskell-gerber/ee7c8b529c3b21d6ae1ea19dbd7fd884b1d88bbb/gerber/tests/Gerber/Grammar/Tests.hs
haskell
# language BlockArguments # module Gerber.Grammar.Tests (tests) where import Test.Tasty ( TestTree, testGroup ) import Test.Tasty.Golden (goldenVsStringDiff) import qualified Data.Text.IO as Text import Text.Megaparsec (errorBundlePretty) import Data.ByteString.Lazy.Char8 (pack) import Gerber.Grammar (parseGerber) imp...
080a8ac0a914cb8b87046f34796733e5c56c8260aa3740ae03da3e1b7111359e
kupl/SimplPublic
imp.ml
open Vocab type bop = Plus | Minus | Mult | Div | Mod and var = string and aexp = | Int of int | Lv of lv | BinOpLv of bop * lv * lv | BinOpN of bop * lv * int | AHole of int and lv = | Var of var | Arr of var * var and bexp = | True | False | GtLv of lv * lv (* > *) | GtN of lv *...
null
https://raw.githubusercontent.com/kupl/SimplPublic/881268fd36f05b7c609f9e8addf9db272da15fe7/imp.ml
ocaml
> < == input = value list
open Vocab type bop = Plus | Minus | Mult | Div | Mod and var = string and aexp = | Int of int | Lv of lv | BinOpLv of bop * lv * lv | BinOpN of bop * lv * int | AHole of int and lv = | Var of var | Arr of var * var and bexp = | True | False | GtN of lv * int | LtN of lv * int ...
149a08a1b0ec13ec611a26ba1a5b71e595151427e1703ac208ebd3aec07cf015
ugglan/cljaws
sdb.clj
(ns cljaws.sdb (:use [cljaws core helpers] [clojure.contrib.seq-utils :only [partition-all]]) (:import (com.xerox.amazonws.sdb Domain Item SimpleDB QueryResult ItemAttribute SDBException ))) ;; ;; SimpleDB ;; (declare *sdb-service* *sdb-domain*) (defmacro with-domain "Bind name as current doma...
null
https://raw.githubusercontent.com/ugglan/cljaws/0df2312d61e6c7d52520479b3c103858c72e9f5b/src/cljaws/sdb.clj
clojure
SimpleDB dummy domain name due to quirk of typica library so we can select without domain Tools to reformat maps into something typica will understand Thread-pool version of batch-put Single threaded version of batch-put, will dispatch to multi-thread when needed Single-item update tools Tools to read an item ...
(ns cljaws.sdb (:use [cljaws core helpers] [clojure.contrib.seq-utils :only [partition-all]]) (:import (com.xerox.amazonws.sdb Domain Item SimpleDB QueryResult ItemAttribute SDBException ))) (declare *sdb-service* *sdb-domain*) (defmacro with-domain "Bind name as current domain. name can be ke...
f867bd1f1d43ccd6d240a24ac305779deaccab3a0084e51e34d2968b1842185a
xLinkOut/pr2-ocaml
interprete-progetto.ml
Grammatica del linguaggio type ide = string;; type exp = | Eint of int | Ebool of bool | Den of ide | Prod of exp * exp | Sum of exp * exp | Diff of exp * exp | Eq of exp * exp | Minus of exp | IsZero of exp | Or of exp * exp | And of exp * exp | Not of exp | Ifthen...
null
https://raw.githubusercontent.com/xLinkOut/pr2-ocaml/c28039991e2741c7d9be7862cde247c37a592895/src/interprete-progetto.ml
ocaml
Applicazione di funzione (Apply) key, value, dict key, dict key, dict funct, dict funct, dict keyList, dict Ambiente Closure Rec Closure (k, v)::tail continuo a cercare == TESTS == val env0 : '_weakX -> evT = <fun> Insert, chiave non esistente Delete, chiave non esistente Bool true Bool...
Grammatica del linguaggio type ide = string;; type exp = | Eint of int | Ebool of bool | Den of ide | Prod of exp * exp | Sum of exp * exp | Diff of exp * exp | Eq of exp * exp | Minus of exp | IsZero of exp | Or of exp * exp | And of exp * exp | Not of exp | Ifthen...
ec136bd268e74954544a76e873352a6b8c6dd5126e5128d0adc623fcdef2f2ad
ruuvi/ruuvitracker_server
parse_test.clj
(ns ruuvi-server.parse-test (:use [midje.sweet :only (fact throws)] [clj-time.core :only (date-time time-zone-for-id to-time-zone)] ruuvi-server.parse) (:import [java.lang IllegalArgumentException]) ) (def params {:a "value 1" :b "value 2" :c nil :d nil}) (defn- to-int[val] (try (Integer/v...
null
https://raw.githubusercontent.com/ruuvi/ruuvitracker_server/269041aa2ff450c0f35183de0264d82a5c3881f1/test/ruuvi_server/parse_test.clj
clojure
is-valid? get-value/get-error parse functions nmea-latitude nmea-longitude? parse-nmea-coordinate decimal parsing time and date parsing
(ns ruuvi-server.parse-test (:use [midje.sweet :only (fact throws)] [clj-time.core :only (date-time time-zone-for-id to-time-zone)] ruuvi-server.parse) (:import [java.lang IllegalArgumentException]) ) (def params {:a "value 1" :b "value 2" :c nil :d nil}) (defn- to-int[val] (try (Integer/v...
64c7edf109063a048810e1dcff72dfab6020a751110dd819a3065c2f7b47eb8d
exoscale/ex
test.clj
(ns exoscale.ex.test "Testing utilities" (:require [clojure.test :as t] [exoscale.ex :as ex])) (defmethod t/assert-expr 'thrown-ex-info-type? [msg form] ;; (is (thrown-ex-data? c expr)) ;; Asserts that evaluating expr throws an exceptioninfo of :type `k`. Returns the exceptioninfo thrown . (let...
null
https://raw.githubusercontent.com/exoscale/ex/a2172c271014dff3238f6a05b465af273252e87c/modules/ex/src/clj/exoscale/ex/test.clj
clojure
(is (thrown-ex-data? c expr)) Asserts that evaluating expr throws an exceptioninfo of :type `k`.
(ns exoscale.ex.test "Testing utilities" (:require [clojure.test :as t] [exoscale.ex :as ex])) (defmethod t/assert-expr 'thrown-ex-info-type? [msg form] Returns the exceptioninfo thrown . (let [k (nth form 1) body (nthnext form 2)] `(ex/try+ ~@body (t/do-report {:type :fail ...
d36deff1a760e96f0c492c0cff53305a0222416877ef93fb9eb519a07788d2ff
phylogeography/spread
events.cljs
(ns analysis-viewer.events (:require [analysis-viewer.db :as db] [analysis-viewer.events.filters :as events.filters] [analysis-viewer.events.maps :as events.maps] [analysis-viewer.events.ui :as events.ui] [clojure.spec.alpha :as s] [expound.alpha :as expound...
null
https://raw.githubusercontent.com/phylogeography/spread/56f3500e6d83e0ebd50041dc336ffa0697d7baf8/src/cljs/analysis_viewer/events.cljs
clojure
sc (spec check) interceptor using `after` map graphics manipulation
(ns analysis-viewer.events (:require [analysis-viewer.db :as db] [analysis-viewer.events.filters :as events.filters] [analysis-viewer.events.maps :as events.maps] [analysis-viewer.events.ui :as events.ui] [clojure.spec.alpha :as s] [expound.alpha :as expound...
9b11ead2d6d947eba4472c4749198f71c1cdb7e1ab5c3a821e1c727a71759c16
jeffshrager/biobike
jhelp-pages.lisp
-*- Package : help ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*- (in-package :help) ;; TITLE ;; Subtitle (history) ;; keywords ;; logical-form, aka snippet ;; summary (short description) ;; text (long description) (defparameter *jpages* (list '( "What genes are nearby gene G" ...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Help/jhelp-pages.lisp
lisp
mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*- TITLE Subtitle (history) keywords logical-form, aka snippet summary (short description) text (long description)
(in-package :help) (defparameter *jpages* (list '( "What genes are nearby gene G" "subtitle" "keywords, keywords" (427 :JBML-DELETE :JBML-OUTDENT (5013 :JBML-MAIN-BOX-MENU "" (549 :JBML-MENU-ENTRY "Help") (122 :JBML-MENU-ENTRY "Collapse") (136 :JBML-MENU-ENTRY "Execute") (143 :JBML-MENU-ENTRY...
cdebce063cf6f0293e82c9fcbea8456122f9f0c5783bf10129500a5514e3dc0d
nobsun/oi
Combinator.hs
-- | -- Module : Data.OI.Combinator Copyright : ( c ) 2011 - 2016 -- License : BSD3 Author : -- Maintainer : -- Stability : experimental -- # LANGUAGE TypeOperators # module Data.OI.Combinator ( -- * Interaction Combinators (|:|) ,(|>|),(|/|) ,(|><|) -- * Iteration ,sequen...
null
https://raw.githubusercontent.com/nobsun/oi/3a99630a01debeb3266620580d0e8ffbc0b8042b/src/Data/OI/Combinator.hs
haskell
| Module : Data.OI.Combinator License : BSD3 Maintainer : Stability : experimental * Interaction Combinators * Iteration * Conditional Choice * Sequencing | Iteration | Conditional branching | Sequencing
Copyright : ( c ) 2011 - 2016 Author : # LANGUAGE TypeOperators # module Data.OI.Combinator ( (|:|) ,(|>|),(|/|) ,(|><|) ,sequenceOI ,foldOI ,mapOI ,zipWithOI ,zipWithOI' ,ifOI ,choiceOI ,choiceOIOn ,seqsOI ,seqsOI' ) where import Data.OI.Internal import Data.OI.Force ...
b2ace4564d88c2cd654afe63d52b7227bd66c979ade5f2dba6942c1a13f5dfb5
grin-compiler/ghc-wpc-sample-programs
TypeDefs.hs
-- ------------------------------------------------------------ | Module : Text . XML.HXT.DTDValidation . TypeDefs Copyright : Copyright ( C ) 2008 License : MIT Maintainer : ( ) Stability : experimental Portability : portable This module provides all datatypes ...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/hxt-9.3.1.18/src/Text/XML/HXT/DTDValidation/TypeDefs.hs
haskell
------------------------------------------------------------ ------------------------------------------------------------ classes arrow types ------------------------------------------------------------ ------------------------------------------------------------ -------------------------------------------------...
| Module : Text . XML.HXT.DTDValidation . TypeDefs Copyright : Copyright ( C ) 2008 License : MIT Maintainer : ( ) Stability : experimental Portability : portable This module provides all datatypes for DTD validation Module : Text.XML.HXT.DTDValidation...
9dad315a07cbdd642b6047ab3823017b3b94ff1b955fa8a9d55560e030b77a19
ocamllabs/vscode-ocaml-platform
foo.ml
let hello () = print_endline "hey there"
null
https://raw.githubusercontent.com/ocamllabs/vscode-ocaml-platform/a7256e8be0fad29c34bfc9a7015cb2d76802fe29/test/fixtures/sample-opam/foo.ml
ocaml
let hello () = print_endline "hey there"
5317e1786602932c3d987ee9a76cbac5c29cf2eca071fc017e94368f3fb52c66
brianhempel/maniposynth
stdlib.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/brianhempel/maniposynth/8c8e72f2459f1ec05fefcb994253f99620e377f3/ocaml-4.07.1/stdlib/stdlib.ml
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 module Pervasives = struct external register_named_value : string -> 'a -> unit ...
5c1b1616a80456990eab386795144a241bccfff15ea1dae117d63fd192e3d6c6
yellowtides/owenbot-hs
Academic.hs
{-# LANGUAGE OverloadedStrings #-} module Academic (commands) where import Control.Exception.Safe (catchAny) import Control.Monad (void) import Data.Char (isDigit) import Data.List (intercalate) import qualified Data.Text as T import Text.Parsec (char, digit, label, many1, sepBy1, try) import Discord import Discord....
null
https://raw.githubusercontent.com/yellowtides/owenbot-hs/9aaf66cc09b038c8c45b462ed93b77edbe0e5622/src/listeners/Academic.hs
haskell
# LANGUAGE OverloadedStrings # | datatype representing possible textbook asset number formats | used to create the file name | Theorem. When some subject in the future needs to be added (so far we have had none), then, add a `subject` argument: `:theorem <subject> <theorem number>` | Definition. | Lemma. | Text...
module Academic (commands) where import Control.Exception.Safe (catchAny) import Control.Monad (void) import Data.Char (isDigit) import Data.List (intercalate) import qualified Data.Text as T import Text.Parsec (char, digit, label, many1, sepBy1, try) import Discord import Discord.Types import Command import Comman...
34fa5c8fe6c1923013611cb452ce006ed5b11526ba92bcd61e198e566af56c5a
caisah/sicp-exercises-and-examples
ex.4.1.scm
;; Notice that we cannot tell whether the metacircular evaluator evaluates operands ;; from left to right or from right to left. Its evaluation order is inherited from the underlying : If the arguments to cons in list - of - values are evaluated from ;; left to right, then list-of-values will evaluate operands from ...
null
https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/4.1.1-the_core_of_the_evaluator/ex.4.1.scm
scheme
Notice that we cannot tell whether the metacircular evaluator evaluates operands from left to right or from right to left. Its evaluation order is inherited from left to right, then list-of-values will evaluate operands from left to right; and if the arguments to cons are evaluated from right to left, then list-of-...
the underlying : If the arguments to cons in list - of - values are evaluated from (define (list-of-values-ltr exp env) (if (no-operands? exps) '() (let* ((left (eval (first-operands exps) env)) (right (eval (rest-operands exps) env))) (cons left right)))) (define (list-of-value...
f67fec44ed81513a2cfda396b2b7303e318563d9e2535e22f16523ef511c607d
Hexstream/cartesian-product-switch
defsys.lisp
(in-package #:cartesian-product-switch) (defclass definitions-system (defsys:standard-system) ()) (defvar *definitions* (make-instance 'definitions-system)) (setf (defsys:locate (defsys:root-system) 'cartesian-product-switch:testclause) *definitions*) (defgeneric lambda-list (object)) (defgeneric expander (...
null
https://raw.githubusercontent.com/Hexstream/cartesian-product-switch/26d590eba02166a7812e0ad5f42589b085cc94c6/defsys.lisp
lisp
Not robust in the face of misplaced &environment.
(in-package #:cartesian-product-switch) (defclass definitions-system (defsys:standard-system) ()) (defvar *definitions* (make-instance 'definitions-system)) (setf (defsys:locate (defsys:root-system) 'cartesian-product-switch:testclause) *definitions*) (defgeneric lambda-list (object)) (defgeneric expander (...
c6e89ceb84fab1ef8d4992e06370a356cb905eefa805a1742f0eb26b305c9605
armstnp/advent-of-code-2019
core.clj
(ns advent-of-code-2019.core (:require [clojure.java.io :as io])) (defn read-input [filename] (slurp (io/resource filename))) (def zero-char-val (int \0)) (defn parse-int [n] (cond (string? n) (Integer/parseInt n) (char? n) (- (int n) zero-char-val))) (defn transpose "Transposes the given nested...
null
https://raw.githubusercontent.com/armstnp/advent-of-code-2019/68e21174394d8b0e14433f9f249e995c10ac6d67/src/advent_of_code_2019/core.clj
clojure
(ns advent-of-code-2019.core (:require [clojure.java.io :as io])) (defn read-input [filename] (slurp (io/resource filename))) (def zero-char-val (int \0)) (defn parse-int [n] (cond (string? n) (Integer/parseInt n) (char? n) (- (int n) zero-char-val))) (defn transpose "Transposes the given nested...
4de21faf13119f5c2bf6680073ce597566c68a4e47f4e783f27c20e38c98a85c
ghc/packages-Cabal
HackageBenchmark.hs
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # module HackageBenchmark ( hackageBenchmarkMain -- Exposed for testing: , CabalResult(..) , isSignificantTimeDifference , combineTrialResults , isSignificantResult , shouldContinueAfterFirstTrial ) where impo...
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/solver-benchmarks/HackageBenchmark.hs
haskell
Exposed for testing: The maximum length of the heading and package names. When the output contains both trails and summaries, label each row as "trial" or "summary". TODO: Print index state. A non-existent store directory prevents cabal from reading the store, which would cause the size of the store to affect ru...
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # module HackageBenchmark ( hackageBenchmarkMain , CabalResult(..) , isSignificantTimeDifference , combineTrialResults , isSignificantResult , shouldContinueAfterFirstTrial ) where import Control.Monad (forM_,...
29b230d0779516e8103ae5eff056b29bb022b8be0d5f2d988103a9233e72a4af
quux00/go-lightly
google_lamina.clj
(ns thornydev.go-lightly.search.google-lamina (:use lamina.core) (:import (java.util.concurrent TimeoutException))) Note : this version was one of my early attempts to mimic 's fake - google - search example using only Clojure , lamina and Java ;; (meaning nothings from the go-lightly library) ;; This is fair...
null
https://raw.githubusercontent.com/quux00/go-lightly/815052a72af678e8c84d7a9716c50f7008d8971e/go-lightly-examples/clj-examples/src/thornydev/go_lightly/search/google_lamina.clj
clojure
(meaning nothings from the go-lightly library) This is fairly rough code, exploring various options often resulting in clunky stuff. Leaving here for others to improve on - what is the best way to do this only with lamina? ---[ Google 1.0 Search ]--- ;; ---[ Google 2.0 Search ]--- ;; ---[ Google 2.1 Search ]---...
(ns thornydev.go-lightly.search.google-lamina (:use lamina.core) (:import (java.util.concurrent TimeoutException))) Note : this version was one of my early attempts to mimic 's fake - google - search example using only Clojure , lamina and Java (defn now [] (System/currentTimeMillis)) (defn since [start] ...
468d0d3054bede427d4544e9e2e1470abcb452a7571c437e7a9513afafc4cef5
camlspotter/ocaml-zippy-tutorial-in-japanese
highk.ml
module MG(A : sig type ' a ' m val return : ' a - > ' a ' m val bind : ' a ' m - > ( ' a - > ' b ' m ) - > ' b ' m end ) = struct include A let fmap f am = bind am ( fun a - > return ( f a ) ) end module MG(A : sig type 'a 'm val return : 'a -> 'a 'm val bind : 'a 'm -> ('a -> 'b 'm) -...
null
https://raw.githubusercontent.com/camlspotter/ocaml-zippy-tutorial-in-japanese/c6aeabc08b6e2289a0e66c5b94a89c6723d88a6a/t/highk.ml
ocaml
module MG(A : sig type ' a ' m val return : ' a - > ' a ' m val bind : ' a ' m - > ( ' a - > ' b ' m ) - > ' b ' m end ) = struct include A let fmap f am = bind am ( fun a - > return ( f a ) ) end module MG(A : sig type 'a 'm val return : 'a -> 'a 'm val bind : 'a 'm -> ('a -> 'b 'm) -...
6256c0c0eb216ade01205e0c53d0140caec82da5b47e222fddeeffb4c61bf321
hasktorch/ffi-experimental
GradSpec.hs
module GradSpec (spec) where import Test.Hspec import Control.Exception.Safe import Torch.Tensor import Torch.DType import Torch.TensorFactories import Torch.Functions import Torch.TensorOptions import Torch.Autograd spec :: Spec spec = do it "grad with ones" $ do xi <- makeIndependent $ ones' [] let x = t...
null
https://raw.githubusercontent.com/hasktorch/ffi-experimental/54192297742221c4d50398586ba8d187451f9ee0/hasktorch/test/GradSpec.hs
haskell
module GradSpec (spec) where import Test.Hspec import Control.Exception.Safe import Torch.Tensor import Torch.DType import Torch.TensorFactories import Torch.Functions import Torch.TensorOptions import Torch.Autograd spec :: Spec spec = do it "grad with ones" $ do xi <- makeIndependent $ ones' [] let x = t...
f255368788fedc1c50e964eed7dca322d27768a56086a88290ad932367be82ea
binaryage/cljs-oops
oget_static.cljs
(ns oops.arena.oget-static (:require-macros [oops.arena.macros :refer [macro-identity]]) (:require [oops.core :refer [oget]] [oops.tools :refer [init-arena-test! done-arena-test! testing]])) (init-arena-test!) ; we are compiling under advanced mode ; ---- ; following code is expected to get elided (...
null
https://raw.githubusercontent.com/binaryage/cljs-oops/a2b48d59047c28decb0d6334e2debbf21848e29c/test/src/arena/oops/arena/oget_static.cljs
clojure
we are compiling under advanced mode ---- following code is expected to get elided ---- following code is expected get collapsed to simple console.log calls
(ns oops.arena.oget-static (:require-macros [oops.arena.macros :refer [macro-identity]]) (:require [oops.core :refer [oget]] [oops.tools :refer [init-arena-test! done-arena-test! testing]])) (init-arena-test!) (testing "simple get" (oget #js {"key" "val"} "key")) (testing "simple miss" (oget #j...
e0f52ae673c476d7b7d5e022c974da47409fa0076140f009ef30f110caaf15fd
nixz/cl-vr
package.lisp
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- ;;;; ========================================================================== ;;;; package.lisp --- describing the matrix package ;;;; Copyright ( c ) 2013 , < > ;;;; All rights reserved. ;;;; ;;;; Redistribution and use in source and binary forms, with or without...
null
https://raw.githubusercontent.com/nixz/cl-vr/145aa3505a09e996101972faaed6250fa1164d07/package.lisp
lisp
-*- Mode: Lisp; indent-tabs-mode: nil -*- ========================================================================== package.lisp --- describing the matrix package All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following co...
Copyright ( c ) 2013 , < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT (in-package #:cl-us...
ed36182cc8b73d82de779fbb733a0e6f10f496f51ad5e1b593a7fc2f551ac334
jarohen/yoyo
component_test.clj
(ns yoyo.component-test (:require [yoyo.component :refer :all] [com.stuartsierra.component :as c] [clojure.test :refer :all])) (deftest yoyo-in-component-test (let [!events (atom []) component (->YoyoComponent (fn [latch] (swap! !events conj :co...
null
https://raw.githubusercontent.com/jarohen/yoyo/b579d21becd06b5330dee9f5963708db03ce1e25/modules/component/test/yoyo/component_test.clj
clojure
(ns yoyo.component-test (:require [yoyo.component :refer :all] [com.stuartsierra.component :as c] [clojure.test :refer :all])) (deftest yoyo-in-component-test (let [!events (atom []) component (->YoyoComponent (fn [latch] (swap! !events conj :co...
8cb6c438766c6e4f618fff078e21ab7216406c8b827c97fac01b85d2826ce40b
yzh44yzh/practical_erlang
main.erl
-module(main). -export([sample_champ/0, get_stat/1, filter_sick_players/1, make_pairs/2]). -include_lib("eunit/include/eunit.hrl"). sample_champ() -> [ {team, "Crazy Bulls", [{player, "Big Bull", 22, 545, 99}, {player, "Small Bull", 18, 324, 95}, {player, "Bull Bob", 1...
null
https://raw.githubusercontent.com/yzh44yzh/practical_erlang/c9eec8cf44e152bf50d9bc6d5cb87fee4764f609/03_high_order_fun/exercise/main.erl
erlang
-module(main). -export([sample_champ/0, get_stat/1, filter_sick_players/1, make_pairs/2]). -include_lib("eunit/include/eunit.hrl"). sample_champ() -> [ {team, "Crazy Bulls", [{player, "Big Bull", 22, 545, 99}, {player, "Small Bull", 18, 324, 95}, {player, "Bull Bob", 1...
a8357cba52732e4a07fdf79bf4b97ebdd181deb488db479682ca7cf8a45e85f2
huangjs/cl
dlanst.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ " " f2cl6.l ,...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/lapack/lapack/dlanst.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ " " f2cl6.l , v 1.48 2008/08/24 00:56:27 rt...
31ce8f3af3f6df185c530b0a6df3f31763607741ff72c521678ab04a1865da44
pichi/epexercises
e310b.erl
More ( may be Prologish ) and faster version of e310 -module(e310b). -compile(export_all). to_words(L) -> string:tokens(L, " \t\n\r"). fill(T, W) -> F = fill_words(to_words(T), W), fill_(F). fill_([]) -> []; fill_([LL|F]) -> fill_(F, fill_line(LL, [])). fill_([], R) -> R; fill_([L|T], R) -> fill_(T, fill...
null
https://raw.githubusercontent.com/pichi/epexercises/d6383ad334bd6cf684b16225bffd33d6c3d2746f/Exercise3-10/e310b.erl
erlang
it will return lines and words on lines in reversed order benefit reveals when result should be build up to result text one word on line
More ( may be Prologish ) and faster version of e310 -module(e310b). -compile(export_all). to_words(L) -> string:tokens(L, " \t\n\r"). fill(T, W) -> F = fill_words(to_words(T), W), fill_(F). fill_([]) -> []; fill_([LL|F]) -> fill_(F, fill_line(LL, [])). fill_([], R) -> R; fill_([L|T], R) -> fill_(T, fill...
00a5cd569de3674b049363b97c0d2ef593d230354679e6dbda8e35702850d61a
OCamlPro/ocp-build
ocpArray.mli
(**************************************************************************) (* *) (* Typerex Libraries *) (* *) Copyrigh...
null
https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/libs/ocplib-lang/ocpArray.mli
ocaml
************************************************************************ Typerex Libraries ...
Copyright 2011 - 2017 OCamlPro SAS the GNU Lesser General Public License version 2.1 , with the val rev : 'a array -> unit
6dec5cef7056914b261efeca638ec0a16583e7860418cc5b8e06689331c8d782
ucsd-progsys/nate
big_int.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet Crista...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/num/big_int.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with $ I d : , v 1.22 2005/08/13 20:59:37 doligez E...
54a16c3d649b02d3c596bf6d6690ae679f45642bf4a6d2617c9bcbcb8fdd0a79
gonzojive/sbcl
run-program.impure.lisp
;;;; various RUN-PROGRAM tests with side effects This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; While most of SBCL is derived from the CMU CL system , the test ;;;; files (like this one) were written from scratch after the fork from CMU CL . ;;;; ;;;; This software...
null
https://raw.githubusercontent.com/gonzojive/sbcl/3210d8ed721541d5bba85cbf51831238990e33f1/tests/run-program.impure.lisp
lisp
various RUN-PROGRAM tests with side effects more information. files (like this one) were written from scratch after the fork This software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. In addition to definitions lower down the impur...
This software is part of the SBCL system . See the README file for While most of SBCL is derived from the CMU CL system , the test from CMU CL . (cl:in-package :cl-user) is the sigchld handler that RUN - PROGRAM sets up , which interfers ( sometimes the handler will manage to WAIT3 a process before (with-...
edad06176b7fd4135f608a00129901c30f461b06ec3f00baadedd159afae3567
haskell-mafia/mismi
Reliability.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # OPTIONS_GHC -fno - warn - missing - signatures # module Test.Reliability.Reliability where import Control.Monad.IO.Class import Mismi.Control import Mismi.S3 ...
null
https://raw.githubusercontent.com/haskell-mafia/mismi/f6df07a52c6c8b1cf195b58d20ef109e390be014/mismi-s3/test/Test/Reliability/Reliability.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # OPTIONS_GHC -fno - warn - missing - signatures # module Test.Reliability.Reliability where import Control.Monad.IO.Class import Mismi.Control import Mismi.S3 import P import qualifie...
5a12a6ddf0207a9dcc161d2eaf4dfcba379fa54e5af1bddb28abd3f47679668d
anlsh/picl
package.lisp
package.lisp (defpackage #:picl (:use #:cl) (:local-nicknames (#:alx #:alexandria) (#:dcl #:defclass-std)) (:shadow #:map #:count #:apply) (:export Interface #:make-iterator #:next Itertools #:chain #:combinations #:combinations-with-rep #:compress #:count #:cycle #:dropwhile ...
null
https://raw.githubusercontent.com/anlsh/picl/bbb81d1caee4d2e48724fac6a442384bfa3f29ee/src/package.lisp
lisp
Random other utils
package.lisp (defpackage #:picl (:use #:cl) (:local-nicknames (#:alx #:alexandria) (#:dcl #:defclass-std)) (:shadow #:map #:count #:apply) (:export Interface #:make-iterator #:next Itertools #:chain #:combinations #:combinations-with-rep #:compress #:count #:cycle #:dropwhile ...
f369d2bcaba2ed86f3731dd70cf8d2d300fe3bc0df1479c96ed006f42f41ae7d
Eduap-com/WordMat
dgbfa.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $...
null
https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/odepack/src/dgbfa.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl6.l , v 1d5cbacbb9...
3e10953db9b8c4c864de095c2d21ddab2a5b9e345c352dade352dbb98a1fc6da
garrigue/lablgl
test13.ml
#!/usr/bin/env lablglut Ported to lablglut by Issac Trotts on Tue Aug 6 21:18:31 MDT 2002 . #load "unix.cma" open Printf Copyright ( c ) 1994 . (* This program is freely distributable without licensing fees and is provided without guarantee or warrantee expressed or implied. This program is -not...
null
https://raw.githubusercontent.com/garrigue/lablgl/d76e4ac834b6d803e7a6c07c3b71bff0e534614f/LablGlut/examples/glut3.7/test/test13.ml
ocaml
This program is freely distributable without licensing fees and is provided without guarantee or warrantee expressed or implied. This program is -not- in the public domain.
#!/usr/bin/env lablglut Ported to lablglut by Issac Trotts on Tue Aug 6 21:18:31 MDT 2002 . #load "unix.cma" open Printf Copyright ( c ) 1994 . let window1 = ref (-1);; let window2 = ref (-1);; let win1reshaped = ref false;; let win2reshaped = ref false;; let win1displayed = ref false;; let win2display...
8800ed482e7851de54ef1f36ed0114a44f599158f195c12dfe5afba8d52da673
genmeblog/genuary
day09.clj
;; Architecture. ;; -79.pdf (ns genuary.2022.day09 (:require [clojure2d.core :as c2d] [fastmath.core :as m] [fastmath.random :as r] [fastmath.vector :as v] [clojure2d.color :as c] [clojure2d.extra.utils :as utils] [clojure2d.pixels :a...
null
https://raw.githubusercontent.com/genmeblog/genuary/cbfbb45192691c81f0e7716f4ebec119d429dc24/src/genuary/2022/day09.clj
clojure
Architecture. -79.pdf
(ns genuary.2022.day09 (:require [clojure2d.core :as c2d] [fastmath.core :as m] [fastmath.random :as r] [fastmath.vector :as v] [clojure2d.color :as c] [clojure2d.extra.utils :as utils] [clojure2d.pixels :as p] [clojure2d....
0ccd4a77aeb14d6e4bb802a18cc3ed08eaf9c34726988277580a6d9abf9f1547
zinid/delimcc
lwc.ml
Light - weight concurrency library with MVAR as the synchronization primitive The library is a slight modification of the code originally written and kindly shared by , July 18 , 2012 . The library is a slight modification of the code originally written and kindly shared by Christophe Deleuze, J...
null
https://raw.githubusercontent.com/zinid/delimcc/93ffd621051858e9fefdbeffd86a6112063a436a/lwc.ml
ocaml
A task to execute concurrently A process that executes the task The process wraps the task in a prompt and the termination handler The process prompt The queue of runnable processes Spawn a new task and continue with the parent process build a process return when finished or blocked voluntarily switc...
Light - weight concurrency library with MVAR as the synchronization primitive The library is a slight modification of the code originally written and kindly shared by , July 18 , 2012 . The library is a slight modification of the code originally written and kindly shared by Christophe Deleuze, J...
bc091888d98ae21739ab800dc67da806de8101a06d375df97ff567387de8ee78
NetworkVerification/nv
UnboxOptions.ml
open Nv_lang open Collections open Syntax open Nv_solution open Nv_datastructures open Nv_utils.OCamlUtils let ty_transformer (recursors : Transformers.recursors) ty = match ty with | TOption t -> If we write something like " let x = None in 5 " , the particular option type of x will be unbound . So for...
null
https://raw.githubusercontent.com/NetworkVerification/nv/aa48abcd1bf9d4b7167cfe83a94b44e446a636e8/src/lib/transformations/UnboxOptions.ml
ocaml
This takes advantage of the fact that the default value for bools is false Conveniently this happens to work
open Nv_lang open Collections open Syntax open Nv_solution open Nv_datastructures open Nv_utils.OCamlUtils let ty_transformer (recursors : Transformers.recursors) ty = match ty with | TOption t -> If we write something like " let x = None in 5 " , the particular option type of x will be unbound . So for...
7d6b23d0d35ff4f50751e4ebc5ffd582452bc2c7cb7078dc3e29c5532eb5531f
jyh/metaprl
itt_squash.ml
doc <:doc< @spelling{th unsquash unsquashed} @module[Itt_squash] The @tt[Itt_squash] module defines a @i[squash] type. <<squash{'A}>> hides computational content of $A$. <<squash{'A}>> is inhabited @emph{iff} $A$ is inhabited. When inhabited, <<squash{'A}>> contains only one element $@it$. That is...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/itt/core/itt_squash.ml
ocaml
*********************************************************************** * TERMS * *********************************************************************** *********************************************************************** * DISPLAY FORMS ...
doc <:doc< @spelling{th unsquash unsquashed} @module[Itt_squash] The @tt[Itt_squash] module defines a @i[squash] type. <<squash{'A}>> hides computational content of $A$. <<squash{'A}>> is inhabited @emph{iff} $A$ is inhabited. When inhabited, <<squash{'A}>> contains only one element $@it$. That is...
901cd4f24d1f24a574d5cc5bc0c2c2c4b48ab4ee6a0dea1b94924a46b92c3d79
WormBase/wormbase_rest
location.clj
(ns rest-api.classes.transposon.widgets.location (:require [rest-api.classes.sequence.core :as sequence-fns] [rest-api.classes.generic-fields :as generic])) (defn tracks [transposon] {:data ["TRANSPOSON_GENES" "TRANSPOSONS"] :description "tracks displayed in GBrowse"}) (defn jbrowse-tracks [t...
null
https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/transposon/widgets/location.clj
clojure
(ns rest-api.classes.transposon.widgets.location (:require [rest-api.classes.sequence.core :as sequence-fns] [rest-api.classes.generic-fields :as generic])) (defn tracks [transposon] {:data ["TRANSPOSON_GENES" "TRANSPOSONS"] :description "tracks displayed in GBrowse"}) (defn jbrowse-tracks [t...
f75b2158256eab36c7c1777e84e1c42789678e8df1ca8f16b7be706c36b05e36
heshrobe/joshua-dist
matcher.lisp
-*- Mode : Lisp ; Package : JI ; Syntax : Ansi - common - lisp -*- ;;;> ;;;> ***************************************************************************************** > * * ( c ) Copyright 1989 , 1988 Symbolics , Inc. All rights reserved . > * * Portions of font library Copyright ( c ) 1984 Bitstream , Inc. All R...
null
https://raw.githubusercontent.com/heshrobe/joshua-dist/4078b32ac8e87887ff8ab5bced38b0d48991672a/joshua/code/matcher.lisp
lisp
Package : JI ; Syntax : Ansi - common - lisp -*- > > ***************************************************************************************** > > The software, data, and information contained herein are proprietary > to keep such software, data, and information confidential and to preserve > them as trade secrets....
> * * ( c ) Copyright 1989 , 1988 Symbolics , Inc. All rights reserved . > * * Portions of font library Copyright ( c ) 1984 Bitstream , Inc. All Rights Reserved . > to , and comprise valuable trade secrets of , Symbolics , Inc. , which intends > Symbolics , Symbolics 3600 , Symbolics 3670 ( R ) , Symbolics 3675 ( ...
9b284a55ccb8e12645adce56d76f99cde123767d0452e4ef89c8d0b309cfc23a
njordhov/mclide
autostart.lisp
(defpackage autostart) (in-package :autostart) (defun logfile (name) similar as in mclide1 (merge-pathnames (make-pathname :directory ";com.in-progress.mclide" :name (format nil "~A-swank" (string-downcase name)) :type "log") ;; # should lookup path for logs from the OS! ...
null
https://raw.githubusercontent.com/njordhov/mclide/fab77f3b3c856ef211bbaf1158127669759f6fff/mclide/src/ccl-frontend/autostart.lisp
lisp
# should lookup path for logs from the OS! # generalize to other implementations!
(defpackage autostart) (in-package :autostart) (defun logfile (name) similar as in mclide1 (merge-pathnames (make-pathname :directory ";com.in-progress.mclide" :name (format nil "~A-swank" (string-downcase name)) :type "log") (full-pathname "home:Library;Logs;"))) (defun...
fc69989b77c46f8932cea55ce0f287fb362bd2af513c38714a78f21b5ef67c04
ocramz/algebraic-graphs-io
Conduit.hs
# options_ghc -Wno - unused - imports -Wno - unused - top - binds # -- | Miscellaneous conduit-related functionality -- -- Networking, compression module Algebra.Graph.IO.Internal.Conduit (fetchTarGz, unTarGz, fetch) where import Control.Monad (when) import Control.Monad.IO.Class (MonadIO(..)) import Data.Function ((&...
null
https://raw.githubusercontent.com/ocramz/algebraic-graphs-io/44fd6d701e1bb9782e42b14470d4eb8878f8e47f/src/Algebra/Graph/IO/Internal/Conduit.hs
haskell
| Miscellaneous conduit-related functionality Networking, compression bytestring conduit conduit-extra filepath exceptions http-conduit primitive tar-conduit | Download a file ^ directory where to store archive contents ^ process the content of each file that satisfies the predicate
# options_ghc -Wno - unused - imports -Wno - unused - top - binds # module Algebra.Graph.IO.Internal.Conduit (fetchTarGz, unTarGz, fetch) where import Control.Monad (when) import Control.Monad.IO.Class (MonadIO(..)) import Data.Function ((&)) import Data.ByteString (ByteString) import Conduit (MonadUnliftIO(..), Mona...
80d1d127dca1c2c72d8f5ee93c9c45f3d607b3cdf7a2636982534aa4e6454bc1
hannesm/conex
conex_unix_provider.mli
(** Unix IO provider *) (** [fs_provider path] is a data provider backed by a file system or error. *) val fs_provider : string -> (Conex_io.t, string) result (** [fs_ro_provider path] is a read-only data provider backed by a file system or error. *) val fs_ro_provider : string -> (Conex_io.t, string) result
null
https://raw.githubusercontent.com/hannesm/conex/24547cd746915431c72ee7e929d39208f65f4100/unix/conex_unix_provider.mli
ocaml
* Unix IO provider * [fs_provider path] is a data provider backed by a file system or error. * [fs_ro_provider path] is a read-only data provider backed by a file system or error.
val fs_provider : string -> (Conex_io.t, string) result val fs_ro_provider : string -> (Conex_io.t, string) result
861c371e411b7ca709e2d5f3678033043ff5519d2941cdfca5c50e4e348807a9
c4-project/c4f
constant.ml
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
null
https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fir/test/constant.ml
ocaml
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
43dfafc3c1799029cfa2dfb8ee870124ee2f9db089b3ff56d55b893443676822
igrep/typesafe-precure
Profiles.hs
# OPTIONS_GHC -fno - warn - missing - signatures # {-# LANGUAGE OverloadedStrings #-} module ACME.PreCure.Textbook.Suite.Profiles where import ACME.PreCure.Index.Types import ACME.PreCure.Textbook.Suite.Words girls :: [Girl] girls = [ mkGirl "Hibiki Hojo" girlName_Hibiki , mkGirl ...
null
https://raw.githubusercontent.com/igrep/typesafe-precure/fc94f5f2c0ca8d8acc0b8eabe890a85bc305d7b3/src/ACME/PreCure/Textbook/Suite/Profiles.hs
haskell
# LANGUAGE OverloadedStrings #
# OPTIONS_GHC -fno - warn - missing - signatures # module ACME.PreCure.Textbook.Suite.Profiles where import ACME.PreCure.Index.Types import ACME.PreCure.Textbook.Suite.Words girls :: [Girl] girls = [ mkGirl "Hibiki Hojo" girlName_Hibiki , mkGirl "Kanade Minamino" girlName_Kanade ...
2cd7230c01d3a5f411e6d4e7f11d393a17c8c9596507436e16bfab526d27500b
diffusionkinetics/open
Contour.hs
# LANGUAGE OverloadedStrings , FlexibleContexts # import Lucid import Lucid.Html5 import Graphics.Plotly import Graphics.Plotly.Lucid import Graphics.Plotly.GoG import Lens.Micro import qualified Data.Text.Lazy as T import qualified Data.Text.Lazy.IO as T -- We'd like to generate -- < script > Plotly.newPlot('myCo...
null
https://raw.githubusercontent.com/diffusionkinetics/open/673d9a4a099abd9035ccc21e37d8e614a45a1901/plotlyhs/tests/Contour.hs
haskell
We'd like to generate {}, {displayModeBar: false}); </script>
# LANGUAGE OverloadedStrings , FlexibleContexts # import Lucid import Lucid.Html5 import Graphics.Plotly import Graphics.Plotly.Lucid import Graphics.Plotly.GoG import Lens.Micro import qualified Data.Text.Lazy as T import qualified Data.Text.Lazy.IO as T < script > Plotly.newPlot('myContour ' , [ { " z":[[10 , 10...
6b9c826c0f57139c4e6ca386a1fe03a5c638ea596a4894443ccd65f05cde4c91
borkdude/advent-of-cljc
iamdrowsy.cljc
(ns aoc.y2018.d03.iamdrowsy (:require [aoc.utils :as u :refer [deftest]] [aoc.y2018.d03.data :refer [input answer-1 answer-2]] [clojure.test :refer [is testing]] [com.rpl.specter :as s] [clojure.string :as str] [clojure.set :as set])) (def line-re #"#(\d+) @ (\d+),(\d+): (\d+)x(\d+)") (def...
null
https://raw.githubusercontent.com/borkdude/advent-of-cljc/17c8abb876b95ab01eee418f1da2e402e845c596/src/aoc/y2018/d03/iamdrowsy.cljc
clojure
(ns aoc.y2018.d03.iamdrowsy (:require [aoc.utils :as u :refer [deftest]] [aoc.y2018.d03.data :refer [input answer-1 answer-2]] [clojure.test :refer [is testing]] [com.rpl.specter :as s] [clojure.string :as str] [clojure.set :as set])) (def line-re #"#(\d+) @ (\d+),(\d+): (\d+)x(\d+)") (def...
2d39159e08a3ac4e66ce1c9abb1540374235b665c410ced3dad8ce20255df346
lukeg101/lplzoo
LF.hs
| Module : LF Description : Deep - embedding of the Pure first - order dependent types in Haskell . Copyright : ( c ) , 2019 License : GPL-3 Maintainer : Stability : stable Portability : POSIX The " LF " module denotes the AST and operations for the Edinburgh Logical Framework . T...
null
https://raw.githubusercontent.com/lukeg101/lplzoo/48de580b44c2c185609bea4e66a45589d3aa8213/LF/LF.hs
haskell
Tool Imports. | Simple show instance for kinds | Helper function returns true if the term is a type family. purely to make parsing easier, typing allows only T t equivalence of types compares the trees of each type | We do typed definitional equality with beta reduction here as the language is stronly normalising...
| Module : LF Description : Deep - embedding of the Pure first - order dependent types in Haskell . Copyright : ( c ) , 2019 License : GPL-3 Maintainer : Stability : stable Portability : POSIX The " LF " module denotes the AST and operations for the Edinburgh Logical Framework . T...
b957f7c17aba3caeba03402234327641865975b1b3b3b894a6afbc8afe92bec8
OlivierSohn/hamazed
PressedKeys.hs
# LANGUAGE DeriveGeneric # module Imj.Music.PressedKeys ( onMusic , releaseAllKeys , addNote , removeNote ) where import qualified Data.Map.Strict as Map import Imj.Music.Types import Imj.Music.Instrument # INLINABLE addNote # addNote :: Ord i => InstrumentN...
null
https://raw.githubusercontent.com/OlivierSohn/hamazed/ada0a85f6664eee444440fb04f33a85249179953/imj-music/src/Imj/Music/PressedKeys.hs
haskell
mayNote is Nothing only if the value was not in the map. | Returns the [MusicalEvent] such that the piano plays no note. # INLINABLE onMusic # ^ returns the number of changed notes (added or removed)
# LANGUAGE DeriveGeneric # module Imj.Music.PressedKeys ( onMusic , releaseAllKeys , addNote , removeNote ) where import qualified Data.Map.Strict as Map import Imj.Music.Types import Imj.Music.Instrument # INLINABLE addNote # addNote :: Ord i => InstrumentN...
1d7aa82883126c9787f8dfde244082c09dbedb57c9c20eac7b7ff55ea6fe5bc8
rowangithub/DOrder
topological.ml
(**************************************************************************) (* *) : a generic graph library for OCaml Copyright ( C ) 2004 - 2007 , and (* ...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/external/ocamlgraph/src/topological.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
: a generic graph library for OCaml Copyright ( C ) 2004 - 2007 , and modify it under the terms of the GNU Library General Public License version 2 , with the special exception on linking i $ I d :...
e9067a563d67022071f191724e19c7e1c89cc1296bcc994bf6542372a1dd33e5
skeuchel/needle
AG.hs
UUAGC 0.9.52.1 ( src / Coq / AG.ag ) module Coq.AG where import Coq.Syntax # LINE 10 " src / Coq / Syntax.ag " # import Coq.Syntax.Core # LINE 10 " src / Coq / AG.hs " # # LINE 3 " src / Coq / AG.ag " # defaultValues :: Inh_Root defaultValues = (Inh_Root {}) # LINE 15 " src / Coq / AG.hs " # -- Annotation -------...
null
https://raw.githubusercontent.com/skeuchel/needle/25f46005d37571c1585805487a47950dcd588269/src/Coq/AG.hs
haskell
Annotation -------------------------------------------------- cata semantic domain Assertion --------------------------------------------------- cata semantic domain ------------------------------------------ cata semantic domain Binder ------------------------------------------------------ cata semantic dom...
UUAGC 0.9.52.1 ( src / Coq / AG.ag ) module Coq.AG where import Coq.Syntax # LINE 10 " src / Coq / Syntax.ag " # import Coq.Syntax.Core # LINE 10 " src / Coq / AG.hs " # # LINE 3 " src / Coq / AG.ag " # defaultValues :: Inh_Root defaultValues = (Inh_Root {}) # LINE 15 " src / Coq / AG.hs " # sem_Annotation :: Ann...
e832b9206b910e730979117cf61a31baa99aab1dd8ce6655b2ef9f16085b8ee4
l-x/deeperl
deeperl_client_SUITE.erl
-module(deeperl_client_SUITE). -behavior(gen_deeperl_method). -include_lib("deeperl_ct.hrl"). -compile(export_all). all() -> [ badrequest, authfailed, forbidden, notfound, requestsize, notsupported, toomanyrequests, quotaexceeded, resourceuna...
null
https://raw.githubusercontent.com/l-x/deeperl/2dc9f7d80277364fbc6517b3f6d4fa3677253801/test/deeperl_client_SUITE.erl
erlang
Not sure if this is no error in the official api docs
-module(deeperl_client_SUITE). -behavior(gen_deeperl_method). -include_lib("deeperl_ct.hrl"). -compile(export_all). all() -> [ badrequest, authfailed, forbidden, notfound, requestsize, notsupported, toomanyrequests, quotaexceeded, resourceuna...
5ff5513f5ebb6b4ecb967051c21e158f1f2bf5ba1aa891549ec46bdde1187647
s-cerevisiae/leetcode-racket
160-intersection-of-two-linked-lists.rkt
#lang racket (require "list-node.rkt") (module+ test (define (list->list-node lst) (foldr list-node #f lst)) (define (list-node-append head-a head-b) (let loop ([node head-a]) (if (not (list-node-next node)) (set-list-node-next! node head-b) (loop (list-node-next node)))) head-a...
null
https://raw.githubusercontent.com/s-cerevisiae/leetcode-racket/e610464f05d23c2306c4cd8a0c74b5f1c401e96f/160-intersection-of-two-linked-lists.rkt
racket
#lang racket (require "list-node.rkt") (module+ test (define (list->list-node lst) (foldr list-node #f lst)) (define (list-node-append head-a head-b) (let loop ([node head-a]) (if (not (list-node-next node)) (set-list-node-next! node head-b) (loop (list-node-next node)))) head-a...
8c4477b3337d3c735107f5bb7b0e1931e229b35f72b37c0ababe8e1640b03051
tweag/webauthn
Client.hs
# LANGUAGE BinaryLiterals # # LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} # LANGUAGE RecordWildCards # -- | This modules provdes a way to emulate certain client behaviour for testing purposes . It DOES NOT implement the webauthn specification because there is -- no need for it in our tests. module Emulation.Client ...
null
https://raw.githubusercontent.com/tweag/webauthn/4ca10ed4f7edd098540a4615b60249c1637cc47b/tests/Emulation/Client.hs
haskell
# LANGUAGE GADTs # | This modules provdes a way to emulate certain client behaviour for testing no need for it in our tests. | The annotated Origin is the origin with the derived (or provided) rpID. It is a workaround for the fact that we do not derive the rpID from the origin. See: #concept-origin-effective-domai...
# LANGUAGE BinaryLiterals # # LANGUAGE DataKinds # # LANGUAGE RecordWildCards # purposes . It DOES NOT implement the webauthn specification because there is module Emulation.Client ( AnnotatedOrigin (..), UserAgentNonConformingBehaviour (..), UserAgentConformance, clientAssertion, clientAttestation...
e8caf67cef4f077b8b8d408d80770ca81331c27cb673100cd7e9652e23587930
noloop/cacau
min-test.lisp
(in-package #:noloop.cacau-test) (r-test :test-min-reporter (lambda (r-done) (defsuite :suite-1 () (let ((x 0)) (defbefore-all "Before-all Suite-1" () (setf x 1)) (deftest "Test-1" () (eql-p x 1)) (deftest "Test-2" ((:async done)) (incf x) (funcall done (lambda () (eql...
null
https://raw.githubusercontent.com/noloop/cacau/ba0fb36a284ded884f1dab0bd3f0f41ec14e3038/t/reporter/min-test.lisp
lisp
31;43m<=> Cacau <=>
(in-package #:noloop.cacau-test) (r-test :test-min-reporter (lambda (r-done) (defsuite :suite-1 () (let ((x 0)) (defbefore-all "Before-all Suite-1" () (setf x 1)) (deftest "Test-1" () (eql-p x 1)) (deftest "Test-2" ((:async done)) (incf x) (funcall done (lambda () (eql...
14ccf330034d8aeeab9030c672d193ea14a7255231176b20f25d5198204a2855
mstksg/advent-of-code-2021
Day06.hs
-- | Module : AOC.Challenge . -- License : BSD3 -- -- Stability : experimental -- Portability : non-portable -- Day 6 . See " AOC.Solver " for the types used in this module ! module AOC.Challenge.Day06 ( day06a , day06b ) where import AOC.Common () import ...
null
https://raw.githubusercontent.com/mstksg/advent-of-code-2021/7c15d29a65c4c80a8d7c090bbf25f5fcbe9d5ea3/src/AOC/Challenge/Day06.hs
haskell
| License : BSD3 Stability : experimental Portability : non-portable this isn't going to bench very accurately because stepN n is auto-cached
Module : AOC.Challenge . Day 6 . See " AOC.Solver " for the types used in this module ! module AOC.Challenge.Day06 ( day06a , day06b ) where import AOC.Common () import AOC.Solver ((:~>)(..)) import Control.Monad ((<=<)) impo...
73c91f977040c34aae747f2529acdb78cb0cc80aa097a5ec6e34f12f73c43494
ChrisPenner/trek
JSON.hs
# LANGUAGE QuasiQuotes # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE RankNTypes #-} module Examples.Simple.JSON where import Control.Lens import Control.Monad.State import Text.RawString.QQ (r) import Data.Aeson import Data.Aeson.Lens import qualified ...
null
https://raw.githubusercontent.com/ChrisPenner/trek/26556b8157b38be94718dce7548f81350772d072/trek-examples/src/Examples/Simple/JSON.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # No need for anything tricky
# LANGUAGE QuasiQuotes # # LANGUAGE TypeApplications # # LANGUAGE ScopedTypeVariables # module Examples.Simple.JSON where import Control.Lens import Control.Monad.State import Text.RawString.QQ (r) import Data.Aeson import Data.Aeson.Lens import qualified Data.Text as T import qualified Data.Map as M import Control.Ap...
04936107ecb41744c2b3150f1a428468c59aa79b384a0815322730943592a963
tweag/ormolu
expected-result-6-8.hs
# LANGUAGE LambdaCase # module Foo ( foo, bar, baz) where foo :: Int foo = 5 bar :: Int -> Int bar = \case 0 -> foo x -> x - foo baz :: Int -> Int baz = gege where gege = 1 + 2
null
https://raw.githubusercontent.com/tweag/ormolu/897e6736ec17d7e359091abe3c24f4abfec015c4/region-tests/expected-result-6-8.hs
haskell
# LANGUAGE LambdaCase # module Foo ( foo, bar, baz) where foo :: Int foo = 5 bar :: Int -> Int bar = \case 0 -> foo x -> x - foo baz :: Int -> Int baz = gege where gege = 1 + 2
052d65112071e19f6e1d8f69491ca0ad3b4c64274de436b72ed3c03ea25aeb2c
well-typed/visualize-cbn
String.hs
module CBN.Util.Doc.Rendered.String (toString) where import Data.List (intercalate) import CBN.Util.Doc.Rendered toString :: Rendered () -> String toString = intercalate "\n" . map (ignoreStyle . rTrim) . rendered where ignoreStyle :: [Maybe ((), Char)] -> String ignoreStyle = map $ \mc -> case mc of ...
null
https://raw.githubusercontent.com/well-typed/visualize-cbn/499a8bc806ce03ce6d1bc12df1ea6e6df7768817/src/CBN/Util/Doc/Rendered/String.hs
haskell
padding
module CBN.Util.Doc.Rendered.String (toString) where import Data.List (intercalate) import CBN.Util.Doc.Rendered toString :: Rendered () -> String toString = intercalate "\n" . map (ignoreStyle . rTrim) . rendered where ignoreStyle :: [Maybe ((), Char)] -> String ignoreStyle = map $ \mc -> case mc of ...
0a9fecef89ff7dff51536eb06229d1fb705f00895912c5eab294135afa785e2a
kit-ty-kate/visitors
test02.cppo.ml
type term = | TUnit | TIntLiteral of int | TVar of string | TLambda of string * term | TApp of term * term #if OCAML_VERSION >= (4, 03, 0) | TPair of { fst: term; snd: term } #endif | TTuple of term_list and term_list = | TLNil | TLCons of (term * term_list) [@@deriving visitors { variety = "it...
null
https://raw.githubusercontent.com/kit-ty-kate/visitors/fc53cc486178781e0b1e581eced98e07facb7d29/test/test02.cppo.ml
ocaml
type term = | TUnit | TIntLiteral of int | TVar of string | TLambda of string * term | TApp of term * term #if OCAML_VERSION >= (4, 03, 0) | TPair of { fst: term; snd: term } #endif | TTuple of term_list and term_list = | TLNil | TLCons of (term * term_list) [@@deriving visitors { variety = "it...
b41dea51b2661b4c535f1bd550fe5550829c23c04dd20b578159830e2b2f7c32
VinylRecords/Vinyl
Core.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE BangPatterns # {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE MultiPara...
null
https://raw.githubusercontent.com/VinylRecords/Vinyl/76323e2d0e72ca78c943e998039770d7e93a8163/Data/Vinyl/Core.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE Trustworthy # # LANGUAGE TypeOperators # | Core vinyl definitions. The 'Rec' dat...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE BangPatterns # # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # #if __GLASGOW_HASKELL__ >= 806 # ...