_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
cedfcbf8758307b513a03d8fbeaa615add72c90613b32f5898b14b02e901e757
coq/coq
loadpath.mli
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/ed7237f7435e03043a4ef2f096777f0a93da1102/vernac/loadpath.mli
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
009b55b5b4bdf1df2559a99ecf916f71c3db5bcd1283a0b23847d295531666cf
cl-fui/subtext
utf8.lisp
(in-package :swa) (defun utf8-encode (string &key (start 0) (end (length string))) "Convert a lisp string to UTF" (declare (type string string) (type fixnum start end)) #+allegro (excl:string-to-octets string :start start :end end :null-terminate nil :external-format :utf8) #+ccl (ccl:encode-str...
null
https://raw.githubusercontent.com/cl-fui/subtext/28cfc31007664552257bd4d04370f7365030ab2e/demo/repl/swank/utf8.lisp
lisp
(in-package :swa) (defun utf8-encode (string &key (start 0) (end (length string))) "Convert a lisp string to UTF" (declare (type string string) (type fixnum start end)) #+allegro (excl:string-to-octets string :start start :end end :null-terminate nil :external-format :utf8) #+ccl (ccl:encode-str...
67eeeb32090a9a5ec2a35ddf1dac560c61461f461cb5cc1139b4bd433c983b1b
juliannagele/ebso
test_opcode.ml
Copyright 2019 and under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software distributed under ...
null
https://raw.githubusercontent.com/juliannagele/ebso/8e516036fcb98074b6be14fc81ae020f76977712/test/test_opcode.ml
ocaml
Copyright 2019 and under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software distributed under ...
46afdf3cdbf123289d3da76df18ef549654b84b834b9baac7328b877444cbde1
phylogeography/spread
output_data.cljc
(ns shared.output-data) (defn data-bounding-box [output-data] (let [point-attrs (:pointAttributes output-data) find-attr (fn [attr-id] (some #(when (= (:id %) attr-id) %) point-attrs)) [min-lon max-lon] (:range (find-attr "xCoordinate")) ...
null
https://raw.githubusercontent.com/phylogeography/spread/56f3500e6d83e0ebd50041dc336ffa0697d7baf8/src/cljc/shared/output_data.cljc
clojure
(ns shared.output-data) (defn data-bounding-box [output-data] (let [point-attrs (:pointAttributes output-data) find-attr (fn [attr-id] (some #(when (= (:id %) attr-id) %) point-attrs)) [min-lon max-lon] (:range (find-attr "xCoordinate")) ...
74bc032961d3c745ac6e773f711d86869e634fb0dc742b7bbec1f6623659136b
gildor478/ocaml-fileutils
FilePath_type.ml
(******************************************************************************) (* ocaml-fileutils: files and filenames common operations *) (* *) Copyright ( C ) 2003 - 2014 , (* ...
null
https://raw.githubusercontent.com/gildor478/ocaml-fileutils/9ad8d2ee342c551391f2a9873de01982d24b36d5/src/lib/fileutils/FilePath_type.ml
ocaml
**************************************************************************** ocaml-fileutils: files and filenames common operations This libra...
Copyright ( C ) 2003 - 2014 , the Free Software Foundation ; either version 2.1 of the License , or ( at You should have received a copy of the GNU Lesser General Public License along with this library ; if not , write to the Free Software Foundation , Inc. , 51 Franklin St , Fifth Floor , Bo...
540421c02ddb86fb7799725896825c602ae8a9a3a4f5646896d1fd6c91a0f510
souenzzo/souenzzo.github.io
main_test.clj
(ns br.com.souenzzo.mpr.main-test (:require [datomic.api :as d] [clojure.test :refer [deftest]] [midje.sweet :refer [fact =>]] [clojure.core.async :as async]) (:import (java.util.concurrent TimeUnit BlockingQueue) (java.time Duration))) (set! *warn-on-reflection* true...
null
https://raw.githubusercontent.com/souenzzo/souenzzo.github.io/30a811c4e5633ad07bba1d58d19eb091dac222e9/mpr/src/br/com/souenzzo/mpr/main_test.clj
clojure
(ns br.com.souenzzo.mpr.main-test (:require [datomic.api :as d] [clojure.test :refer [deftest]] [midje.sweet :refer [fact =>]] [clojure.core.async :as async]) (:import (java.util.concurrent TimeUnit BlockingQueue) (java.time Duration))) (set! *warn-on-reflection* true...
cdc7930445a4274eb940d45f6a75a0400a19199c840130ad1fb6610d1d18dced
hyperfiddle/electric
datomic_contrib_2020.clj
(ns contrib.datomic-contrib-2020 (:require [contrib.datomic-contrib :refer [identify]] clojure.set [contrib.data :refer [update-existing]] [hyperfiddle.rcf :refer [tests]])) (defn attr-unreverse [a] {:pre [(-> (name a) (subs 0 1) (= "_"))]} (keyword (namespace a) (-> (name a) ...
null
https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/src/contrib/datomic_contrib_2020.clj
clojure
unique scalars can't be pulled in reverse unique ref doesn't imply that _no other attr_ points to the entityvalue bootstrap careful :db/id is currently addressable (e.g. user wants to render that column) avoid destructuring, nth was too slow rename to attr-map component haystack must have all the needles no i...
(ns contrib.datomic-contrib-2020 (:require [contrib.datomic-contrib :refer [identify]] clojure.set [contrib.data :refer [update-existing]] [hyperfiddle.rcf :refer [tests]])) (defn attr-unreverse [a] {:pre [(-> (name a) (subs 0 1) (= "_"))]} (keyword (namespace a) (-> (name a) ...
30135ed1d321a21a340a8b99a1cfd6bcdc6b460b3d9356328b8adf64e0cdb1d8
ocsigen/ocaml-eliom
terms.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/misc-kb/terms.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 type term = Var of int | Term of string * term list let rec union l1 l2 = match l1 with [] ...
a8e80c6ed351d5a2cddae6e883d730fdfb9b9090aed17aaa4982eab5aefcec9c
pmembrey/molderl
molderl_recovery.erl
-ifdef(TEST). -include_lib("eunit/include/eunit.hrl"). -endif. -module(molderl_recovery). -behaviour(gen_server). -export([start_link/1, store/4]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -compile([{parse_transform, lager_transform}]). -record(state, { ...
null
https://raw.githubusercontent.com/pmembrey/molderl/10e9a6faeb73a0bc601ade5bd1ea1484957c33c3/src/molderl_recovery.erl
erlang
Socket to send data on Stream name for encoding the response sequence number of last msg block stored maximum packet size of messages in bytes size on disk of msg blocks store ignore recovery requests with counts above this cache the StatsD keys to prevent repeated atom_to_list/1 calls and concatenation so that...
-ifdef(TEST). -include_lib("eunit/include/eunit.hrl"). -endif. -module(molderl_recovery). -behaviour(gen_server). -export([start_link/1, store/4]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -compile([{parse_transform, lager_transform}]). -record(state, { ...
c578b0b63f71c14e12757ced13291d4bc1d21642dd1b4e6e9b8f75bf4e1b73bc
jordanthayer/ocaml-search
lsslrtastar.ml
(* LSS-LRTA*) let astar look_ahead openlist closedlist i setpos getpos sface better_p = * Simple implementation of A * search , which lsslrtastar relies on . Technically it is n't A * , but any best first algorithm . You just have to change the ordering of the openlist when you construct it in [ search ]...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/realtime/lsslrtastar.ml
ocaml
LSS-LRTA should [kid] be inserted into open and closed? Limit.new_incumbent i (Limit.Incumbent (0., next)); returns true when goal is found
let astar look_ahead openlist closedlist i setpos getpos sface better_p = * Simple implementation of A * search , which lsslrtastar relies on . Technically it is n't A * , but any best first algorithm . You just have to change the ordering of the openlist when you construct it in [ search ] . [ loo...
fafb93c73aff6fae44225bcd79bbd03df540630ab73347fa723af5f39a080d37
donaldsonjw/bigloo
musicplay.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / api / wav / examples / musicplay.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/api/wav/examples/musicplay.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ *=====================================================================*/ *---------------------------...
* serrano / prgm / project / bigloo / api / wav / examples / musicplay.scm * / * Author : * / * Creation : Sun Jun 26 07:30:16 2011 * / * Last change : Sat Feb 23 19:42:57 2013 ( serrano ) * / * Co...
351f82d0a766127400982d09fa266a7b0cd7d6949f73675516658738133116af
vincenthz/hs-gauge
RootFinding.hs
# LANGUAGE BangPatterns , DeriveDataTypeable , DeriveGeneric # -- | Module : Statistics . Math . Copyright : ( c ) 2011 -- License : BSD3 -- -- Maintainer : -- Stability : experimental -- Portability : portable -- -- Haskell functions for finding the roots of mathematical functions. module Statistics...
null
https://raw.githubusercontent.com/vincenthz/hs-gauge/303a6b611804c85b9a6bc1cea5de4e6ce3429d24/statistics/Statistics/Math/RootFinding.hs
haskell
| License : BSD3 Maintainer : Stability : experimental Portability : portable Haskell functions for finding the roots of mathematical functions. * References $references | The result of searching for a root of a mathematical function. ^ The function does not have opposite signs when evaluated at the ...
# LANGUAGE BangPatterns , DeriveDataTypeable , DeriveGeneric # Module : Statistics . Math . Copyright : ( c ) 2011 module Statistics.Math.RootFinding ( Root(..) , fromRoot , ridders ) where import Control.Applicative import Control.Monad (MonadPlus(..), ap) import Data.Data (Data, Typeable...
ddf2a00778c22bf6923298ad0484a16a17fb3376da3b9b37f441a52d41d4cf04
gelisam/hawk
prelude.hs
{-# LANGUAGE ExtendedDefaultRules, OverloadedStrings #-} import Prelude import qualified Data.ByteString.Lazy.Char8 as B import qualified Data.List as L takeLast n = reverse . take n . reverse
null
https://raw.githubusercontent.com/gelisam/hawk/1775ab1cfea05e20d1b1a8c0a7b0fe6c4af4b7c5/tests/preludes/readme/prelude.hs
haskell
# LANGUAGE ExtendedDefaultRules, OverloadedStrings #
import Prelude import qualified Data.ByteString.Lazy.Char8 as B import qualified Data.List as L takeLast n = reverse . take n . reverse
c8756f18ade9b2a755ffdd304dd85c686a702cc802a47063dedd7e758a7828ce
zsol/hlogster
Buffer.hs
# LANGUAGE FlexibleContexts # module Buffer where import Control.Arrow (first) import Control.Monad.State.Lazy import qualified Data.ByteString.Char8 as SB import qualified Data.ByteString.Lazy.Char8 as B import qualified Data.CircularList as C import Data.Maybe...
null
https://raw.githubusercontent.com/zsol/hlogster/54879f5d8522d9685e4c607834931448cff5e92e/Buffer.hs
haskell
# SCC "process" # `time` is not newer nor older than buffer drop very old messages if buffer is at size
# LANGUAGE FlexibleContexts # module Buffer where import Control.Arrow (first) import Control.Monad.State.Lazy import qualified Data.ByteString.Char8 as SB import qualified Data.ByteString.Lazy.Char8 as B import qualified Data.CircularList as C import Data.Maybe...
44b283436601210935b101b066a646c5d93d46f84a3d4ee75011a8495cfd935b
aryx/xix
types5.ml
Copyright 2016 , see copyright.txt open Common module A = Ast_asm5 module T = Types (* a single line number is not enough anymore, we need also the filename *) type loc = Common.filename * Ast_asm5.loc (* with tarzan *) Split Asm5 instructions in code vs data . * * For ' code ' below we want to do some ...
null
https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/linker/types5.ml
ocaml
a single line number is not enough anymore, we need also the filename with tarzan with tarzan remember that GLOBL information is stored in symbol table can be altered during rewriting for branching instructions and also for instructions using the pool set after layout_text assert not Some -1 ! should ha...
Copyright 2016 , see copyright.txt open Common module A = Ast_asm5 module T = Types type loc = Common.filename * Ast_asm5.loc Split Asm5 instructions in code vs data . * * For ' code ' below we want to do some naming . We could copy many of * ast_asm5.ml and replace ' global ' with the fully resolved ...
170608c01de948835d2adec50aabdf3c8f3eeb0fc0f744096807576c568c5710
deadpendency/deadpendency
SmokeRust.hs
module SR.Effect.RunSmokeTest.Backend.Smokes.SmokeRust (smokeRust) where import Common.Model.Config.AppEnv import Common.Model.Dependency.DependencyIdentifier import Common.Model.Dependency.DependencyName import Common.Model.Git.GitSha import Common.Model.Git.QualifiedRepo import Common.Model.Git.RepoHost import Commo...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/script-runner/src/SR/Effect/RunSmokeTest/Backend/Smokes/SmokeRust.hs
haskell
module SR.Effect.RunSmokeTest.Backend.Smokes.SmokeRust (smokeRust) where import Common.Model.Config.AppEnv import Common.Model.Dependency.DependencyIdentifier import Common.Model.Dependency.DependencyName import Common.Model.Git.GitSha import Common.Model.Git.QualifiedRepo import Common.Model.Git.RepoHost import Commo...
e037886ea436c973612979320fdc367fff1cd19d43ede85a737235668df5c620
Smoltbob/Caml-Est-Belle
btype.ml
type t = | IDENT | LABEL of t option ref | Int | Float | Var of t option ref | EOF let gentyp () = Var(ref None)
null
https://raw.githubusercontent.com/Smoltbob/Caml-Est-Belle/3d6f53d4e8e01bbae57a0a402b7c0f02f4ed767c/compiler/btype.ml
ocaml
type t = | IDENT | LABEL of t option ref | Int | Float | Var of t option ref | EOF let gentyp () = Var(ref None)
f15d45b293fc095d3ee2c234138ee7674e2b2e86b56e0f37ff629e6eaf48daa9
erlang/otp
oracle.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2002 - 2022 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/erlang/otp/eccc556e79f315d1f87c10fb46f2c4af50a63f20/lib/odbc/test/oracle.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 2002 - 2022 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(oracle). -compile(export_all). connection_string() -> "DSN=Oracle8;UID=odbctest". insert_result() ->...
c7d3e2fbcf2a662fb2e0300aee71f6b8c675adbf9fd89591f47780bd875d433a
uw-unsat/leanette-popl22-artifact
alanon_arkansas_16.rkt
#lang rosette (require (only-in racket/runtime-path define-runtime-path)) (require "../dom.rkt") (require "../websynth.rkt") (require "../websynthlib.rkt") (define-runtime-path html (build-path ".." "html/alanon_arkansas.html")) (define dom (read-DOMNode html)) (define-tags (tags dom)) (define max_zpath_depth (depth ...
null
https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-3/websynth/benchmarks/alanon_arkansas_16.rkt
racket
Record 0 fields Record 1 fields Record 2 fields Record 3 fields Record 4 fields Record 5 fields Record 6 fields Record 7 fields Record 8 fields Record 9 fields Record 10 fields Record 11 fields Record 12 fields Record 13 fields Record 14 fields Record 15 fields Cross-record Mask Record 0 zpath asserts...
#lang rosette (require (only-in racket/runtime-path define-runtime-path)) (require "../dom.rkt") (require "../websynth.rkt") (require "../websynthlib.rkt") (define-runtime-path html (build-path ".." "html/alanon_arkansas.html")) (define dom (read-DOMNode html)) (define-tags (tags dom)) (define max_zpath_depth (depth ...
e808b5b5ca5735ad7461ec1df465decb26775f1f79add73441a6e6f317ece5d5
soegaard/metapict
test-text-path.rkt
#lang racket/base (require "../metapict.rkt" racket/draw racket/class) ;;; ;;; Text Paths ;;; ; The file "text-path.rkt" provides a function that turns a text ; into list of curves. These curves can then be manipulated (filled etc). (define arial (make-similar-font (new-font) ...
null
https://raw.githubusercontent.com/soegaard/metapict/47ae265f73cbb92ff3e7bdd61e49f4af17597fdf/metapict/tests/test-text-path.rkt
racket
Text Paths The file "text-path.rkt" provides a function that turns a text into list of curves. These curves can then be manipulated (filled etc).
#lang racket/base (require "../metapict.rkt" racket/draw racket/class) (define arial (make-similar-font (new-font) #:size 100 #:face "Roman" #:weight 'bold #:style 'slant ...
11bbeec4e6176a1a6700134276b175dac9004b18edcdaf0b95988fc9c13bfa64
fredrikt/yxa
sipuserdb_mysql.erl
%%%------------------------------------------------------------------- %%% File : sipuserdb_mysql.erl @author < > %%% @doc MySQL sipuserdb module. %%% @since 4 Aug 2005 by < > %%% @end %%%------------------------------------------------------------------- -module(sipuserdb_mysql). %%-compile(e...
null
https://raw.githubusercontent.com/fredrikt/yxa/85da46a999d083e6f00b5f156a634ca9be65645b/src/sipuserdb/sipuserdb_mysql.erl
erlang
------------------------------------------------------------------- File : sipuserdb_mysql.erl @doc MySQL sipuserdb module. @end ------------------------------------------------------------------- -compile(export_all). -------------------------------------------------------------------- External exports - ...
@author < > @since 4 Aug 2005 by < > -module(sipuserdb_mysql). -behaviour(sipuserdb). -export([yxa_init/0, get_user_with_address/1, get_users_for_address_of_record/1, get_users_for_addresses_of_record/1, get_users_for_url/1, get_addresses_for_user/1, get_addresses_for_users/1, get_pass...
7aa59d6590061fc83908d114164792e9745841c6228decfdb391d8ac29305ea6
haskell-mafia/boris
Project.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module Boris.Http.Representation.Project ( GetProjects (..) , GetProject (..) ) where import Boris.Core.Data import Data.Aeson (ToJSON (..), object, (.=)) import P newtype GetProjects = GetProjects [Project] ...
null
https://raw.githubusercontent.com/haskell-mafia/boris/fb670071600e8b2d8dbb9191fcf6bf8488f83f5a/boris-http/src/Boris/Http/Representation/Project.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE NoImplicitPrelude # module Boris.Http.Representation.Project ( GetProjects (..) , GetProject (..) ) where import Boris.Core.Data import Data.Aeson (ToJSON (..), object, (.=)) import P newtype GetProjects = GetProjects [Project] instance ToJSON GetProjects where ...
2d93521fed62f48cd1d847ef60e391de76e12ef97cb334ec21a72007cc6a1efa
rmloveland/scheme48-0.53
var-util.scm
Copyright ( c ) 1993 - 1999 by and . See file COPYING . (define (number-of-required-args formals) (do ((l formals (cdr l)) (i 0 (+ i 1))) ((not (pair? l)) i))) (define (n-ary? formals) (cond ((null? formals) #f) ((pair? formals) (n-ary? (cdr formals))) (else #t))) (define (normalize-...
null
https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/bcomp/var-util.scm
scheme
Copyright ( c ) 1993 - 1999 by and . See file COPYING . (define (number-of-required-args formals) (do ((l formals (cdr l)) (i 0 (+ i 1))) ((not (pair? l)) i))) (define (n-ary? formals) (cond ((null? formals) #f) ((pair? formals) (n-ary? (cdr formals))) (else #t))) (define (normalize-...
a7265399b899e723880afdcc2716d5f8a1bd1f373ba82c12610c436faacfb328
puppetlabs/puppetdb
fact_storage_benchmark.clj
(ns puppetlabs.puppetdb.cli.fact-storage-benchmark (:require [puppetlabs.puppetdb.client :as client] [puppetlabs.puppetdb.cli.util :refer [exit run-cli-cmd]] [puppetlabs.puppetdb.time :refer [now]] [puppetlabs.puppetdb.utils :as utils] [puppetlabs.puppetdb.cheshire :as ...
null
https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/src/puppetlabs/puppetdb/cli/fact_storage_benchmark.clj
clojure
some facts with various degrees of selectivity for testing query perf. Test profiles - num-threads: how many synthesis + submission threads to run - num-nodes: total number of nodes to synthesize - num-generations: how many puppet runs to simulate - shared-static-facts: number of facts to generate that are shared...
(ns puppetlabs.puppetdb.cli.fact-storage-benchmark (:require [puppetlabs.puppetdb.client :as client] [puppetlabs.puppetdb.cli.util :refer [exit run-cli-cmd]] [puppetlabs.puppetdb.time :refer [now]] [puppetlabs.puppetdb.utils :as utils] [puppetlabs.puppetdb.cheshire :as ...
ff2fe3851180d95696fe108801ac29251fbb1532fdcde35a52dc39bdee7fdeb4
seckcoder/iu_c311
demo.rkt
#lang racket (define except-stack '()) (define extend-stack (lambda (name val st) (cons (list name val) st))) (define top car) (define pop-lookup-stack (lambda (name st) (cond ((null? st) (error 'pop-lookup-stack "exception :~s is not handled" name)) ((eq? (car (top st)) n...
null
https://raw.githubusercontent.com/seckcoder/iu_c311/a1215983b6ab08df32058ef1e089cb294419e567/lisp/demo.rkt
racket
#lang racket (define except-stack '()) (define extend-stack (lambda (name val st) (cons (list name val) st))) (define top car) (define pop-lookup-stack (lambda (name st) (cond ((null? st) (error 'pop-lookup-stack "exception :~s is not handled" name)) ((eq? (car (top st)) n...
2c16daa5222a6fabe7f73cea5dedf6b40c699ca18a81abb5d98e59dcd079f0b5
josephwilk/strangeloop2014
synths.clj
(ns strangeloop.synths (:use overtone.live) (:require [mud.timing :as time])) (defsynth buffer->tap [beat-buf 0 beat-bus 0 beat-size 16 measure 6] "Exposes some useful timing information which we can use in Shadertone" (let [cnt (in:kr beat-bus) beat (buf-rd:kr 1 beat-buf cnt) _ (tap "beat" ...
null
https://raw.githubusercontent.com/josephwilk/strangeloop2014/d2f50322bcc7033d31cee7c5f283a80041e06a0d/freedom/overtone/src/strangeloop/synths.clj
clojure
Our beat count Our beat trigger
(ns strangeloop.synths (:use overtone.live) (:require [mud.timing :as time])) (defsynth buffer->tap [beat-buf 0 beat-bus 0 beat-size 16 measure 6] "Exposes some useful timing information which we can use in Shadertone" (let [cnt (in:kr beat-bus) beat (buf-rd:kr 1 beat-buf cnt) _ (tap "beat" ...
d68474a157da6d229764d403b1fab1d71853229ed9b0ba4e37cdee565badb103
typelead/etlas
GlobalFlags.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE DeriveGeneric # # LANGUAGE ExistentialQuantification # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE RecordWildCards # module Distribution.Client.GlobalFlags ( GlobalFlags(..) , defaultGlobalFlags , RepoContext(..) , withRepoContext , withR...
null
https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas/Distribution/Client/GlobalFlags.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE RankNTypes # ------------------------------------------------------------ * Global flags ------------------------------------------------------------ | Flags that apply at the top level, not to any sub-command. ^ Available Hackage servers. ^ Ignore security expiry dates ^ Int...
# LANGUAGE DeriveGeneric # # LANGUAGE ExistentialQuantification # # LANGUAGE ScopedTypeVariables # # LANGUAGE RecordWildCards # module Distribution.Client.GlobalFlags ( GlobalFlags(..) , defaultGlobalFlags , RepoContext(..) , withRepoContext , withRepoContext' ) where import Prelude () import Distributi...
93c1230041013b3005918e0dfce1370ecf7792473fad8d0c56781a440159f991
ageldama/cl-state-machine
builders.lisp
(in-package :cl-state-machine-test) (in-suite test-suite) (test state-definitions-of (let* ((state-defs (state-definitions-of '(:state :a) '(:state :b))) (sd-1 (first state-defs)) (sd-2 (second state-defs))) (is (eq :a (state sd-1))) (is (eq :...
null
https://raw.githubusercontent.com/ageldama/cl-state-machine/eb5d59f7a864c2fc38822fc258162f9cda56adb4/test/builders.lisp
lisp
states transitions
(in-package :cl-state-machine-test) (in-suite test-suite) (test state-definitions-of (let* ((state-defs (state-definitions-of '(:state :a) '(:state :b))) (sd-1 (first state-defs)) (sd-2 (second state-defs))) (is (eq :a (state sd-1))) (is (eq :...
024e58391d71e15e47983c3823f3b3f2ba135808f38dda212d92594b4e796d77
aymanosman/cl-missile-command
constants.lisp
(in-package :raylib) (defparameter +white+ '(r 255 g 255 b 255 a 255)) (defparameter +raywhite+ '(r 245 g 245 b 245 a 255)) (defparameter +red+ '(r 255 g 0 b 0 a 255)) (defparameter +black+ '(r 0 g 0 b 0 a 255)) (defparameter +brown+ '(r 165 g 42 b 42 a 255)) (defparameter +blue+ '(r 0 g 121 b 241 a 255)) (defparamete...
null
https://raw.githubusercontent.com/aymanosman/cl-missile-command/5f99bc8cec1ff06a2450b9408feb2c57df1561b9/raylib/constants.lisp
lisp
(in-package :raylib) (defparameter +white+ '(r 255 g 255 b 255 a 255)) (defparameter +raywhite+ '(r 245 g 245 b 245 a 255)) (defparameter +red+ '(r 255 g 0 b 0 a 255)) (defparameter +black+ '(r 0 g 0 b 0 a 255)) (defparameter +brown+ '(r 165 g 42 b 42 a 255)) (defparameter +blue+ '(r 0 g 121 b 241 a 255)) (defparamete...
6ec3ced9550972be45bced916eb953bd7d9e61f196f3c3a63c4025c9788583b0
AbstractMachinesLab/caramel
scheduler_tests.ml
open! Import open Fiber.O module S = Fiber_unix.Scheduler module Fiber_detached = Fiber_unix.Fiber_detached let test s f = let f = Fiber.with_error_handler f ~on_error:(fun exn -> Format.printf "%a@." Exn_with_backtrace.pp_uncaught exn) in S.run s f let%expect_test "scheduler starts and runs a fiber...
null
https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/fiber-unix/test/scheduler_tests.ml
ocaml
open! Import open Fiber.O module S = Fiber_unix.Scheduler module Fiber_detached = Fiber_unix.Fiber_detached let test s f = let f = Fiber.with_error_handler f ~on_error:(fun exn -> Format.printf "%a@." Exn_with_backtrace.pp_uncaught exn) in S.run s f let%expect_test "scheduler starts and runs a fiber...
ea97a1d0e9006a0ca06b50f05dba5a4922fa8426392d08ee6297302f4ac70394
shnarazk/mios
Vec.hs
# LANGUAGE BangPatterns , FlexibleContexts , FlexibleInstances , FunctionalDependencies , MultiParamTypeClasses , TypeFamilies # BangPatterns , FlexibleContexts , FlexibleInstances , FunctionalDependencies , MultiParamTypeClasses , TypeFamilies #-} # LANGUAGE Trustworthy # ...
null
https://raw.githubusercontent.com/shnarazk/mios/d032d761d73224f981a07ec2ea90936db6f495e8/MultiConflict/SAT/Mios/Vec.hs
haskell
| Abstraction Layer for Mutable Vectors * Vector class and type * SingleStorage * Stack ------------------------------------------------------------------------------ VecFamily | The interface on vectors. | returns the /n/-th value. | sets the /n/-th value. | erases all elements in it. | calls the update funct...
# LANGUAGE BangPatterns , FlexibleContexts , FlexibleInstances , FunctionalDependencies , MultiParamTypeClasses , TypeFamilies # BangPatterns , FlexibleContexts , FlexibleInstances , FunctionalDependencies , MultiParamTypeClasses , TypeFamilies #-} # LANGUAGE Trustworthy # ...
166030bab0edb59241e546cd358c7921f84abb052dc86484463dcaf7b8e5ef30
Swizec/random-coding
1.clj
If we list all the natural numbers below 10 that are multiples of 3 or 5 , we get 3 , 5 , 6 and 9 . The sum of these multiples is 23 . Find the sum of all the multiples of 3 or 5 below 1000 . (defn nums [max n] (loop [cnt (+ n n) acc [n]] (if (>= cnt max) acc (recur (+ cnt n) (concat acc [cnt]))))) (defn ans...
null
https://raw.githubusercontent.com/Swizec/random-coding/adeb72d35c52a7792a596ddc0a5241035ba9dda8/project-euler/1.clj
clojure
If we list all the natural numbers below 10 that are multiples of 3 or 5 , we get 3 , 5 , 6 and 9 . The sum of these multiples is 23 . Find the sum of all the multiples of 3 or 5 below 1000 . (defn nums [max n] (loop [cnt (+ n n) acc [n]] (if (>= cnt max) acc (recur (+ cnt n) (concat acc [cnt]))))) (defn ans...
cc584982a7aab41a84560d423d9446c55ad6db2f565303d338969b8c470e8ba0
kit-clj/kit
api.clj
(ns kit.api (:require [clojure.string :as string] [kit.generator.modules.generator :as generator] [kit.generator.modules :as modules] [kit.generator.snippets :as snippets] [kit.generator.io :as io])) ;; TODO: Add docstrings (defn read-ctx ([] (read-ctx nil)) ([path] (-> (or path "kit.edn"...
null
https://raw.githubusercontent.com/kit-clj/kit/cddff569881855d662e53b525104bac547b7ed4b/libs/kit-generator/src/kit/api.clj
clojure
TODO: Add docstrings
(ns kit.api (:require [clojure.string :as string] [kit.generator.modules.generator :as generator] [kit.generator.modules :as modules] [kit.generator.snippets :as snippets] [kit.generator.io :as io])) (defn read-ctx ([] (read-ctx nil)) ([path] (-> (or path "kit.edn") (slurp) ...
6721b1c0a29f266baecf9fc3609dbcd0b40aae83d80fcb8c4781fc1171ae0b06
spechub/Hets
ExtModal2ExtModalNoSubsorts.hs
# LANGUAGE MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances # | Module : ./Comorphisms / ExtModal2ExtModalNoSubsorts.hs Description : coding out subsorting Copyright : ( c ) C. Maeder DFKI GmbH 2012 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stabil...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/Comorphisms/ExtModal2ExtModalNoSubsorts.hs
haskell
CASL | The identity of the comorphism default definition is okay subsorting is coded out
# LANGUAGE MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances # | Module : ./Comorphisms / ExtModal2ExtModalNoSubsorts.hs Description : coding out subsorting Copyright : ( c ) C. Maeder DFKI GmbH 2012 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stabil...
fb09b32bf035cddf8b5f16e133737d0573543b806c7d5209229e81613cc05271
c4-project/c4f
op.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/src/op.ml
ocaml
x == x -> true, etc. x != x -> false, etc. x + 0 -> x x - 0 -> x x - x -> 0 * Rules that are probably only valid in twos'-complement systems. x&-1 -> x -1&x -> x x&0 -> 0 x&x -> x 0|x -> x x|x -> x 0^x -> x x^0 -> x x^x -> 0 x&&false -> false true&&x -> x x&&true -> x x&&x -> x false...
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...
a6d745e8df425b4f2a04c321ef75f17f2a6edbacce79c483d5fb6023c2b9c541
haas/harmtrace
HAnParser.hs
# OPTIONS_GHC -Wall -fno - warn - orphans # # LANGUAGE FlexibleContexts # module HarmTrace.HAnTree.HAnParser where import HarmTrace.Base.Parsing import HarmTrace.Base.MusicRep (Mode(..)) import HarmTrace.HAnTree.HAn import Data.Maybe (isJust, fromJust) ----------------------------------------------------------------...
null
https://raw.githubusercontent.com/haas/harmtrace/e250855a3bb6e5b28fe538c728f707cf82ca9fd3/src/HarmTrace/HAnTree/HAnParser.hs
haskell
------------------------------------------------------------------------------ A Small Parser for Parsing MIR constructors ------------------------------------------------------------------------------ this top-level function parses a constructor name and returns the case as a parser, because it accepts everyt...
# OPTIONS_GHC -Wall -fno - warn - orphans # # LANGUAGE FlexibleContexts # module HarmTrace.HAnTree.HAnParser where import HarmTrace.Base.Parsing import HarmTrace.Base.MusicRep (Mode(..)) import HarmTrace.HAnTree.HAn import Data.Maybe (isJust, fromJust) corresponding HAn data type . N.B. we can implement the catch...
5e15f7e6861794a81c455d8f764ef1097d4555993754a71dd629a79553265e41
typelead/eta
RecursionCycle.hs
module Main where main :: IO () main = do putStrLn $ show $ recursive <$> arr where arr = [0..10] recursive' 0 a b = a recursive' n a b = recursive' (n-1) b a recursive n = recursive' n 0 1
null
https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/codegen/run/RecursionCycle.hs
haskell
module Main where main :: IO () main = do putStrLn $ show $ recursive <$> arr where arr = [0..10] recursive' 0 a b = a recursive' n a b = recursive' (n-1) b a recursive n = recursive' n 0 1
8dbaf1f887114f4091f8fbab50c6007594abcd66034be7ce6e74dc16b93bb991
verystable/warframe-autobuilder
PhysicalDamageMods.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} -- | Module : Builder . Mods . MeleeMods . PhysicalDamageMods -- Maintainer : -- Stability : experimental -- -- Contains function that modify physical damage, applicable on melee weapons. module Builder.Mods.MeleeMods.PhysicalDamageMods w...
null
https://raw.githubusercontent.com/verystable/warframe-autobuilder/015e0bb6812711ea27071816d054cbaa1c65770b/src/Builder/Mods/MeleeMods/PhysicalDamageMods.hs
haskell
# LANGUAGE OverloadedStrings # | Maintainer : Stability : experimental Contains function that modify physical damage, applicable on melee weapons. | Collision Force [+120% Impact Damage] | Heavy Trauma [+90% Impact Damage] | Primed Heavy Trauma [+165% Impact Damage] | Sundering Strike [+90% Puncture Damage...
# LANGUAGE NoImplicitPrelude # Module : Builder . Mods . MeleeMods . PhysicalDamageMods module Builder.Mods.MeleeMods.PhysicalDamageMods where import ClassyPrelude import GenericFunctions.GenericFunctions import Types.GenericWeapon collisionForce :: GenericWeapon -> (Generi...
fd0b0071d9631c7ae33c1b00247d2c1263a764c320f0a9aaf9c3e06cc0f69cef
BillHallahan/G2
OkasakiRedBlack.hs
module OkasakiRedBlack where data Color = R | B data Tree elt = E | T Color (Tree elt) elt (Tree elt) insert :: Ord elt => elt -> Tree elt -> Tree elt insert x s = makeBlack (ins x s) ins :: Ord elt => elt -> Tree elt -> Tree elt ins x E = T R E x E ins x (T color a y b) | x < y = balance color (ins x a) y b ...
null
https://raw.githubusercontent.com/BillHallahan/G2/dfd377793dcccdc7126a9f4a65b58249673e8a70/tests/Samples/OkasakiRedBlack.hs
haskell
module OkasakiRedBlack where data Color = R | B data Tree elt = E | T Color (Tree elt) elt (Tree elt) insert :: Ord elt => elt -> Tree elt -> Tree elt insert x s = makeBlack (ins x s) ins :: Ord elt => elt -> Tree elt -> Tree elt ins x E = T R E x E ins x (T color a y b) | x < y = balance color (ins x a) y b ...
aaa688945fc1cb464644d34c1d55d4cb5643992da12b4458cc4f0676b784d55f
mithrandi/isaacranks
Vote.hs
module Vote ( processVote, reprocessVotes, encryptBallot, decryptBallot, ) where import Conduit (foldlC, mapC) import Control.Lens import Control.Monad.Trans.Reader (ReaderT) import Data.Binary.Get (getWord32be, runGet) import Data.Binary.Put (putWord32be, runPut) import qualified Data.ByteString as B ...
null
https://raw.githubusercontent.com/mithrandi/isaacranks/7943ea00ef3d3f415cae61e33d9f16f234de895f/Vote.hs
haskell
module Vote ( processVote, reprocessVotes, encryptBallot, decryptBallot, ) where import Conduit (foldlC, mapC) import Control.Lens import Control.Monad.Trans.Reader (ReaderT) import Data.Binary.Get (getWord32be, runGet) import Data.Binary.Put (putWord32be, runPut) import qualified Data.ByteString as B ...
e6a3b21927e01732cc4317bdccd0aa1a70027dd5608027f4785af585b6838a99
ocsigen/eliom
eliommod_persess.ml
Ocsigen * * Module eliommod_persess.ml * Copyright ( C ) 2007 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2....
null
https://raw.githubusercontent.com/ocsigen/eliom/c3e0eea5bef02e0af3942b6d27585add95d01d6c/src/lib/server/eliommod_persess.ml
ocaml
*************************************************************************** *************************************************************************** * Internal functions used by Eliom: * Persistent data tables ****************...
Ocsigen * * Module eliommod_persess.ml * Copyright ( C ) 2007 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2....
c3ac901a508d898ce8b21cd32560c22883d955c93ab7a77f7fe80b4eac36dd71
awakesecurity/language-ninja
ReadFile.hs
-*- coding : utf-8 ; mode : ; -*- -- File: library/Language/Ninja/Mock/ReadFile.hs -- -- License: -- Copyright 2017 Awake Security -- Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the License. -- You may obtain a copy o...
null
https://raw.githubusercontent.com/awakesecurity/language-ninja/e7badf49b45d9c28b558376be3152d51f5d2d437/library/Language/Ninja/Mock/ReadFile.hs
haskell
File: library/Language/Ninja/Mock/ReadFile.hs License: Copyright 2017 Awake Security you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES ...
-*- coding : utf-8 ; mode : ; -*- Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # @since 0.1.0 module L...
604d0cf159e7a5054f499019583a5a68eb10bde3109c75aa02236778bedd02a2
dennismckinnon/Ethereum-Contracts
DOUG-v5.lsp
; ;Default Behaviour: If a name has not been registered before, Automatically accept ;Usage: ;Default behaviour: If the permission name has been registered but the rule for a specific permission level ; does not yet exist. The the permission is automatically rejected. ; If the permission name does not e...
null
https://raw.githubusercontent.com/dennismckinnon/Ethereum-Contracts/25b5e7037da382dd95a1376fad81f936f6610b36/DOUG-v5/DOUG-v5.lsp
lisp
Default Behaviour: If a name has not been registered before, Automatically accept Usage: Default behaviour: If the permission name has been registered but the rule for a specific permission level does not yet exist. The the permission is automatically rejected. If the permission name does not exist then th...
If the ACL does not have any rules for giving ACL permissions , then requested one to have already gotten the ACL permissions . Adding a permission rule similarly requires - Returns : 0 ( DNE ) , 0xContractAddress - Returns : 1 ( Is Known ) , 0 ( Not ) Register Name - Permission ne...
3f2fbb36f41f346178a79a87d74d638927be1ff6a9ca049dfdabc738e4571919
xach/vecto
vecto-imago.lisp
(defpackage #:vecto-imago (:use #:cl) (:local-nicknames (#:v #:vecto) (#:i #:imago) (#:z #:zpng))) (in-package #:vecto-imago) (declaim (inline blend-alpha)) (defun blend-alpha (src-a dest-a) (declare (optimize speed)) (declare (type (unsigned-byte 8) src-a dest-a)) (let* ((src-a (* 1f0 1/255 src-a)) ...
null
https://raw.githubusercontent.com/xach/vecto/901060193a341436b7a17c4cd1c3eedac2fb9c42/vecto-imago/vecto-imago.lisp
lisp
TODO: stop being ugly here, write a reader function in vecto which returns the transform matrix and then export accessor functions for it
(defpackage #:vecto-imago (:use #:cl) (:local-nicknames (#:v #:vecto) (#:i #:imago) (#:z #:zpng))) (in-package #:vecto-imago) (declaim (inline blend-alpha)) (defun blend-alpha (src-a dest-a) (declare (optimize speed)) (declare (type (unsigned-byte 8) src-a dest-a)) (let* ((src-a (* 1f0 1/255 src-a)) ...
ef502e2071c01bfc420edffcd8d21fea8117de6304c2034aedbdd8f34cea90f4
gtk2hs/gtk2hs
PixbufData.hs
# LANGUAGE ScopedTypeVariables , FlexibleInstances , MultiParamTypeClasses # {-# OPTIONS_HADDOCK hide #-} -- -*-haskell-*- GIMP Toolkit ( GTK ) Pixbuf as Array -- Author : Ciancia , -- Created : 26 March 2002 -- Copyright ( C ) 2002 - 2005 -- -- This library is free software; you can redistribute it an...
null
https://raw.githubusercontent.com/gtk2hs/gtk2hs/0f90caa1dae319a0f4bbab76ed1a84f17c730adf/gtk/Graphics/UI/Gtk/Gdk/PixbufData.hs
haskell
# OPTIONS_HADDOCK hide # -*-haskell-*- This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY o...
# LANGUAGE ScopedTypeVariables , FlexibleInstances , MultiParamTypeClasses # GIMP Toolkit ( GTK ) Pixbuf as Array Author : Ciancia , Created : 26 March 2002 Copyright ( C ) 2002 - 2005 License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your option ) ...
a1925d5290bc96387a98455b5b9f3215827fb8745ecffd5778b23ff4d97940db
ocaml-multicore/parafuzz
class_1.ml
(* TEST *) (* class expression are compiled to recursive bindings *) class test = object method x = 1 end
null
https://raw.githubusercontent.com/ocaml-multicore/parafuzz/6a92906f1ba03287ffcb433063bded831a644fd5/testsuite/tests/letrec-compilation/class_1.ml
ocaml
TEST class expression are compiled to recursive bindings
class test = object method x = 1 end
5ae0bfebd65f73787ff2778a84c451be9791d526fba9bd6208fed6a9737ffdf7
bmeurer/ocamljit2
almabench.ml
* ALMABENCH 1.0.1 * Objective Caml version * * A number - crunching benchmark designed for cross - language and vendor * comparisons . * * Written by , from versions for * C++ and java . * * No rights reserved . This is public domain software , for use by an...
null
https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/testsuite/tests/misc-unsafe/almabench.ml
ocaml
number of days to include in test tables for trigonometric terms to be added to the mean elements of the semi-major axes. tables giving the trigonometric terms to be added to the mean elements of the mean longitudes . Normalize angle into the range -pi <= A < +pi. The reference frame is equatorial and is...
* ALMABENCH 1.0.1 * Objective Caml version * * A number - crunching benchmark designed for cross - language and vendor * comparisons . * * Written by , from versions for * C++ and java . * * No rights reserved . This is public domain software , for use by an...
72a30bc8700c974aa92a986ff42cfd14ee954c9f4e2433b7117e91e71739a9fa
stackbuilders/cis194-templates
Main.hs
module Main where -- base import System.Environment (getArgs) -- doctest import Test.DocTest main :: IO () main = do args <- getArgs doctest (if null args then ["src"] else args)
null
https://raw.githubusercontent.com/stackbuilders/cis194-templates/f41b9f0b9945afd387f433ff40fa8988b6a9fe8b/test/doctest/Main.hs
haskell
base doctest
module Main where import System.Environment (getArgs) import Test.DocTest main :: IO () main = do args <- getArgs doctest (if null args then ["src"] else args)
1edd785257079888fb1e2637a0c9260054863e80529f6d8cdda98e57be3ff4cf
freizl/har
HAR.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module HAR where import Data.Aeson.TH import HAR.Log data HAR = HAR { log :: Log } deriving (Show) $(deriveJSON defaultOptions ''HAR)
null
https://raw.githubusercontent.com/freizl/har/a913690972ac27666d31427e7c607ad088c289f0/src/HAR.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module HAR where import Data.Aeson.TH import HAR.Log data HAR = HAR { log :: Log } deriving (Show) $(deriveJSON defaultOptions ''HAR)
dcb512a22d179e85815b0284714f7c1e0901a1144f34d0ec6122107769e16266
jvf/scalaris
tester_parse_state.erl
2010 - 2012 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software d...
null
https://raw.githubusercontent.com/jvf/scalaris/c069f44cf149ea6c69e24bdb08714bda242e7ee0/test/tester_parse_state.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language gov...
2010 - 2012 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > -module(tester_parse_state). -author(''). -vsn('$Id$'). -export([new_parse_state/0, find_fun_info/4, ...
4ab18a810cce9c31f71d6e47bccafbf43a30b693d1dd4465b734acfded4073d1
dyoo/ffi-tutorial
utils.rkt
#lang racket/base (provide build-extension make-pre-installer) (require racket/file racket/path dynext/compile dynext/link) ;; A small helper to make it easier to build extension libraries. The design is meant to mimic the extension - building part of Python 's ;; distutils sy...
null
https://raw.githubusercontent.com/dyoo/ffi-tutorial/1efba84503adf4a062c4855225eabe992a06a34f/ffi/tutorial/utils.rkt
racket
A small helper to make it easier to build extension libraries. The distutils system, by doing the building and linking for us. easy to drive from info.rkt. build-extension: [basename string] [#:sources (listof string)] -> void Write out the dynamic library. #:define-macros (...
#lang racket/base (provide build-extension make-pre-installer) (require racket/file racket/path dynext/compile dynext/link) design is meant to mimic the extension - building part of Python 's We should automate the work that is doing , and make it Paths should be all rel...
394a36ff2c8812a2924f3a25d4f752af1f01d9299318544798ad917caec8308a
emanjavacas/cosycat
avatar.clj
(ns cosycat.avatar (:require [clojure.java.io :as io] [gravatar.core :as gr] [clj-http.client :as http] [cosycat.schemas.user-schemas :refer [avatar-schema]] [config.core :refer [env]] [taoensso.timbre :as timbre]) (:import [org.hackrslab.avatar RandomA...
null
https://raw.githubusercontent.com/emanjavacas/cosycat/a7186363d3c0bdc7b714af126feb565f98793a6e/src/clj/cosycat/avatar.clj
clojure
find major color in image public api
(ns cosycat.avatar (:require [clojure.java.io :as io] [gravatar.core :as gr] [clj-http.client :as http] [cosycat.schemas.user-schemas :refer [avatar-schema]] [config.core :refer [env]] [taoensso.timbre :as timbre]) (:import [org.hackrslab.avatar RandomA...
68fcfb23adba54af876bac74174773fd4b4c285cfb52da2975369b97a2f836a2
ocaml-multicore/multicoretests
CList.ml
* a simple concurrent list - from type 'a conc_list = { value: 'a; next: 'a conc_list option } let rec add_node list_head n = (* try to add a new node to head *) let old_head = Atomic.get list_head in let new_node = { value = n ; next = (Some old_head) } in (* introduce bug *) if Atomic.get list_head = old...
null
https://raw.githubusercontent.com/ocaml-multicore/multicoretests/3e0f2ceb72eaf334e97252140ae5d40bf6461b96/src/neg_tests/CList.ml
ocaml
try to add a new node to head introduce bug try to find the node
* a simple concurrent list - from type 'a conc_list = { value: 'a; next: 'a conc_list option } let rec add_node list_head n = let old_head = Atomic.get list_head in let new_node = { value = n ; next = (Some old_head) } in if Atomic.get list_head = old_head then begin Atomic.set list_head new_node; true...
ad0e88939ad81462196ee17d96df5be9e9648997aa545f8336f51d881557f5bf
clj-br/clojuredocs
dev.cljs
(ns ^:figwheel-no-load clojuredocs.dev (:require [clojuredocs.core :as core] [figwheel.client :as figwheel :include-macros true])) (enable-console-print!) (figwheel/watch-and-reload :websocket-url "ws:3449/figwheel-ws" :jsload-callback core/mount-root) (core/init!)
null
https://raw.githubusercontent.com/clj-br/clojuredocs/4957150d6e97281ecd7d82ec021b96ff99656a51/env/dev/cljs/clojuredocs/dev.cljs
clojure
(ns ^:figwheel-no-load clojuredocs.dev (:require [clojuredocs.core :as core] [figwheel.client :as figwheel :include-macros true])) (enable-console-print!) (figwheel/watch-and-reload :websocket-url "ws:3449/figwheel-ws" :jsload-callback core/mount-root) (core/init!)
7e50ca4fdbc0e8128283fb803a2954bbbb1ce59cfd6ed3125ddc46d09b5996b5
rudymatela/fitspec
sorting.hs
-- Minimal example: mutation testing a sort specification -- ( this program might take a minute to run depending on your system ) -- -- Usage: -- -- $ ghc -O2 sorting.hs -- $ ./sorting -- Apparent incomplete and non-minimal specification based on 4000 test cases for each of properties 1 , 2 , 3 , 4 and 5 for each...
null
https://raw.githubusercontent.com/rudymatela/fitspec/f67b0dfc4d7413d62e6c6f4df36df3703f2a4302/eg/sorting.hs
haskell
Minimal example: mutation testing a sort specification Usage: $ ghc -O2 sorting.hs $ ./sorting Apparent incomplete and non-minimal specification based on [0,0,1] -> [0,1,1] _ -> sort xs apparent minimal property subsets: {1,2,3} {1,2,4}
( this program might take a minute to run depending on your system ) 4000 test cases for each of properties 1 , 2 , 3 , 4 and 5 for each of 4000 mutant variations . 3 survivors ( 99 % killed ) , smallest : - > case xs of conjectures : { 3 } = { 4 } 96 % killed ( weak ) { 1,3 ...
60338d8b23fb64f7fb43b2eb50cc08f84d91df3c78edd0e749049c9227bd4994
2600hz/kazoo
kzd_user_auth.erl
%%%----------------------------------------------------------------------------- ( C ) 2010 - 2020 , 2600Hz %%% @doc This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %%% %%% @end %%%--------...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_documents/src/kzd_user_auth.erl
erlang
----------------------------------------------------------------------------- @doc @end -----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(kzd_user_auth). -export([new/0]). -export([account_name/1, account_name/2, set_account_name/2]). -export(...
c30498c5e7a9511d9a5c3a6e3ef4046922fd38b033757f1990731fe3569cdcf9
input-output-hk/hydra
Contract.hs
# LANGUAGE PatternSynonyms # # LANGUAGE TypeApplications # | Things related to the Hydra smart contracts / script validators . module Hydra.Contract where import Hydra.Prelude import Codec.Serialise (serialise) import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BSL import Hydra.Cardano...
null
https://raw.githubusercontent.com/input-output-hk/hydra/130301c7f30a39d6d3419fed08864be0e34960e1/hydra-plutus/src/Hydra/Contract.hs
haskell
determine changes in between version of 'hydra-plutus'.
# LANGUAGE PatternSynonyms # # LANGUAGE TypeApplications # | Things related to the Hydra smart contracts / script validators . module Hydra.Contract where import Hydra.Prelude import Codec.Serialise (serialise) import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BSL import Hydra.Cardano...
3d4e2f77bd8e24821a363bcd7f50faa747e8b8f32fcecb602006f2e0a3b0e51c
cpeikert/Lol
Cyc.hs
| Module : Crypto . Lol . Cyclotomic . Cyc Description : An implementation of cyclotomic rings that hides and automatically manages the internal representations of ring elements . Copyright : ( c ) , 2011 - 2018 , 2011 - 2018 License : GPL-3 ...
null
https://raw.githubusercontent.com/cpeikert/Lol/4416ac4f03b0bff08cb1115c72a45eed1fa48ec3/lol/Crypto/Lol/Cyclotomic/Cyc.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE GADTs # # LANGUAGE NoImplicitPrelude # # LANGUAGE PartialTypeSignatures # # LANGUAGE PolyKinds # # LANGUAGE QuantifiedConstraints # # LANGUAGE RankNTypes # ...
| Module : Crypto . Lol . Cyclotomic . Cyc Description : An implementation of cyclotomic rings that hides and automatically manages the internal representations of ring elements . Copyright : ( c ) , 2011 - 2018 , 2011 - 2018 License : GPL-3 ...
6819b22b92e5d7032b1238f45e1ffed61f81b148c80b5d8e6f6c91f20f422c9d
typelead/etlas
Condition.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # module Distribution.Types.Condition ( Condition(..), cNot, cAnd, cOr, simplifyCondition, ) where import Prelude () import Distribution.Compat.Prelude -- | A boolean expression parameterized over the variable type used. data Condition ...
null
https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas-cabal/Distribution/Types/Condition.hs
haskell
# LANGUAGE DeriveDataTypeable # | A boolean expression parameterized over the variable type used. | Boolean negation of a 'Condition' value. Terminating cases Recursing cases | Simplify the condition and return its free variables. ^ (partial) variable assignment gather free vars
# LANGUAGE DeriveGeneric # module Distribution.Types.Condition ( Condition(..), cNot, cAnd, cOr, simplifyCondition, ) where import Prelude () import Distribution.Compat.Prelude data Condition c = Var c | Lit Bool | CNot (Condition c) | COr (Condi...
6b73d3e055b8c7f7e5a979541677bbd8738fd67ab693ed6179b7904f40def8ab
serras/cobalt
Errors.hs
# LANGUAGE RecordWildCards # module Cobalt.Core.Errors ( Comment(..) , NamedSolverError(..) , SolverError(..) , UnifyErrorReason(..) , ErrorExplanation(..) , AnnConstraint , Blame , emptySolverExplanation , emptyUnnamedSolverExplanation , errorFromPreviousPhase , showErrorExplanation ) where import Data.List (elemIn...
null
https://raw.githubusercontent.com/serras/cobalt/cd8df75581a320fcca0d7d11b4b8c1788e8a5f9c/src/Cobalt/Core/Errors.hs
haskell
From -positions-as-offsets
# LANGUAGE RecordWildCards # module Cobalt.Core.Errors ( Comment(..) , NamedSolverError(..) , SolverError(..) , UnifyErrorReason(..) , ErrorExplanation(..) , AnnConstraint , Blame , emptySolverExplanation , emptyUnnamedSolverExplanation , errorFromPreviousPhase , showErrorExplanation ) where import Data.List (elemIn...
bde55633603cd92d627c0891fcb3ce0aa5ac30c81de0adc48f682bbf25f07982
ocaml-multicore/ocaml-effects-tutorial
state2.ml
open Printf open Effect open Effect.Shallow module type STATE = sig type t val put : t -> unit val get : unit -> t val history : unit -> t list val run : (unit -> unit) -> init:t -> unit end module State (S : sig type t end) : STATE with type t = S.t = struct type t = S.t type _ Effect.t += Ge...
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-effects-tutorial/998376931b7fdaed5d54cb96b39b301b993ba995/sources/state2.ml
ocaml
open Printf open Effect open Effect.Shallow module type STATE = sig type t val put : t -> unit val get : unit -> t val history : unit -> t list val run : (unit -> unit) -> init:t -> unit end module State (S : sig type t end) : STATE with type t = S.t = struct type t = S.t type _ Effect.t += Ge...
384d902c9ec1bb764423bfb682e6b1b0716654f1b214908231b644271e228429
xclerc/ocamljava
javaApplet.mli
* This file is part of library . * Copyright ( C ) 2007 - 2015 . * * 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 yo...
null
https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/library/javalib/src/javaApplet.mli
ocaml
* parameter name. * parameter type. * parameter description. * The type of parameters, describing parameters accepted by an applet. * The type of parameter info, as returned by the {java java.applet.Applet#getParameterInfo()} method. * Converts a list of parameters into a parameter info, preserving the ord...
* This file is part of library . * Copyright ( C ) 2007 - 2015 . * * 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 yo...
c0d045290fe4a8b29e378223d3c2becc137293323b72736589ffb11dbb6f0624
manuel-serrano/bigloo
interface.scm
;*=====================================================================*/ * ... /prgm / project / bigloo / api / pkgcomp / src / Llib / interface.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/api/pkgcomp/src/Llib/interface.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * The interface compiler (expander). */ *===========================...
* ... /prgm / project / bigloo / api / pkgcomp / src / Llib / interface.scm * / * Author : * / * Creation : Mon Dec 11 14:45:17 2006 * / * Last change : Mon Mar 5 14:23:22 2007 ( serrano ) * / * ...
c68b462edfac6bbfc83f60d5bb1a759ce5a86cf374bf8bc0afcc23a54ec94c96
tonyg/kali-scheme
hoist.scm
Copyright ( c ) 1994 . See file COPYING . ; Move nested procedures out to top level. We move them all out, then merge ; as many as possible back together (see merge.scm), and finally check to ; see if there are any out-of-scope references. (define (hoist-nested-procedures forms) (set! *hoist-index* 0) (let...
null
https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/ps-compiler/prescheme/hoist.scm
scheme
Move nested procedures out to top level. We move them all out, then merge as many as possible back together (see merge.scm), and finally check to see if there are any out-of-scope references. Rename a couple of handy fields (format #t " ~S: ~S~%" (form-name form) lambdas) (if (eq? 'read-list (form-name for...
Copyright ( c ) 1994 . See file COPYING . (define (hoist-nested-procedures forms) (set! *hoist-index* 0) (let loop ((forms forms) (done '())) (if (null? forms) (reverse done) (loop (cdr forms) (let ((form (car forms))) (if (eq? 'lambda (form-type form)) (append (really-hoist-nested-proc...
a6e201bcba6e541280a7d1e9f81919568515c1f87857c644f98890e3b5e8975a
careercup/CtCI-6th-Edition-Clojure
chapter_1_q5_test.clj
(ns chapter-1.chapter-1-q5-test (:require [clojure.test :refer :all] [chapter-1.chapter-1-q5 :refer :all])) (deftest one-away-test (is (one-away? "pale" "ple")) (is (one-away? "pales" "pale")) (is (one-away? "pale" "bale")) (is (not (one-away? "pale" "paless"))) (is (not (one-away? "pale" "bale...
null
https://raw.githubusercontent.com/careercup/CtCI-6th-Edition-Clojure/ef151b94978af82fb3e0b1b0cd084d910870c52a/test/chapter_1/chapter_1_q5_test.clj
clojure
(ns chapter-1.chapter-1-q5-test (:require [clojure.test :refer :all] [chapter-1.chapter-1-q5 :refer :all])) (deftest one-away-test (is (one-away? "pale" "ple")) (is (one-away? "pales" "pale")) (is (one-away? "pale" "bale")) (is (not (one-away? "pale" "paless"))) (is (not (one-away? "pale" "bale...
beb172235f0e389885618bba1d88bf76a62d684153ed99453c745f179afa1f48
duelinmarkers/guestbook-clj
clj_exercise.clj
(ns guestbook.clj-exercise) (def a-ref (ref {:visitors [] :last-modified "Never"})) (defn update-a-ref [key value] (dosync (ref-set a-ref (assoc @a-ref key value)))) (def an-atom (atom 0)) (defn increment-an-atom [] (swap! an-atom inc)) (defn show-off [visitor] (dosync (update-a-ref :visitors (conj (:visito...
null
https://raw.githubusercontent.com/duelinmarkers/guestbook-clj/d5f64ea5e9868199c32eaa94375bca5ae79070f2/src/guestbook/clj_exercise.clj
clojure
(ns guestbook.clj-exercise) (def a-ref (ref {:visitors [] :last-modified "Never"})) (defn update-a-ref [key value] (dosync (ref-set a-ref (assoc @a-ref key value)))) (def an-atom (atom 0)) (defn increment-an-atom [] (swap! an-atom inc)) (defn show-off [visitor] (dosync (update-a-ref :visitors (conj (:visito...
c0573bf0d8099f870e6b093e8a513ae78a9780f134b6a69df9df23f8022f17cb
untangled-web/untangled-client
logging.cljc
(ns untangled.client.logging #?(:cljs (:require cljs.pprint [om.next :refer [*logger*]] [goog.log :as glog] [goog.debug.Logger.Level :as level]))) #?(:cljs (defn set-level [log-level] "Takes a keyword (:all, :debug, :info, :warn, :error, :none) and changes the log level...
null
https://raw.githubusercontent.com/untangled-web/untangled-client/d9b350db3a5e19910692ee70281d8c156fd3a3f9/src/untangled/client/logging.cljc
clojure
(ns untangled.client.logging #?(:cljs (:require cljs.pprint [om.next :refer [*logger*]] [goog.log :as glog] [goog.debug.Logger.Level :as level]))) #?(:cljs (defn set-level [log-level] "Takes a keyword (:all, :debug, :info, :warn, :error, :none) and changes the log level...
ee75998b2229a2d659c2546886c2da0179b063fb6a48be09e6a6c204aa4a985b
mattjbray/ocaml-decoders
main.ml
open OUnit2 let ezjsonm_suite = let open Decoders_ezjsonm.Decode in let decoder_test ~decoder ~input ~expected _test_ctxt = match decode_string decoder input with | Ok value -> assert_equal value expected | Error error -> assert_string (Format.asprintf "%a" pp_error error) in "Ezjs...
null
https://raw.githubusercontent.com/mattjbray/ocaml-decoders/4b3d601109e3d88f5dc0ddb17924cce5d367f300/test-ezjsonm/main.ml
ocaml
open OUnit2 let ezjsonm_suite = let open Decoders_ezjsonm.Decode in let decoder_test ~decoder ~input ~expected _test_ctxt = match decode_string decoder input with | Ok value -> assert_equal value expected | Error error -> assert_string (Format.asprintf "%a" pp_error error) in "Ezjs...
1a7be5ad2f3defa88f102b876d8ad59c2fba8de4598c907670fd6dc3b0a9c8b1
mikera/imagez
blank.clj
(ns mikera.image.blank)
null
https://raw.githubusercontent.com/mikera/imagez/474cd2c0c95887187b5c5b226bd7d32cd198c36e/src/test/clojure/mikera/image/blank.clj
clojure
(ns mikera.image.blank)
5f8e66dbed484dabdb8734828611a1a6ae529e003438f0562db04bce85104533
swannodette/hs-async
core.cljs
(ns hs-async.core (:refer-clojure :exclude [map filter distinct remove]) (:require [cljs.core.async :refer [>! <! chan put! take! timeout close!]] [goog.dom :as dom]) (:require-macros [cljs.core.async.macros :refer [go alt!]])) ;; ======================================================================...
null
https://raw.githubusercontent.com/swannodette/hs-async/d76dc4bbae76d16bb9168c0f5213e5060f45c49f/src/hs_async/core.cljs
clojure
====================================================================== Basics ============================================================================= Rx ============================================================================= Timeouts ===================================================================...
(ns hs-async.core (:refer-clojure :exclude [map filter distinct remove]) (:require [cljs.core.async :refer [>! <! chan put! take! timeout close!]] [goog.dom :as dom]) (:require-macros [cljs.core.async.macros :refer [go alt!]])) #_(.log js/console (go 5)) #_(.log js/console (<! (go 5))) #_(go (.log...
85c73f01080aa9f2ac66d53e7e9883bb4efa1598682fbfbdff4d19bde4ac0070
ocaml-doc/odoc-parser
compat.mli
* @since 4.08 module Option : sig type 'a t = 'a option = None | Some of 'a val is_some : 'a option -> bool (** [is_some o] is [true] if and only if [o] is [Some o]. *) val value : default:'a -> 'a option -> 'a val join_list : 'a option list -> 'a list option end module Char : sig include module type of ...
null
https://raw.githubusercontent.com/ocaml-doc/odoc-parser/370f1cf044d7b2b89de35f72bb168c5fca66864d/src/compat.mli
ocaml
* [is_some o] is [true] if and only if [o] is [Some o].
* @since 4.08 module Option : sig type 'a t = 'a option = None | Some of 'a val is_some : 'a option -> bool val value : default:'a -> 'a option -> 'a val join_list : 'a option list -> 'a list option end module Char : sig include module type of Char val equal : t -> t -> bool * The equal function for cha...
bc0afc2cd83e3fb4ca4d8a726186db75974c9ec00c119ef0092e75c01cf76513
typeclasses/haskell-phrasebook
moments-in-time.hs
# LANGUAGE ScopedTypeVariables # import qualified Data.Time as T import qualified Data.Time.Clock.POSIX as T timeToString format time = T.formatTime T.defaultTimeLocale format time stringToTime format string = T.parseTimeM acceptExtraWhitespace T.defaultTimeLocale format string where acceptExtraW...
null
https://raw.githubusercontent.com/typeclasses/haskell-phrasebook/61ee6a7e63e4d6fc0e86c0cb9dc2c0d9f06b9537/moments-in-time.hs
haskell
# LANGUAGE ScopedTypeVariables # import qualified Data.Time as T import qualified Data.Time.Clock.POSIX as T timeToString format time = T.formatTime T.defaultTimeLocale format time stringToTime format string = T.parseTimeM acceptExtraWhitespace T.defaultTimeLocale format string where acceptExtraW...
ec31788ddd2f790d7025caea2dd6df4a04ec95e098705e703600d3535b291986
egison/egison-scheme
stream-egison.scm
;(define-module stream-egison ; (export match-all ; Something ; Eq ; Integer ; List ; Multiset ; )) ;(select-module stream-egison) (use util.match) (use srfi-1) srfi-40 (define-macro (match-all t M . clauses) (if (eq? clauses '()) '() (let* {[clau...
null
https://raw.githubusercontent.com/egison/egison-scheme/49188f4bcf91199a9e1d5142851a48ed2eb916e1/stream-egison.scm
scheme
(define-module stream-egison (export match-all Something Eq Integer List Multiset )) (select-module stream-egison)
(use util.match) (use srfi-1) srfi-40 (define-macro (match-all t M . clauses) (if (eq? clauses '()) '() (let* {[clause (car clauses)] [p (rewrite-pattern (list 'quasiquote (car clause)))] [e (cadr clause)]} `(stream-append (stream-map (lambda (ret) (apply (lambda ,(ex...
0b7d718efd6f8598eaeb84fc5b583a4802fb178bac32a331a223cb5a5d8e591a
danilkolikov/dfl
Dependencies.hs
| Module : Frontend . Inference . TypeSynonym . Dependencies Description : Resolution of dependencies between type synonyms Copyright : ( c ) , 2019 License : MIT Function for resolution of dependencies between type synonyms Module : Frontend.Inference.TypeSynonym.Dependenci...
null
https://raw.githubusercontent.com/danilkolikov/dfl/698a8f32e23b381afe803fc0e353293a3bf644ba/src/Frontend/Inference/TypeSynonym/Dependencies.hs
haskell
| Gets the graph of dependencies between type synonyms | A type of a dependency getter | Gets dependencies of a type synonym | Gets dependencies of a type | Gets dependencies of a single ident
| Module : Frontend . Inference . TypeSynonym . Dependencies Description : Resolution of dependencies between type synonyms Copyright : ( c ) , 2019 License : MIT Function for resolution of dependencies between type synonyms Module : Frontend.Inference.TypeSynonym.Dependenci...
63f72a5ca116ab8e4287e8b1224bea177dbe56f0822d0a7f2ad61570c2cd97d0
nklein/cl-reactive
signal.lisp
signal.lisp (in-package #:cl-reactive) (defclass signal-base () ((value :initarg :value :accessor %signal-value :documentation "Internal: The current value of the signal.") (type :initarg :type :reader signal-type :documentation "Internal: The type for values of th...
null
https://raw.githubusercontent.com/nklein/cl-reactive/670e8bd809e71c8d659c413f62a7a03462ec0630/src/signal.lisp
lisp
signal.lisp (in-package #:cl-reactive) (defclass signal-base () ((value :initarg :value :accessor %signal-value :documentation "Internal: The current value of the signal.") (type :initarg :type :reader signal-type :documentation "Internal: The type for values of th...
ca08272cb94bc7d4ab255ff02360b75e9c067b97dc26d0ff5fc0de3924ee6cd6
nbloomf/webdriver-w3c
State.hs
module Web.Api.WebDriver.Monad.Test.Server.State ( WebDriverServerState() , defaultWebDriverServerState , _is_active_session , _create_session , _delete_session , _load_page , _current_page , _go_back , _go_forward , _get_current_url , _get_last_selected_element , _set_last_selected_element ...
null
https://raw.githubusercontent.com/nbloomf/webdriver-w3c/c7b43d73c10c69a5e35dd7021b8f3507695ab6fb/test/Web/Api/WebDriver/Monad/Test/Server/State.hs
haskell
module Web.Api.WebDriver.Monad.Test.Server.State ( WebDriverServerState() , defaultWebDriverServerState , _is_active_session , _create_session , _delete_session , _load_page , _current_page , _go_back , _go_forward , _get_current_url , _get_last_selected_element , _set_last_selected_element ...
61278161ee1f348d635a738800ed3511a5576a3ad3724ce693b955218bf6b3b8
gphilipp/bdd-guide-clojure
project.clj
(defproject calculator "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0-alpha13"] [info.cukes/cucumber-clojure "1.2.5" :scope "test"] [net.mastert...
null
https://raw.githubusercontent.com/gphilipp/bdd-guide-clojure/230b32a70fadc5fe3e051e0aa0510acecade3c13/project.clj
clojure
(defproject calculator "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0-alpha13"] [info.cukes/cucumber-clojure "1.2.5" :scope "test"] [net.mastert...
b206a750467c04349ab11183a04621a7a909a2bb0dd5503cca50f1496f291123
dalaing/little-languages
Pretty.hs
| Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Copyright : (c) Dave Laing, 2016 License : BSD3 Maintainer : Stability : experimental Portability : non-portable -} module Component.Term.Nat.Pretty ( prettyTermInput ) where import...
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/modular/n-lang/src/Component/Term/Nat/Pretty.hs
haskell
| ^ ^ | ^ ^ ^ | ^ ^ ^ |
| Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Copyright : (c) Dave Laing, 2016 License : BSD3 Maintainer : Stability : experimental Portability : non-portable -} module Component.Term.Nat.Pretty ( prettyTermInput ) where import...
2d8721288cda3636ac5e0a00983c2fdc7c7e0904289f76435b735ce832714895
EgorDm/fp-pacman
Ghosts.hs
module Game.Agents.Ghosts ( blinky, pinky, inky, clyde, randy ) where import Debug.Trace import System.Random import Engine.Core.Base import Game.Agents.Helpers import Game.Agents.AgentTypes import Game.Agents.Agent import Game.Structure.World import Game.Level.Level import Constants import Resources import Da...
null
https://raw.githubusercontent.com/EgorDm/fp-pacman/19781c92c97641b0a01b8f1554f50f19ff6d3bf4/src/Game/Agents/Ghosts.hs
haskell
Data structures Classes Instances Functions | Ghost their home position they run to when they are in scatter mode. See explaination original game. | Ghost behaviour. Handles cases which are the same for all ghosts | Blinky targets pacman directly
module Game.Agents.Ghosts ( blinky, pinky, inky, clyde, randy ) where import Debug.Trace import System.Random import Engine.Core.Base import Game.Agents.Helpers import Game.Agents.AgentTypes import Game.Agents.Agent import Game.Structure.World import Game.Level.Level import Constants import Resources import Da...
609d859e372dd23ae4d9fbf0ff199df40cab9ea1176beb8a8997d70156b5c878
metareflection/poof
eval-check.rkt
#lang racket/base (provide eval:check eval:error) (require rackunit syntax/parse/define syntax/srcloc (for-syntax racket/base)) (define-simple-macro (eval:check actual:expr expected:expr) #:with stx this-syntax (with-check-info* (list (make-check-name 'eval:check) (make-che...
null
https://raw.githubusercontent.com/metareflection/poof/1a03c5e31c16dd971d698c8457ff6e4a8748d8f1/util/eval-check.rkt
racket
#lang racket/base (provide eval:check eval:error) (require rackunit syntax/parse/define syntax/srcloc (for-syntax racket/base)) (define-simple-macro (eval:check actual:expr expected:expr) #:with stx this-syntax (with-check-info* (list (make-check-name 'eval:check) (make-che...
d8d6469df5af9883b1cf237e426a68d3adf3106bc1f147516fec3a13bfb1eebb
Kappa-Dev/KappaTools
progress_report.ml
(******************************************************************************) (* _ __ * The Kappa Language *) | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF (* | ' / ********************************************************************...
null
https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/cli/progress_report.ml
ocaml
**************************************************************************** _ __ * The Kappa Language | ' / ******************************************************************** | . \ * This file is distributed under the terms of the |_|\_\ * GN...
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF type bar = { mutable ticks : int ; bar_size : int ; bar_char : char ; } type text = { mutable last_length : int; mutable last_event_nb : int; mutable last_time : float; } type t = Bar of bar | Text of text let inc_tick c = c...
85167c8123c4bd4c77575b494d0753ff61566cdb342b8eb4f095152affc8d366
ghcjs/ghcjs-base
Object.hs
# LANGUAGE UnboxedTuples # module JavaScript.Object ( Object , create , getProp, unsafeGetProp , setProp, unsafeSetProp , allProps, listProps , isInstanceOf ) where i...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-base/18f31dec5d9eae1ef35ff8bbf163394942efd227/JavaScript/Object.hs
haskell
as I | create an empty object | create an empty object # INLINE create # # INLINE getProp # # INLINE unsafeSetProp # -----------------------------------------------------------------------------
# LANGUAGE UnboxedTuples # module JavaScript.Object ( Object , create , getProp, unsafeGetProp , setProp, unsafeSetProp , allProps, listProps , isInstanceOf ) where i...
ba948cc7d90f2ef2dd0c55a1a5efb43eca963bba5801b40d204acde1befd1fcf
achirkin/vulkan
VK_INTEL_shader_integer_functions2.hs
# OPTIONS_HADDOCK not - home # {-# LANGUAGE DataKinds #-} {-# LANGUAGE MagicHash #-} # LANGUAGE PatternSynonyms # {-# LANGUAGE Strict #-} {-# LANGUAGE ViewPatterns #-} module Graphics.Vulkan.Ext.VK_INTEL_shader_integer_functions2 * Vulkan extension : @VK_INTEL_shader_integer_functions2@ ...
null
https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_INTEL_shader_integer_functions2.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE MagicHash # # LANGUAGE Strict # # LANGUAGE ViewPatterns # | supported: @vulkan@ contact: @Ian Romanick @ianromanick@ type: @device@ Extension number: @210@ Required extensions: 'VK_KHR_get_physical_device_properties2'. ** Required extensions: 'VK_K...
# OPTIONS_HADDOCK not - home # # LANGUAGE PatternSynonyms # module Graphics.Vulkan.Ext.VK_INTEL_shader_integer_functions2 * Vulkan extension : @VK_INTEL_shader_integer_functions2@ author : @INTEL@ module Graphics.Vulkan.Marshal, AHardwareBuffer(), ANativeWindow(), CAMetalLayer(), VkBool32(..), VkDe...
583df74274591aab93bda9e38c6c62234f835a02f910ad840fa02d4bc6a5fd94
mccoy/medici
medici_sup.erl
%%%------------------------------------------------------------------- %%% File : medici_sup.erl Author : < > %%% Description : %%% Created : 6 May 2009 by < > %%%------------------------------------------------------------------- -module(medici_sup). -behaviour(supervisor). %% API -export([start_link...
null
https://raw.githubusercontent.com/mccoy/medici/d4eafd6dd402d0c3bc42c4a92da6f95dee31c8f7/src/medici_sup.erl
erlang
------------------------------------------------------------------- File : medici_sup.erl Description : ------------------------------------------------------------------- API Supervisor callbacks ==================================================================== API functions ==============================...
Author : < > Created : 6 May 2009 by < > -module(medici_sup). -behaviour(supervisor). -export([start_link/0, start_link/1]). -export([init/1]). Function : start_link ( ) - > { ok , Pid } | ignore | { error , Error } start_link() -> supervisor:start_link(?MODULE, []). start_link(StartArgs) -> ...
5d5c1a9a0e8723501637bdc84039579afb57b7bbd383f256716401a044157b3f
ocaml-ppx/cinaps
non_staged_error.mli
(** Error message printed when not passing [-staged] *) val error_message : string
null
https://raw.githubusercontent.com/ocaml-ppx/cinaps/2791bce694bfea6ab077f13fc2987fb56fa5006f/src/non_staged_error.mli
ocaml
* Error message printed when not passing [-staged]
val error_message : string
106ae25d08bfbd9ec37a158dd50282eb0ee229429386c3a23c708311543c2f6f
ConsenSysMesh/Fae
HelloWorld2.hs
body :: FaeTX () body = newContract c where c :: Contract () String -- The underscore here means "there is an argument, which is ignored" c _ = spend "Hello, world!"
null
https://raw.githubusercontent.com/ConsenSysMesh/Fae/3ff023f70fa403e9cef80045907e415ccd88d7e8/documentation/tutorial/tutorial-1/HelloWorld2.hs
haskell
The underscore here means "there is an argument, which is ignored"
body :: FaeTX () body = newContract c where c :: Contract () String c _ = spend "Hello, world!"
93b0cfaea5ba2795b5dd4c17e23559715060659e98c8b89f9b322701d4957ed5
sky-big/RabbitMQ
rabbit_mgmt_wm_parameters.erl
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in %% compliance with the License. You may obtain a copy of the License at %% / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITH...
null
https://raw.githubusercontent.com/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_parameters.erl
erlang
compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -------------------------------------------------------------------- ---...
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ Management Plugin . The Initial Developer of the Original Code...
a3ae1f536c6bab7eb505ca4c43efc97524e5a730d24ec395857b4a35052b48b8
coq-contribs/coq-contribs
extract_opam_fields.ml
open Parse_description (* exporting *) let quote s = "\"" ^ s ^ "\"" let surround s = "(" ^ s ^ ")" let anglebracket s = "<" ^ s ^ ">" let squarebracket s = "[" ^ s ^ "]" let make_author a = let author_fields = (if a.author = "" then [] else [a.author])@ (* (if a.institution = "" then [] else [surround a.i...
null
https://raw.githubusercontent.com/coq-contribs/coq-contribs/60f19b3784db677b2261439472b901c4ec08e6e6/META/extract_opam_fields.ml
ocaml
exporting (if a.institution = "" then [] else [surround a.institution])@
open Parse_description let quote s = "\"" ^ s ^ "\"" let surround s = "(" ^ s ^ ")" let anglebracket s = "<" ^ s ^ ">" let squarebracket s = "[" ^ s ^ "]" let make_author a = let author_fields = (if a.author = "" then [] else [a.author])@ (if a.email = "" then [] else [anglebracket a.email])@ (if a.ho...
4c4d8ac1cdea45f76728cec732989c37f9cfe1a7f0b25fe2e09969d2535f87cf
timothypratley/leaderboardx
coach.cljs
(ns algopop.leaderboardx.app.views.coach (:require [algopop.leaderboardx.app.views.common :as common] [algopop.leaderboardx.app.db :as db] [clojure.string :as string] [reagent.core :as reagent])) (defonce goals (reagent/atom {1 "Increase passes per attack on goal from 3 to 4." ...
null
https://raw.githubusercontent.com/timothypratley/leaderboardx/ad1719b3bb49fb7ab495ed833f1a451ebb3aec4d/src/algopop/leaderboardx/app/views/coach.cljs
clojure
:component-did-mount common/focus-append Team goals Recuring assessments Upcoming checkpoints Quick links to team members
(ns algopop.leaderboardx.app.views.coach (:require [algopop.leaderboardx.app.views.common :as common] [algopop.leaderboardx.app.db :as db] [clojure.string :as string] [reagent.core :as reagent])) (defonce goals (reagent/atom {1 "Increase passes per attack on goal from 3 to 4." ...
89fa15d517a8e0fc2a5184041eb93fe13af58e138f8349fc67a237136d3497da
borkdude/tictactoe
handler.clj
(ns tictactoe.handler (:use tictactoe.controller compojure.core) (:require [noir.util.middleware :as noir-middleware] [compojure.route :as route])) (defroutes app-routes (route/resources "/") (route/not-found "Not Found")) ;;append your application routes to the all-routes vector (def all-...
null
https://raw.githubusercontent.com/borkdude/tictactoe/34a3a35ab9f15c96889a42816da4dc4e69a9237b/src/tictactoe/handler.clj
clojure
append your application routes to the all-routes vector add your middlewares here
(ns tictactoe.handler (:use tictactoe.controller compojure.core) (:require [noir.util.middleware :as noir-middleware] [compojure.route :as route])) (defroutes app-routes (route/resources "/") (route/not-found "Not Found")) (def all-routes [tictactoe-routes app-routes]) (def app (-> all-ro...
dcaffd11ceaea0b23a4720554d281ce364e2a8c33e006c1b947b970892fe414b
lisp/de.setf.xml
namespaces.lisp
-*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - parser ; -*- (in-package "XML-PARSER") #| <DOCUMENTATION> <DESCRIPTION> test for namespaces. see also test-validation and test-qnames </DESCRIPTION> </DOCUMENTATION> |# ;; ;; (format *trace-output* "~%~%;; this i...
null
https://raw.githubusercontent.com/lisp/de.setf.xml/827681c969342096c3b95735d84b447befa69fa6/tests/parser/namespaces.lisp
lisp
Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - parser ; -*- <DOCUMENTATION> <DESCRIPTION> test for namespaces. see also test-validation and test-qnames </DESCRIPTION> </DOCUMENTATION> by default xmlns is specified unbindable (let ((|REC-xml-names-19990114.NSC: Prefix Immutable| nil)) (...
(in-package "XML-PARSER") (format *trace-output* "~%~%;; this illustrates the consequences of attempts to bind standard namespaces.~%;; 0.949 fails these tests") (flet ((test-document (string) (type-of (handler-bind ((error #'(lambda (condition) (return-from test-document (typ...
835aedc59fea8441a3b26a1ade7c6e22658eb6094ae5172c986dff2ab4145b2f
atlas-engineer/nyxt
no-sound.lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :nyxt/tests) (define-test toggle-no-sound-mode () (let ((buffer (make-instance 'modable-buffer))) (with-current-buffer buffer (assert-true (enable-modes* 'nyxt/no-sound-mode:no-sound-mode buffer)) ...
null
https://raw.githubusercontent.com/atlas-engineer/nyxt/65a9aa568b16c109281fa403a7c045b3b6d87025/tests/offline/mode/no-sound.lisp
lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :nyxt/tests) (define-test toggle-no-sound-mode () (let ((buffer (make-instance 'modable-buffer))) (with-current-buffer buffer (assert-true (enable-modes* 'nyxt/no-sound-mode:no-sound-mode buffer)) ...
5ae09aabb00a03c34e5af27a6ff00c7f04d575ea2ac19d32842d7d7a06f39eb8
polysemy-research/polysemy-zoo
Internal.hs
# LANGUAGE AllowAmbiguousTypes , TemplateHaskell # module Polysemy.Shift.Internal where import Polysemy import Polysemy.Internal.Union import Polysemy.Cont.Internal (Ref(..)) import Control.Monad.Cont (ContT(..)) ----------------------------------------------------------------------------- -- | An effect for delimite...
null
https://raw.githubusercontent.com/polysemy-research/polysemy-zoo/eb0ce40e4d3b9757ede851a3450c05cc42949b49/src/Polysemy/Shift/Internal.hs
haskell
--------------------------------------------------------------------------- | An effect for delimited continuations, formulated algebraically formulation of abortive continuations. Activating polysemy-plugin is highly recommended when using this effect in order to avoid ambiguous types. ---------------------------...
# LANGUAGE AllowAmbiguousTypes , TemplateHaskell # module Polysemy.Shift.Internal where import Polysemy import Polysemy.Internal.Union import Polysemy.Cont.Internal (Ref(..)) import Control.Monad.Cont (ContT(..)) through a variant of the ' Polysemy . Cont . Jump/'Polysemy . Cont . Subst ' data Shift ref s m a where...
fa5c114c2f0b33ba22d330b64968c9652c689a5caec1aa046a4b6da1197271ab
ghc/packages-Cabal
setup.test.hs
import Test.Cabal.Prelude main = setupAndCabalTest $ do withPackageDb $ do setup "configure" [] setup "build" ["myprog"] setup "copy" ["myprog"]
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/Regression/T6125/setup.test.hs
haskell
import Test.Cabal.Prelude main = setupAndCabalTest $ do withPackageDb $ do setup "configure" [] setup "build" ["myprog"] setup "copy" ["myprog"]
2d09361d4db1554f975380f447ec5267335f81f8927a033a7f19a663f0203761
bobatkey/foveran
AdditiveMonadNBE.hs
module AdditiveMonadNBE where Guards guard : : Bool - > T U commutes with everything : guard M > > N = = N > > = \x . guard M > > return x so the normal form puts them all at the end ( and ands them ? ) guard M > > guard N = = guard ( M & & N ) ? ? Guards guard :: Bool -> T U commutes with ev...
null
https://raw.githubusercontent.com/bobatkey/foveran/e57463e3f6923becdf1249cd2fd0ccfcd566f7c5/experiments/AdditiveMonadNBE.hs
haskell
separate to guards. ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------
module AdditiveMonadNBE where Guards guard : : Bool - > T U commutes with everything : guard M > > N = = N > > = \x . guard M > > return x so the normal form puts them all at the end ( and ands them ? ) guard M > > guard N = = guard ( M & & N ) ? ? Guards guard :: Bool -> T U commutes with ev...
f1bd1237b992ca8ba474c33348bf15ee4d2439495ced58724c0eb9153c377bb5
brendanhay/amazonka
CreateKnowledgeBase.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused -...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-wisdom/gen/Amazonka/Wisdom/CreateKnowledgeBase.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Module : Amazonka.Wisdom.CreateKnowledgeBase Stability : auto-generated Creates a knowledge base. When using this API, you cannot reuse < Amazon AppIntegrations> * Creating a Request * Request Lenses * Destructuring the Response * Response Len...
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # De...
741278f49cca9cdf9d4f971332dbc452bc12c9dfa5f46085ce032efad7b6c6c1
Clojure2D/clojure2d-examples
interval.clj
(ns rt4.the-next-week.ch03.interval (:refer-clojure :exclude [empty size]) (:require [fastmath.core :as m])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defprotocol IntervalProto (contains [interval x]) ;; a <= x <= b ;; introduced due to the bug in the...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch03/interval.clj
clojure
a <= x <= b introduced due to the bug in the book (in the time of writing this code), a < x <= b can't name it size
(ns rt4.the-next-week.ch03.interval (:refer-clojure :exclude [empty size]) (:require [fastmath.core :as m])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defprotocol IntervalProto (contains- [interval x]) (clamp [interval x]) (expand [interval delta]) ...
c1c19c5d141cb82328e06522cd9be2bc1daa5a77d7bfa8e0ea75f0ab79f79819
PeterDWhite/Osker
Test.hs
module Main where main :: IO () main = do { putStrLn "Hello World from the utilities directory" }
null
https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Posix/Test.hs
haskell
module Main where main :: IO () main = do { putStrLn "Hello World from the utilities directory" }
fd8b10216e2a7db8f011d5f0dabd9b8b0b3a562a6d9e66b4dbb10561530068f7
joergen7/cf_reference
cfl-syntax-static.rkt
#lang racket/base ;;----------------------------------------------------------------------------- ;; Semantic reference of the distributed programming ;; language ;; Copyright 2016 - 2019 < > ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compl...
null
https://raw.githubusercontent.com/joergen7/cf_reference/911f71744891f52b3caae7073695a042ade0cf99/cfl-syntax-static.rkt
racket
----------------------------------------------------------------------------- language you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY...
#lang racket/base Semantic reference of the distributed programming Copyright 2016 - 2019 < > distributed under the License is distributed on an " AS IS " BASIS , (require redex) (provide cfl) (define-language cfl (e ::= x (λ ([x_!_ : T] ...) (ntv e)) (λ ([x_!_ : T] ...) (frn x T l s...
bf02113b93d6a9eaef90d8357853e7b593662ea5b544737152d6c2485f5485d9
z0w0/helm
Color.hs
# LANGUAGE DeriveGeneric # -- | Contains all data structures and functions for composing colors. module Helm.Color ( -- * Types Color(..), Gradient(..), -- * Composing rgba, rgb, hsva, hsv, blend, complement, linear, radial ) where import GHC.Generics -- | Represents a color. It is represented...
null
https://raw.githubusercontent.com/z0w0/helm/e2d8745d573c8b775aa390b70c597722ec102e48/src/Helm/Color.hs
haskell
| Contains all data structures and functions for composing colors. * Types * Composing | Represents a color. It is represented interally as an RGBA color, but the utility functions 'hsva', 'hsv', etc. can be used to convert from other popular formats to this structure. | Create an RGB color. | Create an RGBA co...
# LANGUAGE DeriveGeneric # module Helm.Color ( Color(..), Gradient(..), rgba, rgb, hsva, hsv, blend, complement, linear, radial ) where import GHC.Generics data Color = Color !Double !Double !Double !Double deriving (Show, Eq, Ord, Read, Generic) rgb :: Double -> Double -> Double -> Color rgb r g...