_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
170fe7d3444f59b7e55996de13997cd330757e0d873e786215cd711a6f3c83f5
GlideAngle/flare-timing
Task.hs
module Flight.Gap.Validity.Task (TaskValidity(..)) where import GHC.Generics (Generic) import Data.Typeable (Typeable, typeOf) import "newtype" Control.Newtype (Newtype(..)) import Data.Via.Scientific ( DecimalPlaces(..), deriveDecimalPlaces, deriveJsonViaSci, deriveShowViaSci) | Also called Day Quality . newty...
null
https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/gap-valid/library/Flight/Gap/Validity/Task.hs
haskell
module Flight.Gap.Validity.Task (TaskValidity(..)) where import GHC.Generics (Generic) import Data.Typeable (Typeable, typeOf) import "newtype" Control.Newtype (Newtype(..)) import Data.Via.Scientific ( DecimalPlaces(..), deriveDecimalPlaces, deriveJsonViaSci, deriveShowViaSci) | Also called Day Quality . newty...
303d7dece2a12379b5471c9536389585a7b19d854655f9cead9a0e0c9142559d
ertugrulcetin/ClojureNews
login.cljs
(ns controller.login (:require [ajax.core :as ajax :refer [GET POST PUT]] [cljc.validation :as validation] [reagent.core :as r] [util.view] [util.controller] [view.login])) (declare log-in sign-up) (defn handler [_] (util.view/change-url "/"))...
null
https://raw.githubusercontent.com/ertugrulcetin/ClojureNews/28002f6b620fa4977d561b0cfca0c7f6a635057b/src/cljs/controller/login.cljs
clojure
(ns controller.login (:require [ajax.core :as ajax :refer [GET POST PUT]] [cljc.validation :as validation] [reagent.core :as r] [util.view] [util.controller] [view.login])) (declare log-in sign-up) (defn handler [_] (util.view/change-url "/"))...
9adb008835892c3142f68af281d68da339fc61fe47d255592819e1a8cbc0be14
jxv/dino-rush
Sfx.hs
module DinoRush.Engine.Sfx where data Sfx = Sfx'Jump | Sfx'Point | Sfx'Duck | Sfx'Bird | Sfx'Hurt | Sfx'Lava | Sfx'Quake | Sfx'Rock | Sfx'Recover | Sfx'Stock deriving (Show, Eq)
null
https://raw.githubusercontent.com/jxv/dino-rush/f888bc05fe734ced2c49bec81f9c804b47c81069/library/DinoRush/Engine/Sfx.hs
haskell
module DinoRush.Engine.Sfx where data Sfx = Sfx'Jump | Sfx'Point | Sfx'Duck | Sfx'Bird | Sfx'Hurt | Sfx'Lava | Sfx'Quake | Sfx'Rock | Sfx'Recover | Sfx'Stock deriving (Show, Eq)
23d00336a4ffc5e4205fbd72b6c5fef88519b4b8f1828c13c764a4e0de940b64
pveber/bistro
idr.ml
open Bistro open Bistro.Shell_dsl type 'a format = NarrowPeak | BroadPeak | Bed | Gff let narrowPeak = NarrowPeak let broadPeak = BroadPeak let bed = Bed let gff = Gff type 'a output = [`idr_output of 'a] let string_of_file_format = function | NarrowPeak -> "narrowPeak" | BroadPeak -> "broadPeak" | Bed -> "be...
null
https://raw.githubusercontent.com/pveber/bistro/da0ebc969c8c5ca091905366875cbf8366622280/lib/bio/idr.ml
ocaml
open Bistro open Bistro.Shell_dsl type 'a format = NarrowPeak | BroadPeak | Bed | Gff let narrowPeak = NarrowPeak let broadPeak = BroadPeak let bed = Bed let gff = Gff type 'a output = [`idr_output of 'a] let string_of_file_format = function | NarrowPeak -> "narrowPeak" | BroadPeak -> "broadPeak" | Bed -> "be...
be2dc05b288ba15f3c8caeab4b56cb77874bb1442d91616a476689816d38d6b2
pzque/realword-haskell
Prettify.hs
module Prettify where import Data.Bits (shiftR, (.&.)) import Data.Char (ord) import Numeric (showHex) import SimpleJSON data Doc = Empty | Char Char | Symbol Char | Text String | Line | Concat Doc Doc | Union Doc Doc deriving (Show, Eq...
null
https://raw.githubusercontent.com/pzque/realword-haskell/1da0188a3293fd417740fe12167eebccef4ba626/modules/ch5/Prettify.hs
haskell
----------------------------------------- constructors ----------------------------------------- |construct Doc form double |construct a string literal Doc from a string 将 oneChar 函数应用于字符串的每一个字符,然后把拼接起来的结果放入引号中。 |把一个 Doc 值用起始字符和终止字符包起来 eg: eg: d=Text "a"; hcat [d,d,d] -> Concat (Text "a") (Concat (Text "a") (Te...
module Prettify where import Data.Bits (shiftR, (.&.)) import Data.Char (ord) import Numeric (showHex) import SimpleJSON data Doc = Empty | Char Char | Symbol Char | Text String | Line | Concat Doc Doc | Union Doc Doc deriving (Show, Eq...
0cf8ca76313290acda4c753ba5ef34aecc0d02a32db3ee1a62a7ca30ee199113
nyu-acsys/drift
abstractTransformer.ml
open AbstractDomain open Syntax open SemanticDomain open SemanticsDomain open SensitiveDomain open SenSemantics open Printer open Util open Config * * c[M ] is a single base refinement type that pulls in all the environment dependencies from M M = n1 |- > { v : int | v > = 2 } , n2 |- > z:{v : int | v > = 0 } - > {...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/src/algo/abstractTransformer.ml
ocaml
Create a fresh variable name let _ = alpha_rename_Arys ary1 ary' in let lc_env env1 env2 = Array.fold_left (fun a id -> if Array.mem id a then a else Array.append a [|id|] ) env2 env1 let v1'',_ = prop v1 (proj_V v2 env1)in let _, v2'' = prop (proj_V v1 env2) v2 in * Reset the array nodes * let iterU...
open AbstractDomain open Syntax open SemanticDomain open SemanticsDomain open SensitiveDomain open SenSemantics open Printer open Util open Config * * c[M ] is a single base refinement type that pulls in all the environment dependencies from M M = n1 |- > { v : int | v > = 2 } , n2 |- > z:{v : int | v > = 0 } - > {...
842f9b661fe8be86598dd92d12b573abafa954b363154d173191302afdd25086
arachne-framework/factui
txdata.cljc
(ns factui.impl.txdata "Tools for converting Datomic-style txdata to sets of Clara facts" (:require [factui.facts :as f] [clojure.spec.alpha :as s])) (s/def ::txdata (s/coll-of ::tx-item :min-count 1)) (s/def ::entity-id (s/or :eid pos-int? :tempid any?)) (s/def ::attr-name q...
null
https://raw.githubusercontent.com/arachne-framework/factui/818ea79d7f84dfe80ad23ade0b6b2ed5bb1c6287/src/factui/impl/txdata.cljc
clojure
(ns factui.impl.txdata "Tools for converting Datomic-style txdata to sets of Clara facts" (:require [factui.facts :as f] [clojure.spec.alpha :as s])) (s/def ::txdata (s/coll-of ::tx-item :min-count 1)) (s/def ::entity-id (s/or :eid pos-int? :tempid any?)) (s/def ::attr-name q...
638f43b8e2efcf1c4ef473db2511889055732949ed2687998240cf78ef57cb22
niklasl/clj-rdfa
dom.clj
(ns rdfa.dom) (defprotocol DomAccess (get-name [this]) (get-attr [this attr-name]) (get-ns-map [this]) (is-root? [this]) (find-by-tag [this tag]) (get-child-elements [this]) (get-text [this]) (get-inner-xml [this xmlns-map lang]))
null
https://raw.githubusercontent.com/niklasl/clj-rdfa/5b49a2106bb7ebb2497b156bb27ec479fb4d66ec/src/rdfa/dom.clj
clojure
(ns rdfa.dom) (defprotocol DomAccess (get-name [this]) (get-attr [this attr-name]) (get-ns-map [this]) (is-root? [this]) (find-by-tag [this tag]) (get-child-elements [this]) (get-text [this]) (get-inner-xml [this xmlns-map lang]))
f7a8bb1832c3c7252439abc9a3beaed6e780ace0b5afdb970752cb9c1d82ff31
seek-oss/serverless-haskell
SNSEventSpec.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} module AWSLambda.Events.SNSEventSpec where import AWSLambda.Events.MessageAttribute import AWSLambda.Events.Records import AWSLambda.Events.S3Event import AWSLambda.Events.SNSEvent import Data.Aeso...
null
https://raw.githubusercontent.com/seek-oss/serverless-haskell/dbea96e657e23fd4a3fef03bdf182f060dc2590d/test/AWSLambda/Events/SNSEventSpec.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE QuasiQuotes #
module AWSLambda.Events.SNSEventSpec where import AWSLambda.Events.MessageAttribute import AWSLambda.Events.Records import AWSLambda.Events.S3Event import AWSLambda.Events.SNSEvent import Data.Aeson import Data.Aeson.Embedded import Data.Aeson.Tex...
5bc5644f28a122f96435fb6f6e1086bfd7b02d6cb45f211dbda0dd686f8c8968
wh5a/thih
FoldlCont.hs
myfoldr :: (a -> b -> b) -> b -> [a] -> b myfoldr = \f z xs -> foldrC (\x -> x) f z xs foldrC :: (a -> b) -> (c -> a -> a) -> a -> [c] -> b foldrC = \c f z l -> case l of [] -> c z (:) x xs -> foldrC (\n -> c (f x n)) f z xs main = myfoldr (+) 0 [1,2,3]
null
https://raw.githubusercontent.com/wh5a/thih/dc5cb16ba4e998097135beb0c7b0b416cac7bfae/hatchet/examples/FoldlCont.hs
haskell
myfoldr :: (a -> b -> b) -> b -> [a] -> b myfoldr = \f z xs -> foldrC (\x -> x) f z xs foldrC :: (a -> b) -> (c -> a -> a) -> a -> [c] -> b foldrC = \c f z l -> case l of [] -> c z (:) x xs -> foldrC (\n -> c (f x n)) f z xs main = myfoldr (+) 0 [1,2,3]
fd2f325a4ff4e6f86b943c1d091e6e13c125e35d5d7418d1a59772571a06b382
bishboria/learnyouahaskell
14_knight_moves.hs
import Data.List import Control.Monad type KnightPos = (Int,Int) canReachIn :: Int -> KnightPos -> KnightPos -> Bool canReachIn x start end = end `elem` inMany x start inMany :: Int -> KnightPos -> [KnightPos] inMany x start = return start >>= foldr (<=<) return (replicate x moveKnight) moveKnight :: KnightPos -> [...
null
https://raw.githubusercontent.com/bishboria/learnyouahaskell/d8c7b41398e9672db18c1b1360372fc4a4adefa8/14/14_knight_moves.hs
haskell
False False False True
import Data.List import Control.Monad type KnightPos = (Int,Int) canReachIn :: Int -> KnightPos -> KnightPos -> Bool canReachIn x start end = end `elem` inMany x start inMany :: Int -> KnightPos -> [KnightPos] inMany x start = return start >>= foldr (<=<) return (replicate x moveKnight) moveKnight :: KnightPos -> [...
06d0c2c5e046fb5bd31c8e7ef9417ae56ac000d55d7efe738403ccf74776f5e6
heraldry/heraldicon
quartered.cljs
(ns heraldicon.heraldry.field.type.quartered (:require [heraldicon.context :as c] [heraldicon.heraldry.field.environment :as environment] [heraldicon.heraldry.field.interface :as field.interface] [heraldicon.heraldry.line.core :as line] [heraldicon.heraldry.option.position :as position] [heraldicon....
null
https://raw.githubusercontent.com/heraldry/heraldicon/71126cfd7ba342dea0d1bb849be92cbe5290a6fd/src/heraldicon/heraldry/field/type/quartered.cljs
clojure
(ns heraldicon.heraldry.field.type.quartered (:require [heraldicon.context :as c] [heraldicon.heraldry.field.environment :as environment] [heraldicon.heraldry.field.interface :as field.interface] [heraldicon.heraldry.line.core :as line] [heraldicon.heraldry.option.position :as position] [heraldicon....
9d2f0a5b080c7929e6a04af6c7346cd29594dbfa6017904b41554d495e6e16d3
adamschoenemann/clofrp
Expr.hs
# LANGUAGE DeriveFunctor # {-# LANGUAGE OverloadedStrings #-} module CloFRP.Parser.Expr where import Text.Parsec.Pos import Text.Parsec import Data.List (foldl') import qualified CloFRP.Annotated as A import qualified CloFRP.AST as E import qualified CloFRP.AST.Prim as P import CloFRP.Parser.Lang import...
null
https://raw.githubusercontent.com/adamschoenemann/clofrp/c26f86aec2cdb8fa7fd317acd13f7d77af984bd3/library/CloFRP/Parser/Expr.hs
haskell
# LANGUAGE OverloadedStrings # a bit annoying with all this copy-paste but meh nasty hack to make it behave "infixl" ish
# LANGUAGE DeriveFunctor # module CloFRP.Parser.Expr where import Text.Parsec.Pos import Text.Parsec import Data.List (foldl') import qualified CloFRP.Annotated as A import qualified CloFRP.AST as E import qualified CloFRP.AST.Prim as P import CloFRP.Parser.Lang import qualified CloFRP.Parser.Type as T ...
8dd7aac1ccb77ce96950a35d1a53f6ee1542ba2f63c1931e216f3173916271d3
AndrasKovacs/normalization-bench
Main.hs
module Main where import qualified HOASCBV import qualified HOASCBN import qualified Interp main :: IO () main = do -- putStrLn "HOAS call-by-value" -- putStrLn "----------------------------------------" -- HOASCBV.bench -- putStrLn "HOAS call-by-need" -- putStrLn "------------------------------------...
null
https://raw.githubusercontent.com/AndrasKovacs/normalization-bench/bef02243cc70415ab2ec7a5db823a448b07bf4db/haskell/Main.hs
haskell
putStrLn "HOAS call-by-value" putStrLn "----------------------------------------" HOASCBV.bench putStrLn "HOAS call-by-need" putStrLn "----------------------------------------"
module Main where import qualified HOASCBV import qualified HOASCBN import qualified Interp main :: IO () main = do HOASCBN.bench putStrLn "Interpreted call-by-value" putStrLn "----------------------------------------" Interp.bench
971a8c82621bb4731e0a275bf19d6b0abec502f5be7f3f77680c4ec0003be4de
rabbitmq/erlando
test.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/rabbitmq/erlando/1c1ef25a9bc228671b32b4a6ee30c7525314b1fd/src/test.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is Erlando . The Initial Developer of the Original Code is VMware , Inc. Copyright ( c ) 2011 - 2013 VMware , Inc. All rights reserved . -module(test)....
77d92b6f9bacd5d7e55f8da05f5ad075bd53e1dcff9bbd491c9deefb6a9b2bc8
takikawa/racket-ppa
performance.rkt
#lang racket/base (require racket/private/place-local) (provide performance-region performance-place-init!) ;; To enable measurement, see the end of this file. ;; The expression form ;; ;; (performance-region [key-expr ...] body ....) ;; ;; records the time of `body ...` and associated it with ;; the path...
null
https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/src/expander/common/performance.rkt
racket
To enable measurement, see the end of this file. The expression form (performance-region [key-expr ...] body ....) records the time of `body ...` and associated it with the path `(list key-expr ...)`. Times for a path are included in the times for the path's prefixes, but not for any other path. When regions...
#lang racket/base (require racket/private/place-local) (provide performance-region performance-place-init!) (provide performance-region) (define log-performance? (and (environment-variables-ref (current-environment-variables) #"PLT_EXPANDER_TIM...
ddc27f73c2c48a9debc1f9c159f64e3f77e0f69742ada9316d7dda25a71f1d9b
haroldcarr/learn-haskell-coq-ml-etc
X02.hs
# LANGUAGE NoImplicitPrelude # module X02 where import Protolude -- /#phantom-types newtypes to distinguish between plaintext and newtype PlaintextNT = PlaintextNT Text newtype CryptotextNT = CryptotextNT Text data Key = Key encryptNT :: Key -> PlaintextNT -> CryptotextNT decryptNT :: Key -> Cryp...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/phantoms/hc-phantom/src/X02.hs
haskell
/#phantom-types via phantom types -XEmptyDataDecls with phantom types that contain no value inhabitants : "anonymous types" {-# LANGUAGE EmptyDataDecls #-} The tagged library defines a similar Tagged newtype wrapper.
# LANGUAGE NoImplicitPrelude # module X02 where import Protolude newtypes to distinguish between plaintext and newtype PlaintextNT = PlaintextNT Text newtype CryptotextNT = CryptotextNT Text data Key = Key encryptNT :: Key -> PlaintextNT -> CryptotextNT decryptNT :: Key -> CryptotextNT -> Plainte...
3b27999508b2fa58e3aa89a97c631026f7a22b3e7aa64fdd07ddfa221c2ee1ea
bristolpl/intensional-datatys
Constraints.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # {-# LANGUAGE BangPatterns #-} module Self.Constraints ( Guard, singleton, Atomic, Constraint (..), ConstraintSet, insert, guardWith, s...
null
https://raw.githubusercontent.com/bristolpl/intensional-datatys/ce6e7f5069530ea21a3e19c8e9e17fc23dc8e66c/test/Self/Constraints.hs
haskell
# LANGUAGE GADTs # # LANGUAGE BangPatterns # A guard literal happened in InferM.branch) A pair of constructor sets Disregard location in comparison in getAll $ HM.foldMapWithKey Just ks' -> All (GHC.uniqSetAll (`GHC.elementOfUniqSet` ks') ks) ) g' A constraint is trivially...
# LANGUAGE DataKinds # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # module Self.Constraints ( Guard, singleton, Atomic, Constraint (..), ConstraintSet, insert, guardWith, saturate, size ) where import Self.Ubiq import ...
b939fcd33021936f1a4565234d7a461f52e6ddf4e2e0dbbf734dc56e9afe902e
avsm/eeww
tests.ml
let mk_temp_dir () = let rand_num = Random.int 1000000 |> string_of_int in let tmp_dir = Filename.get_temp_dir_name () ^ "/test-cstruct-unix-" ^ rand_num in try Unix.mkdir tmp_dir 0o700; tmp_dir with Unix.Unix_error(Unix.EEXIST, _, _) -> re - use the old one tmp_dir | e -> raise (Sys_error ("Ca...
null
https://raw.githubusercontent.com/avsm/eeww/651d8da20a3cc9e88354ed0c8da270632b9c0c19/lib/cstruct/unix_test/tests.ml
ocaml
non-recursive for safety So we can assert the sender on receiver port
let mk_temp_dir () = let rand_num = Random.int 1000000 |> string_of_int in let tmp_dir = Filename.get_temp_dir_name () ^ "/test-cstruct-unix-" ^ rand_num in try Unix.mkdir tmp_dir 0o700; tmp_dir with Unix.Unix_error(Unix.EEXIST, _, _) -> re - use the old one tmp_dir | e -> raise (Sys_error ("Ca...
34d790053a559a23d9790b95312106062c8ec24496b0c79aac135203ade76a3d
maximedenes/native-coq
proofview.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/proofs/proofview.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** The proofview datastructure is a pu...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Compat Type of proof...
d66fdcd7eebbce321f444f2464e3ef23fc7af3896605a9aa1ed7da78509803f7
alanzplus/EOPL
6.21.rkt
#lang eopl (define list-last-index (lambda (predicate lst) (let helper ([lst lst] [idx 0]) (if (null? lst) #f (let ((res (helper (cdr lst) (+ 1 idx)))) (if res res (if (predicate (car lst)) idx #f))))))) (define cps-of-exps (lambda (exps builder) (le...
null
https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch6/6.21.rkt
racket
#lang eopl (define list-last-index (lambda (predicate lst) (let helper ([lst lst] [idx 0]) (if (null? lst) #f (let ((res (helper (cdr lst) (+ 1 idx)))) (if res res (if (predicate (car lst)) idx #f))))))) (define cps-of-exps (lambda (exps builder) (le...
dc7579a797ab9244a9070ccddb2cc45b62a4e6aac53c7cb6482fa65820922594
ilyasergey/monadic-cfa
MonadCFA.hs
module Main where -- Imports. import CPS import Data.Map as Map import Data.Set as Set -- Abbreviations. type k :-> v = Map.Map k v type ℙ a = Set.Set a (==>) :: a -> b -> (a,b) (==>) x y = (x,y) (//) :: Ord k => (k :-> v) -> [(k,v)] -> (k :-> v) (//) f [] = f (//) f ((x,y):tl) = Map.insert x y (f // tl) -- P...
null
https://raw.githubusercontent.com/ilyasergey/monadic-cfa/caeb9e5375affe9c3cdee0753ae2ba489cdc328a/obsolete/MonadCFA.hs
haskell
Imports. Abbreviations. Partial order theory. (>>=) :: m a -> (a -> m b) -> m b (>>) :: m a -> m b -> m b return :: a -> m a fail :: String -> m a return a >>= k = k a m >>= return = m
module Main where import CPS import Data.Map as Map import Data.Set as Set type k :-> v = Map.Map k v type ℙ a = Set.Set a (==>) :: a -> b -> (a,b) (==>) x y = (x,y) (//) :: Ord k => (k :-> v) -> [(k,v)] -> (k :-> v) (//) f [] = f (//) f ((x,y):tl) = Map.insert x y (f // tl) class Lattice a where bot :: a top ...
b5b1ebe9fba2af3ddb44e22c6b1efef6b468163b584ddb8f3ed49357b8f31563
repl-acement/repl-acement
page_view.cljs
(ns replacement.ui.page-view (:require ["@codemirror/closebrackets" :refer [closeBrackets]] ["@codemirror/fold" :as fold] ["@codemirror/gutter" :refer [lineNumbers]] ["@codemirror/highlight" :as highlight] ["@codemirror/history" :refer [history historyKeymap]] ["@codemirror/state" :refer ...
null
https://raw.githubusercontent.com/repl-acement/repl-acement/2a1c5762ebe6225cd9c53e4ce0413046495ce0d8/repl-ui/replacement/ui/page_view.cljs
clojure
TODO - migrate from random data structures to event protocol data structures Actions: PLAN 4. Finish up with `ns` working with new data structures only show cursor when focused NO !!! Set it in the DB NO !!! Set it in the DB NO !!! Set it in the DB NO!!!! - FFS Write down why next time cos I'm lost dude. And I ...
(ns replacement.ui.page-view (:require ["@codemirror/closebrackets" :refer [closeBrackets]] ["@codemirror/fold" :as fold] ["@codemirror/gutter" :refer [lineNumbers]] ["@codemirror/highlight" :as highlight] ["@codemirror/history" :refer [history historyKeymap]] ["@codemirror/state" :refer ...
05dde625636437389ac6ec6d63a2931fbc8423355bf3b48cde7e08af813796ed
lpeterse/haskell-terminal
TerminalT.hs
# LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module System.Terminal.TerminalT ( TerminalT () , runTerminalT ) where import Control.Monad.Catch import Control.Monad.IO.Class import Control.Monad.STM import Control.Monad.Trans.Class impor...
null
https://raw.githubusercontent.com/lpeterse/haskell-terminal/994602af65e7f038bc387139ec961248760fd6e6/src/System/Terminal/TerminalT.hs
haskell
| This monad transformer represents terminal applications. It implements all classes in this module and should serve as a good foundation for most use cases. Note that it is not necessary nor recommended to have this type in every signature. Keep your application abstract and mention `TerminalT` only once at th...
# LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module System.Terminal.TerminalT ( TerminalT () , runTerminalT ) where import Control.Monad.Catch import Control.Monad.IO.Class import Control.Monad.STM import Control.Monad.Trans.Class impor...
bde3fabb3e5597c45ef070a2f759dd594addc84f57e29743bc12741213a5bcfa
karamellpelle/grid
Helpers.hs
grid is a game written in Haskell Copyright ( C ) 2018 -- -- This file is part of grid. -- -- grid 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 optio...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/source/Game/LevelPuzzle/Helpers.hs
haskell
This file is part of grid. grid is free software: you can redistribute it and/or modify (at your option) any later version. grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN...
grid is a game written in Haskell Copyright ( C ) 2018 it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License module Game.LevelPuzzle.Helpers ( levelpuzzle...
8978d31ac7b7b8af62ee284708a801ab1a0fb173d80392ce7f567525ef39de79
puppetlabs/puppetdb
overrideable_generators_test.clj
(ns puppetlabs.puppetdb.generative.overrideable-generators-test (:require [clojure.test :refer :all] [clojure.test.check.clojure-test :as tc] [clojure.test.check.properties :as prop] [puppetlabs.puppetdb.generative.overridable-generators :as ogen])) (ogen/defgen :test/a ogen/boole...
null
https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/test/puppetlabs/puppetdb/generative/overrideable_generators_test.clj
clojure
(ns puppetlabs.puppetdb.generative.overrideable-generators-test (:require [clojure.test :refer :all] [clojure.test.check.clojure-test :as tc] [clojure.test.check.properties :as prop] [puppetlabs.puppetdb.generative.overridable-generators :as ogen])) (ogen/defgen :test/a ogen/boole...
7800e6b74d04fa1968823a14d461e680803317c4a9889f279ffda37f96188fa9
kaizhang/SciFlow
Async.hs
{-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # | Asynchronous arrows over monads with MonadBaseControl IO , using -- lifted-async. module Control.Arrow.Async where import Control.Arrow import Cont...
null
https://raw.githubusercontent.com/kaizhang/SciFlow/c9d85008e9db598d2addc8fe999e1abad9147e1c/SciFlow/src/Control/Arrow/Async.hs
haskell
# LANGUAGE FlexibleContexts # lifted-async.
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # | Asynchronous arrows over monads with MonadBaseControl IO , using module Control.Arrow.Async where import Control.Arrow import Control.Category import Control.Concurrent.Async.Lif...
c7b8628188b731b85da83ad6a3069ea3d5d02e9e159cb506590089ce2105456b
noinia/hgeometry
Sides.hs
# LANGUAGE TemplateHaskell # -------------------------------------------------------------------------------- -- | -- Module : Geometry.Box.Sides Copyright : ( C ) -- License : see the LICENSE file Maintainer : -------------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/noinia/hgeometry/1205c406f3e7f13a5abee8939ae8b40d2ee2063d/hgeometry/src/Geometry/Box/Sides.hs
haskell
------------------------------------------------------------------------------ | Module : Geometry.Box.Sides License : see the LICENSE file ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ | Const...
# LANGUAGE TemplateHaskell # Copyright : ( C ) Maintainer : module Geometry.Box.Sides ( Sides(Sides), north, east, south, west , topSide, bottomSide, leftSide, rightSide , sides, sides' , sideDirections ) where import Geometry.Directions import Geometry.Box.Internal import Geometry.Box.Co...
bd1af46d32e692e0680ba8a0ec6d4b1e5c65837cafbd7328b722d5ee80449d38
fukamachi/clozure-cl
arm-hash.lisp
-*- Mode : Lisp ; Package : CCL -*- ;;; Copyright ( C ) 2010 Clozure Associates This file is part of Clozure CL . ;;; Clozure CL is licensed under the terms of the Lisp Lesser GNU Public License , known as the LLGPL and distributed with Clozure CL as the ;;; file "LICENSE". The LLGPL consists of ...
null
https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/level-0/ARM/arm-hash.lisp
lisp
Package : CCL -*- file "LICENSE". The LLGPL consists of a preamble and the LGPL, conflict, the preamble takes precedence. Clozure CL is referenced in the preamble as the "LIBRARY." The LLGPL is also available online at ARM;arm - hash.lisp Equivalent to cl:mod when both args are positive fixnums...
Copyright ( C ) 2010 Clozure Associates This file is part of Clozure CL . Clozure CL is licensed under the terms of the Lisp Lesser GNU Public License , known as the LLGPL and distributed with Clozure CL as the which is distributed with Clozure CL as the file " LGPL " . Where these (in-packag...
1e674d4bc864a5f84d3a8d4a2fc6238b22933e78183e997ef9eb8eb16c44ec48
mbj/stratosphere
NotificationTargetItemProperty.hs
module Stratosphere.SSMIncidents.ResponsePlan.NotificationTargetItemProperty ( NotificationTargetItemProperty(..), mkNotificationTargetItemProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourcePr...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/ssmincidents/gen/Stratosphere/SSMIncidents/ResponsePlan/NotificationTargetItemProperty.hs
haskell
module Stratosphere.SSMIncidents.ResponsePlan.NotificationTargetItemProperty ( NotificationTargetItemProperty(..), mkNotificationTargetItemProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourcePr...
8886c677d01b731b22dbd902cf1933a21adde19af00731f161a46100c209d531
michaelballantyne/syntax-spec
peg2.rkt
#lang racket/base (require "../../testing.rkt") (begin-for-syntax (define-syntax-class string (pattern val #:when (string? (syntax-e #'val))))) (syntax-spec (binding-class var #:description "PEG variable") (binding-class nonterm #:description "PEG nonterminal") (extension-class peg-macro #:description "P...
null
https://raw.githubusercontent.com/michaelballantyne/syntax-spec/1eca406e83468601ce7507de25fb036f6ff4d0ff/test/dsls/peg2.rkt
racket
#lang racket/base (require "../../testing.rkt") (begin-for-syntax (define-syntax-class string (pattern val #:when (string? (syntax-e #'val))))) (syntax-spec (binding-class var #:description "PEG variable") (binding-class nonterm #:description "PEG nonterminal") (extension-class peg-macro #:description "P...
26c130d20c9e1b51d978ce68004e052f98cc1974e85f9a7074e9912c460be170
jrm-code-project/LISP-Machine
interpreter-hooks.lisp
-*- Mode : LISP ; Package : USER ; ; : CL -*- ;;; INTERPRETER - HOOKS.LISP ;;; ;;; Let the new interpreter slither into the old evaluator's wake. ;;; (defvar *use-old-evaluator* t) (defvar *inform-user* t) (defun inform-user (stream format-string &rest format-args) (when *inform-user* (apply #'format str...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/rauen/interpreter-hooks.lisp
lisp
Package : USER ; ; : CL -*- Let the new interpreter slither into the old evaluator's wake. (format t "~&Called evalhook.") This variable prevents re-hooking.
INTERPRETER - HOOKS.LISP (defvar *use-old-evaluator* t) (defvar *inform-user* t) (defun inform-user (stream format-string &rest format-args) (when *inform-user* (apply #'format stream format-string format-args))) (defun make-hook-function (old-version new-version) #'(lambda (&rest args) (setq args (...
4e7d93532d84787feb6d8f5e8687ceee1bdf2ad679b19a36957c85c3b4caab6d
kztk-m/sparcl
Eval.hs
# LANGUAGE RecursiveDo # module Language.Sparcl.Eval where import Language.Sparcl.Core.Syntax import Language.Sparcl.Exception import Language.Sparcl.Value import Control.Monad.Except import Data.Maybe (fromMaybe) import Control . Monad . State --...
null
https://raw.githubusercontent.com/kztk-m/sparcl/443724980c52ab8759be3caf803e0cf64dff72f2/src/Language/Sparcl/Eval.hs
haskell
import qualified Control.Monad.Fail as Fail import qualified Control.Monad.Fail as Fail import Debug.Trace (trace) lookupEnvR :: QName -> Env -> Eval Value Nothing -> throwError $ "Undefined value: " ++ show n Just v -> return v f0' _ = error "expecting !" ...
# LANGUAGE RecursiveDo # module Language.Sparcl.Eval where import Language.Sparcl.Core.Syntax import Language.Sparcl.Exception import Language.Sparcl.Value import Control.Monad.Except import Data.Maybe (fromMaybe) import Control . Monad . State ...
2cea5953c525fb41192929f184c2b667aae83a3eefb32f563f561c3c984c3c45
litaocheng/erl-test
client_stat.erl
-module(client_stat). -export([run/0]). -include("tcp_test.hrl"). -define(RECV_TIMEOUT, 100). run() -> N = 10, C = 2, Per = N div C, Server = ?SERVER, Now = now(), Procs = [new_client(self(), Server, Per) || _ <- lists:seq(1, C)], {Satis0, Timeout} = lists:foldl( fun(_E, {SAc...
null
https://raw.githubusercontent.com/litaocheng/erl-test/893679fccb1c16dda45d40d2b9e12d78db991b8a/tcp_test/client_stat.erl
erlang
timer:sleep(random:uniform(1000)), ?P("recv ~p~n", [Packet]), timer:sleep(10),
-module(client_stat). -export([run/0]). -include("tcp_test.hrl"). -define(RECV_TIMEOUT, 100). run() -> N = 10, C = 2, Per = N div C, Server = ?SERVER, Now = now(), Procs = [new_client(self(), Server, Per) || _ <- lists:seq(1, C)], {Satis0, Timeout} = lists:foldl( fun(_E, {SAc...
cd61531f90f82503e7ae90efd5b33c6cb03a2610d6a998e1d2dcf07dbd22ca66
ylgrgyq/resilience-for-clojure
timelimiter.clj
(ns resilience.timelimiter (:refer-clojure :exclude [name]) (:require [resilience.spec :as s] [resilience.util :as u]) (:import (java.time Duration) (io.github.resilience4j.timelimiter TimeLimiterConfig TimeLimiterConfig$Builder TimeLimiter TimeLimiterRegistry) (io.github.resilie...
null
https://raw.githubusercontent.com/ylgrgyq/resilience-for-clojure/7b0532d1c72d416020402c15eb5699143be4b7bf/src/resilience/timelimiter.clj
clojure
(ns resilience.timelimiter (:refer-clojure :exclude [name]) (:require [resilience.spec :as s] [resilience.util :as u]) (:import (java.time Duration) (io.github.resilience4j.timelimiter TimeLimiterConfig TimeLimiterConfig$Builder TimeLimiter TimeLimiterRegistry) (io.github.resilie...
4507104a208ff689ac4af29cb2e5e1b2d9b5b13502dd4cef301d513aa7dc9022
okuoku/nausicaa
make-inspector.sps
;;;!mosh -*- coding : utf-8 - unix -*- ;;; Part of : / Sqlite ;;;Contents: foreign library inspection generator Date : Fri Nov 27 , 2009 ;;; ;;;Abstract ;;; ;;; ;;; Copyright ( c ) 2009 , 2010 < > ;;; ;;;This program is free software: you can redistribute it and/or modify ;;;it under the terms of the GNU Genera...
null
https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/sqlite/make-inspector.sps
scheme
!mosh Contents: foreign library inspection generator Abstract This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ...
-*- coding : utf-8 - unix -*- Part of : / Sqlite Date : Fri Nov 27 , 2009 Copyright ( c ) 2009 , 2010 < > the Free Software Foundation , either version 3 of the License , or ( at General Public License for more details . You should have received a copy of the GNU General Public License (import (nausica...
dbf0753df32565ad3284c17369a578a84e0450aa0e749b6d3ace5a2cbf4f38d7
willowtreeapps/wombats-api
helpers.clj
(ns wombats.daos.helpers (:require [datomic.api :as d])) (defn get-fn "Helper function used to pull the correct dao out of context" [fn-key context] (let [dao-fn (fn-key (:wombats.interceptors.dao/daos context))] (if dao-fn dao-fn (throw (Exception. (str "Dao function " fn-key " was not found i...
null
https://raw.githubusercontent.com/willowtreeapps/wombats-api/738e4cc8d7011998695ec85e663f650be71f60ae/src/wombats/daos/helpers.clj
clojure
(ns wombats.daos.helpers (:require [datomic.api :as d])) (defn get-fn "Helper function used to pull the correct dao out of context" [fn-key context] (let [dao-fn (fn-key (:wombats.interceptors.dao/daos context))] (if dao-fn dao-fn (throw (Exception. (str "Dao function " fn-key " was not found i...
08fcb65f794788236b85e2eaedc8998b7978b65f583e5ca580b1f9707c400639
basho/riak_test
gh_riak_core_176.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2012 Basho Technologies , Inc. %% 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 Li...
null
https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/gh_riak_core_176.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 permissio...
Copyright ( c ) 2012 Basho Technologies , Inc. 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 -module(gh_riak_core_176). -beha...
aa91dd464b287f3634064c2a617bcea24f84682e4560b80e652a373cec892948
fpco/ide-backend
TestSuite.hs
module Main where import Data.Foldable (forM_) import Data.List (isPrefixOf) import System.Process (readProcess) import System.Environment import Test.HUnit import Test.Tasty import IdeSession import TestSuite.State import TestSuite.Tests.API import TestSuite.Tests.Autocompletion import TestSuite.Tests.BufferMode imp...
null
https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/TestSuite.hs
haskell
| Sanity check: make sure we can communicate with the server at all and that we get the expected version Yes, this is hacky, but I couldn't figure out how to easily do this with tasty's API... So, instead of trying to programatically modify the config, we generate arguments. Set GHC_PACKAGE_PATH_TEST, an environ...
module Main where import Data.Foldable (forM_) import Data.List (isPrefixOf) import System.Process (readProcess) import System.Environment import Test.HUnit import Test.Tasty import IdeSession import TestSuite.State import TestSuite.Tests.API import TestSuite.Tests.Autocompletion import TestSuite.Tests.BufferMode imp...
da0320e5973835331139923d61d30e30e9ecd181c5535db124029b784cac9851
crclark/foundationdb-haskell
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Data.ByteString (ByteString) import qualified Data.Text as T import FoundationDB.Versionstamp import FoundationDB.Layer.Tuple.Internal import Gauge.Main mixedTuple :: ByteString mixedTuple = "\SOHsome_prefix\NUL\SOHsome_other_prefix\NUL3\NUL\NUL\NUL\NUL\N...
null
https://raw.githubusercontent.com/crclark/foundationdb-haskell/510836a5fabe5b5b2dfc7e66438ded846f3ce085/bench/tuple/Main.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import Data.ByteString (ByteString) import qualified Data.Text as T import FoundationDB.Versionstamp import FoundationDB.Layer.Tuple.Internal import Gauge.Main mixedTuple :: ByteString mixedTuple = "\SOHsome_prefix\NUL\SOHsome_other_prefix\NUL3\NUL\NUL\NUL\NUL\NUL\NUL\NUL\SOH\NUL\STX\NUL\ETX\NAK\...
a982030422ced4aabd083b821a546e64dc64b2b8eff69adc66a8bf5a16221596
clojure-interop/aws-api
AmazonTranscribeAsyncClient.clj
(ns com.amazonaws.services.transcribe.AmazonTranscribeAsyncClient "Client for accessing Amazon Transcribe Service asynchronously. Each asynchronous method will return a Java Future overloads which accept an AsyncHandler can be used to receive notification when an asynchronous operation completes. Operations a...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.transcribe/src/com/amazonaws/services/transcribe/AmazonTranscribeAsyncClient.clj
clojure
(ns com.amazonaws.services.transcribe.AmazonTranscribeAsyncClient "Client for accessing Amazon Transcribe Service asynchronously. Each asynchronous method will return a Java Future overloads which accept an AsyncHandler can be used to receive notification when an asynchronous operation completes. Operations a...
6e72eb67ffb5bc9e83122cd3c79a6fe0163573fcfbf6b21d1fe2b30ecb382f67
CarlosMChica/HaskellBook
eqInstances.hs
module EqInstances where exercise 1 data TisAndInteger = ThisAn Integer instance Eq TisAndInteger where (==) (ThisAn x) (ThisAn x') = x == x' exercise 2 data TwoIntegers = Two Integer Integer instance Eq TwoIntegers where (==) (Two x y) (Two x' y') = x == x' && y == y' exercise 3 data StringOr...
null
https://raw.githubusercontent.com/CarlosMChica/HaskellBook/86f82cf36cd00003b1a1aebf264e4b5d606ddfad/chapter6/eqInstances.hs
haskell
module EqInstances where exercise 1 data TisAndInteger = ThisAn Integer instance Eq TisAndInteger where (==) (ThisAn x) (ThisAn x') = x == x' exercise 2 data TwoIntegers = Two Integer Integer instance Eq TwoIntegers where (==) (Two x y) (Two x' y') = x == x' && y == y' exercise 3 data StringOr...
76bb73140c4df8a3f1ce8f5b85e6423dd839f98b14988106ba5842c4e4a5f2c9
monadbobo/ocaml-core
no_polymorphic_compare.ml
type compare = [`no_polymorphic_compare] -> [`no_polymorphic_compare] -> [`no_polymorphic_compare] let compare _ _ = `no_polymorphic_compare let (<) _ _ = `no_polymorphic_compare let (<=) _ _ = `no_polymorphic_compare let (>) _ _ = `no_polymorphic_compare let (>=) _ _ = `no_polymorphic_compare let ...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/no_polymorphic_compare.ml
ocaml
type compare = [`no_polymorphic_compare] -> [`no_polymorphic_compare] -> [`no_polymorphic_compare] let compare _ _ = `no_polymorphic_compare let (<) _ _ = `no_polymorphic_compare let (<=) _ _ = `no_polymorphic_compare let (>) _ _ = `no_polymorphic_compare let (>=) _ _ = `no_polymorphic_compare let ...
c8e75eabd2d8247b56d05c744c84b89e7afff5192a791a24cc9415de856e44ca
puppetlabs/puppetdb
resources.clj
(ns puppetlabs.puppetdb.query.resources "Resource querying This implements resource querying, using the query compiler in `puppetlabs.puppetdb.query`, basically by munging the results into the right format and picking out the desired columns." (:import [org.postgresql.util PGobject]) (:require [puppetla...
null
https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/src/puppetlabs/puppetdb/query/resources.clj
clojure
SCHEMA
(ns puppetlabs.puppetdb.query.resources "Resource querying This implements resource querying, using the query compiler in `puppetlabs.puppetdb.query`, basically by munging the results into the right format and picking out the desired columns." (:import [org.postgresql.util PGobject]) (:require [puppetla...
0b739ee2e559c0402ba3e27459e05722ec1a282c0029e1a881288370e1856e15
imitator-model-checker/imitator
AbstractProperty.mli
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * IMITATOR * * Université de Lorraine , CNRS , , LORIA , Nancy , France * * Module description : Property description * * File contributors : * Creat...
null
https://raw.githubusercontent.com/imitator-model-checker/imitator/105408ae2bd8c3e3291f286e4d127defd492a58b/src/AbstractProperty.mli
ocaml
********************************************************** Modules ********************************************************** ************************************************************** * Predicates for properties ************************************************************** *************************************...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * IMITATOR * * Université de Lorraine , CNRS , , LORIA , Nancy , France * * Module description : Property description * * File contributors : * Creat...
0b79ee506c445382db0de4052adc4baf4a718290c95da45cf4f7f6324f5871b9
GregoryTravis/holfenstein
Larf.hs
module Main (main) where import System.IO import Img import Shader import Util (screenWidth, screenHeight) = (640, 480) type Shader = Double -> Int -> Int -> Int -> Int -> Color type FShader = Double -> Double -> Double -> Color shader :: Shader shader t x y w h = Color (fade x w) (fade y h) 0 where fade x m = (...
null
https://raw.githubusercontent.com/GregoryTravis/holfenstein/fcb8743351700c701757dc13fb6defcde53be306/Larf.hs
haskell
Color r 0 0
module Main (main) where import System.IO import Img import Shader import Util (screenWidth, screenHeight) = (640, 480) type Shader = Double -> Int -> Int -> Int -> Int -> Color type FShader = Double -> Double -> Double -> Color shader :: Shader shader t x y w h = Color (fade x w) (fade y h) 0 where fade x m = (...
cac2b21e508bcec9efadf6cfc52c69ddab3a31caed5bad3c9117ddda46457277
uents/sicp
ch3.5.5.scm
SICP Chapter 3.5.5 ;;;; ;;;; Author @uents on twitter ;;;; #lang racket (require "../misc.scm") (require "streams.scm") ;; §3.1から転用 (define (rand-update x) (modulo (+ (* 13 x) 47) 97)) (define random-init 7) (define random-numbers (cons-stream random-init (stream-map rand-update random-number...
null
https://raw.githubusercontent.com/uents/sicp/c29b2582feee452ec0714fdc1eec6b406b94cd27/ch3/ch3.5.5.scm
scheme
Author @uents on twitter §3.1から転用 racket@> (map (lambda (i) (stream-ref random-numbers i)) random-initは定数なので何度やっても結果は同じになる racket@> (map (lambda (i) (stream-ref cesaro-stream i)) => '(#t #t #t #t #f #t #f #t #t #f #t #f #f #f #t #f #f #t #t #t #t) racket@> (stream-ref pi-stream 0) rand-exは問題3.6を流用 racket@> ...
SICP Chapter 3.5.5 #lang racket (require "../misc.scm") (require "streams.scm") (define (rand-update x) (modulo (+ (* 13 x) 47) 97)) (define random-init 7) (define random-numbers (cons-stream random-init (stream-map rand-update random-numbers))) ( enumerate - interval 0 20 ) ) = > '...
1c5a422351b9aed74f7ab05f668528817e22d70831ae6309500f646732451964
MondayMorningHaskell/haskellings
IO1.hs
-- I AM NOT DONE import System.Directory - The * IO * monad is perhaps the most important to know about in Haskell . It 's also the most special , carrying a different kind of effect to other monads . - Most functions we run are " pure " . Their output ca n't be influenced by anything besides the direct...
null
https://raw.githubusercontent.com/MondayMorningHaskell/haskellings/fafadd5bbb722b54c1b7b114e34dc9b96bb7ca4d/exercises/monads/IO1.hs
haskell
I AM NOT DONE Prints a ' String ' object to the terminal . Prints any ' Show ' object to the terminal . ( Note , ' print'-ing a ' String ' will cause it to appear with extra quotation marks ) ( Hello vs. " Hello " ) A ' FilePath ' is just an alias for a ' String ' This function retrieves the directory the p...
import System.Directory - The * IO * monad is perhaps the most important to know about in Haskell . It 's also the most special , carrying a different kind of effect to other monads . - Most functions we run are " pure " . Their output ca n't be influenced by anything besides the direct input values we ...
fe3ef6b836ca51b1e478cbb60098cdc27d7ffdbd6f222aa345060ee1f615aa7c
oakes/Nightlight
nightlight.clj
(ns leiningen.nightlight (:require [leinjacker.deps :as deps] [leinjacker.eval :as eval] [clojure.tools.cli :as cli] [clojure.edn :as edn] [clojure.string :as str] [nightlight.utils :as u])) (defn start-nightlight [{:keys [main] :as project} options] (...
null
https://raw.githubusercontent.com/oakes/Nightlight/51ed9bcd7286c2833bb48daf9cb0624e4e7b0e14/lein-nightlight/src/leiningen/nightlight.clj
clojure
if there are CLI errors, print error messages and usage summary if user asked for CLI usage, print the usage summary
(ns leiningen.nightlight (:require [leinjacker.deps :as deps] [leinjacker.eval :as eval] [clojure.tools.cli :as cli] [clojure.edn :as edn] [clojure.string :as str] [nightlight.utils :as u])) (defn start-nightlight [{:keys [main] :as project} options] (...
85bfc471817497a09e99b8b2f5d23225f9b0047aac048d5d41141051aa1d384e
philopon/apiary
EventSource.hs
{-# LANGUAGE OverloadedStrings #-} module Web.Apiary.EventSource ( eventSourceIO, eventSourceChan , module Network.Wai.EventSource.EventStream ) where import Web.Apiary(MonadIO(..), status200) import Network.Wai.EventSource.EventStream (ServerEvent(..)) import qualified Network.Wai.EventSource.EventStrea...
null
https://raw.githubusercontent.com/philopon/apiary/7da306fcbfcdec85d073746968298de4540d7235/apiary-eventsource/src/Web/Apiary/EventSource.hs
haskell
# LANGUAGE OverloadedStrings #
module Web.Apiary.EventSource ( eventSourceIO, eventSourceChan , module Network.Wai.EventSource.EventStream ) where import Web.Apiary(MonadIO(..), status200) import Network.Wai.EventSource.EventStream (ServerEvent(..)) import qualified Network.Wai.EventSource.EventStream as E import Control.Concurrent.C...
bcef13e7155dec76cc1f5379774a73ddca19a8ca16a2db61f87b280303137c27
szos/My-Stumpwm-Init
init.lisp
(in-package :stumpwm) (setf *maximum-completions* 50) ; make sure completions dont run off screen (set-prefix-key (kbd "C-j")) ( set - prefix - key ( " F20 " ) ) (setf *mouse-focus-policy* :click) (setf *window-border-style* :thick *normal-border-width* 1 *maxsize-border-width* 1) (init-load-path ...
null
https://raw.githubusercontent.com/szos/My-Stumpwm-Init/c0acd5a98671f0d95290fbdef0dbac58fd64c494/init.lisp
lisp
make sure completions dont run off screen Float vlc windows that arent the main window. (eg the open file dialog) keep a list of loaded modules. this could be simplified. grabbed pointer anyone?
(in-package :stumpwm) (set-prefix-key (kbd "C-j")) ( set - prefix - key ( " F20 " ) ) (setf *mouse-focus-policy* :click) (setf *window-border-style* :thick *normal-border-width* 1 *maxsize-border-width* 1) (init-load-path "~/.stumpwm.d/stumpwm-contrib/") (defun float-vlc-stuff (window) (and (no...
d1008eca33e3a603c9a071765441d143bb25f0b73511131e7b5c27091bf386b0
nackjicholson/haskellbook-solutions
exercises.hs
-- chapter10/exercises.hs module Exercises where import Data.List stops :: String stops = "pbtdkg" vowels :: String vowels = "aeiou" 1(a ) Write a function that takes inputs from stops and vowels and makes 3 - tuples of all possible stop - vowel - stop combinations . These will not all correspond to real word...
null
https://raw.githubusercontent.com/nackjicholson/haskellbook-solutions/c21bd87773734ba2ae1559553a6a4d10891c61c8/chapter10/exercises.hs
haskell
chapter10/exercises.hs the stop-vowel-stop pattern is common enough that many of them will. that begin with a p. vowels) and modify the function to make tuples representing possible noun-verb-noun sentences. Functions using Folds list returns True. that uses any. as the built-in map. as the built-in filter. ...
module Exercises where import Data.List stops :: String stops = "pbtdkg" vowels :: String vowels = "aeiou" 1(a ) Write a function that takes inputs from stops and vowels and makes 3 - tuples of all possible stop - vowel - stop combinations . These will not all correspond to real words in English , although s...
0388fe779b3b58de6b3b71187cec1ef20d16fa20f0657d3080bc3ea9c2c32869
ronxin/stolzen
ex3.28.scm
#lang scheme (define or-gate-delay 1) (define (or-gate in1 in2 output) (define (or-action-procedure) (let ((new-value (logical-or (get-signal in1) (get-signal in2)))) (after-delay or-gate-delay (lambda () (set-signal! output n...
null
https://raw.githubusercontent.com/ronxin/stolzen/bb13d0a7deea53b65253bb4b61aaf2abe4467f0d/sicp/chapter3/3.3/ex3.28.scm
scheme
#lang scheme (define or-gate-delay 1) (define (or-gate in1 in2 output) (define (or-action-procedure) (let ((new-value (logical-or (get-signal in1) (get-signal in2)))) (after-delay or-gate-delay (lambda () (set-signal! output n...
3cccbfbb3661a41d4c62801a08b2ddd295e5954be25c150aac6a8314ac69be1c
aeolus-project/zephyrus
json_v1_v.mli
Auto - generated from " json_v1.atd " (** Type definition for syntax version. *) (** Type definitions for naming. *) type version = Json_versions_t.version type component_type_name = Json_v1_t.component_type_name type port_name = Json_v1_t.port_name type component_name = Json_v1_t.component_name type package_n...
null
https://raw.githubusercontent.com/aeolus-project/zephyrus/0b52de4038bbab724e6a9628430165a7f09f77ae/src/atd/json_v1_v.mli
ocaml
* Type definition for syntax version. * Type definitions for naming. atd conflict atd conflict * Type definitions for Configuration. atd implementation atd repositories atd provide_resources atd packages_installed atd cost atd component_type_workaround atd requirer atd provider atd locations atd bindings ...
Auto - generated from " json_v1.atd " type version = Json_versions_t.version type component_type_name = Json_v1_t.component_type_name type port_name = Json_v1_t.port_name type component_name = Json_v1_t.component_name type package_name = Json_v1_t.package_name type repository_name = Json_v1_t.repository_name ...
aafa0cb8ae963e66986d7fe98da22e03bd2f8bc82ec0892a0e169f72dfe5b32d
cardmagic/lucash
interp.scm
; -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*- Copyright ( c ) 1993 - 1999 by and . See file COPYING . ;Need to fix the byte-code compiler to make jump etc. offsets from the ;beginning of the instruction. ; This is file interp.scm. ; Interpreter state (define *template*) ; current template (define ...
null
https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scheme/vm/interp.scm
scheme
-*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*- Need to fix the byte-code compiler to make jump etc. offsets from the beginning of the instruction. This is file interp.scm. Interpreter state current template pointer to next instruction byte last value produced see GET - CURRENT - PORT dynamic state sess...
Copyright ( c ) 1993 - 1999 by and . See file COPYING . vector of procedures , one per opcode vector of procedures , one per interrupt type in prim-io.scm ) . (define (val) *val*) (define (set-val! val) (set! *val* val)) (define (code-pointer) *code-pointer*) (define (current-thread) *current-...
7473088b3924f391859c13d662ac08b410e2efaaa9dd3b7d839f8291defe00ca
kallisti-dev/hs-webdriver
webserver.hs
module Main where import Control.Exception import Control.Concurrent import Network.Wai.Handler.Warp import Network.Wai.Application.Static import WaiAppStatic.Types import Config import Test.WebDriver import qualified Test . BasicTests as BasicTests serverConf = setPort Config.serverPort $ defaultSettin...
null
https://raw.githubusercontent.com/kallisti-dev/hs-webdriver/ea594ce8720c9e11f053b2567f250079f0eac33b/test/webserver.hs
haskell
module Main where import Control.Exception import Control.Concurrent import Network.Wai.Handler.Warp import Network.Wai.Application.Static import WaiAppStatic.Types import Config import Test.WebDriver import qualified Test . BasicTests as BasicTests serverConf = setPort Config.serverPort $ defaultSettin...
f37900b642e8a58e027c50e77715a1cd67b45b9dc05deac7cd3e438e6276f99e
Gopiandcode/petrol
query.ml
type ('y, 'ty) t = ('y, 'ty) Types.query type join_op = Types.join_op = LEFT | RIGHT | INNER type ('a,'c) where_fun = bool Expr.t -> ('c, 'a) t -> ('c, 'a) t constraint 'a = ([< `SELECT_CORE | `SELECT | `DELETE | `UPDATE]) as 'a type ('a,'b,'c) group_by_fun = 'b Expr.expr_list -> ('c, 'a) t -> ('c, 'a) t...
null
https://raw.githubusercontent.com/Gopiandcode/petrol/48b57e5996997e50911d7d5bb0701a9bdd794fb2/lib/query.ml
ocaml
type ('y, 'ty) t = ('y, 'ty) Types.query type join_op = Types.join_op = LEFT | RIGHT | INNER type ('a,'c) where_fun = bool Expr.t -> ('c, 'a) t -> ('c, 'a) t constraint 'a = ([< `SELECT_CORE | `SELECT | `DELETE | `UPDATE]) as 'a type ('a,'b,'c) group_by_fun = 'b Expr.expr_list -> ('c, 'a) t -> ('c, 'a) t...
708331f0f7e9f1e8938c79e9fcedb006f4b376d319a412a7b9e60b04a454bae5
Frama-C/headache
config.ml
(**************************************************************************) (* *) (* Headache *) (* *) ...
null
https://raw.githubusercontent.com/Frama-C/headache/cf3890fd27e08613397ad0386390250f206dc01f/config.ml
ocaml
************************************************************************ Headache ...
, Projet Cristal , INRIA Rocquencourt Copyright 2002 Institut National de Recherche en Informatique et en Automatique . the GNU Library General Public License . /~simonet/ excep...
d5f97b87f0adb37b952e1bea6ba713f17b462462a16ba60f3524f2dba1b3fd3d
dongcarl/guix
ftp.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2014 , 2015 , 2018 , 2021 , 2021 < > Copyright © 2015 < > Copyright © 2015 < > Copyright © 2016–2021 < > Copyright © 2017 < > Copyright © 2021 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you ...
null
https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/ftp.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2014 , 2015 , 2018 , 2021 , 2021 < > Copyright © 2015 < > Copyright © 2015 < > Copyright © 2016–2021 < > Copyright © 2017 < > Copyright © 2021 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public ...
c6f01f09868e857283c973df0b77a19554be34c7475aef032f5e63549e0a9e82
felixmulder/haskell-in-production
Class.hs
module Web.SimpleHttp.Class ( ToResponse(..) ) where import Prelude import Web.SimpleHttp.Types (Response(..), Error(..)) import Network.HTTP.Types.Status (status400, status500) class ToResponse a where toResponseFrom :: a -> Response instance ToResponse a => ToResponse (Either Error a) where toResponseFrom ...
null
https://raw.githubusercontent.com/felixmulder/haskell-in-production/ff3431f01342b8689d3449007759706d0bba6488/part-1-testable-components/src/Web/SimpleHttp/Class.hs
haskell
module Web.SimpleHttp.Class ( ToResponse(..) ) where import Prelude import Web.SimpleHttp.Types (Response(..), Error(..)) import Network.HTTP.Types.Status (status400, status500) class ToResponse a where toResponseFrom :: a -> Response instance ToResponse a => ToResponse (Either Error a) where toResponseFrom ...
ec56854e431d4a292f260abd15a50edc2fedc421cb9d82aca0e7ca0bb5a69ae2
aphyr/merkle
linear.clj
(ns merkle.kv.linear "Merkle trees are a data structure used to efficiently localize differences between two copies of an ordered collection. Each element in the collection is hashed into a leaf node. Every n leaf nodes have their hashes concatenated and hashed to produce a supervening node. Those nodes are the...
null
https://raw.githubusercontent.com/aphyr/merkle/4cb63269947f679551fbae277e8488b7406b18f6/src/merkle/kv/linear.clj
clojure
i.e. do they have the same hash, min-key, and Fill in an empty space above Add a new slot to the top Merge with the left node and recur upwards. if not given, these default We keep a temporary vector containing uncombined nodes in the tree as we single element. The last entry is the Node at the highest level yet...
(ns merkle.kv.linear "Merkle trees are a data structure used to efficiently localize differences between two copies of an ordered collection. Each element in the collection is hashed into a leaf node. Every n leaf nodes have their hashes concatenated and hashed to produce a supervening node. Those nodes are the...
ea3768ca21b9620d7aebfede2e35715478e0f2b6057601f2f1caa5d515d64b74
open-company/open-company-web
email_domains.cljs
(ns oc.web.components.ui.email-domains (:require [rum.core :as rum] [org.martinklepsch.derivatives :as drv] [oc.web.dispatcher :as dis] [oc.web.lib.utils :as utils] [oc.web.mixins.ui :as ui-mixins] [oc.web.lib.responsive :as responsive] [oc.web.a...
null
https://raw.githubusercontent.com/open-company/open-company-web/dfce3dd9bc115df91003179bceb87cca1f84b6cf/src/main/oc/web/components/ui/email_domains.cljs
clojure
(ns oc.web.components.ui.email-domains (:require [rum.core :as rum] [org.martinklepsch.derivatives :as drv] [oc.web.dispatcher :as dis] [oc.web.lib.utils :as utils] [oc.web.mixins.ui :as ui-mixins] [oc.web.lib.responsive :as responsive] [oc.web.a...
274caaa2c342a18512ba657c858bc9f54f5879c9ba75711962d9026b5ad09571
sullyj3/adventofcode2022
Day10.hs
module Day10 (main) where import AOC import AOC.Parse import AOC.Parsers import Extra (chunksOf) import PyF import Text.Megaparsec.Char (string) import Utils (imap1, selectIndices1) import Optics.Core ...
null
https://raw.githubusercontent.com/sullyj3/adventofcode2022/1b8f28e78ac69ec7af857132eb4785c1e9dca011/src/Day10.hs
haskell
----------- Parsing -- ----------- ------------- Solutions -- ------------- Part 1
module Day10 (main) where import AOC import AOC.Parse import AOC.Parsers import Extra (chunksOf) import PyF import Text.Megaparsec.Char (string) import Utils (imap1, selectIndices1) import Optics.Core ...
018eb3b4eff5846d20aa713274e36c6e10b52c11a73633602ed376c16540ca71
flexsurfer/re-frisk
core.cljs
(ns ^{:mranderson/inlined true} re-frisk.inlined-deps.reagent.v1v0v0.reagent.core (:require-macros [re-frisk.inlined-deps.reagent.v1v0v0.reagent.core]) (:refer-clojure :exclude [partial atom flush]) (:require [react :as react] [re-frisk.inlined-deps.reagent.v1v0v0.reagent.impl.template :as tmpl] ...
null
https://raw.githubusercontent.com/flexsurfer/re-frisk/638d820c84e23be79b8c52f8f136a611d942443f/re-frisk/src/re_frisk/inlined_deps/reagent/v1v0v0/reagent/core.cljs
clojure
Static methods Methods Or alternatively: Deprecated methods: RCursor equivalence to (swap! ra update-in [:nested :content] inc)
(ns ^{:mranderson/inlined true} re-frisk.inlined-deps.reagent.v1v0v0.reagent.core (:require-macros [re-frisk.inlined-deps.reagent.v1v0v0.reagent.core]) (:refer-clojure :exclude [partial atom flush]) (:require [react :as react] [re-frisk.inlined-deps.reagent.v1v0v0.reagent.impl.template :as tmpl] ...
8e41ae615c36df343d0bc5a1fc3d7451382f336cb8ab483cfd4643cb0f2cd4d7
mirage/bechamel
mperf.mli
module Attr : sig type flag = | Disabled (** off by default *) | Inherit (** children inherit it *) | Exclude_user (** don't count user *) | Exclude_kernel (** don't count kernel *) | Exclude_hv (** don't count hypervisor *) | Exclude_idle (** don't count when idle *) | Enable_on_exe...
null
https://raw.githubusercontent.com/mirage/bechamel/8e1a3e64c6723d1d9b2081aeb06d725024f88012/mperf/lib/mperf.mli
ocaml
* off by default * children inherit it * don't count user * don't count kernel * don't count hypervisor * don't count when idle * next exec enables * Opaque type of a perf event attribute. * [make ?flags kind] is a perf event attribute of type [kind], with flags [flags]. * comparison function on {!t}. *...
module Attr : sig type flag = module Kind : sig type t = | Cycles | Instructions | Cache_references | Cache_misses | Branch_instructions | Branch_misses | Bus_cycles | Stalled_cycles_frontend | Stalled_cycles_backend | Ref_cpu_cycles | Cpu_clock...
9647cb644cc2525122292245ffc205177abd13ee9058f3ab82e8e49915a1b7ef
samrushing/irken-compiler
dns.scm
;; -*- Mode: Irken -*- (require "lib/basis.scm") (require "lib/pack.scm") (require "lib/codecs/base64.scm") (require "doom/doom.scm") ;; for now, we are only including types, opcodes, and rcodes ;; that are actually used. ;; I think these can be done with `make-enum`. (datatype dnstype (:a) ;; a host addres...
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/doom/dns.scm
scheme
-*- Mode: Irken -*- for now, we are only including types, opcodes, and rcodes that are actually used. I think these can be done with `make-enum`. a host address [RFC1035] an authoritative name server [RFC1035] the canonical name for an alias [RFC1035] marks the st...
(require "lib/basis.scm") (require "lib/pack.scm") (require "lib/codecs/base64.scm") (require "doom/doom.scm") (datatype dnstype ) (define (DNST t name val) {name=name t=t val=val}) (define dnstype-table (list (DNST (dnstype:a) "a" 1) (DNST (dnstype:ns) "ns" 2) (DNST (dnstype:cna...
b373239cf9d5a549a32758b99ec2fd2bb7eeb785efccc5905bcefdbf4786f9ab
caisah/sicp-exercises-and-examples
ex_2.64.scm
The following procedure list->tree converts an ordered list to a balanced bianry tree . the helper procedure partial - tree takes as arguments an integer n and list of at least n elements and constructs a balanced tree containing the first n elements of the list . ;; The result returned by partial-tree is a pair ...
null
https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/2.3.3-representing_sets/ex_2.64.scm
scheme
The result returned by partial-tree is a pair (formed with cons) whose car is the constructed tree and whose cdr is the list of elements not included in the tree. / \ \ / \ a list of n elements? O(n)
The following procedure list->tree converts an ordered list to a balanced bianry tree . the helper procedure partial - tree takes as arguments an integer n and list of at least n elements and constructs a balanced tree containing the first n elements of the list . (define (list->tree elements) (car (partial-tr...
841787d99bb58e45af25e9e1258637c4fe84f620d15979812cdb90a43d1dae60
GaloisInc/saw-core
Constant.hs
| Module : Verifier . SAW.Constant Copyright : Galois , Inc. 2012 - 2015 License : : Stability : experimental Portability : non - portable ( language extensions ) Module : Verifier.SAW.Constant Copyright : Galois, Inc. 2012-2015 License : BSD3 Maintainer : Stability :...
null
https://raw.githubusercontent.com/GaloisInc/saw-core/ea914a9eea8e484189ee6e4c4dcdfc7db831d987/saw-core/src/Verifier/SAW/Constant.hs
haskell
| Module : Verifier . SAW.Constant Copyright : Galois , Inc. 2012 - 2015 License : : Stability : experimental Portability : non - portable ( language extensions ) Module : Verifier.SAW.Constant Copyright : Galois, Inc. 2012-2015 License : BSD3 Maintainer : Stability :...
63edcadf8c5b34349a0da70cf58ba399c5cd3f333c09f36bc9e24a98fc1c7cac
avsm/mirage-duniverse
grep2.ml
open StdLabels let underline_on = Format.sprintf "%c[4m" (Char.chr 27) let underline_off = Format.sprintf "%c[24m" (Char.chr 27) let usage = Format.sprintf "%s [options] pattern" (Array.get Sys.argv 0) let pattern = ref "" let rewrite = ref "\\0" let underline = ref false let only_matching = ref false let str_sub = ...
null
https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/re2/example/grep2.ml
ocaml
this is just drudgery okay, more drudgery
open StdLabels let underline_on = Format.sprintf "%c[4m" (Char.chr 27) let underline_off = Format.sprintf "%c[24m" (Char.chr 27) let usage = Format.sprintf "%s [options] pattern" (Array.get Sys.argv 0) let pattern = ref "" let rewrite = ref "\\0" let underline = ref false let only_matching = ref false let str_sub = ...
1305738540558d08b63d3c6d07ae84e51ccaec067fe0b3210c9672aef8ecf945
flosell/lambdacd
output_test.clj
(ns lambdacd.stepsupport.output-test (:require [clojure.test :refer :all] [lambdacd.stepsupport.output :refer :all] [lambdacd.testsupport.test-util :refer [slurp-chan call-with-timeout]] [lambdacd.testsupport.data :refer [some-ctx some-ctx-with]] [lambdacd.testsupport.m...
null
https://raw.githubusercontent.com/flosell/lambdacd/e9ba3cebb2d5f0070a2e0e1e08fc85fc99ee7135/test/clj/lambdacd/stepsupport/output_test.clj
clojure
appending was a more or less random decision,
(ns lambdacd.stepsupport.output-test (:require [clojure.test :refer :all] [lambdacd.stepsupport.output :refer :all] [lambdacd.testsupport.test-util :refer [slurp-chan call-with-timeout]] [lambdacd.testsupport.data :refer [some-ctx some-ctx-with]] [lambdacd.testsupport.m...
fd35f19968a8a2ef1ab260d34831d0564552270822ffbb21af6fe1a62e5b51d3
juxt/jig
todo.clj
Copyright © 2013 , JUXT LTD . All Rights Reserved . ;; ;; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; ;; By using this software in any fashion, you are agreeing to be b...
null
https://raw.githubusercontent.com/juxt/jig/3997887e5a56faadb1b48eccecbc7034b3d31e41/console/extensions/todo-browser/src/jig/console/todo.clj
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. ...
Copyright © 2013 , JUXT LTD . All Rights Reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns jig.console.todo (:require [ring.util.response :as ring-resp] [clojure.java.io :as io] [hiccup.core :refer (html h)] jig [jig.console :refer (add-extension ->Boilerplate)]) (:import (jig Lifecycle))) ...
97b50472a61b33aa21b9da10692256bc7643ee83191b24e0201fefe65770b89c
evrim/core-server
init.lisp
(in-package :manager) ;; +------------------------------------------------------------------------- ;; | Manager Instance ;; +------------------------------------------------------------------------- (defun register-me (&optional (server *server*)) (if (null (status *app*)) (start *app*)) (register server *app*)) ...
null
https://raw.githubusercontent.com/evrim/core-server/200ea8151d2f8d81b593d605b183a9cddae1e82d/src/manager/src/init.lisp
lisp
+------------------------------------------------------------------------- | Manager Instance +-------------------------------------------------------------------------
(in-package :manager) (defun register-me (&optional (server *server*)) (if (null (status *app*)) (start *app*)) (register server *app*)) (defun unregister-me (&optional (server *server*)) (unregister server *app*)) (defvar *app* (make-instance 'manager-application))
de7bfc0e4a80a613a2ed58f359adbfed13a293f9f1522d93951f234d171db3dc
input-output-hk/cardano-sl
Core.hs
| Core logic of LRC . module Pos.Chain.Lrc.Core ( findDelegationStakes , findRichmenStakes ) where import Universum hiding (id) import Data.Conduit (ConduitT, await) import qualified Data.Conduit.List as CL import qualified Data.HashMap.Strict as HM import qualified Data.H...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/chain/src/Pos/Chain/Lrc/Core.hs
haskell
| Function helper for delegated richmen. Iterates @Delegate -> lost richmen status. ^ Check if user is issuer? ^ Gets effective stake. ^ Coin threshold ^ Old richmen, new richmen | Find all stake holders which have at least 'eligibility threshold' coins. Assumes that the `StakeholderId`s are unique. The consu...
| Core logic of LRC . module Pos.Chain.Lrc.Core ( findDelegationStakes , findRichmenStakes ) where import Universum hiding (id) import Data.Conduit (ConduitT, await) import qualified Data.Conduit.List as CL import qualified Data.HashMap.Strict as HM import qualified Data.H...
f2f5f035331d04ab49532e134fc3958e16ea5b69e4ad2b3f0427af622c5c47e8
haskell-tools/haskell-tools
NormalExistential.hs
{-# LANGUAGE GADTs #-} module NormalExistential where {-@ GADTs @-} data T a where T1 :: b -> T a {-* GADTSyntax, GADTs + ExistentialQuantification *-} T2 :: a -> a -> T a {-* GADTSyntax *-}
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/test/ExtensionOrganizerTest/GADTsTest/NormalExistential.hs
haskell
# LANGUAGE GADTs # @ GADTs @ * GADTSyntax, GADTs + ExistentialQuantification * * GADTSyntax *
module NormalExistential where data T a where
95f3d236d83a68d67a0448a782528693c938d860d884febd1a78ecee1ea6f699
RefactoringTools/wrangler
eqc_fold_expr.erl
-module(eqc_fold_expr). -compile(export_all). -include_lib("eqc/include/eqc.hrl"). % filename generator gen_filename(Dirs) -> AllErlFiles = wrangler_misc:expand_files(Dirs, ".erl"), oneof(AllErlFiles). %% collect function define locations in an AST collect_fold_candidates(FName, SearchPaths, Tab...
null
https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/qc_test/eqc_fold_expr.erl
erlang
filename generator collect function define locations in an AST test_fold_expr3(), test_fold_expr4(), test_fold_expr5(), test_fold_expr7(),
-module(eqc_fold_expr). -compile(export_all). -include_lib("eqc/include/eqc.hrl"). gen_filename(Dirs) -> AllErlFiles = wrangler_misc:expand_files(Dirs, ".erl"), oneof(AllErlFiles). collect_fold_candidates(FName, SearchPaths, TabWidth) -> {ok, {AST, _Info}} = wrangler_ast_server:parse_annotate...
2528770b4b42f86cba98e5e1b82270527baa6f449fdd446994ad0ab0514e6a50
MaxOw/computational-geometry
CrossPoint.hs
# Language MultiParamTypeClasses # {-# Language FlexibleInstances #-} -------------------------------------------------------------------------------- -- | Module : Geometry . SetOperations . Copyright : ( C ) 2017 -- License : BSD-style (see LICENSE) Maintainer : -- ----------------------------...
null
https://raw.githubusercontent.com/MaxOw/computational-geometry/20c93aa05b151b115250a18d1203fdf9a01f705e/src/Geometry/SetOperations/CrossPoint.hs
haskell
# Language FlexibleInstances # ------------------------------------------------------------------------------ | License : BSD-style (see LICENSE) ------------------------------------------------------------------------------ ------------------------------------------------------------------------------
# Language MultiParamTypeClasses # Module : Geometry . SetOperations . Copyright : ( C ) 2017 Maintainer : module Geometry.SetOperations.CrossPoint ( Sign (..) , toSign , CrossPoint (..) , MakeCrossPoint (..) , toCrossPoint ) where import Protolude import Linear import Li...
6a0ffdc5149c2b89bd48b7830fb0048bc977f323a7ad8dbe6456d515758f7bbe
ndmitchell/hoogle
Util.hs
# LANGUAGE PatternGuards , ViewPatterns , CPP , ScopedTypeVariables # module General.Util( PkgName, ModName, URL, pretty, parseMode, applyType, applyFun1, unapplyFun, fromName, fromQName, fromTyVarBind, declNames, isTypeSig, fromDeclHead, fromContext, fromIParen, fromInstHead, tarballReadFiles, ...
null
https://raw.githubusercontent.com/ndmitchell/hoogle/25b2872929e3fccd5bbcdef026cec63ce365647e/src/General/Util.hs
haskell
| A URL, complete with a @https:@ prefix. ensure that no value escapes in a thunk from the value # UNPACK # a / b | @takeSortOn n op == take n . sortOn op@ isLegal is from haddock-api:Haddock.Utils; we need to use the same escaping strategy here in order for fragment links to work | Equivalent to any (`inRange`...
# LANGUAGE PatternGuards , ViewPatterns , CPP , ScopedTypeVariables # module General.Util( PkgName, ModName, URL, pretty, parseMode, applyType, applyFun1, unapplyFun, fromName, fromQName, fromTyVarBind, declNames, isTypeSig, fromDeclHead, fromContext, fromIParen, fromInstHead, tarballReadFiles, ...
caa7b433d85db96115af8582edf33cf9975aa587b7141a7fc30ac0abb3aed2be
expipiplus1/vulkan
VK_KHR_multiview.hs
{-# language CPP #-} -- | = Name -- -- VK_KHR_multiview - device extension -- -- == VK_KHR_multiview -- -- [__Name String__] -- @VK_KHR_multiview@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] 54 -- -- [__Revision__] 1 -- -- [__Extension and Version Dependenc...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Extensions/VK_KHR_multiview.hs
haskell
# language CPP # | = Name VK_KHR_multiview - device extension == VK_KHR_multiview [__Name String__] @VK_KHR_multiview@ [__Extension Type__] Device extension [__Registered Extension Number__] [__Revision__] [__Extension and Version Dependencies__] - Requires @VK_KHR_get_physical_device_...
54 1 - Requires support for Vulkan 1.0 - 2016 - 10 - 28 - Promoted to Vulkan 1.1 Core - , NVIDIA extension . Multiview is a rendering technique originally designed for VR < -extensions/html/vkspec.html#renderpass render pass > ' Vulkan . Core11.Promoted_Fr...
316506a347806091b08b664d8a6839e51cda52fd5f1ec1b8a3cf9137d429983a
ghcjs/ghcjs-dom
ApplePaySession.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.ApplePaySession (js_newApplePaySession, newApplePaySession, js_supportsVersion, ...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/ApplePaySession.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/ApplePaySession.canMakePaymentsWithActiveCard Mozilla ApplePaySession.canMakePaymentsWithActiveCard documentation> | <-US/docs/Web/API/ApplePaySession.canMakePaymentsWithActiveCard Mozilla ApplePaySession...
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.ApplePaySession (js_newApplePaySession, newApplePaySession, js_supportsVersion, supportsVersion, supportsVersion_, js_canMakePayments, canMakePayments, canMakePayments_, ...
4d27e181cf9eec3f7b5dcb35f8bc36168ad86f4222e7e217c8de615cdc90ff62
input-output-hk/cardano-wallet
Ntp.hs
# LANGUAGE DataKinds # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE LambdaCase # # LANGUAGE NumericUnderscores # # LANGUAGE TypeApplications # # OPTIONS_GHC -fno - warn - orphans # -- | Copyright : © 2020 -- License: Apache-2.0 -- This module provides the ...
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet/7b541e0b11fdd69b30d94104dbd5fa633ff1d5c3/lib/wallet/src/Network/Ntp.hs
haskell
# LANGUAGE DeriveAnyClass # | License: Apache-2.0 and re-exports used in a number of places throughout codebase. terminated when the callback returns. ^ The global 'IOManager' instance, set up by the application main function. ^ Logging object ^ Action to run | Hard-coded NTP servers for cardano-wallet. ------...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE LambdaCase # # LANGUAGE NumericUnderscores # # LANGUAGE TypeApplications # # OPTIONS_GHC -fno - warn - orphans # Copyright : © 2020 This module provides the client related settings , types module Network.Ntp ( with...
0ba05b135cda3ef48ae3084d1616afe67542cf1833736a558edb9410432086c3
mbj/stratosphere
LocationProperty.hs
module Stratosphere.Pinpoint.Segment.LocationProperty ( module Exports, LocationProperty(..), mkLocationProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphere.Pinpoint.Segment.GPSPointProperty as E...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/pinpoint/gen/Stratosphere/Pinpoint/Segment/LocationProperty.hs
haskell
# SOURCE # # SOURCE #
module Stratosphere.Pinpoint.Segment.LocationProperty ( module Exports, LocationProperty(..), mkLocationProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties data LocationProperty = Location...
505ffe8f281effa1fe5f7c91593a8c9e85a1d7f7bd373791e8bfcedcfe2cbade
danielsz/certificaat
hooks.clj
(ns certificaat.hooks (:require [certificaat.plugins.webroot :as w] [certificaat.plugins.report :as r] [certificaat.plugins.server :as s] [certificaat.plugins.copy-to-path :as cp] [certificaat.plugins.diffie-hellman :as dh] [certificaat.hooks :as h])) (defm...
null
https://raw.githubusercontent.com/danielsz/certificaat/955429f6303da9a687cf636d93437281f43ddb71/src/certificaat/hooks.clj
clojure
(ns certificaat.hooks (:require [certificaat.plugins.webroot :as w] [certificaat.plugins.report :as r] [certificaat.plugins.server :as s] [certificaat.plugins.copy-to-path :as cp] [certificaat.plugins.diffie-hellman :as dh] [certificaat.hooks :as h])) (defm...
59ce8e6b58e3db08f0797cbcdfd38bb807ab7b61add79a25f5f306fab5ea2f64
pol-is/polisMath
corr.clj
Copyright ( C ) 2012 - present , The Authors . This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . This program is distributed in the hope that it will be useful , but WITHOUT A...
null
https://raw.githubusercontent.com/pol-is/polisMath/dfe233e8c9207c2ce11e1379286ad0cf0f732067/src/polismath/math/corr.clj
clojure
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU Affero General Public License for more details . You should have received a copy of the GNU Affero General Public License along with this program . If not , see < / > . [plumbing.core :as pc :refer (fnk map-vals...
(ns polismath.math.corr (:refer-clojure :exclude [* - + == /]) (:require [taoensso.timbre :as log] [taoensso.timbre.profiling :as prof] [polismath.math.named-matrix :as nm] [clojure.spec.alpha :as s] [clojure.core.matrix :as matrix] [clojure.core.matrix.selection :as matrix.selection] [...
45692b8ca1f92eea9377d58b73e536da3628bcce2e9eba4b3ddcc95e54ac0fab
irastypain/sicp-on-language-racket
exercise_2_52.rkt
#lang racket (require racket/gui/base "../lib/vectors.rkt" "../lib/segments.rkt" (only-in "../lib/graphics.rkt" make-frame frame-coord-map polyline polygon up-split right-split ...
null
https://raw.githubusercontent.com/irastypain/sicp-on-language-racket/0052f91d3c2432a00e7e15310f416cb77eeb4c9c/src/chapter02/exercise_2_52.rkt
racket
Реализация рисовалки 'wave' Процедура дублирует painter, располагая сверху, дублирует, располагая справа и выполняет рекурсивный вызов (wave frame)
#lang racket (require racket/gui/base "../lib/vectors.rkt" "../lib/segments.rkt" (only-in "../lib/graphics.rkt" make-frame frame-coord-map polyline polygon up-split right-split ...
b797ac1d9bd9a823589a51b66ca4a8c76213cfb11486c38f7ff8e4246030e9c0
benzap/flyer.js
storage.cljs
(ns flyer.storage "includes functions for storing window information. This window information is stored in the parent window under the `window-list-key`." (:require [flyer.utils :as utils])) (declare get-window-refs) (def storage (utils/get-main-parent)) (def window-list-key "flyer_WindowReferences") (de...
null
https://raw.githubusercontent.com/benzap/flyer.js/3f9a1ce9d56cc2c369864b3c04c69694bf95595b/src-cljs/flyer/storage.cljs
clojure
(ns flyer.storage "includes functions for storing window information. This window information is stored in the parent window under the `window-list-key`." (:require [flyer.utils :as utils])) (declare get-window-refs) (def storage (utils/get-main-parent)) (def window-list-key "flyer_WindowReferences") (de...
dda2273d0f3aef215859ab68f0332b66efb70f86aa6e4bfbf52ea17242bc9d30
Kakadu/fp2022
pass.mli
* Copyright 2021 - 2022 , Kakadu , and contributors * SPDX - License - Identifier : LGPL-3.0 - or - later module type State = sig type t end module Pass (S : State) : sig type 'r t (* Run *) val run_pass : 'a t -> init:S.t -> S.t * 'a (* Combinators *) val access : S.t t val put : S.t -> unit t ...
null
https://raw.githubusercontent.com/Kakadu/fp2022/853ab6831fdce3b3e1b68d49e5163d0293d56bf5/Golang/lib/pass.mli
ocaml
Run Combinators High-level combinators
* Copyright 2021 - 2022 , Kakadu , and contributors * SPDX - License - Identifier : LGPL-3.0 - or - later module type State = sig type t end module Pass (S : State) : sig type 'r t val run_pass : 'a t -> init:S.t -> S.t * 'a val access : S.t t val put : S.t -> unit t val return : 'r -> 'r t val bi...
313ead946b97773a026d0771f1c0323cdb849a951fa359b7bef9f90e0ca98669
clojupyter/clojupyter
inspect.clj
(ns clojupyter.kernel.handle-event.inspect (:require [clojure.string :as str] [io.simplect.compose.action :refer [step]] ,, [clojupyter.kernel.cljsrv :refer [nrepl-doc]] [clojupyter.kernel.handle-event.ops :refer [definterceptor s*append-enter-action s*set-response]] [clojupyter.messages ...
null
https://raw.githubusercontent.com/clojupyter/clojupyter/b54b30b5efa115937b7a85e708a7402bd9efa0ab/src/clojupyter/kernel/handle_event/inspect.clj
clojure
(ns clojupyter.kernel.handle-event.inspect (:require [clojure.string :as str] [io.simplect.compose.action :refer [step]] ,, [clojupyter.kernel.cljsrv :refer [nrepl-doc]] [clojupyter.kernel.handle-event.ops :refer [definterceptor s*append-enter-action s*set-response]] [clojupyter.messages ...
b512fe63a2a16b2c4a685145ada20e6c6677c707aa3d5228579121cff17f0dbd
peterhudec/cljsx
core_test.clj
(ns cljsx.core-test (:require [midje.sweet :refer [fact facts throws]] [cljsx.core :as sut])) (sut/defjsx my> my-jsx my-fragment) (defn my-jsx [tag props & children] {:tag tag :props props :children (into [] children)}) (def my-fragment "MY FRAGMENT") (fact "Custom JSX" (my> (+ 100 10 1)) ...
null
https://raw.githubusercontent.com/peterhudec/cljsx/3a23dbc085fed0c79d4e865c88ae7da55bdaa789/test/cljsx/core_test.clj
clojure
(ns cljsx.core-test (:require [midje.sweet :refer [fact facts throws]] [cljsx.core :as sut])) (sut/defjsx my> my-jsx my-fragment) (defn my-jsx [tag props & children] {:tag tag :props props :children (into [] children)}) (def my-fragment "MY FRAGMENT") (fact "Custom JSX" (my> (+ 100 10 1)) ...
ed7f8da19806f3b85b798d64604c887af79a8bcf6ca39f1a728a8847d15eeffa
processone/ejabberd
mod_configure.erl
%%%---------------------------------------------------------------------- File : Author : < > %%% Purpose : Support for online configuration of ejabberd Created : 19 Jan 2003 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne %%% %%% This program is free software; you can redistrib...
null
https://raw.githubusercontent.com/processone/ejabberd/c103182bc7e5b8a8ab123ce02d1959a54e939480/src/mod_configure.erl
erlang
---------------------------------------------------------------------- Purpose : Support for online configuration of ejabberd This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT...
File : Author : < > Created : 19 Jan 2003 by < > ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public Li...
874d6b5a6af62b9a12654bb4ab6eced68eb94bbeec15eea2c6ce1a118c0f0a23
realworldocaml/book
coq_lib_name.mli
open Import (* This file is licensed under The MIT License *) ( c ) MINES ParisTech 2018 - 2019 (* (c) INRIA 2020 *) Written by : (* This is in its own file due to dependency issues *) * A Coq library name is a dot - separated list of Coq module identifiers . type ...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_rules/coq_lib_name.mli
ocaml
This file is licensed under The MIT License (c) INRIA 2020 This is in its own file due to dependency issues * Returns the directory name for a lib name, in this case library name foo.bar lives in foo/bar to be removed in favor of encode / decode
open Import ( c ) MINES ParisTech 2018 - 2019 Written by : * A Coq library name is a dot - separated list of Coq module identifiers . type t val compare : t -> t -> Ordering.t * Returns the wrapper name , a dot - separated list of Coq module identifies val wrapper : t -> string val dir : t ...
733ca0b52431ebce434dbeb16e4977b9d32c59a0701c9b6a4e23841ce6fb4af7
rjnw/sham
stx.rkt
#lang racket (require racket/generic (for-template racket racket/syntax)) (require "generics.rkt") (provide (all-defined-out)) (define to-syntax ->syntax) converts a list of stx into an actual list syntax (define (seq->syntax . stxs) (define fs (flatten (->syntax (flatten stxs)))) #`(#,@fs)) (define ...
null
https://raw.githubusercontent.com/rjnw/sham/6e0524b1eb01bcda83ae7a5be6339da4257c6781/sham-sam/sham/sam/syntax/stx.rkt
racket
#lang racket (require racket/generic (for-template racket racket/syntax)) (require "generics.rkt") (provide (all-defined-out)) (define to-syntax ->syntax) converts a list of stx into an actual list syntax (define (seq->syntax . stxs) (define fs (flatten (->syntax (flatten stxs)))) #`(#,@fs)) (define ...
5fbda35412f5f4a1a7b8e1a6937b7c637c587ec964a13ee6d226731deaa1b2e6
cljdoc/cljdoc
layout.clj
(ns cljdoc.render.layout "Components to layout cljdoc pages" (:require [cljdoc.server.routes :as routes] [cljdoc.config :as config] [cljdoc.render.assets :as assets] [cljdoc.render.links :as links] [cljdoc.util.scm :as scm] [cljdoc-shared.proj :as proj] ...
null
https://raw.githubusercontent.com/cljdoc/cljdoc/81408a436c8099036be1451df012a94dbaf0b4ae/src/cljdoc/render/layout.clj
clojure
")]) TODO [:meta {:content "" :property "og:url"}] does n't add much and occupies a lot of space in Slack and similar [:meta {:content (str "" (get (:static-resources opts) "/cljdoc-logo-beta-square.png")) :property "og:image"}] Canonical URL .nl4 and .nr4 are negative margins based on the ...
(ns cljdoc.render.layout "Components to layout cljdoc pages" (:require [cljdoc.server.routes :as routes] [cljdoc.config :as config] [cljdoc.render.assets :as assets] [cljdoc.render.links :as links] [cljdoc.util.scm :as scm] [cljdoc-shared.proj :as proj] ...
c8ba3dc58b37eb4f27c80a7c597df7e68a9e139a188d655d5221d76a0650909b
wardle/pc4
dmt.clj
(ns com.eldrix.pc4.modules.dmt "Experimental approach to data downloads, suitable for short-term requirements for multiple sclerosis disease modifying drug post-marketing surveillance." (:require [clojure.data.csv :as csv] [clojure.data.json :as json] [clojure.edn :as edn] ...
null
https://raw.githubusercontent.com/wardle/pc4/0b38fb7648965232b1ef90fcb4d3f3affc22adf1/pc4-server/src/clj/com/eldrix/pc4/modules/dmt.clj
clojure
note: also significance based on whether admitted for problem I have used a different definition to the protocol as R03.0 is wrong this means 'hypertensive emergency' remove any entries after our date if no recent relapse recorded, record as FALSE explicitly. address-for-date will use 'now' if date nil, so wrap ...
(ns com.eldrix.pc4.modules.dmt "Experimental approach to data downloads, suitable for short-term requirements for multiple sclerosis disease modifying drug post-marketing surveillance." (:require [clojure.data.csv :as csv] [clojure.data.json :as json] [clojure.edn :as edn] ...
88edf20ab0d2e317243d8f3d637ac5ee6bd0dbafdbe3c06d5074b4df0c337431
valderman/haste-compiler
Storable.hs
----------------------------------------------------------------------------- -- | -- Module : Data.Array.Storable Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stability : experimental -- Portability : non-po...
null
https://raw.githubusercontent.com/valderman/haste-compiler/47d942521570eb4b8b6828b0aa38e1f6b9c3e8a8/libraries/ghc-7.10/array/Data/Array/Storable.hs
haskell
--------------------------------------------------------------------------- | Module : Data.Array.Storable License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : experimental Portability : non-portable (uses Data.Array.MArray) A storable array is an IO-mutable arra...
Copyright : ( c ) The University of Glasgow 2001 module Data.Array.Storable ( data StorableArray index element + index type must be in class Ix + element type must be in class module Data.Array.MArray, ) where import Data.Array.MArray import Data.Array.Storable.Internals
96ddabdf78809c67f3fb83344e976d65ca1cb79d5df28d42f60d7ac74f23c786
brendanhay/text-manipulate
Main.hs
{-# LANGUAGE OverloadedStrings #-} # OPTIONS_GHC -fno - warn - type - defaults # -- Module : Main Copyright : ( c ) 2014 - 2022 < > License : This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . A copy of the MPL can be found in the ...
null
https://raw.githubusercontent.com/brendanhay/text-manipulate/5b21510103a069537ad7b0f3a5b377f7cdb49d2b/test/Main.hs
haskell
# LANGUAGE OverloadedStrings # Module : Main you can obtain it at /. Stability : experimental
# OPTIONS_GHC -fno - warn - type - defaults # Copyright : ( c ) 2014 - 2022 < > License : This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . A copy of the MPL can be found in the LICENSE file or Maintainer : < > Portability : n...
a67f593a0602770a64d944615b52464351f972aa51a5affe7914fca5ffb77bdb
chrishowejones/blog-film-ratings
template.clj
(ns film-ratings.views.template (:require [hiccup.page :refer [html5 include-css include-js]] [hiccup.element :refer [link-to]] [hiccup.form :as form])) (defn page [content] (html5 [:head [:meta {:name "viewport" :content "width=device-width, initial-scale=1, shrink-to-fit=no"}] ...
null
https://raw.githubusercontent.com/chrishowejones/blog-film-ratings/652ca2aec583db4b91e60ef4008b08b388cca80a/src/film_ratings/views/template.clj
clojure
(ns film-ratings.views.template (:require [hiccup.page :refer [html5 include-css include-js]] [hiccup.element :refer [link-to]] [hiccup.form :as form])) (defn page [content] (html5 [:head [:meta {:name "viewport" :content "width=device-width, initial-scale=1, shrink-to-fit=no"}] ...
8e395be47b149763ea1592af02cecc567d2ef0e7d5ee3f589062f4ab2947f9e5
AeneasVerif/aeneas
Types.ml
include Charon.Types
null
https://raw.githubusercontent.com/AeneasVerif/aeneas/d8d661d02cf0068753ae3963156896492dfde50a/compiler/Types.ml
ocaml
include Charon.Types
31fbc7ede31da20261454af61e546409f420a8b1522eb70ae8a2c3271b9186e5
monadbobo/ocaml-core
monitor.mli
* A monitor is a context that determines what to do when there is an unhandled exception . Every Async computation runs within the context of some monitor , which , when the computation is running , is referred to as the " current " monitor . Monitors are arranged in a tree -- when a new monitor i...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/async/core/lib/monitor.mli
ocaml
* [create ()] returns a new monitor whose parent is the current monitor * [name t] returns the name of the monitor, or a unique id if no name was supplied to [create]. * [current ()] returns the current monitor * [errors t] returns a stream of all subsequent errors that monitor [t] sees. * [error t] returns...
* A monitor is a context that determines what to do when there is an unhandled exception . Every Async computation runs within the context of some monitor , which , when the computation is running , is referred to as the " current " monitor . Monitors are arranged in a tree -- when a new monitor i...
9a183ab0713c55ba1b42c671afff2ab002a9700dccd0c108aff19189362ebe26
argp/bap
oUnit.mli
(***********************************************************************) (* The OUnit library *) (* *) Copyright ( C ) 2002 - 2008 Maas - Maarten Zeeman . Copyright ( C ) 20...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ounit/src/oUnit.mli
ocaml
********************************************************************* The OUnit library See LICENSE for details. ...
Copyright ( C ) 2002 - 2008 Maas - Maarten Zeeman . Copyright ( C ) 2010 OCamlCore SARL * Unit test building blocks @author @author @author Maas-Maarten Zeeman @author Sylvain Le Gall *) * { 2 Assertions } Assertions...
fdf8d10f976b7a4d302edae73d140b59ed76dc2412ef1bc8989ac3a419b15505
fakedata-haskell/fakedata
CaTextSpec.hs
# LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} module CaTextSpec where import Data.Text (Text) import qualified Data.Text as T import Faker hiding (defaultFakerSettings) import qualified Faker.Color as CL import Faker.Combinators (listOf) import qualified Faker.Name as NA import Test.Hspec import...
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/e6fbc16cfa27b2d17aa449ea8140788196ca135b/test/CaTextSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables # module CaTextSpec where import Data.Text (Text) import qualified Data.Text as T import Faker hiding (defaultFakerSettings) import qualified Faker.Color as CL import Faker.Combinators (listOf) import qualified Faker.Name as NA import Test.Hspec import TestImport isText :: Text -> Bool...