_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
71b9d9d66853635368984537741c2d3a9dfe580c5c9ad3c6481fdbc964d1d349
macourtney/Conjure
database_session_store.clj
(ns conjure.model.database-session-store (:import [java.util Calendar Date]) (:require [clojure.tools.logging :as logging] [drift-db.core :as database] [conjure.util.session-utils :as session-utils] [clojure.tools.string-utils :as conjure-str-utils])) (def session-table :session...
null
https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_model/src/conjure/model/database_session_store.clj
clojure
(ns conjure.model.database-session-store (:import [java.util Calendar Date]) (:require [clojure.tools.logging :as logging] [drift-db.core :as database] [conjure.util.session-utils :as session-utils] [clojure.tools.string-utils :as conjure-str-utils])) (def session-table :session...
dee1d4d2b46b97f8e1eb7e51eab7694f733d084d970a60ea3f3273f536b7c431
lspitzner/exference
Ord.hs
module Data.Ord where data Ordering class Data.Eq.Eq a => Ord a where compare :: a -> a -> Ordering (<) :: a -> a -> Data.Bool.Bool (>=) :: a -> a -> Data.Bool.Bool (>) :: a -> a -> Data.Bool.Bool (<=) :: a -> a -> Data.Bool.Bool comparing :: Ord a => (b -> a) -> b -> b -> Ordering instance Ord a => O...
null
https://raw.githubusercontent.com/lspitzner/exference/d8a336f8b9df905e54173339f78ba892daa3f688/environment/Ord.hs
haskell
module Data.Ord where data Ordering class Data.Eq.Eq a => Ord a where compare :: a -> a -> Ordering (<) :: a -> a -> Data.Bool.Bool (>=) :: a -> a -> Data.Bool.Bool (>) :: a -> a -> Data.Bool.Bool (<=) :: a -> a -> Data.Bool.Bool comparing :: Ord a => (b -> a) -> b -> b -> Ordering instance Ord a => O...
9e0f93d33591da8e3cf800a3f0ba1508e1aec4cf95a9698259fc0fd98675dbfc
uscensusbureau/citysdk
core.cljc
(ns census.wmsAPI.core (:require #?(:cljs [cljs.core.async :refer [>! <! chan promise-chan close! take! put! to-chan! timeout] :refer-macros [go alt!]] :clj [clojure.core.async :refer [>! <! chan promise-chan close! take! put! to-chan! ...
null
https://raw.githubusercontent.com/uscensusbureau/citysdk/ae5c1c2d826dec76dfca903d6784750811ec24bc/v2/src/census/wmsAPI/core.cljc
clojure
=> ↓ seq'd inverted geoKeyMap | looks up ↓ => :consolidated-cities => :consolidated-cities => {:STATE {:state '51'}, :COUNTY {:county '013'}} value = returns an empty map ({}) if invalid TODO: can this be cleaned up? e.g.: ([:county "*"]) if another layer is available: recur providing the resul...
(ns census.wmsAPI.core (:require #?(:cljs [cljs.core.async :refer [>! <! chan promise-chan close! take! put! to-chan! timeout] :refer-macros [go alt!]] :clj [clojure.core.async :refer [>! <! chan promise-chan close! take! put! to-chan! ...
805a95f64e9fa320214788db9bcb5b9e874c448ebf96a93216ef9988d802d6bc
bobbae/gosling-emacs
mh-exit.ml
; This file implements the autoloaded "exit" function (not a command) of mhe. ; There is a bug here: When processing the commands in cmd-buffer, they ; are sent directly to send-to-shell, without prepending mh-progs to the ; commands. If the user has his path wrong, these commands won't work. ; Doing things this...
null
https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/maclib/mh-exit.ml
ocaml
; This file implements the autoloaded "exit" function (not a command) of mhe. ; There is a bug here: When processing the commands in cmd-buffer, they ; are sent directly to send-to-shell, without prepending mh-progs to the ; commands. If the user has his path wrong, these commands won't work. ; Doing things this...
d7a136f21eb0cfb7c6559a07e7f3679cbef4be4f618a339ed323bbc9bc3c2bd0
brendanlong/ocaml-ooxml
easy_xlsx.ml
open Base open Base.Printf open Stdint open Spreadsheetml module Value = struct type t = | Date of Ptime.date | Datetime of Ptime.t | Number of float | String of string | Time of Ptime.time let to_string = function | Date (y, m, d) -> sprintf "%d-%d-%d" y m d | Datetime t -> Ptime.to_r...
null
https://raw.githubusercontent.com/brendanlong/ocaml-ooxml/dd6b8496d22670cc0fa0b50990414f955267ded9/easy_xlsx/src/easy_xlsx.ml
ocaml
open Base open Base.Printf open Stdint open Spreadsheetml module Value = struct type t = | Date of Ptime.date | Datetime of Ptime.t | Number of float | String of string | Time of Ptime.time let to_string = function | Date (y, m, d) -> sprintf "%d-%d-%d" y m d | Datetime t -> Ptime.to_r...
9105bdb31a466f4715ff60eecb37204a577d4445e85f60fa35843064c817bde4
cxphoe/SICP-solutions
1.23.rkt
(define (square x) (* x x)) (define (smallest-divisor n) (find-divisor n 2)) ; find divisors without testing even numbers if ( not (= ( remainder num 2 ) 0 ) which CANNOT halve ; the time to test a prime because of the extra ; procedures (define (find-divisor n test-divisor) (define (next num) (if (= num 2)...
null
https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%201-Building%20Abstractions%20with%20Procedures/1.23.rkt
racket
find divisors without testing even numbers if the time to test a prime because of the extra procedures BUT also won't exceed the former time literally because the extra procedures is less than the follow procedures search for primes within odd numbers with a given number as start
(define (square x) (* x x)) (define (smallest-divisor n) (find-divisor n 2)) ( not (= ( remainder num 2 ) 0 ) which CANNOT halve (define (find-divisor n test-divisor) (define (next num) (if (= num 2) 3 (+ num 2))) (cond ((> (square test-divisor) n) n) ((divides? test-divisor n) tes...
bee64447169c6fb4037bcfe30bed305e90e959218fe4271892f15ee898e549fa
NorfairKing/mergeful
TwoClientsSpec.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module Data.Mergeful.Persistent.TwoClientsSpec ( spec, ) where import Control.Monad.Reader import qualified Data.Map as M import Data.Mergeful import qualified Data.Set as S import Database.Persist.Sql import Test.Syd hiding (T...
null
https://raw.githubusercontent.com/NorfairKing/mergeful/8f1686891e306edcb26daf5ec1782f94f6ae326c/mergeful-persistent/test/Data/Mergeful/Persistent/TwoClientsSpec.hs
haskell
# LANGUAGE RankNTypes # Client B is empty The server is empty Client A merges the response Client B merges the response Client A and Client B now have the same store Client A has a synced item. Client B had synced that same item, but has since modified it The server is has the item that both clients had before ...
# LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module Data.Mergeful.Persistent.TwoClientsSpec ( spec, ) where import Control.Monad.Reader import qualified Data.Map as M import Data.Mergeful import qualified Data.Set as S import Database.Persist.Sql import Test.Syd hiding (Timed (..), runTest) import T...
33eddee38e0cd9b8784ccee2ad84dc170fcc09c883ac7ccb614605cc9ac2f99a
bobzhang/ocaml-book
pa_json_ast.ml
open Camlp4.PreCast open Json_ast module Camlp4TrashX = struct INCLUDE "json_ast.ml" end open Camlp4TrashX class map = Camlp4MapGenerator.generated class fold = Camlp4FoldGenerator.generated module MetaExpr = struct let meta_float' _loc f = <:expr< $`flo:f$ >> include Camlp4Filters.MetaGenera...
null
https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/camlp4/code/jake/pa_json_ast.ml
ocaml
open Camlp4.PreCast open Json_ast module Camlp4TrashX = struct INCLUDE "json_ast.ml" end open Camlp4TrashX class map = Camlp4MapGenerator.generated class fold = Camlp4FoldGenerator.generated module MetaExpr = struct let meta_float' _loc f = <:expr< $`flo:f$ >> include Camlp4Filters.MetaGenera...
a85041108e7534c9e4bf9cf225e1eaa519629313eeedb528a587db2aa03ca8b1
haskell-servant/servant
JWT.hs
module Servant.Auth.Server.Internal.JWT where import Control.Lens import Control.Monad (MonadPlus(..), guard) import Control.Monad.Reader import qualified Crypto.JOSE as Jose import qualified Crypto.JWT as Jose import Data.ByteArray (constEq) import qual...
null
https://raw.githubusercontent.com/haskell-servant/servant/8f081bd9ad69aaa4ed4f27444e15433b36177b42/servant-auth/servant-auth-server/src/Servant/Auth/Server/Internal/JWT.hs
haskell
token expires.
module Servant.Auth.Server.Internal.JWT where import Control.Lens import Control.Monad (MonadPlus(..), guard) import Control.Monad.Reader import qualified Crypto.JOSE as Jose import qualified Crypto.JWT as Jose import Data.ByteArray (constEq) import qual...
cf272d412f48399811f44d544b248634676da3e61042c16b6377d916fe9bb5c1
haskell/text
ApiCompare.hs
-- This script compares the strict and lazy Text APIs to ensure that -- they're reasonably in sync. {-# LANGUAGE OverloadedStrings #-} import qualified Data.Set as S import qualified Data.Text as T import System.Process main = do let tidy pkg = (S.fromList . filter (T.isInfixOf "::") . T.lines . ...
null
https://raw.githubusercontent.com/haskell/text/ca73ae38ed3744ec930cbfdb706147ec29d5a185/scripts/ApiCompare.hs
haskell
This script compares the strict and lazy Text APIs to ensure that they're reasonably in sync. # LANGUAGE OverloadedStrings #
import qualified Data.Set as S import qualified Data.Text as T import System.Process main = do let tidy pkg = (S.fromList . filter (T.isInfixOf "::") . T.lines . T.replace "GHC.Int.Int64" "Int" . T.replace "\n " "" . T.replace (T.append (T.pack pkg) ".") "" . T...
1c58d103b05c3228b2ccfb7b294de557d98dfb6e6352924949f5679f003ed6a7
flupe/achille
Writable.hs
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # -- | Defines an interface for things that can be written to disk. module Achille.Writable where import Data.Text as Text import Data.Text.Encoding (encodeUtf8) import Data.Text.Lazy qualified as LT import Data.Text.Lazy.Encoding qualifie...
null
https://raw.githubusercontent.com/flupe/achille/359e8a4ab80a5503e682f3d11a4ef5327daa7bdc/achille/Achille/Writable.hs
haskell
| Defines an interface for things that can be written to disk. | Class for things that can be saved.
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # module Achille.Writable where import Data.Text as Text import Data.Text.Encoding (encodeUtf8) import Data.Text.Lazy qualified as LT import Data.Text.Lazy.Encoding qualified as LT (encodeUtf8) import Data.ByteString qualified as B...
75ae4414f5779f54eb80f88d713efaf4c08e812ad901adbddecadfbe9cd481e2
ruhler/smten
HashTable.hs
-- | A hash table which is used only for lookups. module Smten.Runtime.HashTable ( HashTable(), table, Smten.Runtime.HashTable.lookup, Smten.Runtime.HashTable.assocs, ) where import Data.Array import Data.Hashable data HashTable k v = HashTable { _size :: Int, _elems :: Array Int [(k, v)] } ...
null
https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-lib/Smten/Runtime/HashTable.hs
haskell
| A hash table which is used only for lookups. A list of the hash table sizes we'll draw from. From | Construct a new table with the given key/value pair. | Lookup the value for the given key in the table. | Return the index of the bucket where the key should be found given the size of the hash table.
module Smten.Runtime.HashTable ( HashTable(), table, Smten.Runtime.HashTable.lookup, Smten.Runtime.HashTable.assocs, ) where import Data.Array import Data.Hashable data HashTable k v = HashTable { _size :: Int, _elems :: Array Int [(k, v)] } sizes :: [Int] sizes = [ 193, 389, 769, 1543,...
2f3bc511edb62aaed7b2401b39f759cb8c295bc1eec97cec2adae49a1490cdeb
clckwrks/clckwrks
URL.hs
# LANGUAGE DeriveDataTypeable , FlexibleInstances , TemplateHaskell , TypeFamilies # module Clckwrks.URL ( ClckURL(..) , AdminURL(..) , AuthenticateURL(..) , NoEscape(..) ) where import Clckwrks.Admin.URL (AdminURL(..)) import Clckwrks.JS.URL (JSURL) import Clckwrks.Profil...
null
https://raw.githubusercontent.com/clckwrks/clckwrks/dd4ea1e2f41066aa5779f1cc22f3b7a0ca8a0bed/Clckwrks/URL.hs
haskell
# LANGUAGE DeriveDataTypeable , FlexibleInstances , TemplateHaskell , TypeFamilies # module Clckwrks.URL ( ClckURL(..) , AdminURL(..) , AuthenticateURL(..) , NoEscape(..) ) where import Clckwrks.Admin.URL (AdminURL(..)) import Clckwrks.JS.URL (JSURL) import Clckwrks.Profil...
88290fe4fe36a0a8d0a8dc4ef593ce9c81484a11996a48d38d7783ebebc2f37e
SahilKang/cl-avro
duration.lisp
Copyright 2021 Google LLC ;;; ;;; This file is part of cl-avro. ;;; ;;; cl-avro is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;;; (at your option) any later version. ;...
null
https://raw.githubusercontent.com/SahilKang/cl-avro/70fcaa32514cfb59b75812b2eab45ed24cce9d27/src/logical/duration.lisp
lisp
This file is part of cl-avro. cl-avro is free software: you can redistribute it and/or modify (at your option) any later version. cl-avro is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See t...
Copyright 2021 Google LLC it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (in-package #:cl-user) (defpackage #:cl-avro.internal.duration (:use #:cl) (:l...
14548dded6c9ebc8e92c0db3726776be6e7a57eadd6f3a168e2108394b510d08
Helium4Haskell/helium
FunctionInMultipleClasses.hs
class ClassA a where duplicate :: a -> a class ClassB b where duplicate :: b -> b
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeClassesStatic/FunctionInMultipleClasses.hs
haskell
class ClassA a where duplicate :: a -> a class ClassB b where duplicate :: b -> b
87d401994f9b9898daaf6597c12d1a445a68755cf647f6b475f7630030a43eea
nd/sicp
2.28.scm
(define (fringe tree) (cond ((null? tree) (list)) ((not (pair? tree)) (list tree)) (else (append (fringe (car tree)) (fringe (cdr tree))))))
null
https://raw.githubusercontent.com/nd/sicp/d8587a0403d95af7c7bcf59b812f98c4f8550afd/ch02/2.28.scm
scheme
(define (fringe tree) (cond ((null? tree) (list)) ((not (pair? tree)) (list tree)) (else (append (fringe (car tree)) (fringe (cdr tree))))))
a0106d32e165560fb789dea362d58a68744a9b1751ba4a76a80764405e08aad1
mirage/alcotest
json_output.ml
let () = let open Alcotest in let id () = () in run ~argv:[| ""; "--json" |] __FILE__ [ ( "test-a", [ test_case "First test case" `Quick id; test_case "Second test case" `Quick id; ] ); ("test-b", [ test_case "Third test case" `Quick id ]); ]
null
https://raw.githubusercontent.com/mirage/alcotest/bb3492901dea03c72b4de6b5660852a020283921/test/e2e/alcotest/passing/json_output.ml
ocaml
let () = let open Alcotest in let id () = () in run ~argv:[| ""; "--json" |] __FILE__ [ ( "test-a", [ test_case "First test case" `Quick id; test_case "Second test case" `Quick id; ] ); ("test-b", [ test_case "Third test case" `Quick id ]); ]
b4806e000fd3a8200ade6502e74088b0b7a704400329952f9558ee5da95ad379
alanz/ghc-exactprint
CorePragma.hs
{-# INLINE strictStream #-} strictStream (Bitstream l v) # CORE " Strict Bitstream stream " # S.concatMap stream (GV.stream v) `S.sized` Exact l
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc710/CorePragma.hs
haskell
# INLINE strictStream #
strictStream (Bitstream l v) # CORE " Strict Bitstream stream " # S.concatMap stream (GV.stream v) `S.sized` Exact l
0992a9240ff623a3319b85e23167ea80ee45c29b98d79a070ee6d88201c3a045
helium/packet-purchaser
pp_cli_registry.erl
-module(pp_cli_registry). -define(CLI_MODULES, [ pp_cli_info, pp_cli_config ]). -export([register_cli/0]). register_cli() -> clique:register(?CLI_MODULES).
null
https://raw.githubusercontent.com/helium/packet-purchaser/c1bffd81ed9dfa462a8c8408ba8f2eaa9215aa21/src/cli/pp_cli_registry.erl
erlang
-module(pp_cli_registry). -define(CLI_MODULES, [ pp_cli_info, pp_cli_config ]). -export([register_cli/0]). register_cli() -> clique:register(?CLI_MODULES).
a15d02d24280e56ac10209ed99bd5fc9812e77048b21203a445f781b731d7df5
lambe-lang/nethra
binding.mli
type t = | Signature of string * Term.t Localized.t | Definition of string * Term.t Localized.t option * Term.t Localized.t
null
https://raw.githubusercontent.com/lambe-lang/nethra/2ef1dbb6ca0ce14a70f8e81fbc13e54ef12f34a1/lib/nethra/toy/cst/binding.mli
ocaml
type t = | Signature of string * Term.t Localized.t | Definition of string * Term.t Localized.t option * Term.t Localized.t
1b4e652764706831bdae0f703c5e41899c18f84ef3d51276cdf7c19c96bdd254
mrphlip/aoc
Modulo.hs
# OPTIONS_GHC -Wno - tabs # module Modulo (Modulo, modulo, modulus) where import Data.List import Utils (extendedGcd) data Modulo x = !x `Mod` !x deriving Eq infix 5 `modulo` n `modulo` m = (n `mod` m) `Mod` m modulusMismatch (_ `Mod` m) (_ `Mod` m') = m /= m' modulusMismatch3 (_ `Mod` m) (_ `Mod` m') (_ `Mod` m'')...
null
https://raw.githubusercontent.com/mrphlip/aoc/06395681eb6b50b838cd4561b2e0aa772aca570a/Modulo.hs
haskell
Note... this will give an infinite list if it never reaches the final value for putting these in sets, etc It's not really fractional, I know, but it fits the definition to an extent To extract the number part, use toInteger
# OPTIONS_GHC -Wno - tabs # module Modulo (Modulo, modulo, modulus) where import Data.List import Utils (extendedGcd) data Modulo x = !x `Mod` !x deriving Eq infix 5 `modulo` n `modulo` m = (n `mod` m) `Mod` m modulusMismatch (_ `Mod` m) (_ `Mod` m') = m /= m' modulusMismatch3 (_ `Mod` m) (_ `Mod` m') (_ `Mod` m'')...
0d64e3b258c3b603d8bfe74c7df9e49f6f8f01da1262a4b59f119a301ef7a8be
rudolph-miller/cl-gists
file.lisp
(in-package :cl-user) (defpackage cl-gists.file (:use :cl :annot.doc :cl-gists.util) (:import-from :alexandria :remove-from-plist) (:export :cl-gists.file :file :file-name :file-size :file-raw-url :file-type :file-tr...
null
https://raw.githubusercontent.com/rudolph-miller/cl-gists/bcf3687f0af8b2eb5acaeda5db94d67446e56daf/src/file.lisp
lisp
(in-package :cl-user) (defpackage cl-gists.file (:use :cl :annot.doc :cl-gists.util) (:import-from :alexandria :remove-from-plist) (:export :cl-gists.file :file :file-name :file-size :file-raw-url :file-type :file-tr...
3a7c0e0a65999599dea1623396452295d113e8dc2024834f8ff91fe90aa7ce81
wdebeaum/step
test2.lisp
(in-package :lxm) (define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( Note : : handling it this way overgenerates e.g. , " the two ones in the corner " parses . (W::ONE (SENSES ((meta-data :origin trips :entry-date 20060803 :change-date nil :comments nil :wn ("one%1:09:00")) (syntax (W::one +)) ;;...
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/converter/test2.lisp
lisp
such a strange word, we give it its own feature prefer number sense prefer adjectival sense
(in-package :lxm) (define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( Note : : handling it this way overgenerates e.g. , " the two ones in the corner " parses . (W::ONE (SENSES ((meta-data :origin trips :entry-date 20060803 :change-date nil :comments nil :wn ("one%1:09:00")) (LF-PARENT ont::referen...
c5dd59e83dc7c7032ca95539304486f4833fbc29f2cbad802d650f66a61ec94d
ghcjs/ghcjs
data-fixed-show-read.hs
module Main (main) where import Data.Fixed main :: IO () main = do doit 38.001 doit 38.009 doit 38.01 doit 38.09 print (read "38" :: Centi) doit (-38.001) doit (-38.009) doit (-38.01) doit (-38.09) print (read "-38" :: Centi) ...
null
https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/pkg/base/data-fixed-show-read.hs
haskell
module Main (main) where import Data.Fixed main :: IO () main = do doit 38.001 doit 38.009 doit 38.01 doit 38.09 print (read "38" :: Centi) doit (-38.001) doit (-38.009) doit (-38.01) doit (-38.09) print (read "-38" :: Centi) ...
03448d3d82c65c0c2f86120b7eaa9128734cd725fbabdbfbaf09102dc9544102
noinia/hgeometry
WSPD.hs
-------------------------------------------------------------------------------- -- | Module : Algorithms . Geometry . WSPD Copyright : ( C ) -- License : see the LICENSE file Maintainer : -- -- Algorithm to construct a well separated pair decomposition (wspd). -- -----------------------...
null
https://raw.githubusercontent.com/noinia/hgeometry/ddc7d456cbee3e2cd998857780089e1469ba81ba/hgeometry/src/Algorithms/Geometry/WSPD.hs
haskell
------------------------------------------------------------------------------ | License : see the LICENSE file Algorithm to construct a well separated pair decomposition (wspd). ------------------------------------------------------------------------------ import Geometry.Properties import ...
Module : Algorithms . Geometry . WSPD Copyright : ( C ) Maintainer : module Algorithms.Geometry.WSPD ( fairSplitTree , wellSeparatedPairs , NodeData(NodeData) , WSP , SplitTree , nodeData , Level(..) , reIndexPoints , distributePoints , distributePoints' ) where import ...
cf0c7fd75084e48b476c487cce536758cc361990b0c64db7fe2de615b974aa42
HJianBo/sserl
sserl_conn.erl
%%%------------------------------------------------------------------- @author > ( C ) 2016 , %%% @doc %%% %%% @end Created : 15 May 2016 by > %%%------------------------------------------------------------------- -module(sserl_conn). -behaviour(gen_server). %% API -export([start_link/2, init/2]). %% g...
null
https://raw.githubusercontent.com/HJianBo/sserl/9e42930caf8bfe90ae9ed2edac2e0672f7e5e55e/apps/sserl/src/sserl_conn.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API gen_server callbacks =================================================================== API =================================================================== ---...
@author > ( C ) 2016 , Created : 15 May 2016 by > -module(sserl_conn). -behaviour(gen_server). -export([start_link/2, init/2]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -include("shadowsocks.hrl"). -include("sserl.hrl"). -define(SERVER, ?MOD...
a6c89c6f3a3137d7504786befcf14f7ecca900f7a293aaac05a4b6e811802622
sionescu/bordeaux-threads
api-threads.lisp
-*- Mode : LISP ; Syntax : ANSI - Common - lisp ; Base : 10 ; Package : BORDEAUX - THREADS-2 -*- The above modeline is required for . Do not change . (in-package :bordeaux-threads-2) (defclass thread () ((name :initarg :name :reader thread-name) (native-thread :initarg :native-thread :read...
null
https://raw.githubusercontent.com/sionescu/bordeaux-threads/fd1b0cffdb24ca630e0c0350e80571cdf26bf14c/apiv2/api-threads.lisp
lisp
Syntax : ANSI - Common - lisp ; Base : 10 ; Package : BORDEAUX - THREADS-2 -*- Used for implementing condition variables in impl-condition-variables-semaphores.lisp. Forms are evaluated in the new thread or in the calling thread? (Calling it signals an error) Wait until the thread creator has finished creating t...
The above modeline is required for . Do not change . (in-package :bordeaux-threads-2) (defclass thread () ((name :initarg :name :reader thread-name) (native-thread :initarg :native-thread :reader thread-native-thread) (%lock :initform (make-lock)) #+ccl (%semaphore :initform (%make-...
9be46c44fc4f46510798f3be464a1874a32d568a820c49607baa67a1fe9244f3
coleslaw-org/coleslaw
isso.lisp
(defpackage :coleslaw-isso (:use :cl) (:export #:enable) (:import-from :coleslaw #:add-injection #:post)) (in-package :coleslaw-isso) (defvar *isso-header* "<div class=\"comments\"> <section id=\"isso-thread\"></section> <script data-isso=\"~a/\" src=\"~a/js...
null
https://raw.githubusercontent.com/coleslaw-org/coleslaw/0b9f027a36ea00ca2e4b6f8d9fd7a135127cc2da/plugins/isso.lisp
lisp
(defpackage :coleslaw-isso (:use :cl) (:export #:enable) (:import-from :coleslaw #:add-injection #:post)) (in-package :coleslaw-isso) (defvar *isso-header* "<div class=\"comments\"> <section id=\"isso-thread\"></section> <script data-isso=\"~a/\" src=\"~a/js...
a46af95cd30f1733eba1d3b3ed4b7856215cf8af5d573cc47330544c4eadd1ed
green-labs/gosura
auth_test.clj
(ns gosura.auth-test (:require [clojure.test :refer [deftest is run-tests testing]] [failjure.core :as f] [gosura.auth :as gosura-auth] [gosura.edn :refer [read-config]])) (deftest ->auth-result-test (let [auth0 (fn [ctx] (boolean (get-in ctx [:iden...
null
https://raw.githubusercontent.com/green-labs/gosura/ca92389325557cbe749ee42a2986c0d528de7458/test/gosura/auth_test.clj
clojure
(ns gosura.auth-test (:require [clojure.test :refer [deftest is run-tests testing]] [failjure.core :as f] [gosura.auth :as gosura-auth] [gosura.edn :refer [read-config]])) (deftest ->auth-result-test (let [auth0 (fn [ctx] (boolean (get-in ctx [:iden...
a2947b3a85b6b3f5b2c6e7ee46f6e5507de663a98658e31899fd19f1525708c1
dselsam/arc
Partition.hs
Copyright ( c ) 2020 Microsoft Corporation . All rights reserved . Released under Apache 2.0 license as described in the file LICENSE . Authors : , , . module Util.Partition where import Data.UnionFind.ST
null
https://raw.githubusercontent.com/dselsam/arc/7e68a7ed9508bf26926b0f68336db05505f4e765/src/Util/Partition.hs
haskell
Copyright ( c ) 2020 Microsoft Corporation . All rights reserved . Released under Apache 2.0 license as described in the file LICENSE . Authors : , , . module Util.Partition where import Data.UnionFind.ST
e1e94e99c96004d6c4fa03574d243ff68cc6e11ef2edb06a71fbdddacee7a187
nshepperd/funn
Param.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module AI.Funn.CL.Batch...
null
https://raw.githubusercontent.com/nshepperd/funn/23138fc44cfda90afd49927c39b122ed78945293/AI/Funn/CL/Batched/Param.hs
haskell
O(ω)
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module AI.Funn.CL.Batch...
63e0ebd2fd7a08a1edf1ed2f93e5c657fd6f12255afd81e229863920129868a8
flosell/lambdacd
merge_test.clj
(ns lambdacd.stepresults.merge-test (:require [clojure.test :refer :all] [lambdacd.stepresults.merge :refer :all] [conjure.core :as c])) (defn some-resolver [_ _ _] nil) (defn some-other-resolver [_ _ _]) (defn some-third-resolver [_ _ _]) (defn some-merge-fn [map-a map-b] (assoc (merge ma...
null
https://raw.githubusercontent.com/flosell/lambdacd/e9ba3cebb2d5f0070a2e0e1e08fc85fc99ee7135/test/clj/lambdacd/stepresults/merge_test.clj
clojure
(ns lambdacd.stepresults.merge-test (:require [clojure.test :refer :all] [lambdacd.stepresults.merge :refer :all] [conjure.core :as c])) (defn some-resolver [_ _ _] nil) (defn some-other-resolver [_ _ _]) (defn some-third-resolver [_ _ _]) (defn some-merge-fn [map-a map-b] (assoc (merge ma...
7259b3faeb480c8f2cb4693c2ae5430679f27cf39e4866e998b3464b31bea82c
alt-romes/slfl
t2.hs
#-- main :: forall a b c d . ((! (a -o b)) -o (((! (a -o b)) -o (d -o c)) -o (d -o c))); main e f g = let !h = e in f (!(λk -> h k)) g;
null
https://raw.githubusercontent.com/alt-romes/slfl/4956fcce8ff2ca7622799fe0715c118b568b74eb/STLLC/t2.hs
haskell
main :: forall a b c d . ((! (a -o b)) -o (((! (a -o b)) -o (d -o c)) -o (d -o c)));
main e f g = let !h = e in f (!(λk -> h k)) g;
6909c0cef98e186c345675244b5ecee8acd97097e0246ad22410fadd35b235af
rametta/retros
New.hs
module Web.View.Columns.New where import Web.View.Prelude newtype NewView = NewView {column :: Column} instance View NewView where html NewView {..} = renderModal Modal { modalTitle = "New Column", modalCloseUrl = pathTo $ ShowRetroAction $ get #retroId column, modalFooter = N...
null
https://raw.githubusercontent.com/rametta/retros/8f3ca23bcf8ee30476ff3e68a5969af021956f8b/Web/View/Columns/New.hs
haskell
module Web.View.Columns.New where import Web.View.Prelude newtype NewView = NewView {column :: Column} instance View NewView where html NewView {..} = renderModal Modal { modalTitle = "New Column", modalCloseUrl = pathTo $ ShowRetroAction $ get #retroId column, modalFooter = N...
ee758f8df13401c8208fe2a3f434931e8915c7ccb948aac041db691fc0e18e20
johnlawrenceaspden/hobby-code
cookies.clj
;; necessary dependencies [ [ org.clojure/clojure " " ] ;; [ring/ring "1.1.7"]] ;; ------------- ;; Here's an app, built in a way which should surprise no-one who's read the previous posts (require 'ring.adapter.jetty 'ring.middleware.stacktrace 'clojure.pprint) Middleware for spying on t...
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/ring-wiki/cookies.clj
clojure
necessary dependencies [ring/ring "1.1.7"]] ------------- Here's an app, built in a way which should surprise no-one who's read the previous posts Absolute binding promise to someday get around to writing the app plumbing The actual application Start the server if it hasn't already been started Next we'll ...
[ [ org.clojure/clojure " " ] (require 'ring.adapter.jetty 'ring.middleware.stacktrace 'clojure.pprint) Middleware for spying on the doings of other middleware : (defn html-escape [string] (str "<pre>" (clojure.string/escape string {\< "&lt;", \> "&gt;"}) "</pre>")) (defn format-request ...
dc7d552b6868b82cf86e709182fdad7669d9f7b11d269cfd447d1764069b0bde
FieryCod/holy-lambda
hello.clj
(ns hello (:require [fierycod.holy-lambda.response :as hr] [fierycod.holy-lambda.core :as h]) (:gen-class)) (defn Hello < [_] (hr/text "Hello world!")) (h/entrypoint [#'Hello])
null
https://raw.githubusercontent.com/FieryCod/holy-lambda/4b418f0cbf095f6908264e57d07068f73e05926b/benchmarks/holy-lambda-vs-other-runtimes/clojure-babashka/hello.clj
clojure
(ns hello (:require [fierycod.holy-lambda.response :as hr] [fierycod.holy-lambda.core :as h]) (:gen-class)) (defn Hello < [_] (hr/text "Hello world!")) (h/entrypoint [#'Hello])
212447fc8161bb7734c8642d3256960e06734291584d0ca77042c3990c860ae4
autotaker/smopeck
Syntax.hs
# LANGUAGE DataKinds # module Smopeck.Spec.Syntax( TopLevelDef(..), Field(..), TypeExp.BindName(..), Method, VarName, UserType, TypeExp, TypeEnv, Primitive, TypeExtension, Exp(..), TypeRefine, Lattice, LatticeExt(..), module Smopeck.Spec.Exp, module Smopeck.Mock.Location, fTypeExp ) where impo...
null
https://raw.githubusercontent.com/autotaker/smopeck/7e4ab8bf716125783ccaaf84076c992c2bca5c7f/src/Smopeck/Spec/Syntax.hs
haskell
# LANGUAGE DataKinds # module Smopeck.Spec.Syntax( TopLevelDef(..), Field(..), TypeExp.BindName(..), Method, VarName, UserType, TypeExp, TypeEnv, Primitive, TypeExtension, Exp(..), TypeRefine, Lattice, LatticeExt(..), module Smopeck.Spec.Exp, module Smopeck.Mock.Location, fTypeExp ) where impo...
21a1a8bd45e298b7d2ff237db63209b3a5ea3162f6f45ab0c4159e3c77f8c0db
pallet/stevedore
bash_test.clj
(ns pallet.stevedore.bash-test (:require [clojure.string :as string] [clojure.test :refer [is testing]] [clojure.tools.logging :as logging] [pallet.common.filesystem :as filesystem] [pallet.common.logging.logutils :as logutils] [pallet.common.shell :as shell] [pallet.common.string :refer [quoted]...
null
https://raw.githubusercontent.com/pallet/stevedore/735530a4d21a119d6bc29e6982eaa9c4840b1d54/test/pallet/stevedore/bash_test.clj
clojure
We define a macro rather than a fixture so we can run individual tests
(ns pallet.stevedore.bash-test (:require [clojure.string :as string] [clojure.test :refer [is testing]] [clojure.tools.logging :as logging] [pallet.common.filesystem :as filesystem] [pallet.common.logging.logutils :as logutils] [pallet.common.shell :as shell] [pallet.common.string :refer [quoted]...
945542cfd5a5a2df6fe0f26d4ce998e4f8b055948097e10be0a6b763ec9d6a0a
ocamllabs/vscode-ocaml-platform
ast_editor_state.mli
open Import (** This module's interface is private to [Ast_editor.t]. It is in a separate module to avoid circular dependencies with [Extension_instance.t] *) type t type ast_mode = | Original_ast | Preprocessed_ast val make : unit -> t val find_original_doc_by_pp_uri : t -> Uri.t -> string option val fin...
null
https://raw.githubusercontent.com/ocamllabs/vscode-ocaml-platform/97818d4dd0e29cbd2589e668616896c4755e7d34/src/ast_editor_state.mli
ocaml
* This module's interface is private to [Ast_editor.t]. It is in a separate module to avoid circular dependencies with [Extension_instance.t]
open Import type t type ast_mode = | Original_ast | Preprocessed_ast val make : unit -> t val find_original_doc_by_pp_uri : t -> Uri.t -> string option val find_webview_by_doc : t -> Uri.t -> WebView.t option val associate_origin_and_pp : t -> origin_uri:Uri.t -> pp_doc_uri:Uri.t -> unit val get_current_ast...
5e0dc4a29e7b843d3dde5ce25b882e9ab974766e167d239c2e6e36b04075a1b5
ruisb/LambdaPi
Printer.hs
module SimplyTyped.Printer where import Interpreter.Types import SimplyTyped.Types import Prelude hiding (print) import Text.PrettyPrint.HughesPJ hiding (parens) import qualified Text.PrettyPrint.HughesPJ as PP tPrint :: Int -> Type -> Doc tPrint p (TFree (Global s)) = text s tPrint p (Fun ty ty'...
null
https://raw.githubusercontent.com/ruisb/LambdaPi/e8aea47b7098407f6ec3abb8ad65ac0c70729bf8/SimplyTyped/Printer.hs
haskell
(vars !! (ii - k - 1)) -CHANGED(vars !! ii)- vars :: [String]
module SimplyTyped.Printer where import Interpreter.Types import SimplyTyped.Types import Prelude hiding (print) import Text.PrettyPrint.HughesPJ hiding (parens) import qualified Text.PrettyPrint.HughesPJ as PP tPrint :: Int -> Type -> Doc tPrint p (TFree (Global s)) = text s tPrint p (Fun ty ty'...
e26f658427e256c28ada59a61e64fbaccf8ce4977f05316c13ee7bd29d1ee95d
yallop/fomega
support.ml
open Format module Error = struct exception Exit of int type info = FI of string * int * int * int * int | UNKNOWN type 'a withinfo = {i: info; v: 'a} let dummyinfo = UNKNOWN let createInfo f ls cs le ce = FI(f, ls, cs, le, ce) let merge i1 i2 = match i1, i2 with | FI (f, ls, cs, _, _), FI (_, _, _, le, ce) -> F...
null
https://raw.githubusercontent.com/yallop/fomega/f0ba8efb4e40202203bc77652d2e768fdab9239c/src/support.ml
ocaml
In the text of the book, file positions in error messages are replaced with the string "Error:" ---------------------------------------------------------------------- module pervasive
open Format module Error = struct exception Exit of int type info = FI of string * int * int * int * int | UNKNOWN type 'a withinfo = {i: info; v: 'a} let dummyinfo = UNKNOWN let createInfo f ls cs le ce = FI(f, ls, cs, le, ce) let merge i1 i2 = match i1, i2 with | FI (f, ls, cs, _, _), FI (_, _, _, le, ce) -> F...
99b4e0cabafba5fee5035078a471353e243d6881468ffe68f198ac1b9bb1e9bd
racket/racket7
defined-table.rkt
#lang racket/base (require racket/generic) (define-generics cost (money-cost cost) (time-cost cost) (happiness-cost cost) #:defined-table cost-types) (struct food (name price calories) #:methods gen:cost [(define (money-cost x) (food-price x)) (define (happiness-cost x) ;; Guilt from eating ...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/pkgs/racket-test/tests/generic/defined-table.rkt
racket
Guilt from eating too many calories It's really annoying to start laundry, but subsequent loads are okay
#lang racket/base (require racket/generic) (define-generics cost (money-cost cost) (time-cost cost) (happiness-cost cost) #:defined-table cost-types) (struct food (name price calories) #:methods gen:cost [(define (money-cost x) (food-price x)) (define (happiness-cost x) (/ (- (max (food-calo...
27fc83e4c971de4a227ea07c4e4b704341db4b0965e172308e5e59a9421c28d9
huangjs/cl
result.lisp
-*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; The data in this file contains enhancments. ;;;;; ;;; ;;;;; ...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/src/result.lisp
lisp
Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; The data in this file contains enhancments. ;;;;; ;;;;; ; ; ; ; All rights reserved ;;;;; ; ; assumes same m...
(in-package :maxima) (macsyma-module result) (declare-top (special varlist genvar $ratfac $keepfloat modulus *alpha xv)) (load-macsyma-macros ratmac) (defmfun $poly_discriminant (poly var) (let* ((varlist (list var)) ($ratfac nil) (genvar ()) (rform (rform poly)) (rvar (car (last genvar))) (n (pdegree...
a5965360b1fd7ef29970fe7baf7add3394d5d402b88bfee8e12d577b9b8b39d0
jacekschae/learn-reagent-course-files
init.cljs
(ns giggin.fb.init (:require ["firebase/app" :as firebase] ["firebase/database"] ["firebase/auth"])) (defn firebase-init [] (firebase/initializeApp {:apiKey "your-api-key" :authDomain "your-auth-domain" :databaseURL "your-databse-url" :projectId "your-project-id"}))
null
https://raw.githubusercontent.com/jacekschae/learn-reagent-course-files/bad40303c8e0a8526318a69fdf9c2d786b4240cb/increments/21-firebase-database/src/giggin/fb/init.cljs
clojure
(ns giggin.fb.init (:require ["firebase/app" :as firebase] ["firebase/database"] ["firebase/auth"])) (defn firebase-init [] (firebase/initializeApp {:apiKey "your-api-key" :authDomain "your-auth-domain" :databaseURL "your-databse-url" :projectId "your-project-id"}))
97472afeac45127f258bd8fcd18762e5bb2de27fe0247e3c887402901f9891da
craigfe/sink
cmd.ml
let rec mkdir_p path = try Unix.mkdir path 0o777 with | Unix.Unix_error (EEXIST, _, _) -> () | Unix.Unix_error (ENOENT, _, _) -> let parent = Filename.dirname path in mkdir_p parent; Unix.mkdir path 0o777 let print_to_file path printer = let channel = open_out path in let formatter = Format...
null
https://raw.githubusercontent.com/craigfe/sink/c5431edfa1b06f1a09845a481c4afcb3e92f0667/src/sink-unix/cmd.ml
ocaml
let rec mkdir_p path = try Unix.mkdir path 0o777 with | Unix.Unix_error (EEXIST, _, _) -> () | Unix.Unix_error (ENOENT, _, _) -> let parent = Filename.dirname path in mkdir_p parent; Unix.mkdir path 0o777 let print_to_file path printer = let channel = open_out path in let formatter = Format...
d2d4d0577a5f180155c676d44335c553b19c0101f48756d532006fe61b3f521c
tonyvanriet/clj-slack-client
conversations.clj
(ns clj-slack-client.conversations (:require [clj-slack-client.web :as web]) (:refer-clojure :exclude [list])) (def api-module "conversations") (defn- call ([method-name token] (web/call-and-get-response (str api-module "." method-name) {:token token})) ([method-name token channel] (web/call-and-get-res...
null
https://raw.githubusercontent.com/tonyvanriet/clj-slack-client/6783f003ab93adae057890421622eb5e61ab033d/src/clj_slack_client/conversations.clj
clojure
(ns clj-slack-client.conversations (:require [clj-slack-client.web :as web]) (:refer-clojure :exclude [list])) (def api-module "conversations") (defn- call ([method-name token] (web/call-and-get-response (str api-module "." method-name) {:token token})) ([method-name token channel] (web/call-and-get-res...
69da57d17e4ff9e2d12a2946c21cb4328bf57e72ea12cc3b7f56b081019fded5
sangkilc/ofuzz
envmanager.ml
(* ofuzz - ocaml fuzzing platform *) * environment manager @author < sangkil.cha\@gmail.com > @since 2014 - 03 - 19 @author Sang Kil Cha <sangkil.cha\@gmail.com> @since 2014-03-19 *) Copyright ( c ) 2014 , All rights reserved . Redistribution and use in source and binary fo...
null
https://raw.githubusercontent.com/sangkilc/ofuzz/ba53cc90cc06512eb90459a7159772d75ebe954f/src/envmanager.ml
ocaml
ofuzz - ocaml fuzzing platform
* environment manager @author < sangkil.cha\@gmail.com > @since 2014 - 03 - 19 @author Sang Kil Cha <sangkil.cha\@gmail.com> @since 2014-03-19 *) Copyright ( c ) 2014 , All rights reserved . Redistribution and use in source and binary forms , with or without modification ...
b34467dfcad6beabcf23c84cb591b936370a9716d9b1d17c4a0a4ace8ccb4693
ijvcms/chuanqi_dev
map_20224.erl
-module(map_20224). -export([ range/0, data/0 ]). range() -> {124, 84}. data() -> { {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/map_data/map_20224.erl
erlang
-module(map_20224). -export([ range/0, data/0 ]). range() -> {124, 84}. data() -> { {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,...
1a53d053bb7349ce696427bb54a904673e789b7e5a54f12408d0a4c4e753ef82
tcsprojects/pgsolver
solverregistry.ml
open Paritygame;; open Tcsset;; type global_solver_factory = string array -> global_solver let solvermap = ref TreeMap.empty_def;; let register_solver_factory solver_func identifier abbreviation description = if TreeMap.mem identifier !solvermap then failwith ("Solver `" ^ identifier ^ "' already register...
null
https://raw.githubusercontent.com/tcsprojects/pgsolver/b0c31a8b367c405baed961385ad645d52f648325/src/paritygame/solverregistry.ml
ocaml
open Paritygame;; open Tcsset;; type global_solver_factory = string array -> global_solver let solvermap = ref TreeMap.empty_def;; let register_solver_factory solver_func identifier abbreviation description = if TreeMap.mem identifier !solvermap then failwith ("Solver `" ^ identifier ^ "' already register...
e6357b1c2ad8d52fdb0570fdb5946234d28b3d9d4fa647e7fc485795c20b3b23
casperschipper/ocaml-cisp
cisp5.ml
open Cisp open Midi let euclidTrigger = Euclid.euclidTrigger let encode = Euclid.encode let map = Seq.map (* extract properties from input *) let midiReader = let ( let* ) x f = Reader.bind f x in let* trigger = MidiState.boolFromNote in Reader.return trigger let sequenced pat = let init = pat in let f ...
null
https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/examples/cisp_backup/cycle_2021/cisp5.ml
ocaml
extract properties from input
open Cisp open Midi let euclidTrigger = Euclid.euclidTrigger let encode = Euclid.encode let map = Seq.map let midiReader = let ( let* ) x f = Reader.bind f x in let* trigger = MidiState.boolFromNote in Reader.return trigger let sequenced pat = let init = pat in let f state = match state () with ...
3dde43f9f42f7795f80f0f48ce156bbd6af023aefb756e35d22f5b8a08419297
ha-mo-we/Racer
copy-support.lisp
-*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : RACER ; Base : 10 -*- Copyright ( c ) 1998 - 2014 , , , . ;;; All rights reserved. Racer is distributed under the following BSD 3 - clause license ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are p...
null
https://raw.githubusercontent.com/ha-mo-we/Racer/d690841d10015c7a75b1ded393fcf0a33092c4de/source/copy-support.lisp
lisp
Syntax : Ansi - Common - Lisp ; Package : RACER ; Base : 10 -*- All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of c...
Copyright ( c ) 1998 - 2014 , , , . Racer is distributed under the following BSD 3 - clause license Neither the name Racer nor the names of its contributors may be used CONTRIBUTORS " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , VOLKER HAARSLEV , RALF MOELLER , NOR FOR ANY ...
4a224122f7cb38b3cab0cffa9ef2adee77f2a1ac1d933005c27ec1c7eb0724ab
julienXX/clj-slack
chat.clj
(ns clj-slack.chat (:refer-clojure :exclude [update]) (:require [clj-slack.core :refer [slack-request slack-post-request stringify-keys]] [clojure.data.json :refer [write-str]])) (defn- serialize-option [option-key options] (let [option-value (option-key options)] (if (and option-value (not (stri...
null
https://raw.githubusercontent.com/julienXX/clj-slack/ff5649161646f11dd8d52d1315c0e74dc723eeb7/src/clj_slack/chat.clj
clojure
(ns clj-slack.chat (:refer-clojure :exclude [update]) (:require [clj-slack.core :refer [slack-request slack-post-request stringify-keys]] [clojure.data.json :refer [write-str]])) (defn- serialize-option [option-key options] (let [option-value (option-key options)] (if (and option-value (not (stri...
722fb09696c399afe2abe827fcfae32d34a0b185ba8b18d9fc5c3e0827791123
ocsigen/js_of_ocaml
test3.ml
(* TEST *) open Effect open Effect.Deep type _ t += E : unit t exception X let () = Printf.printf "%d\n%!" @@ match_with (fun () -> Printf.printf "in handler. raising X\n%!"; raise X) () { retc = (fun v -> v); exnc = (function | X -> 10 | e -> raise e); effc = (fun (type ...
null
https://raw.githubusercontent.com/ocsigen/js_of_ocaml/3a615d693b213140ea8e5c43d5bbe99569bc898d/compiler/tests-ocaml/lib-effects/test3.ml
ocaml
TEST
open Effect open Effect.Deep type _ t += E : unit t exception X let () = Printf.printf "%d\n%!" @@ match_with (fun () -> Printf.printf "in handler. raising X\n%!"; raise X) () { retc = (fun v -> v); exnc = (function | X -> 10 | e -> raise e); effc = (fun (type a) (e : a t)...
c08421d884f1d7abf2cb73d628b56d2d0a4869d14610c1fa4dd1e43e3677765c
clash-lang/clash-compiler
Leak.hs
# LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # module Clash.GHCi.Leak ( LeakIndicators , getLeakIndicators , checkLeakIndicators ) where import Control.Monad import GHC import Outputable import HscTypes import UniqDFM import System.Mem import System.Mem.Weak Checking for space leaks in GHCi . See # 1...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/clash-ghc/src-bin-861/Clash/GHCi/Leak.hs
haskell
-fghci-leak-check flag. | Grab weak references to some of the data structures representing the currently loaded modules. `getLeakIndicators`, and print messasges if any of them are still alive.
# LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # module Clash.GHCi.Leak ( LeakIndicators , getLeakIndicators , checkLeakIndicators ) where import Control.Monad import GHC import Outputable import HscTypes import UniqDFM import System.Mem import System.Mem.Weak Checking for space leaks in GHCi . See # 1...
b0122b7c1dd8cbca11b926e0a249c4bc237f341119fecc38318e8bea4d6103b2
roburio/dns-secondary
unikernel.ml
( c ) 2017 , 2018 , all rights reserved module Main (R : Mirage_random.S) (P : Mirage_clock.PCLOCK) (M : Mirage_clock.MCLOCK) (T : Mirage_time.S) (S : Tcpip.Stack.V4V6) = struct module D = Dns_server_mirage.Make(P)(M)(T)(S) let start _rng _pclock _mclock _ s = let keys = List.fold_left (fun acc str -> ...
null
https://raw.githubusercontent.com/roburio/dns-secondary/dc6158ba988117c32a37ee6a0cbcabb075508b02/unikernel.ml
ocaml
( c ) 2017 , 2018 , all rights reserved module Main (R : Mirage_random.S) (P : Mirage_clock.PCLOCK) (M : Mirage_clock.MCLOCK) (T : Mirage_time.S) (S : Tcpip.Stack.V4V6) = struct module D = Dns_server_mirage.Make(P)(M)(T)(S) let start _rng _pclock _mclock _ s = let keys = List.fold_left (fun acc str -> ...
c54bbb55202fae7500b154e4978c41284ba5cfe088da255a5ee12d3ba0f05687
alanz/ghc-exactprint
TH_spliceD2.hs
# LANGUAGE TemplateHaskell # module TH_spliceD2 where import qualified TH_spliceD2_Lib $( [d| data T = T TH_spliceD2_Lib.T |] )
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc86/TH_spliceD2.hs
haskell
# LANGUAGE TemplateHaskell # module TH_spliceD2 where import qualified TH_spliceD2_Lib $( [d| data T = T TH_spliceD2_Lib.T |] )
7ffe29d2b79a078727adbbc30f18e10d99e5039a4d68b495fd9c0a5d61826230
stackbuilders/dotenv-hs
ParseSpec.hs
# OPTIONS_GHC -fno - warn - orphans # module Configuration.Dotenv.ParseSpec (main, spec) where import Configuration.Dotenv.Parse (configParser) import Configuration.Dotenv.ParsedVariable (ParsedVariable(..), VarValue(..), VarFragm...
null
https://raw.githubusercontent.com/stackbuilders/dotenv-hs/cca92ab12dd6ed6bfa78f1e069b83b81286fead3/spec/Configuration/Dotenv/ParseSpec.hs
haskell
# OPTIONS_GHC -fno - warn - orphans # module Configuration.Dotenv.ParseSpec (main, spec) where import Configuration.Dotenv.Parse (configParser) import Configuration.Dotenv.ParsedVariable (ParsedVariable(..), VarValue(..), VarFragm...
71f9a3bd07d9997d2926cd2e8caf1584eb7005524b26588d3ae5e73a1a978bf0
ajhc/ajhc
IORef.hs
import Data.IORef fact :: Int -> IO Int fact n = do ref <- newIORef 1 let f 1 = return () f n = modifyIORef ref (n*) >> f (n - 1) f n readIORef ref main = do r <- fact 5 putStrLn (replicate r 'x')
null
https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/regress/tests/3_io/IORef.hs
haskell
import Data.IORef fact :: Int -> IO Int fact n = do ref <- newIORef 1 let f 1 = return () f n = modifyIORef ref (n*) >> f (n - 1) f n readIORef ref main = do r <- fact 5 putStrLn (replicate r 'x')
36d1aaa32068e49a368d935e8820c26ba9ba20ef5e9862003a3eae9188e44f38
effectfully/prefolds
Stepper.hs
# LANGUAGE FlexibleInstances , MultiParamTypeClasses # {-# LANGUAGE RankNTypes, ExistentialQuantification, NoImplicitPrelude #-} module Stepper where import Lib import Data.Strict.Tuple import Data.Strict.Drive class (Functor (t m), Functor (s m), Monad m) => TransPairing t s m where interpretT :: (m a -> m b -> m ...
null
https://raw.githubusercontent.com/effectfully/prefolds/c0a31f6a7e3d6e8a6f8ae28b152e8a03c75b48f3/src/Experiment/Stepper.hs
haskell
# LANGUAGE RankNTypes, ExistentialQuantification, NoImplicitPrelude # ~ m (Pair a (Drive acc))
# LANGUAGE FlexibleInstances , MultiParamTypeClasses # module Stepper where import Lib import Data.Strict.Tuple import Data.Strict.Drive class (Functor (t m), Functor (s m), Monad m) => TransPairing t s m where interpretT :: (m a -> m b -> m c) -> t m b -> s m a -> m c data Stepper t m b = forall acc. Stepper (acc...
50c25439d3a979b9ead8da8435c12e855cbeee8417d8c6dd77b332f4b376ad56
zotonic/zotonic
filter_url_abs.erl
@author < > 2020 %% @doc 'url_abs' filter, generates an url with hostname/protocol. Copyright 2020 %% 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 %% %%...
null
https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_base/src/filters/filter_url_abs.erl
erlang
@doc 'url_abs' filter, generates an url with hostname/protocol. 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 i...
@author < > 2020 Copyright 2020 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(filter_url_abs). -export([url_abs/2]). url_abs(undefined, _Context) -> undefined; url_abs(<<>>, Context) -> z_co...
3fb93858db3da5a7a1d0a1305f27017c27bd809179aeca9b794fd0998ee4413c
facebook/pyre-check
revealLocalsTest.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/pyre-check/60fd4b92a6573a4d182baa6debfe38c3807a3614/source/analysis/test/integration/revealLocalsTest.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...
d722123085322e6c99f34806f541b8ed91e3052cb5e8c270c244c05adeb54715
avsm/eeww
example.ml
(* construct atomic variables *) let atomic_1, atomic_2 = (Kcas.ref 0, Kcas.ref 3) in construct kcas operation let kcas = [ Kcas.mk_cas atomic_1 0 1; Kcas.mk_cas atomic_2 3 4 ] in apply constructed kcas ignore (Kcas.kCAS kcas); atomic_1 = 1 , atomic_2 = 4 assert (Kcas.get atomic_1 = 1); assert (Kcas.get atomic...
null
https://raw.githubusercontent.com/avsm/eeww/a316137bc7550870c9fd0c6a907d87e9d9810ae4/lib/kcas/test/example.ml
ocaml
construct atomic variables
let atomic_1, atomic_2 = (Kcas.ref 0, Kcas.ref 3) in construct kcas operation let kcas = [ Kcas.mk_cas atomic_1 0 1; Kcas.mk_cas atomic_2 3 4 ] in apply constructed kcas ignore (Kcas.kCAS kcas); atomic_1 = 1 , atomic_2 = 4 assert (Kcas.get atomic_1 = 1); assert (Kcas.get atomic_2 = 4)
e1e41e0807e1bab87e3d9b06f85b13283ce8bf307d73b21d031f8aeb14a813b3
ndmitchell/cmdargs
Type.hs
module System.Console.CmdArgs.Explicit.Type where import Control.Arrow import Control.Monad import Data.Char import Data.List import Data.Maybe import Data.Semigroup hiding (Arg) import Prelude -- | A name, either the name of a flag (@--/foo/@) or the name of a mode. type Name = String -- | A help message that goe...
null
https://raw.githubusercontent.com/ndmitchell/cmdargs/7c206f464fa666b2654ae9da59cdff44e310de66/System/Console/CmdArgs/Explicit/Type.hs
haskell
| A name, either the name of a flag (@--/foo/@) or the name of a mode. | A help message that goes with either a flag or a mode. | The type of a flag, i.e. @--foo=/TYPE/@. ------------------------------------------------------------------- UTILITY ------------------------------------------------------------------- ...
module System.Console.CmdArgs.Explicit.Type where import Control.Arrow import Control.Monad import Data.Char import Data.List import Data.Maybe import Data.Semigroup hiding (Arg) import Prelude type Name = String type Help = String type FlagHelp = String | Parse a boolean , accepts as True : true yes on enab...
7cf5ea0e572eca21de0e06299580af3600798f752190e324859775c0e21e939a
rbkmoney/genlib
genlib_range.erl
-module(genlib_range). %% @doc Module for working with number sequences (like lists:seq/2,3), %% but more efficiently (i.e. without generating a list of numbers) %% %% Supports both forward- and backward-ranges (increasing and decreasing respectively) -export([map/2]). -export([foldl/3]). -export([to_list/1]). -type...
null
https://raw.githubusercontent.com/rbkmoney/genlib/2bbc54d4abe0f779d57c8f5911dce64d295b1cd1/src/genlib_range.erl
erlang
@doc Module for working with number sequences (like lists:seq/2,3), but more efficiently (i.e. without generating a list of numbers) Supports both forward- and backward-ranges (increasing and decreasing respectively) @doc Map over range @doc Convert range to list Somewhat similar to lists:seq/2,3, but covers all...
-module(genlib_range). -export([map/2]). -export([foldl/3]). -export([to_list/1]). -type bound() :: integer(). -type step() :: neg_integer() | pos_integer(). -type t() :: {bound(), bound()} | {bound(), bound(), step()}. -define(IS_RANGE(R), ((is_integer(element(1, R))) andalso (is_integer(element(2, R))...
4a52019b7b9a0e741b98db5f3cf7a6855819e5d52494c8e8aa178826bc750cd5
exoscale/clojure-kubernetes-client
authentication_v1.clj
(ns clojure-kubernetes-client.api.authentication-v1 (:require [clojure-kubernetes-client.core :refer [call-api check-required-params with-collection-format *api-context*]] [clojure.spec.alpha :as s] [spec-tools.core :as st] [orchestra.core :refer [defn-spec]] [clojure-k...
null
https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/api/authentication_v1.clj
clojure
(ns clojure-kubernetes-client.api.authentication-v1 (:require [clojure-kubernetes-client.core :refer [call-api check-required-params with-collection-format *api-context*]] [clojure.spec.alpha :as s] [spec-tools.core :as st] [orchestra.core :refer [defn-spec]] [clojure-k...
d4eb7d8c193f3d09aa988765cc4c402be32bb325cc61b931785ae3b5b1f86947
realworldocaml/book
html_output.ml
open! Core open! Import module Unix = Core_unix include Patdiff_kernel.Html_output.Private.Make (struct let mtime file = let%map.Or_error stats = Or_error.try_with (fun () -> Unix.stat (File_name.real_name_exn file)) in stats.st_mtime |> Time.Span.of_sec |> Time.of_span_since_epoch ;;...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/patdiff/lib/src/html_output.ml
ocaml
open! Core open! Import module Unix = Core_unix include Patdiff_kernel.Html_output.Private.Make (struct let mtime file = let%map.Or_error stats = Or_error.try_with (fun () -> Unix.stat (File_name.real_name_exn file)) in stats.st_mtime |> Time.Span.of_sec |> Time.of_span_since_epoch ;;...
be985aa213dcfcf8172e3c427b4bb9396cd490ef76848954ea421adcf863affa
UU-ComputerScience/uhc
Minimal1.hs
{- ---------------------------------------------------------------------------------------- -- what : minimal program, no type sig for main -- expected: all ok ---------------------------------------------------------------------------------------- -} module Main where main = return ()
null
https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/99/Minimal1.hs
haskell
---------------------------------------------------------------------------------------- -- what : minimal program, no type sig for main -- expected: all ok ----------------------------------------------------------------------------------------
module Main where main = return ()
9cc16353d92f2fcef7293e5a738bc4fcb65fbd59adcdf06860fd9a2f101b86b7
billstclair/trubanc-lisp
test.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - FAD - TEST ; Base : 10 -*- $ Header : /usr / local / cvsrep / cl - fad / test.lisp , v 1.11 2008/03/12 00:10:43 edi Exp $ Copyright ( c ) 2004 - 2008 , Dr. . All rights reserved . ;;; Redistribution and use in source and binary forms, with or without...
null
https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/cl-fad-0.6.2/test.lisp
lisp
Syntax : COMMON - LISP ; Package : CL - FAD - TEST ; Base : 10 -*- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions a...
$ Header : /usr / local / cvsrep / cl - fad / test.lisp , v 1.11 2008/03/12 00:10:43 edi Exp $ Copyright ( c ) 2004 - 2008 , Dr. . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , (in-package #:...
58e7c5859a430962c3605c5b2436458c16926a812e679aac358b38d62f5c8dca
AvramRobert/omnia
view.clj
(ns omnia.repl.view (:require [schema.core :as s] [omnia.repl.text :as t] [omnia.util.arithmetic :refer [++ -- mod*]] [omnia.util.collection :refer [bounded-subvec assoc-new]] [omnia.schema.view :refer [View]] [omnia.schema.common :refer [Point Region]] ...
null
https://raw.githubusercontent.com/AvramRobert/omnia/af515fb75d7492251436a3d844c0616c82d4eee0/src/omnia/repl/view.clj
clojure
the top viewable y the lower viewable y we've changed the terminal size we've not exceeded the fov we've gotten bigger but we're still at the bottom we've changed in size we've exceeded the upper bound we've exceeded the lower bound
(ns omnia.repl.view (:require [schema.core :as s] [omnia.repl.text :as t] [omnia.util.arithmetic :refer [++ -- mod*]] [omnia.util.collection :refer [bounded-subvec assoc-new]] [omnia.schema.view :refer [View]] [omnia.schema.common :refer [Point Region]] ...
f2a47762de33469a69c960bfcc59ab51ae54ee1c3c514068bd5352ac2edfd8f1
paurkedal/viz
cst_types.ml
Copyright ( C ) 2010 - -2016 Petter A. Urkedal < > * * This file is part of the Viz Compiler < / > . * * The Viz Compiler is free software : you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation , either version...
null
https://raw.githubusercontent.com/paurkedal/viz/ab1f1071fafdc51eae69185ec55d7a6e7bb94ea9/camlviz/cst_types.ml
ocaml
These type definitions are kept in a separate file without an interface file * to avoid duplicating all the constructor cases.
Copyright ( C ) 2010 - -2016 Petter A. Urkedal < > * * This file is part of the Viz Compiler < / > . * * The Viz Compiler is free software : you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation , either version...
fb18c91dd2d3fe3d1e2b9103bd08d934161d5ae6e97ba73a751355d9192eeb25
ohua-dev/ohua-core
Refs.hs
module Ohua.ParseTools.Refs where import Ohua.Prelude import Ohua.ALang.Lang ohuaLangNS :: NSRef ohuaLangNS = makeThrow ["ohua", "lang"] mkQualVar :: NSRef -> Binding -> Expr mkQualVar ns name0 = PureFunction (QualifiedBinding ns name0) Nothing mkOhuaLangRef :: Binding -> Expr mkOhuaLangRef = mkQualVar ohuaLangNS ...
null
https://raw.githubusercontent.com/ohua-dev/ohua-core/978fa3369922f86cc3fc474d5f2c554cc87fd60a/core/src/Ohua/ParseTools/Refs.hs
haskell
module Ohua.ParseTools.Refs where import Ohua.Prelude import Ohua.ALang.Lang ohuaLangNS :: NSRef ohuaLangNS = makeThrow ["ohua", "lang"] mkQualVar :: NSRef -> Binding -> Expr mkQualVar ns name0 = PureFunction (QualifiedBinding ns name0) Nothing mkOhuaLangRef :: Binding -> Expr mkOhuaLangRef = mkQualVar ohuaLangNS ...
f70ec1d570a04ae80b242aa49ac83a54e5e04ca4777f9cd7432fd48ef5eb59d8
babashka/nbb
load_file_test.cljs
(ns load-file-test (:require [nbb.core :refer [load-file *file*]])) (def f *file*) (.then (load-file "test-scripts/loaded_by_load_file_test.cljs") (fn [m] (assoc m :load-file-test-file-dyn-var f)))
null
https://raw.githubusercontent.com/babashka/nbb/2c9b5478ed67c3c9258ef40c50e2eb2b12b641fe/test-scripts/load_file_test.cljs
clojure
(ns load-file-test (:require [nbb.core :refer [load-file *file*]])) (def f *file*) (.then (load-file "test-scripts/loaded_by_load_file_test.cljs") (fn [m] (assoc m :load-file-test-file-dyn-var f)))
2ebe0f2d00e9da5aac8411e1f429ed4d8109ebb52137620897639d4ffbfe0738
distrap/gcodehs
Ann.hs
# LANGUAGE DeriveFunctor # module Data.GCode.Ann ( Ann(..) , stripAnnotation ) where Type for annotating ` Code ` or ` Canon ` with source positions . Type for annotating `Code` or `Canon` with source positions. -} data Ann a = SrcLine Integer a deriving (Show, Eq, Ord, Functor) stripAnnotation :: An...
null
https://raw.githubusercontent.com/distrap/gcodehs/8a8dbc66445cff4ce832bb56f42ef03b3215e235/src/Data/GCode/Ann.hs
haskell
# LANGUAGE DeriveFunctor # module Data.GCode.Ann ( Ann(..) , stripAnnotation ) where Type for annotating ` Code ` or ` Canon ` with source positions . Type for annotating `Code` or `Canon` with source positions. -} data Ann a = SrcLine Integer a deriving (Show, Eq, Ord, Functor) stripAnnotation :: An...
2d1386fdc320f68b555ae42ca0c059f446150f741a0fba51f13b68814c4e74cf
ulyssesdotcodes/oscillare
Server.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE ViewPatterns # module Server where import Control.Concurrent (forkIO, killThread) import Control.Monad import Data.Aeson import GHC.Generics import Language.Haskell.Interpreter import Langu...
null
https://raw.githubusercontent.com/ulyssesdotcodes/oscillare/b764ae4352c85f00131b5c585fb8774b6d3cb0d8/src/Server.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveAnyClass #
# LANGUAGE LambdaCase # # LANGUAGE DeriveGeneric # # LANGUAGE ViewPatterns # module Server where import Control.Concurrent (forkIO, killThread) import Control.Monad import Data.Aeson import GHC.Generics import Language.Haskell.Interpreter import Language.Haskell.Interpreter.Unsafe import Network (listenOn, withSocket...
f20d7605747016684d84ec24ca21ce4b3843618b5045c851f9d5fc832372df48
Copilot-Language/copilot-language
Ord.hs
-------------------------------------------------------------------------------- Copyright © 2011 National Institute of Aerospace / Galois , Inc. -------------------------------------------------------------------------------- {-# LANGUAGE Safe #-} -- | Comparison operators applied point-wise on streams. module Cop...
null
https://raw.githubusercontent.com/Copilot-Language/copilot-language/ea3bb24bc02079d2b96be9e55c73cae7430fca2f/src/Copilot/Language/Operators/Ord.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ # LANGUAGE Safe # | Comparison operators applied point-wise on streams. ------------------------------------------------------------------------------ The outp...
Copyright © 2011 National Institute of Aerospace / Galois , Inc. module Copilot.Language.Operators.Ord ( (<=) , (>=) , (<) , (>) ) where import Copilot.Core (Typed, typeOf) import qualified Copilot.Core as Core import Copilot.Language.Prelude import Copilot.Language.Stream import qualified Prelude as P ...
f1efbfb658565c61f148027b567c474ad88c9597b18d976135d43ca68e2beaa0
elastic/eui-cljs
json_popover_content.cljs
(ns eui.json-popover-content (:require ["@elastic/eui/lib/components/datagrid/body/data_grid_cell_popover.js" :as eui])) (def JsonPopoverContent eui/JsonPopoverContent) (def DataGridCellPopoverContext eui/DataGridCellPopoverContext) (def DefaultCellPopover eui/DefaultCellPopover) (def useCellPopover eui/useCellPo...
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/json_popover_content.cljs
clojure
(ns eui.json-popover-content (:require ["@elastic/eui/lib/components/datagrid/body/data_grid_cell_popover.js" :as eui])) (def JsonPopoverContent eui/JsonPopoverContent) (def DataGridCellPopoverContext eui/DataGridCellPopoverContext) (def DefaultCellPopover eui/DefaultCellPopover) (def useCellPopover eui/useCellPo...
83702d2821fdc79187dff18b07aa598007152bdfc2b10af613dfe7bc6f6c9d4e
futurice/haskell-mega-repo
BookInformationResponse.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DerivingVia #-} # LANGUAGE InstanceSigs # # LANGUAGE TemplateHaskell # {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module Futurice.App.Library.Types.BookInformationResponse where import Futurice.App.Sisosota.Types (ContentHash) import Futurice...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/library-app/src/Futurice/App/Library/Types/BookInformationResponse.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DerivingVia # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators #
# LANGUAGE InstanceSigs # # LANGUAGE TemplateHaskell # module Futurice.App.Library.Types.BookInformationResponse where import Futurice.App.Sisosota.Types (ContentHash) import Futurice.Generics import Futurice.Prelude import Prelude () import Futurice.App.Library.Types.BookInformation import Futurice.App.Library.T...
bea2e5cbcb2ef0aac0afd82e7fc62e00e82ebf8cc009405878af42156dba22a9
sethtrain/clj-twilio
core.clj
(ns twilio.test.twiml.core (:use [twilio.twiml.core] :reload) (:use [clojure.test] [twilio.twiml.voice])) (deftest test-single-verb (is (= (hangup) [:Hangup]))) (deftest test-simple-verb (is (= (record) (record {}))) (is (= (record {:timeout 1}) [:Record {:timeout 1}]))) ...
null
https://raw.githubusercontent.com/sethtrain/clj-twilio/924b2aab51f543611dc37022f7c0e82b677ee521/test/twilio/test/twiml/core.clj
clojure
(ns twilio.test.twiml.core (:use [twilio.twiml.core] :reload) (:use [clojure.test] [twilio.twiml.voice])) (deftest test-single-verb (is (= (hangup) [:Hangup]))) (deftest test-simple-verb (is (= (record) (record {}))) (is (= (record {:timeout 1}) [:Record {:timeout 1}]))) ...
7c14767ea71e0a16884bd5087945ebe36fb762266ee6462d1e9fced220264461
ivg/x86-lifter
decode.ml
open Core_kernel.Std open Bap.Std open Opcode module Dis = Disasm_expert.Basic let decode_any read insn = Option.try_with (fun () -> read (Sexp.of_string (Dis.Insn.name insn))) let opcode = decode_any t_of_sexp let prefix = decode_any prefix_of_sexp
null
https://raw.githubusercontent.com/ivg/x86-lifter/52254f2ab6fb5648af56959a1c7b7f901f608e89/decode.ml
ocaml
open Core_kernel.Std open Bap.Std open Opcode module Dis = Disasm_expert.Basic let decode_any read insn = Option.try_with (fun () -> read (Sexp.of_string (Dis.Insn.name insn))) let opcode = decode_any t_of_sexp let prefix = decode_any prefix_of_sexp
10720dea03db815a0b23ced7ea68031566f851b43b707e1c5c278dc91f2fb60e
qfpl/reflex-workshop
Counter.hs
| Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation License : : Stability : experimental Portability : non - portable Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation License : BSD3 Maintainer : Stability : experi...
null
https://raw.githubusercontent.com/qfpl/reflex-workshop/244ef13fb4b2e884f455eccc50072e98d1668c9e/src/Solutions/Behaviors/Creating/Counter.hs
haskell
| Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation License : : Stability : experimental Portability : non - portable Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation License : BSD3 Maintainer : Stability : experi...
478819c3f46edccaf90094d00235ce97fc58d24c052f70b0bf15ed78e3238f3b
ml4tp/tcoq
tactics.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/tactics/tactics.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * [intro_avoiding idl] acts as intro...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Loc open Names open Term...
490d1250fd4ab1cdf450727fd3dcf8adf7aaa55113873f5ac1261b0079e4a544
kit-ty-kate/visitors
expr05.ml
open Expr02 let equal : expr -> expr -> bool = VisitorsRuntime.wrap2 (new iter2 # visit_expr ())
null
https://raw.githubusercontent.com/kit-ty-kate/visitors/fc53cc486178781e0b1e581eced98e07facb7d29/test/expr05.ml
ocaml
open Expr02 let equal : expr -> expr -> bool = VisitorsRuntime.wrap2 (new iter2 # visit_expr ())
f5eadb2419776eac47e985f7a8615e6017e6d58f328fa34e7b9ca68ec42bbeba
refuge/cowdb
cowdb_log_tests.erl
%%-*- mode: erlang -*- %% 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(cowdb_log_tests). -include("cowdb_tests.hrl"). -define(setup(F), {setup, fun setup/0, fun teardown/1, F})...
null
https://raw.githubusercontent.com/refuge/cowdb/40d72119a59407c7dddc140443b518a90338e347/test/cowdb_log_tests.erl
erlang
-*- mode: erlang -*-
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(cowdb_log_tests). -include("cowdb_tests.hrl"). -define(setup(F), {setup, fun setup/0, fun teardown/1, F}). -define(foreach(Fs), {forea...
7914cc7665f7b1f8ce30501abe36455b8b48717d840b69dc1adc16b9b886819b
tjammer/schmu
env.mli
open Types type key = string type label = { index : int; typename : Path.t } type t type imported = string * [ `C | `Schmu ] type value = { typ : typ; param : bool; const : bool; global : bool; imported : imported option; mut : bool; } type warn_kind = Unused | Unmutated | Unused_mod type unused = (unit,...
null
https://raw.githubusercontent.com/tjammer/schmu/7f179e93ff88ef7d3509d73a56db066cf3fa145f/lib/typing/env.mli
ocaml
return type for values * Default value, everything is false * [add_value key value loc] add value [key] defined at [loc] with type [typ] to env * like [add_value], but keeps track of external declarations * To give the generalized type with closure for functions * [add record record_name ~param ~labels env] retur...
open Types type key = string type label = { index : int; typename : Path.t } type t type imported = string * [ `C | `Schmu ] type value = { typ : typ; param : bool; const : bool; global : bool; imported : imported option; mut : bool; } type warn_kind = Unused | Unmutated | Unused_mod type unused = (unit,...
cdb6a5c80b278f8077fbd334105f9ef8794856121b4ed3f0e957b94fea24b9d5
locusmath/locus
impl.clj
(ns locus.variety.projective.impl (:require [locus.set.logic.core.set :refer :all] [locus.set.mapping.general.core.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.quiver.structure.core.protocols :refer :all] [locus.set.copresheaf.structu...
null
https://raw.githubusercontent.com/locusmath/locus/b232579217be4e39458410893827a84d744168e4/src/clojure/locus/variety/projective/impl.clj
clojure
A projective variety much like an affine variety is determined by a set of polynomials. However, in this case, the projective variety should be determined by a set of the homogeneous polynomials determine a variety in projective space.
(ns locus.variety.projective.impl (:require [locus.set.logic.core.set :refer :all] [locus.set.mapping.general.core.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.quiver.structure.core.protocols :refer :all] [locus.set.copresheaf.structu...
9f9bc6fd9d8b71804e488d0f0f460e9cace1c2f4e1a9e514c15f1d1b6d8c5309
OCamlPro/ocplib-resto
restoDirectory.mli
(**************************************************************************) (* ocplib-resto *) Copyright ( C ) 2016 , OCamlPro . (* *) (* All r...
null
https://raw.githubusercontent.com/OCamlPro/ocplib-resto/9c84b7432cee499a2057e372c4d619daeb0b9d6a/src/restoDirectory.mli
ocaml
************************************************************************ ocplib-resto All rights reserved. This file is distributed under the terms special exception on lin...
Copyright ( C ) 2016 , OCamlPro . of the GNU Lesser General Public License version 2.1 , with the open Resto module Answer : sig type 'a answer = { code : int ; body : 'a output ; } and 'a output = | Empty | Single of 'a | Stream o...
c394dec2c474455ebcb7b610b3f99a41b1ff3471013ab864a22ec34041895f0d
eltex-ecss/pt_scripts
pt_record_properties.erl
%%%---------------------------------------------------------------------------- @author platinumthinker < > %%% @doc %%% Add several function in module: all_records returned list all name records defined for this module . %%% properties returned list strings property composed from record name and %%% propert...
null
https://raw.githubusercontent.com/eltex-ecss/pt_scripts/c05a0c67608f67a5e0bd23324ba0386f27186342/src/pt_record_properties.erl
erlang
---------------------------------------------------------------------------- @doc Add several function in module: properties returned list strings property composed from record name and property name. Supports custom attributes: -include_records([record_a, record_b]). -exclude_records([record_c]). List re...
@author platinumthinker < > all_records returned list all name records defined for this module . -module(pt_record_properties). -include_lib("pt_lib/include/pt_error_macro.hrl"). -include_lib("pt_lib/include/pt_lib.hrl"). -include_lib("pt_scripts/include/pt_recompilable.hrl"). -export([ parse_transform/2,...
fbac839a2c94f27320a22c3128074883ce07889891fd7b61af32d35aee746786
ghc/ghc
ExtraObj.hs
----------------------------------------------------------------------------- -- GHC Extra object linking code -- ( c ) The GHC Team 2017 -- ----------------------------------------------------------------------------- module GHC.Linker.ExtraObj ( mkExtraObj , mkExtraObjToLinkIntoBinary , mkNoteObjsToLink...
null
https://raw.githubusercontent.com/ghc/ghc/37cfe3c0f4fb16189bbe3bb735f758cd6e3d9157/compiler/GHC/Linker/ExtraObj.hs
haskell
--------------------------------------------------------------------------- --------------------------------------------------------------------------- we're compiling C or assembler. When compiling C, we pass the usual set of include directories and PIC flags. When compiling assembler code, we drop the usual C o...
GHC Extra object linking code ( c ) The GHC Team 2017 module GHC.Linker.ExtraObj ( mkExtraObj , mkExtraObjToLinkIntoBinary , mkNoteObjsToLinkIntoBinary , checkLinkInfo , getLinkInfo , getCompilerInfo , ghcLinkInfoSectionName , ghcLinkInfoNoteName , platformSupportsSavingLinkOpts , hav...
faecde2ba768c27df7c1c56c6bbe847be70949945e1d5d9d6ca0a343c5412509
bjorng/wings
wings_light.erl
%% %% wings_light.erl -- %% %% Implementation of lights. %% Copyright ( c ) 2002 - 2011 %% %% See the file "license.terms" for information on usage and redistribution %% of this file, and for a DISCLAIMER OF ALL WARRANTIES. %% %% $Id$ %% -module(wings_light). -export([init/0, init/1, init_opengl/0, loa...
null
https://raw.githubusercontent.com/bjorng/wings/0ebe43abfcb094344c015589d8cd072b643d80ed/src/wings_light.erl
erlang
wings_light.erl -- Implementation of lights. See the file "license.terms" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. $Id$ Light record in We. the light testing macros in wings.hrl. Type. (DO NOT MOVE.) Aim point for spot/infinite. Linear at...
Copyright ( c ) 2002 - 2011 -module(wings_light). -export([init/0, init/1, init_opengl/0, load_env_image/1, light_types/0,menu/3,command/2,is_any_light_selected/1, any_enabled_lights/0,info/1,setup_light/2, create/2,update_dynamic/2,update_matrix/2,update/1, global_lights/1, export/1,export_bc/1,...
775bb869626e9ef6d905d1edae97b1399cd7001d1a5c9335c2c5d7ee2ff19ac7
hzafar/pcf-interpreter
pcf-macro-tests.rkt
#lang racket (require "../../pcf-dynamics.rkt" "../pcf-macro-forms.rkt" rackunit rackunit/log) (check-equal? (val? z) #t) (check-equal? (val? (succ (succ (succ z)))) #t) (check-equal? (val? (lam x (succ (succ x)))) #t) (check-equal? (val? (ap (lam x (succ x)) (succ z))) #f) (check-equal? (step z) 'z) (check-...
null
https://raw.githubusercontent.com/hzafar/pcf-interpreter/313587b2a9b7582c894f6d9953f53cf9cc7cdd67/impl2/tests/pcf-macro-tests.rkt
racket
Simple recursion test
#lang racket (require "../../pcf-dynamics.rkt" "../pcf-macro-forms.rkt" rackunit rackunit/log) (check-equal? (val? z) #t) (check-equal? (val? (succ (succ (succ z)))) #t) (check-equal? (val? (lam x (succ (succ x)))) #t) (check-equal? (val? (ap (lam x (succ x)) (succ z))) #f) (check-equal? (step z) 'z) (check-...
109cebd075b79cbf910c1bb1564b9518bcaf96c6cb138d0f09d13af87b860899
mlabs-haskell/ogmios-datum-cache
Babbage.hs
module Block.Types.Babbage ( TxOut (..), Transaction (..), RawTransaction (..), BlockHeader (..), Block (..), datumsInTxOut, datumsInTransaction, ) where import Data.Aeson (FromJSON (parseJSON), withObject, (.:), (.:?)) import Data.ByteString (ByteString) import Data.Int (Int64) import Data.Map (Map) imp...
null
https://raw.githubusercontent.com/mlabs-haskell/ogmios-datum-cache/201891d9843c951f95bb3ae3c812b8799384bc71/src/Block/Types/Babbage.hs
haskell
module Block.Types.Babbage ( TxOut (..), Transaction (..), RawTransaction (..), BlockHeader (..), Block (..), datumsInTxOut, datumsInTransaction, ) where import Data.Aeson (FromJSON (parseJSON), withObject, (.:), (.:?)) import Data.ByteString (ByteString) import Data.Int (Int64) import Data.Map (Map) imp...
9e21978f97d02da5cf419451710fcf35d4ebf94b32b984b3a182439c6f5c2381
rjray/advent-2020-clojure
day14_test.clj
(ns advent-of-code.day14-test (:require [clojure.test :refer [deftest testing is]] [advent-of-code.day14 :refer [part-1 part-2]] [clojure.java.io :refer [resource]])) (deftest part1 (let [expected 165] (is (= expected (part-1 (slurp (resource "day14-example.txt"))))))) (deftest part2 ...
null
https://raw.githubusercontent.com/rjray/advent-2020-clojure/631b36545ae1efdebd11ca3dd4dca032346e8601/test/advent_of_code/day14_test.clj
clojure
(ns advent-of-code.day14-test (:require [clojure.test :refer [deftest testing is]] [advent-of-code.day14 :refer [part-1 part-2]] [clojure.java.io :refer [resource]])) (deftest part1 (let [expected 165] (is (= expected (part-1 (slurp (resource "day14-example.txt"))))))) (deftest part2 ...
e9fb81fb5d58b08e89db2a83d86c4c80cc7a89041f310719ec3340545c36c8f3
holyjak/minimalist-fulcro-template-backendless
mock_server.cljs
(ns com.example.mock-server "A mock remote for Fulcro that talks to the in-browser Pathom parser Inspired heavily by -developer-guide/blob/master/src/book/book/pathom.cljs" (:require [com.example.pathom :as pathom] [com.fulcrologic.fulcro.algorithms.tx-processing :as txn] [com.fulcrologic.fulcro...
null
https://raw.githubusercontent.com/holyjak/minimalist-fulcro-template-backendless/be1630623191d847e14e8854649d58604ca95f5c/src/com/example/mock_server.cljs
clojure
simulate some network delay, for fun
(ns com.example.mock-server "A mock remote for Fulcro that talks to the in-browser Pathom parser Inspired heavily by -developer-guide/blob/master/src/book/book/pathom.cljs" (:require [com.example.pathom :as pathom] [com.fulcrologic.fulcro.algorithms.tx-processing :as txn] [com.fulcrologic.fulcro...
456fcd6458cf0d2c14d22ae9c4916c3e3fc46e2f324fc7a2bd3128e259aa4366
uwiger/unsplit
unsplit_SUITE.erl
%%% @doc %%% Test suite for unsplit B.V. @author < > -module(unsplit_SUITE). %%% @end -include_lib("eunit/include/eunit.hrl"). %%% Include files -include_lib("common_test/include/ct.hrl"). %%% External exports -compile(export_all). %% -define(ERL_FLAGS, "-kernel dist_auto_connect once -pa ../../ -pa ../../../...
null
https://raw.githubusercontent.com/uwiger/unsplit/43febfcdb56c5ad5d7a3cfa0c260d9fc25026909/test/unsplit_SUITE.erl
erlang
@doc Test suite for unsplit @end Include files External exports -define(ERL_FLAGS, "-kernel dist_auto_connect once -pa ../../ -pa ../../../ebin/"). {ok, HostS} = inet:gethostname(), list_to_atom(HostS).
B.V. @author < > -module(unsplit_SUITE). -include_lib("eunit/include/eunit.hrl"). -include_lib("common_test/include/ct.hrl"). -compile(export_all). -define(ERL_FLAGS, "-kernel dist_auto_connect once"). -define(TABLE, test1). -define(NODES, ['mn1@localhost', 'mn2@localhost']). -define(DISCONNECT_TIME, 4000). -...
e5b653bb223ae46cdb2b6b729adc5a73f6159f7499e62c591aeebc6502a896a0
expipiplus1/vulkan
Extends.hs
{-# language CPP #-} -- No documentation found for Chapter "Extends" module OpenXR.CStruct.Extends ( BaseInStructure(..) , BaseOutStructure(..) , Extends , PeekChain(..) , PokeChain(..) ...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/openxr/src/OpenXR/CStruct/Extends.hs
haskell
# language CPP # No documentation found for Chapter "Extends" # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SO...
module OpenXR.CStruct.Extends ( BaseInStructure(..) , BaseOutStructure(..) , Extends , PeekChain(..) , PokeChain(..) , Chain , Extend...
cad4c2fbc856f2adb6030555ab19ccead2f6558ae4d9cb562923647d7dbfcfea
ijvcms/chuanqi_dev
misc_timer.erl
%%% ------------------------------------------------------------------- %%% Author : ming Description : 时间生成器 %%% Created : 2012 - 12 - 2 %%% ------------------------------------------------------------------- -module(misc_timer). -behaviour(gen_server). %% ---------------------------------------------------------...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/system/timer/misc_timer.erl
erlang
------------------------------------------------------------------- Author : ming ------------------------------------------------------------------- -------------------------------------------------------------------- Include files -------------------------------------------------------------------- ---------...
Description : 时间生成器 Created : 2012 - 12 - 2 -module(misc_timer). -behaviour(gen_server). -export([now/0, now_seconds/0, now_milseconds/0, cpu_time/0, start_link/0, start/1, info/0]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -define(ETS_TIMER, ets_timer). -define...
635fc530a2f73b0e67d4462cfea7b7a490fb06c2d7937f2afd5cb111efea9fce
wh5a/thih
Desugar.hs
------------------------------------------------------------------------------ Copyright : The Hatchet Team ( see file Contributors ) Module : Description : Desugaring of the abstract syntax . The main tasks ...
null
https://raw.githubusercontent.com/wh5a/thih/dc5cb16ba4e998097135beb0c7b0b416cac7bfae/hatchet/Desugar.hs
haskell
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -----------------------------------------------------------------------------} everything (unique int, list of type synoyms) The monadic type defines state prop...
Copyright : The Hatchet Team ( see file Contributors ) Module : Description : Desugaring of the abstract syntax . The main tasks implemented by this module are : - pat...
e86b421fb12a69c523606d7480f9fc802af593b929e19fa2dfca190a05d4ed14
psandahl/hats
Parser.hs
{-# LANGUAGE OverloadedStrings #-} -- | Module : Network . . Message . Copyright : ( c ) 2016 License : MIT Maintainer : < > -- Stability: experimental -- Portability: portable -- -- NATS protocol 'Message' parser. To be used with the " Data . Attoparsec . ByteString " library . modul...
null
https://raw.githubusercontent.com/psandahl/hats/2503edefbda64209d20509b075b3ab90cac39b8d/src/Network/Nats/Message/Parser.hs
haskell
# LANGUAGE OverloadedStrings # | Stability: experimental Portability: portable NATS protocol 'Message' parser. To be used with the | The parsing of the Info message is not performance critical. | Parse a MSG message ... | ... with a reply-to field. | ... and without a reply-to. | Parse a PUB message ... | ...
Module : Network . . Message . Copyright : ( c ) 2016 License : MIT Maintainer : < > " Data . Attoparsec . ByteString " library . module Network.Nats.Message.Parser ( parseMessage ) where import Control.Applicative ((<|>)) import Control.Monad (void) import Data.Attoparsec.Byte...
72792dfd4d2996012fb51b38b53dbd70052ed8ac6a63754a4d3896141dd6d764
nikita-volkov/vector-builder
Builder.hs
module VectorBuilder.Core.Builder where import qualified Data.Vector.Generic as B import qualified Data.Vector.Generic.Mutable as C import qualified VectorBuilder.Core.Update as A import VectorBuilder.Prelude hiding (concat, empty) -- | -- An abstraction over the size of a vector for the process of its construction. ...
null
https://raw.githubusercontent.com/nikita-volkov/vector-builder/83f733476ba99bccbbe1e832b668a3f07b639938/library/VectorBuilder/Core/Builder.hs
haskell
| An abstraction over the size of a vector for the process of its construction. It postpones the actual construction of a vector until the execution of the builder. | Gets the size of a Builder. * Initialisation | Empty builder. # INLINE empty # | Builder of a single element. | Builder from an immutable ve...
module VectorBuilder.Core.Builder where import qualified Data.Vector.Generic as B import qualified Data.Vector.Generic.Mutable as C import qualified VectorBuilder.Core.Update as A import VectorBuilder.Prelude hiding (concat, empty) data Builder element = Builder !Int !(A.Update element) # INLINE size # size :: Bui...
495df40ce111e1a51742459ab9152f09e11c93d05daaf4b487f6acc557db13e4
cwgoes/scisco
Main.hs
module Main where import Control.Concurrent import Control.Monad import Foundation import qualified ABCI.Server as ABCI import qualified Scisco.Core as Scisco main ∷ IO () main = do state ← Scisco.load void $ forkIO $ Scisco.serve ABCI.serve (Scisco.handle state)
null
https://raw.githubusercontent.com/cwgoes/scisco/55b5c94a42d2e99fbd74fa193d9cbaeea525531c/app/Main.hs
haskell
module Main where import Control.Concurrent import Control.Monad import Foundation import qualified ABCI.Server as ABCI import qualified Scisco.Core as Scisco main ∷ IO () main = do state ← Scisco.load void $ forkIO $ Scisco.serve ABCI.serve (Scisco.handle state)