_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
f18b60c4e8c7d04a51bb4d67e17cef121983b407ff36f5fb31cb79563eed6242
marcelosousa/llvmvf
Type.hs
------------------------------------------------------------------------------- -- Module : Language.FeatherIR.Base.Type Copyright : ( c ) 2013 -- Feather-weight Intermediate Representation -- Type System ------------------------------------------------------------------------------- module Language.Feather...
null
https://raw.githubusercontent.com/marcelosousa/llvmvf/c314e43aa8bc8bb7fd9c83cebfbdcabee4ecfe1b/src/Language/FeatherIR/Base/Type.hs
haskell
----------------------------------------------------------------------------- Module : Language.FeatherIR.Base.Type Feather-weight Intermediate Representation Type System -----------------------------------------------------------------------------
Copyright : ( c ) 2013 module Language.FeatherIR.Base.Type where data Τ = Τ
4b7cb62ba4932ec3b1ad8cb066434e809045a33d56f9cd5e474f939fef82ed8f
BramvanVeenschoten1/qtt
Typechecker.hs
module Typechecker where import Core import Substitution import Normalization import Data.Map hiding (fold) import Data.Maybe import Prelude hiding (lookup) import Iterator(fold) {- here we do: operations on well-typed terms -} -- use fold heightOf :: Term -> Int heightOf t = case t of App f xs ...
null
https://raw.githubusercontent.com/BramvanVeenschoten1/qtt/5c8b1b038dbdec518630960d656a69b9724907cd/lamcvii/Typechecker.hs
haskell
here we do: operations on well-typed terms use fold
module Typechecker where import Core import Substitution import Normalization import Data.Map hiding (fold) import Data.Maybe import Prelude hiding (lookup) import Iterator(fold) heightOf :: Term -> Int heightOf t = case t of App f xs -> max (heightOf f) (maximum (fmap heightOf xs)) Lam _ _ _ b -> ...
64ffa67033153b9406fe191ced76709350bcff551852db71a0b98b92fbe1e0d8
vernemq/vernemq
vmq_diversity_script_balancer_SUITE.erl
-module(vmq_diversity_script_balancer_SUITE). -export([ %% suite/0, init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2, all/0 ]). -export([load_balancing_test_simple/1]). %% ==========================================================...
null
https://raw.githubusercontent.com/vernemq/vernemq/eb1a262035af47e90d9edf07f36c1b1503557c1f/apps/vmq_diversity/test/vmq_diversity_script_balancer_SUITE.erl
erlang
suite/0, =================================================================== common_test callbacks =================================================================== Actual Tests and `num_states=100`. The execution time of the script is constant therefore we can assume that the round-robin script balancer wil...
-module(vmq_diversity_script_balancer_SUITE). -export([ init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2, all/0 ]). -export([load_balancing_test_simple/1]). init_per_suite(_Config) -> cover:start(), application:ensure_all_started(v...
f8c664962ac746db12db1b4f1acc265fdedcde334df139404da20bf5ab36b0f2
airbus-seclab/bincat
armv7.ml
This file is part of BinCAT . Copyright 2014 - 2021 - Airbus BinCAT is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your opti...
null
https://raw.githubusercontent.com/airbus-seclab/bincat/7d4a0b90cf950c0f43e252602a348cf9e2f858ba/ocaml/src/disassembly/armv7.ml
ocaml
Decoder for ARMv7 ********************************************************************** Creation of the general purpose registers ********************************************************************** execution state registers EQ - Z set (equal) NE - Z clear (not equal) MI - N set (negative) VC - V cle...
This file is part of BinCAT . Copyright 2014 - 2021 - Airbus BinCAT is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your opti...
061753e5313575b4df2b92211bd1f96734299dd41d1c7eb80ff0a06fa803f9cd
landakram/kiwi-desktop
events.cljs
(ns kiwi.setup.events (:require [re-frame.core :as re-frame :refer [dispatch after enrich path reg-event-db reg-event-fx reg-fx reg-cofx inject-cofx]] [kiwi.setup.utils :as setup-utils])) (def fs (js/require "fs-extra")) (reg-cofx :default-wiki-path (fn [coeffects _] (assoc coeffects :def...
null
https://raw.githubusercontent.com/landakram/kiwi-desktop/cc7d0a5f28430f39d43dffb26850183601fd28f9/src/cljs/kiwi/setup/events.cljs
clojure
Seems like a misuse of cofx, but it makes testing easier because we can stub it, so whatever. Then again, the valid-wiki? function internally is not actually pure (uses the fs module), so it kind of makes sense that it would be considered a coeffect. TODO: Replace with reading home file + other tutorial files ...
(ns kiwi.setup.events (:require [re-frame.core :as re-frame :refer [dispatch after enrich path reg-event-db reg-event-fx reg-fx reg-cofx inject-cofx]] [kiwi.setup.utils :as setup-utils])) (def fs (js/require "fs-extra")) (reg-cofx :default-wiki-path (fn [coeffects _] (assoc coeffects :def...
4ff906918503b975cf44c69a718d069b513caad2f7839ded7e97b9d9c123d95e
ekmett/indexed
Command.hs
# LANGUAGE PolyKinds # # LANGUAGE DataKinds # # LANGUAGE TypeOperators # {-# LANGUAGE Rank2Types #-} ----------------------------------------------------------------------------- -- | -- Module : Indexed.Command Copyright : ( C ) 2012 -- License : BSD-style (see the file LICENSE) Maintainer : ...
null
https://raw.githubusercontent.com/ekmett/indexed/331b5dd12eee9dfa89d8bf2dda18dce04030167b/src/Indexed/Command.hs
haskell
# LANGUAGE Rank2Types # --------------------------------------------------------------------------- | Module : Indexed.Command License : BSD-style (see the file LICENSE) Stability : experimental Portability : non-portable ---------------------------------------------------------------------------
# LANGUAGE PolyKinds # # LANGUAGE DataKinds # # LANGUAGE TypeOperators # Copyright : ( C ) 2012 Maintainer : < > module Indexed.Command ( (>>)(..) ) where import Indexed.Types import Indexed.Functor infixr 8 >> infixr 1 :& data (p >> q) r i = p i :& (q ~> r) instance IFunctor (p >> q) where ...
25bd175c235ed7083f7297ac79c7f3b2d0e624a2db30ceb0c142935145b03766
ros/roslisp_common
macros.lisp
(in-package :cl-utils) (deftype non-null () '(not null)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Definitions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defmacro defvars (&body var-names) (cons 'progn (mapcar #'(lambda (name) `(defvar ,name)) var-names))) ;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/ros/roslisp_common/4db311da26497d84a147f190200e50c7a5b4106e/cl_utils/src/utils/macros.lisp
lisp
Definitions Symbols Binding condlet assertions destructuring Control flow abbreviations Spell these out so slime can indent correctly anaphoric macros Printing
(in-package :cl-utils) (deftype non-null () '(not null)) (defmacro defvars (&body var-names) (cons 'progn (mapcar #'(lambda (name) `(defvar ,name)) var-names))) (defun build-symbol-name (&rest args) "build-symbol-name S1 ... Sn. Each Si is a string or symbol. Concatenate them into a single long string (wh...
1a5bc5720e97788f4c3a6fd722320a2d05dc23641081f0f626ff085a09719845
liquidz/misaki
config.clj
(ns misaki.test.compiler.default.config (:require [misaki.compiler.default.config :refer :all] [misaki [config :refer [*config*]] [tester :refer [set-base-dir! bind-config defcompilertest]]] [misaki.util [file :refer :all] [sequence :refer :all]] [clj-time.core :refe...
null
https://raw.githubusercontent.com/liquidz/misaki/b8104e632058e3b3da4487513d10e666e5914ec9/test/misaki/test/compiler/default/config.clj
clojure
layout-file? make-template-output-filename
(ns misaki.test.compiler.default.config (:require [misaki.compiler.default.config :refer :all] [misaki [config :refer [*config*]] [tester :refer [set-base-dir! bind-config defcompilertest]]] [misaki.util [file :refer :all] [sequence :refer :all]] [clj-time.core :refe...
be07036abe0c4cbfa9acf9144993119f2104da5b6d2defe4a59563dfc6999204
clojurewerkz/statistiker
k_nearest_neighbours_test.clj
(ns clojurewerkz.statistiker.classification.k-nearest-neighbours-test (:require [clojurewerkz.statistiker.classification.k-nearest-neighbours :refer :all] [clojurewerkz.statistiker.distance :as distance] [clojure.test :refer :all])) (def test-item [6 130 8]) (def classification-data {:male ...
null
https://raw.githubusercontent.com/clojurewerkz/statistiker/f056f68c975cf3d6e0f1c8212aef9114d4eb657c/test/clj/clojurewerkz/statistiker/classification/k_nearest_neighbours_test.clj
clojure
(ns clojurewerkz.statistiker.classification.k-nearest-neighbours-test (:require [clojurewerkz.statistiker.classification.k-nearest-neighbours :refer :all] [clojurewerkz.statistiker.distance :as distance] [clojure.test :refer :all])) (def test-item [6 130 8]) (def classification-data {:male ...
917e8ff862c286ced14b0dfdbef4454ac09ab55b096213d3c86476a3037d5532
cedlemo/OCaml-GObject-Introspection
Test_object_info.ml
* Copyright 2017 - 2019 , * This file is part of OCaml - GObject - Introspection . * * OCaml - GObject - Introspection is free software : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation , either version 3 o...
null
https://raw.githubusercontent.com/cedlemo/OCaml-GObject-Introspection/261c76d9e5d90f706edff1121a63bf5eb611399b/tests/Test_object_info.ml
ocaml
* Copyright 2017 - 2019 , * This file is part of OCaml - GObject - Introspection . * * OCaml - GObject - Introspection is free software : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation , either version 3 o...
89e29e2a591361a60c5a6d1bf079598af3cb23668c7b9bc2ec610e7bca8bafec
dongcarl/guix
search.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2014 < > Copyright © 2015 , 2016 < > Copyright © 2017 < > Copyright © 2017 < > Copyright © 2018 , 2020 , 2021 < > Copyright © 2018 < > Copyright © 2020 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free s...
null
https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/search.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2014 < > Copyright © 2015 , 2016 < > Copyright © 2017 < > Copyright © 2017 < > Copyright © 2018 , 2020 , 2021 < > Copyright © 2018 < > Copyright © 2020 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU G...
1570823d388808b7916cbb0f25393e4b4f6d6a7602484387732171acf4b66594
onedata/op-worker
bagit_checksums.erl
%%%------------------------------------------------------------------- @author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc %%% This is a helper module for bagit_...
null
https://raw.githubusercontent.com/onedata/op-worker/99b86a7229f6db6a694997bd5df4aa69e140e7ee/src/modules/archive/layouts/bagit/bagit_checksums.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc This is a helper module for bagit_archive module. It contains utility functions for creating checksum manifests files. @end ---------------------------------------------...
@author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . -module(bagit_checksums). -author("Jakub Kudzia"). -include("modules/dataset/bagit.hrl"). -include("modules/fslogic/fslogic_common.hrl"). -include("modules/logical_file_manager/lfm.hrl"). -export(...
186ee66bfff7e2f9b991c3e6005ae99a441d74cd9786f19e96913696174c04a0
jeapostrophe/mongodb
main.rkt
#lang racket/base (require "dict.rkt" "struct.rkt") (provide (all-from-out "dict.rkt" "struct.rkt"))
null
https://raw.githubusercontent.com/jeapostrophe/mongodb/4fbeb1a577ff9a1b8274045a5741d6670d555ac7/db/mongodb/orm/main.rkt
racket
#lang racket/base (require "dict.rkt" "struct.rkt") (provide (all-from-out "dict.rkt" "struct.rkt"))
a543267f54550f134e2ebdffa8918efb036b4908bf06ac9aa16e93c1ae7f60d7
ekmett/lens
Wrapped.hs
# LANGUAGE CPP # {-# LANGUAGE Rank2Types #-} # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE FlexibleContexts # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # # LANGUAGE PolyKinds # # LANGUAGE PatternSynonyms # # LANGUAG...
null
https://raw.githubusercontent.com/ekmett/lens/71683b0576af707202faf66e08988b8e46666e38/src/Control/Lens/Wrapped.hs
haskell
# LANGUAGE Rank2Types # # OPTIONS_GHC -Wno-warnings-deprecations # --------------------------------------------------------------------------- | Module : Control.Lens.Wrapped License : BSD-style (see the file LICENSE) Stability : experimental Portability : Rank2, MPTCs, fundeps from the @newtype@ ...
# LANGUAGE CPP # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE FlexibleContexts # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # # LANGUAGE PolyKinds # # LANGUAGE PatternSynonyms # # LANGUAGE ViewPatterns # #ifdef TRU...
28987e7e4380cdd78e72e47df5daa5154582bbc6c9f7a489e54bb3d27807d6d3
onedata/op-worker
atm_single_value_store_container.erl
%%%------------------------------------------------------------------- @author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc %%% This module implements `atm_store_...
null
https://raw.githubusercontent.com/onedata/op-worker/0b059f432df26a54f372f7d4b99a40ffca5f802a/src/modules/automation/store/container/single_value/atm_single_value_store_container.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc This module implements `atm_store_container` functionality for `single_value` atm_store type. @end ------------------------------------------------------------------- a...
@author ( C ) 2021 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . -module(atm_single_value_store_container). -author("Bartosz Walkowicz"). -behaviour(atm_store_container). -behaviour(persistent_record). -include("modules/automation/atm_execution.hrl"). -include_...
3d177b374bd2666c6f2ec2c9cef7124b874643cbbedb1d6217459a4c7c5d5f59
MaskRay/OJHaskell
C.hs
# LANGUAGE ForeignFunctionInterface , MultiWayIf , OverloadedStrings , Safe # import Control.Arrow import Control.Monad.State import Data.Char import Data.Functor import Data.Maybe import Foreign.C.String import Foreign.C.Types import Text.Printf import qualified Data.ByteString.Char8 as B int = state $ fromJust . B.r...
null
https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Codeforces/668/C.hs
haskell
# LANGUAGE ForeignFunctionInterface , MultiWayIf , OverloadedStrings , Safe # import Control.Arrow import Control.Monad.State import Data.Char import Data.Functor import Data.Maybe import Foreign.C.String import Foreign.C.Types import Text.Printf import qualified Data.ByteString.Char8 as B int = state $ fromJust . B.r...
b9b7f90a537468c5840cc702ca3ce51fd1535dd600f03b658826bdfc31ceac05
tsahyt/clingo-haskell
Symbolic.hs
-- | Module providing direct access to the C style iterator interface for -- symbolic atom inspection. A version abstracting this into lists is provided in ' Clingo . Inspection . Symbolic ' . This module is exported for users who want -- to build their own iterator abstraction. module Clingo.Internal.Inspection.Symb...
null
https://raw.githubusercontent.com/tsahyt/clingo-haskell/083c84aae63565067644ccaa72223a4c12b33b88/src/Clingo/Internal/Inspection/Symbolic.hs
haskell
| Module providing direct access to the C style iterator interface for symbolic atom inspection. A version abstracting this into lists is provided to build their own iterator abstraction.
in ' Clingo . Inspection . Symbolic ' . This module is exported for users who want module Clingo.Internal.Inspection.Symbolic ( SymbolicAtoms, SIterator, symbolicAtomsSize, symbolicAtomsBegin, symbolicAtomsEnd, symbolicAtomsNext, symbolicAtomsIsValid, symbolicAtomsFind, symbolicAto...
e9bd326c3d6b9d7d0bde2207ae540a59c67e4e3c4a70aa3a2a1c7ae43a568eff
zyrolasting/mind-map
main.rkt
#lang racket/base (provide read-thoughts thoughts->pict in-thoughts thoughts->digraph-data (struct-out exn:fail:mind-map:indent)) (require racket/format racket/list racket/generator racket/sequence net/url graphviz "private/lexe...
null
https://raw.githubusercontent.com/zyrolasting/mind-map/8401400f1dbc7956357cd27563b6926f4e429d7c/main.rkt
racket
#lang racket/base (provide read-thoughts thoughts->pict in-thoughts thoughts->digraph-data (struct-out exn:fail:mind-map:indent)) (require racket/format racket/list racket/generator racket/sequence net/url graphviz "private/lexe...
2e733be7fbb8a3856c244a36879f439fe65654c7c1281fec12d5bcdc4ea7feb0
EligiusSantori/L2Apf
magic_effects.scm
; l2j/gameserver/serverpackets/MagicEffectIcons.java (module system racket/base (require "../../packet.scm") (provide game-server-packet/magic-effects) (define (read-effects s c [l (list)]) (if (> c 0) (read-effects s (- c 1) (cons (list (cons 'skill-id (read-int32 #f s)) (cons 'level (read-int16 #f s)...
null
https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/packet/game/server/magic_effects.scm
scheme
l2j/gameserver/serverpackets/MagicEffectIcons.java
(module system racket/base (require "../../packet.scm") (provide game-server-packet/magic-effects) (define (read-effects s c [l (list)]) (if (> c 0) (read-effects s (- c 1) (cons (list (cons 'skill-id (read-int32 #f s)) (cons 'level (read-int16 #f s)) (cons 'duration (read-int32 #f s)) ) l)) ...
7fb6178f204f29d336dd1c1cfd39eb77bafaacc63b305eecb0ad89330ebef27d
0install/0install
test_sat.ml
Copyright ( C ) 2013 , the README file for details , or visit . * See the README file for details, or visit . *) open Support open OUnit open Zeroinstall module I = Impl_provider module U = Support.Utils module Q = Support.Qdom module StringData = struct type t = string let pp = Format.pp_prin...
null
https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/tests/test_sat.ml
ocaml
We initially try liba-3 before learning that it is incompatible and backtracking. We learn that liba-3 doesn't work ever. We initially try liba-3 before learning that it is incompatible and backtracking. We learn that liba-3 doesn't work with prog-1. at once. The learning means we don't have to explore eve...
Copyright ( C ) 2013 , the README file for details , or visit . * See the README file for details, or visit . *) open Support open OUnit open Zeroinstall module I = Impl_provider module U = Support.Utils module Q = Support.Qdom module StringData = struct type t = string let pp = Format.pp_prin...
473cb83263fa65b65564db2aab9169f714fbeaa99f8944bac224df4d48c0ae0f
VERIMAG-Polyhedra/VPL
Proj.ml
module Debug = DebugTypes.Debug(struct let name = "Proj" end) module Cs = Cstr.Rat let regsToCs : ('c PLP.Region.t * 'c Cons.t) list -> ('c PLP.Region.t * 'c Cons.t) list = fun regs -> Debug.log DebugTypes.MOutput (lazy (Printf.sprintf "Regions: \n%s\n" (Misc.list_to_string ...
null
https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/core/Proj.ml
ocaml
module Debug = DebugTypes.Debug(struct let name = "Proj" end) module Cs = Cstr.Rat let regsToCs : ('c PLP.Region.t * 'c Cons.t) list -> ('c PLP.Region.t * 'c Cons.t) list = fun regs -> Debug.log DebugTypes.MOutput (lazy (Printf.sprintf "Regions: \n%s\n" (Misc.list_to_string ...
283f1ea861c219a1d3497be030bce378bc360a74f44e3faa0dc3daf80a8d8645
albertoruiz/easyVision
Sparse.hs
# LANGUAGE FlexibleContexts # module Util.Sparse( MatrixBlock(..), SparseMatrix(..), SMat, mkSparse, toDense, bMul,bTrans, blockDiag, blockDiagSolveLU ) where import Numeric.LinearAlgebra hiding (i) --import qualified Data.Map as Map import qualified Data.Array as A import Data.List import Util.Debug(...
null
https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/packages/base/src/Util/Sparse.hs
haskell
import qualified Data.Map as Map allow different sizes? allow different sizes? ----------------------------- ------------------------------------------ blockDiagSolve :: (Field t) => [Matrix t] -> Matrix t -> Matrix t
# LANGUAGE FlexibleContexts # module Util.Sparse( MatrixBlock(..), SparseMatrix(..), SMat, mkSparse, toDense, bMul,bTrans, blockDiag, blockDiagSolveLU ) where import Numeric.LinearAlgebra hiding (i) import qualified Data.Array as A import Data.List import Util.Debug(impossible) data MatrixBlock t = Z...
705e62b96cf8a5bbeabb231472b516f00ccdfd57e8635874a4c0350925cfd08c
haskell-jp/makeMistakesToLearnHaskell
no-open-paren3.hs
main = do input <- getContents putStr (unlines (reverse lines input)))
null
https://raw.githubusercontent.com/haskell-jp/makeMistakesToLearnHaskell/1174d5c6bb82e57622be8033607a4d049e30ae7e/test/assets/4/no-open-paren3.hs
haskell
main = do input <- getContents putStr (unlines (reverse lines input)))
201f5131de6ae960dc2a51e5ae49db55bfa2ecb7f49ca940cbfbe212d3318781
ocaml-gospel/ortac
exceptions.ml
open Exceptions__Lib_rtac open Common let bad_raise_notfound () = check_raises_ortac "bad_raise_notfound" (fun () -> bad_raise_notfound 0 |> ignore) let undeclared_raise_notfound () = check_raises_ortac "bad_raise_notfound" (fun () -> undeclared_raise_notfound 0 |> ignore) let raise_invalidarg () = ...
null
https://raw.githubusercontent.com/ocaml-gospel/ortac/71a2c40942b6753c7b3f3bd0e025560d42b02b37/test/suite/exceptions.ml
ocaml
open Exceptions__Lib_rtac open Common let bad_raise_notfound () = check_raises_ortac "bad_raise_notfound" (fun () -> bad_raise_notfound 0 |> ignore) let undeclared_raise_notfound () = check_raises_ortac "bad_raise_notfound" (fun () -> undeclared_raise_notfound 0 |> ignore) let raise_invalidarg () = ...
f2051dc327637fe3402c7151d2eeae62d4bd7ef782a2e34c3ba2fe1b16ccbed9
syntax-objects/syntax-parse-example
define-extend.rkt
#lang racket/base (provide define-extend) (require (for-syntax racket/base syntax/parse syntax/parse/lib/function-header)) (begin-for-syntax (struct extensible (closed-id open-id) #:property prop:rename-transformer 0) (define-splicing-syntax-class extend-option #...
null
https://raw.githubusercontent.com/syntax-objects/syntax-parse-example/0675ce0717369afcde284202ec7df661d7af35aa/define-extend/define-extend.rkt
racket
#lang racket/base (provide define-extend) (require (for-syntax racket/base syntax/parse syntax/parse/lib/function-header)) (begin-for-syntax (struct extensible (closed-id open-id) #:property prop:rename-transformer 0) (define-splicing-syntax-class extend-option #...
576a37a295f3403cb3207778e2bd4995d8166039ee144060a0890d34a2441282
acarrico/wayland-protocol
registry-client.rkt
#lang typed/racket/base (provide (all-from-out "generated/wl_registry-client.rkt")) (require "generated/wl_registry-client.rkt")
null
https://raw.githubusercontent.com/acarrico/wayland-protocol/7270ae8f420c8062466c230e7cf3fe5331fe9fbd/typed/wayland-0/registry-client.rkt
racket
#lang typed/racket/base (provide (all-from-out "generated/wl_registry-client.rkt")) (require "generated/wl_registry-client.rkt")
a310bee26c0936de1e05541449c0758d17b1eb6104d678180527b5b69a23dcbd
ocaml-multicore/domainslib
task_more_deps.ml
* Generate tests of async+await from Domainslib . Task . It does so by generating a random , acyclic dependency graph of [ async ] tasks , each [ await]ing on its dependency . Generate tests of async+await from Domainslib.Task. It does so by generating a random, acyclic dependency graph of [async] ta...
null
https://raw.githubusercontent.com/ocaml-multicore/domainslib/142b95870fe2fb8b85ce0d97a6f0a8b54b07726f/test/task_more_deps.ml
ocaml
Each task is represented by an array index w/a deps.list ensure reduced dep is valid
* Generate tests of async+await from Domainslib . Task . It does so by generating a random , acyclic dependency graph of [ async ] tasks , each [ await]ing on its dependency . Generate tests of async+await from Domainslib.Task. It does so by generating a random, acyclic dependency graph of [async] ta...
7173bf58899d564e5c7d341e99fcc338f65eddcb4cc62d32bf5d77550ef299b3
webyrd/2012-scheme-workshop-quines-paper-code
interpreter.scm
(load "testcheck.scm") (load "appendixC.scm") (load "appendixD.scm") (load "interp-helpers.scm") (define eval-exp (lambda (exp env) (dmatch exp ((,rator ,rand) (let ((proc (eval-exp rator env)) (arg (eval-exp rand env))) (dmatch proc ((closure ,x ,body ,env2) ...
null
https://raw.githubusercontent.com/webyrd/2012-scheme-workshop-quines-paper-code/3d160707f6ea6f60a08ec271abea1bfdaf63fd41/interpreter.scm
scheme
diverges! (eval-exp big-omega '())
(load "testcheck.scm") (load "appendixC.scm") (load "appendixD.scm") (load "interp-helpers.scm") (define eval-exp (lambda (exp env) (dmatch exp ((,rator ,rand) (let ((proc (eval-exp rator env)) (arg (eval-exp rand env))) (dmatch proc ((closure ,x ,body ,env2) ...
5b53b35c8087f223d68f5b6774e3b9ee8d8acdd733187a8bedb5d6858e2a3522
input-output-hk/cardano-base
Sum.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # -- | A key evolving signatures imp...
null
https://raw.githubusercontent.com/input-output-hk/cardano-base/b2058e5f38bfb463b3e414d8fca6656d78f0236d/cardano-crypto-class/src/Cardano/Crypto/KES/Sum.hs
haskell
| A key evolving signatures implementation. It is a naive recursive implementation of the sum composition from /Composition and Efficiency Tradeoffs for Forward-Secure Digital Signatures/ <> binary tree version. * Type aliases for powers of binary sums the time periods. substantially on the size of the ty...
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # section 3.1 of the \"MMM\ " pape...
180458056e7e4663ab61158bdb6bef782eb83fdbb282e51388a3c589ea14e628
deadcode/Learning-CL--David-Touretzky
11.12.lisp
(defun power-of-2 (n) (do ((result 1 (incf result result)) (i 1 (incf i))) ((> i n) result))) (let ((test1 '(power-of-2 0)) (test2 '(power-of-2 1)) (test3 '(power-of-2 2)) (test4 '(power-of-2 3))) (format t "~&~s = ~s" test1 (eval test1)) (format t "~&~s = ~s" test2 (eval t...
null
https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%2011/11.12.lisp
lisp
(defun power-of-2 (n) (do ((result 1 (incf result result)) (i 1 (incf i))) ((> i n) result))) (let ((test1 '(power-of-2 0)) (test2 '(power-of-2 1)) (test3 '(power-of-2 2)) (test4 '(power-of-2 3))) (format t "~&~s = ~s" test1 (eval test1)) (format t "~&~s = ~s" test2 (eval t...
2a854e426a0466bc05b13ea09fdc82695d28584543bebe0462286050f35b6a29
kind2-mc/kind2
model.ml
This file is part of the Kind 2 model checker . Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa 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 a...
null
https://raw.githubusercontent.com/kind2-mc/kind2/e57df0ec7756502acf07bc16a6f439b4b3fa64f4/src/model.ml
ocaml
Offset of the variables at each step of a path. A model is a map variables to assignments A path is a map of state variables to assignments Pretty-print a value if Term.bool_of_term term then Format.fprintf ppf "✓" (\* "true" *\) else Format.fprintf ppf "✗" (\* "false" *\) else TODO do we not w...
This file is part of the Kind 2 model checker . Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa 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 a...
203085d3e9a23e318e64239d50bd0f03a90c0ec89aba784186adc0676f3696df
PacktWorkshops/The-Clojure-Workshop
project.clj
(defproject coffee-app "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[org.clojure/clojure "1.10.0"] [org.clojure/test.check "0.10.0"] [expectat...
null
https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter10/Activity10.01/coffee-app/project.clj
clojure
(defproject coffee-app "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[org.clojure/clojure "1.10.0"] [org.clojure/test.check "0.10.0"] [expectat...
88db1ba5ad7dac643ec29ddd0191a5d5e51a6eed62a3d68200d5dc645779e4e3
leonardiwagner/wiktionary
page_reader.clj
(ns wiktionary.page-reader) (defn- read-http-page [url] (try (slurp url) (catch java.io.FileNotFoundException e nil))) (defn read-page [word] (-> (format "" word) (read-http-page)))
null
https://raw.githubusercontent.com/leonardiwagner/wiktionary/a25e2445288d756ee7b623b99d1794ef801376ec/src/wiktionary/page_reader.clj
clojure
(ns wiktionary.page-reader) (defn- read-http-page [url] (try (slurp url) (catch java.io.FileNotFoundException e nil))) (defn read-page [word] (-> (format "" word) (read-http-page)))
b435dd2992cd00028a1a6d9927e97161f5d96617eb9785fc4dafaf0e547c4dca
fcracker79/aws-lambda-haskell-url-shortener
URLGeneratorSpec.hs
module URLGeneratorSpec where import Test.Hspec import URLGenerator import DynamoDB import Data.Text import Network.AWS.Types import Data.ByteString.Char8 spec :: Spec spec = do describe "Prelude.head" $ do it "The saved URL must match with the fetched URL" $ do let fakeURL = "" let conf = DynamoDB...
null
https://raw.githubusercontent.com/fcracker79/aws-lambda-haskell-url-shortener/3c1692a10ab5f92bfd31070c15ac663edd88fa2a/test/integration/URLGeneratorSpec.hs
haskell
module URLGeneratorSpec where import Test.Hspec import URLGenerator import DynamoDB import Data.Text import Network.AWS.Types import Data.ByteString.Char8 spec :: Spec spec = do describe "Prelude.head" $ do it "The saved URL must match with the fetched URL" $ do let fakeURL = "" let conf = DynamoDB...
799ac9fa50fe3d786069f5d4a9e00d70042f5d2531dfb6c994341fbb9474f4e2
ygmpkk/house
Objects.hs
-------------------------------------------------------------------------------- -- | -- Module : Graphics.UI.GLUT.Objects Copyright : ( c ) 2003 -- License : BSD-style (see the file libraries/GLUT/LICENSE) -- -- Maintainer : -- Stability : provisional -- Portability : portable -- GLUT inc...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/GLUT/Graphics/UI/GLUT/Objects.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.UI.GLUT.Objects License : BSD-style (see the file libraries/GLUT/LICENSE) Maintainer : Stability : provisional Portability : portable geometric objects. These routines reflect functionality ava...
Copyright : ( c ) 2003 GLUT includes a number of routines for generating easily recognizable 3D @aux@ toolkit described in the /OpenGL Programmer\ 's and are included in GLUT to allow the construction of simple GLUT programs that render module Graphics.UI.GLUT.Objects ( Flavour(..), Object(..), ...
7df33d50c622b07c369f0df9f6f01f8d81bf00876fdb70bf333321c280f827f4
progman1/genprintlib
program_management.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/progman1/genprintlib/acc1e5cc46b9ce6191d0306f51337581c93ffe94/debugger/4.10.0/program_management.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt OCaml port by and Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Int64ops open Unix open Unix_tools open Debugger_c...
8d8494a256099c679a837afa5a0f4f33c1ccda0bd094ed326ce71d7cd13a54dd
VisionsGlobalEmpowerment/webchange
views.cljs
(ns webchange.login.sign-in.views (:require [re-frame.core :as re-frame] [webchange.login.sign-in.state :as state] [webchange.ui.index :as ui])) (defn sign-in-form [props] (let [username @(re-frame/subscribe [::state/username]) password @(re-frame/subscribe [::state/password]) loading...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/e147c28e375a78d74612e1537ff5d798ecdb4016/src/cljs/webchange/login/sign_in/views.cljs
clojure
(ns webchange.login.sign-in.views (:require [re-frame.core :as re-frame] [webchange.login.sign-in.state :as state] [webchange.ui.index :as ui])) (defn sign-in-form [props] (let [username @(re-frame/subscribe [::state/username]) password @(re-frame/subscribe [::state/password]) loading...
7f664084f5e2a9bb5e8a263ed5ac5a84429ee531e4cbf472df324625772fc9cf
redstarssystems/gantt
server.clj
(ns org.rssys.gantt.web.server (:require [clojure.string :as string] [io.pedestal.log :as log] [org.rssys.gantt.util :refer [prf]] [org.rssys.gantt.web.router :as router] [reitit.ring] [ring.adapter.jetty :as jetty] [ring.middleware.content-type :as content-type] [ring.middleware.defau...
null
https://raw.githubusercontent.com/redstarssystems/gantt/26ec956118fa34bc54ff16c78474b6a40f559876/src/org/rssys/gantt/web/server.clj
clojure
(reitit.ring/create-resource-handler {:path "/" :root "public"})
(ns org.rssys.gantt.web.server (:require [clojure.string :as string] [io.pedestal.log :as log] [org.rssys.gantt.util :refer [prf]] [org.rssys.gantt.web.router :as router] [reitit.ring] [ring.adapter.jetty :as jetty] [ring.middleware.content-type :as content-type] [ring.middleware.defau...
e8cca186b0586d107316dcdab3dbf62392639409acab6e8200c7dd6dcd66e0fe
clojure-interop/aws-api
AmazonKinesisAnalyticsClientBuilder.clj
(ns com.amazonaws.services.kinesisanalytics.AmazonKinesisAnalyticsClientBuilder "Fluent builder for AmazonKinesisAnalytics. Use of the builder is preferred over using constructors of the client class." (:refer-clojure :only [require comment defn ->]) (:import [com.amazonaws.services.kinesisanalytics AmazonKines...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.kinesisanalytics/src/com/amazonaws/services/kinesisanalytics/AmazonKinesisAnalyticsClientBuilder.clj
clojure
(ns com.amazonaws.services.kinesisanalytics.AmazonKinesisAnalyticsClientBuilder "Fluent builder for AmazonKinesisAnalytics. Use of the builder is preferred over using constructors of the client class." (:refer-clojure :only [require comment defn ->]) (:import [com.amazonaws.services.kinesisanalytics AmazonKines...
82156b7a2c65fe23e2735bcd41ba33094be71d38b517a95a48621adb1207315b
tmfg/mmtis-national-access-point
route_wizard.cljs
(ns ote.app.controller.route.route-wizard "Route based traffic controller" (:require [tuck.core :as tuck :refer-macros [define-event]] [ote.communication :as comm] [ote.time :as time] [cljs-time.coerce :as coerce] [clojure.string :as str] [ote.app.controll...
null
https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/a86cc890ffa1fe4f773083be5d2556e87a93d975/ote/src/cljs/ote/app/controller/route/route_wizard.cljs
clojure
Load available stops from server (GeoJSON) Load existing route Edit route basic info Events to edit the route's stop sequence create, edit and remove custom stops add custom stop to stop sequence Edit times initialize route times based on stop sequence Event to set service calendar Save route as GTFS Save ro...
(ns ote.app.controller.route.route-wizard "Route based traffic controller" (:require [tuck.core :as tuck :refer-macros [define-event]] [ote.communication :as comm] [ote.time :as time] [cljs-time.coerce :as coerce] [clojure.string :as str] [ote.app.controll...
19f38d56cc13dba71add5879da315ce78202a811edff9919448cdf896f823cd5
basho/sidejob
supervisor_eqc.erl
File : supervisor_eqc.erl Author : %%% Description : Created : 15 May 2013 by -module(supervisor_eqc). -export([ prop_seq/0 %, % prop_par/0 ]). -export([initial_state/0, start_worker/0]). -export([new_resource/1, new_resource/2, new_resource_args/1, ...
null
https://raw.githubusercontent.com/basho/sidejob/1c377578c0956e91ebbb98a798c5d4b6d0959c99/eqc/supervisor_eqc.erl
erlang
Description : , prop_par/0 there is a bug in the supervisor that actually -- Commands --------------------------------------------------------------- -- work -- Finish work ------------------------------------------------------------ -- which_children --------------------------------------------------------- N...
File : supervisor_eqc.erl Author : Created : 15 May 2013 by -module(supervisor_eqc). -export([ ]). -export([initial_state/0, start_worker/0]). -export([new_resource/1, new_resource/2, new_resource_args/1, new_resource_pre/1, new_resource_next/3, new_resource_post/3]). -e...
ca4eb3a2f265573ce4cb8c4e78cd3607a8ee55f74e6c6667b8aef5ae3d7aa8a6
clojure-lsp/clojure-lsp
move_form_test.clj
(ns clojure-lsp.feature.move-form-test (:require [clojure-lsp.feature.move-form :as move-form] [clojure-lsp.test-helper :as h] [clojure.test :refer [deftest is testing]])) (h/reset-components-before-test) (deftest move-form-test (testing "simple" (h/reset-components!) (let [a-uri (h/file-uri "fil...
null
https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/cd666f0903d80266e022602c68b7dee12ebf2692/lib/test/clojure_lsp/feature/move_form_test.clj
clojure
(ns clojure-lsp.feature.move-form-test (:require [clojure-lsp.feature.move-form :as move-form] [clojure-lsp.test-helper :as h] [clojure.test :refer [deftest is testing]])) (h/reset-components-before-test) (deftest move-form-test (testing "simple" (h/reset-components!) (let [a-uri (h/file-uri "fil...
60a31ca72562a1f111be5afeceabb1903c0295eb1c011edb1ef80b6f174d253f
mbrock/HBEAM
Loader.hs
module Language.Erlang.BEAM.Loader where import Language.Erlang.BEAM.Opcodes import Language.Erlang.BEAM.Operation import Language.Erlang.BEAM.Types import qualified Data.ByteString.Lazy as B import qualified Codec.Compression.Zlib as Zlib import Data.Binary () import Data.Binary.Get import Data.Char (chr) import D...
null
https://raw.githubusercontent.com/mbrock/HBEAM/4f8e2dc6816afdefc622398613b676cd0e307b3c/src/Language/Erlang/BEAM/Loader.hs
haskell
label & function counts Helper functions for reading binary stuff.
module Language.Erlang.BEAM.Loader where import Language.Erlang.BEAM.Opcodes import Language.Erlang.BEAM.Operation import Language.Erlang.BEAM.Types import qualified Data.ByteString.Lazy as B import qualified Codec.Compression.Zlib as Zlib import Data.Binary () import Data.Binary.Get import Data.Char (chr) import D...
5234d35bea50b92f94f86b1ffc88c3ab173843c37df76850b3afcb58151c204d
fumieval/discord-vc-notification
dvn-watchlist.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # import RIO import UnliftIO.Concurrent import Data.Aeson import Data.Aeson.Types import qualified Data.HashMap.Strict as HM import Data.Monoid (Alt(..)) import qualified Data.Text as T import qualified Network.WebSockets as WS...
null
https://raw.githubusercontent.com/fumieval/discord-vc-notification/5d08d62a5cd935702fd231731c689087f14e0488/tutorial/dvn-watchlist.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # import RIO import UnliftIO.Concurrent import Data.Aeson import Data.Aeson.Types import qualified Data.HashMap.Strict as HM import Data.Monoid (Alt(..)) import qualified Data.Text as T import qualified Network.WebSockets as WS import qualified Wuss as WS import...
189e559d056aa302724cbe9bdd2d1824c9b8e6cfb1647d184eafd03a81e34724
karen/haskell-book
Exercises.hs
import Test.QuickCheck import Test.QuickCheck.Checkers import Test.QuickCheck.Classes data Nope a = NopedotJpg deriving (Eq, Show) instance Functor Nope where fmap _ _ = NopedotJpg instance Applicative Nope where pure _ = NopedotJpg _ <*> _ = NopedotJpg instance Monad Nope where return = pure _ ...
null
https://raw.githubusercontent.com/karen/haskell-book/90bb80ec3203fde68fc7fda1662d9fc8b509d179/src/ch18/Exercises.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Cons x xs >>= f = (f x) <> (xs >>= f) --------------------------------------------...
import Test.QuickCheck import Test.QuickCheck.Checkers import Test.QuickCheck.Classes data Nope a = NopedotJpg deriving (Eq, Show) instance Functor Nope where fmap _ _ = NopedotJpg instance Applicative Nope where pure _ = NopedotJpg _ <*> _ = NopedotJpg instance Monad Nope where return = pure _ ...
a35c1094c3f8b2a726d902d59867ecc69c1bfa044127dc0e0a105e4aa95997b0
borkdude/advent-of-cljc
data.cljc
(ns aoc.y2017.d04.data) (def input "vxjtwn vjnxtw sxibvv mmws wjvtxn icawnd rprh fhaa qwy vqbq gsswej lxr yzl wakcige mwjrl bhnlow huqa gtbjc gvj wrkyr jgvmhj bgs umo ikbpdto drczdf bglmf gsx flcf ojpj kzrwrho owbkl dgrnv bggjevc ndncqdl lncaugj mfa lncaugj skt pkssyen rsb npjzf kdd itdyhe pvljizn cgi jgy pyhuq eecb p...
null
https://raw.githubusercontent.com/borkdude/advent-of-cljc/17c8abb876b95ab01eee418f1da2e402e845c596/src/aoc/y2017/d04/data.cljc
clojure
(ns aoc.y2017.d04.data) (def input "vxjtwn vjnxtw sxibvv mmws wjvtxn icawnd rprh fhaa qwy vqbq gsswej lxr yzl wakcige mwjrl bhnlow huqa gtbjc gvj wrkyr jgvmhj bgs umo ikbpdto drczdf bglmf gsx flcf ojpj kzrwrho owbkl dgrnv bggjevc ndncqdl lncaugj mfa lncaugj skt pkssyen rsb npjzf kdd itdyhe pvljizn cgi jgy pyhuq eecb p...
15cc30d7c7885e1cd53f7637d972c3d955878ea9c698672a69eae9b22a21d261
NorfairKing/the-notes
Hasse.hs
# LANGUAGE MultiParamTypeClasses # module Relations.Orders.Hasse where import Control.Monad (forM, forM_, void) import Data.List (nub) import Notes hiding (directed, not, (=:)) import Prelude import Text.Dot import Text.Dot.Class hasseDiagram ...
null
https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Relations/Orders/Hasse.hs
haskell
Draw new bottoms Draw the rest
# LANGUAGE MultiParamTypeClasses # module Relations.Orders.Hasse where import Control.Monad (forM, forM_, void) import Data.List (nub) import Notes hiding (directed, not, (=:)) import Prelude import Text.Dot import Text.Dot.Class hasseDiagram ...
7e432dc58dfa5dabc36a3382d13bfc593d27b53929c4032e06ec88244f215a20
clash-lang/clash-compiler
FailGracefully3.hs
-- See ZeroWidth.hs module FailGracefully3 where import Clash.Prelude.Testbench import Clash.Prelude import GHC.Generics import Clash.Annotations.BitRepresentation import Data.Maybe data Record = Record { myBool :: Bool, myString :: String } # ANN module ( DataReprAnn $ ( liftQ [ t|Record| ] ) ...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldfail/ZeroWidth/FailGracefully3.hs
haskell
See ZeroWidth.hs
module FailGracefully3 where import Clash.Prelude.Testbench import Clash.Prelude import GHC.Generics import Clash.Annotations.BitRepresentation import Data.Maybe data Record = Record { myBool :: Bool, myString :: String } # ANN module ( DataReprAnn $ ( liftQ [ t|Record| ] ) 1...
abced4d91029e327f96fa3b6996971a1ace6782d210bcacbd8c8a89706f3f3a9
binaryage/cljs-devtools
satisfies.cljs
(ns devtools-sample.tests.satisfies (:import [goog.date Date DateTime UtcDateTime]) (:require-macros [devtools-sample.logging :refer [log info]]) (:require [devtools-sample.boot :refer [boot!]])) (boot! "/src/tests/devtools_sample/tests/satisfies.cljs") (enable-console-print!) ; --- MEAT STARTS HERE --> (defp...
null
https://raw.githubusercontent.com/binaryage/cljs-devtools/d07fc6d404479b1ddd32cecc105009de77e3cba7/examples/lein/src/tests/devtools_sample/tests/satisfies.cljs
clojure
--- MEAT STARTS HERE --> => true <-- MEAT STOPS HERE ---
(ns devtools-sample.tests.satisfies (:import [goog.date Date DateTime UtcDateTime]) (:require-macros [devtools-sample.logging :refer [log info]]) (:require [devtools-sample.boot :refer [boot!]])) (boot! "/src/tests/devtools_sample/tests/satisfies.cljs") (enable-console-print!) (defprotocol MyProtocol (-my-m...
de7191bf5f55e789c26cd9610af08459d8adc2c3bcf76141a45531eb456510ba
kowainik/relude
Fold.hs
{-# OPTIONS_GHC -Wno-redundant-constraints #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE Safe #-} {-# LANGUAGE TypeFamilies #-} # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # | Module : Relude . Foldable...
null
https://raw.githubusercontent.com/kowainik/relude/e633cb33308d259d6e4ea058ef506eb496b12323/src/Relude/Foldable/Fold.hs
haskell
# OPTIONS_GHC -Wno-redundant-constraints # # LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE Safe # # LANGUAGE TypeFamilies # $setup # INLINE flipfoldl' # # INLINE asumMap # # SPECIALIZE andM :: [IO Bool] -> IO Bool # # SPECIALIZE orM :: [IO Bool] -> IO Bool # # SP...
# LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # | Module : Relude . Foldable . Fold Copyright : ( c ) 2016 ( c ) 2016 - 2018 ( c ) 2018 - 2023 Kowainik SPDX - License - Identifier : MIT Maintainer : < > S...
8b98b804a6afae3f79c78975982c773a25e8c85a6983fb6fbc1a31dda3eceb10
skogsbaer/HTF
TestManager.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE ScopedTypeVariables # -- Copyright ( c ) 2009 - 2022 - -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 2.1 of the L...
null
https://raw.githubusercontent.com/skogsbaer/HTF/a42450c89b7a3a3a50e381f36de3ac28faab2a16/Test/Framework/TestManager.hs
haskell
# LANGUAGE BangPatterns # 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 or FITNESS FOR A PARTI...
# LANGUAGE ScopedTypeVariables # Copyright ( c ) 2009 - 2022 - License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 59 Temple Place , Suite...
f2471e97d67240e350f7350e4a878eb8b33fc933eae72380ce6d093723e07963
Rydgel/Clojure-Instagram-API
utils.clj
(ns instagram.utils) (defn assert-throw "If the supplied arg is nil, throw with the exception text provided" [val msg] (or val (throw (Exception. msg)))) (defn transform-map "Transforms the k/v pairs of a map using a supplied transformation function" [map-to-transform & {:keys [key-trans val-trans] :or {k...
null
https://raw.githubusercontent.com/Rydgel/Clojure-Instagram-API/f2de2c8b8c3b852bfbb2bca3c4d1a4252f1216bf/src/instagram/utils.clj
clojure
(ns instagram.utils) (defn assert-throw "If the supplied arg is nil, throw with the exception text provided" [val msg] (or val (throw (Exception. msg)))) (defn transform-map "Transforms the k/v pairs of a map using a supplied transformation function" [map-to-transform & {:keys [key-trans val-trans] :or {k...
df9f2970116457b836c7f9345330b0635bf756a1b818e1a717e8f4c85b7da258
choener/ADPfusion
Core.hs
{-# Language MagicHash #-} -- | Generalized fusion system for grammars. -- -- This module re-exports only the core functionality. -- -- NOTE Symbols typically do not check bound data for consistency. If you, say, -- bind a terminal symbol to an input of length 0 and then run your grammar, -- you probably get errors, ...
null
https://raw.githubusercontent.com/choener/ADPfusion/b42691df428f00be59beed49a819033994cbeb88/ADPfusion/Core.hs
haskell
# Language MagicHash # | Generalized fusion system for grammars. This module re-exports only the core functionality. NOTE Symbols typically do not check bound data for consistency. If you, say, bind a terminal symbol to an input of length 0 and then run your grammar, you probably get errors, garbled data or rand...
module ADPfusion.Core ( module ADPfusion.Core , module ADPfusion.Core.Apply , module ADPfusion.Core.Classes , module ADPfusion.Core.Multi , module ADPfusion.Core.SynVar.Array , module ADPfusion.Core.SynVar.Axiom , module ADPfusion.Core.SynVar.Backtrack , module ADPfusion.Core.SynVar.FillTyLvl , mod...
450d9a8dd658632e0066aca71e4dc3f0635eb315907193d378c71b650f8a00e7
racket/rhombus-prototype
builtin-dot.rkt
#lang racket/base (require (submod "dot.rkt" for-builtin) (submod "map.rkt" for-builtin) (submod "set.rkt" for-builtin) (submod "list.rkt" for-builtin) (submod "array.rkt" for-builtin) (submod "syntax-object.rkt" for-builtin) (submod "pair.rkt" for-builtin) ...
null
https://raw.githubusercontent.com/racket/rhombus-prototype/60070a3edd2b850bf429298b84b66eee3ea79194/rhombus/private/builtin-dot.rkt
racket
#lang racket/base (require (submod "dot.rkt" for-builtin) (submod "map.rkt" for-builtin) (submod "set.rkt" for-builtin) (submod "list.rkt" for-builtin) (submod "array.rkt" for-builtin) (submod "syntax-object.rkt" for-builtin) (submod "pair.rkt" for-builtin) ...
e36dffcf1bb6e2500a551c4bbf200f0014b3d8f65c34c223011558a591efc975
lread/test-doc-blocks
validate.clj
(ns ^:no-doc lread.test-doc-blocks.impl.validate "Validation support." (:require [malli.core :as m] [malli.error :as me] [malli.util :as mu])) (defn errors [schema value] (-> schema (mu/closed-schema) (m/explain value) (me/with-spell-checking) (me/humanize)))
null
https://raw.githubusercontent.com/lread/test-doc-blocks/8b40a1713ccb951f982b0aed46f7aef96efc79e5/src/lread/test_doc_blocks/impl/validate.clj
clojure
(ns ^:no-doc lread.test-doc-blocks.impl.validate "Validation support." (:require [malli.core :as m] [malli.error :as me] [malli.util :as mu])) (defn errors [schema value] (-> schema (mu/closed-schema) (m/explain value) (me/with-spell-checking) (me/humanize)))
9ed1f26dc0f5940ff7639cba4bd824f74df26ec81c007e241d368215a69d7701
ssor/erlangDemos
static.erl
%% Feel free to use, reuse and abuse the code in this file. -module(static). %% API. -export([start/0]). %% API. start() -> ok = application:start(cowboy), ok = application:start(static).
null
https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/cowboy_examples/static/src/static.erl
erlang
Feel free to use, reuse and abuse the code in this file. API. API.
-module(static). -export([start/0]). start() -> ok = application:start(cowboy), ok = application:start(static).
46649af0a81736cbf353825540690ab67779e47e867a9d7ad997ef7a11a84770
UnixJunkie/consent
top_keeper.ml
(* keep only the top N scoring molecules in memory *) (* WARNING: we _WILL_ have several molecules with equal scores *) module FMap = BatMap.Make(BatFloat) type t = { queue: string list FMap.t; (* molecule names sorted by increasing scores; names for a given ...
null
https://raw.githubusercontent.com/UnixJunkie/consent/f065ee7ba5a1ae014b5c3a28d0985ba5ad1abda5/src/top_keeper.ml
ocaml
keep only the top N scoring molecules in memory WARNING: we _WILL_ have several molecules with equal scores molecule names sorted by increasing scores; names for a given score are in reverse order ...
module FMap = BatMap.Make(BatFloat) count: int; let create_priv queue count max: t = { queue; count; max } let create (n: int): t = create_priv FMap.empty 0 n let insert_priv (score: float) (name: string) (map: string list FMap.t): string list FMap.t = let previous = FMap.find score map in ...
64ba20e26a98b57c0885ce5fe35c1c3b45a647b453d85566ff81f68a779546ef
robert-strandh/SICL
method-initialization-support.lisp
(cl:in-package #:sicl-clos) (defun check-qualifiers (qualifiers) ;; The AMOP says it the qualifiers be a proper list, so check that ;; first. (unless (cleavir-code-utilities:proper-list-p qualifiers) (error 'qualifiers-must-be-proper-list :qualifiers qualifiers)) ;; The AMOP says that the elemen...
null
https://raw.githubusercontent.com/robert-strandh/SICL/1d113b3e9ac510c9882fcea68e3fe7d556b88048/Code/CLOS/method-initialization-support.lisp
lisp
The AMOP says it the qualifiers be a proper list, so check that first. The AMOP says that the elements of the list of qualifiers should not restricted to a symbol, but can be any atom. The list of qualifiers must always be supplied. Do the LAMBDA-LIST. The AMOP also says that an error is signaled if this value ...
(cl:in-package #:sicl-clos) (defun check-qualifiers (qualifiers) (unless (cleavir-code-utilities:proper-list-p qualifiers) (error 'qualifiers-must-be-proper-list :qualifiers qualifiers)) be " non - null atoms " . In the section " Readers for Method Metaobjects " , they say that the list is a " l...
99cf3b66163ec0a62d0573158adae3e1390ed8aa08c7b9a4184d6f47def7e00e
circleci/mongofinil
test_profiling.clj
(ns mongofinil.test-profiling (:require [clojure.tools.logging :as log] [bond.james :as bond] [midje.sweet :refer (fact)] [mongofinil.core :as core] [mongofinil.testing-utils :as utils])) (utils/setup-test-db) (utils/setup-midje) (core/defmodel :xs :fields [] :profi...
null
https://raw.githubusercontent.com/circleci/mongofinil/bceedb4f0d7d49934410131be8e29ba3c21ad3ad/test/mongofinil/test_profiling.clj
clojure
(ns mongofinil.test-profiling (:require [clojure.tools.logging :as log] [bond.james :as bond] [midje.sweet :refer (fact)] [mongofinil.core :as core] [mongofinil.testing-utils :as utils])) (utils/setup-test-db) (utils/setup-midje) (core/defmodel :xs :fields [] :profi...
0f03e6b4855fe970908eea529058deacd3cdd18132d4686677ff395c96fe835b
tari3x/csec-modex
main.ml
* * Copyright ( c ) 2001 - 2002 , * < > * < > * < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are * met : * * 1 . Redistributions...
null
https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/deps/cil-1.7.3/src/main.ml
ocaml
main.ml this module is the program entry point for the 'cilly' program, intermediate language, and then renders that back into C sm: remove unused temps to cut down on gcc warnings * These are the statically-configured features. To these we append the * features defined in Feature_config.ml (from Makefile) ...
* * Copyright ( c ) 2001 - 2002 , * < > * < > * < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are * met : * * 1 . Redistributions...
73b0316375cd9ff34abe06015d2ed8fb0f49cf146d6be81f9afaea4d2611906d
rmloveland/scheme48-0.53
write.scm
; -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*- Copyright ( c ) 1993 - 1999 by and . See file COPYING . ; This is file write.scm. ;;;; WRITE ; To use this with some Scheme other than Scheme 48, do the following: 1 . Copy the definition of output - port - option from port.scm 2 . Define write - s...
null
https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/rts/write.scm
scheme
-*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*- This is file write.scm. WRITE To use this with some Scheme other than Scheme 48, do the following: The vector case goes last just so that this version of WRITE can be used in Scheme implementations in which records, ports, or property.) Display the symbol W...
Copyright ( c ) 1993 - 1999 by and . See file COPYING . 1 . Copy the definition of output - port - option from port.scm 2 . Define write - string as appropriate ( as a write - char loop ) 3 . ( define ( disclose x ) # f ) (define (write obj . port-option) (let ((port (output-port-option port-option...
25cd7ed56db3912af02279075ce09e301bf89a3973e4b466b71ad2acd88e7933
PeterDWhite/Osker
MonadRec.hs
Copyright ( c ) , 2002 , 2003 Copyright ( c ) OHSU , 2002 , 2003 ----------------------------------------------------------------------------- MonadRec Library -- Suitable for use with the mdo extension of Hugs 98 Stolen from :-) --------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Resumption/MonadRec.hs
haskell
--------------------------------------------------------------------------- --------------------------------------------------------------------------- P: {-< Fixed point laws > An assertion that is equivalent to nesting. Maybe: List:
Copyright ( c ) , 2002 , 2003 Copyright ( c ) OHSU , 2002 , 2003 MonadRec Library Suitable for use with the mdo extension of Hugs 98 Stolen from :-) module MonadRec (MonadRec(mfix), fix) where fix :: (a -> a) -> a fix f = let a = f a in a assert FixedPoint = All f :: a -> a. { f (fix ...
63b01aef96fc719fea86071f606d32f9fb92ce341009598503763bc03a3330ba
returntocorp/semgrep
CFG_build.mli
val cfg_of_stmts : IL.stmt list -> IL.cfg
null
https://raw.githubusercontent.com/returntocorp/semgrep/70af5900482dd15fcce9b8508bd387f7355a531d/src/analyzing/CFG_build.mli
ocaml
val cfg_of_stmts : IL.stmt list -> IL.cfg
ad998b353a34b492212af255477cf2047197be678981c7a2dc373e180e993e07
cerner/clara-rules
test_simple_rules.cljc
;; These are tests that validate elementary function of the rules engine like ;; inserting and retracting facts. They don't fit very well with specialized ;; test namespaces due to this simplicity. This functionality is transitively ;; tested by numerous other tests, but there is some value in having direct tests ;; ...
null
https://raw.githubusercontent.com/cerner/clara-rules/8107a5ab7fdb475e323c0bcb39084a83454deb1c/src/test/common/clara/test_simple_rules.cljc
clojure
These are tests that validate elementary function of the rules engine like inserting and retracting facts. They don't fit very well with specialized test namespaces due to this simplicity. This functionality is transitively tested by numerous other tests, but there is some value in having direct tests in case th...
#?(:clj (ns clara.test-simple-rules (:require [clara.tools.testing-utils :refer [def-rules-test side-effect-holder] :as tu] [clara.rules :refer [fire-rules insert insert-all ...
2e504617213ec8ee9a41f46e0914e8764af48f32849557787d69c384532379c6
VERIMAG-Polyhedra/VPL
HOtypes.mli
* This module defines datatypes used by the oracle that generates products used in linearization . module CP = CstrPoly module Poly = CP.Poly module Debug : DebugTypes.Type (** This map binds things to elements of type {!type:Poly.t}. *) module MapP : Map.S with type key = Poly.t val neg_poly : CstrPoly.t -> Poly...
null
https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/lin/oracle/HOtypes.mli
ocaml
* This map binds things to elements of type {!type:Poly.t}. * Module associating in a map a list of {!type:Hi.t} to a polynomial. It is used to remember what products were used to cancel a given polynomial. * Conversion into string. * @return [true] if [map] contains a binding to a polynomial that contains monom...
* This module defines datatypes used by the oracle that generates products used in linearization . module CP = CstrPoly module Poly = CP.Poly module Debug : DebugTypes.Type module MapP : Map.S with type key = Poly.t val neg_poly : CstrPoly.t -> Poly.t list module MapPolyHi : sig * Map from polynomials to the li...
c2be447fe8ad31b4d65f5cd8743b0fcb6724a2ac13d9c1378b79c1e50cb97bb0
exercism/haskell
Prime.hs
module Prime (nth) where nth :: Int -> Maybe Integer nth x | x <= 0 = Nothing | otherwise = Just $ nth' x nth' :: Int -> Integer nth' = (primes !!) . pred all primes > 5 are in the form of 6n+1 or ( for n > = 1 ) primes :: [Integer] primes = 2 : 3 : 5 : filter (go $ drop 2 primes) candidates where ...
null
https://raw.githubusercontent.com/exercism/haskell/ae17e9fc5ca736a228db6dda5e3f3b057fa6f3d0/exercises/practice/nth-prime/.meta/examples/success-standard/src/Prime.hs
haskell
module Prime (nth) where nth :: Int -> Maybe Integer nth x | x <= 0 = Nothing | otherwise = Just $ nth' x nth' :: Int -> Integer nth' = (primes !!) . pred all primes > 5 are in the form of 6n+1 or ( for n > = 1 ) primes :: [Integer] primes = 2 : 3 : 5 : filter (go $ drop 2 primes) candidates where ...
e6aa3425c76cc065ed34662d8c2df1155e9082015446e1cccba0824f3b15c409
joyofclojure/book-source
cps.clj
(ns joy.cps "Demostrations of continuation-passing style") (defn fac-cps [n k] # 1_fac - cps : Next # 2_fac - cps : Accept # 3_fac - cps : Return (recur (dec n) cont)))) (defn fac [n] (fac-cps n identity)) (assert (= (fac 10) 3628800)) ;; defined use loop/recur (defn mk-cps [accept? kend kont] (fn...
null
https://raw.githubusercontent.com/joyofclojure/book-source/a2a0ba264c286639a510caf4909c81f40341eac2/src/clj/joy/cps.clj
clojure
defined use loop/recur accept return next defined using fn instead of loop, as shown in book text Factorial ... ends when 0 ... multiplies up the stack Triangles ... sums up the stack
(ns joy.cps "Demostrations of continuation-passing style") (defn fac-cps [n k] # 1_fac - cps : Next # 2_fac - cps : Accept # 3_fac - cps : Return (recur (dec n) cont)))) (defn fac [n] (fac-cps n identity)) (assert (= (fac 10) 3628800)) (defn mk-cps [accept? kend kont] (fn [n] (loop [n n, k ken...
366fc8a474a63ef61bcf1e5213816102949f4bbda39d8ff38b34de37bde24866
fulcrologic/semantic-ui-wrapper
ui_item_extra.cljc
(ns com.fulcrologic.semantic-ui.views.item.ui-item-extra (:require [com.fulcrologic.semantic-ui.factory-helpers :as h] #?(:cljs ["semantic-ui-react$ItemExtra" :as ItemExtra]))) (def ui-item-extra "An item can contain extra content meant to be formatted separately from the main content. Props: - as...
null
https://raw.githubusercontent.com/fulcrologic/semantic-ui-wrapper/7bd53f445bc4ca7e052c69596dc089282671df6c/src/main/com/fulcrologic/semantic_ui/views/item/ui_item_extra.cljc
clojure
(ns com.fulcrologic.semantic-ui.views.item.ui-item-extra (:require [com.fulcrologic.semantic-ui.factory-helpers :as h] #?(:cljs ["semantic-ui-react$ItemExtra" :as ItemExtra]))) (def ui-item-extra "An item can contain extra content meant to be formatted separately from the main content. Props: - as...
449fef2de9d1120892b4abc166307c473c15c212b2efae79a5bc73e14ac37363
project-oak/hafnium-verification
sledge.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/sledge/src/sledge.ml
ocaml
define a command, with trace flag, and with action wrapped in reporting
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
f2278388032ba4e6b22e80eef85384e503a43f722e13ef2eb2ca523bb9ec9474
dongcarl/guix
syscalls.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2014 , 2015 , 2016 , 2017 , 2018 , 2019 , 2020 , 2021 < > Copyright © 2015 < > Copyright © 2020 < > Copyright © 2020 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it ...
null
https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/tests/syscalls.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2014 , 2015 , 2016 , 2017 , 2018 , 2019 , 2020 , 2021 < > Copyright © 2015 < > Copyright © 2020 < > Copyright © 2020 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , ...
8b7a924e1281b15f7048f4eaaa7571b80b626e86be28a16593240e1b39abb9ce
matsen/pplacer
t-pd.ml
open Pd open Ppatteries 20/24 = .83333333333333333333 20/24 = .83333333333333333333 *) let pr = Placerun_io.of_file "top_tests/test_all.place" let i = Induced.of_placerun Placement.ml_ratio pr let p = of_pr Placement.ml_ratio pr let np = normalized_of_pr Placement.ml_ratio pr let t = Placerun.get_ref_tree pr let ...
null
https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/pplacer_src/top_tests/t-pd.ml
ocaml
open Pd open Ppatteries 20/24 = .83333333333333333333 20/24 = .83333333333333333333 *) let pr = Placerun_io.of_file "top_tests/test_all.place" let i = Induced.of_placerun Placement.ml_ratio pr let p = of_pr Placement.ml_ratio pr let np = normalized_of_pr Placement.ml_ratio pr let t = Placerun.get_ref_tree pr let ...
1ffa678fcb0a8691a1c464eada9f044cdbb5622ea4ba5e89815de32b7c489610
oswald2/DGPatchMaker
ModernFolkParser.hs
{-# LANGUAGE OverloadedStrings, RecordWildCards #-} module Data.DrumDrops.ModernFolkParser ( getSampleFromFileName ,determineChannel ) where import Control.Monad (void) import Data.Text as T import Data.Types import Text.Parsec as P import System.FilePath import Data.DrumDrops.Types import Debug...
null
https://raw.githubusercontent.com/oswald2/DGPatchMaker/0e10acc680b0c2b7446693c25e356763a8806afc/src/Data/DrumDrops/ModernFolkParser.hs
haskell
# LANGUAGE OverloadedStrings, RecordWildCards # Multi Velocity Kits - for the modern folk kit
module Data.DrumDrops.ModernFolkParser ( getSampleFromFileName ,determineChannel ) where import Control.Monad (void) import Data.Text as T import Data.Types import Text.Parsec as P import System.FilePath import Data.DrumDrops.Types import Debug.Trace import Text.Printf getSampleFromFileName ::...
c9852b48b7c93da4c45866323be89aadd7710628a30d2cb3604704f1820cdba5
sneeuwballen/zipperposition
util_tip.mli
This file is free software , part of Zipperposition . See file " license " for more details . (** {1 Utils for TIP} *) open Logtk module A = Tip_ast type parser_res = (A.statement Iter.t, string) CCResult.t type 'a parser_ = 'a -> parser_res val parse_lexbuf : Lexing.lexbuf parser_ (** parse lexbuf. @param ...
null
https://raw.githubusercontent.com/sneeuwballen/zipperposition/7f1455fbe2e7509907f927649c288141b1a3a247/src/parsers/util_tip.mli
ocaml
* {1 Utils for TIP} * parse lexbuf. @param recursive if true, parse includes too, relative to current dir. Default true. @param cache parse cache to use if [recursive = true] * [parse_file ~recursive file] parses [file] @param recursive if true, recursively parse includes. Default true. @param cache p...
This file is free software , part of Zipperposition . See file " license " for more details . open Logtk module A = Tip_ast type parser_res = (A.statement Iter.t, string) CCResult.t type 'a parser_ = 'a -> parser_res val parse_lexbuf : Lexing.lexbuf parser_ val parse_stdin : unit parser_ * parse stdin . Does n...
b38b3ae9be11edeebb581067f37879dcaec83aa18ccf57a44cee1e93a3f6c782
me-box/core-network
intf.mli
type t = { dev : string; ip: Ipaddr.V4.t; network: Ipaddr.V4.Prefix.t; mtu: int; * Gateway address of the subnet { ! : t.network } * A stream of IPv4 packets * To send IPv4 packets through this interface acquire_fake_ip: unit -> Ipaddr.V4.t Lwt.t; release_fake_ip: Ipaddr.V4.t -> unit Lwt.t; fake_ips: u...
null
https://raw.githubusercontent.com/me-box/core-network/3dca69bc7610ab51f93ea49dcc3d8e43842cd2ae/lib/intf.mli
ocaml
* To get a list of fake IPs currently used by this interface
type t = { dev : string; ip: Ipaddr.V4.t; network: Ipaddr.V4.Prefix.t; mtu: int; * Gateway address of the subnet { ! : t.network } * A stream of IPv4 packets * To send IPv4 packets through this interface acquire_fake_ip: unit -> Ipaddr.V4.t Lwt.t; release_fake_ip: Ipaddr.V4.t -> unit Lwt.t; } type start...
851c9c137178bf64a54f6b5d6b778256c5400845fed7fceaaeee6d1fac4706cf
penpot/penpot
styles.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.main.ui.shapes.text.styles (:require [app.common.data :as d] [app.common.text :as txt] [app...
null
https://raw.githubusercontent.com/penpot/penpot/64f2d874fe08528850d2831d5a32313514c127fc/frontend/src/app/main/ui/shapes/text/styles.cljs
clojure
Copyright (c) KALEIDOS INC This element will control the auto-width/auto-height size for the shape. The properties try to adjust to the shape and "overflow" if the shape is not big enough. We `inherit` the property `justify-content` so it's set by the root where the property it's known. `inline-flex` is similar...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.main.ui.shapes.text.styles (:require [app.common.data :as d] [app.common.text :as txt] [app.common.transit :as transit] [...
a75d11101b8afca42d906496f37e70892d6812ce7e6738dd5f18001d54600171
facebook/flow
comment_attachment.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/d1fd9ded424fbd43e6789814e438a9190068086c/src/parser/comment_attachment.ml
ocaml
Returns a remover function which removes comments beginning after the previous token. No trailing comments are returned, since all comments since the last loc should be removed. Consumes and returns comments on the same line as the previous token. Also returns a remover function which can be used to remove com...
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
583d87ff0badbd11b3cad8760a830e2f3196a68fcbc682795bb27ee02c52d2fc
caisah/sicp-exercises-and-examples
ex_2.25.scm
Give combinations of cars and that will pick 7 from each of the following lists ( 1 2 ( 5 7 ) 9 ) (define a (list 2 3 (list 5 7) 9)) (cdr (car (cdr (cdr a)))) ( ( 7 ) ) (define b (list (list 7))) (car (car b)) ( 1 ( 2 ( 3 ( 4 ( 5 ( 6 7 ) ) ) ) ) ) (define c (list 1 (list 2 (list 3 (list 4 (list 5 (list 6 7...
null
https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/2.2.2-heirarchical_structures/ex_2.25.scm
scheme
Give combinations of cars and that will pick 7 from each of the following lists ( 1 2 ( 5 7 ) 9 ) (define a (list 2 3 (list 5 7) 9)) (cdr (car (cdr (cdr a)))) ( ( 7 ) ) (define b (list (list 7))) (car (car b)) ( 1 ( 2 ( 3 ( 4 ( 5 ( 6 7 ) ) ) ) ) ) (define c (list 1 (list 2 (list 3 (list 4 (list 5 (list 6 7...
dffe440e831a0902436e6e97787bc6cd8b57cd20124a349165bf5626a812a164
gregorias/rummikubsolver
Main.hs
import qualified Test.HUnit as HU import GameTest main :: IO () main = HU.runTestTT allTests >> return ()
null
https://raw.githubusercontent.com/gregorias/rummikubsolver/dc2540f8c0d05a43a65632a797398e41a8269850/test/Main.hs
haskell
import qualified Test.HUnit as HU import GameTest main :: IO () main = HU.runTestTT allTests >> return ()
5ce762cbc67e14680df4fa40b16457a2e54a92842ff1f8880fbbad25bbacc75d
eareese/htdp-exercises
063-traffic-light-symbolic.rkt
#lang htdp/bsl (define RED 0) (define GREEN 1) (define YELLOW 2) a S - TrafficLight shows one of three colors : ; - RED ; - GREEN ; - YELLOW ; "if the names are chosen properly, such a data definition does not need an ; interpretation statement." ; S-TrafficLight -> S-TrafficLight ; determines the next state of th...
null
https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part01-fixed-size-data/063-traffic-light-symbolic.rkt
racket
- RED - GREEN - YELLOW "if the names are chosen properly, such a data definition does not need an interpretation statement." S-TrafficLight -> S-TrafficLight determines the next state of the traffic light, given cs so a version like this will still work even if the definitions are changed: (define RED "red") ...
#lang htdp/bsl (define RED 0) (define GREEN 1) (define YELLOW 2) a S - TrafficLight shows one of three colors : (define (tl-next-symbolic cs) (cond [(equal? cs RED) GREEN] [(equal? cs GREEN) YELLOW] [(equal? cs YELLOW) RED])) well , equal ? can compare two of any values ,
3d8a58895191f4a971c3ee907d3617e517cf575111a834db6a4a9af9bea9a6eb
mirage/capnp-rpc
struct_proxy.ml
open Asetmap module Log = Debug.Log module Make (C : S.CORE_TYPES) = struct open C (* Only used internally to detect cycles. *) let cycle_marker = C.broken_cap (Exception.v "<cycle marker>") let cycle_err fmt = "@[<v>Attempt to create a cycle detected:@," ^^ fmt ^^ "@]" |> Fmt.kstr @@ fun msg -> Log...
null
https://raw.githubusercontent.com/mirage/capnp-rpc/1b86b02fd5716e80d4daadbdc612181f9bdf4470/capnp-rpc/struct_proxy.ml
ocaml
Only used internally to detect cycles. (can't use [when_resolved] because that checks the promise isn't finished) This is non-None only while we are resolving. Then, it initially contains the fields we're resolving to. Asking for the blocker of a field returns it, but also updates the array so you ca...
open Asetmap module Log = Debug.Log module Make (C : S.CORE_TYPES) = struct open C let cycle_marker = C.broken_cap (Exception.v "<cycle marker>") let cycle_err fmt = "@[<v>Attempt to create a cycle detected:@," ^^ fmt ^^ "@]" |> Fmt.kstr @@ fun msg -> Log.info (fun f -> f "%s" msg); C.broken_struc...
22cfca454461b1a1a6122d538d52b58bbdc91f637f17a4a9f49f57ee43eb1cb7
listx/listx_blog
parking-spaces.hs
getParkingSpaces :: [Int] -> Either String Int getParkingSpaces t | null t = Left "N/A" | otherwise = Right $ (maximum t) - (length t) + 1
null
https://raw.githubusercontent.com/listx/listx_blog/2c6685bae365c4d63818997f1ee74f158b35e29d/code/toy/parking-spaces.hs
haskell
getParkingSpaces :: [Int] -> Either String Int getParkingSpaces t | null t = Left "N/A" | otherwise = Right $ (maximum t) - (length t) + 1
238cb7bd21c5e83e4c31eedc04765df66e8c6769cba6d886ce380ed0620ae159
dmitryvk/sbcl-win32-threads
late-nlx.lisp
;;;; some help for the definition of generic non-local exit This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The software is in...
null
https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/compiler/generic/late-nlx.lisp
lisp
some help for the definition of generic non-local exit more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. state for use with the SAVE- and RESTORE-DYNAMIC-ENVIRONMENT VOPs.
This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB!VM") Return a list of TNs that can be used to snapshot the dynamic (!def-vm-support-routine make-dynamic-...
0af7e27fccdfb8fed24576278571481ff134a22bd1917bc87e81aeffa93644da
replomancer/Swordfight
cecp.clj
(ns swordfight.cecp (:require [swordfight.rules :as rules] [swordfight.board :as board] [swordfight.ai :as ai] [swordfight.debug :as debug])) (def engine-name "Swordfight") (def cecp-msg-finished "# Good bye.") (defn cecp-msg-illegal [mv] (str "Illegal move: " mv)) (defn cecp-msg-...
null
https://raw.githubusercontent.com/replomancer/Swordfight/4ac956d0c9076792774dd05db3f258a8c713c49c/src/swordfight/cecp.clj
clojure
x is for empty square; not used by xboard
(ns swordfight.cecp (:require [swordfight.rules :as rules] [swordfight.board :as board] [swordfight.ai :as ai] [swordfight.debug :as debug])) (def engine-name "Swordfight") (def cecp-msg-finished "# Good bye.") (defn cecp-msg-illegal [mv] (str "Illegal move: " mv)) (defn cecp-msg-...
ea69e629d70957b2272b88bb1b5e9b3fd9ef5ba63f40a4d13bb5a5d23d9e7b35
inaimathi/cl-notebook
util.lisp
(in-package #:cl-notebook) ;;;;; Basic HTML stuff (defmacro html-to-str (&rest forms) `(with-html-output-to-string (s nil :indent t) ,@forms)) ;;;;; Basic data structure stuff (defun hash (&rest entries) (let ((h (make-hash-table))) (loop for (k v) on entries by #'cddr do (setf (gethash k h) v)) ...
null
https://raw.githubusercontent.com/inaimathi/cl-notebook/c9879b2d390c02bfe4ccaf245a342dd346040322/src/util.lisp
lisp
Basic HTML stuff Basic data structure stuff Basic command line args and file-system stuff Error-related Lisp internal stuff
(in-package #:cl-notebook) (defmacro html-to-str (&rest forms) `(with-html-output-to-string (s nil :indent t) ,@forms)) (defun hash (&rest entries) (let ((h (make-hash-table))) (loop for (k v) on entries by #'cddr do (setf (gethash k h) v)) h)) (defun alist (&rest k/v-pairs) "Association li...
91fd667dbd4c5d8b5db8dce623479f05d1fa508d734e0ac569eb177b138e9985
lynkia/lynkia
lynkia_spawn_monitor.erl
%%%------------------------------------------------------------------- %% @doc Event dispatcher of the task model. @author and %% @end %%%------------------------------------------------------------------- -module(lynkia_spawn_monitor). -include("lynkia.hrl"). -export([ on/1, debug/0 ]). % API: %% @do...
null
https://raw.githubusercontent.com/lynkia/lynkia/bde4d0bb1e0304b0dec42ff4df1e74b18d5e797c/src/lynkia_spawn_monitor.erl
erlang
------------------------------------------------------------------- @doc Event dispatcher of the task model. @end ------------------------------------------------------------------- API: @doc Forward the event to the module set in the configuration file (see task_distribution_strategy) @doc Ask the module set in t...
@author and -module(lynkia_spawn_monitor). -include("lynkia.hrl"). -export([ on/1, debug/0 ]). on(Event) -> Module = lynkia_config:get(task_distribution_strategy), Module:on(Event). debug() -> Module = lynkia_config:get(task_distribution_strategy), Module:debug().
cb05682824095dad3500f7e04e48da5e5dff73dd2019834a6b93c3f8452261cc
mk270/archipelago
prioqueue.ml
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012 , except as noted below This programme is free software ; you may redistribute and/or modify it under the terms of the GNU Affero General Public Licence as published by the Free Software Foundation , either version 3 of ...
null
https://raw.githubusercontent.com/mk270/archipelago/4241bdc994da6d846637bcc079051405ee905c9b/src/game/prioqueue.ml
ocaml
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012 , except as noted below This programme is free software ; you may redistribute and/or modify it under the terms of the GNU Affero General Public Licence as published by the Free Software Foundation , either version 3 of ...
0f11548df63b8196c1585484a60438badb2bfea5c59a50828f99e316d0416376
CoNarrative/precept-devtools
rules.cljc
(ns precept-devtools.rules (:require [precept.core :as core] [precept.rules :refer [fire-rules rule define session]] [precept.dsl :refer [<- entity entities]] [precept.accumulators :as acc] [precept.repl :as repl] ;[precept.util :refer [insert! insert-uncond...
null
https://raw.githubusercontent.com/CoNarrative/precept-devtools/0c69c090db2159c4d1f5ce783cecd9d5426c5fe0/src/cljc/precept_devtools/rules.cljc
clojure
[precept.util :refer [insert! insert-unconditional! insert]] (println "Fact " ?fact)) This rule should fire once per event in state n Hydrate all matches for the event. Note there is no relation between matches and a particular rule. We may want both bindings and matches for rule and event to locate matches for a ...
(ns precept-devtools.rules (:require [precept.core :as core] [precept.rules :refer [fire-rules rule define session]] [precept.dsl :refer [<- entity entities]] [precept.accumulators :as acc] [precept.repl :as repl] [precept-devtools.schema :refer [db-schema]]...
23f53269a703abd4e8828c2158f2a3d30706a36f497e3d20e44ab0fd49801a48
antifuchs/cl-beanstalk
client_steps.lisp
(Given* #?"^the cl-beanstalk client is started$" () (setf (var :connection) (beanstalk:connect "localhost" *port*)))
null
https://raw.githubusercontent.com/antifuchs/cl-beanstalk/7b925a769d6e61fbcf0c122400146123f18e55cc/features/step_definitions/client_steps.lisp
lisp
(Given* #?"^the cl-beanstalk client is started$" () (setf (var :connection) (beanstalk:connect "localhost" *port*)))
ed8299fdcb4cabe013a70fa6dcf08859025bc865c84bb42b0b463124089707c9
amalloy/amalloy-utils
utils.clj
(ns amalloy.utils (:use [clojure.contrib.def :only [defalias]])) (defalias ! complement) TODO why is this extra ' needed ! ? ! (defmacro defcomp [name doc args & fs] (let [fnmeta {:doc doc :arglists `'(~args)}] `(def ~(with-meta name fnmeta) (comp ~@fs)))) (defn iterate-until [pred f start] (take-while...
null
https://raw.githubusercontent.com/amalloy/amalloy-utils/a0be8eba37b23bd99e266602e9da2d66a8418156/src/amalloy/utils.clj
clojure
(ns amalloy.utils (:use [clojure.contrib.def :only [defalias]])) (defalias ! complement) TODO why is this extra ' needed ! ? ! (defmacro defcomp [name doc args & fs] (let [fnmeta {:doc doc :arglists `'(~args)}] `(def ~(with-meta name fnmeta) (comp ~@fs)))) (defn iterate-until [pred f start] (take-while...
38b75dd671801732c37eb48e7c5fc938931f7daebc45473844085f05aa8c6342
exercism/common-lisp
example.lisp
(defpackage :anagram (:use :common-lisp) (:export :anagrams-for)) (in-package :anagram) (defun anagram-equal (a b) (and (string-equal (sort (copy-seq a) #'char-lessp) (sort (copy-seq b) #'char-lessp)) (string-not-equal a b))) (defun anagrams-for (subject candidates) (remove-if-not #'(lambda (w) (...
null
https://raw.githubusercontent.com/exercism/common-lisp/0bb38d1b126f7dc90d86f04c41479d4eaf35df74/exercises/practice/anagram/.meta/example.lisp
lisp
(defpackage :anagram (:use :common-lisp) (:export :anagrams-for)) (in-package :anagram) (defun anagram-equal (a b) (and (string-equal (sort (copy-seq a) #'char-lessp) (sort (copy-seq b) #'char-lessp)) (string-not-equal a b))) (defun anagrams-for (subject candidates) (remove-if-not #'(lambda (w) (...
a68330b064b27945063d942c5563670b9b0387d35d96f5806324272c7af17c8d
tonymorris/fp-course
ListTest.hs
# OPTIONS_GHC -fno - warn - type - defaults # # LANGUAGE NoImplicitPrelude # module Course.ListTest where import qualified Prelude as P (length) import Test.QuickCheck (forAllShrink) import Test.Tasty (TestTree, testGroup) import Test.Tasty.HUnit (tes...
null
https://raw.githubusercontent.com/tonymorris/fp-course/73a64c3d4d0df58654a1a9a0ee9d9b11c3818911/test/Course/ListTest.hs
haskell
# OPTIONS_GHC -fno - warn - type - defaults # # LANGUAGE NoImplicitPrelude # module Course.ListTest where import qualified Prelude as P (length) import Test.QuickCheck (forAllShrink) import Test.Tasty (TestTree, testGroup) import Test.Tasty.HUnit (tes...
ab600a7fb905f342b25d00cadbd18a898f5d63c66058a75528fc3d108ac2d795
pirapira/bamboo
locationEnv.ml
open PseudoImm type t = (string * Location.location) list list let size l = WrapList.sum (List.map List.length l) let empty_env = [] let forget_innermost = function | (_ :: older) -> older | [] -> failwith "forget_innermost: no blocks to forget" (** [update_block [str] [new_loc] returns [None] when [str] i...
null
https://raw.githubusercontent.com/pirapira/bamboo/1cca98e0b6d2579fe32885e66aafd0f5e25d9eb5/src/codegen/locationEnv.ml
ocaml
* [update_block [str] [new_loc] returns [None] when [str] is not found. * Otherwise, it returns the updated block. XXX: refactor the repetition
open PseudoImm type t = (string * Location.location) list list let size l = WrapList.sum (List.map List.length l) let empty_env = [] let forget_innermost = function | (_ :: older) -> older | [] -> failwith "forget_innermost: no blocks to forget" let update_block (str : string) (new_loc : Location.location)...
0523763b8579cd9b2fc491586079083b458830d707270dd06c108018fe74447d
sdiehl/aos-signature
LSAG.hs
| Implementation of Linkable Spontaneus Anonymous Group ( LSAG ) Signature over elliptic curve cryptography . -- -- >>> (pubKey, privKey) <- ECC.generate curve -- Generate public and private keys -- >>> extPubKeys <- genNPubKeys curve nParticipants -- Generate random foreign participants -- >>> k <- fromInteger <$> g...
null
https://raw.githubusercontent.com/sdiehl/aos-signature/a83dc17cd2704030250583f6e1b9c40fe4ae39a0/src/LSAG.hs
haskell
>>> (pubKey, privKey) <- ECC.generate curve -- Generate public and private keys >>> extPubKeys <- genNPubKeys curve nParticipants -- Generate random foreign participants >>> k <- fromInteger <$> generateBetween 0 (toInteger $ length extPubKeys - 1) -- Position of the signer's key in the public keys list (k) Insert...
| Implementation of Linkable Spontaneus Anonymous Group ( LSAG ) Signature over elliptic curve cryptography . module LSAG ( sign , verify , genNPubKeys ) where import Control.Monad.State import Control.Monad.Fail import Crypto.Hash import Crypto.Number.Serialize (os2ip) ...
7ac6e2c5ddb2648260b1bf2d9c2a9e4bf05b40c19ec4f4aa24f481c52c11fc6e
input-output-hk/plutus-apps
Utxo.hs
module Spec.Marconi.ChainIndex.Indexers.Utxo (tests) where import Test.Tasty (TestTree, localOption, testGroup) import Test.Tasty.Hedgehog (HedgehogTestLimit (HedgehogTestLimit)) import Spec.Marconi.ChainIndex.Indexers.Utxo.UtxoIndex qualified as UtxoIndex tests :: TestTree tests = localOption (HedgehogTestLimit $ J...
null
https://raw.githubusercontent.com/input-output-hk/plutus-apps/d15a52ad55fcb58b2c2c69ae3b9e54b88e59e635/marconi-chain-index/test/Spec/Marconi/ChainIndex/Indexers/Utxo.hs
haskell
module Spec.Marconi.ChainIndex.Indexers.Utxo (tests) where import Test.Tasty (TestTree, localOption, testGroup) import Test.Tasty.Hedgehog (HedgehogTestLimit (HedgehogTestLimit)) import Spec.Marconi.ChainIndex.Indexers.Utxo.UtxoIndex qualified as UtxoIndex tests :: TestTree tests = localOption (HedgehogTestLimit $ J...
486d10062a42a9b72f2f581abd797ccdee6419ca78ecb7751b7859d18225abf3
mathiasbourgoin/SPOC
Kernel.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * , et ( 2011 ) * * * * This software is a computer program whose purpose is to allow * GPU programming with the OCaml language . * * T...
null
https://raw.githubusercontent.com/mathiasbourgoin/SPOC/9014d26b6d64261d1ace97db7f3fe2256a7c459c/Spoc/Kernel.ml
ocaml
* unsigned char vector * generic vector type * custom data type vector, see examples <- ATTENTION set_block_shape cuFun block dev.general_info; let path = Sys.argv.(0) in Filename.dirname path
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * , et ( 2011 ) * * * * This software is a computer program whose purpose is to allow * GPU programming with the OCaml language . * * T...
2b54fef4d5e229438c15b019841e0cbce7422700fc57e0c63121433569951346
chenyukang/eopl
lang.scm
(module lang (lib "eopl.ss" "eopl") ;; language for the CALL-BY-NEED language. Based on MUTABLE-PAIRS ;; language. (require "drscheme-init.scm") (provide (all-defined)) ;;;;;;;;;;;;;;;; grammatical specification ;;;;;;;;;;;;;;;; (define the-lexical-spec '((whitespace (whitespace...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/base/chapter4/call-by-need/lang.scm
scheme
language for the CALL-BY-NEED language. Based on MUTABLE-PAIRS language. grammatical specification ;;;;;;;;;;;;;;;; sllgen boilerplate ;;;;;;;;;;;;;;;;
(module lang (lib "eopl.ss" "eopl") (require "drscheme-init.scm") (provide (all-defined)) (define the-lexical-spec '((whitespace (whitespace) skip) (comment ("%" (arbno (not #\newline))) skip) (identifier (letter (arbno (or letter digit "_" "-" "?"))) symbol) ...
cf183bb3dd6883f5a9522a41c6f95d3b0fb856e294ee7beb6ab6f0299281ad4a
chaoxu/fancy-walks
126.hs
unionInf :: (Ord a, Num b) => [(a, b)] -> [(a, b)] -> [(a, b)] unionInf (x:xs) (y:ys) = case compare (fst x) (fst y) of LT -> x : unionInf xs (y:ys) GT -> y : unionInf (x:xs) ys EQ -> (fst x, snd x + snd y) : unionInf xs ys joinInf :: (Ord a, Num b) => [[(a, b)]] -> [(a, b)] joinInf ((x:xs):ys) = x : unio...
null
https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/projecteuler.net/126.hs
haskell
unionInf :: (Ord a, Num b) => [(a, b)] -> [(a, b)] -> [(a, b)] unionInf (x:xs) (y:ys) = case compare (fst x) (fst y) of LT -> x : unionInf xs (y:ys) GT -> y : unionInf (x:xs) ys EQ -> (fst x, snd x + snd y) : unionInf xs ys joinInf :: (Ord a, Num b) => [[(a, b)]] -> [(a, b)] joinInf ((x:xs):ys) = x : unio...
2308f5dd802a4085e2dfdf6c6743a0d9b722f4a1eb8f083fa3a46c73bbeeadd9
naveensundarg/prover
snark-interface.lisp
(in-package :snark-user) (defun snark-verbose () (snark:print-options-when-starting nil) (snark:print-agenda-when-finished nil) (snark:print-clocks-when-finished t) (snark:print-final-rows nil) (snark:print-symbol-table-warnings nil) (snark:print-summary-when-finished t) (snark:print-row-answers nil)...
null
https://raw.githubusercontent.com/naveensundarg/prover/812baf098d8bf77e4d634cef4d12de94dcd1e113/snark-20120808r02/snark-interface.lisp
lisp
(in-package :snark-user) (defun snark-verbose () (snark:print-options-when-starting nil) (snark:print-agenda-when-finished nil) (snark:print-clocks-when-finished t) (snark:print-final-rows nil) (snark:print-symbol-table-warnings nil) (snark:print-summary-when-finished t) (snark:print-row-answers nil)...
584c57997545d05530d268b27a4d2ee37fd52c4ef38474813e3fc286f611f8f5
konn/lk-proof-assistant
ProofTree.hs
{-# LANGUAGE ExtendedDefaultRules, OverloadedStrings #-} # OPTIONS_GHC -fno - warn - type - defaults # module ProofTree where import Data.List import Data.Maybe import qualified Data.Text as T import SequentTypes import Text.LaTeX import Text.LaTeX.Base.Cl...
null
https://raw.githubusercontent.com/konn/lk-proof-assistant/7d71d7bab33cf75b5c23d76e6139f229434fd527/ProofTree.hs
haskell
# LANGUAGE ExtendedDefaultRules, OverloadedStrings #
# OPTIONS_GHC -fno - warn - type - defaults # module ProofTree where import Data.List import Data.Maybe import qualified Data.Text as T import SequentTypes import Text.LaTeX import Text.LaTeX.Base.Class import Text.LaTeX.Base.Syntax import ...
765b1bb0694f001095b7ea1464ba926af41bc195908311d9b3ee88f803548e5a
bldl/magnolisp
test-run-discard-3.rkt
#lang magnolisp (require (only-in racket/base cond)) (require "lib-cxx-runner.rkt") (typedef float #:: (foreign)) (typedef double #:: (foreign)) (function (holds? x) #:: ([type (-> int Bool)]) (non-zero? x)) (function (f x) #:: (export (type (-> int int))) (let () (cond ((holds? 1) (cast int 1)) ...
null
https://raw.githubusercontent.com/bldl/magnolisp/191d529486e688e5dda2be677ad8fe3b654e0d4f/tests/test-run-discard-3.rkt
racket
#lang magnolisp (require (only-in racket/base cond)) (require "lib-cxx-runner.rkt") (typedef float #:: (foreign)) (typedef double #:: (foreign)) (function (holds? x) #:: ([type (-> int Bool)]) (non-zero? x)) (function (f x) #:: (export (type (-> int int))) (let () (cond ((holds? 1) (cast int 1)) ...