_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
136ca88650903741684700126d1c3c4a118f5ce5c894d8ab1a980a8381d16a7c
kindl/Hypatia
Typechecker.hs
{-# LANGUAGE OverloadedStrings #-} module Typechecker where import Prelude hiding (lookup) import Syntax import Data.Word(Word64) import Data.HashMap.Strict(HashMap, fromList, insert, foldrWithKey, lookup) import qualified Data.HashSet as Set import Data.Monoid(getAp) import Control.Monad.Trans.Reader(ReaderT(ReaderT)...
null
https://raw.githubusercontent.com/kindl/Hypatia/25f73b029e8ea0045c833cb8719ce2dd1d86d4f2/src/Typechecker.hs
haskell
# LANGUAGE OverloadedStrings # Skolem variables are caught earlier, so this check is redundant, but makes sure that no skolem variables make it to the top level A shortcut that avoids generating new type variables convert a constructor declaration to a type fails type W = Wrapped (a -> a) works type W a = Wrappe...
module Typechecker where import Prelude hiding (lookup) import Syntax import Data.Word(Word64) import Data.HashMap.Strict(HashMap, fromList, insert, foldrWithKey, lookup) import qualified Data.HashSet as Set import Data.Monoid(getAp) import Control.Monad.Trans.Reader(ReaderT(ReaderT), runReaderT, asks, local) import C...
8edcde93a612833483e935844a41f65ae5d3fa59c6af4bab3632748481aa97db
kowainik/piece-of-cake-slayer
Spec.hs
module Main (main) where import Control.Exception (bracket) import System.IO (hSetEncoding, utf8) import Test.Hspec (Spec, describe, hspec) import Piece (mkAppEnv) import Piece.App.Env (Env (..)) import Piece.App.Monad (AppEnv) import Piece.Db.Schema (prepareDb) import Piece.Effects.Log (runAppLogIO_) import Test.Db ...
null
https://raw.githubusercontent.com/kowainik/piece-of-cake-slayer/8673c1347e9312ff24f735406fe3dc130820fbe0/test/Spec.hs
haskell
fix terminal encoding setup DB tables run all tests
module Main (main) where import Control.Exception (bracket) import System.IO (hSetEncoding, utf8) import Test.Hspec (Spec, describe, hspec) import Piece (mkAppEnv) import Piece.App.Env (Env (..)) import Piece.App.Monad (AppEnv) import Piece.Db.Schema (prepareDb) import Piece.Effects.Log (runAppLogIO_) import Test.Db ...
b4e600b0c075764b9cb16d6a3e52cce7c4f2fbc162b36a1751f22833ef6e2caf
BitGameEN/bitgamex
lager_util.erl
Copyright ( c ) 2011 - 2012 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the License at %% %% -2.0 %% %% Unless required...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/lager/src/lager_util.erl
erlang
Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. internal function to break the...
Copyright ( c ) 2011 - 2012 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY ...
fd2fb0887504b15145e5a2fff70a4e701877e71b74f4af8d106bd0beb49f0b4b
waldheinz/bling
Utils.hs
# LANGUAGE FlexibleContexts # module Graphics.Bling.Utils ( * flatTuple, -- ** NFData Wrappers for Vectors NFUVector, unNFUVector, mkNFUVector, NFBVector, unNFBVector, mkNFBVector, -- * Growing Vectors GrowVec, gvAdd, gvNew, gvLength, gvFreeze, -- * Debugging Tools ...
null
https://raw.githubusercontent.com/waldheinz/bling/1f338f4b8dbd6a2708cb10787f4a2ac55f66d5a8/src/lib/Graphics/Bling/Utils.hs
haskell
** NFData Wrappers for Vectors * Growing Vectors * Debugging Tools ------------------------------------------------------------------------------ Debugging Tools ------------------------------------------------------------------------------ ---------------------------------------------------------------------------...
# LANGUAGE FlexibleContexts # module Graphics.Bling.Utils ( * flatTuple, NFUVector, unNFUVector, mkNFUVector, NFBVector, unNFBVector, mkNFBVector, GrowVec, gvAdd, gvNew, gvLength, gvFreeze, debugRay ) where import Graphics.Bling.Math import Control.DeepSeq impo...
ce45f115eb097640f57c932073030c989f7f88f61ad9853fa0b52a8e076d826a
meooow25/haccepted
Bench.hs
import Criterion.Main import qualified AhoCorasickBench import qualified BFSBench import qualified BinSearchBench import qualified CentroidDecompBench import qualified ConvexHullBench import qualified DinicBench import qualified DSUBench import qualified DijkstraBench import qualified FenwickBench import qualified Flo...
null
https://raw.githubusercontent.com/meooow25/haccepted/6289506eed0f230c58f3fd51fafa9ef21d7bda38/bench/Bench.hs
haskell
import Criterion.Main import qualified AhoCorasickBench import qualified BFSBench import qualified BinSearchBench import qualified CentroidDecompBench import qualified ConvexHullBench import qualified DinicBench import qualified DSUBench import qualified DijkstraBench import qualified FenwickBench import qualified Flo...
68e607b8e60507fa07a3cc921e318d460ac43b808c232854ef66f144e8303274
pokepay/aws-sdk-lisp
route53.lisp
;; DO NOT EDIT: File is generated by AWS-SDK/GENERATOR. (uiop:define-package #:aws-sdk/services/route53 (:use) (:use-reexport #:aws-sdk/services/route53/api))
null
https://raw.githubusercontent.com/pokepay/aws-sdk-lisp/836b87df520391478a19462443342dc56f4b3f2c/services/route53.lisp
lisp
DO NOT EDIT: File is generated by AWS-SDK/GENERATOR.
(uiop:define-package #:aws-sdk/services/route53 (:use) (:use-reexport #:aws-sdk/services/route53/api))
b24947fe6153a505a99cc72b33d85d36c30c41cb5f8bf5d651e6a1d260198c1d
lehitoskin/blight
add-group.rkt
#lang racket/gui ; add-group.rkt ; contains code that adds a groupchat via a little dialog (require libtoxcore-racket/functions "frame.rkt" "friend-list.rkt" "smart-list.rkt" "../tox.rkt") (provide (all-defined-out)) (define add-group-button (new button% [parent panel] ...
null
https://raw.githubusercontent.com/lehitoskin/blight/807b0437c92ee41c68ca5a767d973817ae416b65/gui/add-group.rkt
racket
add-group.rkt contains code that adds a groupchat via a little dialog open a dialogue to optionally name the groupchat no group name supplied, go with defaults group name supplied, use that add group with number and name set the group title we chose TODO: tick box for audio capabilities add the group no group...
#lang racket/gui (require libtoxcore-racket/functions "frame.rkt" "friend-list.rkt" "smart-list.rkt" "../tox.rkt") (provide (all-defined-out)) (define add-group-button (new button% [parent panel] [label "Add group"] [callback (λ (button event) ...
c41b84c816afde2d92ac39f71c52bca10b27f00cb8bebbe3b837d53ffb38ed97
spl/ivy
dcheckstrengthen.ml
* * Copyright ( c ) 2004 , * < > * < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are * met : * * 1 . Redistributions of source code must reta...
null
https://raw.githubusercontent.com/spl/ivy/b1b516484fba637eb24e83d27555d273495e622b/src/deputy/optimizer/dcheckstrengthen.ml
ocaml
* * dcheckstrengthen.ml * * This module looks at groups of checks and replaces them * with a smaller number of equivalent checks. * Set location so that it is properly recorded by checkToInstr.
* * Copyright ( c ) 2004 , * < > * < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are * met : * * 1 . Redistributions of source code must reta...
be021f7ed39ebf2931d55b376d2c37822e4b853e1b8dc20450dfa50548531f3f
McCLIM/McCLIM
lisp-syntax-swine-tests.lisp
;;; --------------------------------------------------------------------------- ;;; License: LGPL-2.1+ (See file 'Copyright' for details). ;;; --------------------------------------------------------------------------- ;;; ( c ) copyright 2006 - 2008 ( ) ;;; ;;; -------------------------------------------------...
null
https://raw.githubusercontent.com/McCLIM/McCLIM/7c890f1ac79f0c6f36866c47af89398e2f05b343/Libraries/Drei/Tests/lisp-syntax-swine-tests.lisp
lisp
--------------------------------------------------------------------------- License: LGPL-2.1+ (See file 'Copyright' for details). --------------------------------------------------------------------------- --------------------------------------------------------------------------- Tests for the swine lisp sy...
( c ) copyright 2006 - 2008 ( ) (cl:in-package #:drei-tests) (in-suite lisp-syntax-tests) (test arglist-keyword-p "Test that the Lisp syntax module can properly recognize lambda list keywords." (mapcar #'(lambda (symbol) (is-true (drei-lisp-syntax::lambda-list-keyword-p symbol))) la...
b370141134bbca2499fb7406ed4c0f71aeb9dbbafc28cdecb8a77f10bc97c293
weavery/clarc
metrics.mli
(* This is free and unencumbered software released into the public domain. *) val program_size : program -> int val block_size : block -> int val opcodes_size : opcode list -> int val opcode_size : opcode -> int
null
https://raw.githubusercontent.com/weavery/clarc/1fb1c43210f52b4022e7f0ae30b7c7d4a9e7ca01/lib/EVM/metrics.mli
ocaml
This is free and unencumbered software released into the public domain.
val program_size : program -> int val block_size : block -> int val opcodes_size : opcode list -> int val opcode_size : opcode -> int
65ffef92040685471b785b7b6d53646d795ff1f1dc9db989b9a065d28f266b81
erlang/otp
cerl.erl
Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, software distributed under the License is distributed o...
null
https://raw.githubusercontent.com/erlang/otp/c0cc1fe4885a1b7c7d74a52e49c9a68784efbb20/lib/compiler/src/cerl.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 permi...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , 1999 - 2002 @author < > @doc abstract syntax trees . < p > This module defines an abstract data type for representing Core Erlang source code as syntax trees.<...
adc9b170e1131858982f59f168185ded0c7026fcbb5dfb8357be0a2f05355b97
SKS-Keyserver/sks-keyserver
dbtest.ml
(***********************************************************************) (* dbtest.ml *) (* *) Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 , 2...
null
https://raw.githubusercontent.com/SKS-Keyserver/sks-keyserver/a4e5267d817cddbdfee13d07a7fb38a9b94b3eee/dbtest.ml
ocaml
********************************************************************* dbtest.ml redistribute it and/or modify it under ...
Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 , 2011 , 2012 , 2013 and Contributors This file is part of SKS . SKS is free software ; you can Public License as published by the Free Software Foundation ; either version 2 of the License , or...
36a07ace9f6e8134f37f47dca88fa714e2c59bd113fd807181f70f8c451a205b
NorfairKing/smos
Compressed.hs
# LANGUAGE DeriveGeneric # module Smos.Server.DB.Compressed where import Codec.Compression.Zstd as Zstd import Data.ByteString import qualified Data.ByteString as SB import Data.Proxy import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Encoding as TE import Data.Word import Database.Per...
null
https://raw.githubusercontent.com/NorfairKing/smos/a3ed8fdbcb8f298bc49866bf6d0ee59a964ba0da/smos-server/src/Smos/Server/DB/Compressed.hs
haskell
The fromIntegral is safe because it is Int -> Word64
# LANGUAGE DeriveGeneric # module Smos.Server.DB.Compressed where import Codec.Compression.Zstd as Zstd import Data.ByteString import qualified Data.ByteString as SB import Data.Proxy import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Encoding as TE import Data.Word import Database.Per...
0d4df2d4cb1237eb7e316cfbf528ff972b9977a0e3746d2504b8d0b5e666929a
tidalcycles/tidal-listener
Config.hs
module Sound.Tidal.Listener.Config where import Data.Default data ListenerConfig = ListenerConfig { listenPort :: Int -- ^ UDP port for tidal-listener , remotePort :: Int -- ^ UDP port for tidal ^ Apply to patterns } deriving (Eq, Show) instance Default ListenerConfig where def = ListenerConfig { ...
null
https://raw.githubusercontent.com/tidalcycles/tidal-listener/b7efaab8b350e1729d780f4c711e7760757d5de3/src/Sound/Tidal/Listener/Config.hs
haskell
^ UDP port for tidal-listener ^ UDP port for tidal
module Sound.Tidal.Listener.Config where import Data.Default data ListenerConfig = ListenerConfig { ^ Apply to patterns } deriving (Eq, Show) instance Default ListenerConfig where def = ListenerConfig { listenPort = 6011 , remotePort = 6012 , doDeltaMini = True }
dbaf0570f606cb6008550b8a379485a13f520d3538ddb283037aa67146a2fbb3
epicallan/hreq
BasicAuth.hs
-- | Provides Basic Authentication support module Hreq.Core.Client.BasicAuth where import Prelude () import Prelude.Compat import Data.Text import Hreq.Core.Client.Request -- | Required data for Basic Authentication data BasicAuthData = BasicAuthData { baUser :: Text , baPassword :: Text } | Authenticat...
null
https://raw.githubusercontent.com/epicallan/hreq/f12fcb9b9dd1ad903c6b36a8cf850edb213d4792/hreq-core/src/Hreq/Core/Client/BasicAuth.hs
haskell
| Provides Basic Authentication support | Required data for Basic Authentication
module Hreq.Core.Client.BasicAuth where import Prelude () import Prelude.Compat import Data.Text import Hreq.Core.Client.Request data BasicAuthData = BasicAuthData { baUser :: Text , baPassword :: Text } | Authenticate a request using Basic Authentication basicAuthReq :: BasicAuthData -> Request -> Requ...
d6b7a27e8d9757add9872c649fe208a829b297a17f28e712c552fce7f6bacc9b
basho/riak_core
riak_core_capability.erl
%% ------------------------------------------------------------------- %% %% riak_core: Core Riak Application %% Copyright ( c ) 2007 - 2012 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except...
null
https://raw.githubusercontent.com/basho/riak_core/762ec81ae9af9a278e853f1feca418b9dcf748a3/src/riak_core_capability.erl
erlang
------------------------------------------------------------------- riak_core: Core Riak Application Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the sp...
Copyright ( c ) 2007 - 2012 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY ...
07c883e94230efdf42aed370c92fa3ed472e0b2bae4611aa62e64583a8d60403
fallen-icarus/cardano-swaps
Types.hs
# LANGUAGE RecordWildCards # {-# LANGUAGE OverloadedStrings #-} module CLI.Types where import Data.Aeson import CardanoSwaps data Asset = Ada | Asset !CurrencySymbol !TokenName -- | For when saving to file is optional data Output = Stdout | File !FilePath data Command = SwapCmd SwapCmd | BeaconCmd BeaconCmd ...
null
https://raw.githubusercontent.com/fallen-icarus/cardano-swaps/9c60327c567414842f16eddcd3baa03bfecc74e8/app/CLI/Types.hs
haskell
# LANGUAGE OverloadedStrings # | For when saving to file is optional ^ Api key ^ Api key | Type that captures all info a user needs to interact with available swaps. | The assets at the available utxo.
# LANGUAGE RecordWildCards # module CLI.Types where import Data.Aeson import CardanoSwaps data Asset = Ada | Asset !CurrencySymbol !TokenName data Output = Stdout | File !FilePath data Command = SwapCmd SwapCmd | BeaconCmd BeaconCmd | QueryAvailableSwaps !Asset !Asset !Network !Output data SwapCmd = Expo...
43179483454bd931608504174472725279f232dc5c75cfbb840381f60b8620d8
commercialhaskell/stack
Test.hs
main :: IO () main = do readFile "files/file.txt" pure ()
null
https://raw.githubusercontent.com/commercialhaskell/stack/b846eae85d9f30d28d7a4fa33fea139e7d1420c7/test/integration/tests/717-sdist-test/files/package-with-failing-test/test/Test.hs
haskell
main :: IO () main = do readFile "files/file.txt" pure ()
bc06236b4463439e86e22d8f4b0f11bc4bbab3924046d52d005cfa499d83cc97
anwarmamat/cmsc330spring19-public
testUtils.ml
open OUnit2 let string_of_list f xs = "[" ^ (String.concat "; " (List.map f xs)) ^ "]" let string_of_int_list = string_of_list string_of_int
null
https://raw.githubusercontent.com/anwarmamat/cmsc330spring19-public/98af1e8efc3d8756972731eaca19e55fe8febb69/discussions/discussion3/testUtils.ml
ocaml
open OUnit2 let string_of_list f xs = "[" ^ (String.concat "; " (List.map f xs)) ^ "]" let string_of_int_list = string_of_list string_of_int
c6aad9d792185013d02c2f6f17c18a49cd86746a68fc3ade7edf756302b44033
HaskellForCats/HaskellForCats
funReact.hs
module where import Control.Monad import Data.Maybe import Text.Read (readMaybe) import qualified Graphics.UI.Threepenny as UI import Graphics.UI.Threepenny.Core main = startGUI defaultConfig setup setup window = do (return window) # set title "Addtion" input1 <- UI.input input2 <- U...
null
https://raw.githubusercontent.com/HaskellForCats/HaskellForCats/2d7a15c0cdaa262c157bbf37af6e72067bc279bc/funReact.hs
haskell
module where import Control.Monad import Data.Maybe import Text.Read (readMaybe) import qualified Graphics.UI.Threepenny as UI import Graphics.UI.Threepenny.Core main = startGUI defaultConfig setup setup window = do (return window) # set title "Addtion" input1 <- UI.input input2 <- U...
7c695d8b49ccb2f7bc0cb5dc8aeb72e97d84d87ac3af135c25d20beeefa74d8f
mariari/Misc-ML-Scripts
Helpers.hs
module Data.Sexp.Structure.Helpers ( fromGen, toStarList, fromStarList, toNameSymbol, fromNameSymbol, fromInteger, toInteger, toSymbol, fromSymbol, ) where import Mari.Library hiding (fromInteger, toInteger) import qualified Mari.Library.NameSymbol as NameSymbol import qualified Dat...
null
https://raw.githubusercontent.com/mariari/Misc-ML-Scripts/376a7d55b565bf9205e697c5c3b78e1d6b6aedcd/Haskell/Sexp/src/Data/Sexp/Structure/Helpers.hs
haskell
module Data.Sexp.Structure.Helpers ( fromGen, toStarList, fromStarList, toNameSymbol, fromNameSymbol, fromInteger, toInteger, toSymbol, fromSymbol, ) where import Mari.Library hiding (fromInteger, toInteger) import qualified Mari.Library.NameSymbol as NameSymbol import qualified Dat...
97361d58763f411f30bddb85d8c6ba5d645cb8a7b7f5416c5ed40ddf295aee16
OCamlPro/ocaml-benchs
echo_merge.ml
open Core.Std open Async.Std let command = Command.async_basic ~summary:"Echo test" Command.Spec.( empty +> Echo_common.port_arg () +> Echo_common.nbr_arg () +> Echo_common.debug_arg () ) (fun port nbr debug () -> Echo_common.debug := debug; Echo_server.run ~port (Some nbr) (...
null
https://raw.githubusercontent.com/OCamlPro/ocaml-benchs/98047e112574e6bf55137dd8058f227a9f40281b/async_echo/echo_merge.ml
ocaml
open Core.Std open Async.Std let command = Command.async_basic ~summary:"Echo test" Command.Spec.( empty +> Echo_common.port_arg () +> Echo_common.nbr_arg () +> Echo_common.debug_arg () ) (fun port nbr debug () -> Echo_common.debug := debug; Echo_server.run ~port (Some nbr) (...
188276f7244b512adb55109675ce70493edaad48d6a46de0688038388037a304
nomeata/haskell-rec-def
Map.hs
# LANGUAGE TypeFamilies # | The type ' RMap ' @a@ @b@ is like ' M.Map ' @a@ @b@ , but allows recursive definitions : > > > : { let " Hello " m2 m2 = RM.insert 42 " World " m1 in RM.get m1 :} fromList [ ( 23,"Hello"),(42,"World " ) ] All functions in this API are monotone with regard to ...
null
https://raw.githubusercontent.com/nomeata/haskell-rec-def/3365379b6c29aa32a5170b8d0336c73413ca7434/Data/Recursive/Map.hs
haskell
$setup >>> import qualified Data.Recursive.Map as RM >>> import qualified Data.Set as S >>> import qualified Data.Map as M >>> :set -XFlexibleInstances >>> :set -XScopedTypeVariables >>> import Test.QuickCheck | prop> RM.get (RM.mk m) === m | prop> RM.get RM.empty === M.empty better use RS.id either here or i...
# LANGUAGE TypeFamilies # | The type ' RMap ' @a@ @b@ is like ' M.Map ' @a@ @b@ , but allows recursive definitions : > > > : { let " Hello " m2 m2 = RM.insert 42 " World " m1 in RM.get m1 :} fromList [ ( 23,"Hello"),(42,"World " ) ] All functions in this API are monotone with regard to ...
baf3d713e173c909554d48ddfa254c2097b968e3307a4add0925beba5131e51f
oscoin/oscoin
Difficulty.hs
module Oscoin.Crypto.Blockchain.Block.Difficulty ( Difficulty , TargetDifficulty , fromDifficulty , unsafeDifficulty , minDifficulty , maxDifficulty , easyDifficulty , parseDifficulty , prettyDifficulty , encodeDifficulty , decodeDifficulty , readWord32LE ) where imp...
null
https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/src/Oscoin/Crypto/Blockchain/Block/Difficulty.hs
haskell
| Block difficulty. Bitcoin block header. See <> for more details. 'decodeDifficulty'. Overflow! | The minimum difficulty. | Decode the compact number used in the difficulty target of a block. Taken from 'haskoin-core' project. The compact format is a representation of a whole number \(N\) using an \[ ...
module Oscoin.Crypto.Blockchain.Block.Difficulty ( Difficulty , TargetDifficulty , fromDifficulty , unsafeDifficulty , minDifficulty , maxDifficulty , easyDifficulty , parseDifficulty , prettyDifficulty , encodeDifficulty , decodeDifficulty , readWord32LE ) where imp...
cec724b85a40787ad5bf2c3ca7dd35cad52f53bc5b294e58fcd939eaefc85e9a
audreyt/openafp
SVI.hs
module OpenAFP.Records.PTX.SVI where import OpenAFP.Types import OpenAFP.Internals data PTX_SVI = PTX_SVI { ptx_svi_Type :: !N1 ,ptx_svi :: !N2 } deriving (Show, Typeable)
null
https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/PTX/SVI.hs
haskell
module OpenAFP.Records.PTX.SVI where import OpenAFP.Types import OpenAFP.Internals data PTX_SVI = PTX_SVI { ptx_svi_Type :: !N1 ,ptx_svi :: !N2 } deriving (Show, Typeable)
380abff3e433b8e17a148848f225e9aa973ef61165be4974975c4f9478a868eb
Opetushallitus/aipal
vastaajatunnus_sql_test.clj
(ns aipal.arkisto.vastaajatunnus-sql-test (:require [clojure.test :refer :all] [clojure.test.check.generators :as gen] [clojure.test.check.properties :as prop] [clojure.test.check.clojure-test :refer [defspec]] [clj-time.core :as ctime] [clj-time.coerce :as ...
null
https://raw.githubusercontent.com/Opetushallitus/aipal/767bd14ec7153dc97fdf688443b9687cdb70082f/aipal/test/clj/aipal/arkisto/vastaajatunnus_sql_test.clj
clojure
(ns aipal.arkisto.vastaajatunnus-sql-test (:require [clojure.test :refer :all] [clojure.test.check.generators :as gen] [clojure.test.check.properties :as prop] [clojure.test.check.clojure-test :refer [defspec]] [clj-time.core :as ctime] [clj-time.coerce :as ...
ff6206e5c0e58cdd21b4fc03decd8d3ff6ea6a38067bd027130b91dbe6e4f017
input-output-hk/cardano-addresses
Internal.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - orphans # -- | Copyright : © 2018 - 2021 IOHK -- License: Apache-2.0 -- -- Utility functions for internal use of the library. module Cardano.Address.Internal ( orElse , WithErrorMe...
null
https://raw.githubusercontent.com/input-output-hk/cardano-addresses/266fdbe20a56747efa29c0279982eb1fc9092fff/core/lib/Cardano/Address/Internal.hs
haskell
# LANGUAGE OverloadedStrings # | License: Apache-2.0 Utility functions for internal use of the library.
# LANGUAGE FlexibleContexts # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - orphans # Copyright : © 2018 - 2021 IOHK module Cardano.Address.Internal ( orElse , WithErrorMessage (..) , DeserialiseFailure (..) ) where import Prelude import Codec.CBOR.Read ( DeserialiseFailure (....
547a7163377bb801aa6c82dc3ed45fb69e7ca6dfa98391bbc7f5b40eb294ac1e
pfdietz/ansi-test
make-list.lsp
;-*- Mode: Lisp -*- Author : Created : Sat Apr 19 22:04:27 2003 ;;;; Contains: Tests of MAKE-LIST (deftest make-list-empty.1 (make-list 0) nil) (deftest make-list-empty.2 (make-list 0 :initial-element 'a) nil) (deftest make-list-no-initial-element (make-list 6) (nil nil nil nil nil nil...
null
https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/cons/make-list.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of MAKE-LIST Error tests
Author : Created : Sat Apr 19 22:04:27 2003 (deftest make-list-empty.1 (make-list 0) nil) (deftest make-list-empty.2 (make-list 0 :initial-element 'a) nil) (deftest make-list-no-initial-element (make-list 6) (nil nil nil nil nil nil)) (deftest make-list-with-initial-element (make-list 6...
8275913a893507f41c1509aac1363ade3ff525b12fb77bb8efd6bd0fba8ee2a7
MinaProtocol/mina
mina_base_stack_frame.ml
open Utils module Digest = struct module Types = struct module type S = sig module V1 : sig type t = private Mina_base_zkapp_basic.F.V1.t end end end module type Concrete = sig module V1 : sig type t = Pasta_bindings.Fp.t end end module M = struct module V1 = s...
null
https://raw.githubusercontent.com/MinaProtocol/mina/7a380064e215dc6aa152b76a7c3254949e383b1f/src/lib/mina_wire_types/mina_base/mina_base_stack_frame.ml
ocaml
open Utils module Digest = struct module Types = struct module type S = sig module V1 : sig type t = private Mina_base_zkapp_basic.F.V1.t end end end module type Concrete = sig module V1 : sig type t = Pasta_bindings.Fp.t end end module M = struct module V1 = s...
e4e3ac94aba654bb3ee868c850a5246ef5ff87d6eb4320b019d53a6d6fb91c6e
rainyt/ocaml-haxe
ocaml_lib_file.ml
exception STRING of string exception BYTES of bytes exception BUFFER_T of Buffer.t let getBuffer path = try let input = ref ((Stdlib.open_in (!path))) in let len = ref ((Stdlib.in_channel_length (!input))) in let buffer = ref ((Buffer.create (!len))) in (Buffer.add_channel (!buffer) (!input) (!len)); ignore (raise (B...
null
https://raw.githubusercontent.com/rainyt/ocaml-haxe/2eccb6cc6e2f75156cff59dec154461736f51b15/bin/ocaml_lib_file.ml
ocaml
exception STRING of string exception BYTES of bytes exception BUFFER_T of Buffer.t let getBuffer path = try let input = ref ((Stdlib.open_in (!path))) in let len = ref ((Stdlib.in_channel_length (!input))) in let buffer = ref ((Buffer.create (!len))) in (Buffer.add_channel (!buffer) (!input) (!len)); ignore (raise (B...
376db5c279544bfc79bf8ab0575d5c4ac64380c826f1d8c7b27737e75719f920
mainland/nikola
CUDA.hs
# LANGUAGE CPP # {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE EmptyDataDecls #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # {-# LANGUAGE TypeSynonymInstances #-} -- | -- Module : Data.Array.Nikola.B...
null
https://raw.githubusercontent.com/mainland/nikola/d86398888c0a76f8ad1556a269a708de9dd92644/src/Data/Array/Nikola/Backend/CUDA.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE EmptyDataDecls # # LANGUAGE TypeSynonymInstances # | Module : Data.Array.Nikola.Backend.CUDA License : BSD-style Stability : experimental Portability : non-portable module Data.Array.Nikola.Operators.Reduction, import Data.Array.Nikola.Operators.Reduction | ...
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # Copyright : ( c ) 2012 Maintainer : < > module Data.Array.Nikola.Backend.CUDA ( module Data.Array.Nikola.Backend.C.Codegen, ...
48c05559c6c72b64025de4c71211c2ec9c4366ae44bd8c162f0fb833d07a1a4d
jship/monad-logger-aeson
MetadataNoThreadContextYes.hs
# LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # module TestCase.LogWarn.MetadataNoThreadContextYes ( testCase ) where import Control.Monad.Logger.Aeson ( (.=), Loc(..), LogLevel(..), LoggedMessage(..), logWarn, withThreadContext ) import Data.Aeson.QQ.Simple (aesonQQ) im...
null
https://raw.githubusercontent.com/jship/monad-logger-aeson/b983befb790818628f1c4a5f02a2b96b08dcf6ce/monad-logger-aeson/test-suite/TestCase/LogWarn/MetadataNoThreadContextYes.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE NamedFieldPuns # # LANGUAGE QuasiQuotes # module TestCase.LogWarn.MetadataNoThreadContextYes ( testCase ) where import Control.Monad.Logger.Aeson ( (.=), Loc(..), LogLevel(..), LoggedMessage(..), logWarn, withThreadContext ) import Data.Aeson.QQ.Simple (aesonQQ) import Data.Time (UTCTime(..)) import...
29d5ad912d9ac564afdd9490221d7b21063c76e2e0f8c5eba74412b1db7adb5c
statebox/cql
App.hs
SPDX - License - Identifier : AGPL-3.0 - only This file is part of ` statebox / cql ` , the categorical query language . Copyright ( C ) 2019 < This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free So...
null
https://raw.githubusercontent.com/statebox/cql/b155e737ef4977ec753e44790f236686ff6a4558/http/src/Api/App.hs
haskell
base
SPDX - License - Identifier : AGPL-3.0 - only This file is part of ` statebox / cql ` , the categorical query language . Copyright ( C ) 2019 < This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free So...
ed954d95ceda8b29df2d85c4e2885b2ba9def3da69c07d941a7409e70c1ed121
ghcjs/ghcjs-dom
HTMLParagraphElement.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.HTMLParagraphElement (js_setAlign, setAlign, js_getAlign, getAlign, HTMLParagra...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/HTMLParagraphElement.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.HTMLParagraphElement (js_setAlign, setAlign, js_getAlign, getAlign, HTMLParagraphElement(..), gTypeHTMLParagraphElement) where import Prelude ((.), (==), (>>=), return, IO...
4894a91f2c30983a3a45391219af4ec13e2f55d6ad7d1ee669817494698bcac9
t-sin/inquisitor
table.lisp
#| This code is a part of inquisitor project and a derivate from guess (). |# This code is derivative of libguess-1.0 and guess-0.1.0 for common lisp . ;;; Copyright ( c ) 2011 zqwell < > ;;; ;;; The following is the original copyright notice. ;;; ;;; Redistribution and use in source and binary forms, with ...
null
https://raw.githubusercontent.com/t-sin/inquisitor/423fa9bdd4a68a6ae517b18406d81491409ccae8/src/encoding/table.lisp
lisp
This code is a part of inquisitor project and a derivate from guess (). The following is the original copyright notice. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and...
This code is derivative of libguess-1.0 and guess-0.1.0 for common lisp . Copyright ( c ) 2011 zqwell < > 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright 3 . Neither the name of the authors nor the names of its contribut...
63c495d399f43073820bc2037121d6a1178fc26211463492255c2b152696a7e2
eamsden/Animas
Elevator.hs
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * A F R P * * ...
null
https://raw.githubusercontent.com/eamsden/Animas/2404d1de20982a337109fc6032cb77b022514f9d/examples/Elevator/Elevator.hs
haskell
---------------------------------------------------------------------------- Auxiliary definitions ---------------------------------------------------------------------------- [m] [m] [m/s] ---------------------------------------------------------------------------- Elevator simulator -----------------------------...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * A F R P * * ...
1e1a4a18ac2673d01614dceda18a813a9c80164ee3dd3cafb3053ba04ab0fb6b
takikawa/racket-ppa
macosx.rkt
Support for loading root cerficates from Mac OS keychains . #lang racket/base (require ffi/unsafe ffi/unsafe/objc ffi/unsafe/define "add-cert.rkt") (provide load-macosx-keychain) ;; TO DO: ;; - better error handling ;; - reliable mem management ;; - alternatives to deprecated functions ;...
null
https://raw.githubusercontent.com/takikawa/racket-ppa/caff086a1cd48208815cec2a22645a3091c11d4c/collects/openssl/private/macosx.rkt
racket
TO DO: - better error handling - reliable mem management - alternatives to deprecated functions Alternative: generate PEM file with ---- FIXME: or array of keychains FIXME: SecCertificateRef or array ---- FIXME: check result for errors (?) FIXME: other error codes?
Support for loading root cerficates from Mac OS keychains . #lang racket/base (require ffi/unsafe ffi/unsafe/objc ffi/unsafe/define "add-cert.rkt") (provide load-macosx-keychain) security export -k /System / Library / Keychains/ ... -t certs -f pemseq -o foo.pem (define libcf (case ...
a272ea446a3ae9933a06ecb39f0c522f1907197093ed8c76c47c51d0997c0556
camllight/camllight
frx_synth.ml
(* Some notion of synthetic events *) #open "protocol";; (* To each event is associated a table of (widget, callback) *) let events = hashtblc__new 37 ;; Notes : * " cascading " events ( on the same event ) are not supported * Only one binding active at a time for each event on each widget . * "ca...
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/camltk4/frx/frx_synth.ml
ocaml
Some notion of synthetic events To each event is associated a table of (widget, callback) Get the callback table associated with <name>. Initializes if required Invoke all callbacks Invoke callback for p reactivate the callback Remove binding for event <name> on widget <w> Adds <f> as callback for widget...
#open "protocol";; let events = hashtblc__new 37 ;; Notes : * " cascading " events ( on the same event ) are not supported * Only one binding active at a time for each event on each widget . * "cascading" events (on the same event) are not supported * Only one binding active at a time for each...
8e5075002f1363d00018c21f0e1725522131af8b536edaf3eaae51c2669c22aa
keera-studios/haskellifi-trayicon
Setup.hs
#!/usr/bin/env runhaskell import Distribution.Simple import Distribution.Simple.Setup import Distribution.Simple.PreProcess import Distribution.Simple.Program import Distribution.Simple.Utils import Distribution.PackageDescription import Distribution.Simple.LocalBuildInfo import Data.Char import System.Exit import Sys...
null
https://raw.githubusercontent.com/keera-studios/haskellifi-trayicon/d148387bb362f7cdc959c2a07e981675b7e6bc29/Setup.hs
haskell
This is a non-portable version of hails. It generates the files inside the src dir.
#!/usr/bin/env runhaskell import Distribution.Simple import Distribution.Simple.Setup import Distribution.Simple.PreProcess import Distribution.Simple.Program import Distribution.Simple.Utils import Distribution.PackageDescription import Distribution.Simple.LocalBuildInfo import Data.Char import System.Exit import Sys...
a5ff74208b65c64aeaa344b990988a0b9d3b25851cf016ed485588e3563b48b7
input-output-hk/ouroboros-network
Blob.hs
module Test.Util.Blob ( Blob (..) , blobFromBS , blobToBS ) where import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as C8 import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Lazy.Char8 as LC8 import Data.String (IsString (..)) import ...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/c82309f403e99d916a76bb4d96d6812fb0a9db81/ouroboros-consensus-test/src/Test/Util/Blob.hs
haskell
--------------------------------------------------------------------------- --------------------------------------------------------------------------- ----------------------------------------------------------------------------} For the custom 'Show' and 'Arbitrary' instances A builder of a non-empty bytestring.
module Test.Util.Blob ( Blob (..) , blobFromBS , blobToBS ) where import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as C8 import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Lazy.Char8 as LC8 import Data.String (IsString (..)) import ...
b2718567f1bafb6b6073447310f40416c8d3f3d24011a55b235da1a82e11f6c4
brendanhay/amazonka
StandbyWorkspaceRelationshipType.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # {-# LANGUAGE StrictData #-} # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # Derived from AWS service...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workspaces/gen/Amazonka/WorkSpaces/Types/StandbyWorkspaceRelationshipType.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # Derived from AWS service descriptions , licensed under Apache 2.0 . Module : A...
8df98ed107f2969ecf0c990f5995a694f76283a6226440a6655972066e64e26d
mstksg/inCode
send-more-money.hs
module Main where import Control.Monad (guard, mfilter) import Control.Monad.Trans.State import Data.List (foldl') select :: [a] -> [(a, [a])] select [] = [] select (x:xs) = (x,xs) : [(y,x:ys) | (y,ys) <- select xs] asNumber :: [Int] -> Int asNumber = foldl' (\t o -> t*10 + o) 0 -- |...
null
https://raw.githubusercontent.com/mstksg/inCode/e1f80a3dfd83eaa2b817dc922fd7f331cd1ece8a/code-samples/misc/send-more-money.hs
haskell
| S E N D + M O R E ----------- M O N E Y faster than select, but doesn't preserve order faster; switch this with `main` to test
module Main where import Control.Monad (guard, mfilter) import Control.Monad.Trans.State import Data.List (foldl') select :: [a] -> [(a, [a])] select [] = [] select (x:xs) = (x,xs) : [(y,x:ys) | (y,ys) <- select xs] asNumber :: [Int] -> Int asNumber = foldl' (\t o -> t*10 + o) 0 main...
163b0a106583043d8a951797e968b222ce48da22fd951ed249ee17d897f145bd
tmattio/js-bindings
vscode_languageserver_protocol_protocol_type_definition.mli
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]] open Es5 open Vscode_jsonrpc open Vscode_languageserver_types open Vscode_languageserver_protocol_messages open Vscode_languageserver_protocol_protocol module TypeDefinitionClientCapabilities : sig type t val t_to_js : t -> O...
null
https://raw.githubusercontent.com/tmattio/js-bindings/ca3bd6a12db519c8de7f41b303f14cf70cfd4c5f/lib/vscode-languageserver-protocol/vscode_languageserver_protocol_protocol_type_definition.mli
ocaml
TODO: Move me TODO: Move me TODO: Move me
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]] open Es5 open Vscode_jsonrpc open Vscode_languageserver_types open Vscode_languageserver_protocol_messages open Vscode_languageserver_protocol_protocol module TypeDefinitionClientCapabilities : sig type t val t_to_js : t -> O...
01dec2ff63fe3fa007db020ffabd8918c2094090d9b204005068e0cde4ebeeec
commsor/titanoboa-sample-workflows
repl.clj
;;dependency needed: [io.titanoboa/titanoboa "0.9.0"] This is a quick demo with repls - sending messages between two repls using async queues running on top of Rabbit MQ in both REPLs : (ns user) (require '[clojure.core.async :as async :refer [>!! <!!]]) (require '[clojure.pprint :refer [pprint]]) (require '[titanoboa...
null
https://raw.githubusercontent.com/commsor/titanoboa-sample-workflows/3602561fa8a0c797d0c205d23f589ec46563e1b7/reclojure2020/repl.clj
clojure
dependency needed: [io.titanoboa/titanoboa "0.9.0"] in REPL1 in REPL1 in REPL1
This is a quick demo with repls - sending messages between two repls using async queues running on top of Rabbit MQ in both REPLs : (ns user) (require '[clojure.core.async :as async :refer [>!! <!!]]) (require '[clojure.pprint :refer [pprint]]) (require '[titanoboa.channel :as ch :refer [with-mq-session with-mq-sessio...
044fadd1a3eff9d5e1ee780fb189a8c87c67c545b2325ca959bdbb94a462d3c7
otto-de/leinsync
namespaces_test.clj
(ns leiningen.leinsync.namespaces-test (:require [clojure.test :refer :all] [leiningen.leinsync.namespaces :as ns] [leiningen.core.project :as p] [leiningen.leinsync.utils :as u])) (deftest ^:unit path->namespace (testing "happy path" (is (= {:resource-path "folder1" ...
null
https://raw.githubusercontent.com/otto-de/leinsync/744bab6d59cf2a17a2c9f613f75410a9bc6d7152/test/leiningen/leinsync/namespaces_test.clj
clojure
(ns leiningen.leinsync.namespaces-test (:require [clojure.test :refer :all] [leiningen.leinsync.namespaces :as ns] [leiningen.core.project :as p] [leiningen.leinsync.utils :as u])) (deftest ^:unit path->namespace (testing "happy path" (is (= {:resource-path "folder1" ...
226a3f487f036b3b49696a931532d72244e89acc3e9278fb097c3f85672526ff
metabase/metabase
connection.clj
(ns hooks.toucan2.connection (:require [clj-kondo.hooks-api :as hooks])) (defn with-connection [{{[_ bindings & body] :children} :node}] (let [[conn-binding connectable] (:children bindings)] {:node (hooks/list-node (list* (hooks/token-node 'let) (hooks/vector-node [conn-b...
null
https://raw.githubusercontent.com/metabase/metabase/b34fae975cf6e3893f37209920561cf1acd94949/.clj-kondo/com.github.camsaul/toucan2/hooks/toucan2/connection.clj
clojure
(ns hooks.toucan2.connection (:require [clj-kondo.hooks-api :as hooks])) (defn with-connection [{{[_ bindings & body] :children} :node}] (let [[conn-binding connectable] (:children bindings)] {:node (hooks/list-node (list* (hooks/token-node 'let) (hooks/vector-node [conn-b...
34fd6ae317d51e4f5414c2044b0cd4f9bff29cb610941bbb93a3d96260e34e6e
careercup/CtCI-6th-Edition-Haskell
is-unique.hs
import Data.List (sort) differentPairs :: String -> Bool differentPairs s = and $ zipWith (/=) s (tail s) isUnique :: String -> Bool isUnique = differentPairs . sort
null
https://raw.githubusercontent.com/careercup/CtCI-6th-Edition-Haskell/46da3bca5a7f2c9bc999b8922b6c4f2eeff9a48b/src/chapter-1/is-unique.hs
haskell
import Data.List (sort) differentPairs :: String -> Bool differentPairs s = and $ zipWith (/=) s (tail s) isUnique :: String -> Bool isUnique = differentPairs . sort
e2aacd70e5ebc1439703e3112f1ae7453156b348583a84f6ae0660681e3070c9
haskell/haskell-language-server
MetaCataCollapseUnary.hs
import GHC.Generics class Yo f where yo :: f x -> Int instance (Yo f) => Yo (M1 _1 _2 f) where yo = [wingman| intros x, cata x, collapse |]
null
https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/MetaCataCollapseUnary.hs
haskell
import GHC.Generics class Yo f where yo :: f x -> Int instance (Yo f) => Yo (M1 _1 _2 f) where yo = [wingman| intros x, cata x, collapse |]
04f5c036030d5fe300ad73a99065f9d1bfb0db2b09d06a75747182067992ea70
theodormoroianu/SecondYearCourses
HaskellChurch_20210415163118.hs
{-# LANGUAGE RankNTypes #-} module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = show $ cIf b True False The boolean constant true always chooses the ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurch_20210415163118.hs
haskell
# LANGUAGE RankNTypes # The boolean negation switches the alternatives The boolean conjunction can be built as a conditional The boolean disjunction can be built as a conditional a pair is a way to compute something based on the values contained within the pair. a function to be applied on the values, it will apply i...
module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = show $ cIf b True False The boolean constant true always chooses the first alternative cTrue :: C...
960d37a718b16d5f3baf1c0859db7a619f5483916cc49f8920147ed30061e6b2
ekmett/categories
Dual.hs
# LANGUAGE CPP # {-# LANGUAGE TypeOperators, FlexibleContexts #-} #if __GLASGOW_HASKELL__ >= 702 # LANGUAGE Trustworthy # #endif #if __GLASGOW_HASKELL__ >= 708 {-# LANGUAGE DeriveDataTypeable #-} #endif ------------------------------------------------------------------------------------------- -- | -- Module : Contro...
null
https://raw.githubusercontent.com/ekmett/categories/4a02808d28b275f59d9d6c08f0c2d329ee567a97/old/src/Control/Category/Dual.hs
haskell
# LANGUAGE TypeOperators, FlexibleContexts # # LANGUAGE DeriveDataTypeable # ----------------------------------------------------------------------------------------- | Module : Control.Category.Dual License : BSD Stability : experimental Portability: portable ------------------------------------------------...
# LANGUAGE CPP # #if __GLASGOW_HASKELL__ >= 702 # LANGUAGE Trustworthy # #endif #if __GLASGOW_HASKELL__ >= 708 #endif Copyright : 2008 - 2010 Maintainer : < > module Control.Category.Dual ( Dual(..) ) where #ifndef MIN_VERSION_base #define MIN_VERSION_base(x,y,z) 1 #endif import Control.Category #ifdef ...
80bd01436ca8c11230b153a1e4c29107534de537233d4a857a400673f0ed6090
uim/uim
zaurus.scm
zaurus.scm : platform - specific support for ;;; Copyright ( c ) 2003 - 2013 uim Project ;;; ;;; All rights reserved. ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: 1 . Redistributions of source cod...
null
https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/scm/zaurus.scm
scheme
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer. notice, this list of conditions and the following disclaimer in the documen...
zaurus.scm : platform - specific support for Copyright ( c ) 2003 - 2013 uim Project 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright 3 . Neither the name of authors nor the names of its contributors THIS SOFTWARE IS...
76959ffa7889923a16685035a51bf4bd9d11c0ac5db4e6e5721c0f482cf80845
alt-romes/ghengin
Instance.hs
# LANGUAGE CPP # # LANGUAGE OverloadedLists # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE OverloadedRecordDot # # LANGUAGE DataKinds # # LANGUAGE RecordWildCards # # LANGUAGE LambdaCase # module Ghengin.Vulkan.Device.Instance where import GHC.IsList (fromList) import Data.Bits ((.|.)) import Control.Monad import F...
null
https://raw.githubusercontent.com/alt-romes/ghengin/3520d3ba2b8a747410e293c328647d22c289191b/src/Ghengin/Vulkan/Device/Instance.hs
haskell
# LANGUAGE OverloadedStrings # , Vk.EXT_METAL_SURFACE_EXTENSION_NAME ^ Validation layers -> BS.ByteString -- ^ Application name
# LANGUAGE CPP # # LANGUAGE OverloadedLists # # LANGUAGE OverloadedRecordDot # # LANGUAGE DataKinds # # LANGUAGE RecordWildCards # # LANGUAGE LambdaCase # module Ghengin.Vulkan.Device.Instance where import GHC.IsList (fromList) import Data.Bits ((.|.)) import Control.Monad import Foreign.C.String import qualified D...
615f3a5a72635b1762600a15d6638bb6984ad721efe9684c323d0bfd6dd08804
msullivan/LazyK
mergesort.scm
;; Mergesort in Lazy K. Copyright 2002 . Distributed under the GPL . ;; Two programs using the mergesort are included below . ;; unix-sort sorts the lines of the input file, and bwt performs the Burrows - Wheeler blocksort transform . (load "../lazier.scm") (load "../prelude.scm") (load "../prelude-numbers....
null
https://raw.githubusercontent.com/msullivan/LazyK/459a87d6501ec80f4155c20fe850a2962855c25d/eg/mergesort.scm
scheme
Mergesort in Lazy K. unix-sort sorts the lines of the input file, and Repeats merge-toplevel-step until there's just a single (sorted) list left. Does a pairwise list merge, (approximately) halving the number of lists each time. stable (though it's impossible to tell with our definition of list<). don't include...
Copyright 2002 . Distributed under the GPL . Two programs using the mergesort are included below . bwt performs the Burrows - Wheeler blocksort transform . (load "../lazier.scm") (load "../prelude.scm") (load "../prelude-numbers.scm") Requires input in the form ( ( " line1 " ) ( " line2 " ) ... ( " last...
3ab1240bfc9bbdbebe604a43c41e02a9ed102a4c1819b33a6d8a2041e3b2edf6
elpinal/modules
Internal.hs
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE DerivingVia # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE ImplicitParams # # LANGUAGE MultiParamTypeClasses # # LANGUAGE...
null
https://raw.githubusercontent.com/elpinal/modules/aa8f2725a770edb06626aeaf8716da90dfa06823/src/Language/Modules/Ros2018/Internal.hs
haskell
# LANGUAGE DeriveTraversable # # LANGUAGE GADTs # # LANGUAGE TypeSynonymInstances # * Objects * Records * Syntax * Useful functions * Typing * Type equivalence and reduction * Type substitution * Environments * Annotation * Errors * Failure * Proxy * Embedding to internal objects * Builtins * Monads Lef...
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE ImplicitParams # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # module Language.Modules.Ros2018.Internal ...
3c71627abd838fb61d586851c780a8c8306ae5779df14d8de05afa6f3a7dc9fc
spechub/Hets
ProverState.hs
| Module : ./SoftFOL / ProverState.hs Description : Help functions for all automatic theorem provers . Copyright : ( c ) License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : needs POSIX Data structures and initialising fun...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/SoftFOL/ProverState.hs
haskell
* Data structures * SoftFOL specific functions for prover GUI | Creates an initial SoftFOL prover state with logical part. ^ SoftFOL signature ^ list of named SoftFOL terms containing axioms ^ freeness constraints | Inserts a named SoftFOL term into SoftFOL prover state. ^ prover state containing initial ...
| Module : ./SoftFOL / ProverState.hs Description : Help functions for all automatic theorem provers . Copyright : ( c ) License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : needs POSIX Data structures and initialising fun...
18e87b635bc466fdd24eb4348dc4e3340e5ed27604587561132ddf786001e2c6
smimram/ocaml-pandoc
pdf2png.ml
(** Change the extension of pdf images to png. *) open Pandoc let () = let p = Pandoc.of_json (Yojson.Basic.from_channel stdin) in let f = function | Image (a, l, (url, title)) -> let url = if Filename.check_suffix url ".pdf" then Filename.chop_suffix url ".pdf" ^ ".png" else url i...
null
https://raw.githubusercontent.com/smimram/ocaml-pandoc/4596b041bcfb1947336d1e2115b2a2262c5a2f84/examples/pdf2png.ml
ocaml
* Change the extension of pdf images to png.
open Pandoc let () = let p = Pandoc.of_json (Yojson.Basic.from_channel stdin) in let f = function | Image (a, l, (url, title)) -> let url = if Filename.check_suffix url ".pdf" then Filename.chop_suffix url ".pdf" ^ ".png" else url in Some [Image (a, l, (url, title))] | _ ...
f6d1075ce5780b9c3fd45f0d11e129dadf024bd8b59a2e22af0b3e9e1186360e
ddmcdonald/sparser
weekdays.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- copyright ( c ) 1992 - 2005,2013 - 2014,2017 - 2020 -- all rights reserved ;;; File : " weekdays " Module : " : time : " version : April 2020 1.0 ( 9/18/93 v2.3 ) completely revamped for new semantics 1.1 ( 1/10/94 ) redid ordina...
null
https://raw.githubusercontent.com/ddmcdonald/sparser/0f5ecedd572bc054725ee0d3b23f390c336b7b0f/Sparser/code/s/grammar/model/core/time/weekdays.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- (1/31/99) tweaked the call to define-individual so that the ordinal was included. ordinal. "by hand" in the def form. Now that's done by the act of defining the individual, and that version of doing it pays attention to rule-label. ...
copyright ( c ) 1992 - 2005,2013 - 2014,2017 - 2020 -- all rights reserved File : " weekdays " Module : " : time : " version : April 2020 1.0 ( 9/18/93 v2.3 ) completely revamped for new semantics 1.1 ( 1/10/94 ) redid ordinals . Broke out the cases 10/20 1.2 ( 10/30 ) realized that ...
01947637703c56884aae6d6afb79abe3cf6f2052db0e637a1904f856db4c0d12
mitchellwrosen/timer-wheel
Timestamp.hs
module TimerWheel.Internal.Timestamp ( Timestamp (..), epoch, minus, now, plus, TimerWheel.Internal.Timestamp.rem, ) where import Data.Coerce (coerce) import Data.Word (Word64) import GHC.Clock (getMonotonicTimeNSec) import TimerWheel.Internal.Micros (Micros (..)) newtype Timestamp = Timesta...
null
https://raw.githubusercontent.com/mitchellwrosen/timer-wheel/5eeb936f2c0cea05e251d9b26f70e0b907517f18/src/TimerWheel/Internal/Timestamp.hs
haskell
Which epoch does this correspond to, if they are measured in chunks of the given number of milliseconds?
module TimerWheel.Internal.Timestamp ( Timestamp (..), epoch, minus, now, plus, TimerWheel.Internal.Timestamp.rem, ) where import Data.Coerce (coerce) import Data.Word (Word64) import GHC.Clock (getMonotonicTimeNSec) import TimerWheel.Internal.Micros (Micros (..)) newtype Timestamp = Timesta...
1dce2d1fa120baa957c1fdf6d83abab5ab6926e5e6cb173281868e9b5446d209
lisp/de.setf.xml
namespace.lisp
-*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*- (in-package :xml-query-data-model) (setq *namespace* (defnamespace "#" (:use) (:nicknames "owl") (:export "AllDifferent" "AllDisjointClasses" ...
null
https://raw.githubusercontent.com/lisp/de.setf.xml/827681c969342096c3b95735d84b447befa69fa6/namespaces/www-w3-org/2002/07/owl/namespace.lisp
lisp
Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*- (xqdm:find-namespace "#" :if-does-not-exist :load)
(in-package :xml-query-data-model) (setq *namespace* (defnamespace "#" (:use) (:nicknames "owl") (:export "AllDifferent" "AllDisjointClasses" "AllDisjointProperties" "allValuesFrom" "annotatedProperty" "annotate...
f2cbd9a1943a69da29726709eee098f75c658f1368737f9f056fcbe5134f0e2d
goldfirere/video-resources
Vec.hs
# LANGUAGE DataKinds , StandaloneKindSignatures , GADTs , StandaloneDeriving , DerivingStrategies , ScopedTypeVariables , TypeOperators , TypeFamilies , ConstraintKinds , FlexibleInstances , MultiParamTypeClasses , IncoherentInstances , UndecidableSuperClasses...
null
https://raw.githubusercontent.com/goldfirere/video-resources/60726a2d4e1f21146517276d8105358722712e11/2021-05-04-vectors/Vec.hs
haskell
-- these are pretty straightforward: and these are a little harder : these are a little harder: tail init replicate (++) n ~ Succ n': n + m == Succ n' + m == Succ (n' + m) take take :: Int -> [a] -> [a] take 0 _ = [] take _ [] = [] take n (x : xs) = x : take (n-1) xs these need fancy type f...
# LANGUAGE DataKinds , StandaloneKindSignatures , GADTs , StandaloneDeriving , DerivingStrategies , ScopedTypeVariables , TypeOperators , TypeFamilies , ConstraintKinds , FlexibleInstances , MultiParamTypeClasses , IncoherentInstances , UndecidableSuperClasses...
91aaff87da83d05ce2249aec3668d17ad90d79ac381b6e730cdd8ed639801cbe
doubleyou/dps
ems_debug.erl
%%%--------------------------------------------------------------------------------------- @author < > [ ] 2010 %%% @doc runtime debugging module @reference See < a href=" " target="_top"></a > for more information %%% @end %%% %%% This file is part of erlyvideo. %%% %%% erlyvideo is free s...
null
https://raw.githubusercontent.com/doubleyou/dps/c4901d37ea70761f480781af437a2e0a010119e2/src/ems_debug.erl
erlang
--------------------------------------------------------------------------------------- @doc runtime debugging module @end This file is part of erlyvideo. erlyvideo is free software: you can redistribute it and/or modify (at your option) any later version. erlyvideo is distributed in the hope that it wi...
@author < > [ ] 2010 @reference See < a href=" " target="_top"></a > for more information it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License...
6fcbb11661e89d5b7116933ab166b46c0788d19e90200be22f634ec60c2ec524
ucsd-progsys/liquidhaskell
CyclicPredAlias2.hs
{-@ LIQUID "--expect-error-containing=Cyclic type alias definition for `CyclicC1`" @-} module CyclicPredAlias2 () where {-@ predicate CyclicC1 Q = CyclicC2 Q && CyclicC3 Q @-} {-@ predicate CyclicC2 Q = CyclicC1 Q @-} @ predicate CyclicC3 Q = CyclicC1 Q @
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/errors/CyclicPredAlias2.hs
haskell
@ LIQUID "--expect-error-containing=Cyclic type alias definition for `CyclicC1`" @ @ predicate CyclicC1 Q = CyclicC2 Q && CyclicC3 Q @ @ predicate CyclicC2 Q = CyclicC1 Q @
module CyclicPredAlias2 () where @ predicate CyclicC3 Q = CyclicC1 Q @
87dd424dfe32050503df530fe87ccf801ba747f4479309f22451135088ff28ad
TheLortex/mirage-monorepo
deriving.mli
(** Deriving code from type declarations *) open Import (** Specification of generator arguments *) module Args : sig type ('a, 'b) t type 'a param val empty : ('m, 'm) t val arg : string -> (expression, 'a -> 'a option, 'a option) Ast_pattern.t -> 'a option param val flag : string -> bool pa...
null
https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/ppxlib/src/deriving.mli
ocaml
* Deriving code from type declarations * Specification of generator arguments * Flag matches punned labelled argument, i.e. of the form [~foo]. It returns [true] iff the argument is present. * [add_alias name set] add an alias. When the user write the alias, all the generator of [set] will be used instead....
open Import module Args : sig type ('a, 'b) t type 'a param val empty : ('m, 'm) t val arg : string -> (expression, 'a -> 'a option, 'a option) Ast_pattern.t -> 'a option param val flag : string -> bool param val ( +> ) : ('m1, 'a -> 'm2) t -> 'a param -> ('m1, 'm2) t * For convenience , ...
931b05e73064ae92919ef29f43a6c1e3072bffbe8f0a7b4f3313e6af31a69dc7
wardle/hermes
config.clj
Copyright 2020 and Eldrix Ltd ; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ; you may not use this file except in compliance with the License. ; You may obtain a copy of the License at ; ; -2.0 ; ; Unless required by applicable law or agreed to in writing, software dist...
null
https://raw.githubusercontent.com/wardle/hermes/6c342315b7693572b05dfeb404d191691ca9a5f3/src/com/eldrix/hermes/config.clj
clojure
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 g...
Copyright 2020 and Eldrix Ltd distributed under the License is distributed on an " AS IS " BASIS , (ns com.eldrix.hermes.config (:require [aero.core :as aero] [clojure.java.io :as io] [com.eldrix.hermes.server :as server] [com.eldrix.hermes.service :as svc] [com...
a45b9523cc0afdf7cb6b77e71974fb52c9b59e0d62e1b95da4e6875b7416bb6f
Clojure2D/clojure2d-examples
sphere.clj
(ns rt4.the-next-week.ch04a.sphere (:require [rt4.the-next-week.ch04a.hittable :as hittable] [rt4.the-next-week.ch04a.interval :as interval] [rt4.the-next-week.ch04a.ray :as ray] [fastmath.core :as m] [fastmath.vector :as v] [rt4.the-next-week.ch04a.aabb :as...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch04a/sphere.clj
clojure
(ns rt4.the-next-week.ch04a.sphere (:require [rt4.the-next-week.ch04a.hittable :as hittable] [rt4.the-next-week.ch04a.interval :as interval] [rt4.the-next-week.ch04a.ray :as ray] [fastmath.core :as m] [fastmath.vector :as v] [rt4.the-next-week.ch04a.aabb :as...
158d5dbea099585329af0e8ec5eec87bcdee65b5bdff6bbc83fd67e0c3e87e97
HuwCampbell/grenade
Trivial.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} # LANGUAGE TypeFamilies # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # | Module : Grenade . Core . Trivial Description : Trivial layer which perfoms no operations on the data Copyright : ( c ...
null
https://raw.githubusercontent.com/HuwCampbell/grenade/5206c95c423d9755e620f41576470a281ba59c89/src/Grenade/Layers/Trivial.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # | A Trivial layer. graph, for a Residual network for example.
# LANGUAGE TypeFamilies # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # | Module : Grenade . Core . Trivial Description : Trivial layer which perfoms no operations on the data Copyright : ( c ) , 2016 - 2017 License : BSD2 Stability : experimental Module...
583310de7f1bf33045df5a760eac58f608c271979693a68d0c5ccb43080e37ba
lykahb/groundhog
SqlBench.hs
# LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # module Main where import qualified Database . Groundhog . Generic . . String as S1 import qualified Database . Gr...
null
https://raw.githubusercontent.com/lykahb/groundhog/146691a828db39932c8212cd68f732d74589e488/bench/SqlBench.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # ---------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------- 2.42 ms 2.01 ms 2.42 ms 2.01 ms
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # module Main where import qualified Database . Groundhog . Generic . . String as S1 import qualified Database . Groundhog . Generic . . Utf8 as S2 import Criterion.Main i...
5bcc17cb150646d10e0867382bd884f0df1fb249a1fe3d1ed89e75c784290fe8
ucsd-progsys/mist
Names.hs
{-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE UndecidableInstances # # LANGUAGE LambdaCase # # LANGUAGE TupleSections # module Language.Mist.Names ( uniquify , cSEPARATOR ...
null
https://raw.githubusercontent.com/ucsd-progsys/mist/0a9345e73dc53ff8e8adb8bed78d0e3e0cdc6af0/lib/Language/Mist/Names.hs
haskell
# LANGUAGE TypeSynonymInstances # TODO: make this a part of refresh somehow TODO: this needs to be fixed change this if it's too slow ------------------------------------------------------------------------------ | Substitutions ------------------------------------------------------------------------------ TODO: h...
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE UndecidableInstances # # LANGUAGE LambdaCase # # LANGUAGE TupleSections # module Language.Mist.Names ( uniquify , cSEPARATOR , varNum , varHead , FreshT ...
72170d05cce87d1ded5abfe28f9000cb1833a5808fb419848516461d7cb16dc9
rubenbarroso/EOPL
6-grammar.scm
;; This is 6-grammar.scm: grammar for typed-oo language (let ((time-stamp "Time-stamp: <2000-12-15 15:18:22 wand>")) (let ((date (substring time-stamp 13 29))) (eopl:printf "grammar.scm: ~a~%" date))) ;;;;;;;;;;;;;;;; grammatical specification ;;;;;;;;;;;;;;;; (define the-lexical-spec '((whitespace (whites...
null
https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/interps/6-grammar.scm
scheme
This is 6-grammar.scm: grammar for typed-oo language grammatical specification ;;;;;;;;;;;;;;;; new for ch6 new for ch6 method ids ch 6 method ids no body these do not appear in ordinary programs
(let ((time-stamp "Time-stamp: <2000-12-15 15:18:22 wand>")) (let ((date (substring time-stamp 13 29))) (eopl:printf "grammar.scm: ~a~%" date))) (define the-lexical-spec '((whitespace (whitespace) skip) (comment ("%" (arbno (not #\newline))) skip) (identifier (letter (arbno (or letter digit "_...
8dcf9e8ba786ce140a27dfd786523ddea4176c270ff274b58ca295eda16f993f
Disco-Dave/message-db
Monad.hs
module MessageDb.Monad ( MessageDbData (..) , defaultData , MonadMessageDb (..) , MessageDbT (..) , runMessageDbT , MessageDbIO , runMessageDbIO , withConnection ) where import Control.Monad.Catch (MonadCatch, MonadThrow) import Control.Monad.IO.Class (MonadIO (liftIO)) import Control.Monad.Reader (M...
null
https://raw.githubusercontent.com/Disco-Dave/message-db/6713fe63206b46dcabe45c6f79bccc19e1e697ec/message-db-monad/src/MessageDb/Monad.hs
haskell
module MessageDb.Monad ( MessageDbData (..) , defaultData , MonadMessageDb (..) , MessageDbT (..) , runMessageDbT , MessageDbIO , runMessageDbIO , withConnection ) where import Control.Monad.Catch (MonadCatch, MonadThrow) import Control.Monad.IO.Class (MonadIO (liftIO)) import Control.Monad.Reader (M...
83f1d95ebd2486e45819210d9948e6e28890d65a25955d1d8209bbf5662221ae
erlang/otp
snmpa_mib_lib.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2004 - 2022 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applic...
null
https://raw.githubusercontent.com/erlang/otp/eccc556e79f315d1f87c10fb46f2c4af50a63f20/lib/snmp/src/agent/snmpa_mib_lib.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific l...
Copyright Ericsson AB 2004 - 2022 . 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(snmpa_mib_lib). -export([table_cre_row/3, table_del_row/2]). -export([get_table/2]). -export([print_variable...
e2b86aeceaea0930699fb38b0e4a4569fdb528276df5ec8b6f5f2aa944e71a10
solita/mnt-teet
theme_panels.cljs
(ns teet.theme.theme-panels (:require [teet.theme.theme-colors :as theme-colors] [teet.theme.theme-spacing :as theme-spacing])) (defn side-panel [] {:background-color theme-colors/gray-lighter :min-height theme-spacing/content-height :padding "1rem"}) (defn popup-panel "Small popup info panel....
null
https://raw.githubusercontent.com/solita/mnt-teet/7a5124975ce1c7f3e7a7c55fe23257ca3f7b6411/app/frontend/src/cljs/teet/theme/theme_panels.cljs
clojure
(ns teet.theme.theme-panels (:require [teet.theme.theme-colors :as theme-colors] [teet.theme.theme-spacing :as theme-spacing])) (defn side-panel [] {:background-color theme-colors/gray-lighter :min-height theme-spacing/content-height :padding "1rem"}) (defn popup-panel "Small popup info panel....
3df43f04f76bcd3ff4ea97a3941144f04698eacf65ada4384dfbdb081487e792
glguy/advent
SmallSet.hs
# Language TypeFamilies , TypeOperators , BlockArguments # | Module : Advent . SmallSet Description : An efficient set representation for small integers . Copyright : ( c ) , 2021 License : ISC Maintainer : A compact set type for when you have very few elements to track . Module ...
null
https://raw.githubusercontent.com/glguy/advent/87446c316761b3b56aee0fe55c5cee3bacc79f54/common/src/Advent/SmallSet.hs
haskell
| Construct a set given a list of set members. >>> fromList [] fromList [] >>> fromList [0] fromList [0] >>> fromList [0,10,20] fromList [0,10,20] | Return an ordered list of the elements in the set avoid shift overflow | The set with no members. >>> empty fromList [] | Predicate for empty sets. | Ma...
# Language TypeFamilies , TypeOperators , BlockArguments # | Module : Advent . SmallSet Description : An efficient set representation for small integers . Copyright : ( c ) , 2021 License : ISC Maintainer : A compact set type for when you have very few elements to track . Module ...
65a6275793705d195a5b1f653f47133462d9c78c447eb9cb4ca563713f7c4c27
facebook/flow
func_stmt_config_types.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/8e68e814a1454c6913c0a5945d61bc3fe7030a42/src/typing/func_stmt_config_types.ml
ocaml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
f05b0ef9beda49b35c78d12cafabd29db765847b8961bcb443bfd85429955ca1
ocramz/petsc-hs
Repl.hs
----------------------------------------------------------------------------- -- | -- Module : Numerical.PETSc.Repl Copyright : ( c ) 2015 -- License : LGPL3 Maintainer : zocca . . gmail . com -- Stability : experimental -- -- | Read-Eval-Print Loop -- -------------------------------------...
null
https://raw.githubusercontent.com/ocramz/petsc-hs/d74a468da0dbc867d2ea25f280c7892cc54add48/src/Numerical/PETSc/Repl.hs
haskell
--------------------------------------------------------------------------- | Module : Numerical.PETSc.Repl License : LGPL3 Stability : experimental | Read-Eval-Print Loop --------------------------------------------------------------------------- | see e.g. -0.1.5.0/docs/src/System-Console-Replin...
Copyright : ( c ) 2015 Maintainer : zocca . . gmail . com module Numerical.PETSc.Repl where import Numerical.PETSc.Internal.PutGet import Numerical.PETSc.Internal.Types
fd5d9ed336690f07e41c5d112e1f05aeebebd8741be942296b75685800393ae1
Tehnix/Cminusminus-compiler
Token.hs
module Render.Token where import Text.PrettyPrint import Parser.Common import Parser.Token import Render.Common -- | Render a token to a string. renderToken :: Token -> String renderToken = render . ppr 0 instance Pretty Reserved where ppr p e = case e of TokenIf -> text "if" TokenElse -> text "el...
null
https://raw.githubusercontent.com/Tehnix/Cminusminus-compiler/4bf4cff03ce6f8decb676a28348d6d51d9e2513d/src/Render/Token.hs
haskell
| Render a token to a string.
module Render.Token where import Text.PrettyPrint import Parser.Common import Parser.Token import Render.Common renderToken :: Token -> String renderToken = render . ppr 0 instance Pretty Reserved where ppr p e = case e of TokenIf -> text "if" TokenElse -> text "else" TokenWhile -> text "whi...
4e470948f753228cabe5824572cb0d0357ffe34c1ffe54ba5cb9c1e57be04470
janestreet/vcaml
tabpage.mli
module Type := Nvim_internal.Phantom include module type of struct include Nvim_internal.Tabpage end module Untested : sig val list_wins : Or_current.t -> Nvim_internal.Window.t list Api_call.Or_error.t val get_var : Or_current.t -> name:string -> type_:'a Type.t -> 'a Api_call.Or_error.t val set_var : ...
null
https://raw.githubusercontent.com/janestreet/vcaml/7a53ff24276ddc3085a9b0b72b1053a6db6936cf/src/tabpage.mli
ocaml
module Type := Nvim_internal.Phantom include module type of struct include Nvim_internal.Tabpage end module Untested : sig val list_wins : Or_current.t -> Nvim_internal.Window.t list Api_call.Or_error.t val get_var : Or_current.t -> name:string -> type_:'a Type.t -> 'a Api_call.Or_error.t val set_var : ...
635f91cb9b7efd65474e8a6c6e8ae5dadf97e9c37a47f3c49c9b89a4b4b333c0
scrintal/heroicons-reagent
folder_minus.cljs
(ns com.scrintal.heroicons.outline.folder-minus) (defn render [] [:svg {:xmlns "" :fill "none" :viewBox "0 0 24 24" :strokeWidth "1.5" :stroke "currentColor" :aria-hidden "true"} [:path {:strokeLinecap "round" :strokeLinejoin "round" ...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/folder_minus.cljs
clojure
(ns com.scrintal.heroicons.outline.folder-minus) (defn render [] [:svg {:xmlns "" :fill "none" :viewBox "0 0 24 24" :strokeWidth "1.5" :stroke "currentColor" :aria-hidden "true"} [:path {:strokeLinecap "round" :strokeLinejoin "round" ...
aa1d69c641cc7bb29263254c22615b4728a750fff4989b636460cf061e2b2452
lortabac/ariel
Prim.hs
module Ariel.TC.Prim where import Ariel.Common.Prim import Ariel.Core.Types import Ariel.TC.Types primTy :: Prim a -> InferM ([Ty], Ty) primTy Plus {} = pure ([TInt, TInt], TInt) primTy Minus {} = pure ([TInt, TInt], TInt) primTy Equal {} = pure ([TInt, TInt], TBool) primTy Lt {} = pure ([TInt, TInt], TBool)
null
https://raw.githubusercontent.com/lortabac/ariel/3c4e115a7fed724ed129e3b7056cc67751e3d35b/src/Ariel/TC/Prim.hs
haskell
module Ariel.TC.Prim where import Ariel.Common.Prim import Ariel.Core.Types import Ariel.TC.Types primTy :: Prim a -> InferM ([Ty], Ty) primTy Plus {} = pure ([TInt, TInt], TInt) primTy Minus {} = pure ([TInt, TInt], TInt) primTy Equal {} = pure ([TInt, TInt], TBool) primTy Lt {} = pure ([TInt, TInt], TBool)
741004b2a553d19590941a49a99921d2f23836d0a2fbf08d1b8a13c291bbd409
heraldry/heraldicon
tincture.cljs
(ns spec.heraldry.charge.tincture (:require [cljs.spec.alpha :as s] [heraldicon.heraldry.option.attributes :as attributes] [heraldicon.heraldry.tincture :as tincture] [spec.heraldicon.spec-util :as su])) (s/def :heraldry.charge.tincture.key/shading #{:shadow :highlight}) (s/def :heraldry.charge.tincture....
null
https://raw.githubusercontent.com/heraldry/heraldicon/19c9d10485bbc48e98ddee30092a246cccc986d2/src/spec/heraldry/charge/tincture.cljs
clojure
(ns spec.heraldry.charge.tincture (:require [cljs.spec.alpha :as s] [heraldicon.heraldry.option.attributes :as attributes] [heraldicon.heraldry.tincture :as tincture] [spec.heraldicon.spec-util :as su])) (s/def :heraldry.charge.tincture.key/shading #{:shadow :highlight}) (s/def :heraldry.charge.tincture....
64fb917f207c018611ee3f61ca3deee946dc048db552f815cac7257caf5ea7b4
theodormoroianu/SecondYearCourses
LambdaChurch_20210415170110.hs
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415170110.hs
haskell
alpha-equivalence subst u x t defines [u/x]t, i.e., substituting u for x in t This substitution avoids variable captures so it is safe to be used when reducing terms with free variables (e.g., if evaluating inside lambda abstractions) ^ substitution term ^ variable to be substitutes ^ term in which the substit...
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
0139a5e38ad654a882bea84c1595ebb4089952f93cc936ab8a8c19df39924569
wireless-net/erlang-nommu
pool.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2013 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/stdlib/src/pool.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 1996 - 2013 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(pool). -export([start/1, start...
0516215628e4bc71e1ad47da925291d0bed515d56453da36e7a4b823934d3295
fetburner/Coq2SML
names.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/kernel/names.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Printing of directory paths as ["c...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * File created around Apr 199...
c1bfcacbb724045ff0a9e582a8788e592d6d9644b104675b2ff2109d66f03172
links-lang/links
delateralize.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * delateralize.ml - Implements the " query delateralization " algorithm : * * * * * produces an equivalent query whose " from " inputs ...
null
https://raw.githubusercontent.com/links-lang/links/f6f164fea48c843bc0bd692cf0a71d46c346e14a/core/query/delateralize.ml
ocaml
eta-expanded vx == p.1, with record flattening eta-expanded p.2, with record flattening tail-consing is annoying, but occurs_free_list needs arguments in this order XXX: can t in Apply (t,...) even contain a For? however let's perform recursion for safety XXX: assumes no Closures are left Debug.print "*** no...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * delateralize.ml - Implements the " query delateralization " algorithm : * * * * * produces an equivalent query whose " from " inputs ...
40fe5e8611a0d882798bfd1528ec44513f35d9e357092d5891a045a76dcd08f2
2600hz/kazoo
j5_balance_check_req.erl
%%%----------------------------------------------------------------------------- ( C ) 2010 - 2020 , 2600Hz %%% @doc Handlers for various AMQP payloads @author Dinkor ( ) %%% This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with t...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/applications/jonny5/src/j5_balance_check_req.erl
erlang
----------------------------------------------------------------------------- @doc Handlers for various AMQP payloads @end -----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz @author Dinkor ( ) This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(j5_balance_check_req). -export([handle_req/2]). -include("jonny5.hrl"). -spec ha...
530c3c46441da96035e7443789bb7a7edd827f3c12ca9cb42828e03aaf341b06
aeternity/aeternity
aefate_engine_test.erl
%%%------------------------------------------------------------------- ( C ) 2018 , Aeternity Anstalt %%% @doc Basic tests for Fate engine %%% make TEST=aefate_engine_test eunit %%% @end %%%------------------------------------------------------------------- -module(aefate_engine_test). -include_lib("eunit/include...
null
https://raw.githubusercontent.com/aeternity/aeternity/4fad72fecd66d9e85dd5e4a4e4cc0ade7082c72c/apps/aefate/test/aefate_engine_test.erl
erlang
------------------------------------------------------------------- @doc Basic tests for Fate engine make TEST=aefate_engine_test eunit @end ------------------------------------------------------------------- Dummy values since they should not come into play in this test Test really big map to list Operation dis...
( C ) 2018 , Aeternity Anstalt -module(aefate_engine_test). -include_lib("eunit/include/eunit.hrl"). -include_lib("apps/aecontract/include/aecontract.hrl"). control_flow_test_() -> make_calls(control_flow()). boolean_test_() -> make_calls(booleans()). comp_test_() -> make_calls(comps()). arith_test...
20df94226e6f89ebea59b8ad957faba592193c24f639fe4b1ffccef1119d0810
tomjridge/kv-hash
test1.ml
(** Test executable *) module X = Kv_hash.Nv_map_ii.Test()
null
https://raw.githubusercontent.com/tomjridge/kv-hash/9854f6d992f5c30ab9fdad614ba16684d3bbd082/test/test1.ml
ocaml
* Test executable
module X = Kv_hash.Nv_map_ii.Test()
262104130815fd8ee19d02a1469bf8ffc9245e73aaff9379f50348ed31d62f32
ethereum/act
SMT.hs
{-# LANGUAGE GADTs #-} # LANGUAGE FlexibleContexts # # LANGUAGE MonadComprehensions # # LANGUAGE ViewPatterns # # LANGUAGE LambdaCase # module SMT ( Solver(..), SMTConfig(..), Query(..), SMTResult(..), spawnSolver, stopSolver, sendLines, runQuery, mkPostconditionQueries, mkInvariantQueries, targe...
null
https://raw.githubusercontent.com/ethereum/act/36b65b71eea22ebe4287f066190ecf47f4394fa3/src/SMT.hs
haskell
# LANGUAGE GADTs # - ** Data ** --- | The context is a `Reader` monad which allows us to read the name of the current interface. | An SMTExp is a structured representation of an SMT Expression The _assertions field holds the various constraints that should be satisfied expression, along with the metadata neede...
# LANGUAGE FlexibleContexts # # LANGUAGE MonadComprehensions # # LANGUAGE ViewPatterns # # LANGUAGE LambdaCase # module SMT ( Solver(..), SMTConfig(..), Query(..), SMTResult(..), spawnSolver, stopSolver, sendLines, runQuery, mkPostconditionQueries, mkInvariantQueries, target, getQueryContract, ...
30b88bcabe7c12a1f6419c8b703cb2555a7df6ad3c5e8e13585196d54e798fcb
georgjz/functional-geometry-gambit-scheme
combinators.scm
;;;;;; These combinators use the primitive picture manipulators to create more ;;;;;; complex images. (define flip-vertical (lambda (p) (flip (rot (rot p))))) (define quartet (lambda (p q r s) (above (beside p q) (beside r s)))) (define cycle (lambda (p) (quartet p (rot...
null
https://raw.githubusercontent.com/georgjz/functional-geometry-gambit-scheme/a3fecb218d30bda154f6f97f44d09758179d1e4d/src/combinators.scm
scheme
These combinators use the primitive picture manipulators to create more complex images.
(define flip-vertical (lambda (p) (flip (rot (rot p))))) (define quartet (lambda (p q r s) (above (beside p q) (beside r s)))) (define cycle (lambda (p) (quartet p (rot (rot (rot p))) (rot p) (rot (rot p))))) (define nonet (lambda (p q r ...
63794b638e899c69ed583447b3dc2c27e11d485b06047ac85e49a860878e7088
dpiponi/formal-weyl
ISqrt2.hs
module ISqrt2 where import Data.Ratio import Data.List import Data.Complex import MShow Implementation of the field ℚ[i , √2 ] data ISqrt2 = I Rational Rational Rational Rational deriving Eq injectI :: Rational -> ISqrt2 injectI a = I a 0 0 0 instance MShow ISqrt2 where mshow = mshow' 0 mshow' n (I a b ...
null
https://raw.githubusercontent.com/dpiponi/formal-weyl/f0b8e5e8f749877ceebb809f37a844df7a8e4969/ISqrt2.hs
haskell
Move into own module?
module ISqrt2 where import Data.Ratio import Data.List import Data.Complex import MShow Implementation of the field ℚ[i , √2 ] data ISqrt2 = I Rational Rational Rational Rational deriving Eq injectI :: Rational -> ISqrt2 injectI a = I a 0 0 0 instance MShow ISqrt2 where mshow = mshow' 0 mshow' n (I a b ...
11d35112a5c1dc60ebbc3577564308ed4d69af1eb17dca3de6323882c54500c1
EmileTrotignon/embedded_ocaml_templates
ppx_eml.mli
(* empty on purpose *)
null
https://raw.githubusercontent.com/EmileTrotignon/embedded_ocaml_templates/8d4648ae7a092c6b930d138e5b0c7718d04fe8a2/src/ppx_eml.mli
ocaml
empty on purpose
884e49a1b66b2537eb4fe8be514fe30dc1b2e6993e64a86027e92ca42a7fdb58
jeapostrophe/exp
temporal-clock.rkt
#lang racket (define vals (list 5 1 4 4 1 3 3 5 2 1 5)) (define how-many (length vals)) (define node->val (make-hasheq)) (define node->node (for/fold ([node->node (hasheq)]) ([val (in-list vals)] [pos (in-naturals)]) (hash-set! node->val pos val) (hash-set node->node pos (lis...
null
https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/temporal-clock.rkt
racket
#lang racket (define vals (list 5 1 4 4 1 3 3 5 2 1 5)) (define how-many (length vals)) (define node->val (make-hasheq)) (define node->node (for/fold ([node->node (hasheq)]) ([val (in-list vals)] [pos (in-naturals)]) (hash-set! node->val pos val) (hash-set node->node pos (lis...
82021778a9d61895a89e2915128e111409bd152a2287b95ab4fc1c32e6a7addb
dbuenzli/down
down.ml
--------------------------------------------------------------------------- Copyright ( c ) 2017 The down programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) ...
null
https://raw.githubusercontent.com/dbuenzli/down/9b3f1e10120e0aef3a519c3f58e289e321fc5e17/src/down.ml
ocaml
Set to the right implementation by Down_top or Down_nattop Logging and formatting styles match ocaml match ocaml match ocaml Prompt history bottom can be empty String editor wrap OCaml history Sessions create path Recording. That could still not be down's readline but, unlikely Another topl...
--------------------------------------------------------------------------- Copyright ( c ) 2017 The down programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) ...
aa00b9e86d5cb61f883c78fecc8779cc5989b5c7557ef9175842aad87dc19170
manuel-serrano/bigloo
pcre.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / / runtime / Unsafe / pcre.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation : ...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/runtime/Unsafe/pcre.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ *=====================================================================*/ *---------------------------...
* serrano / prgm / project / bigloo / / runtime / Unsafe / pcre.scm * / * Author : * / * Creation : Tue Dec 6 15:43:19 2011 * / * Last change : Tue Oct 8 18:25:57 2019 ( serrano ) * / * Copyri...
7d61cc6ffcd6d8b6638cb0291b24faff9926ccbac00f05319e3f38615494cda9
tari3x/csec-modex
piauth.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
null
https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/deps/proverif1.84/src/piauth.ml
ocaml
Display a clause and possibly a corresponding trace When inj_mode = Some q, try to reconstruct a trace that falsifies injectivity When inj_mode = None, just try to reconstruct a trace corresponding to the derivation of the clause cl. Returns true when a trace has definitely been found. Display a query ...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
dcd132f52b98c58e4db097fc7a7cc3ec28aa6080d7d249f0bcd4952636d9ba68
degree9/uikit-hl
spinner.cljs
(ns uikit-hl.spinner (:require [hoplon.core :as h])) (defmulti uk-spinner! h/kw-dispatcher :default ::default) (defmethod h/do! ::default [elem key val] (uk-spinner! elem key val)) (defmethod uk-spinner! ::default [elem kw v] (h/do! elem :uk-spinner (clj->js v))) (h/defelem spinner [{:keys [spinner] :or {...
null
https://raw.githubusercontent.com/degree9/uikit-hl/b226b1429ea50f8e9a6c1d12c082a3be504dda33/src/uikit_hl/spinner.cljs
clojure
(ns uikit-hl.spinner (:require [hoplon.core :as h])) (defmulti uk-spinner! h/kw-dispatcher :default ::default) (defmethod h/do! ::default [elem key val] (uk-spinner! elem key val)) (defmethod uk-spinner! ::default [elem kw v] (h/do! elem :uk-spinner (clj->js v))) (h/defelem spinner [{:keys [spinner] :or {...
9335c216a11af9979bf7f55df71d628af73348f27e841e197aa491f09e355d05
janestreet/universe
is_binary.mli
open! Core_kernel open! Import (** Heuristics for detecting files that are clearly binary. *) val string : string -> bool
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/patdiff/kernel/src/is_binary.mli
ocaml
* Heuristics for detecting files that are clearly binary.
open! Core_kernel open! Import val string : string -> bool
aa3bd29b26248443c82c328df82897595fb83b0909c03de0701a0ae80edff91d
simingwang/emqx-plugin-kafkav5
gun_data_h.erl
Copyright ( c ) 2017 - 2018 , < > %% %% Permission to use, copy, modify, and/or 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 " AS IS " AND THE AUTHOR DISC...
null
https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/lib/gun/src/gun_data_h.erl
erlang
Permission to use, copy, modify, and/or 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. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2017 - 2018 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(gun_data_h). -behavior(gun_content_handler). ...
30cb15778fb04a24a64d4933e98f2c552ec12cd01ca264f0826c6801e8faa08e
philnguyen/soft-contract
ex-09.rkt
#lang racket (require soft-contract/fake-contract) (define (f x) (if (number? x) (add1 x) (string-length x))) (define (g x) (if (let ([tmp (number? x)]) (if tmp tmp (string? x))) (f x) 0)) (provide/contract [f (#|HERE|# any/c . -> . number?)] [g (any/c . -> . number?)])
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/unsafe/octy/ex-09.rkt
racket
HERE
#lang racket (require soft-contract/fake-contract) (define (f x) (if (number? x) (add1 x) (string-length x))) (define (g x) (if (let ([tmp (number? x)]) (if tmp tmp (string? x))) (f x) 0)) (provide/contract [g (any/c . -> . number?)])
b323495d589cd5bbc72a96305137bf932c2fd92ddc886e6d7557a6f25204f182
caiorss/Functional-Programming
add.hs
sumList (x:xs) = x + sumList xs sumList [] = 0
null
https://raw.githubusercontent.com/caiorss/Functional-Programming/ef3526898e3014e9c99bf495033ff36a4530503d/haskell/rwh/ch03/add.hs
haskell
sumList (x:xs) = x + sumList xs sumList [] = 0