_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
fddd3a09957e98b3387f1e195629f61f52fb92e36d5f65400f5ded6df33c4b45
incoherentsoftware/defect-process
Surfaces.hs
module Collision.Surfaces ( checkPlayerSurfaceCollisions , checkEnemySurfaceCollisions , checkRoomItemSurfaceCollisions ) where import Collision import Enemy.Types import Level.Room.Item.Types import Msg import Player import Util import World.Surface roofCollideOffset = 1.0 :: Float minPrevHitboxM...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Collision/Surfaces.hs
haskell
module Collision.Surfaces ( checkPlayerSurfaceCollisions , checkEnemySurfaceCollisions , checkRoomItemSurfaceCollisions ) where import Collision import Enemy.Types import Level.Room.Item.Types import Msg import Player import Util import World.Surface roofCollideOffset = 1.0 :: Float minPrevHitboxM...
74b6b1f0ed8229dbe2b6b28e3ac86b28ce7fac3dc7a53e7f0b7b8145f16b072c
flora-pm/flora-server
DesignSystem.hs
# LANGUAGE QuasiQuotes # module DesignSystem where import Control.Monad.Trans.Reader (runReaderT) import Data.ByteString.Lazy (ByteString) import Data.ByteString.Lazy qualified as ByteString import Data.Foldable (forM_) import Data.Functor.Identity (runIdentity) import Data.Text (Text) import Data.Text.Lazy qualified...
null
https://raw.githubusercontent.com/flora-pm/flora-server/513c7a7383e4f5b12e60747a13bcd72cfc291cc1/app/cli/DesignSystem.hs
haskell
--------------------- Storybook Helpers -- --------------------- ------------ Examples -- ------------
# LANGUAGE QuasiQuotes # module DesignSystem where import Control.Monad.Trans.Reader (runReaderT) import Data.ByteString.Lazy (ByteString) import Data.ByteString.Lazy qualified as ByteString import Data.Foldable (forM_) import Data.Functor.Identity (runIdentity) import Data.Text (Text) import Data.Text.Lazy qualified...
bb6106264bddda53062581b81b5526da9d1c8e3b919047fc0a61c92c06266de6
yesodweb/persistent
PersistUniqueTest.hs
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE UndecidableInstances # module PersistUniqueTest where import Init mpsGeneric = False is due to a bug or at least lack of a feature in mkKeyTypeDec TH.hs share [mkPersist persistSettings { mpsGeneric = False }, mkMigrate "migration"] [persistLowerCase| Fo foo I...
null
https://raw.githubusercontent.com/yesodweb/persistent/a00b5b539e8e365e09f71280b7f4ec7d08784ffa/persistent-test/src/PersistUniqueTest.hs
haskell
conflicts with itself conflicts with fo but fo can be updated to fo' fo can't be updated to fo'' uncomment to verify
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE UndecidableInstances # module PersistUniqueTest where import Init mpsGeneric = False is due to a bug or at least lack of a feature in mkKeyTypeDec TH.hs share [mkPersist persistSettings { mpsGeneric = False }, mkMigrate "migration"] [persistLowerCase| Fo foo I...
2a390f10be5656c6b7fbe8bc7ec35cc35af7df94c33a3f622a933bc6b8377de8
reborg/clojure-essential-reference
3.clj
(require '[clojure.core.async :refer [>!! <!! >! <! alts!! chan go]]) < 1 > (->> (iterate #(* ((if (pos? %) + -) % 2) -1) 1.0) (map #(/ 4 %)) (take-while #(> (Math/abs %) precision)) (reduce +))) < 2 > (letfn [(factorial [n] (reduce * (range 1 (inc n))))] (->> (range) (map #(...
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Vectors/filterv/3.clj
clojure
<3>
(require '[clojure.core.async :refer [>!! <!! >! <! alts!! chan go]]) < 1 > (->> (iterate #(* ((if (pos? %) + -) % 2) -1) 1.0) (map #(/ 4 %)) (take-while #(> (Math/abs %) precision)) (reduce +))) < 2 > (letfn [(factorial [n] (reduce * (range 1 (inc n))))] (->> (range) (map #(...
14b4d8abc265d3a84a109c5ae5823f615c949e9408d9a1c839327386001a6dae
emilaxelsson/syntactic
Tuple.hs
# LANGUAGE TemplateHaskell # -- | Construction and elimination of tuples module Language.Syntactic.Functional.Tuple where import Language.Syntactic import Language.Syntactic.TH import Language.Syntactic.Functional data Tuple a where Pair :: Tuple (a :-> b :-> Full (a,b)) Fst :: Tuple ((a,b) :-> Full ...
null
https://raw.githubusercontent.com/emilaxelsson/syntactic/c51258ed96d4e9704e5842ce15667e7d3e5b77d7/src/Language/Syntactic/Functional/Tuple.hs
haskell
| Construction and elimination of tuples
# LANGUAGE TemplateHaskell # module Language.Syntactic.Functional.Tuple where import Language.Syntactic import Language.Syntactic.TH import Language.Syntactic.Functional data Tuple a where Pair :: Tuple (a :-> b :-> Full (a,b)) Fst :: Tuple ((a,b) :-> Full a) Snd :: Tuple ((a,b) :-> Full b) der...
8d08bc9d3a0cc4d8c2893cb78f606c053612863600ba6fe1ff5af1ee780ad20d
ocaml-multicore/ocaml-tsan
string.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/stdlib/string.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the * Strings . A string [ s ] of length [ n ] is an indexable and immutable sequence of [ n ] ...
4b68c2a4cf34ce62fc3c284550c44587b64cb9eaa8af536be2c948ff168afd62
ermine-language/ermine
properties.hs
# OPTIONS_GHC -fno - warn - missing - signatures # {-# LANGUAGE Rank2Types #-} # LANGUAGE TemplateHaskell # # LANGUAGE FlexibleContexts # # LANGUAGE ExtendedDefaultRules # # LANGUAGE LiberalTypeSynonyms # # LANGUAGE ScopedTypeVariables # module Main where import Test.QuickCheck import Test.QuickCheck.Function import T...
null
https://raw.githubusercontent.com/ermine-language/ermine/bd58949ab56311be9e0d2506a900f3d77652566b/tests/properties.hs
haskell
# LANGUAGE Rank2Types # | /NB:/ when adding a test suite here, make sure you add it to the @other-modules:@ block under @test-suite properties@ in
# OPTIONS_GHC -fno - warn - missing - signatures # # LANGUAGE TemplateHaskell # # LANGUAGE FlexibleContexts # # LANGUAGE ExtendedDefaultRules # # LANGUAGE LiberalTypeSynonyms # # LANGUAGE ScopedTypeVariables # module Main where import Test.QuickCheck import Test.QuickCheck.Function import Test.QuickCheck.Instances imp...
0a36aad302d0e45703d587f82952070ca9f1d783e2cc7a5c7b4eee570bf77e03
aantron/markup.ml
dep_lwt_unix.ml
This file is part of Markup.ml , released under the MIT license . See LICENSE.md for details , or visit . LICENSE.md for details, or visit . *) let (|>) x f = f x let () = Markup.of_list [] |> Markup_lwt_unix.to_channel Lwt_io.stdout |> Lwt_main.run
null
https://raw.githubusercontent.com/aantron/markup.ml/420aaa3d38d90ed84d1d7157840f7df5f3b5b349/test/dependency/dep_lwt_unix.ml
ocaml
This file is part of Markup.ml , released under the MIT license . See LICENSE.md for details , or visit . LICENSE.md for details, or visit . *) let (|>) x f = f x let () = Markup.of_list [] |> Markup_lwt_unix.to_channel Lwt_io.stdout |> Lwt_main.run
6a4c3a73099746c4f0291478c58d01e7ffd2cefb6a9112232427e649af7fa915
ocaml-multicore/ocaml-tsan
ephetest.ml
(* TEST *) let debug = false open Printf open Ephemeron let is_true test s b = printf "%s %s: %s\n" test s (if b then "OK" else "FAIL") let is_false test s b = is_true test s (not b) let final r v = Gc.finalise_last (fun () -> r := false) v let is_key_value test (key_alive, _) = is_true test "key set" !key_alive l...
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/f54002470cc6ab780963cc81b11a85a820a40819/testsuite/tests/weak-ephe-final/ephetest.ml
ocaml
TEST * test: key alive data dangling * test: key dangling data dangling * test: key dangling data alive * test: key accessible from data but all dangling
let debug = false open Printf open Ephemeron let is_true test s b = printf "%s %s: %s\n" test s (if b then "OK" else "FAIL") let is_false test s b = is_true test s (not b) let final r v = Gc.finalise_last (fun () -> r := false) v let is_key_value test (key_alive, _) = is_true test "key set" !key_alive let is_data_...
3f98aa76622fb54fda58555526023ed6540248193433250b2efa7959f4d3e776
lasp-lang/types
state_gset.erl
%% Copyright ( c ) 2015 - 2016 . All Rights Reserved . Copyright ( c ) 2007 - 2012 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %...
null
https://raw.githubusercontent.com/lasp-lang/types/e35b9b3a32b8f580daff1a7d1102813ad530835e/src/state_gset.erl
erlang
Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ----------------------------...
Copyright ( c ) 2015 - 2016 . All Rights Reserved . Copyright ( c ) 2007 - 2012 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an "...
cd31a32d8c23def040eb8cd27a90d27020c37f00df047c4860f6c01553846761
isovector/transitive-anns
Annotations.hs
# LANGUAGE ViewPatterns # module TransitiveAnns.Plugin.Annotations ( propagate , getVars , lookupAttachedAnns , buildNewAnnotations , referencedVars , hsBinds ) where import Data.Data hiding (TyCon) import Data.Functor ((<&>)) import Data.Generics (everything, mkQ) import ...
null
https://raw.githubusercontent.com/isovector/transitive-anns/c3bdc423f84bf15fe8b3618b5dddd5764fc8a470/src/TransitiveAnns/Plugin/Annotations.hs
haskell
---------------------------------------------------------------------------- | Get the name and set of referenced variables for a binding. ---------------------------------------------------------------------------- | Apply a function over all binds, accumulating the results into a map. ------------------------------...
# LANGUAGE ViewPatterns # module TransitiveAnns.Plugin.Annotations ( propagate , getVars , lookupAttachedAnns , buildNewAnnotations , referencedVars , hsBinds ) where import Data.Data hiding (TyCon) import Data.Functor ((<&>)) import Data.Generics (everything, mkQ) import ...
96ca7cecf77fcbec60df05088b4e12fe904b5ee0635bb6c56876c3a3d763c882
reflectionalist/S9fES
dupes.scm
#! /usr/local/bin/s9 -f ; dupes -- find duplicate file names by , 2010 ; Placed in the Public Domain ; ; Usage: dupes [directory] (load-from-library "hof.scm") (load-from-library "hash-table.scm") (load-from-library "string-split.scm") (load-from-library "basename.scm") (load-from-library "parse-optionsb.scm") (...
null
https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/prog/dupes.scm
scheme
dupes -- find duplicate file names Placed in the Public Domain Usage: dupes [directory]
#! /usr/local/bin/s9 -f by , 2010 (load-from-library "hof.scm") (load-from-library "hash-table.scm") (load-from-library "string-split.scm") (load-from-library "basename.scm") (load-from-library "parse-optionsb.scm") (load-from-library "displaystar.scm") (define readable-output (option #\r #f)) (define show-help...
3c7237d9820585e52b0bcb1f6adf4d111435e4ba01cda62e04c71528f89b22c3
tek/polysemy-hasql
Effect.hs
{-# language CPP #-} module Polysemy.Db.Tree.Effect where import Data.Vector (Vector) import Path (Path) import Prelude hiding (Enum) import Polysemy.Db.Data.Rep (Auto, Enum, Flatten, ForcePrim, ForceRep, Json, JsonB, Prim, Product, Rep, Sum) import Polysemy.Db.SOP.HasGeneric (IsNewtype) import Polysemy.Db.Tree.Data...
null
https://raw.githubusercontent.com/tek/polysemy-hasql/f74641cf52c9a83a8e7bccaec8504abc1277e8f3/packages/db/lib/Polysemy/Db/Tree/Effect.hs
haskell
# language CPP # -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------- ------...
module Polysemy.Db.Tree.Effect where import Data.Vector (Vector) import Path (Path) import Prelude hiding (Enum) import Polysemy.Db.Data.Rep (Auto, Enum, Flatten, ForcePrim, ForceRep, Json, JsonB, Prim, Product, Rep, Sum) import Polysemy.Db.SOP.HasGeneric (IsNewtype) import Polysemy.Db.Tree.Data.Effect (Adt, Newtype...
e7c37837ff9f7e9e92474e3b51965436859246f36fa547316105a391f6e007bf
jonascarpay/calligraphy
Parse.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE DerivingStrategies # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # module Calligraphy.Phases.Parse ( parseHieFiles, ppParseError, ppParsePhaseDebugInfo, ParseError (..), ParsePhaseDebugInfo (..), ) where import qualified Calligraphy.Compat.GHC as...
null
https://raw.githubusercontent.com/jonascarpay/calligraphy/78844ddef3fc9cd0de03abf17fed95f63f2b3ba2/src/Calligraphy/Phases/Parse.hs
haskell
# LANGUAGE BangPatterns # | A declaration extracted from the source code. A single symbol can apparently declare a name multiple times in the same place, with multiple distinct keys D: This happens, for example, with default methods; the name refers to both the method name and the default implementation's name. We...
# LANGUAGE DerivingStrategies # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # module Calligraphy.Phases.Parse ( parseHieFiles, ppParseError, ppParsePhaseDebugInfo, ParseError (..), ParsePhaseDebugInfo (..), ) where import qualified Calligraphy.Compat.GHC as GHC import Calligraphy.Compat...
054153ab82bdff6685d395e1b9098f2e4708cedb27c30442c06520e9cc79d47e
imandra-ai/fix-engine
parser_combinators.mli
* Parser combinators for FIX messages . Each combinator has access to the message and can query key / values . A typical message parser would look like this . { [ let parse_message = Parser_combinators . ( let * group = repeating " 1 " parse_rg in let * ( ) = check_dupl...
null
https://raw.githubusercontent.com/imandra-ai/fix-engine/42f3c4f3ca432469969e89e461ca76b52c21f282/fix-engine/src-core-utils-msg/parser_combinators.mli
ocaml
* Result of parsing * Get current message * Set current message * [reflect_err p] captures errors occurring in [p] and reflects them into the returned value. * Required field * Optional field * Repeating group parser combinator, starting from the tag that encodes the length of the list, identifies the sub...
* Parser combinators for FIX messages . Each combinator has access to the message and can query key / values . A typical message parser would look like this . { [ let parse_message = Parser_combinators . ( let * group = repeating " 1 " parse_rg in let * ( ) = check_dupl...
0a28ad9821ad720685365f273356960f514fa55b1b79996235d2b83a7164c3a3
racket/gui
test-alignment.rkt
(require mzlib/etc mzlib/list mzlib/match "../alignment.rkt" "test-macro.rkt") los - equal ? ( ( listof rect ? ) ( listof rect ? ) . - > . boolean ? ) ;;tests the equality of the list of structures (define (los-equal? a b) (equal? (map rect->list a) (map rect->list b))) ;;rect->list (rect? . -> . vector?...
null
https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/embedded-gui/private/tests/test-alignment.rkt
racket
tests the equality of the list of structures rect->list (rect? . -> . vector?) a vector of the fields in the rect empty pasteboard empty pasteboard failure from test-suite frame wrong answer given was (list (make-rect 0 0 335.0 10 #t)) sort of like the previous failed test but with a nonsizable snip something that requ...
(require mzlib/etc mzlib/list mzlib/match "../alignment.rkt" "test-macro.rkt") los - equal ? ( ( listof rect ? ) ( listof rect ? ) . - > . boolean ? ) (define (los-equal? a b) (equal? (map rect->list a) (map rect->list b))) (define rect->list (match-lambda [($ rect ($ dim x width stretchable-width?...
58fad20339872f785abd3b00db44de269325fd9ab80a5077c9073474afd4f199
cpichard/filesequence
Main.hs
# LANGUAGE OverloadedStrings , TypeSynonymInstances , FlexibleInstances # # OPTIONS_GHC -F -pgmF htfpp # module Main where import Test.Framework import Test.Framework.BlackBoxTest import {-@ HTF_TESTS @-} FileSequenceTests import {-@ HTF_TESTS @-} FrameListTests main ::IO () main = htfMain htf_importedTests
null
https://raw.githubusercontent.com/cpichard/filesequence/39cd8eb7dd0bc494c181c5b04fc9ff2fae5202d0/tests/Main.hs
haskell
@ HTF_TESTS @ @ HTF_TESTS @
# LANGUAGE OverloadedStrings , TypeSynonymInstances , FlexibleInstances # # OPTIONS_GHC -F -pgmF htfpp # module Main where import Test.Framework import Test.Framework.BlackBoxTest main ::IO () main = htfMain htf_importedTests
38d660837e10fc448c8add8ac523ce3f7a147e7ca22ac24f4b8e0ae502bcc135
tweag/asterius
T12903.hs
import Control.Concurrent import Control.Exception import System.IO import System.Posix import System.Posix.IO main = do (pout1, pin1) <- createPipe (pout2, _) <- createPipe pid <- forkProcess $ do hdl <- fdToHandle pin1 hSetBuffering hdl LineBuffering handle (\UserInterrupt{} ->...
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/rts/T12903.hs
haskell
import Control.Concurrent import Control.Exception import System.IO import System.Posix import System.Posix.IO main = do (pout1, pin1) <- createPipe (pout2, _) <- createPipe pid <- forkProcess $ do hdl <- fdToHandle pin1 hSetBuffering hdl LineBuffering handle (\UserInterrupt{} ->...
16d73fbc9f52b75e6dff30191aee445f340e9116de76f70a2ef22d9b6b31b907
camllight/camllight
operations_on_types.ml
#open "comparisons";; #open "type_for_matching";; (************************** CONVERSION ***********************************) let translate_frozen_variable {Max_depth = max; Depth = depth; Sub_nb = sub_nb; Fro_nb = fro_nb; Sub_tab = sub_tab; Fro_tab = fro_tab; Rest = rest} var = let new_var =...
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/camlsearch/source/operations_on_types.ml
ocaml
************************* CONVERSION ********************************** ************************* STATE *************************************** ************************* COMPARISONS ********************************* Compare `var1' et `var2' Compare `var1' et `var2' Compare `var1' et `var2' Compare `const1' et `c...
#open "comparisons";; #open "type_for_matching";; let translate_frozen_variable {Max_depth = max; Depth = depth; Sub_nb = sub_nb; Fro_nb = fro_nb; Sub_tab = sub_tab; Fro_tab = fro_tab; Rest = rest} var = let new_var = fro_nb + 1 in ({Max_depth = max; Depth = depth; Sub_nb = su...
b6a3f2b5b5938564876c18f0b43672a93f809dbf5bdc1c0f9cbb6f1030c6e73e
aharisu/Gauche-CV
copy-make-border.scm
(use cv) (define-constant offset 30) (let* ([src (cv-load-image "data/image/lenna.png")] [dst-width (+ (ref src 'width) (* 2 offset))] [dst-height (+ (ref src 'height) (* 2 offset))] [dst-replicate (make-image dst-width dst-height (ref src 'depth) (ref src 'n-channels))] [dst-constant (mak...
null
https://raw.githubusercontent.com/aharisu/Gauche-CV/5e4c51501431c72270765121ea4d92693f11d60b/sample/copy-make-border.scm
scheme
(use cv) (define-constant offset 30) (let* ([src (cv-load-image "data/image/lenna.png")] [dst-width (+ (ref src 'width) (* 2 offset))] [dst-height (+ (ref src 'height) (* 2 offset))] [dst-replicate (make-image dst-width dst-height (ref src 'depth) (ref src 'n-channels))] [dst-constant (mak...
ebc01e78474fa8293bf61469dd1fb20b6c114c95826f757f0df393662c18a0ad
drathier/elm-offline
Diff.hs
# OPTIONS_GHC -Wall # module Diff (run) where import qualified Elm.Diff as Diff import qualified Reporting.Task as Task import qualified Reporting.Progress.Terminal as Terminal -- RUN run :: Diff.Args -> () -> IO () run args () = do reporter <- Terminal.create Task.run reporter $ Diff.diff args
null
https://raw.githubusercontent.com/drathier/elm-offline/f562198cac29f4cda15b69fde7e66edde89b34fa/ui/terminal/src/Diff.hs
haskell
RUN
# OPTIONS_GHC -Wall # module Diff (run) where import qualified Elm.Diff as Diff import qualified Reporting.Task as Task import qualified Reporting.Progress.Terminal as Terminal run :: Diff.Args -> () -> IO () run args () = do reporter <- Terminal.create Task.run reporter $ Diff.diff args
0a18cc14420db73feb89ec17a5db946922b6a628564eaac75b5508dc98fd2408
tachukao/ocaml-mujoco
typs_gen.ml
open Base open Common let p_filename_box ch filename = let width = 80 in let l = String.length filename in let first_leg = 30 in let second_leg = width - (first_leg + 2) - l in p ch "(* %s *)" String.(make width '-'); p ch "(* %s %s %s *)" String.(make first_leg '-') filename String.(make second_leg '-'); ...
null
https://raw.githubusercontent.com/tachukao/ocaml-mujoco/a17bba51e7a0166caa6a8693ac1d9178dd004a38/src/autogen/typs_gen.ml
ocaml
top mid bottom top mid seal bottom enum part struct part
open Base open Common let p_filename_box ch filename = let width = 80 in let l = String.length filename in let first_leg = 30 in let second_leg = width - (first_leg + 2) - l in p ch "(* %s *)" String.(make width '-'); p ch "(* %s %s %s *)" String.(make first_leg '-') filename String.(make second_leg '-'); ...
a76eeb40ef38e44b399d0fdb19a5b162e4ed3327a27a10d26ef6b04b7fbf6f94
yuriy-chumak/ol
random.scm
;;; ;;; a pseudorandom number generator ;;; ;; todo: alternative distributions note - we use mainly primop math here , so this may look a bit odd (define-library (owl random) (export prngs ; lcg-rands ;; seed (int32) → rands ;; stream construction seed → ll of ( digit ... ) ; ; only th...
null
https://raw.githubusercontent.com/yuriy-chumak/ol/1151fd975ad63a1ed7b152bba0085d5e1f8230ce/libraries/owl/random.scm
scheme
a pseudorandom number generator todo: alternative distributions lcg-rands ;; seed (int32) → rands stream construction ; only the default one , later also merseinne twister , alternatives (digit ...) → (0|1 ...) seed → (bit ...) stream functions rs max → rs' n, 0 <= n < max rs n → rs' i r...
note - we use mainly primop math here , so this may look a bit odd (define-library (owl random) (export prngs rands->bytes seed->bytes rand-log rand-subset rs x max x i - > rs ' ( .. n_i ) , as in rand rs x lst - > rs ' lst ' < - lst , same order , each element has 50 % chance ...
f9eb9a04f7cff6586743b1c05f69ede9fdf5b8003f25d56adc57489c13ac1d2b
degree9/uikit-hl
progress.cljs
(ns uikit-hl.progress (:require [hoplon.core :as h])) (defmulti uk-progress! h/kw-dispatcher :default ::default) (defmethod h/do! ::default [elem key val] (uk-progress! elem key val)) (defn- format-progress [progress] (str "uk-progress-" progress)) (defmethod uk-progress! ::default [elem kw v] (h/do! el...
null
https://raw.githubusercontent.com/degree9/uikit-hl/b226b1429ea50f8e9a6c1d12c082a3be504dda33/src/uikit_hl/progress.cljs
clojure
(ns uikit-hl.progress (:require [hoplon.core :as h])) (defmulti uk-progress! h/kw-dispatcher :default ::default) (defmethod h/do! ::default [elem key val] (uk-progress! elem key val)) (defn- format-progress [progress] (str "uk-progress-" progress)) (defmethod uk-progress! ::default [elem kw v] (h/do! el...
a0e2b2f8a964c0590dbe9891dbabfa6fb89ee00c6460343cc15ac43335e329ed
rtoy/cmucl
assem-rtns.lisp
;;; -*- Package: SPARC -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; (ext:file-comment "$Header: src/assembly/sparc/assem-rtns.lisp $") ;...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/assembly/sparc/assem-rtns.lisp
lisp
-*- Package: SPARC -*- ********************************************************************** ********************************************************************** $Header: src/assembly/sparc/assem-rtns.lisp $ we don't want a vop for this one. These are just needed to facilitate the transfer These are nee...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . (ext:file-comment "$Header: src/assembly/sparc/assem-rtns.lisp $") (in-package "SPARC") Return - multiple with other than one value (define-assembly-routine (return-mul...
19664b4261bb92594b852c39c65b08a86279033269aa85927962e338d8569bb0
OCamlPro/techelson
expand.mli
* Types and helpers for macro expansion . expand to lists of instructions ` Mic.t list ` . Macros expand to lists of instructions `Mic.t list`. *) (** Helpful expansion-related functions. *) module Utils : sig (** Turns a macro comparison operator in an instruction. *) val macro_op_to_mic : Anno...
null
https://raw.githubusercontent.com/OCamlPro/techelson/932fbf08675cd13d34a07e3b3d77234bdafcf5bc/src/1_base/expand.mli
ocaml
* Helpful expansion-related functions. * Turns a macro comparison operator in an instruction. * Expands a `IF<OP>` macro. * Expands a `ASSERT_<OP>` macro. * Expands a `ASSERT_CMP<OP>` macro. * Expansion of a `ASSERT_NONE` macro. * Expansion of a `ASSERT_SOME` macro. * Expansion of a `ASSERT_LEFT` macro. * Expan...
* Types and helpers for macro expansion . expand to lists of instructions ` Mic.t list ` . Macros expand to lists of instructions `Mic.t list`. *) module Utils : sig val macro_op_to_mic : Annot.vars -> Mic.Macro.op -> Mic.t end * Expands a ` CMP < OP > ` macro . val macro_cmp : Annot.vars -> Mic.Ma...
7166880c38cdf14445b78295d352a30f6eefb2d158c7661745337482c07f707d
mlabs-haskell/plutus-specification-language
PSL.hs
module PSL (x) where import Plutarch.Prelude data PBool ef = PTrue | PFalse deriving stock (Generic) deriving anyclass (PHasRepr) x :: PConstructable edsl PBool => Term edsl PBool x = pcon PTrue import Data . Kind ( Type ) import Plutarch . EType import Plutarch . Core import ( Generic ) import quali...
null
https://raw.githubusercontent.com/mlabs-haskell/plutus-specification-language/e43151e37c6af687696b515ebfb40b6346e144f4/PSL.hs
haskell
class Implements i p | i - > p where observeOutput $ undefined ( canonical $ Proxy @CounterProtocol ) value ' ( econ $ CounterDatum 5 pkh ) given one A , we produce an A and a B given one A and one B , we lock the value of both into the counter protocol class Implements i p | i -> p where observeOutput $ undefine...
module PSL (x) where import Plutarch.Prelude data PBool ef = PTrue | PFalse deriving stock (Generic) deriving anyclass (PHasRepr) x :: PConstructable edsl PBool => Term edsl PBool x = pcon PTrue import Data . Kind ( Type ) import Plutarch . EType import Plutarch . Core import ( Generic ) import quali...
61301008809c41a9e31be58a09df76a61826aeae09a2ecba2d81d837c7b83ada
mnasoft/math
ls-gauss.lisp
;;;; ./src/ls-gauss/ls-gauss.lisp (defpackage #:math/ls-gauss (:use #:cl) (:export convert-to-triangular backward-run solve-x determiant singular-p )) (in-package :math/ls-gauss) (defgeneric backward-run (matrix) (:documentation "Кандидат в intern. Обратный ход при вычис...
null
https://raw.githubusercontent.com/mnasoft/math/9bdd318a8653e14694236d79b6d2bd4b6c3f2cee/src/ls-gauss/ls-gauss.lisp
lisp
./src/ls-gauss/ls-gauss.lisp Цикл для вычитания j-товой строки из i-товой
(defpackage #:math/ls-gauss (:use #:cl) (:export convert-to-triangular backward-run solve-x determiant singular-p )) (in-package :math/ls-gauss) (defgeneric backward-run (matrix) (:documentation "Кандидат в intern. Обратный ход при вычислении решения системы линейных ура...
57b9677cd981f2055bc70b44d81078a7cb9251ca4c2816a3b11542b406fe4bfc
spawnfest/eep49ers
erlresolvelinks.erl
%%-------------------------------------------------------------------- %% %% %CopyrightBegin% %% Copyright Ericsson AB 2009 - 2020 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a ...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/system/doc/top/src/erlresolvelinks.erl
erlang
-------------------------------------------------------------------- %CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY K...
Copyright Ericsson AB 2009 - 2020 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(erlresolvelinks). -export([make/1]). -include_lib("kernel/include/file.hrl"). -define(JAVASCRIPT_NAME, "er...
ad0de20cc8c23c0b41356f1ee1773bff3d125eaf3f756b661f6cbef4eb0881a4
david-broman/modelyze
moz.ml
open Utils open Ustring.Op open Printf open Message let mkleval libpath filename = (try Fileincluder.read_file_chain libpath filename |> Toplevel.desugar |> Pattern.desugar |> Typesystem.typecheck |> Translate.translate |> Eval.evaluate |> ignore with ...
null
https://raw.githubusercontent.com/david-broman/modelyze/e48c934283e683e268a9dfd0fed49d3c10277298/src/moz.ml
ocaml
open Utils open Ustring.Op open Printf open Message let mkleval libpath filename = (try Fileincluder.read_file_chain libpath filename |> Toplevel.desugar |> Pattern.desugar |> Typesystem.typecheck |> Translate.translate |> Eval.evaluate |> ignore with ...
7fc228ff1d1baf3e94703068bc69f2ad5a7627c6bd629f0e959e1091d1ed22be
ZeusWPI/contests
lange-telling.hs
-------------------------------------------------------------------------------- import Control.Monad (replicateM_) import Data.List (intercalate) import Data.Time (Day, diffDays, fromGregorian) -------------------------------------------------------------------------------- newt...
null
https://raw.githubusercontent.com/ZeusWPI/contests/d78aec91be3ce32a436d160cd7a13825d36bbf3a/2013-voorbereiding-vpw/lange-telling/lange-telling.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----...
import Control.Monad (replicateM_) import Data.List (intercalate) import Data.Time (Day, diffDays, fromGregorian) newtype DaysSinceEpoch = DaysSinceEpoch Integer deriving (Show) parseGregorian :: String -> Day parseGregorian str = fromGregorian (read year) (read month) (rea...
38b34bfe4efa7858082e5eaf037438367ba54e00094fa708bbd104ce264bcc50
gren-lang/compiler
PatternMatches.hs
{-# LANGUAGE OverloadedStrings #-} # OPTIONS_GHC -Wall # module Nitpick.PatternMatches ( check, Error (..), Context (..), Pattern (..), Literal (..), ) where The algorithm used here comes from " Warnings for Pattern Matching " by . Check it out for more information ! /~maranget/papers/war...
null
https://raw.githubusercontent.com/gren-lang/compiler/73c6272e4830a21ad5b6c7f7184d2bc9aecfdd7d/compiler/src/Nitpick/PatternMatches.hs
haskell
# LANGUAGE OverloadedStrings # PATTERN CREATE SIMPLIFIED PATTERNS ERROR CHECK CHECK DECLS CHECK DEFS CHECK EXPRESSIONS CHECK FIELD CHECK IF BRANCH CHECK CASE EXPRESSION CHECK PATTERNS EXHAUSTIVE PATTERNS INVARIANTS: The resulting rows are examples of missing patterns Check if a new row "vector" is us...
# OPTIONS_GHC -Wall # module Nitpick.PatternMatches ( check, Error (..), Context (..), Pattern (..), Literal (..), ) where The algorithm used here comes from " Warnings for Pattern Matching " by . Check it out for more information ! /~maranget/papers/warn/warn.pdf by Luc Maranget. Chec...
01257b9029f54ca0de5f569f5707ba6f55afbc09607a6873a662b754856fa4d0
MinaProtocol/mina
errors.ml
open Core_kernel open Async_kernel module Partial_reason = struct type t = | Length_mismatch | Fee_payer_and_source_mismatch | Fee_not_negative | Amount_not_some | Account_not_some | Invalid_metadata | Incorrect_token_id | Amount_inc_dec_mismatch | Status_not_pending | Can't_f...
null
https://raw.githubusercontent.com/MinaProtocol/mina/b3149c7cf29b18262e5493d1734829b8eb035349/src/lib/rosetta_lib/errors.ml
ocaml
DO NOT change the order of this variant, the generated error code relies * on it and we want that to remain stable We want each of these Transaction_submit... to be distinct errors Unlike message above, description can be updated whenever we see fit
open Core_kernel open Async_kernel module Partial_reason = struct type t = | Length_mismatch | Fee_payer_and_source_mismatch | Fee_not_negative | Amount_not_some | Account_not_some | Invalid_metadata | Incorrect_token_id | Amount_inc_dec_mismatch | Status_not_pending | Can't_f...
284365ae53b151cffd6e0cf2951a9b805e824465a3ff6a8cad3e0c8897a8175f
TerrorJack/ghc-alter
hClose001.hs
import System.IO import System.IO.Error main = do h <- openFile "hClose001.tmp" WriteMode hPutStr h "junk" hClose h hPutStr h "junk" `catchIOError` \ err -> if isIllegalOperation err then putStr "Okay\n" else error "Not okay\n"
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/IO/hClose001.hs
haskell
import System.IO import System.IO.Error main = do h <- openFile "hClose001.tmp" WriteMode hPutStr h "junk" hClose h hPutStr h "junk" `catchIOError` \ err -> if isIllegalOperation err then putStr "Okay\n" else error "Not okay\n"
cbce72f734dd87a720f98bef67b5586febb86141237fc667f33f0be1af4c7cce
pa-ba/compdata
Variables.hs
# LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} -------------------------------------------------------------------------------- -- | -- Module : Data.Comp.Variables Copyrigh...
null
https://raw.githubusercontent.com/pa-ba/compdata/5783d0e11129097e045cabba61643114b154e3f2/src/Data/Comp/Variables.hs
haskell
# LANGUAGE TemplateHaskell # # LANGUAGE TypeOperators # ------------------------------------------------------------------------------ | Module : Data.Comp.Variables License : BSD3 Stability : experimental This module defines an abstract notion of (bound) variables in compositional ac...
# LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # Copyright : ( c ) 2010 - 2011 Maintainer : < > and < > Portability : non - portable ( GHC Extensions ) data types , and scoped substitution . Capture - avoidance is /not/ taken into mo...
c505b832767926f2ca331fd2c7ecd4c9e894dac0246544dfb59943611097c2ad
google/ormolu
named-section-out.hs
module Magic ( -- * Something -- $explanation -- ** Another level foo , bar ) where -- $explanation -- -- Here it goes.
null
https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/module-header/named-section-out.hs
haskell
* Something $explanation ** Another level $explanation Here it goes.
module Magic foo , bar ) where
bb5b06730becfd91b3cdcb54c53ca836a6bda0d75354c2d6991f193390f327dc
input-output-hk/cardano-prelude
test.hs
module Main ( main, ) where import Cardano.Prelude import Test.Cardano.Prelude import qualified Test.Cardano.Prelude.GHC.Heap.NormalFormSpec import qualified Test.Cardano.Prelude.GHC.Heap.SizeSpec import qualified Test.Cardano.Prelude.GHC.Heap.TreeSpec main :: IO () main = runTests [ Test.Cardano.Prelude.GHC...
null
https://raw.githubusercontent.com/input-output-hk/cardano-prelude/94b37483937cfb7c07d69a708c950a090bb9670f/cardano-prelude-test/test/test.hs
haskell
module Main ( main, ) where import Cardano.Prelude import Test.Cardano.Prelude import qualified Test.Cardano.Prelude.GHC.Heap.NormalFormSpec import qualified Test.Cardano.Prelude.GHC.Heap.SizeSpec import qualified Test.Cardano.Prelude.GHC.Heap.TreeSpec main :: IO () main = runTests [ Test.Cardano.Prelude.GHC...
d524ec7ba51645baa5336b521b52110c68ff32faf739db9d4c41af527eba31cd
basho/riak_api
riak_api_pb_sup.erl
%% ------------------------------------------------------------------- %% riak_api_pb_sup : supervise riak_api_pb_server processes %% Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not...
null
https://raw.githubusercontent.com/basho/riak_api/41f4b72d6a946c710e1523fd69b5b8deb5b57153/src/riak_api_pb_sup.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissi...
riak_api_pb_sup : supervise riak_api_pb_server processes Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an ...
c4d03dd9ef5bd82b1bcae8e868cefe2617ccaafa070a271654db31a54a940bd8
seanomlor/programming-in-haskell
nestComp.hs
Show how the following list comprehension with two generators : flat :: [(Int, Int)] flat = [(x, y) | x <- [1, 2], y <- [3, 4]] can be re - expressed using two comprehensions with single generators : nest :: [(Int, Int)] nest = concat [[(x, y) | y <- [3, 4]] | x <- [1, 2]]
null
https://raw.githubusercontent.com/seanomlor/programming-in-haskell/e05142e6709eeba2e95cf86f376a32c9e629df88/05-list-comprehensions/nestComp.hs
haskell
Show how the following list comprehension with two generators : flat :: [(Int, Int)] flat = [(x, y) | x <- [1, 2], y <- [3, 4]] can be re - expressed using two comprehensions with single generators : nest :: [(Int, Int)] nest = concat [[(x, y) | y <- [3, 4]] | x <- [1, 2]]
a3261b907070539b5bebfa53c4915291fd49baa049bf96e9254d10482e68dc95
janestreet/file_path
file_path_intf.ml
(** Implements typed file paths. See [../doc/index.mdx] for an introduction. *) open! Core module type Types = Types.S module type Part = Part.S module type Relative = Relative.S module type Absolute = Absolute.S module type Path = Path.S module type Operators = Operators.S module type Stable = sig module Types : ...
null
https://raw.githubusercontent.com/janestreet/file_path/975cd0bd0460212b939016769aed2de28665b5a0/src/file_path_intf.ml
ocaml
* Implements typed file paths. See [../doc/index.mdx] for an introduction. * Everything below uses the types and subtyping relationships of [Types].
open! Core module type Types = Types.S module type Part = Part.S module type Relative = Relative.S module type Absolute = Absolute.S module type Path = Path.S module type Operators = Operators.S module type Stable = sig module Types : Types module Part : Common.Stable with module Type := Types.Part module Rela...
e989d90d9c5a15204af55b4ed69f782c911d88f808bb4b15d5f2b3d73cf3d717
zxymike93/SICP
constraint.rkt
#lang racket (define (for-each-except exception procedure list) (define (loop items) (cond [(null? items) 'done] [(eq? (car items) exception) (loop (cdr items))] [else (procedure (car items)) (loop (cdr items))])) (loop list)) ;; (has-value? c) ...
null
https://raw.githubusercontent.com/zxymike93/SICP/a5b90334207dabeae19feaa3b441a3e64a2aee64/samples/data-abstraction/constraint.rkt
racket
(has-value? c) -> bool (get-value c) -> num (set-value! c value source) set new value from source (forget-value! c source) reset value to none from source (connect c constraint) connector 利用是否有消息源判断是否设置新的值,如果已经设置了就不能重设(除非 forget) 同一个消息源才会 forget request apis of constraints constraint: adder, multiplier, co...
#lang racket (define (for-each-except exception procedure list) (define (loop items) (cond [(null? items) 'done] [(eq? (car items) exception) (loop (cdr items))] [else (procedure (car items)) (loop (cdr items))])) (loop list)) (define (has-value...
a5e12acdd5a9adf45b4761b69f4da70c6895b15c00070485a76ee589a4b0761a
matterhorn-chat/matterhorn
Types.hs
{-# LANGUAGE GADTs #-} # LANGUAGE KindSignatures # # LANGUAGE TemplateHaskell # {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # module Matterhorn.Types ( ConnectionStatus(..) , HelpTopic(..) , ProgramOutput(..) , MHEvent(..) , InternalEve...
null
https://raw.githubusercontent.com/matterhorn-chat/matterhorn/19a73ce833a8a8de3616cf884c03e9f08a4db0a7/src/Matterhorn/Types.hs
haskell
# LANGUAGE GADTs # # LANGUAGE MultiWayIf # # LANGUAGE RankNTypes # * Configuration | A notification version for the external notifier | A user password is either given to us directly, or a command which we execute to find the password. | An access token source. | The type of channel list group headings. Integer a...
# LANGUAGE KindSignatures # # LANGUAGE TemplateHaskell # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # module Matterhorn.Types ( ConnectionStatus(..) , HelpTopic(..) , ProgramOutput(..) , MHEvent(..) , InternalEvent(..) , StartupStateInfo(..) , MHError(..) , CPUUsagePolicy(..) , SemE...
55a42f0521c45ccae6a6cac3fb7bb4fa996f5316ac54f7ae1df61fcf71af5a30
dyzsr/ocaml-selectml
t080-eq.ml
TEST include tool - ocaml - lib flags = " -w -a " ocaml_script_as_argument = " true " * setup - ocaml - build - env * * include tool-ocaml-lib flags = "-w -a" ocaml_script_as_argument = "true" * setup-ocaml-build-env ** ocaml *) open Lib;; if not (0 = 0) then raise Not_found;; * 0 CONSTINT 42 ...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/tool-ocaml/t080-eq.ml
ocaml
TEST include tool - ocaml - lib flags = " -w -a " ocaml_script_as_argument = " true " * setup - ocaml - build - env * * include tool-ocaml-lib flags = "-w -a" ocaml_script_as_argument = "true" * setup-ocaml-build-env ** ocaml *) open Lib;; if not (0 = 0) then raise Not_found;; * 0 CONSTINT 42 ...
83010334aaaff2defcb7066295035991f0604b5953bd768b5e6501c7fd6dc957
trivial-features/trivial-features
tf-mezzano.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; ;;; tf-mezzano.lisp --- Mezzano trivial-features implementation. ;;; Copyright ( C ) 2009 , ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to ...
null
https://raw.githubusercontent.com/trivial-features/trivial-features/f6e8dd7268ae0137dbde4be469101a7f735f6416/src/tf-mezzano.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- tf-mezzano.lisp --- Mezzano trivial-features implementation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, pub...
Copyright ( C ) 2009 , files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , (in-package :cl-user) ...
3caa65ad83035175b6764595dc5fe9c8bd623fbd149ac92a3d28cf7577342399
WorksHub/client
events.cljs
(ns wh.admin.activities.events (:require [wh.components.activities.queries :as queries] [wh.graphql-cache :refer [reg-query]] [wh.pages.core :refer [on-page-load]])) (reg-query :recent_activities queries/recent-activities-query) (defmethod on-page-load :feed-preview [_db] [[:graphql/query ...
null
https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/client/src/wh/admin/activities/events.cljs
clojure
(ns wh.admin.activities.events (:require [wh.components.activities.queries :as queries] [wh.graphql-cache :refer [reg-query]] [wh.pages.core :refer [on-page-load]])) (reg-query :recent_activities queries/recent-activities-query) (defmethod on-page-load :feed-preview [_db] [[:graphql/query ...
a264b338fb7d042a1c7f5320a680d1ca7ce0a6306a70200290a5ed0d6b4aa0b6
training-center/clojure-study-group
core.clj
(ns hello-world-n-times.core (:gen-class)) (defn hello-world-n-time [times] (loop [n 1] (println "Hello World.") (if (>= n times) (println "Flwww!!!") (recur (inc n)))) ) (defn -main [& args] (hello-world-n-time (do (print "What's your name? ") (flush) (Integer/parseInt (read-line))))...
null
https://raw.githubusercontent.com/training-center/clojure-study-group/006b5d658f0f00b50e6c21855ec870e69dc0acac/material/exercises/hello-world-n-times/src/hello_world_n_times/core.clj
clojure
(ns hello-world-n-times.core (:gen-class)) (defn hello-world-n-time [times] (loop [n 1] (println "Hello World.") (if (>= n times) (println "Flwww!!!") (recur (inc n)))) ) (defn -main [& args] (hello-world-n-time (do (print "What's your name? ") (flush) (Integer/parseInt (read-line))))...
2093d8ff2dc54e47f1496b1f4292c1323ffbd4bb4f0c168ff8e5c1e8c0d845fb
mtolly/onyxite-customs
Difficulty.hs
{-# LANGUAGE FlexibleContexts #-} # LANGUAGE LambdaCase # # LANGUAGE OverloadedRecordDot # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Onyx.Difficulty where import qualified Data.EventList.Relative.TimeBody as RTB import Onyx.MIDI.Track.File (Flex...
null
https://raw.githubusercontent.com/mtolly/onyxite-customs/0c8acd6248fe92ea0d994b18b551973816adf85b/haskell/packages/onyx-lib/src/Onyx/Difficulty.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards #
# LANGUAGE LambdaCase # # LANGUAGE OverloadedRecordDot # module Onyx.Difficulty where import qualified Data.EventList.Relative.TimeBody as RTB import Onyx.MIDI.Track.File (FlexPartName (..)) import Onyx.Mode import Onyx.Preferences (MagmaSetting (..))...
1b4de581e56c0da318795eca33eeb713b81340a908cbde7f7fd2ab21d9dcb275
ocaml-omake/omake
omake_printf.mli
module type PrintfArgsSig = sig type t type value val print_char : t -> char -> unit val print_string : t -> string -> unit val open_box : t -> int -> unit val open_hbox : t -> unit val open_vbox : t -> int -> unit val open_hvbox : t -> int -> unit val open_hovbox : t -> int -> uni...
null
https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/builtin/omake_printf.mli
ocaml
module type PrintfArgsSig = sig type t type value val print_char : t -> char -> unit val print_string : t -> string -> unit val open_box : t -> int -> unit val open_hbox : t -> unit val open_vbox : t -> int -> unit val open_hvbox : t -> int -> unit val open_hovbox : t -> int -> uni...
b18103fb7115768f1340c76fe71775090c1d5d05f0fd07566e6f605cd01a0eb9
jessealama/laramie
tokenize.rkt
#lang typed/racket/base/optional (provide tokenize next-token peek-token consume-token set-next-token!) (require (file "types.rkt") (file "tokens.rkt") (file "data.rkt") (file "stream.rkt") (file "predicates.rkt") (file "parameters.rkt")...
null
https://raw.githubusercontent.com/jessealama/laramie/1057028aabb938b019b5429dd4a1207b8476aa00/laramie-lib/laramie/tokenizer/tokenize.rkt
racket
use the next scanner to peek the next tokens
#lang typed/racket/base/optional (provide tokenize next-token peek-token consume-token set-next-token!) (require (file "types.rkt") (file "tokens.rkt") (file "data.rkt") (file "stream.rkt") (file "predicates.rkt") (file "parameters.rkt")...
98a46668f41c8315303acce737d9c523a8d7d6ff4b5d41f2147556fbdd688f51
brendanhay/terrafomo
DataSources.hs
-- This module is auto-generated. # LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # -- | Module : . Local . DataSources Copyright : ( c ) 2017 - 2018 License ...
null
https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-builtins/gen/Terrafomo/Local/DataSources.hs
haskell
This module is auto-generated. | Stability : auto-generated * local_file | The main @local_file@ datasource definition. ^ @filename@ - (Required, Forces New) Path to the output file s Text Expr s Text ^ The minimal/required arguments.
# LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # Module : . Local . DataSources Copyright : ( c ) 2017 - 2018 License : Mozilla Public License , v. 2.0 . M...
06ab03d173fc32468a7428095e7658a446a181bc38dbcfaa5d620e9cd218b486
froggey/MBuild
build-cold-image.lisp
;;;; Build the cold image #-quicklisp (error "Quicklisp not found!") #-sb-unicode (error "Unicode support is required.") ;; The cold-generator requires a distinct (vector (unsigned-byte 64)) type. #-(or 64-bit arm64 x86-64 ppc64) (error "A 64-bit SBCL is required.") (setf sb-impl::*default-external-format* :utf-8) ...
null
https://raw.githubusercontent.com/froggey/MBuild/129e491942797587852387d8fb2b708743370f3e/build-cold-image.lisp
lisp
Build the cold image The cold-generator requires a distinct (vector (unsigned-byte 64)) type. Choose your architecture here. :x86-64 is well supported and the standard target.
#-quicklisp (error "Quicklisp not found!") #-sb-unicode (error "Unicode support is required.") #-(or 64-bit arm64 x86-64 ppc64) (error "A 64-bit SBCL is required.") (setf sb-impl::*default-external-format* :utf-8) (format t "Loading build prerequisites....~%") #+quicklisp (ql:quickload '(:nibbles :cl-ppcre :iterat...
9cef9557363d9dd84af6bb12f0a3245d136cc0bf8aef7d9e8528adcde85b7948
input-output-hk/ouroboros-network
Tests.hs
module Test.ThreadNet.Util.Tests (tests) where import Test.Tasty import Test.Tasty.QuickCheck import Ouroboros.Consensus.Config.SecurityParam import Ouroboros.Consensus.Node.ProtocolInfo (NumCoreNodes (..)) import Test.ThreadNet.Util import Test.ThreadNet.U...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/c82309f403e99d916a76bb4d96d6812fb0a9db81/ouroboros-consensus-test/test-infra/Test/ThreadNet/Util/Tests.hs
haskell
| A round-robin schedule should reach consensus
module Test.ThreadNet.Util.Tests (tests) where import Test.Tasty import Test.Tasty.QuickCheck import Ouroboros.Consensus.Config.SecurityParam import Ouroboros.Consensus.Node.ProtocolInfo (NumCoreNodes (..)) import Test.ThreadNet.Util import Test.ThreadNet.U...
0094552c0663027dc17d166ed46470d8defc907ce713d8bafdb1568ceff68f03
wenkokke/MonoProc
Flowable.hs
# LANGUAGE TupleSections # module PROC.MF.Flowable where import Prelude hiding (init) import PROC.Base import Text.Printf (printf) import Data.Set (Set,(\\)) import qualified Data.Set as S import qualified Data.Foldable as S (foldMap) import qualified Data.Traversable as S (forM) import Data.Map (Map) import qualified...
null
https://raw.githubusercontent.com/wenkokke/MonoProc/c3d00bd55ee8a6f2c12ebf5abb226c731e856350/src/PROC/MF/Flowable.hs
haskell
|Reverses a @Flow@ tuple. |Converts @Flow@ instances to tuples. |Returns whether or not a flow is intraprocedural. |Returns whether or not a flow is interprocedural. |Computes the interprocedural flow in a program. |Computes the reversed interprocedural flow in a program. |Uses the declarations in a @Prog@ const...
# LANGUAGE TupleSections # module PROC.MF.Flowable where import Prelude hiding (init) import PROC.Base import Text.Printf (printf) import Data.Set (Set,(\\)) import qualified Data.Set as S import qualified Data.Foldable as S (foldMap) import qualified Data.Traversable as S (forM) import Data.Map (Map) import qualified...
c1a5715b707803efd3a6b5c48e56beec759590d452d48afb33fe18171231a343
discus-lang/salt
Int64.hs
module Salt.Core.Prim.Ops.Int64 where import Salt.Core.Prim.Ops.Base primOpsInt64 = [ PP { name = "int64'add" , tsig = [TInt64, TInt64] :-> [TInt64] , step = \[NVs [VInt64 n1, VInt64 n2]] -> [VInt64 $ n1 + n2] , docs = "Integer addition." } , PP { name = "int64'sub" , tsig ...
null
https://raw.githubusercontent.com/discus-lang/salt/33c14414ac7e238fdbd8161971b8b8ac67fff569/src/salt/Salt/Core/Prim/Ops/Int64.hs
haskell
module Salt.Core.Prim.Ops.Int64 where import Salt.Core.Prim.Ops.Base primOpsInt64 = [ PP { name = "int64'add" , tsig = [TInt64, TInt64] :-> [TInt64] , step = \[NVs [VInt64 n1, VInt64 n2]] -> [VInt64 $ n1 + n2] , docs = "Integer addition." } , PP { name = "int64'sub" , tsig ...
2d8b0a891cfb89ac43cc9a4bda651c9c2ea28847b26003c3e5ad403c70ab3fa8
ghc/packages-dph
Utils.hs
{-# LANGUAGE TypeSynonymInstances, GeneralizedNewtypeDeriving #-} module DPH.Testsuite.Utils ( Proxy(..), asProxyTypeOf, limitRange, update, nest ) where import Test.QuickCheck import Text.Show.Functions import Data.Array.Parallel.Unlifted as U hiding ( update ) import Prelude as P import...
null
https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-test/framework/DPH/Testsuite/Utils.hs
haskell
# LANGUAGE TypeSynonymInstances, GeneralizedNewtypeDeriving # Test data generators ------------------------------------------------------- Random number generator A phantom type similar to the one found in lib `tagged' Helper functins ----------------------------------------------------- TODO: En...
module DPH.Testsuite.Utils ( Proxy(..), asProxyTypeOf, limitRange, update, nest ) where import Test.QuickCheck import Text.Show.Functions import Data.Array.Parallel.Unlifted as U hiding ( update ) import Prelude as P import Data.List ( delete, sort ) import System.Random ( StdGen, mkStdGen) instance (Elt ...
b2b9415c181e30e73a6d8c044a5392117a5d9e1886dd5bab24a35ec0b91d3db9
dtqec/aether
event.lisp
;;;; tests/event.lisp ;;;; ;;;; Tests which cover the functionality of the aether event loop. (in-package #:aether-tests) ;;; ;;; simple test of raw event loop behavior ;;; (defclass a () ((slot :accessor a-slot :initform 0))) (defclass b () ((cutoff :accessor b-cutoff :initarg :cutoff))) (defclass c (a) ()) ...
null
https://raw.githubusercontent.com/dtqec/aether/5f81bf9f3663e0c90d260155f2ecf819ebf951a9/tests/event.lisp
lisp
tests/event.lisp Tests which cover the functionality of the aether event loop. simple test of raw event loop behavior
(in-package #:aether-tests) (defclass a () ((slot :accessor a-slot :initform 0))) (defclass b () ((cutoff :accessor b-cutoff :initarg :cutoff))) (defclass c (a) ()) (define-object-handler ((a a) now) (incf (a-slot a) 2) (log-entry :source a :source-type (type-of a) :time now ...
cc506863ce1e8cd6915b55ff32349a0974e2fe156ec511e0367a3716799bc12a
ConferOpenSource/composite
Main.hs
import Test.Hspec (hspec) import DateTimeSpec (dateTimeSuite) import EnumSpec (enumSuite) import RecordSpec (recordSuite) import THSpec (thSuite) import TupleSpec (tupleSuite, namedTupleSuite) main :: IO () main = hspec $ do dateTimeSuite enumSuite namedTupleSuite recordSuite thSuite tupleSuite
null
https://raw.githubusercontent.com/ConferOpenSource/composite/4be75266b5293516b225030c207c4e08b35c1df2/composite-aeson/test/Main.hs
haskell
import Test.Hspec (hspec) import DateTimeSpec (dateTimeSuite) import EnumSpec (enumSuite) import RecordSpec (recordSuite) import THSpec (thSuite) import TupleSpec (tupleSuite, namedTupleSuite) main :: IO () main = hspec $ do dateTimeSuite enumSuite namedTupleSuite recordSuite thSuite tupleSuite
2df100dafb69f3c40ad55e17526285e53590cb2adce24abd0b0c96f7edc3262e
emaphis/HtDP2e-solutions
ex097.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex097) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ...
null
https://raw.githubusercontent.com/emaphis/HtDP2e-solutions/ecb60b9a7bbf9b8999c0122b6ea152a3301f0a68/1-Fixed-Size-Data/06-Itemizations-Structures/ex097.rkt
racket
about the language level of this file in a form that our tools can easily process. Design the functions tank-render, ufo-render, and missile-render. Physical Constants starting positions data definitions: A UFO is a Posn. interpretation (make-posn x y) is the UFO's location (using the top-down, left-to-right ...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex097) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) Ex . 97 : (require 2htdp/image) (define WIDTH 200) (define HE...
fd1b5548539dd7f7f32cb0a3d3beef526cfb0d9bb4135dd045e7dc01f67eda38
oliyh/lacinia-gen
def.clj
(ns lacinia-gen.def) (defmacro defquery [name query] `(def ~(vary-meta name assoc ::source query) ~query)) (defmacro defschema [name schema] `(def ~(vary-meta name assoc ::source schema) ~schema))
null
https://raw.githubusercontent.com/oliyh/lacinia-gen/9bc2bfc906a05e7ed99653275e1e3ba3912c8d88/src/lacinia_gen/def.clj
clojure
(ns lacinia-gen.def) (defmacro defquery [name query] `(def ~(vary-meta name assoc ::source query) ~query)) (defmacro defschema [name schema] `(def ~(vary-meta name assoc ::source schema) ~schema))
7cf43111fce70a97c919a11378188d8dd9002c8c0537280259ff5647742914e8
patricoferris/ocaml-multicore-monorepo
paf.mli
module type RUNTIME = sig type t val next_read_operation : t -> [ `Read | `Yield | `Close ] (** [next_read_connection t] returns a value describing the next operation that the caller should conduit on behalf of the connection. *) val read : t -> Bigstringaf.t -> off:int -> len:int -> int * [ read t ~l...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/dream/src/vendor/paf/lib/paf.mli
ocaml
* [next_read_connection t] returns a value describing the next operation that the caller should conduit on behalf of the connection. * [yield_reader t continue] registers with the connection to call [continue] when reading should resume. {!yield_reader} should be called after {!next_read_operation} r...
module type RUNTIME = sig type t val next_read_operation : t -> [ `Read | `Yield | `Close ] val read : t -> Bigstringaf.t -> off:int -> len:int -> int * [ read t ~len ] reads bytes of input from the provided range of [ bigstring ] an returns the number of bytes consumed by the connection . { !...
21e0ed01a090f687a48e88d45ff9c96afd0f0c3f998f2587cbbe3bc20ba5cce0
danidiaz/really-small-backpack-example
Siggy.hs
module Siggy (C,T,someVal,someOtherVal) where type C = [Int] type T = [C] someVal :: T someVal = [[1]] someOtherVal :: String someOtherVal = "someOtherVal"
null
https://raw.githubusercontent.com/danidiaz/really-small-backpack-example/50c50649c46a7f06f2eadde106f3502320931fdd/lesson3-signature-merging/lib-impl/Siggy.hs
haskell
module Siggy (C,T,someVal,someOtherVal) where type C = [Int] type T = [C] someVal :: T someVal = [[1]] someOtherVal :: String someOtherVal = "someOtherVal"
86c64a2360ce9d5945a14ca1c06745fd0780dede7af2da38a4deee9313d2a46a
dannywillems/jsoo-lib
jsoo_lib.mli
open Js_of_ocaml module type JS_OBJECT = sig type t val of_js : Js.Unsafe.any -> t val to_any_js : t -> Js.Unsafe.any * Equivalent to [ toString ] on the object in JavaScript val to_string : t -> string end module Js_object_base : JS_OBJECT (** Typed version of [getElementById], coercing to an input eleme...
null
https://raw.githubusercontent.com/dannywillems/jsoo-lib/d9ac3e1a86469eb78cce56dc0c083048c7e75ccf/src/jsoo_lib.mli
ocaml
* Typed version of [getElementById], coercing to an input element * Typed version of [getElementById], coercing to a paragraph element * Typed version of [getElementById], coercing to a div element * Typed version of [getElementById], coercing to a blockquote element * Typed version of [getElementById], coercing to...
open Js_of_ocaml module type JS_OBJECT = sig type t val of_js : Js.Unsafe.any -> t val to_any_js : t -> Js.Unsafe.any * Equivalent to [ toString ] on the object in JavaScript val to_string : t -> string end module Js_object_base : JS_OBJECT val get_input_by_id : string -> Dom_html.inputElement Js.t val g...
55676428d4381ff0343dc9c0aba6ebb088e921e8091defabdea2e6aafa17eda6
alephcloud/hs-aws-kinesis-client
Producer.hs
Copyright ( c ) 2013 - 2015 PivotCloud , Inc. -- . . Client . Producer -- -- Please feel free to contact us at with any -- contributions, additions, or other feedback; we would love to hear from -- you. -- Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may -- not use this file except...
null
https://raw.githubusercontent.com/alephcloud/hs-aws-kinesis-client/8ef77b8b7d7e9a840b1c7bd39b44861957580a1c/src/Aws/Kinesis/Client/Producer.hs
haskell
Please feel free to contact us at with any contributions, additions, or other feedback; we would love to hear from you. not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WARRANTIES OR COND...
Copyright ( c ) 2013 - 2015 PivotCloud , Inc. . . Client . Producer Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may distributed under the License is distributed on an " AS IS " BASIS , WITHOUT # LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE RecordWildCards # # LANGUAGE...
c10f6379762ca00ca122dde7c07dd3fe45ce207803ca925a80d01655b6102a34
ocaml-gospel/gospel
t3.mli
(**************************************************************************) (* *) GOSPEL -- A Specification Language for OCaml (* *) Copyright ( ...
null
https://raw.githubusercontent.com/ocaml-gospel/gospel/79841c510baeb396d9a695ae33b290899188380b/test/negative/t3.mli
ocaml
************************************************************************ (as described in file LICE...
GOSPEL -- A Specification Language for OCaml Copyright ( c ) 2018- The VOCaL Project This software is free software , distributed under the MIT license @ function f ( x : float ): bool = x = 2 { gospel_expected| [ 125 ] File " t3.mli " ,...
3aab740a87ecb04f1f5d3e34e4daad25dbbc78bc158cfe64e9e8bda94ef25ac4
noinia/hgeometry
Range.hs
# LANGUAGE TemplateHaskell # {-# LANGUAGE DeriveAnyClass #-} -------------------------------------------------------------------------------- -- | -- Module : Data.Range Copyright : ( C ) -- License : see the LICENSE file Maintainer : -- Data type for representing Generic Ranges ( Inte...
null
https://raw.githubusercontent.com/noinia/hgeometry/3e2064bfbcfaaa0c7fc181a530a02e1723bac601/hgeometry-combinatorial/src/Data/Range.hs
haskell
# LANGUAGE DeriveAnyClass # ------------------------------------------------------------------------------ | Module : Data.Range License : see the LICENSE file work with them. ------------------------------------------------------------------------------ -----------------------------------------------...
# LANGUAGE TemplateHaskell # Copyright : ( C ) Maintainer : Data type for representing Generic Ranges ( Intervals ) and functions that module Data.Range( EndPoint(..) , isOpen, isClosed , unEndPoint , Range(.., OpenRange, ClosedRange, Range') ...
f9397d29800c9b4d8100c6b531ce26fe054773279ab83a14aef0553a9d306810
Metaxal/MrEd-Designer
widget.rkt
#lang racket (require "../../mred-plugin.rkt" "../../default-values.rkt" racket/gui/base) (make-plugin [type 'text-field] [tooltip "Text Field"] [button-group "Controls"] [widget-class text-field%] [parent-class container-classes] [necessary '(label parent)] ; necessary properties [options '(...
null
https://raw.githubusercontent.com/Metaxal/MrEd-Designer/220833b738a1d46fbe309ea124ef61b825e42e68/mred-designer/widgets/text-field/widget.rkt
racket
necessary properties widget properties
#lang racket (require "../../mred-plugin.rkt" "../../default-values.rkt" racket/gui/base) (make-plugin [type 'text-field] [tooltip "Text Field"] [button-group "Controls"] [widget-class text-field%] [parent-class container-classes] [options '(callback)] [label (prop:false-or-string "Text Fiel...
2c669624bf5f96202a7b31f8a35bcb82221bd13dfe285135fbe434b90ac4edee
ijvcms/chuanqi_dev
tcp_listener_sup.erl
%%% ------------------------------------------------------------------- %%% Author : ming %%% Description : %%% Created : 2012 - 6 - 5 %%% ------------------------------------------------------------------- -module(tcp_listener_sup). -behaviour(supervisor). %% -------------------------------------------------------...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/system/tcp/tcp_listener_sup.erl
erlang
------------------------------------------------------------------- Author : ming Description : ------------------------------------------------------------------- -------------------------------------------------------------------- Include files ----------------------------------------------------------------...
Created : 2012 - 6 - 5 -module(tcp_listener_sup). -behaviour(supervisor). -export([start_link/1]). -export([ init/1 ]). Macros -define(SERVER, ?MODULE). Records TODO : Add description of start_link / function_arity start_link(Port) -> supervisor:start_link({local, ?MODULE}, ?SERVER, {10, Port}). Re...
ba6d00a4f5a381bf4f395136328c0ec2fb441ba7fe8c7cc1ae504f42f288586d
clj-commons/digest
digest.clj
(ns ^{:author "Miki Tebeka <>" :doc "Message digest algorithms for Clojure"} clj-commons.digest (:require [clojure.string :refer [join lower-case split]]) (:import (java.io File FileInputStream InputStream) (java.security MessageDigest Provider Security) (java.util Arrays))) ; Defa...
null
https://raw.githubusercontent.com/clj-commons/digest/a230d0d48d4f5b6d1a626fce9470ac496a774c49/src/clj_commons/digest.clj
clojure
Default buffer size for reading Code "borrowed" from * -03-26-1 * -0416.html Hints for clj-kondo
(ns ^{:author "Miki Tebeka <>" :doc "Message digest algorithms for Clojure"} clj-commons.digest (:require [clojure.string :refer [join lower-case split]]) (:import (java.io File FileInputStream InputStream) (java.security MessageDigest Provider Security) (java.util Arrays))) (def ^...
2844541e89c0071c83a6d768530bc8524a37a3020c928ac0a4bef478f79b0524
uim/uim
canna-custom.scm
;;; canna-custom.scm: Customization variables for canna.scm ;;; Copyright ( c ) 2003 - 2013 uim Project ;;; ;;; 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 of ...
null
https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/scm/canna-custom.scm
scheme
canna-custom.scm: Customization variables for canna.scm All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer. notice, this list of c...
Copyright ( c ) 2003 - 2013 uim Project 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright 3 . Neither the name of authors nor the names of its contributors THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTOR...
f35c08f1d88181c920a2d704efdb7f8839439a6a608a39305fe56f847af43190
alezost/stumpwm-config
sound.lisp
sound.lisp --- Set sound parameters and show them in OSD Copyright © 2013–2016 , 2022 < > ;; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;; (at y...
null
https://raw.githubusercontent.com/alezost/stumpwm-config/0e6877778d36148f3be53dbe1f81404f2892963f/sound.lisp
lisp
This program is free software; you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public ...
sound.lisp --- Set sound parameters and show them in OSD Copyright © 2013–2016 , 2022 < > it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License This ' o...
400c2df8acd623dfb2aa0c276f4ebb970e208d62240c727725de30ba4811e083
portkey-cloud/aws-clj-sdk
_2015-08-24.clj
(ns portkey.aws.waf.-2015-08-24 (:require [portkey.aws])) (def endpoints '{"ap-northeast-1" {:credential-scope {:service "waf", :region "us-east-1"}, :ssl-common-name "waf.amazonaws.com", :endpoint "", :signature-version :v4}, "eu-west-1" {:credential-scope {:service "waf", :region "us-east-1"},...
null
https://raw.githubusercontent.com/portkey-cloud/aws-clj-sdk/10623a5c86bd56c8b312f56b76ae5ff52c26a945/src/portkey/aws/waf/_2015-08-24.clj
clojure
(ns portkey.aws.waf.-2015-08-24 (:require [portkey.aws])) (def endpoints '{"ap-northeast-1" {:credential-scope {:service "waf", :region "us-east-1"}, :ssl-common-name "waf.amazonaws.com", :endpoint "", :signature-version :v4}, "eu-west-1" {:credential-scope {:service "waf", :region "us-east-1"},...
b63f47fbe87d683eaa0e0fe2bfdbab27059d557d6f5c035278ea241c8049691e
ocamllabs/cosmetrics
Cosmetrics.ml
open Lwt open CalendarLib open Cosmetrics_utils module Store = Git_unix.FS module G = Git_unix.Sync.Make(Store) let openfile_pool = Lwt_pool.create 100 (fun () -> return_unit) let read_commit_exn t sha = Store.read_exn t (Git.SHA.of_commit sha) >>= fun v -> match v with | Git.Value.Commit c -> return c | Gi...
null
https://raw.githubusercontent.com/ocamllabs/cosmetrics/8e27c47ccb0fe36fa7738eed53651e9e4472130d/src/Cosmetrics.ml
ocaml
Simple cache module. user version for the data filename for the cache FIXME: since the read is likely to occur several times, we could also supplement the disk cache with an in-memory Weak.t one. Check version Check dependencies * Return a cache. The cache must be [update]d if any of the files i...
open Lwt open CalendarLib open Cosmetrics_utils module Store = Git_unix.FS module G = Git_unix.Sync.Make(Store) let openfile_pool = Lwt_pool.create 100 (fun () -> return_unit) let read_commit_exn t sha = Store.read_exn t (Git.SHA.of_commit sha) >>= fun v -> match v with | Git.Value.Commit c -> return c | Gi...
8eaf3a0165c794ca3e6abeacb02ab9bd309d820c23a1c963e3cce9481b17f06c
ardumont/haskell-lab
Nim.hs
module Nim where Nim is a game that is played on a board comprising five numbered rows of stars , which is initially set up as follows : 1:∗∗∗∗∗ 2:∗∗∗∗ 3:∗∗∗ 4:∗∗ 5:∗ Two players take it in turn to remove one or more stars from the end of a single row . -- The winner is the player who removes the last st...
null
https://raw.githubusercontent.com/ardumont/haskell-lab/6d1f130300f33dc982c9a6b5d0b6a63af2c2666d/src/Nim.hs
haskell
The winner is the player who removes the last star or stars from the board. 0: ***** [0,4,3,2,1] [0,4,3,2,1] False True ***** **** *** ** * [5,3,3,2,1]
module Nim where Nim is a game that is played on a board comprising five numbered rows of stars , which is initially set up as follows : 1:∗∗∗∗∗ 2:∗∗∗∗ 3:∗∗∗ 4:∗∗ 5:∗ Two players take it in turn to remove one or more stars from the end of a single row . Implement the game of nim in Haskell . _ Hint ...
ce9999e2eb018ea31370b8be1453d4a8b1aacb80d2d41284b55bf3f43a026fae
fcbr/graph-algorithms
coverage.lisp
(require :sb-cover) ;;; Turn on generation of code coverage instrumentation in the compiler (declaim (optimize sb-cover:store-coverage-data)) (asdf:oos 'asdf:load-op :graph-algorithms :force t) (asdf:oos 'asdf:load-op :graph-algorithms/tests :force t) (require :graph-algorithms/tests) (graph-algorithms/tests::test-...
null
https://raw.githubusercontent.com/fcbr/graph-algorithms/3d9ea220344c2d10db83b99d0571a95904d5bc9a/tests/coverage.lisp
lisp
Turn on generation of code coverage instrumentation in the compiler
(require :sb-cover) (declaim (optimize sb-cover:store-coverage-data)) (asdf:oos 'asdf:load-op :graph-algorithms :force t) (asdf:oos 'asdf:load-op :graph-algorithms/tests :force t) (require :graph-algorithms/tests) (graph-algorithms/tests::test-graph-algorithms) (sb-cover:report "/tmp/")
2649aebee5058842d087bd920de393f2a9de87291c5d359032046d3c9ff3c34b
avsm/mirage-duniverse
sexp.mli
(** Type of S-expressions *) type t = Atom of string | List of t list _ We do n't use [ @@deriving sexp ] as this would generated references to [ ] , creating a circular dependency creating a circular dependency *) val t_of_sexp : t -> t val sexp_of_t : t -> t val equal : t -> t -> bool val compare : t -> t -...
null
https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/sexplib0/sexp.mli
ocaml
* Type of S-expressions * [Of_sexp_error (exn, sexp)] the exception raised when an S-expression could not be successfully converted to an OCaml-value. * {1 Helpers} * {1 Defaults} * [pp_hum ppf sexp] outputs S-expression [sexp] to formatter [ppf] in human readable form. * [pp_hum_indent n ppf sexp] outputs...
type t = Atom of string | List of t list _ We do n't use [ @@deriving sexp ] as this would generated references to [ ] , creating a circular dependency creating a circular dependency *) val t_of_sexp : t -> t val sexp_of_t : t -> t val equal : t -> t -> bool val compare : t -> t -> int * [ Not_found_s ] is u...
7634bdabea2e09626a95adf5d5668cf0d48d3af4bd380b0cf8c774c777131e40
HugoPeters1024/hs-sleuth
FileRead.hs
-- | Benchmarks simple file reading -- -- Tested in this benchmark: -- -- * Reading a file from the disk -- module Benchmarks.FileRead ( benchmark ) where import Control.Applicative ((<$>)) import Criterion (Benchmark, bgroup, bench, whnfIO) import qualified Data.ByteString as SB import qualified Data.ByteStri...
null
https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/385655e62031959a14a3bac5e9ccd1c42c045f0c/test-project/text-1.2.4.0/benchmarks/haskell/Benchmarks/FileRead.hs
haskell
| Benchmarks simple file reading Tested in this benchmark: * Reading a file from the disk
module Benchmarks.FileRead ( benchmark ) where import Control.Applicative ((<$>)) import Criterion (Benchmark, bgroup, bench, whnfIO) import qualified Data.ByteString as SB import qualified Data.ByteString.Lazy as LB import qualified Data.Text as T import qualified Data.Text.Encoding as T import qualified Data...
da9fc4da92a05938e883bbb4ee18eeff7af29182143877d3eeee0cfa66e23608
K2InformaticsGmbH/imem
imem_sec_ct.erl
%%%------------------------------------------------------------------- %%% File : imem_sec_ct.erl Description : Common testing imem_sec . %%% %%% Created : 09.12.2017 %%% Copyright ( C ) 2017 K2 Informatics GmbH %%%------------------------------------------------------------------- -module(imem_sec_ct)....
null
https://raw.githubusercontent.com/K2InformaticsGmbH/imem/602b6cd31ea1af00041a9318119ab0c3e4d5b59a/test/imem_sec_ct.erl
erlang
------------------------------------------------------------------- File : imem_sec_ct.erl Created : 09.12.2017 ------------------------------------------------------------------- -------------------------------------------------------------------- Test case related setup and teardown functions. -------...
Description : Common testing imem_sec . Copyright ( C ) 2017 K2 Informatics GmbH -module(imem_sec_ct). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). -export([ end_per_testcase/2, test/1 ]). -define(NODEBUG, true). -define(CONFIG_TABLE_OPTS, [{record_name, ddConfig}...
2287e24d3ef92212e32e43272ccf83e4e4eb3f6aeb03808785eb5d1f2aca4b30
kadena-io/chainweb-node
ChainResources.hs
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # -- | Module : Chainweb ....
null
https://raw.githubusercontent.com/kadena-io/chainweb-node/aff594a05096341d01ae50a9f37056b2519025d2/src/Chainweb/Chainweb/ChainResources.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # | Stability: experimental internal modules -------------------------------------------------------------------------- -- # INLINE _chainId # run inner
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # Module : Chainweb . Chainweb . ChainResources Copyright : Copyright © 2018 - 2020 Kad...
a2c7d347d95adb31e9ede34241b7419746d6a233e5b9fe94ed9154c3a003ad17
hidaris/thinking-dumps
17-we-changes-therefore-we-are!.rkt
#lang racket ;;; write deep with if (define deep (lambda (m) (if (zero? m) (quote pizza) (cons (deep (sub1 m)) (quote ()))))) ;;; a deepM with the new version of deep (define deepM (let ((Rs (quote ())) (Ns (quote ())) (D (lambda (m) (if (zero? m) ...
null
https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/the-little-series/the-seasoned-schemer/17-we-changes-therefore-we-are!.rkt
racket
write deep with if a deepM with the new version of deep Since the definition does not contain we can replace D by its value: applying (lambda ...) immediately to an argument is equivalent to (let ...) we could unname again. helper the same value as cons and counts how many times it sees arguments. This is no...
#lang racket (define deep (lambda (m) (if (zero? m) (quote pizza) (cons (deep (sub1 m)) (quote ()))))) (define deepM (let ((Rs (quote ())) (Ns (quote ())) (D (lambda (m) (if (zero? m) (quote pizza) (cons (deepM (sub1 ...
57055bde05d172cd91310754e3445b06bb9d610ee1aaa950e0292fc76df4de86
janestreet/ecaml
test_backtrace.ml
open! Core open! Async_kernel open! Import (* We don't want to capture, e.g., the test directory, which is a jenga sandbox tempdir, or the command line arguments to the test runner, which depend on user config. It's okay for us to mangle the backtrace quite badly in tests, since we only need to prove that we...
null
https://raw.githubusercontent.com/janestreet/ecaml/7c16e5720ee1da04e0757cf185a074debf9088df/test/test_backtrace.ml
ocaml
We don't want to capture, e.g., the test directory, which is a jenga sandbox tempdir, or the command line arguments to the test runner, which depend on user config. It's okay for us to mangle the backtrace quite badly in tests, since we only need to prove that we're getting back the thing emacs calls a backt...
open! Core open! Async_kernel open! Import let omit_args_for_determinism backtrace = Parsexp.Many.parse_string_exn backtrace |> List.filter_map ~f:(function | List _ -> None | Atom s -> Some s) |> String.concat ~sep:"\n" ;; let%expect_test _ = Emacs_backtrace.get () |> omit_args_for_determinism |> pri...
676141366e8641a09183ece8df95097039f920660400cb25b684fb35bf8fd31c
samth/tr-tutorial
8.rkt
#lang racket Print the Greek alphabet (for ([i (in-range 25)]) (display (integer->char (+ i (char->integer #\u3B1)))))
null
https://raw.githubusercontent.com/samth/tr-tutorial/3457df465921274f410bfa0ec0a623410fb22b47/website/8.rkt
racket
#lang racket Print the Greek alphabet (for ([i (in-range 25)]) (display (integer->char (+ i (char->integer #\u3B1)))))
8d8cc3fd82ff830fd7f9a9d84d9911170e693e7a89fced638e76c960b40e6304
databrary/databrary
Request.hs
{-# LANGUAGE OverloadedStrings #-} module Action.Request ( isDatabraryClient ) where import qualified Network.Wai as Wai import HTTP.Request isDatabraryClient :: Wai.Request -> Bool isDatabraryClient = any ("DatabraryClient" ==) . lookupRequestHeader "x-requested-with"
null
https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Action/Request.hs
haskell
# LANGUAGE OverloadedStrings #
module Action.Request ( isDatabraryClient ) where import qualified Network.Wai as Wai import HTTP.Request isDatabraryClient :: Wai.Request -> Bool isDatabraryClient = any ("DatabraryClient" ==) . lookupRequestHeader "x-requested-with"
3eb1af23c8579fe4a9ef6e821eaf4b74f083a4f961a53a1f75beef7ddf8676df
clojure/clojurescript
recur_test.cljs
Copyright ( c ) . All rights reserved . ;; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;; the t...
null
https://raw.githubusercontent.com/clojure/clojurescript/a4673b880756531ac5690f7b4721ad76c0810327/src/test/cljs/cljs/recur_test.cljs
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. Set...
Copyright ( c ) . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns cljs.recur-test (:require [cljs.test :refer-macros [deftest is]])) (defprotocol ISearch (search [this coll])) (defrecord Search1 [needle] ISearch (search [this coll] (when (seq coll) (if (= needle (first coll...
7b1963c04c5c2844363fb9d4b2cb65b415a23cdb25bc155614a1cd090ce10fb8
exoscale/clojure-kubernetes-client
v1_container_state_waiting.clj
(ns clojure-kubernetes-client.specs.v1-container-state-waiting (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] ) (:import (java.io File))) (declare v1-container-state-waiting-data v1-container-state-waiting) (def v1-container-state-waiting-data { (ds/opt :message) s...
null
https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_container_state_waiting.clj
clojure
(ns clojure-kubernetes-client.specs.v1-container-state-waiting (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] ) (:import (java.io File))) (declare v1-container-state-waiting-data v1-container-state-waiting) (def v1-container-state-waiting-data { (ds/opt :message) s...
317b408c20b7576afa6bd99b192fa415c2523dc69f61f0e70603eeacee86c87f
haskell/haskell-ide-engine
CodeActionImportListElaborate.hs
# LANGUAGE NoImplicitPrelude # import System.IO (IO) import Data.List (find, head, last, tail, init, union, (\\), null, length, cons, uncons) -- | Main entry point to the program main :: IO () main = when True $ hPutStrLn stderr $ fromMaybe "Good night, World!" (Just "Hello, Worl...
null
https://raw.githubusercontent.com/haskell/haskell-ide-engine/d84b84322ccac81bf4963983d55cc4e6e98ad418/test/testdata/CodeActionImportListElaborate.hs
haskell
| Main entry point to the program
# LANGUAGE NoImplicitPrelude # import System.IO (IO) import Data.List (find, head, last, tail, init, union, (\\), null, length, cons, uncons) main :: IO () main = when True $ hPutStrLn stderr $ fromMaybe "Good night, World!" (Just "Hello, World!")
8dc5236129834d40977829f66898028a8290d0842ee67fdb3b5a567bfb78c087
sighingnow/xgboost-haskell
Foreign.hs
# OPTIONS_GHC -Wno - orphans # {-# LANGUAGE BangPatterns #-} # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MagicHash # # LANGUAGE RoleAnnotations # # LANGUAGE StandaloneDeriving # # LANGUAGE UnboxedTuples # module ML.DMLC.XGBoost.Foreign where import Foundation import Foundation.Ar...
null
https://raw.githubusercontent.com/sighingnow/xgboost-haskell/a7132709bfbc67f0802179e17b08d1213a94b67e/src/ML/DMLC/XGBoost/Foreign.hs
haskell
# LANGUAGE BangPatterns # # INLINE primSizeInBytes # # INLINE primBaUIndex # # INLINE primAddrIndex # - Types ------------------------------------------------------------------- - Utilities ---------------------------------------------------------------
# OPTIONS_GHC -Wno - orphans # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MagicHash # # LANGUAGE RoleAnnotations # # LANGUAGE StandaloneDeriving # # LANGUAGE UnboxedTuples # module ML.DMLC.XGBoost.Foreign where import Foundation import Foundation.Array.Internal import Foundation...
c8c18e29a63292f5bd2d02010d1ce01325fe55129564ed1a001cec8cf5f46902
qnikst/sample-site
Api.hs
-- | -- -- Server API. -- Notes to developer : -- -- * Each endpoint should be written as a separate type -- * Nesting is endpoints is encouraged. # LANGUAGE DataKinds # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # {-# LANGUAGE OverloadedStrings #-} module Sample.Api ( Api , swagger , updateS...
null
https://raw.githubusercontent.com/qnikst/sample-site/b8b9410fe5377c6c507be86796c8d7bda030c723/sample-site/src/Sample/Api.hs
haskell
| Server API. * Each endpoint should be written as a separate type * Nesting is endpoints is encouraged. # LANGUAGE OverloadedStrings # | Current API version. This version evolves independently form server/client/package versions.
Notes to developer : # LANGUAGE DataKinds # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # module Sample.Api ( Api , swagger , updateSwaggerFile ) where import Control.Lens import Data.Aeson.Encode.Pretty (encodePretty) import qualified Data.ByteString.Lazy as B.L import Data.Proxy import Data.Swag...
985b3f63d64c2e16f5696f01a23d313685072acc8349c17815d54e71061e6079
dcastro/twenty48
TestImport.hs
# LANGUAGE QuasiQuotes # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module TestImport ( module X ) where import ClassyPrelude as X hiding (delete, deleteBy, Handler) import Database.Persist as X hiding (get) import Foundation as X import Model as X...
null
https://raw.githubusercontent.com/dcastro/twenty48/d4a58bfa389bb247525fd18f80ef428d84ef5fe9/test/TestImport.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes # # LANGUAGE NoImplicitPrelude # module TestImport ( module X ) where import ClassyPrelude as X hiding (delete, deleteBy, Handler) import Database.Persist as X hiding (get) import Foundation as X import Model as X import Test.Hspec as X ...
0c4a072b8ff117f9a033b8fa68c557387d19f641e68d0acb26c37198933e0114
craigl64/clim-ccl
describe.lisp
-*- Mode : Lisp ; Package : XLIB ; Syntax : COMMON - LISP ; Base : 10 ; Lowercase : Yes ; -*- ;;; Describe X11 protocol requests ;;; TEXAS INSTRUMENTS INCORPORATED ;;; P.O. BOX 2909 AUSTIN , TEXAS 78769 ;;; Copyright ( C ) 1987 Texas Instruments Incorporated . ;;; ;;; Permission is granted to...
null
https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/xlib/debug/describe.lisp
lisp
Package : XLIB ; Syntax : COMMON - LISP ; Base : 10 ; Lowercase : Yes ; -*- Describe X11 protocol requests P.O. BOX 2909 Permission is granted to any individual or institution to use, copy, modify, and distribute this software, provided that this complete copyright and permission notice is maintained, int...
TEXAS INSTRUMENTS INCORPORATED AUSTIN , TEXAS 78769 Copyright ( C ) 1987 Texas Instruments Incorporated . Texas Instruments Incorporated provides this software " as is " without Created 07/15/87 by OREN (in-package :xlib) (defparameter *request-parameters* (make-array (length *request-names...
4a29c85a3e4e51b96baad8546ec9b4dddedbad5689e592a6739c4e070214fddd
awgn/cgrep
Chunk.hs
-- Copyright ( c ) 2013 - 2022 < > -- -- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or -- (at your option) any later version. -- -- This program is dis...
null
https://raw.githubusercontent.com/awgn/cgrep/304d7092cd4b961022abb06103c2bf7bb932ff4a/src/CGrep/Chunk.hs
haskell
This program is free software; you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Publi...
Copyright ( c ) 2013 - 2022 < > it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or You should have received a copy of the GNU General Public License Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 13...
1626f356ed14b65d385d59ed3587138c229ecc6c16be24cc9af268bc582933c8
olivermg/owlisp
applier.lisp
(in-package :owlisp/compiler) (export '(compile-file* compile-stdin compile-stream compile-forms eval-form compile-form)) (defparameter *eval-chain* #'(lambda (expr) (let* ((macroexpanded-expr (do-macroexpansion expr)) (cps-converted-expr (do-cps-conversion macroexpanded-expr)) (tr...
null
https://raw.githubusercontent.com/olivermg/owlisp/dbf6d1d9e813f16124c170a0e1bfe155752e017b/src/compiler/applier.lisp
lisp
(simplified-expr (do-simplify expr)) (closured-expr (do-closure-conversion transformed-expr))
(in-package :owlisp/compiler) (export '(compile-file* compile-stdin compile-stream compile-forms eval-form compile-form)) (defparameter *eval-chain* #'(lambda (expr) (let* ((macroexpanded-expr (do-macroexpansion expr)) (cps-converted-expr (do-cps-conversion macroexpanded-expr)) (tr...
bea0b25725b166c13dc5a7f72937249b20dece3c29de67b87236439f4a4baf8b
jyh/metaprl
nuprl_int_1.ml
extends Ma_well_fnd open Dtactic interactive nuprl_le_wf {| intro[] |} : [wf] sequent { <H> >- '"i" in "int"[]{} } --> [wf] sequent { <H> >- '"j" in "int"[]{} } --> sequent { <H> >- ("le"[]{'"i";'"j"} in "univ"[1:l]{}) } interactive nuprl_gt_wf {| intro[] |} : [wf] sequent { <H> >- '"i" in "int"[]...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/mesa/nuprl_int_1.ml
ocaml
*** display forms ***
extends Ma_well_fnd open Dtactic interactive nuprl_le_wf {| intro[] |} : [wf] sequent { <H> >- '"i" in "int"[]{} } --> [wf] sequent { <H> >- '"j" in "int"[]{} } --> sequent { <H> >- ("le"[]{'"i";'"j"} in "univ"[1:l]{}) } interactive nuprl_gt_wf {| intro[] |} : [wf] sequent { <H> >- '"i" in "int"[]...
d7d5c1e7adc4cd7faba2cc59072d378cc57e6ea7c92b8672fc50cc445adb609f
ROCKTAKEY/roquix
emacs.scm
(define-module (roquix packages emacs) #:use-module (guix packages) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system copy) #:use-module (gnu packages emacs)) (define-public emacs-keg (let ((commit "7fbfd987d3...
null
https://raw.githubusercontent.com/ROCKTAKEY/roquix/ef1da9c6af8f183c0b8bf81165f9763ad2dbad4a/roquix/packages/emacs.scm
scheme
(define-module (roquix packages emacs) #:use-module (guix packages) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system copy) #:use-module (gnu packages emacs)) (define-public emacs-keg (let ((commit "7fbfd987d3...
d49f7803ca2ae8484652fdb5a56fa73d93528f989047949174173882fb5aaed1
arichiardi/replumb
test_env.cljs
(ns replumb.test-env (:require [replumb.core :as core] [replumb.browser.io :as io])) (def ^:dynamic *src-paths* ["js/compiled/out"]) (def ^:dynamic *target-opts* (core/options :browser *src-paths* io/fetch-file!)) (def ^:dynamic *read-file-fn* io/fetch-file!) (def ^:dynamic *write-file-fn* nil) (def ...
null
https://raw.githubusercontent.com/arichiardi/replumb/dde2228f2e364c3bafdf6585bb1bc1c27a3e336c/test/browser/replumb/test_env.cljs
clojure
(ns replumb.test-env (:require [replumb.core :as core] [replumb.browser.io :as io])) (def ^:dynamic *src-paths* ["js/compiled/out"]) (def ^:dynamic *target-opts* (core/options :browser *src-paths* io/fetch-file!)) (def ^:dynamic *read-file-fn* io/fetch-file!) (def ^:dynamic *write-file-fn* nil) (def ...
d1b8f9704649cd90a126fb15d104e93b8cf9c6e3efc28b4afc062a20247f56e6
eccentric-j/doom-icon
convert_icns.cljs
(ns tasks.convert-icns " Based on tutorial from: -create-your-own-custom-icons-in-10-7-5-or-later/ Usage npm run convert-icns ./icons/kitty-terminal/png ./icons/kitty-terminal/kitty.icns " (:require [clojure.string :as s] [promesa.core :as p] ["path" :as path] ["fs/promises" :as fs] [...
null
https://raw.githubusercontent.com/eccentric-j/doom-icon/fc02927f105eabf7108a0f00605fe8356bbaa5f2/src/tasks/convert_icns.cljs
clojure
(ns tasks.convert-icns " Based on tutorial from: -create-your-own-custom-icons-in-10-7-5-or-later/ Usage npm run convert-icns ./icons/kitty-terminal/png ./icons/kitty-terminal/kitty.icns " (:require [clojure.string :as s] [promesa.core :as p] ["path" :as path] ["fs/promises" :as fs] [...
8deec59a862f95e27189c300cdf94e0a9609ccbccf9efa7e026822fee17fddc3
abella-prover/abella
test.ml
open OUnit open Test_helper let tests = "Abella" >::: [ Test_unify.tests ; Test_term.tests ; Test_context.tests ; Test_graph.tests ; Test_subordination.tests ; Test_metaterm.tests ; Test_typing.tests ; Test_parser.tests ; Test_tactics.tests ; (*TODO Test_prover.tests ;*) ] ...
null
https://raw.githubusercontent.com/abella-prover/abella/d3a2d56b750cab84c3bee46ab041d37ad5f8addd/test/test.ml
ocaml
TODO Test_prover.tests ;
open OUnit open Test_helper let tests = "Abella" >::: [ Test_unify.tests ; Test_term.tests ; Test_context.tests ; Test_graph.tests ; Test_subordination.tests ; Test_metaterm.tests ; Test_typing.tests ; Test_parser.tests ; Test_tactics.tests ; ] let tests = extract_tests [] test...
89931c63b1af92dbda7af5e018f6c3567d56b79d3d60aa3a4c778ba4b140183d
39aldo39/klfc
Linux.hs
# LANGUAGE UnicodeSyntax , NoImplicitPrelude # # LANGUAGE FlexibleContexts # module Lookup.Linux ( LinuxAction(..) , posAndKeycode , posAndScancode , posToScancode , charAndString , deadKeysAndLinuxDeadKeys , actionAndRedirect , actionAndLinuxAction , printLinuxAction , modifier...
null
https://raw.githubusercontent.com/39aldo39/klfc/e07375b1459e416635100efe76b72ebe25f36c53/src/Lookup/Linux.hs
haskell
# LANGUAGE UnicodeSyntax , NoImplicitPrelude # # LANGUAGE FlexibleContexts # module Lookup.Linux ( LinuxAction(..) , posAndKeycode , posAndScancode , posToScancode , charAndString , deadKeysAndLinuxDeadKeys , actionAndRedirect , actionAndLinuxAction , printLinuxAction , modifier...
e7ff685c9367e43baec8a66f72de0fb8addd9e4acf7206e3bc29164ecf3bb6b5
mattmundell/nightshade
sequence-insert.lisp
;;; Tests of mh:sequence-insert. (in-package "USER") (import '(deftest:deftest deftest:with-test-dir)) ;;;; Number. (deftest sequence-insert ('((1 . 1)) sequence-insert-1) "Test `sequence-insert', inserting a number into an empty list." (mh:sequence-insert 1 ())) (deftest sequence-insert ('((1 . 1) (3 . 3)) ...
null
https://raw.githubusercontent.com/mattmundell/nightshade/d8abd7bd3424b95b70bed599e0cfe033e15299e0/src/tests/code/mh.lisp/sequence-insert.lisp
lisp
Tests of mh:sequence-insert. Number. String. Range. Errors.
(in-package "USER") (import '(deftest:deftest deftest:with-test-dir)) (deftest sequence-insert ('((1 . 1)) sequence-insert-1) "Test `sequence-insert', inserting a number into an empty list." (mh:sequence-insert 1 ())) (deftest sequence-insert ('((1 . 1) (3 . 3)) sequence-insert-2) "Test `sequence-insert', ...
621b843ed283bb1e0c492bcda6b62dff4032d132ac46fa297964b4448b3c9615
Gandalf-/coreutils
WcSpec.hs
module WcSpec where import Coreutils.Wc import Test.Hspec import Test.QuickCheck spec :: Spec spec = return ()
null
https://raw.githubusercontent.com/Gandalf-/coreutils/59afa0254a40cd6c3a24396340dbd257ba691491/test/WcSpec.hs
haskell
module WcSpec where import Coreutils.Wc import Test.Hspec import Test.QuickCheck spec :: Spec spec = return ()
ee4274457d3fb845b6118806ece37b4a7b1155f2729a52dc35afd17a5e46772d
input-output-hk/marlowe-cardano
Marlowe.hs
----------------------------------------------------------------------------- -- -- Module : $Headers License : Apache 2.0 -- -- Stability : Experimental Portability : Portable -- | tests . -- ----------------------------------------------------------------------------- # LANGUAGE DataKinds #...
null
https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/27f83c21c76d05cb1f381022d596a5782a4655e1/marlowe-test/src/Spec/Marlowe/Marlowe.hs
haskell
--------------------------------------------------------------------------- Module : $Headers Stability : Experimental --------------------------------------------------------------------------- # LANGUAGE DoAndIfThenElse # # LANGUAGE OverloadedStrings # * Testing | Set to `True` to print the JSON for ...
License : Apache 2.0 Portability : Portable | tests . # LANGUAGE DataKinds # # LANGUAGE NamedFieldPuns # # LANGUAGE NumericUnderscores # # LANGUAGE ScopedTypeVariables # # OPTIONS_GHC -fno - warn - deprecations # module Spec.Marlowe.Marlowe prop_noFalsePositives , prop_showWorksForContracts ...