_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
de2dc70b69cfcc562b2b0f78f541aa2871f2b796e0d8808c8876c7fad3ef3ba8
JacquesCarette/Drasil
DirectoryController.hs
-- | Directory controller for SourceCodeReader.hs and SourceCodeReaderTypes.hs. module DirectoryController (createFolder, createFile, finder, getDirectories, DrasilPack, FileName, FolderName, File(..), Folder(..)) where import Data.List import System.IO import System.Directory import System.FilePath (joinPath) type...
null
https://raw.githubusercontent.com/JacquesCarette/Drasil/03c7edaf2da0e11f3977d8be193dcfdf6bd38f50/code/scripts/DirectoryController.hs
haskell
| Directory controller for SourceCodeReader.hs and SourceCodeReaderTypes.hs. used to create new folders of folder data type used to create new files of file data type iterates through drasil- package; outputs subdirectories and haskell files recursively searches for all folders + files in a directory using iterato...
module DirectoryController (createFolder, createFile, finder, getDirectories, DrasilPack, FileName, FolderName, File(..), Folder(..)) where import Data.List import System.IO import System.Directory import System.FilePath (joinPath) type FilterPrefix = String type DrasilPack = String type FileName = FilePath type Fo...
b182f60e081c4063cb7e1501b14d49741d92230c52ec04d5ea85075dc0cc8c6d
ghollisjr/cl-ana
package.lisp
cl - ana is a Common Lisp data analysis library . Copyright 2013 , 2014 ;;;; This file is part of cl - ana . ;;;; ;;;; cl-ana 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 ...
null
https://raw.githubusercontent.com/ghollisjr/cl-ana/2e5e16c203efd44bfbc452e7bd4e0ff3c7745b04/fitting/package.lisp
lisp
cl-ana is free software: you can redistribute it and/or modify it (at your option) any later version. cl-ana 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 Lice...
cl - ana is a Common Lisp data analysis library . Copyright 2013 , 2014 This file is part of cl - ana . 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 ...
61de98b274ebb22e7188a29a7c9901871dae53491cb67c81ccf1d0b44f889e12
evrim/core-server
grammar.lisp
Core Server : Web Application Server Copyright ( C ) 2006 - 2008 , Aycan iRiCAN ;; 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 your opti...
null
https://raw.githubusercontent.com/evrim/core-server/200ea8151d2f8d81b593d605b183a9cddae1e82d/src/streams/grammar.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 L...
Core Server : Web Application Server Copyright ( C ) 2006 - 2008 , Aycan iRiCAN 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 (in-package :core...
43ad4b51b1e242b72faa2b174ac56e095717195ab0966f053a2e8c09dc5953f6
simingwang/emqx-plugin-kafkav5
asn1ct_imm.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2012 - 2017 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/asn1-5.0.18/src/asn1ct_imm.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 2012 - 2017 . 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(asn1ct_imm). -export([per_dec_raw_bitstring/2, per_dec_boolean/0,per_dec_enumerated/2,per_dec_enumerated/3,...
d5dcb076bd3233fdb2f0f2a98e3eae4dae0b11c9f9961fb808d6ed55ea19155b
Liqwid-Labs/liqwid-libs
Main.hs
import Control.Applicative ((<|>)) import Data.Aeson qualified as Aeson import Data.Aeson.Encode.Pretty (encodePretty) import Data.ByteString qualified as BS import Data.ByteString.Lazy qualified as LBS import Data.ByteString.Short qualified as SBS import Data.Map (Map, fromList, toList) import Data.Text (Text) import ...
null
https://raw.githubusercontent.com/Liqwid-Labs/liqwid-libs/8165d3a33daa5deb377db854b9c7b62aab9c2897/liqwid-script-export/export-stat/Main.hs
haskell
import Control.Applicative ((<|>)) import Data.Aeson qualified as Aeson import Data.Aeson.Encode.Pretty (encodePretty) import Data.ByteString qualified as BS import Data.ByteString.Lazy qualified as LBS import Data.ByteString.Short qualified as SBS import Data.Map (Map, fromList, toList) import Data.Text (Text) import ...
d1317c87a4d78dc2ca3447421791d90b85b680b203945176510db939ae457f48
alexandroid000/improv
Odometry.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # module Ros.Nav_msgs.Odometry where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Internal.RosBinary impo...
null
https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/msgs/Nav_msgs/Ros/Nav_msgs/Odometry.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # module Ros.Nav_msgs.Odometry where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Internal.RosBinary import Ros.Internal.Msg.MsgInfo import qualified GHC.Generics as G import q...
2b97e27a74c1899ac9b1b533405eec8a2fd818109344818882aec0aee488f69f
haskell/ThreadScope
Main.hs
module Main where import GUI.Main (runGUI) import System.Environment import System.Exit import System.Console.GetOpt import Data.Version (showVersion) import Paths_threadscope (version) ------------------------------------------------------------------------------- main :: IO () main = do args <- getArgs (f...
null
https://raw.githubusercontent.com/haskell/ThreadScope/7269ccbf7810f268f8cbc3f0e60d49cc6168b882/Main.hs
haskell
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
module Main where import GUI.Main (runGUI) import System.Environment import System.Exit import System.Console.GetOpt import Data.Version (showVersion) import Paths_threadscope (version) main :: IO () main = do args <- getArgs (flags, args') <- parseArgs args handleArgs flags args' handleArgs :: Flags -...
dfa0089a40236508a82b12c2b886ff87770f2b9fdb6160ff5025373ef0ca34ac
haslab/HAAP
Exts.hs
{-# LANGUAGE CPP #-} # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeOperators # {-# LANGUAGE TypeSynonymInstances #-} module Snap.Snaplet.Auth.Backends.JsonFile.Exts ( initJsonFileAuthManager , mkJsonAuthMgr , jsonFileSave , JsonFileAuthManager(...
null
https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/packages/snap-exports/Snap/Snaplet/Auth/Backends/JsonFile/Exts.hs
haskell
# LANGUAGE CPP # # LANGUAGE OverloadedStrings # # LANGUAGE TypeSynonymInstances # ---------------------------------------------------------------------------- | Initialize a JSON file backed 'AuthManager' ^ Authentication settings for your app use ^ Where to store user data as JSON -------------...
# LANGUAGE FlexibleInstances # # LANGUAGE TypeOperators # module Snap.Snaplet.Auth.Backends.JsonFile.Exts ( initJsonFileAuthManager , mkJsonAuthMgr , jsonFileSave , JsonFileAuthManager(..) ) where import Control.Applicative ((<|>)) import Control.Monad.State import ...
1070667d2ca10b3e8f02101089f6d181bf2cf5270ed2afab919e0d132ef90bef
DKurilo/hackerrank
Main.hs
module Main (main) where import Control.Monad import Control.Monad.State.Lazy hiding (lift) import Data.List (minimumBy, sortBy) import Data.Maybe (fromMaybe, isJust, isNothing) import Debug.Trace (trace) import System.IO import qualified Text.ParserCombinators.ReadP as RP import Text.Read as R hiding (get) data Witc...
null
https://raw.githubusercontent.com/DKurilo/hackerrank/d86ccdcc213a236f1e9b0d047d09c10e20268b98/codingame/fall-challenge-twenty-twenty/src/Main.hs
haskell
game loop the number of spells and recipes in play
module Main (main) where import Control.Monad import Control.Monad.State.Lazy hiding (lift) import Data.List (minimumBy, sortBy) import Data.Maybe (fromMaybe, isJust, isNothing) import Debug.Trace (trace) import System.IO import qualified Text.ParserCombinators.ReadP as RP import Text.Read as R hiding (get) data Witc...
10bb0fde101e00a7d4511e28106b4e2a177e16eda93c25a30c56be17460ac614
khibino/haskell-relational-record
Scalar.hs
# LANGUAGE TemplateHaskell # # LANGUAGE FlexibleInstances # -- | -- Module : Database.Relational.Scalar Copyright : 2013 - 2017 -- License : BSD3 -- -- Maintainer : -- Stability : experimental -- Portability : unknown -- -- This module defines type classes and templates for scalar queries. module D...
null
https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/relational-query/src/Database/Relational/Scalar.hs
haskell
| Module : Database.Relational.Scalar License : BSD3 Maintainer : Stability : experimental Portability : unknown This module defines type classes and templates for scalar queries. * Single degree constraint | Constraint which represents scalar degree. | 'ScalarDegree' instance templates.
# LANGUAGE TemplateHaskell # # LANGUAGE FlexibleInstances # Copyright : 2013 - 2017 module Database.Relational.Scalar ( ScalarDegree, defineScalarDegree ) where import Language.Haskell.TH (Q, TypeQ, Dec) import Database.Record (PersistableWidth) class PersistableWidth ct => ScalarDegree ct instance Sca...
8dfd3e9da434a570c67e70d369bdc317dbccc7c29dff871147ada8a092f01bfc
ocaml-sf/learn-ocaml-corpus
prepare.ml
exception TODO module InfiniteArray : sig type 'a t val make: 'a -> 'a t val get: 'a t -> int -> 'a val set: 'a t -> int -> 'a -> unit end = struct type 'a t = { default: 'a; mutable table: 'a array; } let default_size = 16 (* must be non-zero *) let make x = { default = x; table...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/sat/prepare.ml
ocaml
must be non-zero
exception TODO module InfiniteArray : sig type 'a t val make: 'a -> 'a t val get: 'a t -> int -> 'a val set: 'a t -> int -> 'a -> unit end = struct type 'a t = { default: 'a; mutable table: 'a array; } let default_size = let make x = { default = x; table = Array.make default_size x; ...
f35c1b8faac4f999c875bcb5527327606fe28ab0b6b2fca2462401b75dec7a35
ha-mo-we/Racer
abox-queries-code.lisp
-*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : THEMATIC - SUBSTRATE ; Base : 10 -*- Copyright ( c ) 1998 - 2014 , , , . ;;; All rights reserved. Racer is distributed under the following BSD 3 - clause license ;;; Redistribution and use in source and binary forms, with or without ;;; modi...
null
https://raw.githubusercontent.com/ha-mo-we/Racer/d690841d10015c7a75b1ded393fcf0a33092c4de/source/abox-queries-code.lisp
lisp
Syntax : Ansi - Common - Lisp ; Package : THEMATIC - SUBSTRATE ; Base : 10 -*- 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, ...
Copyright ( c ) 1998 - 2014 , , , . Racer is distributed under the following BSD 3 - clause license Neither the name Racer nor the names of its contributors may be used CONTRIBUTORS " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , VOLKER HAARSLEV , RALF MOELLER , NOR FOR ANY ...
74992d164a08b949d16fb9c6a7a65004823e51e62720d62a91755849a3e4c4be
ptal/AbSolute
var_store.mli
Copyright 2019 This program is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 3 of the License , or ( at your option ) any later version . This program is distr...
null
https://raw.githubusercontent.com/ptal/AbSolute/469159d87e3a717499573c1e187e5cfa1b569829/src/domains/box/var_store.mli
ocaml
* This function consumes the registered delta in the store. The returned store has an empty list of delta.
Copyright 2019 This program is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 3 of the License , or ( at your option ) any later version . This program is distr...
2f16ca9ab953c596f82a0256136277aa0ec27e3b4367a7dfc56d6bacfe1734aa
yi-editor/yi
TextObject.hs
module Yi.Keymap.Vim.TextObject ( TextObject(..) , CountedTextObject(..) , regionOfTextObjectB , changeTextObjectCount , changeTextObjectStyle , stringToTextObject ) where import Control.Monad (replicateM_, (<=<)) import Yi.Buffer import Yi.Keymap.Vim.MatchResult import Yi.Keymap.Vim.StyledR...
null
https://raw.githubusercontent.com/yi-editor/yi/79e6c87e6300f69560927a7c0b115db17a00ea1d/yi-keymap-vim/src/Yi/Keymap/Vim/TextObject.hs
haskell
TODO: 't' TODO: this probably belongs to Buffer.TextUnit
module Yi.Keymap.Vim.TextObject ( TextObject(..) , CountedTextObject(..) , regionOfTextObjectB , changeTextObjectCount , changeTextObjectStyle , stringToTextObject ) where import Control.Monad (replicateM_, (<=<)) import Yi.Buffer import Yi.Keymap.Vim.MatchResult import Yi.Keymap.Vim.StyledR...
aaac2d57872672af4a969b9ce99a445c5b74a662e975621e32d0fabdd4724307
metosin/palikka
core.clj
(ns palikka.core (:require [com.stuartsierra.component :as component]) (:import [java.io Writer])) (defprotocol GetProperty (-get [this component])) (extend-protocol GetProperty clojure.lang.IFn (-get [f component] (f component)) clojure.lang.PersistentVector (-get [ks component] (get-in compone...
null
https://raw.githubusercontent.com/metosin/palikka/77e3a1fc6f7ea87bfd9697d8583528285088e50e/src/palikka/core.clj
clojure
Use record to control print-method of the context map. This will ensure that secrets from context map (passwords from env) aren't accidentally exposed when printing exceptions or such.
(ns palikka.core (:require [com.stuartsierra.component :as component]) (:import [java.io Writer])) (defprotocol GetProperty (-get [this component])) (extend-protocol GetProperty clojure.lang.IFn (-get [f component] (f component)) clojure.lang.PersistentVector (-get [ks component] (get-in compone...
b2aab01a536bb32c40e0a7b21a529f747f5e74047b4cc44af6d5dd4515411e91
spawnfest/eep49ers
wxDialog.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 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 copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxDialog.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 2008 - 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(wxDialog). -include("wxe.hrl"). -export([create/4,create/5,createButtonSizer/2,createStdDialogButtonSizer/2,...
098b47e2760999c44a4b96dc6ffd0c1c1560f82f5a55164fb0b12d40f3029ebd
brevis-us/brevis
selection.clj
(ns us.brevis.evolution.selection (:use [us.brevis random] [us.brevis.evolution.roulette :exclude [select-with]])) (defn tournament-max "Return the winner of a tournament for maximum value of the key function." [tournament-size key-fn population] (let [tournament (repeatedly tournament-size #(lrand-nth...
null
https://raw.githubusercontent.com/brevis-us/brevis/de51c173279e82cca6d5990010144167050358a3/src/main/clojure/us/brevis/evolution/selection.clj
clojure
roulette
(ns us.brevis.evolution.selection (:use [us.brevis random] [us.brevis.evolution.roulette :exclude [select-with]])) (defn tournament-max "Return the winner of a tournament for maximum value of the key function." [tournament-size key-fn population] (let [tournament (repeatedly tournament-size #(lrand-nth...
ede78c2b947cd593f37a4d69dfe8b8ce928d8e723eb3a5460420dc11bdfe60cb
vaclavsvejcar/headroom
Lens.hs
# LANGUAGE NoImplicitPrelude # -- | -- Module : Headroom.Data.Lens -- Description : Custom functionality related to /lens/ Copyright : ( c ) 2019 - 2022 -- License : BSD-3-Clause -- Maintainer : -- Stability : experimental -- Portability : POSIX -- -- Provides customized versions of /lens/ function...
null
https://raw.githubusercontent.com/vaclavsvejcar/headroom/3b20a89568248259d59f83f274f60f6e13d16f93/src/Headroom/Data/Lens.hs
haskell
| Module : Headroom.Data.Lens Description : Custom functionality related to /lens/ License : BSD-3-Clause Maintainer : Stability : experimental Portability : POSIX Provides customized versions of /lens/ functions. | A template haskell function to build lenses for a record type. This function dif...
# LANGUAGE NoImplicitPrelude # Copyright : ( c ) 2019 - 2022 module Headroom.Data.Lens ( suffixLenses , suffixLensesFor ) where import qualified Language.Haskell.TH.Lib as TH import qualified Language.Haskell.TH.Syntax as TH import Lens.Micro.TH ( DefName (..) , lensField , lensRules ...
aac349a6273c3cb718d0fbbab13b163323805687425c5c38a6f4c535d1409830
mzp/coq-ruby
db_printers.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/dev/db_printers.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 **********************************************************************
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Pp open Names let pp s...
fc27848b35cf18ca05f7a81e6a6ec4201cec5ea1ad27c5b8d29ad902fe2c66cc
ftovagliari/ocamleditor
rconf_page.ml
OCamlEditor Copyright ( C ) 2010 - 2014 This file is part of OCamlEditor . OCamlEditor 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/ftovagliari/ocamleditor/53284253cf7603b96051e7425e85a731f09abcd1/src/rconf_page.ml
ocaml
* create_entry * view Command Line Arguments and Environment Variables
OCamlEditor Copyright ( C ) 2010 - 2014 This file is part of OCamlEditor . OCamlEditor 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...
0a66303562c2e8bebb4740e41e3af1b78f7a2e31430eb5550204cabf41b88b87
GaloisInc/pads-haskell
BigEndian.hs
# LANGUAGE QuasiQuotes # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ( c ) < > * * < > ...
null
https://raw.githubusercontent.com/GaloisInc/pads-haskell/ffa01030cd1c1edf5f50df53f3783ff28bf43c7e/Language/Pads/Library/BigEndian.hs
haskell
SIGNED INTEGERS --
# LANGUAGE QuasiQuotes # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ( c ) < > * * < > ...
e53b939a2bc575952160211409dc6dc868fdf4ca3cc96b59199a2f08f44e0ddc
fukamachi/utopian
new.lisp
(defpackage #:utopian/cli/new (:use #:cl) (:import-from #:utopian/errors #:invalid-arguments) (:import-from #:utopian/tasks #:new #:ask-for-value #:use-value) (:export #:main)) (in-package #:utopian/cli/new) (defun print-usage () (format *error-...
null
https://raw.githubusercontent.com/fukamachi/utopian/532431b4c5e958995ba2d812751b779f814f9810/src/cli/new.lisp
lisp
(defpackage #:utopian/cli/new (:use #:cl) (:import-from #:utopian/errors #:invalid-arguments) (:import-from #:utopian/tasks #:new #:ask-for-value #:use-value) (:export #:main)) (in-package #:utopian/cli/new) (defun print-usage () (format *error-...
57f719482958b64dd02fb0b6a1693e0d201040df0660a050b2a4f0b0b5b8a556
NicolasT/paxos
Learner.hs
Paxos - Implementations of Paxos - related consensus algorithms - - Copyright ( C ) 2012 - - 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....
null
https://raw.githubusercontent.com/NicolasT/paxos/9f207868ce3c5f557c7013bed13edff70206dfdd/src/Network/Paxos/Synod/Learner.hs
haskell
* Learner functionality ** Incoming message handlers ** Result extraction * Testing ^ Number of nodes which form a quorum ^ Current state ^ Identifier of the node from which the message was received ^ Received message TODO Add property/test to check `Decided' is returned once quorum is reached Once a value ...
Paxos - Implementations of Paxos - related consensus algorithms - - Copyright ( C ) 2012 - - 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....
31a145368b3c085820cc129c670d28f49ae6d614d7f36b0655efc0f47793853e
roehst/tapl-implementations
syntax.ml
open Format open Support.Error open Support.Pervasive (* ---------------------------------------------------------------------- *) type term = TmVar of info * int * int | TmAbs of info * string * term | TmApp of info * term * term type binding = NameBind type context = (string * binding) list type ...
null
https://raw.githubusercontent.com/roehst/tapl-implementations/23c0dc505a8c0b0a797201a7e4e3e5b939dd8fdb/untyped/syntax.ml
ocaml
---------------------------------------------------------------------- ---------------------------------------------------------------------- Context management ---------------------------------------------------------------------- Shifting --------------------------------------------------------------------...
open Format open Support.Error open Support.Pervasive type term = TmVar of info * int * int | TmAbs of info * string * term | TmApp of info * term * term type binding = NameBind type context = (string * binding) list type command = | Eval of info * term | Bind of info * string * binding let e...
4765cce1b32e0d908d5b653124fe234ef3104da588179b65bd5947cd85ebfd95
awslabs/s2n-bignum
bignum_triple_sm2_alt.ml
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) (* =================================================================...
null
https://raw.githubusercontent.com/awslabs/s2n-bignum/6b53f075a0e28e6b89db12301de5f59ec788855c/x86/proofs/bignum_triple_sm2_alt.ml
ocaml
========================================================================= Tripling modulo p_sm2, the field characteristic for the CC SM2 curve. ========================================================================= *** print_literal_from_elf "x86/sm2/bignum_triple_sm2_alt.o";; *** XOR (% r10) (% r10) A...
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) let bignum_triple_sm2_alt_mc = define_assert_from_elf "bignum_trip...
04b045a8c31cdc853c230902031ec03103e9556a437bb34403fdf82b445a9fa1
UnixJunkie/consent
policy.ml
(* A consensus is parameterized by a policy/strategy that dictates how the consensus is built *) module Log = Dolog.Log type t = (* control strategies are not consensus queries per se *) | Single (* control *) | Opportunist (* control *) | Optimist (* v *) | Realist (* % *) | Knowledgeable (* activity...
null
https://raw.githubusercontent.com/UnixJunkie/consent/f065ee7ba5a1ae014b5c3a28d0985ba5ad1abda5/src/policy.ml
ocaml
A consensus is parameterized by a policy/strategy that dictates how the consensus is built control strategies are not consensus queries per se control control v % activity-weighted %
module Log = Dolog.Log type t = let of_string = function | "sing" -> Single | "oppo" -> Opportunist | "opti" -> Optimist | "real" -> Realist | "know" -> Knowledgeable | other -> let () = Log.fatal "of_string: unknown strat: %s" other in exit 1 let to_string = function | Single -> "sing" | O...
ce27b2d25bf1aa11794406280d4447f4159a8e28d2f7a32a3dca633d3e6ef490
xvw/planet
timetable.ml
open Bedrock open Error module Year = struct type t = Year of int let make value = if value < 0 || value > 999 then Error (Invalid_year value) else Ok (Year value) ;; let to_string (Year n) = Format.sprintf "%03d" n let from_string str = try Scanf.sscanf str "%03d%!" make with | _ -> E...
null
https://raw.githubusercontent.com/xvw/planet/c2a77ea66f61cc76df78b9c2ad06d114795f3053/src/paperwork/timetable.ml
ocaml
open Bedrock open Error module Year = struct type t = Year of int let make value = if value < 0 || value > 999 then Error (Invalid_year value) else Ok (Year value) ;; let to_string (Year n) = Format.sprintf "%03d" n let from_string str = try Scanf.sscanf str "%03d%!" make with | _ -> E...
cac189e7a4d685e351cd0839a2c19aed03b61537124dc60a39d6937a37d06612
gndl/graffophone
bigarrayVsArray.ml
* Copyright ( C ) 2015 * * All rights reserved . This file is distributed under the terms of the * GNU General Public License version 3.0 . * * This program is distributed in the hope that it will be useful , * but WITHOUT ANY WARRANTY ; without even the implied warranty of * MERCHANTABIL...
null
https://raw.githubusercontent.com/gndl/graffophone/71a12fcf8e799bb8ebfc37141b300ecbc9475c43/plugins/bigarrayVsArray.ml
ocaml
* Copyright ( C ) 2015 * * All rights reserved . This file is distributed under the terms of the * GNU General Public License version 3.0 . * * This program is distributed in the hope that it will be useful , * but WITHOUT ANY WARRANTY ; without even the implied warranty of * MERCHANTABIL...
4bd7b9cf679aa666a975d23a34d84c9574917fa6a3e6450e7e74e2a056eb3054
Plutonomicon/pluto
Desugar.hs
# LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module PlutusCore.Assembler.Desugar ( desugar ) where import qualified Data.Map as Map import qualified Data.Text as Text import qualified PlutusCore.Core ...
null
https://raw.githubusercontent.com/Plutonomicon/pluto/aab7447040b0fe2c8bb79b5b3e87c9d23ac41683/src/PlutusCore/Assembler/Desugar.hs
haskell
# LANGUAGE OverloadedStrings # TODO: is this right? TODO: is this right? first convention in order to simplify the recursion. allow this case to make the recursion simpler TODO: is this right?
# LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # module PlutusCore.Assembler.Desugar ( desugar ) where import qualified Data.Map as Map import qualified Data.Text as Text import qualified PlutusCore.Core as PLC import...
86e458b8a2c182240c877e069eede223e760887f3a2fd91edf4abd1e3b9c338f
charlieg/Sparser
connect.lisp
-*- Base : 10 ; Package : co ; Syntax : Common - Lisp -*- (in-package :co) ;;; BBN Technologies ;;; A Division of BBN Corporation ;;; Copyright ;;; All Rights Reserved 1999 ;;; ;;;THIS FILE CONTAINS THE CODE FOR CONNECTING, DISCONNECTING AND MODIFYING THE ;;;CONNECTIONS OF SOMETHING IN ...
null
https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/lisp/sfl/connect.lisp
lisp
Package : co ; Syntax : Common - Lisp -*- A Division of BBN Corporation Copyright All Rights Reserved THIS FILE CONTAINS THE CODE FOR CONNECTING, DISCONNECTING AND MODIFYING THE CONNECTIONS OF SOMETHING IN A SUBSUMPTION TAXONOMY. Redefining something does not alter its specializations. However, so...
(in-package :co) BBN Technologies 1999 (defmethod update-connections ((self inheritance-handling-mixin) new-abstractions) (with-slots (abstractions specializations) self (let ((added-abstractions (filter-out abstractions new-abstractions)) (deleted-abstractions (filter-out new-abstractions abst...
dd6a3ed8d237a603d297cd78c4cb5aaab8605aed6f6fe47e61a79cd50f6292ba
skanev/playground
46.scm
SICP exercise 2.46 ; A two - dimensional vector v running from the origin to a point can be ; represented as a pair consisting of an x-coordinate and a y-coordinate. ; Implement a data abstraction for vectors by giving a constructor make-vect and corresponding selectors xcor - vect and ycor - vect . In terms of y...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/02/46.scm
scheme
represented as a pair consisting of an x-coordinate and a y-coordinate. Implement a data abstraction for vectors by giving a constructor make-vect selectors and constructor, implement procedures add-vect, sub-vect, and scale-vect that perform the operations vector addition, vector subtraction, and multiplying a v...
SICP exercise 2.46 A two - dimensional vector v running from the origin to a point can be and corresponding selectors xcor - vect and ycor - vect . In terms of your ( x₁,y₁ ) + ( x₂,y₂ ) = ( x₁ + x₂,y₁ + y₂ ) ( x₁,y₁ ) - ( x₂,y₂ ) = ( x₁ - x₂,y₁ - y₂ ) (define (make-vect x y) (list x y)) (define (xcor-vec...
a42627c849b05534bdf938a602410864c22d432da9f5aa68e7f393515cac2ab2
facebook/flow
dfindMaybe.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/hack_forked/dfind/dfindMaybe.ml
ocaml
*************************************************************************** A modified maybe monad * Most of the time, I prefer to use exceptions, I like things to blow up * if something went wrong. * However, in the case of dfind, exceptions are painful. We don't want things * to blow-up, we want to carry-on what...
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
8b9ca34aa97ead3b10933c06c0de4e2b7123a08f444cc1093ed86c9da569a165
robrix/starlight
Sol.hs
# LANGUAGE DisambiguateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # -- | A familiar star system. module Starlight.Sol ( runData , loadBodies , loadFactions ) where import Control.Carrier.Database.SQLite import ...
null
https://raw.githubusercontent.com/robrix/starlight/ad80ab74dc2eedbb52a75ac8ce507661d32f488e/src/Starlight/Sol.hs
haskell
# LANGUAGE OverloadedStrings # | A familiar star system.
# LANGUAGE DisambiguateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE TypeApplications # module Starlight.Sol ( runData , loadBodies , loadFactions ) where import Control.Carrier.Database.SQLite import Control.Effect.Lift import Control.Lens (review) impor...
dd2506dbb98e46bce828fe2cde20e1db7da63cd7e98cd4ebf5d0de4e6d01f17a
uw-unsat/jitsynth
rwsets.rkt
#lang rosette (require "../../gensketch/rwsets.rkt" "../../common/data-utils.rkt" "../../ams/machine-loader.rkt" "../../common/instructions.rkt") (require (only-in "../../riscv/interpreter.rkt" [interpret-with-state riscv:interpret-with-state])) (require (only-in "../../bpf/interpreter.rkt" [interpret-with-s...
null
https://raw.githubusercontent.com/uw-unsat/jitsynth/69529e18d4a8d4dace884bfde91aa26b549523fa/test/bpf2riscv/rwsets.rkt
racket
RISC-V WRITE SETS Immediate Arith instr Register Arith instr Load instr Store instr Branch instr JALR instr RISC-V READ SETS Immediate Arith instr Register Arith instr Load instr Store instr Branch instr JALR instr Reg add Reg jump Load Imm store Reg store Reg add Reg jump Load Imm store Reg s...
#lang rosette (require "../../gensketch/rwsets.rkt" "../../common/data-utils.rkt" "../../ams/machine-loader.rkt" "../../common/instructions.rkt") (require (only-in "../../riscv/interpreter.rkt" [interpret-with-state riscv:interpret-with-state])) (require (only-in "../../bpf/interpreter.rkt" [interpret-with-s...
116cd039b00270226c5d53c0098129e1349cd184422593a270d3fdfb95234ad7
brandonbloom/transduce
reducers.cljs
(ns transduce.reducers "Provides reducers support for State Transducers" (:require [clojure.core.reducers :as r]) (:require-macros [transduce.macros :refer (defcurried)])) (defcurried map-state "Like map, but threads a state through the sequence of transformations. For each x in coll, f is applied to [state ...
null
https://raw.githubusercontent.com/brandonbloom/transduce/53607d759d43072f6953d197de9acc26fa77f37b/src/cljs/transduce/reducers.cljs
clojure
(ns transduce.reducers "Provides reducers support for State Transducers" (:require [clojure.core.reducers :as r]) (:require-macros [transduce.macros :refer (defcurried)])) (defcurried map-state "Like map, but threads a state through the sequence of transformations. For each x in coll, f is applied to [state ...
d381887bf13f6d4c77fef38c2a5eaf4f12d6d8a70004afd4dc5e287ae97f89d6
hedgehogqa/haskell-hedgehog
Seed.hs
# LANGUAGE TemplateHaskell # module Test.Hedgehog.Seed ( tests ) where import Data.Foldable (for_) import Hedgehog import qualified Hedgehog.Internal.Seed as Seed data Assert = Assert { expected :: !Seed , actual :: !Seed } deriving (Show) | Verify that SplitMix avoids ...
null
https://raw.githubusercontent.com/hedgehogqa/haskell-hedgehog/3d4dde46e15ab25a10cac0deff03bae10ecacc4e/hedgehog/test/Test/Hedgehog/Seed.hs
haskell
-random.org/posts/bugs-in-splitmix.html See also: -hedgehog/issues/191
# LANGUAGE TemplateHaskell # module Test.Hedgehog.Seed ( tests ) where import Data.Foldable (for_) import Hedgehog import qualified Hedgehog.Internal.Seed as Seed data Assert = Assert { expected :: !Seed , actual :: !Seed } deriving (Show) | Verify that SplitMix avoids ...
c49f68366d6b05e10adfabdf8eb25bebbad4a0cdb6672739c64f5711e362170b
kepler16/gx.cljc
system_test.cljc
(ns k16.gx.beta.system-test (:require #?(:cljs [cljs.core :refer [ExceptionInfo]]) [clojure.test :refer [deftest is]] [k16.gx.beta.system :as gx.system] [test-utils :refer [test-async]]) #?(:clj (:import [clojure.lang ExceptionInfo]))) (def ^:export server {:gx/start {:gx/proc...
null
https://raw.githubusercontent.com/kepler16/gx.cljc/1c4af0f48bb48514009fb95321d4fa2ce6520820/test/k16/gx/beta/system_test.cljc
clojure
(ns k16.gx.beta.system-test (:require #?(:cljs [cljs.core :refer [ExceptionInfo]]) [clojure.test :refer [deftest is]] [k16.gx.beta.system :as gx.system] [test-utils :refer [test-async]]) #?(:clj (:import [clojure.lang ExceptionInfo]))) (def ^:export server {:gx/start {:gx/proc...
fcd62dd5e9e826eb9ea6b8ee8b7fe30666b66570d29c22c0a290bd6da5de0cd2
MaximGB/TetrisRF
timer.cljs
(ns tetrisrf.timer (:require [goog.Timer] [re-frame.core :as rf])) (declare set-timer-interval set-timer-tick-handler) (defn create-timer [& [ms tick-handler]] "Creates timer with the given `ms` and optional `tick-handler`." (let [t (goog.Timer. ms)] (if (not (nil? ms)) (set-tim...
null
https://raw.githubusercontent.com/MaximGB/TetrisRF/19a91c145a27e8819efebcc9f4e86bbfc15c8d7f/src/tetrisrf/timer.cljs
clojure
(ns tetrisrf.timer (:require [goog.Timer] [re-frame.core :as rf])) (declare set-timer-interval set-timer-tick-handler) (defn create-timer [& [ms tick-handler]] "Creates timer with the given `ms` and optional `tick-handler`." (let [t (goog.Timer. ms)] (if (not (nil? ms)) (set-tim...
2c98fd446ddd096b26d4b20e5d4e3b4a7032e8865002c2e4ff4d4d36a4241914
startalkIM/ejabberd
mod_privacy_riak.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2016 , %%% @doc %%% %%% @end Created : 14 Apr 2016 by < > %%%------------------------------------------------------------------- -module(mod_privacy_riak). -behaviour(mod_privacy). %% API -export([init/2, process_l...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/mod_privacy_riak.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API =================================================================== API =================================================================== =========================...
@author < > ( C ) 2016 , Created : 14 Apr 2016 by < > -module(mod_privacy_riak). -behaviour(mod_privacy). -export([init/2, process_lists_get/2, process_list_get/3, process_default_set/3, process_active_set/3, remove_privacy_list/3, set_privacy_list/1, set_privacy_list/4, get_user_list/2, get_user...
939744ac2e07a958551fbe14bfb325b8464fef57cb3d6b26ccb6b9ecfbffdc7a
GaloisInc/saw-script
Override.hs
| Module : SAWScript . Crucible . JVM.Override Description : Override matching and application for JVM License : : atomb Stability : provisional Module : SAWScript.Crucible.JVM.Override Description : Override matching and application for JVM License : BSD3 Maintainer : atomb Sta...
null
https://raw.githubusercontent.com/GaloisInc/saw-script/54d8f453c289f3678b00fb638a46dade470436d8/src/SAWScript/Crucible/JVM/Override.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # what4 crucible crucible-jvm parameterized-utils saw-core A few convenient synonyms TODO: Improve? the 'LLVMVal'. ^ output/verbosity options ^ for name and typing environments ^ the value from the simulator ^ the value from the sp...
| Module : SAWScript . Crucible . JVM.Override Description : Override matching and application for JVM License : : atomb Stability : provisional Module : SAWScript.Crucible.JVM.Override Description : Override matching and application for JVM License : BSD3 Maintainer : atomb Sta...
af54c80c4d393a0596c3348945326da338e635dd5bcd8a566e4d6c693a0a578a
fpco/ide-backend
test-db-order.hs
module Main where import Testing.TestPkgE import Testing.TestPkgF main :: IO () main = do putStrLn testPkgE putStrLn testPkgF
null
https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/test-db-order/test-db-order.hs
haskell
module Main where import Testing.TestPkgE import Testing.TestPkgF main :: IO () main = do putStrLn testPkgE putStrLn testPkgF
7049dd29c6137a383300ecce9e1fd78c530bd22808957870b5a1fd5331902192
exoscale/reporter
specs_test.clj
(ns spootnik.reporter.specs-test (:require [clojure.test :refer :all] [clojure.spec.alpha :as s] [spootnik.reporter.specs])) (def valid-reporter-config {:sentry {:dsn ":/31337"} :prometheus {:port 8007} :pushgateway {:host "localhost" :job :foo :port ...
null
https://raw.githubusercontent.com/exoscale/reporter/171f8091ef4c04c5c9e6a63b0bf6e4fc37289ecd/test/spootnik/reporter/specs_test.clj
clojure
Test a couple of locations, dont need to be exhaustive
(ns spootnik.reporter.specs-test (:require [clojure.test :refer :all] [clojure.spec.alpha :as s] [spootnik.reporter.specs])) (def valid-reporter-config {:sentry {:dsn ":/31337"} :prometheus {:port 8007} :pushgateway {:host "localhost" :job :foo :port ...
cb04d9bdee81defdd992c087cb1dbb6fab65ea8bf4086795d877f8d4d06ecdd4
andrewhr/codeclimate-kibit
project.clj
(defproject codeclimate-kibit "0.1.0-SNAPSHOT" :description "Code Climate Analysis Engine for clojure kibit" :url "-kibit" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0"] [org.clojure/tools.cli "0.3.7"] [jonas...
null
https://raw.githubusercontent.com/andrewhr/codeclimate-kibit/0418cc77d017d4c1c76152c959dd1c048ba0e006/project.clj
clojure
(defproject codeclimate-kibit "0.1.0-SNAPSHOT" :description "Code Climate Analysis Engine for clojure kibit" :url "-kibit" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.9.0"] [org.clojure/tools.cli "0.3.7"] [jonas...
e84a3ce245bfd97f6fd437bb21f44c46c13ee72ef5c4b41f9cbeea9e6b364ec8
atzeus/FRPNow
ConcFlag.hs
module ConcFlag where import Control.Concurrent.MVar type Flag = MVar () A concurrent flag signaling if an update should take place , designed for one reader and multiple writers if the flag is set , the reader has not seen the flag yet , and setting the flag is idempotent . designed for one read...
null
https://raw.githubusercontent.com/atzeus/FRPNow/58073b88dfd725eab6851a75b4c9f01f9d3f97d2/PaperImpl/ConcFlag.hs
haskell
module ConcFlag where import Control.Concurrent.MVar type Flag = MVar () A concurrent flag signaling if an update should take place , designed for one reader and multiple writers if the flag is set , the reader has not seen the flag yet , and setting the flag is idempotent . designed for one read...
5de2fa21968314493a95589ca484a75357d5ccb9f15558f612e13aaf54c175e1
zack-bitcoin/amoveo
version.erl
-module(version). -export([doit/1]). %This is to make transaction replay protection easy. When we fork, we don't want the same txs to be valid on both sides. %doit(H) -> 0. doit(H) -> F4 = forks:get(4), if H > F4 -> 3; true -> 2 end.
null
https://raw.githubusercontent.com/zack-bitcoin/amoveo/257f3e8cc07f1bae9df1a7252b8bc67a0dad3262/apps/amoveo_core/src/consensus/version.erl
erlang
This is to make transaction replay protection easy. When we fork, we don't want the same txs to be valid on both sides. doit(H) -> 0.
-module(version). -export([doit/1]). doit(H) -> F4 = forks:get(4), if H > F4 -> 3; true -> 2 end.
2711691488a72a48a4da9c8ec5e3eced732c0ef6700843188d949ab6dd4fc880
zotonic/zotonic
filter_in_past.erl
@author < > 2010 %% @doc 'in_past' filter, test if a date is in the past. Copyright 2010 %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless re...
null
https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_base/src/filters/filter_in_past.erl
erlang
@doc 'in_past' filter, test if a date is in the past. you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. S...
@author < > 2010 Copyright 2010 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(filter_in_past). -export([in_past/2]). in_past({_,_,_} = Date, _Context) -> {LocalDate, _} = erlang:universaltime(), ...
e1514b555b0bc750e3f1cde92fc31b53c696e390be1dceb7785a1d589f69d067
dwango/fialyzer
type_check.mli
open Base val check_modules : Plt.t option -> Ast.module_ list -> (unit, exn) Result.t
null
https://raw.githubusercontent.com/dwango/fialyzer/3c4b4fc2dacf84008910135bfef16e4ce79f9c89/lib/type_check.mli
ocaml
open Base val check_modules : Plt.t option -> Ast.module_ list -> (unit, exn) Result.t
cff2ba5198278ca03c558dd0ace8eec51669ed392f6e39072653b32d0cdb341f
ragkousism/Guix-on-Hurd
monads.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 , 2014 , 2015 , 2016 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU 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 ...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/tests/monads.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2013 , 2014 , 2015 , 2016 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (test-monads) #:use-module (guix tests) #:use-module (guix store) #:use-...
1f512299ca6d11a2d49f2751ec1d83abdc6e7b7e59262b0ecea2c62fba4f3d3d
1ma/branca-erl
branca_tests.erl
-module(branca_tests). -include_lib("eunit/include/eunit.hrl"). happy_path_test() -> Secret = enacl:randombytes(32), Message = <<"abcd">>, ?assertEqual({ok, Message}, branca:decode(branca:encode(Message, Secret), Secret)). bad_encoding_test() -> Secret = enacl:randombytes(32), NonBase62CipherText = <<"abcd%...
null
https://raw.githubusercontent.com/1ma/branca-erl/6a64ad1d8c65f3ea7b91e3e56dfbfdab5df7d870/test/branca_tests.erl
erlang
-module(branca_tests). -include_lib("eunit/include/eunit.hrl"). happy_path_test() -> Secret = enacl:randombytes(32), Message = <<"abcd">>, ?assertEqual({ok, Message}, branca:decode(branca:encode(Message, Secret), Secret)). bad_encoding_test() -> Secret = enacl:randombytes(32), NonBase62CipherText = <<"abcd%...
79ee2ddaf323ee4807e28a7d13fcf6d774768fc100af2ae979f887b2afacc657
input-output-hk/cardano-sl
Exception.hs
# LANGUAGE ExistentialQuantification # -- | Exceptions hierarchy in cardano-sl. module Pos.Core.Exception ( CardanoException (..) , cardanoExceptionToException , cardanoExceptionFromException , CardanoFatalError (..) , reportFatalError , assertionFailed ) where impor...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/src/Pos/Core/Exception.hs
haskell
| Exceptions hierarchy in cardano-sl. | Root of exceptions in cardano-sl. | Error indicating that something really bad happened. Should be used when serious assertions fail (local equivalent of 'panic'). 'panic' is still alright to use, but preferably in pure environment. | Print red message about fatal error an...
# LANGUAGE ExistentialQuantification # module Pos.Core.Exception ( CardanoException (..) , cardanoExceptionToException , cardanoExceptionFromException , CardanoFatalError (..) , reportFatalError , assertionFailed ) where import Control.Exception.Safe (Excep...
b6107c31f9b61fe99e56a3c0d43db6651624161a7c2f32137f933ff5fd703e6f
monadicsystems/okapi
Spec.hs
type Okapi = OkapiT IO testServer :: Okapi Okapi.Response testServer = do let parser1 = do get pathSeg "todos" respond ok parser2 = do get path ["todos", "completed"] respond ok parser3 = do get pathSeg "todos" status <- queryParam...
null
https://raw.githubusercontent.com/monadicsystems/okapi/8a0c17485b3778d819d0cf38b63a2e20406f466a/experimental/Spec.hs
haskell
TODO: NO NEED TO BE EXPLICIT HERE?? | Test example patterns in Okapi.Request module >>> assertResponse is200 result1 True True >>> assertResponse is200 result3 True True False >>> testBlogPattern True >>> testBlogIdPattern True
type Okapi = OkapiT IO testServer :: Okapi Okapi.Response testServer = do let parser1 = do get pathSeg "todos" respond ok parser2 = do get path ["todos", "completed"] respond ok parser3 = do get pathSeg "todos" status <- queryParam...
be1b7426d31c44ed3566c157db795cf10f63991ffaa80baa1073ffd258dfb3a2
bblimke/clj-pusher
auth_test.clj
(ns pusher.auth-test (:use [pusher.auth] :reload-all) (:use [clojure.test])) (def request {:method "POST" :path "/some/path" :query {"name" "my_event"} :body "{\"some\":\"data\"}"}) (deftest test-authenticated-request (binding [*current-time-millis* (fn [] (long 13243...
null
https://raw.githubusercontent.com/bblimke/clj-pusher/e81e7e6a4fa26d0ae989de51427428776003ba21/test/pusher/auth_test.clj
clojure
(ns pusher.auth-test (:use [pusher.auth] :reload-all) (:use [clojure.test])) (def request {:method "POST" :path "/some/path" :query {"name" "my_event"} :body "{\"some\":\"data\"}"}) (deftest test-authenticated-request (binding [*current-time-millis* (fn [] (long 13243...
935b12a22c9a4316357174fff461634f3493e62bd50f4eb97f389cdbb3a5a1f7
lambdaisland/specmonstah-malli
malli_test.cljc
(ns lambdaisland.specmonstah.malli-test (:require [clojure.test :as t :refer [deftest is]] [lambdaisland.specmonstah.malli :as sm-malli] [matcher-combinators.test] [reifyhealth.specmonstah.core :as sm])) (def schema {:user {:prefix :u :schema [:map [...
null
https://raw.githubusercontent.com/lambdaisland/specmonstah-malli/958ad20edaf4e8c76bedf9425ca5c0f30b38612a/test/lambdaisland/specmonstah/malli_test.cljc
clojure
(ns lambdaisland.specmonstah.malli-test (:require [clojure.test :as t :refer [deftest is]] [lambdaisland.specmonstah.malli :as sm-malli] [matcher-combinators.test] [reifyhealth.specmonstah.core :as sm])) (def schema {:user {:prefix :u :schema [:map [...
b7f3f2cb5a8b9ab77d7e1680baa0de75bea9e16c1cd72833583c3719c443e4e2
tcsprojects/mlsolver
ctlplustracenba.ml
open Tcsautomata;; open Tcsbasedata;; open Tcsset;; open Tcsctlstarformula;; open Ctlstartracenba;; type rules = Ctlstartracenba.rules type ctlplus_trace_nba_state = Failed | Waiting | TrackingE of block | TrackingA of block * int let ctlplus_trace_nba ((r,...
null
https://raw.githubusercontent.com/tcsprojects/mlsolver/fdd1d7550aa57a42886160ae1e8336c1111b7d94/src/automata/ctlstar/ctlplustracenba.ml
ocaml
open Tcsautomata;; open Tcsbasedata;; open Tcsset;; open Tcsctlstarformula;; open Ctlstartracenba;; type rules = Ctlstartracenba.rules type ctlplus_trace_nba_state = Failed | Waiting | TrackingE of block | TrackingA of block * int let ctlplus_trace_nba ((r,...
049bb16ef58d5bf9ba99977ae48ad84b18613329edff0a8470c594eadae799d6
johnelse/spotify-cli
backend.mli
open Spotify_cli_types val next: unit -> (unit command_result) Lwt.t val play_pause: unit -> (unit command_result) Lwt.t val previous: unit -> (unit command_result) Lwt.t val play_album: string -> (unit command_result) Lwt.t val play_artist: string -> (unit command_result) Lwt.t val play_track: string -> (unit comman...
null
https://raw.githubusercontent.com/johnelse/spotify-cli/c01937b4be35fb42df58d31d9a5b6ed3d1af66c7/src/backend.mli
ocaml
open Spotify_cli_types val next: unit -> (unit command_result) Lwt.t val play_pause: unit -> (unit command_result) Lwt.t val previous: unit -> (unit command_result) Lwt.t val play_album: string -> (unit command_result) Lwt.t val play_artist: string -> (unit command_result) Lwt.t val play_track: string -> (unit comman...
3ad6b89faf5b01bf438e637a818c6d71d29e78c2bf024d754437754ec2fd2048
sol/reserve
Helper.hs
module Helper ( module Test.Hspec , module Control.Applicative , module Test.Mockery.Directory ) where import Test.Hspec import Test.Mockery.Directory import Control.Applicative
null
https://raw.githubusercontent.com/sol/reserve/9a42242b3579134bc69eb71c0da007e429f5de11/test/Helper.hs
haskell
module Helper ( module Test.Hspec , module Control.Applicative , module Test.Mockery.Directory ) where import Test.Hspec import Test.Mockery.Directory import Control.Applicative
67a6e9b50cf5b631415a01af9bd8d1c8b8761d6a71a1eb16f412bccfcb9a1a17
xu-hao/QueryArrow
Service.hs
# LANGUAGE TypeFamilies # module QueryArrow.FFI.Service where import QueryArrow.Syntax.Term import QueryArrow.DB.DB import QueryArrow.Serialization import Control.Monad.Trans.Except (ExceptT) data QueryArrowService a = QueryArrowService { execQuery :: a -> Formula -> MapResultRow -> ExceptT Error IO (), getA...
null
https://raw.githubusercontent.com/xu-hao/QueryArrow/4dd5b8a22c8ed2d24818de5b8bcaa9abc456ef0d/QueryArrow-ffi-service/src/QueryArrow/FFI/Service.hs
haskell
# LANGUAGE TypeFamilies # module QueryArrow.FFI.Service where import QueryArrow.Syntax.Term import QueryArrow.DB.DB import QueryArrow.Serialization import Control.Monad.Trans.Except (ExceptT) data QueryArrowService a = QueryArrowService { execQuery :: a -> Formula -> MapResultRow -> ExceptT Error IO (), getA...
f7012619c381279e0c4c44960064728c3500bbbf48ec4cd2043c38a36a609c4f
racket/math
utils.rkt
#lang typed/racket/base (require (for-syntax racket/base racket/syntax racket/string) racket/performance-hint "../../flonum.rkt" "../utils.rkt" "impl/delta-dist.rkt" "dist-struct.rkt") (provide (all-defined-out)) (begin-encourage-...
null
https://raw.githubusercontent.com/racket/math/dcd2ea1893dc5b45b26c8312997917a15fcd1c4a/math-lib/math/private/distributions/utils.rkt
racket
=================================================================================================== =================================================================================================== ===================================================================================================
#lang typed/racket/base (require (for-syntax racket/base racket/syntax racket/string) racket/performance-hint "../../flonum.rkt" "../utils.rkt" "impl/delta-dist.rkt" "dist-struct.rkt") (provide (all-defined-out)) (begin-encourage-...
81aaab6a1e1e6617137056880d669224a93b9dddb0b91b2cac23176fdf37afff
karen/haskell-book
ch15.hs
import Data.Monoid import Test.QuickCheck data Optional a = Nada | Only a deriving (Eq, Show) instance Monoid a => Monoid (Optional a) where mempty = Nada mappend Nada sth = sth mappend sth Nada = sth mappend (Only a) (Only a') = Only (a `mappend` a') newtype First' a = First' { getFirst'...
null
https://raw.githubusercontent.com/karen/haskell-book/90bb80ec3203fde68fc7fda1662d9fc8b509d179/src/ch15/ch15.hs
haskell
import Data.Monoid import Test.QuickCheck data Optional a = Nada | Only a deriving (Eq, Show) instance Monoid a => Monoid (Optional a) where mempty = Nada mappend Nada sth = sth mappend sth Nada = sth mappend (Only a) (Only a') = Only (a `mappend` a') newtype First' a = First' { getFirst'...
3de624a1a811e0a996f953b27d6711c104e43cf5c097c130eccfcd1c7a0d45ef
mflatt/scratchy
scratchy.rkt
#lang racket/base (require "runtime.rkt" "images.rkt" racket/stxparam racket/splicing racket/class racket/runtime-path racket/include racket/promise (for-syntax racket/base syntax/parse)) (provide (except-out (all-from-out rac...
null
https://raw.githubusercontent.com/mflatt/scratchy/aef8883759fc962828bf977811697fccf06ef8b0/scratchy/scratchy.rkt
racket
The methods listed here are also exported: The additional keywords listed here are also exported: ---------------------------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- ---------...
#lang racket/base (require "runtime.rkt" "images.rkt" racket/stxparam racket/splicing racket/class racket/runtime-path racket/include racket/promise (for-syntax racket/base syntax/parse)) (provide (except-out (all-from-out rac...
6bc86855841eaa44290c6d6c56fb362eddd1f62883516ff923a3d821f6a5b466
incanter/incanter
project.clj
(defproject myproject "1.0.0-SNAPSHOT" :description "Example Incanter project" :dependencies [[incanter "1.2.1-SNAPSHOT"] [antlr/stringtemplate "2.2"]] :main hello)
null
https://raw.githubusercontent.com/incanter/incanter/e0a03aac237fcc60587278a36bd2e76266fc6356/examples/blog/projects/string_template/project.clj
clojure
(defproject myproject "1.0.0-SNAPSHOT" :description "Example Incanter project" :dependencies [[incanter "1.2.1-SNAPSHOT"] [antlr/stringtemplate "2.2"]] :main hello)
1c3656b98dd537faacc1f15e20e342b0c8c703c51c5c394376066739274764dd
janestreet/async_smtp
inline_image.ml
open! Core open Async open Async_smtp let html_string : string = {| <html><body> <div style="white-space:pre; font-family:courier"> Here is an html email with an inline image (png): <h4>H4 heading</h4> <img src="cid:png_id"/><br> </div> </body></html> |} ;; let body : Email.Simple.Content.t = Email.S...
null
https://raw.githubusercontent.com/janestreet/async_smtp/ffe145b51d7c3d49705deb51ce33a53a21083403/sample/inline_image.ml
ocaml
open! Core open Async open Async_smtp let html_string : string = {| <html><body> <div style="white-space:pre; font-family:courier"> Here is an html email with an inline image (png): <h4>H4 heading</h4> <img src="cid:png_id"/><br> </div> </body></html> |} ;; let body : Email.Simple.Content.t = Email.S...
450f0845e11d3caae78123b5083e27866d4d6c241e6d4773319a812dd365495f
Raynes/tentacles
data.clj
(ns tentacles.data "Implements the Git Data API: /" (:use [tentacles.core :only [api-call]])) ;; ## Blobs (defn blob "Get a blob." [user repo sha & [options]] (api-call :get "repos/%s/%s/git/blobs/%s" [user repo sha] options)) (defn create-blob "Create a blob." [user repo content encoding options] (a...
null
https://raw.githubusercontent.com/Raynes/tentacles/0e16d9f04777efd7c56b6306b9ea7d850c0a8d0d/src/tentacles/data.clj
clojure
## Blobs ## References whether to force the update or make ## Tags The API documentation is unclear about which parts of this API call are optional. get a tree recursively?"
(ns tentacles.data "Implements the Git Data API: /" (:use [tentacles.core :only [api-call]])) (defn blob "Get a blob." [user repo sha & [options]] (api-call :get "repos/%s/%s/git/blobs/%s" [user repo sha] options)) (defn create-blob "Create a blob." [user repo content encoding options] (api-call :pos...
7521359664e32459bb4974b970b1ae3e0c9245e50c39ab13014c6a6f9ddd395e
nyu-acsys/drift
a-iter.ml
let succ si = si + 1 let rec iter_helper (hf: int -> int) hi hn (ha: int array) = if (hi < hn) then let _ = hf (Array.get ha hi) in iter_helper hf (hi + 1) hn ha else () let rec iter (mf: int -> int) (ma: int array) = let mn = Array.length ma in iter_helper mf 0 mn ma let main (n(*-:{v:Int | true}*)) = i...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/DRIFT/array/a-iter.ml
ocaml
-:{v:Int | true}
let succ si = si + 1 let rec iter_helper (hf: int -> int) hi hn (ha: int array) = if (hi < hn) then let _ = hf (Array.get ha hi) in iter_helper hf (hi + 1) hn ha else () let rec iter (mf: int -> int) (ma: int array) = let mn = Array.length ma in iter_helper mf 0 mn ma if n > 0 then let a = Array.make n ...
765308865b8fe5baf53a5bf723d8ebaa5ae33c5fc39524270f829e419b2805dd
annenkov/unmix
xarta.rkt
#lang racket (require racket/mpair) (require "x-misc.rkt") (define (uarta:analyze-argument-types prog) (define types #f) (define types-modified? #f) (define (initial-types) `(,(initial-types-func 'any (car prog)) unquote (map (lambda (fundef) (initial-types-func 'absent fundef)) (cdr pr...
null
https://raw.githubusercontent.com/annenkov/unmix/e156fb706e52994f86029ac512a79c737d7ee0d8/xarta.rkt
racket
converting to immutable converting to mutable converting to mutable converting to mutable
#lang racket (require racket/mpair) (require "x-misc.rkt") (define (uarta:analyze-argument-types prog) (define types #f) (define types-modified? #f) (define (initial-types) `(,(initial-types-func 'any (car prog)) unquote (map (lambda (fundef) (initial-types-func 'absent fundef)) (cdr pr...
09d8a6f6009cc6f68ee531ed56ddb21ccae1214f0a78ed31d09d0f87582a69cd
igrishaev/user-agent
project.clj
(defproject user-agent "0.1.2-SNAPSHOT" :description "User-Agent parser" :url "-agent" :deploy-repositories {"releases" {:url "" :creds :gpg}} :license {:name "Eclipse Public License" :url "-v10.html"} :release-tasks [["vcs" "assert-committed"] ["test"] ["change" "version" "lein...
null
https://raw.githubusercontent.com/igrishaev/user-agent/a75e124351e78c20c08f03e7e9aba0a4ab24899c/project.clj
clojure
(defproject user-agent "0.1.2-SNAPSHOT" :description "User-Agent parser" :url "-agent" :deploy-repositories {"releases" {:url "" :creds :gpg}} :license {:name "Eclipse Public License" :url "-v10.html"} :release-tasks [["vcs" "assert-committed"] ["test"] ["change" "version" "lein...
3a9820dcec8fffa6aa6625c298535df33c01785dc27ba956cdda9f3d1bffbac3
ghc/packages-ghc-prim
Magic.hs
# LANGUAGE Trustworthy # # LANGUAGE NoImplicitPrelude # ----------------------------------------------------------------------------- -- | Module : GHC.Magic Copyright : ( c ) The University of Glasgow 2009 License : see libraries / ghc - prim / LICENSE -- -- Maintainer : -- Stability : ...
null
https://raw.githubusercontent.com/ghc/packages-ghc-prim/ad9bf96815cb5a9bb4acc51c99eff20be3e50da3/GHC/Magic.hs
haskell
--------------------------------------------------------------------------- | Maintainer : Stability : internal Use GHC.Exts from the base package instead of importing this module directly. --------------------------------------------------------------------------- | The call '(inline f)' arranges that ...
# LANGUAGE Trustworthy # # LANGUAGE NoImplicitPrelude # Module : GHC.Magic Copyright : ( c ) The University of Glasgow 2009 License : see libraries / ghc - prim / LICENSE Portability : non - portable ( GHC Extensions ) GHC magic . module GHC.Magic ( inline, lazy ) where definition si...
1778a2a2e3212e0f86c6315abbafe030e7c5c615c53332b558bd5133b6d9ac3c
fulcrologic/fulcro-rad-kvstore
authorization.clj
(ns com.example.model.authorization (:require [com.fulcrologic.fulcro.server.api-middleware :as fmw] [com.fulcrologic.rad.authorization :as auth] [com.fulcrologic.rad.attributes :as attr] [com.example.components.database-queries :as queries] [taoensso.encore :as enc] [taoensso.timbre :as log] ...
null
https://raw.githubusercontent.com/fulcrologic/fulcro-rad-kvstore/d0dff827ee2200090d70768a9e581ba91f84f937/src/demo-project/com/example/model/authorization.clj
clojure
There's nothing 'datomic' about them
(ns com.example.model.authorization (:require [com.fulcrologic.fulcro.server.api-middleware :as fmw] [com.fulcrologic.rad.authorization :as auth] [com.fulcrologic.rad.attributes :as attr] [com.example.components.database-queries :as queries] [taoensso.encore :as enc] [taoensso.timbre :as log] ...
bb1cf4d84cbff021bb87c7c2a09a6cd991a43a723250ce4fb1d6026a459da299
RaphaelJ/friday
Type.hs
# LANGUAGE BangPatterns , , TypeFamilies # , GeneralizedNewtypeDeriving , TypeFamilies #-} module Vision.Image.Grey.Type ( Grey, GreyPixel (..), GreyDelayed ) where import Data.Bits import Data.Word import Foreign.Storable (Storable) import Vision.Image.Class (Pixel (.....
null
https://raw.githubusercontent.com/RaphaelJ/friday/13c6bb16bb04856e0cb226726017e7a7ad502cb5/src/Vision/Image/Grey/Type.hs
haskell
# INLINE pixIndex #
# LANGUAGE BangPatterns , , TypeFamilies # , GeneralizedNewtypeDeriving , TypeFamilies #-} module Vision.Image.Grey.Type ( Grey, GreyPixel (..), GreyDelayed ) where import Data.Bits import Data.Word import Foreign.Storable (Storable) import Vision.Image.Class (Pixel (.....
3498a00e5b2f15881d5d3ab0884ed6a6f3374e7c9a0bb86d997b7e7ce991f1ff
ocaml-ppx/ocamlformat
qtest.ml
(*$T false *) $ T foo foo 0 ( + ) [ 1;2;3 ] = 6 ( * hehe foo 0 ( + ) [1;2;3] = 6 (* hehe *) haha ( * hoho foo 1 ( * ) [4;5] = 20 foo 12 ( + ) [] = 12 *) $ T foo foo 1 ( * ) [ 4;5 ] = foo 2 ( * ) [ 1;5;2 ] foo 1 ( * ) [4;5] = foo 2 ( * ) [1;5;2] *) $ = foo & ~printer : string_of_in...
null
https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/9193d712e408f89a48b00df924a56edeaccefc6f/test/passing/tests/qtest.ml
ocaml
$T false hehe pertinent comment $T brom brom.[2] = 'z' $Q & ~max_gen:1000000 ~count:1000000 (Q.make (fun _ -> ())) (fun () -> true)
$ T foo foo 0 ( + ) [ 1;2;3 ] = 6 ( * hehe haha ( * hoho foo 1 ( * ) [4;5] = 20 foo 12 ( + ) [] = 12 *) $ T foo foo 1 ( * ) [ 4;5 ] = foo 2 ( * ) [ 1;5;2 ] foo 1 ( * ) [4;5] = foo 2 ( * ) [1;5;2] *) $ = foo & ~printer : string_of_int ( foo 1 ( * ) [ 4;5 ] ) ( foo 2 ( * ) [ 1;5;2 ] )...
6fc8dfba8084e0f3e83b501d286e243b839dc7ba4dc0922ccdfcc3fb5e50101a
cocreature/zkboo-hs
Util.hs
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE KindSignatures # # LANGUAGE ScopedTypeVariables # module Crypto.ZKBoo.Util ( ZN , RandomElement(..) , randomNumber , FromBytes(..) , ToBytes(..) , word8To2bitChunks , _2bitChunksToWord8 ) where import qualified ByteString.StrictBuilder as ByteStr...
null
https://raw.githubusercontent.com/cocreature/zkboo-hs/bb0ba6a461aec3cc4cd4e020927a6ad928d12a52/src/Crypto/ZKBoo/Util.hs
haskell
| Generate a random number in range [0, n). implementation (). Specifically, be divisible by n, and thus applying 'mod' to it will be safe. size of integers, in bytes | ℤ/nℤ | Class for types from which elements can be drawn uniformly at random. | This should give back an element selected uniformly at random f...
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE KindSignatures # # LANGUAGE ScopedTypeVariables # module Crypto.ZKBoo.Util ( ZN , RandomElement(..) , randomNumber , FromBytes(..) , ToBytes(..) , word8To2bitChunks , _2bitChunksToWord8 ) where import qualified ByteString.StrictBuilder as ByteStr...
78054ac5054b783b2edf9fbb8ee27866a57ec92c88dc8211f8ca0aabc0f4beb2
exercism/ocaml
test.ml
open Base open OUnit2 open Dominoes let print_dominoe (d1, d2) = Printf.sprintf "(%d,%d)" d1 d2 let dominoes_printer xs = "[" ^ String.concat ~sep:";" (List.map xs ~f:print_dominoe) ^ "]" let option_printer = function | None -> "None" | Some xs -> "Some " ^ dominoes_printer xs let rotate_1 xs = List.tl_exn xs @ ...
null
https://raw.githubusercontent.com/exercism/ocaml/bfd6121f757817865a34db06c3188b5e0ccab518/exercises/practice/dominoes/test.ml
ocaml
open Base open OUnit2 open Dominoes let print_dominoe (d1, d2) = Printf.sprintf "(%d,%d)" d1 d2 let dominoes_printer xs = "[" ^ String.concat ~sep:";" (List.map xs ~f:print_dominoe) ^ "]" let option_printer = function | None -> "None" | Some xs -> "Some " ^ dominoes_printer xs let rotate_1 xs = List.tl_exn xs @ ...
581412dc813a787d2ef662fb3e105feea7978e4bde2530bcd1d1855230ba3897
tek/chiasma
WithPaneId.hs
module Chiasma.Data.WithPaneId where import qualified Data.Text as Text import Chiasma.Codec (TmuxCodec (decode, query), trim) import Chiasma.Codec.Decode (primDecode) import Chiasma.Data.DecodeError (DecodeError (DecodeError), DecodeFailure (TooFewFields)) import qualified Chiasma.Data.TmuxId as TmuxId import Chiasm...
null
https://raw.githubusercontent.com/tek/chiasma/45ce231f629db9ed67c78ce872ac719a90a217bd/packages/chiasma/lib/Chiasma/Data/WithPaneId.hs
haskell
module Chiasma.Data.WithPaneId where import qualified Data.Text as Text import Chiasma.Codec (TmuxCodec (decode, query), trim) import Chiasma.Codec.Decode (primDecode) import Chiasma.Data.DecodeError (DecodeError (DecodeError), DecodeFailure (TooFewFields)) import qualified Chiasma.Data.TmuxId as TmuxId import Chiasm...
1933f83a7d8448a38a8f177bc3a4a45b7ef9ed0fd25d0414acd57c63d85c15cc
pepeiborra/schemas
Internal.hs
# LANGUAGE ApplicativeDo # {-# LANGUAGE DerivingVia #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE ImpredicativeTypes # # LANGUAGE LambdaCase ...
null
https://raw.githubusercontent.com/pepeiborra/schemas/b8e6cf3cf5866384b85b19058c5673fe8fc4d4a5/src/Schemas/Internal.hs
haskell
# LANGUAGE DerivingVia # # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE TypeOperators # # OPTIONS -Wno-name-shadowing # Typed schemas -------------------------------------------------------------------------------- for composition ...
# LANGUAGE ApplicativeDo # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE ImpredicativeTypes # # LANGUAGE LambdaCase # # LANGUAGE OverloadedLists # # LANGUAGE RecordWildCards ...
b2881de07ac1b4c366383c831d8bf841ab9698e448ad87acd2fdc47867fbb075
swtwsk/vinci-lang
SpirCompilerMonad.hs
# LANGUAGE GeneralizedNewtypeDeriving # module SPIRV.SpirCompilerMonad ( SpirCompiler , CompilerException , StateEnv(..) , SConst(..) , TypeIdsMap , runCompiler , execCompiler , evalCompiler , initialStateEnv , nextVar , buildVar , output , insertRenamed , getRen...
null
https://raw.githubusercontent.com/swtwsk/vinci-lang/9c7e01953e0b1cf135af7188e0c71fe6195bdfa1/src/SPIRV/SpirCompilerMonad.hs
haskell
| A monad containing an updatable state of type @StateEnv@ and output of type @SpirList@. type CompilerException = () courtesy of
# LANGUAGE GeneralizedNewtypeDeriving # module SPIRV.SpirCompilerMonad ( SpirCompiler , CompilerException , StateEnv(..) , SConst(..) , TypeIdsMap , runCompiler , execCompiler , evalCompiler , initialStateEnv , nextVar , buildVar , output , insertRenamed , getRen...
2d463b2b18ee753484a7b8258ad444f884874913e3d6e789f6c97fc4e03ee476
toschoo/mom
types.hs
module Main where import Common import System.Exit import System.Timeout import qualified System.ZMQ as Z import Test.QuickCheck import Test.QuickCheck.Monadic import qualified Data.ByteString.Char8 as B import Data.Time.Clock import ...
null
https://raw.githubusercontent.com/toschoo/mom/b58ca23d05c98ab50d9e981bd4ad2cdb76846399/src/patterns/test/suite/types.hs
haskell
?>
module Main where import Common import System.Exit import System.Timeout import qualified System.ZMQ as Z import Test.QuickCheck import Test.QuickCheck.Monadic import qualified Data.ByteString.Char8 as B import Data.Time.Clock import ...
99026a98f5fc36bfe8f6c7e3ab2b0ed4932051a6fd6b465c7a1f085da213eccd
mzp/msgpack-ocaml
main.ml
let _ = print_endline "hello"
null
https://raw.githubusercontent.com/mzp/msgpack-ocaml/acfbfcbcc62a4f69f9fd024e28e42086048a9f16/lib/core/main.ml
ocaml
let _ = print_endline "hello"
fbc27be0d9055f48c006f865adaa7a19a2c64e543f12a926f2887777eed9cf2c
LesleyLai/PFPL-Interpreters
interpreter.ml
open! Base open Types let unimp: string -> 'a = fun s -> failwith ("Unimplemented: " ^ s) module TypCtx = struct type t = typ Map.M(String).t let empty: t = Map.empty (module String) let lookup: var -> t -> typ option = fun x gamma -> Map.find gamma x let extend: var -> typ -> t -> t = fun x tau gamma ->...
null
https://raw.githubusercontent.com/LesleyLai/PFPL-Interpreters/5da05555b8590aa039933eb131cafd095290bde2/lib/e/interpreter.ml
ocaml
[e1/x]e2 Assert that expr is well typed
open! Base open Types let unimp: string -> 'a = fun s -> failwith ("Unimplemented: " ^ s) module TypCtx = struct type t = typ Map.M(String).t let empty: t = Map.empty (module String) let lookup: var -> t -> typ option = fun x gamma -> Map.find gamma x let extend: var -> typ -> t -> t = fun x tau gamma ->...
fa22c0a156a7a93446e729ea3edb955236c6f61207decb9831193dd1f0186d5a
v-kolesnikov/sicp
2_37_test.clj
(ns sicp.chapter02.2-37-test (:require [clojure.test :refer [deftest]] [sicp.chapter02.2-37 :as sicp-2-37] [sicp.test-helper :refer [assert-equal]])) (deftest test-dot-product (assert-equal 14 (sicp-2-37/dot-product '(1 2 3) '(1 2 3)))) (deftest test-matrix-*-vector (assert-equal '(5 11)...
null
https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/test/sicp/chapter02/2_37_test.clj
clojure
(ns sicp.chapter02.2-37-test (:require [clojure.test :refer [deftest]] [sicp.chapter02.2-37 :as sicp-2-37] [sicp.test-helper :refer [assert-equal]])) (deftest test-dot-product (assert-equal 14 (sicp-2-37/dot-product '(1 2 3) '(1 2 3)))) (deftest test-matrix-*-vector (assert-equal '(5 11)...
c652870eaf13b55a909b13c9278695a22fae6159d8100d6de80e4914b09e4945
amnh/poy5
inversion.ml
let mymodule = (OCAMLSK (** Boolean operations *) (* [m_true] is defined as follows K x y -> x *) let m_true = [SK K] (* [m_false] is the opposite to true S K x y -> K y (x y) -> y *) let m_false = [SK (S K)] (** [m_or x y] is the boolean [x] OR [y]. The argument order in the function * reduces the size. *) let...
null
https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/kolmo/inversion.ml
ocaml
* Boolean operations [m_true] is defined as follows K x y -> x [m_false] is the opposite to true S K x y -> K y (x y) -> y * [m_or x y] is the boolean [x] OR [y]. The argument order in the function * reduces the size. * [m_not x] is the negation of [x]. * [pair a b c] is used to represent pairs of elements [a] a...
let mymodule = let m_true = [SK K] let m_false = [SK (S K)] let m_or x y = if x then x else y let m_not x = if x then m_false else m_true let pair a b c = c a b From the description of [ pair ] , it is easy to see that [ first ] and [ second ] * are [ m_true ] and [ m_false ] respectively . * are [m_true] ...
98513a82a51eaaacde5f31857bae8283549b209d243e9ac8189a4f62549f60db
ermine-language/ermine
Resolver.hs
# LANGUAGE TupleSections # # LANGUAGE TemplateHaskell # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FunctionalDependencies # -------------------------------------------------------------------- -- | Copyright : ( c ) McGraw Hill Financial 2015 Lic...
null
https://raw.githubusercontent.com/ermine-language/ermine/bd58949ab56311be9e0d2506a900f3d77652566b/src/Ermine/Parser/Resolver.hs
haskell
------------------------------------------------------------------ | Stability : experimental Portability: non-portable This module resolution for globals and imports. ------------------------------------------------------------------ | Completely resolve an Import. The import to be resolved. The module the im...
# LANGUAGE TupleSections # # LANGUAGE TemplateHaskell # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FunctionalDependencies # Copyright : ( c ) McGraw Hill Financial 2015 License : BSD2 Maintainer : < > module Ermine.Parser.Resolver ...
d2268336be4250a5aa585d4966c184c870000c5055589ef2284d6bc18db04661
pascal-knodel/haskell-craft
E'6'40.hs
-- -- -- ----------------- Exercise 6.40 . ----------------- -- -- -- module E'6'40 where import B'C'6 ( Name , Price , lineLength ) import E'6'39 ( formatPence ) formatLine :: (Name, Price) -> String formatLine (name , price) = name ++ dots ++ formattedPrice ++ "\n" where formattedPrice :: St...
null
https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'6'40.hs
haskell
--------------- --------------- Definition: "\n" (white space) doesn't count.
Exercise 6.40 . module E'6'40 where import B'C'6 ( Name , Price , lineLength ) import E'6'39 ( formatPence ) formatLine :: (Name, Price) -> String formatLine (name , price) = name ++ dots ++ formattedPrice ++ "\n" where formattedPrice :: String formattedPrice = formatPence price nonFillCh...
88a55791de9f74b5527afafc93cf84ebb0fb5e9b54c7400c53edd54cf3cd68b7
racket/syntax-color
color-textoid.rkt
#lang racket/base (require racket/class) (provide color-textoid<%>) (define color-textoid<%> (interface () get-text get-character last-position position-paragraph paragraph-start-position paragraph-end-position skip-whitespace backward-match backward-containing-sexp for...
null
https://raw.githubusercontent.com/racket/syntax-color/91e79e80517ef94ac7621d3d1f77aaa7cafcf00d/syntax-color-lib/syntax-color/color-textoid.rkt
racket
#lang racket/base (require racket/class) (provide color-textoid<%>) (define color-textoid<%> (interface () get-text get-character last-position position-paragraph paragraph-start-position paragraph-end-position skip-whitespace backward-match backward-containing-sexp for...
b2e1b99a13d0841786b2cf8e056bc676e8e7bb9dd85a18c1b2e0b22a172e9a99
albertoruiz/easyVision
Ellipses.hs
----------------------------------------------------------------------------- -- | -- Module : Util.Ellipses Copyright : ( c ) 2008 - 12 -- License : GPL -- Maintainer : < > -- Stability : provisional -- -- Useful functions for ellipses. -- -----------------------------------------------...
null
https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/packages/base/src/Util/Ellipses.hs
haskell
--------------------------------------------------------------------------- | Module : Util.Ellipses License : GPL Stability : provisional Useful functions for ellipses. --------------------------------------------------------------------------- ----------------------------------------------------...
Copyright : ( c ) 2008 - 12 Maintainer : < > module Util.Ellipses ( * InfoEllipse(..), analyzeEllipse, intersectionEllipses, tangentEllipses, estimateConicRaw, conicPoints, * computeConic, fromUnitCircle, pointsConic, circle, intersectionConicLine ) where...
86212b102d516a29926a11080338e3d3282dfbc74f72acf9e476694300da169a
racket/plai
thunks.rkt
#lang plai/gc2/mutator (allocator-setup "../good-collectors/good-collector.rkt" 5) 3 (define thunker (lambda () 2 'alligator 2 'bananna 2 'frog)) 5 total (thunker)
null
https://raw.githubusercontent.com/racket/plai/164f3b763116fcfa7bd827be511650e71fa04319/plai-lib/tests/gc2/good-mutators/thunks.rkt
racket
#lang plai/gc2/mutator (allocator-setup "../good-collectors/good-collector.rkt" 5) 3 (define thunker (lambda () 2 'alligator 2 'bananna 2 'frog)) 5 total (thunker)
e306e67da8989771d2eca343f772539051447c59d0654c8a957b305f596cbe97
pixlsus/registry.gimp.org_static
bloom.scm
;Script for blooming images created by 07.2009 ; 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 your option) any later version. ; ; Th...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/bloom.scm
scheme
Script for blooming images This program is free software; you can redistribute it and/or modify either version 3 of the License , or (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 MERCH...
created by 07.2009 it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License License version 3 at the web site -3.0.html Alternatively you can write to the Free Software Foundation , Inc. , 675 Mass Ave , Cambridge , ,...
28505f302ba28a983e69157715e52834fe3495e480ae932da5f25dce52326f75
bennn/dissertation
graph-fns-graphviz.rkt
#lang racket/base (require racket/port racket/format racket/set racket/unsafe/ops) (require "gen-graph.rkt" "graph-weighted.rkt") (provide graphviz) (define-syntax-rule (first x) (unsafe-car x)) (define-syntax-rule (second x) (unsafe-car (unsafe-cdr x))) Return a graphviz definition for a graph ;; Pass a hash of ...
null
https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/mbta/base/graph/graph/graph-fns-graphviz.rkt
racket
Pass a hash of vertex -> exact-nonnegative-integer? as coloring to color the nodes Write directed edges as another subgraph
#lang racket/base (require racket/port racket/format racket/set racket/unsafe/ops) (require "gen-graph.rkt" "graph-weighted.rkt") (provide graphviz) (define-syntax-rule (first x) (unsafe-car x)) (define-syntax-rule (second x) (unsafe-car (unsafe-cdr x))) Return a graphviz definition for a graph (define (graphviz ...
6521b3643fe3d9c56743b5b944d2fb08a82d4f1c9c6fd560cdd4fbda693dd6ce
pmatos/racket-binaryen
modules.rkt
#lang racket/base ;; --------------------------------------------------------------------------------------------------- (require "private/binaryen-ffi.rkt" "private/modules.rkt" racket/contract) (provide module? module-ref module-create module-valid? module-print module-optimize! module-read...
null
https://raw.githubusercontent.com/pmatos/racket-binaryen/7658257bdd9b7bc1218e90e0b4c9dc719109a9d6/modules.rkt
racket
--------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------- straightforward way in racket to redirect the stdout to current-output-port. See: -users/c/c3RaYvSD4nE FIXME In the...
#lang racket/base (require "private/binaryen-ffi.rkt" "private/modules.rkt" racket/contract) (provide module? module-ref module-create module-valid? module-print module-optimize! module-read (contract-out [module-parse (string? . -> . module?)] [current-module (parameter/c (or/c #false m...
dafce2b5380dc25d387e79543c193066d4b7eb6a6b385559dff1985aedfedba9
tweag/asterius
cgrun015.hs
# LANGUAGE MagicHash # module Main ( main ) where import Foreign import Foreign.C import GHC.Exts data CList = CNil | CCons Int# CList mk :: Int# -> CList mk n = if isTrue# (n ==# 0#) then CNil else CCons 1# (mk (n -# 1#)) clen :: CList -> Int# clen CNil = 0# clen (CCons _ cl) = 1# +# (clen cl) ma...
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/codeGen/cgrun015.hs
haskell
'A' 'B'
# LANGUAGE MagicHash # module Main ( main ) where import Foreign import Foreign.C import GHC.Exts data CList = CNil | CCons Int# CList mk :: Int# -> CList mk n = if isTrue# (n ==# 0#) then CNil else CCons 1# (mk (n -# 1#)) clen :: CList -> Int# clen CNil = 0# clen (CCons _ cl) = 1# +# (clen cl) ma...
2cbb4ce0bb0aabaea58e00acb19961f4e53c59056b213e28a2f1e796193e1af7
Noeda/dfterm3
Types.hs
-- | Internal module to Dfterm3.Dfterm3State -- # LANGUAGE TemplateHaskell , DeriveDataTypeable # module Dfterm3.Dfterm3State.Internal.Types ( Storage(..) , PersistentStorageState(..) , VolatileStorageState(..) , gameSubscriptions , gameSubscriptionsVolatile , admin , loggedInUsers ...
null
https://raw.githubusercontent.com/Noeda/dfterm3/6b33c9b4712da486bb84356f6c9f48abb8074faf/src/Dfterm3/Dfterm3State/Internal/Types.hs
haskell
| Internal module to Dfterm3.Dfterm3State
# LANGUAGE TemplateHaskell , DeriveDataTypeable # module Dfterm3.Dfterm3State.Internal.Types ( Storage(..) , PersistentStorageState(..) , VolatileStorageState(..) , gameSubscriptions , gameSubscriptionsVolatile , admin , loggedInUsers , readPersistentStorage , readVolatileSto...
9941db41a573fff5a54d9fb105a853f7bbb0190962dd077c0afb0c7b2d8face8
spurious/sagittarius-scheme-mirror
timer.scm
-*- mode : scheme ; coding : utf-8 -*- ;;; ;;; util/timer.scm - Timer ;;; Copyright ( c ) 2010 - 2015 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Redistributions...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/util/timer.scm
scheme
coding : utf-8 -*- util/timer.scm - Timer 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, this list of conditions and t...
Copyright ( c ) 2010 - 2015 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (library (util timer) (export make-timer...
708c44c16159383a2868d21113932d95fab2e1a853ba27c4ac9c0ac9b5fb9a4e
nklein/draw
font.lisp
(in-package #:draw-pdf) (defmethod %load-ttf-font ((renderer pdf-renderer) font-pathname handle) (let ((metrics (pdf:load-ttf-font font-pathname))) (when metrics (let* ((name (pdf:font-name metrics)) (handle (or handle name))) (setf (pdf-font-name renderer hand...
null
https://raw.githubusercontent.com/nklein/draw/2b7a51fa06c81a46dffc439a35b3b0ac18c94893/src/pdf/font.lisp
lisp
(in-package #:draw-pdf) (defmethod %load-ttf-font ((renderer pdf-renderer) font-pathname handle) (let ((metrics (pdf:load-ttf-font font-pathname))) (when metrics (let* ((name (pdf:font-name metrics)) (handle (or handle name))) (setf (pdf-font-name renderer hand...
0a88b4272172e90c760ec625567a15cd215af2b580b39fbf7c9ca840bf546ca4
binaryage/cljs-oops
ocall_dynamic.cljs
(ns oops.arena.ocall-dynamic (:require [oops.core :refer [ocall+]] [oops.tools :refer [init-arena-test! done-arena-test! testing]])) (init-arena-test!) ; we are compiling under advanced mode (testing "simple dynamic ocall" (ocall+ #js {"f" (fn [] 42)} (identity "f") "p1" "p2")) (testing "retageted d...
null
https://raw.githubusercontent.com/binaryage/cljs-oops/a2b48d59047c28decb0d6334e2debbf21848e29c/test/src/arena/oops/arena/ocall_dynamic.cljs
clojure
we are compiling under advanced mode
(ns oops.arena.ocall-dynamic (:require [oops.core :refer [ocall+]] [oops.tools :refer [init-arena-test! done-arena-test! testing]])) (init-arena-test!) (testing "simple dynamic ocall" (ocall+ #js {"f" (fn [] 42)} (identity "f") "p1" "p2")) (testing "retageted dynamic ocall" (ocall+ #js {"a" #js {"...
cc2ab5b6ab057ba9e57dde95dd509056e3efeea3a6bf38703a4de1d7e04ea4d3
xtdb/core2
bench.clj
(ns core2.bench (:require [clojure.tools.cli :as cli] [clojure.tools.logging :as log] core2.indexer [core2.kafka :as k] [core2.log.local-directory-log :as ldl] [core2.node :as node] [core2.object-store :as os] [core2.s3 :as s3] ...
null
https://raw.githubusercontent.com/xtdb/core2/3adeb391ca4dd73a3f79faba8024289376597d23/modules/bench/src/main/clojure/core2/bench.clj
clojure
(ns core2.bench (:require [clojure.tools.cli :as cli] [clojure.tools.logging :as log] core2.indexer [core2.kafka :as k] [core2.log.local-directory-log :as ldl] [core2.node :as node] [core2.object-store :as os] [core2.s3 :as s3] ...
09aca1b327bf845a8a25a7406cebdc5fa21e330a0cbe6f7c507f529fb317b88b
jordanthayer/ocaml-search
spt_cairo.mli
* @author jtd7 @since 2010 - 05 - 06 @author jtd7 @since 2010-05-06 *) val save : ?width:Length.t -> ?height:Length.t -> < draw : Drawing.context -> 'a; height : Length.t; set_size : w:Length.t -> h:Length.t -> 'b; width : Length.t; .. > -> string -> unit EOF
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/spt/src/spt_cairo.mli
ocaml
* @author jtd7 @since 2010 - 05 - 06 @author jtd7 @since 2010-05-06 *) val save : ?width:Length.t -> ?height:Length.t -> < draw : Drawing.context -> 'a; height : Length.t; set_size : w:Length.t -> h:Length.t -> 'b; width : Length.t; .. > -> string -> unit EOF
0318b656fd41e341b84d50f0673b2ac8bc49e8ede3587f29fd262f59bba26ea0
adrieng/melitte
Monad.mli
module type Plain = sig type 'a t val return : 'a -> 'a t val bind : 'a t -> ('a -> 'b t) -> 'b t end module type Runnable = sig include Plain val run : 'a t -> 'a end module Notation (M : Plain) : sig val return : 'a -> 'a M.t val (let*) : 'a M.t -> ('a -> 'b M.t) -> 'b M.t val (and*) : 'a M.t -> 'b ...
null
https://raw.githubusercontent.com/adrieng/melitte/caa9b76703dcb1663cb3d29a4262fc5a489f8861/src/Monad.mli
ocaml
module type Plain = sig type 'a t val return : 'a -> 'a t val bind : 'a t -> ('a -> 'b t) -> 'b t end module type Runnable = sig include Plain val run : 'a t -> 'a end module Notation (M : Plain) : sig val return : 'a -> 'a M.t val (let*) : 'a M.t -> ('a -> 'b M.t) -> 'b M.t val (and*) : 'a M.t -> 'b ...
63a3102cfcecbf00b4c8be12c0de6913292d7b3892498de98a4a406bd45222d6
emina/rosette
automaton.rkt
#lang rosette (require "viz.rkt" (rename-in rosette/lib/synthax [choose ?])) (provide automaton reject ? alphabet viz) Taken from , " Automata via Macros , " Journal of Functional Programming , 2006 . We correct the definition ; so that only states with no outgoing edges are accepting. We also wrap the aut...
null
https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/sdsl/fsm/automaton.rkt
racket
so that only states with no outgoing edges are accepting. We also machine's graph structure (for display purposes). A special state that rejects all labels. Returns the alphabet of the given automaton.
#lang rosette (require "viz.rkt" (rename-in rosette/lib/synthax [choose ?])) (provide automaton reject ? alphabet viz) Taken from , " Automata via Macros , " Journal of Functional Programming , 2006 . We correct the definition wrap the automaton procedure into an fsm value that also keeps the (define-syntax...
af7da896d0a47cabb65aca3fdc1c0336ec1724ae437aa02fe0f5e7d4f8666973
calyau/maxima
prob2.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 1.221 2010/05/26 19:25:52 " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.204 2010/02/23 05:21:30 " " f2cl6.l , v 1.48 2008/08/...
null
https://raw.githubusercontent.com/calyau/maxima/9352a3f5c22b9b5d0b367fddeb0185c53d7f4d02/share/colnew/ex2/prob2.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common t) (:float-format double-float))
( " f2cl1.l , v 1.221 2010/05/26 19:25:52 " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.204 2010/02/23 05:21:30 " " f2cl6.l , v 1.48 2008/08/24 00:56:27 rtoy Exp $ " " ...
97d2d35a57384e54eacd370dac78e3742e8dc72be248f6c363e7dd03b04e8d48
kosmikus/multirec
MultiRec.hs
----------------------------------------------------------------------------- -- | -- Module : Generics.MultiRec Copyright : ( c ) 2008 Universiteit Utrecht -- License : BSD3 -- Maintainer : -- Stability : experimental -- Portability : non-portable -- -- multirec -- -- generic programming f...
null
https://raw.githubusercontent.com/kosmikus/multirec/10ea901f0e1067bbe3632b1fab34103c83eeff0f/src/Generics/MultiRec.hs
haskell
--------------------------------------------------------------------------- | Module : Generics.MultiRec License : BSD3 Stability : experimental Portability : non-portable multirec -- generic programming for families of recursive datatypes This top-level module re-exports most modules of the ...
Copyright : ( c ) 2008 Universiteit Utrecht Maintainer : module Generics.MultiRec ( module Generics.MultiRec.Base, module Generics.MultiRec.HFunctor, module Generics.MultiRec.Fold, module Generics.MultiRec.Compos, module Generics.MultiRec.Eq, module Generics.MultiRec.HFix, ...
82a7b4561489f5cba02cec0c2fd7b2de41126c67b00f43ee0831d10284c6147b
Vaguery/klapaucius
repeatable_and_cycling.clj
(ns push.instructions.aspects.repeatable-and-cycling (:require [push.util.code-wrangling :as util :refer [list! count-collection-points]] [push.type.definitions.generator :as g :refer [make-generator]]) (:use [push.instructions.core ...
null
https://raw.githubusercontent.com/Vaguery/klapaucius/17b55eb76feaa520a85d4df93597cccffe6bdba4/src/push/instructions/aspects/repeatable_and_cycling.clj
clojure
SUPPORT FOR CYCLERS
(ns push.instructions.aspects.repeatable-and-cycling (:require [push.util.code-wrangling :as util :refer [list! count-collection-points]] [push.type.definitions.generator :as g :refer [make-generator]]) (:use [push.instructions.core ...