_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
28d835029f0e1e08c890ff8a8a712ab87ef16f2f2ece6ecb0ba83828b0826135
gvolpe/haskell-book-exercises
intermission.hs
import Control.Applicative import Data.List (elemIndex) -- Short exercises added :: Maybe Integer added = (+3) <$> (lookup 3 $ zip [1, 2, 3] [4, 5, 6]) w :: Maybe Integer w = lookup 3 $ zip [1, 2, 3] [4, 5, 6] z :: Maybe Integer z = lookup 2 $ zip [1, 2, 3] [4, 5, 6] tupled :: Maybe (Integer, Integer) tupled = (,) ...
null
https://raw.githubusercontent.com/gvolpe/haskell-book-exercises/5c1b9d8dc729ee5a90c8709b9c889cbacb30a2cb/chapter17/intermission.hs
haskell
Short exercises I don't get this one... Write an Applicative instance for Identity. More exercises
import Control.Applicative import Data.List (elemIndex) added :: Maybe Integer added = (+3) <$> (lookup 3 $ zip [1, 2, 3] [4, 5, 6]) w :: Maybe Integer w = lookup 3 $ zip [1, 2, 3] [4, 5, 6] z :: Maybe Integer z = lookup 2 $ zip [1, 2, 3] [4, 5, 6] tupled :: Maybe (Integer, Integer) tupled = (,) <$> w <*> z x :: M...
495e67133616aa41ec4386beb210716d5ee3613b732fd3304fb0b03f4b17f1bb
Tyruiop/syncretism
core.clj
(ns syncretism-client.core (:gen-class) (:require [syncretism-client.ui :as ui])) (defn -main "I don't do a whole lot ... yet." [& args] (ui/run))
null
https://raw.githubusercontent.com/Tyruiop/syncretism/1f45bff025bd6086e9a9cac57e4b03b3b52c6fb0/syncretism-client/src/syncretism_client/core.clj
clojure
(ns syncretism-client.core (:gen-class) (:require [syncretism-client.ui :as ui])) (defn -main "I don't do a whole lot ... yet." [& args] (ui/run))
f406d96c5b848b4eade4bdbf02aac0e30a67b4606f2c016b5af3238d5dbe97c6
AndreaCrotti/elo
handlers_test.cljs
(ns byf.common.handlers-test (:require [byf.common.handlers :as sut] [cljs.test :as t :refer-macros [deftest testing is]])) (deftest get-in-test (testing "get in" (is (= "value" (sut/get-in* {::page {:key "value"}} ::page [:key]) ...
null
https://raw.githubusercontent.com/AndreaCrotti/elo/98c4b13b2c4e0605015d5d17a8be6cbb78c3f3f6/test/cljs/byf/common/handlers_test.cljs
clojure
(ns byf.common.handlers-test (:require [byf.common.handlers :as sut] [cljs.test :as t :refer-macros [deftest testing is]])) (deftest get-in-test (testing "get in" (is (= "value" (sut/get-in* {::page {:key "value"}} ::page [:key]) ...
53290a3db13773fd5084cf0b8306894fe4984fd6b35ebc043907acfbcbe0fbaf
bananu7/Hate
Hate.hs
module Hate ( module Hate.Common , module Hate.Math , module Hate.Events.Types , module Control.Monad.State , module Control.Monad.Reader , module Graphics.UI.GLFW ) where import Control.Monad.State import Control.Monad.Reader (ask) import Graphics.UI.GLFW (Key(..)) import Hate.Common (Lo...
null
https://raw.githubusercontent.com/bananu7/Hate/4aa4ec0cf1e9bcb32d8cc807ab2ee092807c7ddb/src/Hate.hs
haskell
module Hate ( module Hate.Common , module Hate.Math , module Hate.Events.Types , module Control.Monad.State , module Control.Monad.Reader , module Graphics.UI.GLFW ) where import Control.Monad.State import Control.Monad.Reader (ask) import Graphics.UI.GLFW (Key(..)) import Hate.Common (Lo...
5aaef83a508737a14318f7d15e48b8fa633ccdc9e8c3836312a50ad9c33349ec
sharplispers/linedit
dumb-terminal.lisp
Copyright ( c ) 2003 Nikodemus Siivola ;; ;; Permission is hereby granted, free of charge, to any person obtaining ;; a copy of this software and associated documentation files (the " Software " ) , to deal in the Software without restriction , including ;; without limitation the rights to use, copy, modify, merge...
null
https://raw.githubusercontent.com/sharplispers/linedit/0561c97dfca2f5854fcc66558a567a9875ddcb8f/dumb-terminal.lisp
lisp
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the without limitation the rights to use, copy, modify, merge, publish, the following conditions: The above copyright notice and this permission notice shall be included EXPRESS ...
Copyright ( c ) 2003 Nikodemus Siivola " Software " ) , to deal in the Software without restriction , including distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do so , subject to in all copies or substantial portions of the Software . ...
0babf19605feef401d039f599f142c00a819d78ddc931897db230e78ed84459c
JonathanLorimer/weft
ParserSpec.hs
{-# LANGUAGE DeriveAnyClass #-} module ParserSpec where import TestData import Control.Monad.Reader import Data.Bifunctor import Data.Either import qualified Data.List as L import qualified Data.Map as M import Data.Text (Text) import qualified Data.Text a...
null
https://raw.githubusercontent.com/JonathanLorimer/weft/fc0396240905ab0202c5896019cf1e482d216f8d/test/ParserSpec.hs
haskell
# LANGUAGE DeriveAnyClass # userId
module ParserSpec where import TestData import Control.Monad.Reader import Data.Bifunctor import Data.Either import qualified Data.List as L import qualified Data.Map as M import Data.Text (Text) import qualified Data.Text as T import Data.Void import ...
1210664a501810ab81d56dddb9e16c76d5168475ae0b805362744e45416432e4
goodell/cppmem
pp.ml
(*========================================================================*) (* *) cppmem model exploration tool (* *) ...
null
https://raw.githubusercontent.com/goodell/cppmem/eb3ce19b607a5d6ec81138cd8cacd236f9388e87/pp.ml
ocaml
======================================================================== ...
cppmem model exploration tool This ...
aa5f3cd1afaacf3cf4b9cb354a80585f0af483506fa4d5a9373cd1ae8a9ac3ec
turtl/core-cl
user.lisp
(in-package :turtl-core) (with-bind ("do-login" ev :response res) (let* ((data (data ev)) (username (gethash "username" data)) (password (gethash "password" data)) (user *user*)) (when (logged-in user) (error "Already logged in")) (mset user (list :username username ...
null
https://raw.githubusercontent.com/turtl/core-cl/8fdfaaf918f731318e734eaa7adcd083494f44b8/app/controllers/user.lisp
lisp
(in-package :turtl-core) (with-bind ("do-login" ev :response res) (let* ((data (data ev)) (username (gethash "username" data)) (password (gethash "password" data)) (user *user*)) (when (logged-in user) (error "Already logged in")) (mset user (list :username username ...
25c9703054015ad234cd8eed57796de4d45df56dc1b7477ab77a5f55f63ec4fb
ejgallego/dualquery
parmap_utils.mli
val log_error : ('a, unit, string, unit) format4 -> 'a val append_tr : 'a list -> 'a list -> 'a list val concat_tr : 'a list list -> 'a list val fold_right : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b val range : int -> int -> int list val tempfd : unit -> Unix.file_descr
null
https://raw.githubusercontent.com/ejgallego/dualquery/f8355212a760ef77ad3fb07f3bb595e775bf06d2/parmap/parmap_utils.mli
ocaml
val log_error : ('a, unit, string, unit) format4 -> 'a val append_tr : 'a list -> 'a list -> 'a list val concat_tr : 'a list list -> 'a list val fold_right : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b val range : int -> int -> int list val tempfd : unit -> Unix.file_descr
fe3195dce28a39974f78789367237a81391914b1cedb8726e5aeefd2cc4a8064
mtnygard/simulant-example
page_request.clj
(ns simtest.actions.page-request)
null
https://raw.githubusercontent.com/mtnygard/simulant-example/dcb76b2eda47dfb6be10a2077ade319873eacce1/simtest/src/simtest/actions/page_request.clj
clojure
(ns simtest.actions.page-request)
208d2d382207435fc62a1faa27eb2d148981e76b05161dd492d53866fed49e37
artem/hi-lang
Parser.hs
{-# LANGUAGE OverloadedStrings #-} module HW3.Parser where import Data.Text (Text, pack) import Data.Void import Text.Megaparsec import Text.Megaparsec.Char import HW3.Base (HiExpr (..), HiValue (..), HiFun (..), HiAction (..)) import qualified Text.Megaparsec.Char.Lexer as L import Control.Monad.Combinators.Expr (Ope...
null
https://raw.githubusercontent.com/artem/hi-lang/e21b835b72b0a75b8db5290f1132f0afd916d85b/src/HW3/Parser.hs
haskell
# LANGUAGE OverloadedStrings # | Helper functions | Parse functional keywords | Operator table for makeExprParser | Infix operators | Comma-separated expressions | Parse bang, dot and argument application | Parse expression (no infix) | String literal | ByteString [# #]
module HW3.Parser where import Data.Text (Text, pack) import Data.Void import Text.Megaparsec import Text.Megaparsec.Char import HW3.Base (HiExpr (..), HiValue (..), HiFun (..), HiAction (..)) import qualified Text.Megaparsec.Char.Lexer as L import Control.Monad.Combinators.Expr (Operator (..), makeExprParser) import ...
4b8222cb8fbe18e883c02295007d2e4e5ce242d2d7f6169322580e0ba648136a
conscell/hugs-android
StableName.hs
----------------------------------------------------------------------------- -- | Module : System . Mem . Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stability : experimental -- Portability : non-port...
null
https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/packages/base/System/Mem/StableName.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : experimental Portability : non-portable Stable names are a way of performing fast (O(1)), not-quite-exact comparison between objects. ...
Module : System . Mem . Copyright : ( c ) The University of Glasgow 2001 a hash table with objects as keys , but you want to use module System.Mem.StableName ( StableName, makeStableName, hashStableName, ) where import Prelude import Data.Typeable import Hugs.Stable ...
e1498de842caaedb83f634ed70bd275982deeba1e3546ee3a2e049dfc6be556f
arcfide/chez-srfi
srfi-19.scm
SRFI-19 : Time Data Types and Procedures . ;; Copyright ( C ) I / NET , Inc. ( 2000 , 2002 , 2003 ) . All Rights Reserved . ;; ;; Permission is hereby granted, free of charge, to any person obtaining ;; a copy of this software and associated documentation files (the " Software " ) , to deal in the Software withou...
null
https://raw.githubusercontent.com/arcfide/chez-srfi/96fb553b6ba0834747d5ccfc08c181aa8fd5f612/%253a19/srfi-19.scm
scheme
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the without limitation the rights to use, copy, modify, merge, publish, the following conditions: The above copyright notice and this permission notice shall be EXPRESS OR IMPLIED,...
SRFI-19 : Time Data Types and Procedures . Copyright ( C ) I / NET , Inc. ( 2000 , 2002 , 2003 ) . All Rights Reserved . " Software " ) , to deal in the Software without restriction , including distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnish...
4b18d7f2bf4ce92b8792ae79996da25d9d268f448c91ae272510aa9811ad72b4
noinia/hgeometry
DivideAndConquer.hs
-------------------------------------------------------------------------------- -- | -- Module : Algorithms.DivideAndConquer Copyright : ( C ) -- License : see the LICENSE file Maintainer : -------------------------------------------------------------------------------- module Algorithms.Di...
null
https://raw.githubusercontent.com/noinia/hgeometry/a6abecb1ce4a7fd96b25cc1a5c65cd4257ecde7a/hgeometry-combinatorial/src/Algorithms/DivideAndConquer.hs
haskell
------------------------------------------------------------------------------ | Module : Algorithms.DivideAndConquer License : see the LICENSE file ------------------------------------------------------------------------------ | Divide and conquer strategy where M(n) is the time corresponding to the ...
Copyright : ( C ) Maintainer : module Algorithms.DivideAndConquer( divideAndConquer , divideAndConquer1 , divideAndConquer1With , mergeSorted, mergeSortedLists , merg...
79fed83e6f43be284bb1e81aa0fa62ddedcf5de35fc90b4dc25348848863bc03
MaskRay/OJHaskell
91.hs
n = 50 main = print $ 3*n^2 + 2 * sum [min ((n-y) `div` x') (x `div` y') | x <- [1..n], y <- [1..n], let x' = x `div` gcd x y; y' = y `div` gcd x y ]
null
https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Project%20Euler/91.hs
haskell
n = 50 main = print $ 3*n^2 + 2 * sum [min ((n-y) `div` x') (x `div` y') | x <- [1..n], y <- [1..n], let x' = x `div` gcd x y; y' = y `div` gcd x y ]
51f47c86732d4fff06e94433b8e766855cff43b0ae3608388bbc88b505c90984
smimram/funk
mouse.ml
let kprintf f = Funk.kprintf "Mouse" f (** Aux device input buffer. *) let aux_input_port = 0x60 (** Aux device output buffer. *) let aux_output_port = 0x60 (** Aux device command buffer. *) let aux_cmd_port = 0x64 (** Send aux device data. *) let aux_cmd_send_data = 0xd4 (** Disable aux port. *) let aux_cmd_disable...
null
https://raw.githubusercontent.com/smimram/funk/88328dd9087c9097b1bfe2cf5394ba99fa631934/src/drivers/mouse.ml
ocaml
* Aux device input buffer. * Aux device output buffer. * Aux device command buffer. * Send aux device data. * Disable aux port. * Enable aux port. * Aux device status register. * Output buffer is full. * Input buffer is full. TODO: better exception
let kprintf f = Funk.kprintf "Mouse" f let aux_input_port = 0x60 let aux_output_port = 0x60 let aux_cmd_port = 0x64 let aux_cmd_send_data = 0xd4 let aux_cmd_disable = 0xa7 let aux_cmd_enable = 0xa8 let aux_status_port = 0x64 let out_buf_full_mask = 0x21 let in_buf_full_mask = 0x02 let write...
308f054ce059d92176114aca1a46d0b7a1c04a5a02eeac2cda508a7af5e9d9de
borgeby/jarl
bundle.cljs
(ns jarl.bundle) (defn extract-plan [_] (throw (ex-info "not yet implemented for cljs" {})))
null
https://raw.githubusercontent.com/borgeby/jarl/2659afc6c72afb961cb1e98b779beb2b0b5d79c6/core/src/main/cljs/jarl/bundle.cljs
clojure
(ns jarl.bundle) (defn extract-plan [_] (throw (ex-info "not yet implemented for cljs" {})))
a25777077b71d683d03f3f276c4f29036735280c5d64f3714e896482edfed0f0
project-oak/hafnium-verification
clang_ast_visit.ml
* Copyright ( c ) 2015 - present , Facebook , Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/facebook-clang-plugins/clang-ocaml/clang_ast_visit.ml
ocaml
return None to pass atd validation return None to pass atd validation return None to pass atd validation return None to pass atd validation
* Copyright ( c ) 2015 - present , Facebook , Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE ...
83397cc4e7c9e7013e4e8b4168236f18c9a5473d2aa8a05125b5c6fbf28cd435
manuel-serrano/bigloo
recette.scm
;*=====================================================================*/ ;* .../project/bigloo/bigloo/api/srfi18/recette/recette.scm */ ;* ------------------------------------------------------------- */ * Author : * / * Creation : Mon Feb ...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/0f084c24c651aaae81785d0766ed5ca8af543b77/api/srfi18/recette/recette.scm
scheme
*=====================================================================*/ * .../project/bigloo/bigloo/api/srfi18/recette/recette.scm */ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * A test module that depl...
* Author : * / * Creation : Mon Feb 4 14:28:58 2002 * / * Last change : Mon Nov 7 10:36:05 2022 ( serrano ) * / * Copyright : 2002 - 22 * / (module recette (library ...
3e9e612ee8cfd51475d6c83f5075e526672e5dd175d4abcbb6419cd6ad8df688
waymonad/waymonad
View.hs
waymonad A wayland compositor in the spirit of xmonad Copyright ( C ) 2017 This library is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your op...
null
https://raw.githubusercontent.com/waymonad/waymonad/18ab493710dd54c330fb4d122ed35bc3a59585df/src/Waymonad/View.hs
haskell
# SPECIALIZE INLINE moveView :: MonadIO m => View -> Int -> Int -> m () # | This should be called whenever the contained surface is resized. It will determine whether we should try and downscale it to fit the area, or position it somewhere inside the configured box, because it is *smaller* than the intended area b...
waymonad A wayland compositor in the spirit of xmonad Copyright ( C ) 2017 This library is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your op...
db939044fc0c6acabea91ea263b56de8bcb07f6351107710bbbd961f919927a4
alanz/ghc-exactprint
A.32.hs
# LANGUAGE ViewPatterns # # LANGUAGE TemplateHaskell # module A where import Language.Haskell.TH.Quote import Language.Haskell.TH foo :: QuasiQuoter foo = QuasiQuoter{quotePat = \s -> viewP [|(*2)|] (varP . mkName $ s)} bar :: QuasiQuoter bar = QuasiQuoter{quotePat = \_ -> [p|((*3) -> fixed_var)|] }
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc86/A.32.hs
haskell
# LANGUAGE ViewPatterns # # LANGUAGE TemplateHaskell # module A where import Language.Haskell.TH.Quote import Language.Haskell.TH foo :: QuasiQuoter foo = QuasiQuoter{quotePat = \s -> viewP [|(*2)|] (varP . mkName $ s)} bar :: QuasiQuoter bar = QuasiQuoter{quotePat = \_ -> [p|((*3) -> fixed_var)|] }
ac9f12a557b5021ed7002922c50b6480773e1baa6a8aad4611346df20939c94d
ifesdjeen/soundcloud-clj
rest.clj
(ns soundcloud-clj.rest (:refer-clojure :exclude [get]) (:use [soundcloud-clj.utils]) (:require [clj-http.client :as http] [clojure.data.json :as json])) (def ^:const throw-exceptions false) (defn POST [^String uri &{ :keys [body] :as options }] (io! (http/post uri (merge options { :acc...
null
https://raw.githubusercontent.com/ifesdjeen/soundcloud-clj/016c53b45f6132f0f0161f98538a93a568a34f59/src/soundcloud_clj/rest.clj
clojure
(ns soundcloud-clj.rest (:refer-clojure :exclude [get]) (:use [soundcloud-clj.utils]) (:require [clj-http.client :as http] [clojure.data.json :as json])) (def ^:const throw-exceptions false) (defn POST [^String uri &{ :keys [body] :as options }] (io! (http/post uri (merge options { :acc...
956dd38ceac7b5a0799e3f5ac2f53f63da28088692c821307319218836166ac0
pfdietz/ansi-test
stable-sort.lsp
;-*- Mode: Lisp -*- Author : ;;;; Created: Wed Aug 28 21:00:44 2002 ;;;; Contains: Tests for STABLE-SORT (in-package :cl-test) (deftest stable-sort-list.1 (let ((a (list 1 4 2 5 3))) (stable-sort a #'<)) (1 2 3 4 5)) (deftest stable-sort-list.2 (let ((a (list 1 4 2 5 3))) (stable-sort a #'<...
null
https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/sequences/stable-sort.lsp
lisp
-*- Mode: Lisp -*- Created: Wed Aug 28 21:00:44 2002 Contains: Tests for STABLE-SORT Bit vectors Order of evaluation tests Error cases
Author : (in-package :cl-test) (deftest stable-sort-list.1 (let ((a (list 1 4 2 5 3))) (stable-sort a #'<)) (1 2 3 4 5)) (deftest stable-sort-list.2 (let ((a (list 1 4 2 5 3))) (stable-sort a #'< :key #'-)) (5 4 3 2 1)) (deftest stable-sort-list.3 (let ((a (list 1 4 2 5 3))) (stable-sor...
ad073a5067751c2779c2446f329ccee61f27f960c9fdd9ba11953e061b7dc721
ferdinand-beyer/init
server.clj
(ns todo-app.server (:require [org.httpkit.server :as http])) (defn start-server {:init/tags [:init/daemon] :init/inject [:ring/handler [:get :app/config :port]]} [handler port] (http/run-server handler {:port port :legacy-return-value? false})) (defn stop-server {:init/stops ...
null
https://raw.githubusercontent.com/ferdinand-beyer/init/3e78e3b1f5a19cadc6516dee416d0ee0b2f401c9/examples/todo-app/src/todo_app/server.clj
clojure
(ns todo-app.server (:require [org.httpkit.server :as http])) (defn start-server {:init/tags [:init/daemon] :init/inject [:ring/handler [:get :app/config :port]]} [handler port] (http/run-server handler {:port port :legacy-return-value? false})) (defn stop-server {:init/stops ...
a9ee60ae524beadce2c76ed6de7165d3a7792464f09a06f1d1d9e1d7a0f78f89
ozusrl/SubtypedQuotedML
listSet.ml
(*********************************************************************************************************************) (* *) ...
null
https://raw.githubusercontent.com/ozusrl/SubtypedQuotedML/7b09eb5518dea21fda3dc9db3b966a17225d91ff/src/wallace/listSet.ml
ocaml
******************************************************************************************************************* ...
, projet Cristal , INRIA Rocquencourt Copyright 2000 Institut National de Recherche en Informatique et Automatique . Distributed only by per...
b7f8b9554cc181e84b7984d7c3290a22c71ed8b2e67cb028ab66ce0947780dc4
awakesecurity/spectacle
ModelTemporal.hs
{-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Language.Spectacle.Model.ModelTemporal Copyright : ( c ) Arista Networks , 2022 - 2023 License : Apache License 2.0 , see LICENSE -- -- Stability : stable Portability : non - portable ( GHC extensions ) -- -- TODO: docs -- -- @since ...
null
https://raw.githubusercontent.com/awakesecurity/spectacle/430680c28b26dabb50f466948180eb59ba72fc8e/src/Language/Spectacle/Model/ModelTemporal.hs
haskell
# OPTIONS_HADDOCK show-extensions # | Module : Language.Spectacle.Model.ModelTemporal Stability : stable TODO: docs @since 1.0.0 * Model Temporal Formulae ** Construction ---------------------------------------------------------------------------------------------------------------------
Copyright : ( c ) Arista Networks , 2022 - 2023 License : Apache License 2.0 , see LICENSE Portability : non - portable ( GHC extensions ) module Language.Spectacle.Model.ModelTemporal ModelTemporal (ModelTemporal), modelTemporalName, getModelTemporal, fromTemporalSpec, ) where ...
a45f9a3c3fd9fd6131abef4ad59aae4aaf2caeb11e440666e0ec024bc6d1ff6c
aryx/syncweb
refactor.mli
val rename_chunknames : Common.filename list -> unit val rename_chunknames_archi : Common.filename list -> unit val merge_files : Common.filename list -> unit
null
https://raw.githubusercontent.com/aryx/syncweb/8cc3f10599bf65ab57947950f30cb6b18d83db14/main/refactor.mli
ocaml
val rename_chunknames : Common.filename list -> unit val rename_chunknames_archi : Common.filename list -> unit val merge_files : Common.filename list -> unit
f6e32435245a25de65a8e52c7766ca8bfcbebf5ffed61df36050d3fa0208a788
backtracking/functory
cores.ml
(**************************************************************************) (* *) (* Functory: a distributed computing library for OCaml *) Copyright ( C ) 2010- and (* ...
null
https://raw.githubusercontent.com/backtracking/functory/75368305a853a90ebea9e306d82e4ef32649d1ce/cores.ml
ocaml
************************************************************************ Functory: a distributed computing library for OCaml This software is free soft...
Copyright ( C ) 2010- and modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking open Format open Control open Unix let run ~(create_job : 'worker -> 'task -> unit) ~(wait : unit -> 'worker * 'task list) ...
cffc907b1fcb82b5969cd1ebdeae978b7232529ee1745ba868f796a0ded30870
cnuernber/fast-json
fjson.clj
(ns fjson (:require [charred.api :as charred] [ham-fisted.api :as ham-fisted] [clojure.data.json :as clj-json] [jsonista.core :as jsonista] [criterium.core :as crit] [clojure.edn :as edn] [tech.viz.pyplot :as pyplot] [clojure.java.io ...
null
https://raw.githubusercontent.com/cnuernber/fast-json/480e1425a5f15bbcec4089239fd2a818cc6f84f0/src/fjson.clj
clojure
Also produces persistent datastructures is - turns out with latest charred this isn't much faster than mutable or hamf as the map keys are canonicalized. :charred-events (charred/parse-json-fn {:parser-fn (fn [] (let [data (ham-fisted/object-array-list)] {:array-iface (reify JSONReader$ArrayR...
(ns fjson (:require [charred.api :as charred] [ham-fisted.api :as ham-fisted] [clojure.data.json :as clj-json] [jsonista.core :as jsonista] [criterium.core :as crit] [clojure.edn :as edn] [tech.viz.pyplot :as pyplot] [clojure.java.io ...
599cff73ce8d8df3426a899475b2e9b285f5995e3ef3e93c176b2909f0f4c100
magehash/magehash
sign_out.clj
(ns auth.sign-out (:require [coast :refer [redirect url-for]])) (defn action [request] (-> (redirect (url-for :home)) (assoc :session nil)))
null
https://raw.githubusercontent.com/magehash/magehash/9545d65a10a570536f8c6d9ebbafc4982e07cedc/src/auth/sign_out.clj
clojure
(ns auth.sign-out (:require [coast :refer [redirect url-for]])) (defn action [request] (-> (redirect (url-for :home)) (assoc :session nil)))
a6e0d3a99e8e10346bfb68b2f70e59e2bf210bf26d43ee9bc9670ca64997d88e
tisnik/clojure-examples
core_test.clj
(ns matrixtest.core-test (:require [clojure.test :refer :all] [matrixtest.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/matrixtest/test/matrixtest/core_test.clj
clojure
(ns matrixtest.core-test (:require [clojure.test :refer :all] [matrixtest.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
d31ff465c048dfe1fb533a33d5e2e760dd34dba86063efe7d8cde225c090954c
nplab/m3ua-testtool
m3ua-sgp-tests.scm
;;; Copyright ( C ) 2004 , 2005 , 2006 ;;; ;;; 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 source code must retain the above ;;; copyright notice, t...
null
https://raw.githubusercontent.com/nplab/m3ua-testtool/bef5ca47423ea297b819d1d2b18de5df9d684e34/m3ua-sgp-tests.scm
scheme
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: copyright notice, this list of conditions and the following disclaimer. above copyright notice, this list of conditions and the fo...
Copyright ( C ) 2004 , 2005 , 2006 1 . Redistributions of source code must retain the above 2 . Redistributions in binary form must reproduce the 3 . Neither the name of the project nor the names of ` ` AS IS '' AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , DISCLAIMED . IN NO EVENT SHALL THE PROJ...
addd429deefdeab34d0eef588beb7dabf44a7cefdc032e47a969e960ffc8ad3a
ucsd-progsys/nate
Fold.ml
camlp4r (****************************************************************************) (* *) (* Objective Caml *) (* ...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/camlp4/Camlp4/Struct/Grammar/Fold.ml
ocaml
************************************************************************** Objective Caml ...
camlp4r Copyright 2006 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with the special $ I d : Fold.ml , v 1.3 2007/02/07 10:09:21 ertai Exp $ Authors : ...
398fb27be0dfcfb8a9a26c90ebf08583d52964ffa9556ec316254c2005a78c18
savonet/ocaml-posix
test.ml
open Ctypes open Posix_socket let () = Printf.printf "sizeof(socklen_t) = %d\n%!" (sizeof socklen_t) let from_ptr t ptr = from_voidp t (to_voidp ptr) let () = let inet_addr = Unix.inet_addr_of_string "0.0.0.1" in let sockaddr = from_unix_sockaddr (Unix.ADDR_INET (inet_addr, 80)) in Printf.printf "sockaddr.sa_fa...
null
https://raw.githubusercontent.com/savonet/ocaml-posix/d46d011de16154b34324eae6ee6e7010138cf4af/posix-socket/test/test.ml
ocaml
open Ctypes open Posix_socket let () = Printf.printf "sizeof(socklen_t) = %d\n%!" (sizeof socklen_t) let from_ptr t ptr = from_voidp t (to_voidp ptr) let () = let inet_addr = Unix.inet_addr_of_string "0.0.0.1" in let sockaddr = from_unix_sockaddr (Unix.ADDR_INET (inet_addr, 80)) in Printf.printf "sockaddr.sa_fa...
d7ad04fdb882d010fde61981f4b906edccbe1716e3e43d8209a1524fb9e26983
emmabastas/elm-embed
Docs.hs
# OPTIONS_GHC -Wall # # LANGUAGE BangPatterns , MultiWayIf , OverloadedStrings , UnboxedTuples # module Elm.Docs ( Documentation , Module(..) , fromModule , Union(..) , Alias(..) , Value(..) , Binop(..) , Binop.Associativity(..) , Binop.Precedence(..) , Error(..) , decoder , encode ) where ...
null
https://raw.githubusercontent.com/emmabastas/elm-embed/c2c4f9dcc5c4f47480f728247ff7b4d0700d7476/compiler/src/Elm/Docs.hs
haskell
DOCUMENTATION JSON UNION JSON ALIAS JSON VALUE JSON PRECEDENCE JSON FROM MODULE , ( ) \n @ d o c s CHECK NAMES CHECK DEFS GATHER TYPES
# OPTIONS_GHC -Wall # # LANGUAGE BangPatterns , MultiWayIf , OverloadedStrings , UnboxedTuples # module Elm.Docs ( Documentation , Module(..) , fromModule , Union(..) , Alias(..) , Value(..) , Binop(..) , Binop.Associativity(..) , Binop.Precedence(..) , Error(..) , decoder , encode ) where ...
09b5cc66c9736d14e4f77e6106fbe4546582639d774297f6e2563f6a6034d7bd
tnelson/Forge
basicSigs.rkt
#lang forge option run_sterling off option verbose 0 sig A {} sig B {} test expect sigsPopulate { singleSig : { some A } is sat doubleSig : { some A some B } is sat } test expect sigProperties { sigsDisjoint : { no A & B } is theorem -- sigsSpanUniv : { univ = A + B + Int } is theorem -- CURRENTLY...
null
https://raw.githubusercontent.com/tnelson/Forge/a7187ef110f46493c1d45011035b05646b9ccd22/forge/tests/forge/sigs/basicSigs.rkt
racket
#lang forge option run_sterling off option verbose 0 sig A {} sig B {} test expect sigsPopulate { singleSig : { some A } is sat doubleSig : { some A some B } is sat } test expect sigProperties { sigsDisjoint : { no A & B } is theorem -- sigsSpanUniv : { univ = A + B + Int } is theorem -- CURRENTLY...
a17bbc3ab8b8961c952834c729021c314af227a71123b1104a199c964835efad
fbeline/rooster
rooster_middleware.erl
-module(rooster_middleware). -behaviour(gen_server). -export([start_link/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3, enter/2, leave/2]). %%%=================================================================== %%% API %%%==============================...
null
https://raw.githubusercontent.com/fbeline/rooster/e8f4d4f1fe2fd901371361dd00f0cb64515424b0/src/rooster_middleware.erl
erlang
=================================================================== API =================================================================== =================================================================== gen_server callbacks =================================================================== =====================...
-module(rooster_middleware). -behaviour(gen_server). -export([start_link/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3, enter/2, leave/2]). start_link(State) -> gen_server:start_link({local, ?MODULE}, ?MODULE, State, []). enter(ReqResp, Names) -> di...
6016812c908f3aed2a645ccf0b3b67cd68cb610573425399cd6c18095dd33631
OCamlPro/alt-ergo
ocp_checker.ml
let remove_trailing_whitespaces line = let len = String.length line in let new_len = ref len in let loop = ref (!new_len > 0) in while !loop do let c = line.[!new_len - 1] in if c = ' ' || c = '\t' || c = '\r' then begin decr new_len; loop := !new_len > 0 end else loop :=...
null
https://raw.githubusercontent.com/OCamlPro/alt-ergo/291523151417f4cd112744d740b58ab1e8a630b4/rsc/extra/ocpchecker/ocp_checker.ml
ocaml
let remove_trailing_whitespaces line = let len = String.length line in let new_len = ref len in let loop = ref (!new_len > 0) in while !loop do let c = line.[!new_len - 1] in if c = ' ' || c = '\t' || c = '\r' then begin decr new_len; loop := !new_len > 0 end else loop :=...
91a0a34e451b335de1ad939d31c64e66fde8395aeb8e2dcfdbc88381734334cb
softwarelanguageslab/maf
R5RS_scp1_fringe-3.scm
; Changes: * removed : 0 * added : 1 * swaps : 0 ; * negated predicates: 0 ; * swapped branches: 0 ; * calls to id fun: 0 (letrec ((atom? (lambda (x) (not (pair? x)))) (fringe (lambda (l) (<change> () car) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_fringe-3.scm
scheme
Changes: * negated predicates: 0 * swapped branches: 0 * calls to id fun: 0
* removed : 0 * added : 1 * swaps : 0 (letrec ((atom? (lambda (x) (not (pair? x)))) (fringe (lambda (l) (<change> () car) (if (null? l) () (if (atom? l) ...
f521925c12a27130534374ec47abd1fc3267ae9eeeacb6b85335ce658dbeebb3
sunshineclt/Racket-Helper
04.rkt
#lang racket (define (average x y) (/ (+ x y) 2)) (define (iterative-improve good-enough improve) (define (improve-fun guess) (if (good-enough guess) guess (improve-fun (improve guess)))) improve-fun) (define (sqrt a) (define (gd x) (< (abs (- x (average x (/ a x)))) 0.0001)) (define ...
null
https://raw.githubusercontent.com/sunshineclt/Racket-Helper/bf85f38dd8d084db68265bb98d8c38bada6494ec/%E9%AA%86%E6%A2%81%E5%AE%B8/Assignment/2/04.rkt
racket
#lang racket (define (average x y) (/ (+ x y) 2)) (define (iterative-improve good-enough improve) (define (improve-fun guess) (if (good-enough guess) guess (improve-fun (improve guess)))) improve-fun) (define (sqrt a) (define (gd x) (< (abs (- x (average x (/ a x)))) 0.0001)) (define ...
381301ae03f3e87e1cb50d7dd2f5b13790faf731b3613123d0b8859c6371dbd5
ocaml-multicore/multicoretests
lin_tests_dsl_domain.ml
open Lin_tests_dsl_common (** This is a driver of the negative tests over the Domain module *) ;; QCheck_base_runner.run_tests_main (let count = 10000 in [RT_int_domain.neg_lin_test ~count ~name:"Lin DSL ref int test with Domain"; RT_int64_domain.neg_lin_test ~count ~name:"Lin DSL ref int64 test with Dom...
null
https://raw.githubusercontent.com/ocaml-multicore/multicoretests/3e0f2ceb72eaf334e97252140ae5d40bf6461b96/src/neg_tests/lin_tests_dsl_domain.ml
ocaml
* This is a driver of the negative tests over the Domain module
open Lin_tests_dsl_common ;; QCheck_base_runner.run_tests_main (let count = 10000 in [RT_int_domain.neg_lin_test ~count ~name:"Lin DSL ref int test with Domain"; RT_int64_domain.neg_lin_test ~count ~name:"Lin DSL ref int64 test with Domain"; CLT_int_domain.neg_lin_test ~count ~name:"Lin DSL CList i...
a0c320dee08842e83062df8ec251928f261245a00f06a62eaf40558f4a776fe4
justinmeiners/exercises
3_29.scm
(load "3_28.scm") ; or gate defined in terms of and and not ; I used a truth table to find this ~(~P^~Q ) (define (or-gate2 a1 a2 output) (let ((a (make-wire)) (b (make-wire)) (c (make-wire))) (inverter a1 a) (inverter a2 b) (and-gate a b c) (inverter c output) 'ok)) delay =...
null
https://raw.githubusercontent.com/justinmeiners/exercises/9491bc16925eae12e048ccd3f424b870ebdc73aa/sicp/3/3_29.scm
scheme
or gate defined in terms of and and not I used a truth table to find this
(load "3_28.scm") ~(~P^~Q ) (define (or-gate2 a1 a2 output) (let ((a (make-wire)) (b (make-wire)) (c (make-wire))) (inverter a1 a) (inverter a2 b) (and-gate a b c) (inverter c output) 'ok)) delay = I + A + I = 2I + A
db8ef40002174eed10633a1ef61b99ab2a64f80f4ef0e1911a972222fcf8d129
cmsc430/www
interp.rkt
#lang racket (provide interp interp-env interp-prim1) (require "ast.rkt" "env.rkt" "interp-prims.rkt") type Answer = Value | ' err ;; type Value = ;; | Integer ;; | Boolean ;; | Character ;; | Eof ;; | Void ;; | '() ;; | (cons Value Value) ;; | (box Value) ;; | (vector Value ...) | ( string ......
null
https://raw.githubusercontent.com/cmsc430/www/a3eb79587bd52c981841f5bdd29c70bf39fe658b/langs/hoax/interp.rkt
racket
type Value = | Integer | Boolean | Character | Eof | Void | '() | (cons Value Value) | (box Value) | (vector Value ...) Expr -> Answer
#lang racket (provide interp interp-env interp-prim1) (require "ast.rkt" "env.rkt" "interp-prims.rkt") type Answer = Value | ' err | ( string ... ) type REnv = ( ( List I d Value ) ) (define (interp e) (interp-env e '())) Answer (define (interp-env e r) (match e [(Int i) i]...
560d2f4a3d0ad79ff879fd22e8818fe35f59fa5af1595051b9f9a2238f0462b8
default-kramer/plisqin
tokens-custom-unsafe.rkt
#lang scribble/manual @(begin (provide custom-unsafe-docs) (require racket/require "tokens-helpers.rkt" "helpers.rkt" ) (require (for-label plisqin-lib/unsafe (prefix-in %% plisqin-lib/unsafe) plisqin-lib ...
null
https://raw.githubusercontent.com/default-kramer/plisqin/26421c7c42656c873c4e0a4fc7f48c0a3ed7770f/plisqin-doc/scribblings/tokens-custom-unsafe.rkt
racket
#lang scribble/manual @(begin (provide custom-unsafe-docs) (require racket/require "tokens-helpers.rkt" "helpers.rkt" ) (require (for-label plisqin-lib/unsafe (prefix-in %% plisqin-lib/unsafe) plisqin-lib ...
c98baef39cdcbdd3d9c2bc2f277e8ef04a9c8bf7425298321401dba171fd75b9
haskell-numerics/random-fu
DevRandom.hs
# LANGUAGE TemplateHaskell , MultiParamTypeClasses , GADTs # TemplateHaskell, MultiParamTypeClasses, GADTs #-} module Data.Random.Source.DevRandom ( DevRandom(..) ) where import Data.Random.Source import Foreign.Marshal (allocaBytes) import Foreign.Ptr (castPtr) import Foreign.Storable (peek...
null
https://raw.githubusercontent.com/haskell-numerics/random-fu/42c72183a65c429230ad9d006534f59a6b72a329/random-source/src/Data/Random/Source/DevRandom.hs
haskell
|On systems that have it, \/dev\/random is a handy-dandy ready-to-use source collects \"real\" entropy, and if you don't have a good source of it, such as special hardware for the purpose or a *lot* of network traffic, it's pretty easy to suck the entropy pool dry with entropy-intensive applications. For many pur...
# LANGUAGE TemplateHaskell , MultiParamTypeClasses , GADTs # TemplateHaskell, MultiParamTypeClasses, GADTs #-} module Data.Random.Source.DevRandom ( DevRandom(..) ) where import Data.Random.Source import Foreign.Marshal (allocaBytes) import Foreign.Ptr (castPtr) import Foreign.Storable (peek...
1d53261291b41ba66aafe7d2da42c8855a2179e5de4a04a6a627c1f53682347b
fractalide/fractalide
wallet.rkt
#lang racket (provide (contract-out [struct wallet ((name string?) (view symbol?) (addresses (listof string?)) (state-address symbol?) )])) (struct wallet (name view addresses ...
null
https://raw.githubusercontent.com/fractalide/fractalide/9c54ec2615fcc2a1f3363292d4eed2a0fcb9c3a5/modules/rkt/rkt-fbp/edges/cantor/wallet.rkt
racket
#lang racket (provide (contract-out [struct wallet ((name string?) (view symbol?) (addresses (listof string?)) (state-address symbol?) )])) (struct wallet (name view addresses ...
2ee45ed1a94835a1f55f2a3a162cc2af0fcdeb47e129d17161706bc100dc74a8
nyu-acsys/drift
a-init1.ml
(* USED: PLDI2011 as a-init *) let rec init idx tn (ia: int array) = if idx < 0 then init 0 tn ia else if idx >= tn then () else (Array.set ia idx 1; init (idx + 1) tn ia) let main (k(*-:{v:Int | true}*)) (n(*-:{v:Int | true}*)) (i(*-:{v:Int | true}*)) = if i >= k && i >= 0 && i < n then (let a =...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/DRIFT/array/a-init1.ml
ocaml
USED: PLDI2011 as a-init -:{v:Int | true} -:{v:Int | true} -:{v:Int | true}
let rec init idx tn (ia: int array) = if idx < 0 then init 0 tn ia else if idx >= tn then () else (Array.set ia idx 1; init (idx + 1) tn ia) if i >= k && i >= 0 && i < n then (let a = Array.make n 0 in init k n a; let item = Array.get a i in assert(item >= 1)) else () ...
ef989050545eddc91e9894225182010053eb14e0e39c6b3c72465c56feb7f355
deadpendency/deadpendency
LanguageDependencyFiles.hs
module DD.Effect.DetermineDependencies.Backend.Model.LanguageDependencyFiles ( LanguageDependencyFiles (..), ) where import Common.Aeson.Aeson import Common.Model.Dependency.File.DependenciesFileLoad import Data.Aeson import Data.Vector.NonEmpty qualified as NV newtype LanguageDependencyFiles = LanguageDependency...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/dependency-determiner/src/DD/Effect/DetermineDependencies/Backend/Model/LanguageDependencyFiles.hs
haskell
module DD.Effect.DetermineDependencies.Backend.Model.LanguageDependencyFiles ( LanguageDependencyFiles (..), ) where import Common.Aeson.Aeson import Common.Model.Dependency.File.DependenciesFileLoad import Data.Aeson import Data.Vector.NonEmpty qualified as NV newtype LanguageDependencyFiles = LanguageDependency...
ee0153b3476014dd980b8dcc3c92afabdd4f91acf8ae193ca4c60fc3f9af18f1
LightTable/LightTable
sidebar.cljs
(ns lt.objs.sidebar "Provide sidebar (left bar) and rightbar objects" (:require [lt.object :as object] [lt.objs.tabs :as tabs] [lt.objs.command :as cmd] [lt.objs.animations :as anim] [lt.objs.canvas :as canvas] [lt.util.dom :as dom] [lt.util.cl...
null
https://raw.githubusercontent.com/LightTable/LightTable/3b36b7bbf3737e1fdace5beb72b92f2d5fbe01e7/src/lt/objs/sidebar.cljs
clojure
(ns lt.objs.sidebar "Provide sidebar (left bar) and rightbar objects" (:require [lt.object :as object] [lt.objs.tabs :as tabs] [lt.objs.command :as cmd] [lt.objs.animations :as anim] [lt.objs.canvas :as canvas] [lt.util.dom :as dom] [lt.util.cl...
7f3788dd2e900c4d018bb309f69d2d447fdada0b7101f7977a0097e65b5007e0
kupl/FixML
sub8.ml
type heap = EMPTY | NODE of rank * value * heap * heap and rank = int and value = int exception EmptyHeap let rank h = match h with | EMPTY -> -1 | NODE(r,_,_,_) -> r let shake (x,lh,rh) = if (rank lh) >= (rank rh) then NODE(rank rh+1, x, lh, rh) else NODE(rank lh+1, x, rh, lh) le...
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/priority_queue/priority_queue/submissions/sub8.ml
ocaml
type heap = EMPTY | NODE of rank * value * heap * heap and rank = int and value = int exception EmptyHeap let rank h = match h with | EMPTY -> -1 | NODE(r,_,_,_) -> r let shake (x,lh,rh) = if (rank lh) >= (rank rh) then NODE(rank rh+1, x, lh, rh) else NODE(rank lh+1, x, rh, lh) le...
56bfc3b1a2a3a39ef4162e54dc49ff8208b0df4e9b92963634cb6b1f828f33ef
bscarlet/llvm-general
BinaryOperator.hs
{-# LANGUAGE ForeignFunctionInterface, MultiParamTypeClasses, UndecidableInstances #-} | FFI functions for handling the LLVM BinaryOperator class module LLVM.General.Internal.FFI.BinaryOperator where import LLVM.General.Prelude import Foreign.Ptr import Foreign.C import LLVM.General.Internal.FFI.PtrHierarc...
null
https://raw.githubusercontent.com/bscarlet/llvm-general/61fd03639063283e7dc617698265cc883baf0eec/llvm-general/src/LLVM/General/Internal/FFI/BinaryOperator.hs
haskell
# LANGUAGE ForeignFunctionInterface, MultiParamTypeClasses, UndecidableInstances #
| FFI functions for handling the LLVM BinaryOperator class module LLVM.General.Internal.FFI.BinaryOperator where import LLVM.General.Prelude import Foreign.Ptr import Foreign.C import LLVM.General.Internal.FFI.PtrHierarchy import LLVM.General.Internal.FFI.LLVMCTypes foreign import ccall unsafe "LLVMIsABinaryOpera...
f372d3938d3db15494b4e7ea83583ca7fafd46d58b38b310e130a848555a5833
acieroid/scala-am
deriv.scm
;;; DERIV -- Symbolic derivation. ;;; Returns the wrong answer for quotients. ;;; Fortunately these aren't used in the benchmark. (define (deriv a) (cond ((not (pair? a)) (if (eq? a 'x) 1 0)) ((eq? (car a) '+) (cons '+ (map deriv (cdr a)))) ((eq? (car a) '-) ...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/gambit/deriv.scm
scheme
DERIV -- Symbolic derivation. Returns the wrong answer for quotients. Fortunately these aren't used in the benchmark.
(define (deriv a) (cond ((not (pair? a)) (if (eq? a 'x) 1 0)) ((eq? (car a) '+) (cons '+ (map deriv (cdr a)))) ((eq? (car a) '-) (cons '- (map deriv (cdr a)))) ((eq? (car a) '*) (list '* a (cons '...
ec89fa86c04f45c4ace79227913ae5de87270a22a7dd88b70b0f08697948c535
parof/wstat
Atomic.hs
module Semantic.Atomic where import SyntacticStructure.WhileGrammar data AtomicAssign = AtomicAssign String AExpr deriving Show data AtomicCond = AtomicCond BArithmeticBinOperator AExpr AExpr deriving Show
null
https://raw.githubusercontent.com/parof/wstat/369cf5d1d92ef235049c29ad2f1cc6fd53747754/src/Semantic/Atomic.hs
haskell
module Semantic.Atomic where import SyntacticStructure.WhileGrammar data AtomicAssign = AtomicAssign String AExpr deriving Show data AtomicCond = AtomicCond BArithmeticBinOperator AExpr AExpr deriving Show
7c46a072e9a2d0a91d10c871dcd6d9be05b1d48aeda18eb90ecfb7832574004d
uim/sigscheme
test-bool.scm
#! /usr/bin/env sscm -C UTF-8 -*- buffer - file - coding - system : utf-8 -*- ;; Filename : test-bool.scm ;; About : unit tests for boolean ;; Copyright ( C ) 2006 YAMAMOTO Kengo < yamaken AT > Copyright ( c ) 2007 - 2008 SigScheme Project < uim - en AT googlegroups.com > ;; ;; All rights reserved. ;; ;...
null
https://raw.githubusercontent.com/uim/sigscheme/ccf1f92d6c2a0f45c15d93da82e399c2a78fe5f3/test/test-bool.scm
scheme
Filename : test-bool.scm About : unit tests for boolean 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, t...
#! /usr/bin/env sscm -C UTF-8 -*- buffer - file - coding - system : utf-8 -*- Copyright ( C ) 2006 YAMAMOTO Kengo < yamaken AT > Copyright ( c ) 2007 - 2008 SigScheme Project < uim - en AT googlegroups.com > 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary...
05cce1f4ddd351ab3a285aee46078514bae2347ecafe70f8ce4a4d93fb00b8cf
finnishtransportagency/harja
info.clj
(ns harja.kyselyt.info (:require [jeesql.core :refer [defqueries]])) (defqueries "harja/kyselyt/info.sql" {:positional? true})
null
https://raw.githubusercontent.com/finnishtransportagency/harja/cdd0f1cfdf0c66de83a0f1a7f23d9b4701691ebe/src/clj/harja/kyselyt/info.clj
clojure
(ns harja.kyselyt.info (:require [jeesql.core :refer [defqueries]])) (defqueries "harja/kyselyt/info.sql" {:positional? true})
9d8d11ac3b17bee716504ebf3eb41d6c7c4675e405b67bd52b2c4e6e8979ba48
racketscript/racketscript
begin0.rkt
#lang racket (define x 0) (begin0 x (set! x (add1 x)) (set! x (add1 x)) (add1 x))
null
https://raw.githubusercontent.com/racketscript/racketscript/f94006d11338a674ae10f6bd83fc53e6806d07d8/tests/basic/begin0.rkt
racket
#lang racket (define x 0) (begin0 x (set! x (add1 x)) (set! x (add1 x)) (add1 x))
f3f32dd59af01becb873149620ecddd4d7d0ad29f52fd0639abd0bd66f8f37f8
polysemy-research/polysemy
FixpointSpec.hs
# LANGUAGE TemplateHaskell # # LANGUAGE RecursiveDo # module FixpointSpec where import Data.Functor.Identity import Control.Exception (evaluate) import Control.Monad.Fix import Polysemy import Polysemy.Fixpoint import Polysemy.Error import Polysemy.State import Polysemy.Output import Test.Hspec data FinalState s m ...
null
https://raw.githubusercontent.com/polysemy-research/polysemy/43a67061fb2a6cd2f545c5bd5e8320f2a228fb6b/test/FixpointSpec.hs
haskell
# LANGUAGE TemplateHaskell # # LANGUAGE RecursiveDo # module FixpointSpec where import Data.Functor.Identity import Control.Exception (evaluate) import Control.Monad.Fix import Polysemy import Polysemy.Fixpoint import Polysemy.Error import Polysemy.State import Polysemy.Output import Test.Hspec data FinalState s m ...
07946dbd5616e2b528aade3402f0d2f5cc0ca5d74f5247fecf8f6c83899fef56
reanimate/reanimate
doc_pauseAtEnd.hs
#!/usr/bin/env stack -- stack runghc --package reanimate module Main(main) where import Reanimate import Reanimate.Builtin.Documentation main :: IO () main = reanimate $ docEnv $ pauseAtEnd 1 drawProgress
null
https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/doc_pauseAtEnd.hs
haskell
stack runghc --package reanimate
#!/usr/bin/env stack module Main(main) where import Reanimate import Reanimate.Builtin.Documentation main :: IO () main = reanimate $ docEnv $ pauseAtEnd 1 drawProgress
09052ba4ffa3450a73204fd57e577337ec1266e5378c441495f8f467af4ff2e4
Eduap-com/WordMat
dsrckr.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $...
null
https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/odepack/src/dsrckr.lisp
lisp
Compiled by f2cl version: Using Lisp CMU Common Lisp snapshot-2013-11 (20E Unicode) Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format single-float))
( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl6.l , v 1d5cbacbb9...
a611964e9b41d96366b164d4414f413e1b0834c1cabfcc9564e2472181b5322c
dtgoitia/civil-autolisp
ManholeSchedule7Edition.lsp
(defun c:xx () ; Trigger (DT:AutoLoadFileFromCivilTemp "ManholeSchedule7Edition.lsp") (c:test) v0.0 - _ DATE _ - First issue Author : ; Last revision: _DATE_ ) (defun c:MSCS7 ( / ss manholeData manholeScheduleAttributes ) MSCS for Sewers for Adoption 7th Edition ( SfA7 ) (princ "\nSewers for Adoptio...
null
https://raw.githubusercontent.com/dtgoitia/civil-autolisp/72d68139d372c84014d160f8e4918f062356349f/Dump%20folder/ManholeSchedule7Edition.lsp
lisp
Trigger Last revision: _DATE_ END if END if END if END foreach END if v0.0 - 2017.08.01 - First issue calculated based on the SfA7 criteria END subcond END subcond END cond END lambda END mapcar Get cover level Get the smallest depth to soffit Depth soffit for all pipes Cover level Invert level Pipe diameter ...
(defun c:xx () (DT:AutoLoadFileFromCivilTemp "ManholeSchedule7Edition.lsp") (c:test) v0.0 - _ DATE _ - First issue Author : ) (defun c:MSCS7 ( / ss manholeData manholeScheduleAttributes ) MSCS for Sewers for Adoption 7th Edition ( SfA7 ) (princ "\nSewers for Adoption 7th Edition\nSelect manhole schedule...
84e1300a56c2a185fecacc5ffa4c2fa10de09a5786b57b8781155f9a78958026
expipiplus1/orbits
QuickCheck.hs
# OPTIONS_GHC -fno - warn - orphans # module Linear.QuickCheck () where import Linear.V3 import Test.QuickCheck import Test.QuickCheck.Checkers ( EqProp(..) ) instance (EqProp a) => EqProp (V3 a) where (V3 x1 x2 x3) =-= (V3 y1 y2 y...
null
https://raw.githubusercontent.com/expipiplus1/orbits/6cc5c43f50aadc7517a6677ca04363b492474a6a/test/Linear/QuickCheck.hs
haskell
# OPTIONS_GHC -fno - warn - orphans # module Linear.QuickCheck () where import Linear.V3 import Test.QuickCheck import Test.QuickCheck.Checkers ( EqProp(..) ) instance (EqProp a) => EqProp (V3 a) where (V3 x1 x2 x3) =-= (V3 y1 y2 y...
368d7306d4a6ce776a27891061e3cb010e2342eaa5fc894d2a881ea8386ed933
ucsd-progsys/liquidhaskell
Stacks.hs
{-@ LIQUID "--expect-any-error" @-} module Stacks () where {-@ type DList a = [a]<{\fld v -> (v != fld)}> @-} @ data Stack a = St { focus : : a , up : : DList { v : a | v ! = focus } , down : : DList { v : a | v ! = focus } } @ ...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/Stacks.hs
haskell
@ LIQUID "--expect-any-error" @ @ type DList a = [a]<{\fld v -> (v != fld)}> @ All of the below violate the invariant, get liquid to say so! @ bad0 :: a -> Stack a @ @ bad1 :: a -> Stack a @ @ bad2 :: Int -> Stack Int @ @ bad3 :: Int -> Stack Int @
module Stacks () where @ data Stack a = St { focus : : a , up : : DList { v : a | v ! = focus } , down : : DList { v : a | v ! = focus } } @ , up :: DList {v: a | v != focus} , dow...
7327e704da03f7b80cac1a851b3aab4caaed0eb054a08838ae06bf7b2bdbe1c7
alphaHeavy/llvm-general-typed
Bitcast.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module LLVM.General.Typed.Instructions.Bitcast ( bitcast ) where import Data.Proxy import qualified LLVM.General.AST as AST import qualified LLVM.General.AST.Constant as Constant import LLVM.Gener...
null
https://raw.githubusercontent.com/alphaHeavy/llvm-general-typed/75c39111f7fc685aacb3eaf1b2948451e7222e0b/llvm-general-typed-pure/src/LLVM/General/Typed/Instructions/Bitcast.hs
haskell
# LANGUAGE RankNTypes # | ^ Source value ^ Result
# LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module LLVM.General.Typed.Instructions.Bitcast ( bitcast ) where import Data.Proxy import qualified LLVM.General.AST as AST import qualified LLVM.General.AST.Constant as Constant import LLVM.General.Typed.BasicBlock import L...
1b5037fb133420c3b59f459d4a78a7a51ea174cf15d76dc17024f23fa058a317
reborg/clojure-essential-reference
3.clj
(def work-dir (file-seq (java.io.File. "."))) (def abstract-path (file-seq (java.io.File. ""))) (def non-existent (file-seq (java.io.File. "NONE"))) < 1 > ;; "/Users/reborg/book/." (count work-dir) 5110 < 2 > " /Users / reborg / book " (count abstract-path) 1 (.getAbsolutePath (first non-existent)) ; <3> ...
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Sequences/OtherGenerators/file-seq/3.clj
clojure
"/Users/reborg/book/." <3>
(def work-dir (file-seq (java.io.File. "."))) (def abstract-path (file-seq (java.io.File. ""))) (def non-existent (file-seq (java.io.File. "NONE"))) < 1 > (count work-dir) 5110 < 2 > " /Users / reborg / book " (count abstract-path) 1 " /Users / reborg / book / NONE " (count abstract-path) 1
21e04b271700cf519cda9f4d0ed4b4b5ebf191c632e7e7e42dd12549533cb52d
nikodemus/sb-daemon
package.lisp
By Nikodemus Siivola < > , 2011 . ;;;; ;;;; Permission is hereby granted, free of charge, to any person ;;;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , ;;;; including without limitation the rights to use, copy, modify, m...
null
https://raw.githubusercontent.com/nikodemus/sb-daemon/6e9804fcb365fdf45de091d337757416c940821c/package.lisp
lisp
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files including without limitation the rights to use, copy, modify, merge, subject to the following conditions: EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF IN NO EVEN...
By Nikodemus Siivola < > , 2011 . ( the " Software " ) , to deal in the Software without restriction , publish , distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do so , THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ...
f1dc3d0e3e8a5b3aac3c7e56d8a540ccc4362fd5c13484f316bc07ef0bd27e37
footprintanalytics/footprint-web
session_test.clj
(ns metabase.server.middleware.session-test (:require [clojure.string :as str] [clojure.test :refer :all] [environ.core :as env] [java-time :as t] [metabase.api.common :refer [*current-user* *current-user-id*]] [metabase.config :as config] [metab...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/server/middleware/session_test.clj
clojure
Default value if request is an HTTPS request then we should set `:secure true`. There are several different headers we check for this. Make sure they all work. ------------------------------------- tests for full-app embedding sessions -------------------------------------- ----------------------------------------...
(ns metabase.server.middleware.session-test (:require [clojure.string :as str] [clojure.test :refer :all] [environ.core :as env] [java-time :as t] [metabase.api.common :refer [*current-user* *current-user-id*]] [metabase.config :as config] [metab...
d97d4168df82163c714f2c04ca12420ff0411c4e0d73e42bea1dc38ba837099f
earl-ducaine/cl-garnet
interactors.lisp
-*- Mode : LISP ; Syntax : Common - Lisp ; Package : LAPIDARY ; Base : 10 -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; The Garnet User Interface Development Environment . ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; This code was writ...
null
https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/lapidary/interactors.lisp
lisp
Syntax : Common - Lisp ; Package : LAPIDARY ; Base : 10 -*- ; ; This code was written as part of the Garnet project at ;;; ; ; domain. ;;; This file provides the functions that handle the action buttons in the interactor menus ===============...
$ Id$ (in-package "LAPIDARY") (defun get-start-where (queue inter) (let ((start-where (assoc :start-where queue))) (if start-where (cdr start-where) (g-value inter :start-where)))) (defun garnet-inter-p (inter) (or (eq inter lapidary-button-interactor) (eq inter lapidary-menu-interacto...
220673dadc55f4c5f1400469509d31f033d24911def63f082b625a2a529f4278
nyu-acsys/drift
odd_even.ml
(* Revised From: jayhorn/benchmarks SatHanoi01_true.java *) let rec is_odd on = if on = 0 then false else if on = 1 then true else is_odd (on - 2) let rec is_even en = if en = 0 then true else if en = 1 then false else is_even (en - 2) let main_p (n:int) = if n > 0 then if n mod 2 = 0 then ...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks_call/DRIFT/first/odd_even.ml
ocaml
Revised From: jayhorn/benchmarks SatHanoi01_true.java
let rec is_odd on = if on = 0 then false else if on = 1 then true else is_odd (on - 2) let rec is_even en = if en = 0 then true else if en = 1 then false else is_even (en - 2) let main_p (n:int) = if n > 0 then if n mod 2 = 0 then assert(is_even n) else if n mod 2 = 1 then ...
3d71f041c4f1d7282f62f4d5bb3051663d3098d746ccf654e2847fb55e211b6f
CSCfi/rems
health.clj
(ns rems.api.health (:require [compojure.api.sweet :refer :all] [rems.common.git :as git] [rems.db.events :as events] [ring.util.http-response :refer :all] [schema.core :as s]) (:import org.joda.time.DateTime)) (s/defschema Health {:healthy s/Bool :version (s/ma...
null
https://raw.githubusercontent.com/CSCfi/rems/644ef6df4518b8e382cdfeadd7719e29508a26f0/src/clj/rems/api/health.clj
clojure
unhealthy statuses are currently reported via exceptions, i.e. non-200 status codes
(ns rems.api.health (:require [compojure.api.sweet :refer :all] [rems.common.git :as git] [rems.db.events :as events] [ring.util.http-response :refer :all] [schema.core :as s]) (:import org.joda.time.DateTime)) (s/defschema Health {:healthy s/Bool :version (s/ma...
6b76974fb4be330c37d337ff90214e30f8929ab9da127ceb8037c834645a8d19
nitrogen/nitrogen
nitrogen_main_handler.erl
%% vim: ts=4 sw=4 et -module(nitrogen_main_handler). -export([ run/0, ws_init/0 ]). handlers() -> %% Put any custom handlers here %% See %% Example: %% nitrogen : handler(MySecurityHandler , HandlerConfig ) , %% %% %% The following enables the debug_crash_handler for developmen...
null
https://raw.githubusercontent.com/nitrogen/nitrogen/7b39d2976c2b77e1b92bc026e14068d1e1017c73/rel/overlay/common/site/src/nitrogen_main_handler.erl
erlang
vim: ts=4 sw=4 et Put any custom handlers here See Example: The following enables the debug_crash_handler for development. If you wish to use the default_crash_handler, which just spits out "Internal Server Error", comment or delete this next line.
-module(nitrogen_main_handler). -export([ run/0, ws_init/0 ]). handlers() -> nitrogen : handler(MySecurityHandler , HandlerConfig ) , nitrogen:handler(debug_crash_handler, []), ok. ws_init() -> handlers(). run() -> handlers(), wf_core:run().
2d58553ab1adedbc4f64929bba2a274a4bf0e2972f407d8244d9bd0d8a669c0d
5HT/ant
ParLayout.ml
open XNum; open Unicode.Types; open Runtime; open Logging; open Dim; open Substitute; open FontMetric; open Box; value tracing_line_breaks = ref False; value num_100 = num_of_int 100; value num_13 = num_of_int 13; value num_m13 = num_of_int (-13); value num_m1 = num_of_int (-1); value num_1_2 = num_of_ints 1 2; t...
null
https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Typesetting/ParLayout.ml
ocaml
int -> int -> lines wider than their stretchability list of break_points index into the list of boxes number of the previous break point the number of the line before the break point fitness of this break is this break poi...
open XNum; open Unicode.Types; open Runtime; open Logging; open Dim; open Substitute; open FontMetric; open Box; value tracing_line_breaks = ref False; value num_100 = num_of_int 100; value num_13 = num_of_int 13; value num_m13 = num_of_int (-13); value num_m1 = num_of_int (-1); value num_1_2 = num_of_ints 1 2; t...
7a31defc9ea4c383694d015930ec7b05a5d2d10b3a0bf5ecf1a7fb94f2632d31
linoscope/okasaki-book-ocaml
trie.ml
module Make (M : Finite_map_intf.S) = struct type key = M.key list type 'a t = Node of 'a option * 'a t M.t let empty = Node (None, M.empty) let rec lookup t ~key = match key, t with | [], Node (None, _) -> raise Not_found | [], Node (Some x, _) -> x | x::xs, Node (_, m) -> let t' = M.l...
null
https://raw.githubusercontent.com/linoscope/okasaki-book-ocaml/04b299fb978c75a0c4da5991dc187fef2e91d9cb/src/ch10/trie.ml
ocaml
module Make (M : Finite_map_intf.S) = struct type key = M.key list type 'a t = Node of 'a option * 'a t M.t let empty = Node (None, M.empty) let rec lookup t ~key = match key, t with | [], Node (None, _) -> raise Not_found | [], Node (Some x, _) -> x | x::xs, Node (_, m) -> let t' = M.l...
eae0b9ab7086ea9b72eca2dc25b85b1ff69a13313f36d8e5312f998908cffe72
alephcloud/hs-configuration-tools
Example.hs
-- ------------------------------------------------------ -- Copyright © 2014 AlephCloud Systems , Inc. -- ------------------------------------------------------ -- # LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE UnicodeSyntax # module Exam...
null
https://raw.githubusercontent.com/alephcloud/hs-configuration-tools/987cc513206b76ad9e7426c33713a659d28229ae/examples/Example.hs
haskell
------------------------------------------------------ -- ------------------------------------------------------ -- # LANGUAGE OverloadedStrings # * Authentication * Http URL * main functions This assumes usage of cabal with custom Setup.hs | Specification of the authentication section of a URL. Define Lenses...
Copyright © 2014 AlephCloud Systems , Inc. # LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE UnicodeSyntax # module Example ( Auth(..) , user , pwd , defaultAuth , validateAuth , pAuth , HttpURL(..) , auth , domain , path , defaultHttpURL , validateHttpURL , pHttpURL , mai...
c92209b3c22f786d77d1daf10fcbf426889d41844ef68355124cc0ca34aefb45
jwiegley/trade-journal
Closings.hs
# LANGUAGE BlockArguments # # LANGUAGE DataKinds # module Closings where import Control.Lens hiding (each) import Hedgehog hiding (Action) import qualified Hedgehog.Gen as Gen import Journal.Closings import Journal.Entry import Journal.Types import Test.Tasty import Test.Tasty.Hedgehog import TestAction testClosings...
null
https://raw.githubusercontent.com/jwiegley/trade-journal/a355547e2396c82e3c410ef7e403d94f0b6e1b0a/tests/Journal/Closings.hs
haskell
# LANGUAGE BlockArguments # # LANGUAGE DataKinds # module Closings where import Control.Lens hiding (each) import Hedgehog hiding (Action) import qualified Hedgehog.Gen as Gen import Journal.Closings import Journal.Entry import Journal.Types import Test.Tasty import Test.Tasty.Hedgehog import TestAction testClosings...
7eb0a86e201893285671b511d129a95b7c907ef1b011b822a81b92f45cfc565e
TrustInSoft/tis-kernel
ast.ml
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/qed/top/ast.ml
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of WP plug - in of Frama - C. Copyright ( C ) 2007 - 2015 ...
30461bd749e51ef513a7c79c836cee1afa28a0e8cbdd196c9136362360a4a751
cram2/cram
flat.lisp
Regression test FLAT for GSLL , automatically generated ;; Copyright 2009 Distributed under the terms of the GNU General Public License ;; ;; 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 Foundatio...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/flat.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 Publi...
Regression test FLAT for GSLL , automatically generated Copyright 2009 Distributed under the terms of the GNU General Public License 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 ...
a2731be34fa30f44fa4da0b25a8f4f784a90ef2e9bc40986dc4996bc0065cafc
dimovich/roll
httpkit.clj
(ns roll.httpkit (:require [taoensso.timbre :refer [info]] [integrant.core :as ig] [org.httpkit.server :as httpkit] [roll.handler :refer [get-default-handler]] [roll.util :as u])) (defmethod ig/prep-key :roll/httpkit [_ config] ;; make sure we have a handler (me...
null
https://raw.githubusercontent.com/dimovich/roll/75f74cc06ff86d722c1344d5b31ef915f4480532/src/clj/roll/httpkit.clj
clojure
make sure we have a handler
(ns roll.httpkit (:require [taoensso.timbre :refer [info]] [integrant.core :as ig] [org.httpkit.server :as httpkit] [roll.handler :refer [get-default-handler]] [roll.util :as u])) (defmethod ig/prep-key :roll/httpkit [_ config] (merge {:handler (ig/ref :roll/handl...
2ca4fc9bcb1381780183608b88bbbbdecdba90a6590c26a0b5029aac19d6abe0
besport/ocaml-aliases
ptree.mli
* This file is part of Ocaml - aliases . * * is free software : you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation . * * is distributed in the hope that it will be useful , * but WITHOUT ANY WAR...
null
https://raw.githubusercontent.com/besport/ocaml-aliases/70493e6957b58fd0cbf5d32d1e9b2531d7c6ce60/src/ptree.mli
ocaml
* type of the imperative radix tree * [clear t] clears the radix tree [t] * [remote tree str v] remove the key [str] with value [v] from the tree [tree] * [fold tree str f a] fold over bindings in [tree] that matching [str] prefix. The boolean indicate whether or not the fold should be stopped even if mo...
* This file is part of Ocaml - aliases . * * is free software : you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation . * * is distributed in the hope that it will be useful , * but WITHOUT ANY WAR...
d7452cd5c9a2a19ad33f69b49e6d6ac7198cf80d500584b07e3f8386ea7ac4d3
well-typed/optics
Product.hs
# LANGUAGE CPP # {-# LANGUAGE TemplateHaskellQuotes #-} module Optics.TH.Internal.Product ( LensRules(..) , FieldNamer , DefName(..) , ClassyNamer , makeFieldOptics , makeFieldOpticsForDec , makeFieldOpticsForDec' , makeFieldLabelsWith , makeFieldLabelsForDec , HasFieldClasses ) where import Cont...
null
https://raw.githubusercontent.com/well-typed/optics/ba3c5a4d2f110c82238bc2fe7bb187023ab516f5/optics-th/src/Optics/TH/Internal/Product.hs
haskell
# LANGUAGE TemplateHaskellQuotes # ---------------------------------------------------------------------- ---------------------------------------------------------------------- ---------------------------------------------------------------------- ---------------------------------------------------------------------- ...
# LANGUAGE CPP # module Optics.TH.Internal.Product ( LensRules(..) , FieldNamer , DefName(..) , ClassyNamer , makeFieldOptics , makeFieldOpticsForDec , makeFieldOpticsForDec' , makeFieldLabelsWith , makeFieldLabelsForDec , HasFieldClasses ) where import Control.Monad import Control.Monad.State im...
abadb67865ef7812b90ed73217de4c6a54419657813af6df8abe328ae1c37a8d
commercialhaskell/stack
BuildParser.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module Stack.Options.BuildParser ( buildOptsParser , flagsParser , targetsParser ) where import qualified Data.Map as Map import Options.Applicative import Options.Applicative.Args import Options.Applicative.Builde...
null
https://raw.githubusercontent.com/commercialhaskell/stack/c09fd4fd7c2b350130cc611677c148ef1a22e6f5/src/Stack/Options/BuildParser.hs
haskell
# LANGUAGE OverloadedStrings # | Parser for CLI-only build arguments file-watch, but polling the filesystem instead of \
# LANGUAGE NoImplicitPrelude # module Stack.Options.BuildParser ( buildOptsParser , flagsParser , targetsParser ) where import qualified Data.Map as Map import Options.Applicative import Options.Applicative.Args import Options.Applicative.Builder.Extra import Stack.Opti...
934a476c4c2c28a57fba1944b5e3574fdbfc27df2ad880fd2b694e7952cedc87
awgn/git-prompt
Main.hs
-- Copyright ( c ) 2011 < > -- -- 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 distribute...
null
https://raw.githubusercontent.com/awgn/git-prompt/efa1e7eaf1ee9b1ee0214ae140d69554bf787221/src/Main.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 ) 2011 < > 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 - 1307 , US...
68d159462c04bda28e8276387ff5a637f89e8a8eff3f604183348411f0ad82e8
sweirich/trellys
Terms.hs
module Terms where import Text.Parsec.Pos(SourcePos,newPos) import qualified Text.PrettyPrint.HughesPJ as PP import Text.PrettyPrint.HughesPJ(Doc,text,int,(<>),(<+>),($$),($+$),render) import Data.List((\\),union,unionBy) import Names import BaseTypes import Syntax import Value import Types(patBinds ) import Con...
null
https://raw.githubusercontent.com/sweirich/trellys/63ea89d8fa09929c23504665c55a3d909fe047c5/nax/src/Terms.hs
haskell
------------------------------------------------------------- How to deal with N-tuples Form a Pat like (x,y:ys) > ( x,(y,(z , w ) ) ) Making Patterns and Expressions ca n't match against lists , this implies use of ' out ' can't match against lists, this implies use of 'out' can't match against lists, this imp...
module Terms where import Text.Parsec.Pos(SourcePos,newPos) import qualified Text.PrettyPrint.HughesPJ as PP import Text.PrettyPrint.HughesPJ(Doc,text,int,(<>),(<+>),($$),($+$),render) import Data.List((\\),union,unionBy) import Names import BaseTypes import Syntax import Value import Types(patBinds ) import Con...
dc59f2000ee65ae3c8b6e6fd53cc3bd27bbd31648d58cf32eaa1e72d0fbaa067
cgrand/sjacket
project.clj
(defproject net.cgrand/sjacket "0.1.1" :description "Structural code transformations for the masses." :url "/" :license {:name "Eclipse Public License 1.0"} :dependencies [[org.clojure/clojure "[1.3.0,)"] [net.cgrand/regex "1.1.0"] [net.cgrand/parsley "0.9.2"]])
null
https://raw.githubusercontent.com/cgrand/sjacket/4aa60211cfac0268aa4faa6c3955d48d00c5436d/project.clj
clojure
(defproject net.cgrand/sjacket "0.1.1" :description "Structural code transformations for the masses." :url "/" :license {:name "Eclipse Public License 1.0"} :dependencies [[org.clojure/clojure "[1.3.0,)"] [net.cgrand/regex "1.1.0"] [net.cgrand/parsley "0.9.2"]])
d2292522008e99ba57c879bb20455a338f5c19dc4743d3e8a91162ffbe5e31b8
privet-kitty/cl-competitive
run-range.lisp
(defpackage :cp/test/run-range (:use :cl :fiveam :cp/run-range) (:import-from :cp/test/base #:base-suite)) (in-package :cp/test/run-range) (in-suite base-suite) (test map-run-range (declare (notinline map-run-range)) ;; vector (finishes (map-run-range (lambda (&rest args) (error "Must not be called.")) #()))...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/test/run-range.lisp
lisp
vector list
(defpackage :cp/test/run-range (:use :cl :fiveam :cp/run-range) (:import-from :cp/test/base #:base-suite)) (in-package :cp/test/run-range) (in-suite base-suite) (test map-run-range (declare (notinline map-run-range)) (finishes (map-run-range (lambda (&rest args) (error "Must not be called.")) #())) (let ((re...
4c12443f1a0dd4ed384a7c427cc5a4e7b429a76008eb9dc558cad65fcb2c5d32
ucsd-progsys/liquidhaskell
T1371_NNF.hs
{-@ LIQUID "--reflection" @-} {-@ LIQUID "--ple" @-} module T1371_NNF where import Prelude hiding (lookup) data Pred = Var Int | Not Pred | Or Pred Pred | And Pred Pred {-@ reflect lookup @-} lookup :: [a] -> a -> Int -> a lookup [] def _ = def lookup (v:vs) def k | k == 0 = v | k <...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/942f9604988393e815789f98ac4ed26fd8cc637a/tests/ple/pos/T1371_NNF.hs
haskell
@ LIQUID "--reflection" @ @ LIQUID "--ple" @ @ reflect lookup @ @ reflect eval @ @ lazy nnf @ @ reflect nnf @ @ lazy nnf' @ @ reflect nnf' @ nnf' (Or p q) = And (nnf' p) (nnf' q) -- OK nnf' (And p q) = Or (nnf' p) (nnf' q) -- OK @ thm :: s:[Bool] -> p:Pred -> { eval s p = ...
module T1371_NNF where import Prelude hiding (lookup) data Pred = Var Int | Not Pred | Or Pred Pred | And Pred Pred lookup :: [a] -> a -> Int -> a lookup [] def _ = def lookup (v:vs) def k | k == 0 = v | k < 0 = def | otherwise = lookup vs def (k-1) eval :: [Bool] -> Pre...
58159892e2bc5d875f2a6c7e26d30e3ca476f6d10d2e42b4a44df905938996c2
jmillikin/anansi
Parser.hs
{-# LANGUAGE OverloadedStrings #-} Copyright ( C ) 2010 - 2011 < > -- -- 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 -- any later version. -- -- Thi...
null
https://raw.githubusercontent.com/jmillikin/anansi/f222a9195093c1fc3a96e7defd2803440c714b0e/lib/Anansi/Parser.hs
haskell
# LANGUAGE OverloadedStrings # This program is free software: you can redistribute it and/or modify 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 ...
Copyright ( C ) 2010 - 2011 < > 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 module Anansi.Parser ( ParseError (..) , parse ) where import ...
b571fb0258f77254165fa91de33213498203daee5bb974d82d9490e69afd423b
rtoy/cmucl
cp1255.lisp
;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*- ;;; ;;; ********************************************************************** This code was written by and has been placed in the public ;;; domain. ;;; (ext:file-comment "$Header: src/pcl/simple-streams/external-formats/cp1255.lisp $") (in-package...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/pcl/simple-streams/external-formats/cp1255.lisp
lisp
-*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*- ********************************************************************** domain. See For undefined characters we use U+FFFE
This code was written by and has been placed in the public (ext:file-comment "$Header: src/pcl/simple-streams/external-formats/cp1255.lisp $") (in-package "STREAM") (intl:textdomain "cmucl") (defconstant +ms-cp1255+ (make-array 128 :element-type '(unsigned-byte 16) :initial-contents...
218da9dacfce9058f65949fc3888edc04b814b15d2d0ffcbc6c406f9e74b401b
racket/gui
embedded-message.rkt
(module embedded-message mzscheme (require mred mzlib/class "snip-wrapper.rkt") (provide embedded-message%) (define embedded-message% (class snip-wrapper% (init label) (super-new (snip (let ([s (make-object string-snip% label)]) (send s set-style contro...
null
https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/embedded-gui/private/embedded-message.rkt
racket
(module embedded-message mzscheme (require mred mzlib/class "snip-wrapper.rkt") (provide embedded-message%) (define embedded-message% (class snip-wrapper% (init label) (super-new (snip (let ([s (make-object string-snip% label)]) (send s set-style contro...
84d2a4dbb350973e43e52ee5d19d336a3345e51c16ea4fb0b15001f6db0dcdb6
jwiegley/categorical
AST.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # # LANGUAGE MagicHash # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # # LANGUAGE UndecidableSuperClasses # # LANGUAGE UnicodeSyntax # module Categorical.AST where...
null
https://raw.githubusercontent.com/jwiegley/categorical/dc2b5e55a3c953db97d035b6c7768d46de23e9f9/src/Categorical/AST.hs
haskell
# LANGUAGE GADTs # Category TerminalCat RepCat OrdCat DistribCat BoolCat IfCat ProductCat CoproductCat ClosedCat ENumCat NumCat FractionalCat RealFracCat
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MagicHash # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # # LANGUAGE UndecidableSuperClasses # # LANGUAGE UnicodeSyntax # module Categorical.AST where import ConCat.Categor...
e5a9d2be4055f5e3c83a5e3149c84a42c539082be654f409205c159efdbbb70c
jmorag/open-strings
Home.hs
# LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # module Handler.Home where import qualified Data.Text as T import Database.Esqueleto hiding (Value) import qualified Database.Esqueleto as E import Import hiding (...
null
https://raw.githubusercontent.com/jmorag/open-strings/a9deff3c6ce36d588e47a237d47f191e195faa56/src/Handler/Home.hs
haskell
# LANGUAGE OverloadedStrings # This is a handler function for the GET request method on the HomeR resource pattern. All of your resource patterns are defined in config/routes functions. You can spread them across multiple files if you are so inclined, or create a single monolithic file.
# LANGUAGE MultiParamTypeClasses # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # module Handler.Home where import qualified Data.Text as T import Database.Esqueleto hiding (Value) import qualified Database.Esqueleto as E import Import hiding ((==.)) import Model.UserType import...
dd8ce42d6c3db5eb14fe6535768ce2e22bb54a20eff86822585da2b56a12cdbf
msantos/gen_icmp
ptun.erl
Copyright ( c ) 2010 - 2013 , < > %% All rights reserved. %% %% Redistribution and use in source and binary forms, with or without %% modification, are permitted provided that the following conditions %% are met: %% %% Redistributions of source code must retain the above copyright %% notice, this list of condition...
null
https://raw.githubusercontent.com/msantos/gen_icmp/837fc46b25b36f6c61d353494bbfa3eafce18942/examples/ptun.erl
erlang
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in bi...
Copyright ( c ) 2010 - 2013 , < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT COPYRIGHT HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF U...
264c00697b23d3fbd52d75bca66469d5cee8f5716ea15c9f95c58aa60972e3b7
mtolly/onyxite-customs
ProGuitar.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE DerivingStrategies #-} # LANGUAGE DerivingVia # {-# LANGUAGE FlexibleContexts #-} # LANGUAGE LambdaCase # {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} # LANGUAGE ScopedTypeVariables # ...
null
https://raw.githubusercontent.com/mtolly/onyxite-customs/0c8acd6248fe92ea0d994b18b551973816adf85b/haskell/packages/onyx-lib/src/Onyx/MIDI/Track/ProGuitar.hs
haskell
# LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards # Used in the following way: List of MIDI pitches from low to high rules for the key + tonality which strings RB should use (default S6..S1) | Replicate...
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # module Onyx.MIDI.Track.ProGuitar where import Control.Arrow (first) import Control.Monad (gu...
cbfec8c5885d8d1adf0b7706fec872661bae3cf5ac0d6bf6d3f3457fe57cf3da
tezos/tezos-mirror
RPC.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2018 Nomadic Development . < > Copyright ( c )...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/6fa868fe6be543b5831e79f34dd48ca341d79eac/src/proto_alpha/lib_plugin/RPC.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2018 Nomadic Development . < > Copyright ( c ) 2021 - 2022 Nomadic Labs , < > Copyright ( c ) 2022 TriliTech < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit pers...
b52bf1bbc12134d90a11211641524da55040e7cf98debe5591ce72dc37a722bc
protosens/monorepo.cljc
git.clj
(ns protosens.git "Quick Git-related utilities. The purpose is not to provide an exhaustive Git API. Rather, a collection of one-liners (or almost) for carrying common operations, especially in the context of scripting. All Git operations are done by shelling out. Convenience over speed. See [[exec]]....
null
https://raw.githubusercontent.com/protosens/monorepo.cljc/1c7cc00cbfb7c7484521146bf998438d2867552f/module/git/src/main/clj/protosens/git.clj
clojure
Miscellaneous helpers Master command Quick commands Anything different in versioned files, staged or not.
(ns protosens.git "Quick Git-related utilities. The purpose is not to provide an exhaustive Git API. Rather, a collection of one-liners (or almost) for carrying common operations, especially in the context of scripting. All Git operations are done by shelling out. Convenience over speed. See [[exec]]....
9ae0f17599dab4f1f403e1895ffcb40cb3b77b8b8d225b04414f6b605695e124
8c6794b6/guile-tjit
ls.scm
;;;; ls.scm --- functions for browsing modules ;;;; Copyright ( C ) 1995 , 1996 , 1997 , 1999 , 2001 , 2006 , 2010 Free Software Foundation , Inc. ;;;; ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public License as published by the Fre...
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/ice-9/ls.scm
scheme
ls.scm --- functions for browsing modules This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABI...
Copyright ( C ) 1995 , 1996 , 1997 , 1999 , 2001 , 2006 , 2010 Free Software Foundation , Inc. version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA (define-...
b48963a01afdfab7eab352f18c79170995cf603def75594b2c50a4d87180fc91
mirage/colombe
domain.ml
type t = | IPv4 of Ipaddr.V4.t | IPv6 of Ipaddr.V6.t | Extension of string * string | Domain of string list let equal a b = match (a, b) with | IPv4 a, IPv4 b -> Ipaddr.(compare (V4 a) (V4 b)) = 0 | IPv6 a, IPv6 b -> Ipaddr.(compare (V6 a) (V6 b)) = 0 | IPv4 a, IPv6 b -> Ipaddr.(compare (V4 a) (V6 b)) ...
null
https://raw.githubusercontent.com/mirage/colombe/bbecbb17b581fa1db70a61de14efb51a66f30451/src/domain.ml
ocaml
XXX(dinosaure): use [Fmt] was not the best idea when we will use [to_string] on the protocol.
type t = | IPv4 of Ipaddr.V4.t | IPv6 of Ipaddr.V6.t | Extension of string * string | Domain of string list let equal a b = match (a, b) with | IPv4 a, IPv4 b -> Ipaddr.(compare (V4 a) (V4 b)) = 0 | IPv6 a, IPv6 b -> Ipaddr.(compare (V6 a) (V6 b)) = 0 | IPv4 a, IPv6 b -> Ipaddr.(compare (V4 a) (V6 b)) ...
690ec0f53bad109a717cf616b5478da95c1dd7f039dc6597f67a168c8421a88e
composewell/streamly
Prelude.hs
# OPTIONS_GHC -Wno - deprecations # -- | Module : Streamly . Benchmark . Prelude Copyright : ( c ) 2018 Composewell Technologies -- License : MIT -- Maintainer : # LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE RankNTypes #-} module Streamly.Benchmark...
null
https://raw.githubusercontent.com/composewell/streamly/5327f181db2cf956461b74ed50720eebf119f25a/benchmark/lib/Streamly/Benchmark/Prelude.hs
haskell
| Maintainer : # LANGUAGE RankNTypes # Common polymorphic stream APIs used across multiple stream modules ----------------------------------------------------------------------------- Generation ----------------------------------------------------------------------------- ----------------------------------------...
# OPTIONS_GHC -Wno - deprecations # Module : Streamly . Benchmark . Prelude Copyright : ( c ) 2018 Composewell Technologies License : MIT # LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # module Streamly.Benchmark.Prelude ( absTimes , apDiscardFst , apDis...
b97e286ba4f9d1422d465b4ab64a1080d39d549777d252df4ef97da861207092
ghcjs/ghcjs
CASList.hs
# LANGUAGE BangPatterns , CPP # module CASList where import Control.Monad import Data.IORef import Control.Concurrent import Control.Concurrent.Chan import System.Environment import Data.Time -- #define USE_UNPACK -- #define USE_STRICT #if defined(USE_UNPACK) #define UNPACK(p) {-# UNPACK #-} !(p) #elif defined(USE_S...
null
https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/concurrent/prog003/CASList.hs
haskell
#define USE_UNPACK #define USE_STRICT # UNPACK # the deleted field of Head is always False, it's only there to make some of the code more uniform tail points to the last node which must be Null ----------------------------------------- auxilliary functions -------------------------------------------- functions o...
# LANGUAGE BangPatterns , CPP # module CASList where import Control.Monad import Data.IORef import Control.Concurrent import Control.Concurrent.Chan import System.Environment import Data.Time #if defined(USE_UNPACK) #elif defined(USE_STRICT) #define UNPACK(p) !(p) #else #define UNPACK(p) p #endif data List a = Node...
ef8698c6a2788ccc1ceb0d8777a8408f3e6a5f412650201aa02f9f507af4e5e7
softwarelanguageslab/maf
R5RS_scp1_polynome-2.scm
; Changes: * removed : 0 * added : 0 * swaps : 0 * negated predicates : 2 * swapped branches : 1 * calls to i d fun : 1 (letrec ((make-point (lambda (x y) (letrec ((dispatch (lambda (msg) (if (eq? msg 'x-value) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_polynome-2.scm
scheme
Changes:
* removed : 0 * added : 0 * swaps : 0 * negated predicates : 2 * swapped branches : 1 * calls to i d fun : 1 (letrec ((make-point (lambda (x y) (letrec ((dispatch (lambda (msg) (if (eq? msg 'x-value) ...
7d859dd8e7088382b1e01ab82585e9cf4f7e1490a244542ac4a47ab430fe72cf
thegeez/bi-mcmc
mcmc.clj
(ns net.thegeez.bi-mcmc.mcmc (:require [incanter.core :as inc-core] [incanter.stats :as stats] [net.thegeez.bi-mcmc.net :as net] [net.thegeez.bi-mcmc.distributions :as dists] [clojure.pprint :as pprint])) (defn mapv2 [f c1 c2] (loop [c1 c1 c2 c2 res...
null
https://raw.githubusercontent.com/thegeez/bi-mcmc/c843c86953b95fe749860b1c35e5f2b630f9a5f3/src/net/thegeez/bi_mcmc/mcmc.clj
clojure
assume the distribution threw an exception on a value outside its reach (at least the case for binomial-distribution with way-off proposals) _ (println "k" k "acc" #_acc "dist" dist "value" value) _ (println "k" k) Deterministic _ (println "self-logp" self-logp "for" k) Deterministic Stochastic ...
(ns net.thegeez.bi-mcmc.mcmc (:require [incanter.core :as inc-core] [incanter.stats :as stats] [net.thegeez.bi-mcmc.net :as net] [net.thegeez.bi-mcmc.distributions :as dists] [clojure.pprint :as pprint])) (defn mapv2 [f c1 c2] (loop [c1 c1 c2 c2 res...