_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
2d8bafc5b453a1978675a89ee9de4316a27621876685e07b3590f03b89a50e1c
ghcjs/jsaddle-dom
SVGPolygonElement.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.SVGPolygonElement (getPoints, getAnimatedPoints, SVGPolygonElement(..), gTypeSVGPolygonElement) wher...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/SVGPolygonElement.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.SVGPolygonElement (getPoints, getAnimatedPoints, SVGPolygonElement(..), gTypeSVGPolygonElement) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromInt...
04841be63d9090cdd0f8e7d78c97f95cda20475a60493ac02fe3e599e0286ba3
linoscope/caml8
test_disassemble.ml
open Stdio open Base open Caml8_lib let%expect_test "Test Fische.ch8" = let in_ = In_channel.create "../resources/Fishie.ch8" in Disassembler.disassemble ~in_ ~out:Out_channel.stdout; [%expect {| 0x0200 CLS 0x0202 LD I, 0x220 0x0204 LD V2, 0x8 0x0206 LD V0, 0xf8 0x020...
null
https://raw.githubusercontent.com/linoscope/caml8/759faf48abf9369492fd3acbcfc584d919c161b7/test/test_disassemble.ml
ocaml
open Stdio open Base open Caml8_lib let%expect_test "Test Fische.ch8" = let in_ = In_channel.create "../resources/Fishie.ch8" in Disassembler.disassemble ~in_ ~out:Out_channel.stdout; [%expect {| 0x0200 CLS 0x0202 LD I, 0x220 0x0204 LD V2, 0x8 0x0206 LD V0, 0xf8 0x020...
4cf13089d67ed417bbdca0a629df65d36b5b104650ab139983832edc3344bd8e
tonymorris/geo-gpx
SymL.hs
module Data.Geo.GPX.Lens.SymL where import Data.Lens.Common class SymL a where symL :: Lens a (Maybe String)
null
https://raw.githubusercontent.com/tonymorris/geo-gpx/526b59ec403293c810c2ba08d2c006dc526e8bf9/src/Data/Geo/GPX/Lens/SymL.hs
haskell
module Data.Geo.GPX.Lens.SymL where import Data.Lens.Common class SymL a where symL :: Lens a (Maybe String)
133f76fdd4c813196fedba5da4369ff40a1a9af0511fd9345d9e9a2b01a39d72
unisonweb/unison
Types.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE RecordWildCards # module Unison.Auth.Types ( DiscoveryDoc (..), Tokens (..), Credentials (..), Code, AccessToken, RefreshToken, IDToken, OAuthState, PKCEVerifier, PKCEChallenge, ProfileName, CredentialFailure (..), CodeserverC...
null
https://raw.githubusercontent.com/unisonweb/unison/69d27be69621072848f7f82ce401ffea311c7a31/unison-cli/src/Unison/Auth/Types.hs
haskell
# LANGUAGE DeriveAnyClass # The most recent set of authentication tokens URI where the discovery document for this codeserver can be fetched.
# LANGUAGE RecordWildCards # module Unison.Auth.Types ( DiscoveryDoc (..), Tokens (..), Credentials (..), Code, AccessToken, RefreshToken, IDToken, OAuthState, PKCEVerifier, PKCEChallenge, ProfileName, CredentialFailure (..), CodeserverCredentials (..), UserInfo (....
89e2a512db9d0fe00984842e2bb3fb402ab4a862791fd40b10347820bf518eee
re-ops/re-core
client.clj
(ns lxc.client "LXC http client see -api.md Using p12 file format cert that can be created from lxc key and crt files: openssl pkcs12 -export -out certificate.p12 -inkey client.key -in client.crt -certfile servercerts/127.0.0.1.crt " (:require [re-share.wait :refer (wait-for)] [clojure.string :as ...
null
https://raw.githubusercontent.com/re-ops/re-core/93596efd4f3068d57e8140106da60011a6569310/src/lxc/client.clj
clojure
(ns lxc.client "LXC http client see -api.md Using p12 file format cert that can be created from lxc key and crt files: openssl pkcs12 -export -out certificate.p12 -inkey client.key -in client.crt -certfile servercerts/127.0.0.1.crt " (:require [re-share.wait :refer (wait-for)] [clojure.string :as ...
98cf0513d8df42b1d1993aa6c324a826dd854914320b6c1d1c696d33153c6b0d
ingolia-lab/RiboSeq
RrnaFrags.hs
module Bio.RiboSeq.RrnaFrags where import Control.Monad import qualified Data.ByteString.Char8 as BS import Data.Int import Data.List import Data.Maybe import Data.Ord import Numeric import qualified Data.HashMap.Strict as M import qualified Data.Vector as V import qualified Data.Vector.Mutable as VM import ...
null
https://raw.githubusercontent.com/ingolia-lab/RiboSeq/a14390cd95528910a258434c7b84c787f5e1d119/src/Bio/RiboSeq/RrnaFrags.hs
haskell
module Bio.RiboSeq.RrnaFrags where import Control.Monad import qualified Data.ByteString.Char8 as BS import Data.Int import Data.List import Data.Maybe import Data.Ord import Numeric import qualified Data.HashMap.Strict as M import qualified Data.Vector as V import qualified Data.Vector.Mutable as VM import ...
1b60112d072e0e72aac335d050fbcaeb003e4a2eb811230d9523a48fa73aeec3
anonymous-admin/anonymous
record_operation_test.erl
-module(record_operation_test). -include_lib("eunit/include/eunit.hrl"). -record (torrent,{filename,files,number_of_pieces,piece_length}). is_multiple_test_() -> [?_assert(record_operation:is_multiple(#torrent{files = novalue}) =:= false), ?_assert(record_operation:is_multiple(#torrent{files = something}) =:=...
null
https://raw.githubusercontent.com/anonymous-admin/anonymous/0d178f8f02dce74d5f76d78f81f70da9229a77cd/Mozhan/1.1/record_operation_test.erl
erlang
-module(record_operation_test). -include_lib("eunit/include/eunit.hrl"). -record (torrent,{filename,files,number_of_pieces,piece_length}). is_multiple_test_() -> [?_assert(record_operation:is_multiple(#torrent{files = novalue}) =:= false), ?_assert(record_operation:is_multiple(#torrent{files = something}) =:=...
2c8e68c0176b8f707c35210d76b1d35ba5fba7ca55da685fc49a2cafd852799c
stackbuilders/cis194-templates
StackVM.hs
module Homework05.StackVM (StackVal(..), StackExp(..), Stack, Program, stackVM) where -- Values that may appear in the stack. Such a value will also be -- returned by the stackVM program execution function. data StackVal = IVal Integer | BVal Bool | Void deriving Show -- The various expressions our VM understands. da...
null
https://raw.githubusercontent.com/stackbuilders/cis194-templates/f41b9f0b9945afd387f433ff40fa8988b6a9fe8b/src/Homework05/StackVM.hs
haskell
Values that may appear in the stack. Such a value will also be returned by the stackVM program execution function. The various expressions our VM understands. Execute the given program. Returns either an error message or the value on top of the stack after execution. Execute a program against a given stack.
module Homework05.StackVM (StackVal(..), StackExp(..), Stack, Program, stackVM) where data StackVal = IVal Integer | BVal Bool | Void deriving Show data StackExp = PushI Integer | PushB Bool | Add | Mul | And | Or deriving Show typ...
84ea6908f75d71f360b96bc72473c2cca6893467f0a71128903932a83625fac3
matsubara0507/git-plantation
Data.hs
module Git.Plantation.Data (module X) where import Git.Plantation.Data.Problem as X import Git.Plantation.Data.Team as X
null
https://raw.githubusercontent.com/matsubara0507/git-plantation/55ec98a3c15356ac7a8c07bb0d5dc5779650e921/src/Git/Plantation/Data.hs
haskell
module Git.Plantation.Data (module X) where import Git.Plantation.Data.Problem as X import Git.Plantation.Data.Team as X
c77a8744cb35acb64234ac12fa66fd8ab812607f54de91317e513a08883b4ee4
Workiva/eva
fressian.clj
Copyright 2015 - 2019 Workiva Inc. ;; ;; Licensed under the Eclipse Public License 1.0 (the "License"); ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -1.0.php ;; ;; Unless required by applicable law or agreed to in writing, software dist...
null
https://raw.githubusercontent.com/Workiva/eva/b7b8a6a5215cccb507a92aa67e0168dc777ffeac/core/src/eva/v2/datastructures/bbtree/fressian.clj
clojure
Licensed under the Eclipse Public License 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -1.0.php Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...
Copyright 2015 - 2019 Workiva Inc. distributed under the License is distributed on an " AS IS " BASIS , (ns eva.v2.datastructures.bbtree.fressian "The fressian tags common to all versions -- mostly Clojure Core stuff." (:require [eva.datastructures.utils.interval :as interval] [eva.datastructures.u...
ac656456e969b6ed061dc53fcc69e4564b86ae9cc006e93acaccb6104e21bbd1
Tim-ats-d/Suricate
suricate.mli
(** Here is the list of modules exposed by the [Suricate] library. *) module Log = Log module Logger = Logger module Filter = Filter module Formatter = Formatter module Handler : sig include module type of Handler module File = File_handler module Stream = Stream_handler end module Log_level = Log_level
null
https://raw.githubusercontent.com/Tim-ats-d/Suricate/bef2bbc8f3cd4420213e6263e3e15a0fe90edb29/lib/suricate.mli
ocaml
* Here is the list of modules exposed by the [Suricate] library.
module Log = Log module Logger = Logger module Filter = Filter module Formatter = Formatter module Handler : sig include module type of Handler module File = File_handler module Stream = Stream_handler end module Log_level = Log_level
b69747fd016194601ba6f5731a1e3d2807b2a7320bed07618816a0ecb9858a35
ml4tp/tcoq
configwin_keys.ml
(*********************************************************************************) Cameleon (* *) Copyright ( C ) 2005 Institut National de Recherche en Informatiqu...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/ide/utils/configwin_keys.ml
ocaml
******************************************************************************* en Automatique. All rights reserved. ...
Cameleon Copyright ( C ) 2005 Institut National de Recherche en Informatique et it under the terms of the GNU Library General Public License as published by the Free Software Foundation ; either version 2 of the ...
9469b46dd6d097fe6b26abf62ef9acee620b4ad9740571cb990201ad086fbf32
pcarbonn/H-Calc
A_NucleusSpec.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE RebindableSyntax # module Interpreter.A_NucleusSpec (spec) where import Interpreter.A_Nucleus import Interpreter.Transfos import Interpreter.Interpreter import Control.Exception (evaluate) import Haskus.Utils.EADT import Test.Hspec import Relude hiding (fromInt...
null
https://raw.githubusercontent.com/pcarbonn/H-Calc/00f6d8d4344f43a3356d29fd45c9ec3c23ccce65/test/Interpreter/A_NucleusSpec.hs
haskell
# LANGUAGE NoImplicitPrelude # # LANGUAGE RebindableSyntax # module Interpreter.A_NucleusSpec (spec) where import Interpreter.A_Nucleus import Interpreter.Transfos import Interpreter.Interpreter import Control.Exception (evaluate) import Haskus.Utils.EADT import Test.Hspec import Relude hiding (fromInt...
144a3cb8fbaea879b864e90abc2aef00743aac785b28f918e3ee5989abbdf046
ml4tp/tcoq
retroknowledge.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/kernel/retroknowledge.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** This file defines the knowledge tha...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Created by , May 2007 A...
be1f4fc25fdabcd79940e3fd15875cbf03677fad20b1205cad2adbb75632b0b1
rohitjha/DiMPL
rsa.hs
Implementation of the RSA algorithm in Haskell import Primes import Modular import Base import Data.Char Product of two primes n :: Int -> Int -> Int n p q = if ((isPrime (fromIntegral p)) && (isPrime (fromIntegral q))) == False then error "The two numbers must be primes" else fromIntegral (p * q) func...
null
https://raw.githubusercontent.com/rohitjha/DiMPL/087c499ba104dec897fe325f86580e6d623c86ee/examples/rsa.hs
haskell
Encryption Key 'e' Public Key (e,n) Decryption Key 'd' Private Key (d,n) Encrypt 'message' using the public-key 'pubKey' main = rsa RSA Encryption and Decryption Examples ----------- ----------- ----------- -----------
Implementation of the RSA algorithm in Haskell import Primes import Modular import Base import Data.Char Product of two primes n :: Int -> Int -> Int n p q = if ((isPrime (fromIntegral p)) && (isPrime (fromIntegral q))) == False then error "The two numbers must be primes" else fromIntegral (p * q) func...
34ba17597a6fc25f4f157d07f0cecd8c5c4aeef33c99b1fb2c228cd4b13221b8
nvim-treesitter/nvim-treesitter
injections.scm
; inherits: html_tags ( (style_element (start_tag (attribute (attribute_name) @_attr (quoted_attribute_value (attribute_value) @_lang))) (raw_text) @scss) (#eq? @_attr "lang") (#any-of? @_lang "scss" "postcss" "less") ) [ (raw_text_expr) (raw_text_each) ] @javascript ( (scri...
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/7eb5f1a2e3949496f26c4084b521b30f2d08137a/queries/svelte/injections.scm
scheme
inherits: html_tags
( (style_element (start_tag (attribute (attribute_name) @_attr (quoted_attribute_value (attribute_value) @_lang))) (raw_text) @scss) (#eq? @_attr "lang") (#any-of? @_lang "scss" "postcss" "less") ) [ (raw_text_expr) (raw_text_each) ] @javascript ( (script_element (start_...
2a38bbd5fb264d915436d9a622b158d974830d61f752df9bd930b7f80fcbccda
mikail-khan/hqfl
Rate.hs
----------------------------------------------------------------------------- -- | Module : Finance . . Rate Copyright : ( C ) 2018 -- License : (see the file LICENSE) Maintainer : < co.category.gmail.com > -- Stability : stable -- Portability : portable -- -------------------------...
null
https://raw.githubusercontent.com/mikail-khan/hqfl/398bd921089522c6c0e6d91893a75615a1f39a2e/src/Finance/Hqfl/Rate.hs
haskell
--------------------------------------------------------------------------- | License : (see the file LICENSE) Stability : stable Portability : portable --------------------------------------------------------------------------
Module : Finance . . Rate Copyright : ( C ) 2018 Maintainer : < co.category.gmail.com > module Finance.Hqfl.Rate ( module Finance.Hqfl.Rate.Libor ) where import Finance.Hqfl.Rate.Libor
c2ae3ff21bcc45d5bcec710d9c796309e02cda335a46ab5f2e4be45eeebea48d
smucclaw/dsl
Executable.hs
Program to test parser , automatically generated by BNF Converter . module L4.Executable where import System.Environment ( getArgs ) import System.Exit ( exitFailure, exitSuccess ) import Control.Monad ( when ) import Options.Applicative import Data.List.Split (splitOn) import Data.Either (lefts, right...
null
https://raw.githubusercontent.com/smucclaw/dsl/9ee9dd7160c05b773ff20754ba8bbdccf37a5380/bnfc/src-l4/L4/Executable.hs
haskell
the fgl version of what becomes the dotfile dotfile output json output not quite sure what this is for > nix-shell --run 'stack run -- l4 --format misc --misc names < l4/test.l4'
Program to test parser , automatically generated by BNF Converter . module L4.Executable where import System.Environment ( getArgs ) import System.Exit ( exitFailure, exitSuccess ) import Control.Monad ( when ) import Options.Applicative import Data.List.Split (splitOn) import Data.Either (lefts, right...
907c0b0236c36340e1fbb4201c44a079121c208d1b3efc0d0b2d8b0015155f34
BrunoBonacci/1config
file.clj
(ns ^{:author "Bruno Bonacci (@BrunoBonacci)" :no-doc true} com.brunobonacci.oneconfig.backends.file (:refer-clojure :exclude [find load list]) (:require [clojure.java.io :as io] [clojure.string :as str] [com.brunobonacci.oneconfig.backend :refer :all] [com.brunobonacci.oneconfi...
null
https://raw.githubusercontent.com/BrunoBonacci/1config/4cf8284b1b490253ac617bec9d2348c3234931e6/1config-core/src/com/brunobonacci/oneconfig/backends/file.clj
clojure
list all the files with supported extensions create relative paths split components create entries apply post filters and ordering protect against home directory not existing (not HOME not set)
(ns ^{:author "Bruno Bonacci (@BrunoBonacci)" :no-doc true} com.brunobonacci.oneconfig.backends.file (:refer-clojure :exclude [find load list]) (:require [clojure.java.io :as io] [clojure.string :as str] [com.brunobonacci.oneconfig.backend :refer :all] [com.brunobonacci.oneconfi...
1b58b6a17547795ca75e3aa61c96aa978d467c7d985c23fdf31e29ed08204453
ucsd-progsys/liquidhaskell
Null.hs
{-@ LIQUID "--expect-any-error" @-} module Null where foo :: [Int] -> Int foo xs = if null xs then head xs else 0
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/Null.hs
haskell
@ LIQUID "--expect-any-error" @
module Null where foo :: [Int] -> Int foo xs = if null xs then head xs else 0
6f963ed951de7e78e64621be6d40d61bbe992cc49c720620e8d9bf4e05cd9056
haskell/haskell-language-server
MetaTry.expected.hs
foo :: a -> (b, a) foo a = (_w0, a)
null
https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/MetaTry.expected.hs
haskell
foo :: a -> (b, a) foo a = (_w0, a)
5b14d278df4e3bedbd73adb054db94821305fe29b45314bfb36690d110e43a58
5outh/HaskellTalk
ProjectEuler.hs
import Data.Char(digitToInt) -- # Solve Find the greatest product of five consecutive digits in the 1000 - digit number . num :: String num = concat ["73167176531330624919225119674426574742355349194934", "96983520312774506326239578318016984801869478851843", "8586156078911294949545950173795833195...
null
https://raw.githubusercontent.com/5outh/HaskellTalk/c566ea68c80601417954c1cde9759e82d19eb8f3/ProjectEuler.hs
haskell
# Solve
import Data.Char(digitToInt) Find the greatest product of five consecutive digits in the 1000 - digit number . num :: String num = concat ["73167176531330624919225119674426574742355349194934", "96983520312774506326239578318016984801869478851843", "85861560789112949495459501737958331952853208805511...
f37d08739dc3588e78f91c1a289cd430290868767212bec5aed1e8136aafdb1c
yuriy-chumak/ol
fragment_shader.scm
; =========================================================================== ; ARB_fragment_shader (included in OpenGL 2.0) ; ; ; Version ; ; Overview ; (define-library (OpenGL ARB fragment_shader) ; --------------------------------------------------------------------------- ; Depend...
null
https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/libraries/OpenGL/ARB/fragment_shader.scm
scheme
=========================================================================== ARB_fragment_shader (included in OpenGL 2.0) Version Overview --------------------------------------------------------------------------- Dependencies ---------------------------------------------------...
(define-library (OpenGL ARB fragment_shader) (import (scheme core) (OpenGL platform)) (export ARB_fragment_shader ) (begin (define ARB_fragment_shader (gl:QueryExtension "GL_ARB_fragment_shader")) ))
73e2ffad0b22417c5bd6da739cde07ec708ab7b7a965dc5a4ff58a3703a20339
Carnap/Carnap
Hurley.hs
# LANGUAGE TypeOperators , FlexibleContexts , FlexibleInstances , MultiParamTypeClasses # module Carnap.Languages.PureFirstOrder.Logic.Hurley (hurleyPLCalc, parseHurleyPL) where import Data.Map as M (lookup, Map,empty) import Data.Maybe import Text.Parsec import Control.Lens import Carnap.Core.Data.Types (Form, Te...
null
https://raw.githubusercontent.com/Carnap/Carnap/99546e377008247c5a1e8de1e294aac8e22584d7/Carnap/src/Carnap/Languages/PureFirstOrder/Logic/Hurley.hs
haskell
XXX Check parser
# LANGUAGE TypeOperators , FlexibleContexts , FlexibleInstances , MultiParamTypeClasses # module Carnap.Languages.PureFirstOrder.Logic.Hurley (hurleyPLCalc, parseHurleyPL) where import Data.Map as M (lookup, Map,empty) import Data.Maybe import Text.Parsec import Control.Lens import Carnap.Core.Data.Types (Form, Te...
c7246f4e67dcb6e5f857d4b79583eb430abcb71bdcad6f840a46cf6f04d7b64d
techascent/tech.compute
driver.clj
(ns tech.compute.cpu.driver (:require [tech.compute.driver :as drv] [tech.v2.datatype :as dtype] [tech.v2.datatype.protocols :as dtype-proto] [clojure.core.async :as async] [tech.resource :as resource] [tech.resource.stack :as stack] [tech.comput...
null
https://raw.githubusercontent.com/techascent/tech.compute/716d270da7018915bcdb42d9942d33991b5931c8/src/tech/compute/cpu/driver.clj
clojure
Setup so other things can masquerade as a cpu stream as long as they the synchonization primitives will just hang with this stream." If main thread cpu stream then we are already syncced Default cpu stream runs in the main thread of execution
(ns tech.compute.cpu.driver (:require [tech.compute.driver :as drv] [tech.v2.datatype :as dtype] [tech.v2.datatype.protocols :as dtype-proto] [clojure.core.async :as async] [tech.resource :as resource] [tech.resource.stack :as stack] [tech.comput...
66339c991f7b8fbc7bd1052e901c0a211380bc65da1311a42fddf7eb2f59601d
rgrinberg/curly
curly.ml
module Result = struct include Result let (>>=) : type a b e. (a, e) result -> (a -> (b, e) result) -> (b, e) result = fun r f -> match r with | Ok x -> f x | (Error _) as e -> e end open Result module Meth = struct type t = [ `GET | `POST | `HEAD | `PUT | `DELETE ...
null
https://raw.githubusercontent.com/rgrinberg/curly/5527f0ab706a32aa9b239d6027f5b49d708001c3/src/curly.ml
ocaml
module Result = struct include Result let (>>=) : type a b e. (a, e) result -> (a -> (b, e) result) -> (b, e) result = fun r f -> match r with | Ok x -> f x | (Error _) as e -> e end open Result module Meth = struct type t = [ `GET | `POST | `HEAD | `PUT | `DELETE ...
d296b7101ca93de5747596d0b75f451cfcd1ad983b3afc11be2f6f3779e76718
mpickering/ghcide-reflex
Notifications.hs
Copyright ( c ) 2019 The DAML Authors . All rights reserved . SPDX - License - Identifier : Apache-2.0 # LANGUAGE DuplicateRecordFields # {-# LANGUAGE RankNTypes #-} module Development.IDE.LSP.Notifications ( logNotifications ) where import qualified Language.Haskell.LSP.Core as LSP imp...
null
https://raw.githubusercontent.com/mpickering/ghcide-reflex/67ddebf0c1d4728e850057b9bd7c6852c0d96350/src/Development/IDE/LSP/Notifications.hs
haskell
# LANGUAGE RankNTypes # This isn't hooked in anywhere yet, not sure where is best to place the logs, in the handler for other things or separately.
Copyright ( c ) 2019 The DAML Authors . All rights reserved . SPDX - License - Identifier : Apache-2.0 # LANGUAGE DuplicateRecordFields # module Development.IDE.LSP.Notifications ( logNotifications ) where import qualified Language.Haskell.LSP.Core as LSP import Language.Haskell.LSP.Type...
0fedf5f8350ccd65e54906014a7ae05fa862311f04aec97e948f4d2dea45a8cc
stepcut/plugins
Main.hs
{-# OPTIONS -cpp #-} #include "../../../../config.h" import System.Plugins import API -- an example where we just want to load an object and run it main = do let includes = [TOP ++ "/testsuite/load/null/api"] m_v <- load "../Null.o" includes [] "resource" v <- case m_v of LoadSuccess _ v -> ret...
null
https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/load/null/prog/Main.hs
haskell
# OPTIONS -cpp # an example where we just want to load an object and run it
#include "../../../../config.h" import System.Plugins import API main = do let includes = [TOP ++ "/testsuite/load/null/api"] m_v <- load "../Null.o" includes [] "resource" v <- case m_v of LoadSuccess _ v -> return v _ -> error "load failed" putStrLn ...
de9ad1f01533806eb437b95357eae74cb8d58da15940c4c11b6ec204ab3c687a
avsm/melange
ssh_version.ml
pp * Copyright ( c ) 2006 Anil Madhavapeddy < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED ...
null
https://raw.githubusercontent.com/avsm/melange/e92240e6dc8a440cafa91488a1fc367e2ba57de1/lib/ssh/ssh_version.ml
ocaml
Read version character by character. Cant use channels due to buffering newline is here, so stop reading just discard this, as it will be followed by a newline It should be in form SSH-protoversion-softwareversioncomments
pp * Copyright ( c ) 2006 Anil Madhavapeddy < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED ...
f3891dcf024d5981dfa6132aa86362126bdc798879cab6126359af60657cdd2a
sile/evel
evel.erl
2016 < > %% This software is released under the MIT License . %% See the LICENSE file in the project root for full license information. %% %% @doc An Eventual Leader Election Library %% %% This module provides functionality to elect the leader which will be eventually agreed by all member of the same distribu...
null
https://raw.githubusercontent.com/sile/evel/9c3fc77b91ab55c7e3dde3b2325452891e8c43aa/src/evel.erl
erlang
See the LICENSE file in the project root for full license information. @doc An Eventual Leader Election Library This module provides functionality to elect the leader ``` %% %% Elects the leader %% %% %% Finds the leader of an election %% > {ok, Leader} = evel:find_leader(foo). > error = evel:find_lead...
2016 < > This software is released under the MIT License . which will be eventually agreed by all member of the same distributed erlang cluster . > Leader = evel : elect(foo , self ( ) ) . > ok = evel : ) . -module(evel). -export([elect/2, elect/3]). -export([dismiss/1, dismiss/2]). -export([find_leader...
5d4abcad4bdf8dc45d60bf64e3f8e0771364d42d19051d1111a411bcf8b79198
wdebeaum/DeepSemLex
technician.lisp
;;;; ;;;; W::TECHNICIAN ;;;; (define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::TECHNICIAN (abbrev w::tech) (SENSES ((LF-PARENT ONT::technician) ;professional) (TEMPL COUNT-PRED-TEMPL) (META-DATA :ORIGIN CALO :ENTRY-DATE 20040204 :CHANGE-DATE NIL :wn ("technician%1:18:00") :COMM...
null
https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/technician.lisp
lisp
W::TECHNICIAN professional)
(define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::TECHNICIAN (abbrev w::tech) (SENSES (TEMPL COUNT-PRED-TEMPL) (META-DATA :ORIGIN CALO :ENTRY-DATE 20040204 :CHANGE-DATE NIL :wn ("technician%1:18:00") :COMMENTS HTML-PURCHASING-CORPUS)))) ))
7ce5ffb235f63bf067036df98e99bb24f839a0698223cfe1c918ad586c1da7e5
AdRoll/rebar3_hank
rebar3_hank_prv.erl
%%% @doc Plugin provider for rebar3 hank -module(rebar3_hank_prv). -export([init/1, do/1, format_error/1]). -define(FILES_PATTERN, "**/*.{erl,hrl,config,app.src,app.src.script}"). @private -spec init(rebar_state:t()) -> {ok, rebar_state:t()}. init(State) -> HankProvider = providers:create([{name, hank}...
null
https://raw.githubusercontent.com/AdRoll/rebar3_hank/5705de7e2d61f978f336eec9dbb4f60b226a4ed5/src/rebar3_hank_prv.erl
erlang
@doc Plugin provider for rebar3 hank All files except those under _build or _checkouts The default is to print out warnings
-module(rebar3_hank_prv). -export([init/1, do/1, format_error/1]). -define(FILES_PATTERN, "**/*.{erl,hrl,config,app.src,app.src.script}"). @private -spec init(rebar_state:t()) -> {ok, rebar_state:t()}. init(State) -> HankProvider = providers:create([{name, hank}, {module, reba...
a37df9fd2123a65472be401b581a0dbdf4cba2a6663a8323ba3cfc6ec9bfee43
pokepay/aws-sdk-lisp
clouddirectory.lisp
;; DO NOT EDIT: File is generated by AWS-SDK/GENERATOR. (uiop:define-package #:aws-sdk/services/clouddirectory (:use) (:use-reexport #:aws-sdk/services/clouddirectory/api))
null
https://raw.githubusercontent.com/pokepay/aws-sdk-lisp/836b87df520391478a19462443342dc56f4b3f2c/services/clouddirectory.lisp
lisp
DO NOT EDIT: File is generated by AWS-SDK/GENERATOR.
(uiop:define-package #:aws-sdk/services/clouddirectory (:use) (:use-reexport #:aws-sdk/services/clouddirectory/api))
4dc521d694a41c11b4b73a4a43cacfc5a7d5302f593039e7c6dcb98c9f138cc5
Killeroid/PushCalc
clojush.clj
;; clojush.clj ;; This file implements a version of the Push programming language and the PushGP genetic programming system in the Clojure programming language . See the accompanying README ;; file for usage instructions and other notes. ;; Copyright ( c ) 2010 ( ) ;; ;; This program is free software: you can ...
null
https://raw.githubusercontent.com/Killeroid/PushCalc/68ea1ba84ba8c4c012b57274237412b77530511e/src/clojush.clj
clojure
clojush.clj file for usage instructions and other notes. This program is free software: you can redistribute it and/or modify it under 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 for more detail...
This file implements a version of the Push programming language and the PushGP genetic programming system in the Clojure programming language . See the accompanying README Copyright ( c ) 2010 ( ) the terms of version 3 of the GNU General Public License as published by the Free Software Foundation , availa...
bf92a32e4edea452a92792d3e81d2784179eacb18232c9701bc51934eebd29db
draperlaboratory/VIBES
stream.ml
(***************************************************************************) (* *) Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc. (* *) (* This...
null
https://raw.githubusercontent.com/draperlaboratory/VIBES/7f978d66d0b022d1a9262fdfc608b7a2b7c95dff/tools/vibes-log/lib/stream.ml
ocaml
************************************************************************* This file is provided under the license found in the LICENSE file in the top-level director...
Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc. This research was developed with funding from the Defense Advanced Research Projects Agency ( DARPA ) . open Core type event = string type observer = event -> unit type 'a formatter = ('a, Fo...
c51788b0dfaab15b36df926e2f0162bfd7cc99b0bdbb216cf9a0d07c40ddcbf8
atgreen/lisp-openshift
specials.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*- $ Header : /usr / local / cvsrep / cl - ppcre / specials.lisp , v 1.43 2009/10/28 07:36:15 edi Exp $ ;;; globally declared special variables Copyright ( c ) 2002 - 2009 , Dr. . All rights reserved . ;;; Redistribution and use in ...
null
https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/cl-ppcre-2.0.3/specials.lisp
lisp
Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*- globally declared special variables 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 n...
$ Header : /usr / local / cvsrep / cl - ppcre / specials.lisp , v 1.43 2009/10/28 07:36:15 edi Exp $ Copyright ( c ) 2002 - 2009 , Dr. . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , (in-packa...
9be3cb95ef15af3b4cb1def4fe27038012872143abc3f10ed62a38b021b08f4a
monadfix/ormolu-live
PprCore.hs
( c ) The University of Glasgow 2006 ( c ) The AQUA Project , Glasgow University , 1996 - 1998 Printing of Core syntax (c) The University of Glasgow 2006 (c) The AQUA Project, Glasgow University, 1996-1998 Printing of Core syntax -} {-# LANGUAGE MultiWayIf #-} # OPTIONS_GHC -fno - warn - orphans # module P...
null
https://raw.githubusercontent.com/monadfix/ormolu-live/d8ae72ef168b98a8d179d642f70352c88b3ac226/ghc-lib-parser-8.10.1.20200412/compiler/coreSyn/PprCore.hs
haskell
# LANGUAGE MultiWayIf # ************************************************************************ * * \subsection{The guts} * * ******************************************************...
( c ) The University of Glasgow 2006 ( c ) The AQUA Project , Glasgow University , 1996 - 1998 Printing of Core syntax (c) The University of Glasgow 2006 (c) The AQUA Project, Glasgow University, 1996-1998 Printing of Core syntax -} # OPTIONS_GHC -fno - warn - orphans # module PprCore ( pprCoreExpr...
c926ce0985ac56cb19b8aff80f4a3648a85273fa05c199e444b09f350290b015
jorgetavares/core-gp
individual.lisp
(in-package #:core-gp) ;;; ;;; representation and population initialization ;;; ;;; ;;; base individual ;;; (defclass individual () ((id :initarg :id :initform (error "Class individual: must supply a unique id.") :reader id :documentation "Unique ID of the individual.") (genome :initarg :ge...
null
https://raw.githubusercontent.com/jorgetavares/core-gp/90ec1c4599a19c5a911be1f703f78d5108aee160/src/individual.lisp
lisp
representation and population initialization base individual individual methods individual builders genome definitions genome builders functions methods methods population methods builders creates a "dummy" config object for the mutation operator with new mutation rates to be used fo...
(in-package #:core-gp) (defclass individual () ((id :initarg :id :initform (error "Class individual: must supply a unique id.") :reader id :documentation "Unique ID of the individual.") (genome :initarg :genome :initform nil :accessor genome :documentation "Individual's genome (tree...
157b8357d8c21eae58bc1fed151b82194f4a3b034d13494ca3c15dbf27317e40
TorXakis/TorXakis
Fibonacci.hs
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} {-# LANGUAGE OverloadedStrings #-} modu...
null
https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/test/sqatt/src/Examples/Fibonacci.hs
haskell
# LANGUAGE OverloadedStrings #
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} module Examples.Fibonacci (exampleSet) ...
99b6f0b684f417bdf19f9dd8eb359ef3fcdd5cbe74c0292f740f4dd837866590
extend/elevators
g_sup.erl
%%%---------------------------------------------------------------------- %%% File : g_sup.erl Author : > %%% Purpose : Supervisor for the elevator graphics control processes. Created : 30 Aug 1999 by > %%%---------------------------------------------------------------------- -module(g_sup). ...
null
https://raw.githubusercontent.com/extend/elevators/02276cc05da80017eea1691281fc062af62fa64a/src/g_sup.erl
erlang
---------------------------------------------------------------------- File : g_sup.erl Purpose : Supervisor for the elevator graphics control processes. ---------------------------------------------------------------------- External exports supervisor callbacks --------------------------------------------...
Author : > Created : 30 Aug 1999 by > -module(g_sup). -author(''). -vsn("1.0"). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). start_link() -> supervisor:start_link({local, g_sup}, g_sup, []). init([]) -> {ok, {{one_for_one, 0, 1}, []}}.
a9d452e76a19047a687485247c44f1862fd2d9b3f4cdf37bd43002f08af24a70
Happstack/happstack-server
Monads.hs
# LANGUAGE FlexibleContexts , CPP # | This module provides four classes and some related functions -- which provide 'ServerPartT' with much of its web-centric behavior. -- 1 . ' ServerMonad ' provides access to the HTTP ' Request ' -- 2 . ' FilterMonad ' provides the ability to apply filters and transformations...
null
https://raw.githubusercontent.com/Happstack/happstack-server/9318ced37cce3a7a2d3265c9833c95cb0cb739c8/src/Happstack/Server/Monads.hs
haskell
which provide 'ServerPartT' with much of its web-centric behavior. * ServerPartT * ServerMonad * FilterMonad * escapeHTTP | A class alias for all the classes a standard server monad (such as 'ServerPartT') is expected to have instances for. This allows you to keep your type signatures shorter and easier to un...
# LANGUAGE FlexibleContexts , CPP # | This module provides four classes and some related functions 1 . ' ServerMonad ' provides access to the HTTP ' Request ' 2 . ' FilterMonad ' provides the ability to apply filters and transformations to a ' Response ' 3 . ' WebMonad ' provides a way to escape a computatio...
c9b54e2158bc92c49e6b88dbfbbc3fa13bf42d89dd16f6c39e7e7ab04b4a9f9b
huiyaozheng/Mirage-zmq
remote_thr.ml
open Lwt.Infix open Mirage_zmq module Main (S: Mirage_stack_lwt.V4) = struct let start s = let message_size = 100 in let message = Bytes.to_string (Bytes.create message_size) in let message_count = 10000000 in let context = Context.create_context () in let module Socket = Soc...
null
https://raw.githubusercontent.com/huiyaozheng/Mirage-zmq/af288a3378a7c357bd5646a3abf4fd5ae777369b/perf/libzmq/remote/unikernel_thr/remote_thr.ml
ocaml
open Lwt.Infix open Mirage_zmq module Main (S: Mirage_stack_lwt.V4) = struct let start s = let message_size = 100 in let message = Bytes.to_string (Bytes.create message_size) in let message_count = 10000000 in let context = Context.create_context () in let module Socket = Soc...
859da99f07d460de5cac29e3c672a0d709561d64246d5d2c9c4f79fe047f2575
ninjudd/cake
core.clj
(ns bake.core (:use cake [clojure.string :only [join]]) (:require [clojure.stacktrace :as stacktrace])) (defn print-stacktrace [e] (stacktrace/print-cause-trace e) (flush)) (defn merge-in "Merge two nested maps." [left right] (if (map? left) (merge-with merge-in left right) right)) (def...
null
https://raw.githubusercontent.com/ninjudd/cake/3a1627120b74e425ab21aa4d1b263be09e945cfd/dev/bake/core.clj
clojure
This function is from useful.fn
(ns bake.core (:use cake [clojure.string :only [join]]) (:require [clojure.stacktrace :as stacktrace])) (defn print-stacktrace [e] (stacktrace/print-cause-trace e) (flush)) (defn merge-in "Merge two nested maps." [left right] (if (map? left) (merge-with merge-in left right) right)) (def...
e9a55315e9673dc89e6529f2fbb6e29f8db1fe02bbf2e74f6e8e42b9f034f169
bcc32/advent-of-code
b.ml
open! Core let () = let layers = In_channel.with_file (Sys.get_argv ()).(1) ~f:In_channel.input_lines |> List.map ~f:(fun line -> let index = String.index_exn line ':' in let depth = line |> String.subo ~len:index |> Int.of_string in let range = line |> String.subo ~pos:(index + 2) |> Int.o...
null
https://raw.githubusercontent.com/bcc32/advent-of-code/653c0f130e2fb2f599d4e76804e02af54c9bb19f/2017/13/b.ml
ocaml
open! Core let () = let layers = In_channel.with_file (Sys.get_argv ()).(1) ~f:In_channel.input_lines |> List.map ~f:(fun line -> let index = String.index_exn line ':' in let depth = line |> String.subo ~len:index |> Int.of_string in let range = line |> String.subo ~pos:(index + 2) |> Int.o...
910870bceade59854cb56457e05823c7422b8fa6f396b6e480cf823b86686bb1
ddmcdonald/sparser
core.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*- copyright ( c ) 1992 - 1997,2013,2021 -- all rights reserved extensions copyright ( c ) 2009 BBNT Solutions LLC . All Rights Reserved ;;; ;;; File: "core" ;;; Module: "drivers;sources:" Version : September 2021 1.2 ( 8/10/94 ) ...
null
https://raw.githubusercontent.com/ddmcdonald/sparser/8bfd1571ae453e6633db9f237fa8004dd90f3e01/Sparser/code/s/drivers/sources/core.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*- File: "core" Module: "drivers;sources:" path (8/17/97) added another to that. sinks/return-value. --------------------------------------------- every source-driver ends up in this routine --------------------------------------...
copyright ( c ) 1992 - 1997,2013,2021 -- all rights reserved extensions copyright ( c ) 2009 BBNT Solutions LLC . All Rights Reserved Version : September 2021 1.2 ( 8/10/94 ) Redesigned core treatment to emphasize articles as a common 1.3 ( 8/24 ) added flag to control data initializations 1.4 ( 4...
ef3a803eb8b9b7e932228dd91d94c71c3ce05bb3da94312a5a6c82377b18d035
HeinrichApfelmus/david-cope-cmmc
overview.lisp
;;;;;COMPUTER MODELS OF MUSICAL CREATIVITY;;;;; By ; ; ; ; ; ;;;;; Sorcerer Function/Chapter 7 ;;;;; ;;;;; COMMON LISP ;;;;; ;;;;; load code to run SPEAC ;;;;; ...
null
https://raw.githubusercontent.com/HeinrichApfelmus/david-cope-cmmc/bc48564fda68383811773b56590161387dcf09c0/speac-chapter-7/overview.lisp
lisp
COMPUTER MODELS OF MUSICAL CREATIVITY;;;;; ; ; ; ; Sorcerer Function/Chapter 7 ;;;;; COMMON LISP ;;;;; load code to run SPEAC ;;;;; function ;;;;; COMPUTER MODELS OF MUSICAL CREATIVITY;;;;;
SPEAC The SPEAC program begins by analyzing the surface detail of the chosen work. This means that each SPEAC identifier is selected based on metric, tension, beat, duration, and other considerations as discussed in detail in Computer Models of Musical Intelligence. The program demonstrates this in its surface SPEA...
7742a73424a0dfedd04def1fe1e18a082765e2ffc0a2a087ba46d397508eb548
ucsd-progsys/dsolve
unionfind-pc.ml
let show x = x let init_rank n = let rec init_rec m i = if i >= n then m else init_rec (Store.set m i 1) (i+1) in init_rec Store.empty 0 let init_parent n = let rec init_rec m i = if i >= n then m else init_rec (Store.set m i i) (i+1) in init_rec Store.empty 0 let create n = (init_rank n, init_p...
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/unionfind-pc.ml
ocaml
COMMENT TO SEE BUG **********************************************
let show x = x let init_rank n = let rec init_rec m i = if i >= n then m else init_rec (Store.set m i 1) (i+1) in init_rec Store.empty 0 let init_parent n = let rec init_rec m i = if i >= n then m else init_rec (Store.set m i i) (i+1) in init_rec Store.empty 0 let create n = (init_rank n, init_p...
ff066ead2e8b4f5b2d621116ed1fd58172bb8d93442aab57c984f24ca15fa521
mauricioszabo/paprika
schemas_test.cljc
(ns paprika.schemas-test (:require [clojure.test :refer [deftest testing is]] [check.core :refer [check] :include-macros true] [matcher-combinators.test] [matcher-combinators.matchers :as m] [paprika.schemas :as schemas :include-macros true] [paprika.time :a...
null
https://raw.githubusercontent.com/mauricioszabo/paprika/b1923abb581ab12ce00971fa4e184c0974602ef9/test/paprika/schemas_test.cljc
clojure
(ns paprika.schemas-test (:require [clojure.test :refer [deftest testing is]] [check.core :refer [check] :include-macros true] [matcher-combinators.test] [matcher-combinators.matchers :as m] [paprika.schemas :as schemas :include-macros true] [paprika.time :a...
3c7344922f744fad8bc75d46a6f5b4d9a0477c9afb555aa70941de4b0d2b45a1
Wavenet/http_proxy
http_proxy_util.erl
%%% http_proxy_util.erl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @author < > 2013 - 2015 Global Wavenet ( Pty ) Ltd %%% @end Licensed under the Apache License , Version 2.0 ( the " License " ) ; %%% you may not use this file except in compliance with the License. %%% You m...
null
https://raw.githubusercontent.com/Wavenet/http_proxy/a66bbf5607fd8610a66355467378c171f8f65ce8/src/http_proxy_util.erl
erlang
http_proxy_util.erl @end 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 spe...
@author < > 2013 - 2015 Global Wavenet ( Pty ) Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(http_proxy_util). -copyright('Copyright (c) 2013 Wavenet International (Pvt) Ltd.'). -author('Vance Shipley <>...
6e1da80c76f23ffe2ad42a283c5a2a657a4d2ad6363371177244b5b4bf16f180
MaartenFaddegon/Hoed
Digraph.hs
module Digraph where module ( Digraph , sources , targets , nodes , preds , succs , -- isNode, isEdge, isPath, -- emptyDigraph, addNode, addEdge, assoc1toNdigraph, -- transitiveClosure, topoSort, insert , union , diff , cycles , subgraph , maxDagFrom ...
null
https://raw.githubusercontent.com/MaartenFaddegon/Hoed/8769d69e309928aab439b22bc3f3dbf5452acc77/examples/Digraph_not_data_invariant__with_properties/Digraph.hs
haskell
isNode, isEdge, isPath, emptyDigraph, addNode, addEdge, assoc1toNdigraph, transitiveClosure, topoSort, Data invariant: in a digraph pair-list [...(source,targets)...]: listed as a "source", though perhaps with [] targets Derive a digraph from an association list...
module Digraph where module ( Digraph , sources , targets , nodes , preds , succs , insert , union , diff , cycles , subgraph , maxDagFrom , eg , prop_assoc1toNdigraph ) where import GHC.Exts (groupWith) import Data.List (partition,(\\),sort) import Data.Maybe (isJust,fromJust) import Control.Mona...
155f95a2536ea70c26fdb1158214544b0ff8f6e25b8a91d158d1f37c35d30011
life0fun/clojure-idiom
worker_usage.clj
; ; use worker macro create a set of workers to execute computations ; in async mode. ; full fledged version is ; (ns msgqueue.rabbitmq.worker-usage (:use msgqueue.rabbitmq.rabbitmq) (:use msgqueue.rabbitmq.worker)) ; def a var with root binding to fn named with args and expr as body, ; most importantly, add fn ob...
null
https://raw.githubusercontent.com/life0fun/clojure-idiom/481b297eeabea917a68b492b1fb78b8151408507/msgqueue/src/msgqueue/rabbitmq/worker_usage.clj
clojure
use worker macro create a set of workers to execute computations in async mode. full fledged version is def a var with root binding to fn named with args and expr as body, most importantly, add fn object to workers map to make it namespace closure. remote thread running the same code, load this ns and can ac...
(ns msgqueue.rabbitmq.worker-usage (:use msgqueue.rabbitmq.rabbitmq) (:use msgqueue.rabbitmq.worker)) (Thread/sleep 3000) (* x y)) (defworker long-computation-two [a b c] (Thread/sleep 2000) (+ a b c)) (defworker expensive-audit-log [z] (println "expensive audit log:" z) (Thread/sleep 4000)) (defn wor...
f5ea0c62081f643572cf04184bc9ba25a155aea13dad2ea869b506f0adb91ca3
ecraven/r7rs-benchmarks
sum.scm
SUM -- Compute sum of integers from 0 to 10000 (import (scheme base) (scheme read) (scheme write) (scheme time)) (define (run n) (let loop ((i n) (sum 0)) (if (< i 0) sum (loop (- i 1) (+ i sum))))) (define (run-benchmark) (let* ((count (read)) (input1 (read)) (output (rea...
null
https://raw.githubusercontent.com/ecraven/r7rs-benchmarks/b0910c4759629fcd2fb84a323a4eeef3b6ffc6bf/src/sum.scm
scheme
SUM -- Compute sum of integers from 0 to 10000 (import (scheme base) (scheme read) (scheme write) (scheme time)) (define (run n) (let loop ((i n) (sum 0)) (if (< i 0) sum (loop (- i 1) (+ i sum))))) (define (run-benchmark) (let* ((count (read)) (input1 (read)) (output (rea...
19e1a38ce460cafa177aea39ed5472707500006b0b9869bb11fc04e6dc3786d1
r0man/postgis.spec
spec_test.clj
(ns postgis.spec-test (:require [clojure.spec.alpha :as s] [clojure.test :refer [deftest is]] [postgis.spec :as t])) (deftest test-geometry (is (s/exercise ::t/geometry))) (deftest test-geography (is (s/exercise ::t/geography))) (deftest test-point (is (s/exercise ::t/point))) (defte...
null
https://raw.githubusercontent.com/r0man/postgis.spec/08d6dae8efde0df0976bc5e2006ddfac5d7eac97/test/postgis/spec_test.clj
clojure
(ns postgis.spec-test (:require [clojure.spec.alpha :as s] [clojure.test :refer [deftest is]] [postgis.spec :as t])) (deftest test-geometry (is (s/exercise ::t/geometry))) (deftest test-geography (is (s/exercise ::t/geography))) (deftest test-point (is (s/exercise ::t/point))) (defte...
ebd55c17c1dbad0c8097c079da48a3ba35ebd74918398fca7fbcc9af4b4b072e
owickstrom/wickstrom.tech
Examples.hs
# LANGUAGE TemplateHaskell # module Main where import Prelude hiding (reverse) import Control.Monad (unless) import Data.List (sort) import Hedgehog import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range -- start snippet reverse prop_reve...
null
https://raw.githubusercontent.com/owickstrom/wickstrom.tech/5aa7d5f6ceda04597a5d935081e24251435df1ca/blog/src/_posts/property-based-testing-the-ugly-parts/Examples.hs
haskell
start snippet reverse end snippet reverse start snippet sort end snippet sort FAKE IMPLEMENTATIONS RUNNER
# LANGUAGE TemplateHaskell # module Main where import Prelude hiding (reverse) import Control.Monad (unless) import Data.List (sort) import Hedgehog import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range prop_reverse = property $ do xs ...
764687669347a2f55adea3d8e6c869e78a107d188c743e952b9936729a217b37
ocaml-multicore/multicoretests
STM.mli
* Module with combinators and definitions to specify an STM test (** Extensible type to represent result values *) type 'a ty = .. (** A range of constructors to represent built-in types *) type _ ty += | Unit : unit ty | Bool : bool ty | Char : char ty | Int : int ty | Int32 : int32 ty | Int64 : int64 ty...
null
https://raw.githubusercontent.com/ocaml-multicore/multicoretests/2491d697d81370289b18f7aad0975a510a7bf0e8/lib/STM.mli
ocaml
* Extensible type to represent result values * A range of constructors to represent built-in types * Combinator type to represent an OCaml type along with an associated [to_string] function * Combinator to represent the [exception] type * The specification of a state machine. * The type of commands * The type of ...
* Module with combinators and definitions to specify an STM test type 'a ty = .. type _ ty += | Unit : unit ty | Bool : bool ty | Char : char ty | Int : int ty | Int32 : int32 ty | Int64 : int64 ty | Float : float ty | String : string ty | Bytes : bytes ty | Exn : exn ty | Option : 'a ty -> 'a o...
04f6c989841998f8bd4d86bc46bcae556248aed0840c5c8f865250fd3227d999
yitzchak/common-lisp-jupyter
media.lisp
(in-package #:jupyter/widgets) (defwidget audio (dom-widget format-slot byte-value-slot) ((autoplay :initarg :autoplay :initform t :accessor widget-autoplay :documentation "When true, the audio starts when it's displayed." :trait :bool) (controls :initarg :controls :initform t ...
null
https://raw.githubusercontent.com/yitzchak/common-lisp-jupyter/a1dc775e4116ab61b34530fe33f3e27291d937f4/src/widgets/media.lisp
lisp
(in-package #:jupyter/widgets) (defwidget audio (dom-widget format-slot byte-value-slot) ((autoplay :initarg :autoplay :initform t :accessor widget-autoplay :documentation "When true, the audio starts when it's displayed." :trait :bool) (controls :initarg :controls :initform t ...
47267e2e3f3e3102386172f045862302a352da36dc72881ab7a78c68f5323903
alpacaaa/tex
Core.hs
module Core where import Relude hiding (State, state) import System.FilePath.Posix ((</>)) import qualified Data.Char as Char import qualified Data.List as List import qualified Data.List.PointedList as PointedList This module contains all the business logic , defined in the most abstract...
null
https://raw.githubusercontent.com/alpacaaa/tex/81b3a7c052454ff9bb4d552ade5b4e14b1db7b27/src/Core.hs
haskell
| The list of files in the current directory. | Application state. Everything we could possibly ever need should be carried around here. it's just a matter of carring around a `State` value, reading from it to render the screen and updating it when needed. Almost sounds too boring :) | Which files are we working ...
module Core where import Relude hiding (State, state) import System.FilePath.Posix ((</>)) import qualified Data.Char as Char import qualified Data.List as List import qualified Data.List.PointedList as PointedList This module contains all the business logic , defined in the most abstract...
089f574fddc3d34a0b79e7964dfc52416dc5d4ae274cf3a223e3612aec038d96
zotonic/zotonic
controller_admin_acl_rules_export.erl
@author 2022 @doc Export the ACL rules in a format that can be imported again . Copyright 2022 %% 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 %% %% Un...
null
https://raw.githubusercontent.com/zotonic/zotonic/3bd57f4d8ff55e8b006828ce3a3a2ff6749b9dc7/apps/zotonic_mod_acl_user_groups/src/controllers/controller_admin_acl_rules_export.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
@author 2022 @doc Export the ACL rules in a format that can be imported again . Copyright 2022 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(controller_admin_acl_rules_export). -export([ se...
b783641c736a5290f60eed5dfb3e921636c99fca16bbe5cd6cff64663855e9f8
richmit/mjrcalc
use-ndiff.lisp
;; -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; @file use-ndiff.lisp @author < > ;; @brief Numer...
null
https://raw.githubusercontent.com/richmit/mjrcalc/96f66d030034754e7d3421688ff201f4f1db4833/use-ndiff.lisp
lisp
-*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*- @file use-ndiff.lisp @brief Numerical differentiation.@EOL @std Common Lisp @see tst-ndiff.lisp Redistribution and use in source and binary forms, with or without modification, are permitted provided that th...
@author < > @parblock Copyright ( c ) 1997,2010,2013,2015 , < > All rights reserved . 1 . Redistributions of source code must retain the above copyright notice , this list of conditions , and the following disclaimer . 2 . Redistributions in binary form must reproduce the above copyright not...
3caad2dbf5a7bb51631771b04a6ebd3254786e76cceb95970a93b657ffa979d0
degree9/covenant
rbac.cljc
(ns covenant.rbac (:require [clojure.spec.alpha :as spec] [clojure.set :as s] [covenant.core :as core])) (defn covenant-contains "Returns a spec where items within `covenant` contain `data`." [covenant] (fn [data] (let [data (if (coll? data) data (list data))] (some covenant data)))) (defn cove...
null
https://raw.githubusercontent.com/degree9/covenant/8ff3635dab99215aafef0ed50cf47b063e4ff2df/src/covenant/rbac.cljc
clojure
nil cannot be anything other than nil boilerplate for clj... number must be a number and equal boilerplate needed for clj... string must be a string and equal boilerplate needed for clj... char must be a char and equal boilerplate needed for clj... keyword could be a named spec otherwise must be a keyword and...
(ns covenant.rbac (:require [clojure.spec.alpha :as spec] [clojure.set :as s] [covenant.core :as core])) (defn covenant-contains "Returns a spec where items within `covenant` contain `data`." [covenant] (fn [data] (let [data (if (coll? data) data (list data))] (some covenant data)))) (defn cove...
e6897ebf55c849ddada5f35a5e5e0d4e2fb0ec59f613c4be26db15a8279b0729
OCamlPro/ezjs
ezjs_lang.mli
val declare_table : string -> (string, string) Hashtbl.t -> unit val declare_translations : string -> (string * string) list -> unit val add_translations : string -> (string * string) list -> unit val same : string -> string * string type storage = [ `LocalStorage | `Cookie | `Temp ] val set : ?set...
null
https://raw.githubusercontent.com/OCamlPro/ezjs/4dc09b1e9eeecd46f3717036303ac704cc49b9a1/libs/utils/ezjs_lang.mli
ocaml
val declare_table : string -> (string, string) Hashtbl.t -> unit val declare_translations : string -> (string * string) list -> unit val add_translations : string -> (string * string) list -> unit val same : string -> string * string type storage = [ `LocalStorage | `Cookie | `Temp ] val set : ?set...
2a31b46aebcce6c6e14fbbfbc707f56eee1c9b2ad67aceafb7d051f6f3390387
silky/myth
tree_map.ml
#use "context.decls" let inc (n:nat) : nat = S (n) ;; let tree_map : (nat -> nat) -> tree -> tree |> { div2 => ( Leaf => Leaf | Node (Leaf, 0, Leaf) => Node (Leaf, 0, Leaf) | Node (Leaf, 2, Leaf) => Node (Leaf, 1, Leaf) | Node (Node (Leaf, 2, Leaf), 2, Leaf) => Node (Node (Leaf, 1, Leaf)...
null
https://raw.githubusercontent.com/silky/myth/b631edefb2a27a1d731daa6654517d91ca660b95/tests/pldi-2015-contexts/tree_map.ml
ocaml
#use "context.decls" let inc (n:nat) : nat = S (n) ;; let tree_map : (nat -> nat) -> tree -> tree |> { div2 => ( Leaf => Leaf | Node (Leaf, 0, Leaf) => Node (Leaf, 0, Leaf) | Node (Leaf, 2, Leaf) => Node (Leaf, 1, Leaf) | Node (Node (Leaf, 2, Leaf), 2, Leaf) => Node (Node (Leaf, 1, Leaf)...
2e56887bcb946d9bffa99f32b45c5a3b7fd0147571cd474fbf01120698876dc7
lpeterse/koka
NameMap.hs
----------------------------------------------------------------------------- Copyright 2012 Microsoft Corporation . -- -- This is free software; you can redistribute it and/or modify it under the terms of the Apache License , Version 2.0 . A copy of the License can be found in the file " license.txt " at the roo...
null
https://raw.githubusercontent.com/lpeterse/koka/43feefed258b9a533f07967d3f8867b02384df0e/src/Common/NameMap.hs
haskell
--------------------------------------------------------------------------- This is free software; you can redistribute it and/or modify it under the --------------------------------------------------------------------------- | Finite maps from 'Common.Name.Name's to ... ----------------------------------------...
Copyright 2012 Microsoft Corporation . terms of the Apache License , Version 2.0 . A copy of the License can be found in the file " license.txt " at the root of this distribution . module Common.NameMap ( NameMap, module Data.Map , find ) where import Data.Map import Common.Name i...
fb05395d29ee835288b5ca67a57da54b0ddf4d222148c18dbad1bc765b3e5f14
LightTable/LightTable
context.cljs
(ns lt.objs.context "Provide context object which manages temporary contexts LT can get in. An object can be associated with a context which is useful for keeping track of current tabset or browser" (:require [lt.object :as object]) (:require-macros [lt.macros :refer [behavior]])) (def contexts (atom #{})) (...
null
https://raw.githubusercontent.com/LightTable/LightTable/3760844132a17fb0c9cf3f3b099905865aed7e3b/src/lt/objs/context.cljs
clojure
(ns lt.objs.context "Provide context object which manages temporary contexts LT can get in. An object can be associated with a context which is useful for keeping track of current tabset or browser" (:require [lt.object :as object]) (:require-macros [lt.macros :refer [behavior]])) (def contexts (atom #{})) (...
71652b91b69da8df31608f031746b6567b3db9d568bc53044d8a973d124df4da
Abbath/Calculator
Edit.hs
# LANGUAGE DataKinds # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} module Web.Telegram.API.Bot.API.Edit ( -- * Functions editMessageText , editMessageTextM , editMessageCaption , editMessageCaptionM , editMessageReplyMarkup , editMessageReplyMarkupM , editInlineMess...
null
https://raw.githubusercontent.com/Abbath/Calculator/75985d5a9b4e602bc087462c8046bf2cf692a0e1/telegram-api-0.7.2.0/src/Web/Telegram/API/Bot/API/Edit.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE TypeOperators # * Functions * API * Types | Telegram Bot API | Use this method to edit text messages sent by the bot. On success, the edited 'Message' is returned, otherwise True is returned. | See 'editMessageText' | Use this method to edit captions of messages sent...
# LANGUAGE DataKinds # module Web.Telegram.API.Bot.API.Edit editMessageText , editMessageTextM , editMessageCaption , editMessageCaptionM , editMessageReplyMarkup , editMessageReplyMarkupM , editInlineMessageText , editInlineMessageTextM , editInlineMessageCaption , editInlineMessageCapt...
a88884a32ad8e9a4a378eaa3b5768f20f01089ae5e515852daee39c2c492e728
symbiont-io/detsys-testkit
Queue.hs
module StuntDouble.Queue where import Control.Monad import Data.IORef import qualified Data.Vector.Mutable as Vec ------------------------------------------------------------------------ data Queue a = Queue { qCapacity :: !Int , qSize :: !(IORef Int) , qRear :: !(IORef Int) , qQueue :: !(Vec.IOVe...
null
https://raw.githubusercontent.com/symbiont-io/detsys-testkit/29a3a0140730420e4c5cc8db23df6fdb03f9302c/src/runtime-prototype/src/StuntDouble/Queue.hs
haskell
---------------------------------------------------------------------- XXX: Don't export. XXX: >= XXX: abstract out looping XXX: avoid rereading each iteration... XXX: also
module StuntDouble.Queue where import Control.Monad import Data.IORef import qualified Data.Vector.Mutable as Vec data Queue a = Queue { qCapacity :: !Int , qSize :: !(IORef Int) , qRear :: !(IORef Int) , qQueue :: !(Vec.IOVector a) } newQueue :: Int -> IO (Queue a) newQueue cap = Queue <$> pur...
e235b26b5653399ad35ff5c85115f6b50032675162ee81ab4795d3717756a2db
clojars/clojars-web
steps.clj
(ns clojars.integration.steps (:require [cemerick.pomegranate.aether :as aether] [clojars.config :refer [config]] [clojars.db :as db] [clojars.maven :as maven] [clojars.test-helper :as help] [clojure.java.io :as io] [kerodon.core :refer [check choose fill-in follow follow-redirect press visit]] ...
null
https://raw.githubusercontent.com/clojars/clojars-web/22f831c9e8749ac7933af48655764ad5f5bdc3e8/test/clojars/integration/steps.clj
clojure
(ns clojars.integration.steps (:require [cemerick.pomegranate.aether :as aether] [clojars.config :refer [config]] [clojars.db :as db] [clojars.maven :as maven] [clojars.test-helper :as help] [clojure.java.io :as io] [kerodon.core :refer [check choose fill-in follow follow-redirect press visit]] ...
1d857822323fb472c54cfb4bcfd95cd9306ce66f7acf70e29af06599aad7b2a9
reactiveml/rml
webSockets.mli
Js_of_ocaml library * / * Copyright ( C ) 2012 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linkin...
null
https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/toplevel-alt/js/js-of-ocaml/lib/webSockets.mli
ocaml
Js_of_ocaml library * / * Copyright ( C ) 2012 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linkin...
c62d0eb713ee6406ad8b8fa3cbaf846e546082b0c8a1fb3bfcfa00fc44ea26d5
infinisil/nixbot
Types.hs
# LANGUAGE DeriveGeneric # module Types where import Config import Control.Concurrent.STM import Control.Concurrent.STM.TMQueue import Control.Monad.Reader import Data.Aeson import Data.Set (Set) import Data.Text ...
null
https://raw.githubusercontent.com/infinisil/nixbot/e8695fd73c07bc115ee0dd3e7c121cd985c04c06/src/Types.hs
haskell
# LANGUAGE DeriveGeneric # module Types where import Config import Control.Concurrent.STM import Control.Concurrent.STM.TMQueue import Control.Monad.Reader import Data.Aeson import Data.Set (Set) import Data.Text ...
e0c0ec1b245c16c4df742298ce5ce0b4be9f3f163b956d83cfa58af2f828a077
AshleyYakeley/Truth
Model.hs
module Pinafore.Base.Model.Model where import Changes.Core import Pinafore.Base.Know import Pinafore.Base.Model.FunctionAttribute import Pinafore.Base.Model.LensAttribute import Pinafore.Base.Model.LensProperty import Shapes contextualiseModels :: Model baseupdate -> Model update -> Model (ContextUpdate baseupdate up...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/ad3228f936e095cb9e2176aeb13f6679b8532dff/Pinafore/pinafore-base/lib/Pinafore/Base/Model/Model.hs
haskell
module Pinafore.Base.Model.Model where import Changes.Core import Pinafore.Base.Know import Pinafore.Base.Model.FunctionAttribute import Pinafore.Base.Model.LensAttribute import Pinafore.Base.Model.LensProperty import Shapes contextualiseModels :: Model baseupdate -> Model update -> Model (ContextUpdate baseupdate up...
5d0f8d4dc3a6263b58f6825134e904442ecdd41486bc1ca46002900ca1a35b92
hackclub/dungeon-of-the-slack
Main.hs
# LANGUAGE DeriveGeneric # # LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE StandaloneDeriving # {-# LANGUAGE ViewPatterns #-} module Main ( main ) where import Relude import Game import Slack import ...
null
https://raw.githubusercontent.com/hackclub/dungeon-of-the-slack/06dad14e1aee706029265c8f3b0f4176236ea8da/src/Main.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE ViewPatterns # user id hardcoded for convenience. sorry! renderGrid is a mess! i'm quite aware
# LANGUAGE DeriveGeneric # # LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # # LANGUAGE StandaloneDeriving # module Main ( main ) where import Relude import Game import Slack import Utils import Data.Aeson ( FromJSON ...
c3c5c555ad69579965776023e1168357b1d6586b4efd4839aa70dadd4be369f0
nfrisby/coxswain
T9.hs
-- A contradiction in an inferred type. # LANGUAGE DataKinds # # LANGUAGE TypeOperators # {-# OPTIONS_GHC -fconstraint-solver-iterations=10 #-} import Coxswain import Data.Proxy (Proxy(..)) yesOne :: Proxy (p .& 1 .= ()) -> () yesOne _ = () rZero :: Proxy (Row0 .& 0 .= ()) rZero = Proxy g () = yesOne rZero main ...
null
https://raw.githubusercontent.com/nfrisby/coxswain/bfd5777964a5b4ba64e1bcc4cf18df1c9d8fc558/coxswain/test/ill-typed/T9.hs
haskell
A contradiction in an inferred type. # OPTIONS_GHC -fconstraint-solver-iterations=10 #
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # import Coxswain import Data.Proxy (Proxy(..)) yesOne :: Proxy (p .& 1 .= ()) -> () yesOne _ = () rZero :: Proxy (Row0 .& 0 .= ()) rZero = Proxy g () = yesOne rZero main :: IO () main = return ()
40cae31da3aa3815ddb36f94aae1cf78ee9efe597e12864a68613432b10fb7c4
cedlemo/OCaml-GI-ctypes-bindings-generator
Target_pair.ml
open Ctypes open Foreign type t let t_typ : t structure typ = structure "Target_pair" let f_target = field t_typ "target" (ptr Atom.t_typ) let f_flags = field t_typ "flags" (uint32_t) let f_info = field t_typ "info" (uint32_t) let _ = seal t_typ
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Target_pair.ml
ocaml
open Ctypes open Foreign type t let t_typ : t structure typ = structure "Target_pair" let f_target = field t_typ "target" (ptr Atom.t_typ) let f_flags = field t_typ "flags" (uint32_t) let f_info = field t_typ "info" (uint32_t) let _ = seal t_typ
893667cffe74d719a0364538f827db4d5b1152018055b034e820d37d1b9344e2
ocaml-flambda/ocaml-jst
language_extension.ml
type t = | Comprehensions | Local | Include_functor | Polymorphic_parameters | Immutable_arrays let equal (a : t) (b : t) = (a = b) let all = [ Comprehensions ; Local ; Include_functor ; Polymorphic_parameters ; Immutable_arrays ] let default_extensions = [ Local ; Include_functor ; Polym...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/d1a8d0311b712c4eb51be6ad86b884e89eb3cc3c/utils/language_extension.ml
ocaml
We'll do this in a more principled way later * Which extensions can be enabled? -extension -only-erasable-extensions, -disable-all-extensions This is similar to [Misc.protect_refs], but we don't have values to set [extensions] and [universe] to. Idempotent The...
type t = | Comprehensions | Local | Include_functor | Polymorphic_parameters | Immutable_arrays let equal (a : t) (b : t) = (a = b) let all = [ Comprehensions ; Local ; Include_functor ; Polymorphic_parameters ; Immutable_arrays ] let default_extensions = [ Local ; Include_functor ; Polym...
3b6336c14f0dafb0a64f0fe206ce533db40e113b804ad13dd667b04c5123a0cb
chchen/comet
synth.rkt
#lang rosette/safe (require "../config.rkt" "../synth.rkt" "../util.rkt" "inversion.rkt" "memoize.rkt" "types.rkt" rosette/lib/match) ;; Given a trace sequence, return the trace sequence without the tail (define (trim-trace trace tail) (if (eq? trace tail) ...
null
https://raw.githubusercontent.com/chchen/comet/ac1ac0ff7bc480398613d400d31a7ef8b9cbcc7f/unity-synthesis/bool-bitvec/synth.rkt
racket
Given a trace sequence, return the trace sequence without the tail Synthesizes a bool-bitvec trace equal to the unity trace under mapping NOTE: This generates a trace that's correct for concurrent models. For sequential correctness, you need to ensure that the synthesized trace satisfies the refinement simulatio...
#lang rosette/safe (require "../config.rkt" "../synth.rkt" "../util.rkt" "inversion.rkt" "memoize.rkt" "types.rkt" rosette/lib/match) (define (trim-trace trace tail) (if (eq? trace tail) '() (cons (car trace) (trim-trace (cdr trace) tail)...
055f2519a08e124096af4fdfd7c1a705aa930cef10cbe7647d1885c32feba4fe
samuelrivas/moka
hold_state_aux.erl
Copyright ( c ) 2013 , < > %%% All rights reserved. %%% Redistribution and use in source and binary forms, with or without %%% modification, are permitted provided that the following conditions are met: %%% * Redistributions of source code must retain the above copyright %%% notice, this list of conditio...
null
https://raw.githubusercontent.com/samuelrivas/moka/92521e43d1d685794f462ed49403c99baeae0226/test/acceptance/hold_state_aux.erl
erlang
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistr...
Copyright ( c ) 2013 , < > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTI...
768d14012891ba36ca603406204624c8a1ee9299ce3b627f7068ca276b04a932
RutledgePaulV/datalogger
specs.clj
(ns datalogger.specs (:require [clojure.spec.alpha :as s])) (s/def ::ident (s/or :keyword keyword? :string string?)) (s/def ::level #{:trace :debug :info :warn :error}) (s/def ::pointer qualified-symbol?) (s/def ::encode-key-fn boolean?) (s/def ::decode-key-fn boolean?) (s/def ::pretty boolean?) (s/def ::mapper-conf...
null
https://raw.githubusercontent.com/RutledgePaulV/datalogger/200c14fc230b9bc64d6dc0150ad2262d22c154af/src/datalogger/specs.clj
clojure
(ns datalogger.specs (:require [clojure.spec.alpha :as s])) (s/def ::ident (s/or :keyword keyword? :string string?)) (s/def ::level #{:trace :debug :info :warn :error}) (s/def ::pointer qualified-symbol?) (s/def ::encode-key-fn boolean?) (s/def ::decode-key-fn boolean?) (s/def ::pretty boolean?) (s/def ::mapper-conf...
4d4da6d082fdfd5fcd732e9ec752e42a5a58cfcde1821a31e1b214018f2b78fb
lachenmayer/arrowsmith
NavTrails.hs
# LANGUAGE NoMonomorphismRestriction # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Snap.Extras.NavTrails where import Blaze.ByteString.Builder.ByteString import Control.Monad.State.Strict import Data.ByteString (ByteString) impo...
null
https://raw.githubusercontent.com/lachenmayer/arrowsmith/34b6bdeddddb2d8b9c6f41002e87ec65ce8a701a/snap-extras-0.9/src/Snap/Extras/NavTrails.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE ScopedTypeVariables # ----------------------------------------------------------------------------- ^ A session manager for the base ----------------------------------------------------------------------------- ^ The heist snaplet (not a lens), if you want splic...
# LANGUAGE NoMonomorphismRestriction # module Snap.Extras.NavTrails where import Blaze.ByteString.Builder.ByteString import Control.Monad.State.Strict import Data.ByteString (ByteString) import Data.Maybe import Data.Monoid import Data.Text ...
853a157d45863586aa26a2b30bd4b0a65268c31ac83421ea7325477833651a41
scverif/scverif
iltyping.mli
Copyright 2019 - 2020 - Inria , NXP SPDX - License - Identifier : BSD-3 - Clause - Clear WITH modifications open Utils open Common open Il (** Type-Checking transformations and operations for untrusted Il-AST **) (** kind of local variable declaration *) type id_kind = | Var of var ...
null
https://raw.githubusercontent.com/scverif/scverif/307a17b61a2286fb7009d434825f9245caebfddc/src/iltyping.mli
ocaml
* Type-Checking transformations and operations for untrusted Il-AST * * kind of local variable declaration * variables given as parameter * true means local label * record of (yet) undefined labels and variables within other macros * label e.g. for jumps * data attached to some macro * read/write copy of global e...
Copyright 2019 - 2020 - Inria , NXP SPDX - License - Identifier : BSD-3 - Clause - Clear WITH modifications open Utils open Common open Il type id_kind = type unsatdep = * environment holding data for type - checking an Ilast macro type env = { } * type - check and lift multiple Ilast macro(s ) to core Il mac...
bb0a92b4858df49449b6391f498b07fe211be9023251b63874e237d1945be47f
lnostdal/SymbolicWeb
combo_box.clj
(in-ns 'symbolicweb.core) ;; TODO: This thing is work in progress. Search for "page=blank" in main.clj. TODO : Might need a type thing , like in old - Symbolicweb . ( probably not actually ) (defn mk-ComboBoxElt [value-model] ;;(vm-sync vm (fn [v o n] n)) (ref {:id (cl-format false "~36R" (uid)) :text...
null
https://raw.githubusercontent.com/lnostdal/SymbolicWeb/d9600b286f70f88570deda57b05ca240e4e06567/src/symbolicweb/combo_box.clj
clojure
TODO: This thing is work in progress. Search for "page=blank" in main.clj. (vm-sync vm (fn [v o n] n)) Search for Node matching NEW-VALUE.
(in-ns 'symbolicweb.core) TODO : Might need a type thing , like in old - Symbolicweb . ( probably not actually ) (defn mk-ComboBoxElt [value-model] (ref {:id (cl-format false "~36R" (uid)) :text (vm value-model)})) (derive ::ComboBox ::ContainerView) (defn mk-ComboBox [container-model & attributes] ...
f76b732c7f14972e05ed1a5f5dcaace009d163607628f94c01c4107b5195001a
inconvergent/weird
poly.lisp
(in-package #:weir) (defmacro -verify-poly (poly* &optional flag) (weird:awg (poly v) `(let ((,poly ,poly*)) (declare (list ,poly)) (unless (= 3 (length (remove-duplicates ,poly))) (error "bad poly size: ~a" ,poly)) (unless (every (lambda (,v) (typecase ,v (fixnum (> ,v -1)) ...
null
https://raw.githubusercontent.com/inconvergent/weird/106d154ec2cd0e4ec977c3672ba717d6305c1056/src/weir/poly.lisp
lisp
TODO: should use -poly-exists instead of sort-poly? (declaim (inline -poly-exists)) if poly exists already, return nil else, add poly <-------- add poly to grph TODO: duplicates?? if edges->poly[edge] is now empty, weird precision issue. override veq eps TODO: can we fix this somehow? TODO: this feels very sk...
(in-package #:weir) (defmacro -verify-poly (poly* &optional flag) (weird:awg (poly v) `(let ((,poly ,poly*)) (declare (list ,poly)) (unless (= 3 (length (remove-duplicates ,poly))) (error "bad poly size: ~a" ,poly)) (unless (every (lambda (,v) (typecase ,v (fixnum (> ,v -1)) ...
238fa2225ecb9f45b3d563d1b5155805d9ef413421cd51607ddfb02f0d32edb0
batterseapower/haskell-kata
Generics2.hs
# LANGUAGE TypeFamilies , EmptyDataDecls , ScopedTypeVariables , TypeOperators , UndecidableInstances # import Data.Monoid type family ftag :% a :: * data Parametric0Tag (a :: *) type instance Parametric0Tag a :% () = a data Parametric1Tag (f :: * -> *) type instance Parametric1Tag f :% a = f a data Parametric3Ta...
null
https://raw.githubusercontent.com/batterseapower/haskell-kata/49c0c5cf48f8e5549131c78d026e4f2aa73d8a7a/Generics2.hs
haskell
fair enough ! TODO: try doing this as a functor category? fixAlgebra :: SyntaxAlgebra var term value -> SyntaxAlgebra (Fix3_1 var term value) (Fix3_2 var term value) (Fix3_3 var term value) SyntaxAlgebra var term value -- == Parametric3Tag VarF :% (FixTag3_1 (Parametric3Tag VarF) (Parametric3Tag TermF) (Param...
# LANGUAGE TypeFamilies , EmptyDataDecls , ScopedTypeVariables , TypeOperators , UndecidableInstances # import Data.Monoid type family ftag :% a :: * data Parametric0Tag (a :: *) type instance Parametric0Tag a :% () = a data Parametric1Tag (f :: * -> *) type instance Parametric1Tag f :% a = f a data Parametric3Ta...
69c5be718c660db962f75be806eafd01bcd1602c22ccd2bb7243af6251fb39f3
plow-technologies/ocaml-export
SumApp.hs
# LANGUAGE TemplateHaskell # module SumApp where import OCaml.Export import Sum $(mkOCamlSpecServer "SumPackage" (Proxy :: Proxy SumPackage))
null
https://raw.githubusercontent.com/plow-technologies/ocaml-export/752167f5df37d43534d27d9f63bb512eec1e750d/test/SumApp.hs
haskell
# LANGUAGE TemplateHaskell # module SumApp where import OCaml.Export import Sum $(mkOCamlSpecServer "SumPackage" (Proxy :: Proxy SumPackage))
d3231f177378ba5cb02abd5f889992250bcce9a25fe96f040e09a4de5e28c746
FranklinChen/hugs98-plus-Sep2006
Escape.hs
This module contains code for escaping / unescaping text in attributes and elements in the HaXml Element type , replacing characters by character references or vice - versa . Two uses are envisaged for this : ( 1 ) stopping HaXml generating incorrect XML when a character is included which i...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/HaXml/src/Text/XML/HaXml/Escape.hs
haskell
:: XmlEscaper -> [Content i] -> [Content i] Something describing a particular set of escapes. Standard boilerplate escaper, escaping everything that is nonprintable, non-ASCII, or might conceivably cause problems by corresponding character reference names. For example [('\60',"lt"),('\62',"gt"),('\38',"amp...
This module contains code for escaping / unescaping text in attributes and elements in the HaXml Element type , replacing characters by character references or vice - versa . Two uses are envisaged for this : ( 1 ) stopping HaXml generating incorrect XML when a character is included which i...
ce24e4cb681c2071307666f16d9c509aa18d1a3f15403602936a7b0702e4539e
logseq/logseq
global_config.cljs
(ns frontend.handler.global-config "This ns is a system component that encapsulates global config functionality. Unlike repo config, this also manages a directory for configuration. This component depends on a repo." (:require [frontend.fs :as fs] [frontend.handler.common.file :as file-common-handle...
null
https://raw.githubusercontent.com/logseq/logseq/f223ef535c03275eb1b7b09583eaad4a6c6560ce/src/main/frontend/handler/global_config.cljs
clojure
Use defonce to avoid broken state on dev reload Also known as home directory a.k.a. '~'
(ns frontend.handler.global-config "This ns is a system component that encapsulates global config functionality. Unlike repo config, this also manages a directory for configuration. This component depends on a repo." (:require [frontend.fs :as fs] [frontend.handler.common.file :as file-common-handle...
4082b1683b644dee524c7853a070b324137f5b0a4bc17b7811710d3290c1445e
iokasimov/apart
Stream.hs
module Test.Apart.Structures.Stream where
null
https://raw.githubusercontent.com/iokasimov/apart/5a3a8c0cfb516d5a55121dc39f7465f572866c90/Test/Apart/Structures/Stream.hs
haskell
module Test.Apart.Structures.Stream where
585be20b547bf433658ca7488d048120b8253b7680e5109cf498644527b3a1a2
jyh/metaprl
ma_ring__leader1_object_directory.ml
extends Nuprl_ring__leader1_object_directory let repeatWithRwsT tac defs = repeatT ( firstT ( map ( fun def- > progressT ( rwh def 0 ) thenT tac ) ) ) let auto_and_dT = onAllHypsT ( fun n- > ( tryT ( completeT ( dT n ta ) ) ) ) let superT defs = repeatT ( firstT ( map ( fun def- > progressT ( rwh def 0 )...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/mesa/ma_ring__leader1_object_directory.ml
ocaml
extends Nuprl_ring__leader1_object_directory let repeatWithRwsT tac defs = repeatT ( firstT ( map ( fun def- > progressT ( rwh def 0 ) thenT tac ) ) ) let auto_and_dT = onAllHypsT ( fun n- > ( tryT ( completeT ( dT n ta ) ) ) ) let superT defs = repeatT ( firstT ( map ( fun def- > progressT ( rwh def 0 )...
69213a8dc0cc86a4ca128eec289c22a2d8f0c2678652daf3b5fe7785155e38bd
DavidVujic/clojurescript-amplified
message_stories.cljs
(ns app.stories.message-stories (:require [app.components.message :as message] [app.stories.helper :as helper] [reagent.core :as reagent])) (def ^:export default (helper/->default {:title "A Message Component" :component message/editable :args ...
null
https://raw.githubusercontent.com/DavidVujic/clojurescript-amplified/3a98ed2a86a1aba49fcc55f0ca1207731df32620/src/stories/app/stories/message_stories.cljs
clojure
(ns app.stories.message-stories (:require [app.components.message :as message] [app.stories.helper :as helper] [reagent.core :as reagent])) (def ^:export default (helper/->default {:title "A Message Component" :component message/editable :args ...
8f0d228ac0f7508775f2d92176731191d32b60c9ef967a6034e39ad91bb28de7
ocsigen/macaque
compose.ml
open Sql let ids table = << {id = t.id} | t in $table$ >> let select id table = << t | t in $ids table$; t.id = $int32:id$ >> let exists table = let ok = <:value< 1 >> in << {exists = $ok$} | t in $table$ >> let result = List.iter (fun t -> if t#!exists = 1l then Printf.printf "exists !\n") (Query.view (...
null
https://raw.githubusercontent.com/ocsigen/macaque/a92e91c7ed443086551d909c3cfad22c71144f54/src/tests/compose.ml
ocaml
open Sql let ids table = << {id = t.id} | t in $table$ >> let select id table = << t | t in $ids table$; t.id = $int32:id$ >> let exists table = let ok = <:value< 1 >> in << {exists = $ok$} | t in $table$ >> let result = List.iter (fun t -> if t#!exists = 1l then Printf.printf "exists !\n") (Query.view (...
f34a66cb4ab3c5298df64f701563cc3d038aa1ecf91f11264495526220421ee2
shayne-fletcher/zen
dimension.ml
module type S = sig type +'a s = 'a * 'a type (+'a,+'b,+'c,+'d,+'e,+'f,+'g,+'h,+'i,+'j,+'k,+'l,+'m,+'n) t (*base dimensions*) val mass : float -> ('a,'a s,'b,'b,'c,'c,'d,'d,'e,'e,'f,'f,'g,'g) t val length : float -> ('a,'a,'b,'b s,'c,'c,'d,'d,'e,'e,'f,'f,'g,'g) t val time : float -> ('a,'a,'b,'b,'c,'c s,'...
null
https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/peano/dimension.ml
ocaml
base dimensions composite dimensions arithmetic conversion to float
module type S = sig type +'a s = 'a * 'a type (+'a,+'b,+'c,+'d,+'e,+'f,+'g,+'h,+'i,+'j,+'k,+'l,+'m,+'n) t val mass : float -> ('a,'a s,'b,'b,'c,'c,'d,'d,'e,'e,'f,'f,'g,'g) t val length : float -> ('a,'a,'b,'b s,'c,'c,'d,'d,'e,'e,'f,'f,'g,'g) t val time : float -> ('a,'a,'b,'b,'c,'c s,'d,'d,'e,'e,'f,'f,'g,'g...
ee9e3cc94b0f1701caed3310898359c3265c842dcd6428a4a6073b161cf9a0b9
janestreet/krb
std.ml
module Auth_context = Auth_context module Cache_type = Cache_type module Config = Config module Context = Context module Cred_cache = Cred_cache module Credentials = Credentials module Debug = Krb_debug module Debug_log_config = Debug_log_config module Enctype = Enctype module Get_init_creds_opts = Get_init_creds_opts ...
null
https://raw.githubusercontent.com/janestreet/krb/1105ba1e8b836f80f09e663bc1b4233cf2607e7b/internal/std.ml
ocaml
module Auth_context = Auth_context module Cache_type = Cache_type module Config = Config module Context = Context module Cred_cache = Cred_cache module Credentials = Credentials module Debug = Krb_debug module Debug_log_config = Debug_log_config module Enctype = Enctype module Get_init_creds_opts = Get_init_creds_opts ...
aa6e29aee00f10be5c383db8046479240acbe846f2dd1e51ba6fa24c642d5120
ayamada/clan
clanutil.clj
(ns jp.ne.tir.clan.clanutil (:import (com.badlogic.gdx Gdx Preferences Application$ApplicationType ApplicationListener) ) (:use [jp.ne.tir.clan.claninfo :as claninfo] )) ;;; ---------------------------------------------------------------- ;;; dynamic compile-time parameter ut...
null
https://raw.githubusercontent.com/ayamada/clan/4fe76a2670b2c6fa71bc955a365109c6401d65e6/cbl/src/jp/ne/tir/clan/clanutil.clj
clojure
---------------------------------------------------------------- dynamic compile-time parameter utilities ---------------------------------------------------------------- BootLoader.java utitities android実機にて、次回起動時にまたブートロゴを出すフラグを設定する BootLoader.javaがcalを取り出す為に使う jingle無効のオンオフを取得/セット ----------------------------...
(ns jp.ne.tir.clan.clanutil (:import (com.badlogic.gdx Gdx Preferences Application$ApplicationType ApplicationListener) ) (:use [jp.ne.tir.clan.claninfo :as claninfo] )) (defmacro keep-code-when-release [& bodies] (when claninfo/is-release? `(do ~@bodies))) (defmacro purge...
38c88cab8b6512187d67ee504607287cda5f2ac72497aa9b40cce971c46e5dee
emqx/emqx
emqx_statsd_sup.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. 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 o...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_statsd/src/emqx_statsd_sup.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. 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(emqx_statsd_sup). -behaviour(supervisor). -export([ start_link/0, ensure_child...
2d377234feebd6cc52aae4b050c508d845bbb08f4f81254c6cf8655e901a6563
buntine/Simply-Scheme-Exercises
22-5.scm
; Write a procedure that copies an input file to an output file but eliminates multiple ; consecutive copies of the same line. That is, if the input file contains the lines ; ; ; ; ; then the output file should contain ; ; (define (copy-and-shrink infile outfile) (let ((ou...
null
https://raw.githubusercontent.com/buntine/Simply-Scheme-Exercises/c6cbf0bd60d6385b506b8df94c348ac5edc7f646/22-files/22-5.scm
scheme
Write a procedure that copies an input file to an output file but eliminates multiple consecutive copies of the same line. That is, if the input file contains the lines then the output file should contain
(define (copy-and-shrink infile outfile) (let ((outport (open-output-file outfile))) (write-lines-to-file (read-and-shrink infile) outport) (close-output-port outport) 'done)) (define (read-and-shrink infile) (let ((inport (open-input-file infile))) (def...
df0635cca32e4a396b2eb97a68dacf8529464c16ae2fabfbe8cc88c81f34eb28
GrantMatejka/rasm
y_combinator5.rkt
(module ycomb racket (provide fact) (define (fact x) ( ( (lambda (Y) (Y (lambda (f) (lambda (n) (if (equal? 0 n) 1 (* n (f (- n 1)))))))) ( (lambda {x} (lambda {y} (y (lambda {z} (((x x) y) z))))) (lambda {x} (lambda {y} (y (lambda {z} (((x x) y) z))))) ) ...
null
https://raw.githubusercontent.com/GrantMatejka/rasm/42ca069a6a96ec50c5bb81cebf6c0156ff89d7cc/examples/y_combinator5.rkt
racket
(module ycomb racket (provide fact) (define (fact x) ( ( (lambda (Y) (Y (lambda (f) (lambda (n) (if (equal? 0 n) 1 (* n (f (- n 1)))))))) ( (lambda {x} (lambda {y} (y (lambda {z} (((x x) y) z))))) (lambda {x} (lambda {y} (y (lambda {z} (((x x) y) z))))) ) ...
2cef22c7711a511e755669f3576b00d97edca1fb78cae8b2a57b26e823e562a4
melhadad/fuf
determiner.lisp
;;; -*- Mode:Lisp; Syntax:Common-Lisp; Package: -*- ;;; ----------------------------------------------------------------------- ;;; File: determiner.lisp ;;; Description: Grammatical systems for determiners Author : Created : 19 Dec 1991 Modified : 14 Jul 92 : Allow status to be a str...
null
https://raw.githubusercontent.com/melhadad/fuf/57bd0e31afc6aaa03b85f45f4c7195af701508b8/surge/code/determiner.lisp
lisp
-*- Mode:Lisp; Syntax:Common-Lisp; Package: -*- ----------------------------------------------------------------------- File: determiner.lisp Description: Grammatical systems for determiners 19 Aug 92: Move cardinal/ordinal to gr-modular cats. Use head-determiner to...
Author : Created : 19 Dec 1991 Modified : 14 Jul 92 : Allow status to be a string . with proper name ( the happy ) with ( countable no ): ( three times the butter ) . 5 Jul 95 : SURGE 2.2 VERSION ...
08f1816709443f6fcc4df9929cb6c6b5eb4bddd6b7c04e4e33e9cb587f464c93
c4-project/c4f
lex_utils.ml
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
null
https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/utils/test/lex_utils.ml
ocaml
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
a9680c8c06eb2d5a58812eb8cd186d920da03947a032dc933b0b2594d855d655
camsaul/methodical
clojure_test.clj
(ns methodical.clojure-test "Tests to ensure we can replicate the basic behavior of vanilla Clojure multimethods." (:require [clojure.test :as t] [methodical.core :as m] [methodical.impl :as impl])) (defn- clojure-multifn [dispatch-fn & options] (impl/multifn (apply impl/clojure-multifn-i...
null
https://raw.githubusercontent.com/camsaul/methodical/dd7fcd03b83a0c7fbbc29947ebc4ee38d37fcb6f/test/methodical/clojure_test.clj
clojure
basic multifn with a few method impls, including a default
(ns methodical.clojure-test "Tests to ensure we can replicate the basic behavior of vanilla Clojure multimethods." (:require [clojure.test :as t] [methodical.core :as m] [methodical.impl :as impl])) (defn- clojure-multifn [dispatch-fn & options] (impl/multifn (apply impl/clojure-multifn-i...
eaaf8e5a4aac103cef613a21040120c1fe760d5fd614f0ddb1715956dbe724c6
cram2/cram
matrix-minmax.lisp
Regression test MATRIX - MINMAX for GSLL , automatically generated ;; Copyright 2009 , 2011 Distributed under the terms of the GNU General Public License ;; ;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free ...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/matrix-minmax.lisp
lisp
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Publi...
Regression test MATRIX - MINMAX for GSLL , automatically generated Copyright 2009 , 2011 Distributed under the terms of the GNU General Public License it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have r...
b108fa9189b2b2f7ad31b76a92b916992442d932e510b6133a091209ee907411
nuprl/gradual-typing-performance
clauses-spec-aux.rkt
#lang racket/base ;; --------------------------------------------------------------------------------------------------- ;; provides constants and functions for specifying the shape of clauses in big-bang and universe (provide port> nat> nat? proc> bool> num> ip> string> symbol> string-or-symbol> any> K False True) ...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/2htdp/private/clauses-spec-aux.rkt
racket
--------------------------------------------------------------------------------------------------- provides constants and functions for specifying the shape of clauses in big-bang and universe Symbol X -> X : boolean? Symbol X -> X : string? Symbol X -> X : symbol? Symbol X -> X : symbol? or string? Symbol...
#lang racket/base (provide port> nat> nat? proc> bool> num> ip> string> symbol> string-or-symbol> any> K False True) (require htdp/error "check-aux.rkt") (define (K w . r) w) (define (False w) #f) (define (True w) #t) Symbol X - > X : ? (define (port> tag x) (nat> tag x "port")) (define (bool> tag x) (chec...