_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
85dcbf17f6c68c8a539ea2789ee39cf950f267e0466b8d098cb9d54f0d890c67
c4-project/c4f
input.mli
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
null
https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/plumbing/src/input.mli
ocaml
* Type of input into a filter or similar construct. This module contains a type that describes how a filter should receive its input---for example, from a local file, or standard input. * Opaque type of inputs. * {2 Constructing an input} * [file fname] creates an input source for a given filename. * [file...
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
d5d45f6124ba74f6a85d90c2f352a2c65d6f9721fdb71c4c8e4ad65f55d19f19
yesodweb/wai
WithApplication.hs
{-# LANGUAGE OverloadedStrings #-} module Network.Wai.Handler.Warp.WithApplication ( withApplication, withApplicationSettings, testWithApplication, testWithApplicationSettings, openFreePort, withFreePort, ) where import Control.Concurrent import qualified UnliftIO import UnliftIO.Async ...
null
https://raw.githubusercontent.com/yesodweb/wai/02bb3a55fdd18d9e4cf414460b86290e702dc079/warp/Network/Wai/Handler/Warp/WithApplication.hs
haskell
# LANGUAGE OverloadedStrings # | Runs the given 'Application' on a free port. Passes the port to the given operation and executes it, while the 'Application' is running. Shuts down the server before returning. | 'withApplication' with given 'Settings'. This will ignore the port value set by 'setPort' in 'Settings...
module Network.Wai.Handler.Warp.WithApplication ( withApplication, withApplicationSettings, testWithApplication, testWithApplicationSettings, openFreePort, withFreePort, ) where import Control.Concurrent import qualified UnliftIO import UnliftIO.Async import Control.Monad (whe...
f56806d65e9b030feab82842cd82e67584a8cff8b289c537b299f4d59539b86d
ocaml-ppx/ocaml-migrate-parsetree
ast_410.ml
(**************************************************************************) (* *) (* OCaml Migrate Parsetree *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-ppx/ocaml-migrate-parsetree/4a05cf7a00d84e5f827cc9ae9c75e5dc85126085/src/ast_410.ml
ocaml
************************************************************************ OCaml Migrate Parsetree ...
, Facebook and , Europe , projet Cristal , INRIA Rocquencourt , LexiFi , projet Cristal , INRIA Rocquencourt Copyright 2018 Institu...
57014da60d122d4c4428e581707b61d55d50f2c78b9a98e42f28f8d4b2489d86
AccelerateHS/accelerate-llvm
Compare.hs
{-# OPTIONS_HADDOCK hide #-} -- | Module : . Instruction . Compare Copyright : [ 2016 .. 2020 ] The Accelerate Team -- License : BSD3 -- Maintainer : < > -- Stability : experimental Portability : non - portable ( GHC extensions ) -- module LLVM.AST.Type.Instruction.Compare where -- | O...
null
https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/cf081587fecec23a19f68bfbd31334166868405e/accelerate-llvm/src/LLVM/AST/Type/Instruction/Compare.hs
haskell
# OPTIONS_HADDOCK hide # | License : BSD3 Stability : experimental | Ordering predicate for comparison instructions
Module : . Instruction . Compare Copyright : [ 2016 .. 2020 ] The Accelerate Team Maintainer : < > Portability : non - portable ( GHC extensions ) module LLVM.AST.Type.Instruction.Compare where data Ordering = EQ | NE | LT | LE | GT | GE
fb15961a0966497d14127c3a31e4548c60acb5c4e5668b196e2536c111f4aa7b
obsidiansystems/beam-automigrate
Gen.hs
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # # OPTIONS_GHC -fno - warn - orphans # module Database.Beam.AutoMigrate.Schema.Gen ( genSchema, genSimilarSchemas, SimilarSchemas (..), shrinkSchema, ) where im...
null
https://raw.githubusercontent.com/obsidiansystems/beam-automigrate/93f86a29b81150ac356107b82225ac7f151d6e51/src/Database/Beam/AutoMigrate/Schema/Gen.hs
haskell
Arbitrary instances Generators | Generates a \"UNIQUE\" constraint. Restricts the eligible columns to only the ones which has \"standard\" SQL types, to avoid the complication of dealing with indexes. For example trying to use a JSON column would have Postgres fail with an error like: \"[..]data type json has...
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # # OPTIONS_GHC -fno - warn - orphans # module Database.Beam.AutoMigrate.Schema.Gen ( genSchema, genSimilarSchemas, SimilarSchemas (..), shrinkSchema, ) where im...
9add767ef699d99390e85e316b1a42c4423f3d9d0e60ad9893c6e3cf96a46824
w7cook/AoPL
FirstClassFunctionsTyping.hs
module FirstClassFunctionsTyping where import Prelude hiding (LT, GT, EQ, id) import Data.Maybe import Data.List import Operators --BEGIN:TypeA49 data Type = IntT | BoolT | FunT Type Type -- new deriving (Eq, Show) --END:TypeA49 data Value = IntV Int | BoolV Bool deriving (Eq, ...
null
https://raw.githubusercontent.com/w7cook/AoPL/af2f9d31ec658e9d175735335ad27101cca3e247/src/FirstClassFunctionsTyping.hs
haskell
BEGIN:TypeA49 new END:TypeA49 BEGIN:TypeA42 changed END:TypeA42 BEGIN:TypeAEnv END:TypeAEnv BEGIN:TypeSumm14 BEGIN:Type12 BEGIN:TypeSummDecl END:TypeSummDecl END:Type12 BEGIN:TypeA41 new END:TypeA41 BEGIN:TypeA47 END:TypeSumm14 END:TypeA47 BEGIN:Type16 END:Type16
module FirstClassFunctionsTyping where import Prelude hiding (LT, GT, EQ, id) import Data.Maybe import Data.List import Operators data Type = IntT | BoolT deriving (Eq, Show) data Value = IntV Int | BoolV Bool deriving (Eq, Show) data Exp = Literal Value | Unary UnaryOp Exp...
ad834bdece275c2eb46b52d7492cc88f0e331b1e55c0f99cc15d1c400563a1ba
mbutterick/pollen
cache.rkt
#lang racket/base (require racket/file racket/list racket/path sugar/define "private/cache-utils.rkt" "private/log.rkt" "setup.rkt") ;; The cache is a hash with paths as keys. ;; The cache values are also hashes, with key/value pairs for that path. (define (cache-...
null
https://raw.githubusercontent.com/mbutterick/pollen/a4910a86dc62d1147f3aad94b56cecd6499d7aa6/pollen/cache.rkt
racket
The cache is a hash with paths as keys. The cache values are also hashes, with key/value pairs for that path. brings in currently instantiated params (unlike namespace-require)
#lang racket/base (require racket/file racket/list racket/path sugar/define "private/cache-utils.rkt" "private/log.rkt" "setup.rkt") (define (cache-directory? path) (and (directory-exists? path) (member (path->string (last (explode-path path))) default-ca...
f0cbb733ae155cbb95a7e66892ffa0ca1aa82821c0fdcc9a0f01fc3b4514df4f
v-kolesnikov/sicp
1_17_test.clj
(ns sicp.chapter01.1-17-test (:require [clojure.test :refer :all] [sicp.test-helper :refer :all] [sicp.chapter01.1-17 :refer :all])) (deftest test-fast-mult (assert-equal 0 (fast-mult 10 0)) (assert-equal 10 (fast-mult 10 1)) (assert-equal 100 (fast-mult 10 10)) (assert-equal -100 (fa...
null
https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/test/sicp/chapter01/1_17_test.clj
clojure
(ns sicp.chapter01.1-17-test (:require [clojure.test :refer :all] [sicp.test-helper :refer :all] [sicp.chapter01.1-17 :refer :all])) (deftest test-fast-mult (assert-equal 0 (fast-mult 10 0)) (assert-equal 10 (fast-mult 10 1)) (assert-equal 100 (fast-mult 10 10)) (assert-equal -100 (fa...
3e46bb6d6222e5f4ff20e0b1c3c2b0e2cd1ee44525199ba7600a0f7e0ff83d41
qfpl/reflex-backend-socket
Server.hs
# LANGUAGE RecursiveDo # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE TypeFamilies # # LANGUAGE ScopedTypeVariables # | Copyright : ( c ) 2018 - 2019 , Commonwealth Scientific and Industrial Research Organisation License...
null
https://raw.githubusercontent.com/qfpl/reflex-backend-socket/d147d0f0f56cf29498532ee2b4df816bfaf8600c/example/Server.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # Maintain a map of all open sockets, indexed by their occurrence number. Pick out the "data received" events, and go from "dynamic map of events" to "dynamic of (event of map)" listen to the latest Event Couldn't open listen socket ...
# LANGUAGE RecursiveDo # # LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # # LANGUAGE ScopedTypeVariables # | Copyright : ( c ) 2018 - 2019 , Commonwealth Scientific and Industrial Research Organisation License : : , Stability : experimental Portability : non - portable Copyright : ...
3e19fce8f9140493a9fb7ba9256db7ca4f8a628ad688a55ccae228c225e36396
draperlaboratory/cbat_tools
test.ml
(***************************************************************************) (* *) Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc. (* *) (* This...
null
https://raw.githubusercontent.com/draperlaboratory/cbat_tools/2f8fffcba09d863912156afa055411c9f0dc30f9/wp/lib/bap_wp/tests/unit/test.ml
ocaml
************************************************************************* This file is provided under the license found in the LICENSE file in the top-level director...
Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc. This work is funded in part by ONR / NAWC Contract N6833518C0107 . Its content does not necessarily reflect the position or policy of the US open OUnit2 let suite = "Unit Tests" >::: [ "Precondition" >::: Test_preconditio...
96e5972c61fc3ca63f3f0c3bbd60f6d755222eae627837c2e9fa7ea879253239
sir4ur0n/blog
Lib.hs
module PolysemyTestsLogging.Lib where import Polysemy import PolysemyTestsLogging.Logging import PolysemyTestsLogging.Business main :: IO () main = do m <- readLn :: IO Integer n <- readLn :: IO Integer result <- runM . logToIO $ myBusinessFunction m n putStrLn $ "The business result is " <> show result
null
https://raw.githubusercontent.com/sir4ur0n/blog/789d695ae266f953952fb19f1b85098d588bd793/code-examples/src/PolysemyTestsLogging/Lib.hs
haskell
module PolysemyTestsLogging.Lib where import Polysemy import PolysemyTestsLogging.Logging import PolysemyTestsLogging.Business main :: IO () main = do m <- readLn :: IO Integer n <- readLn :: IO Integer result <- runM . logToIO $ myBusinessFunction m n putStrLn $ "The business result is " <> show result
0779d0e884a03da8360c400551320e8c20010bda57ed894e3266d4db06033e2a
wrengr/unification-fd
FeatureStructure.hs
{-# LANGUAGE DeriveFunctor , DeriveFoldable , DeriveTraversable #-} {-# OPTIONS_GHC -Wall -fwarn-tabs #-} ---------------------------------------------------------------- -- ~ 2021.10.17 -- | Module : Copyright : Copyrig...
null
https://raw.githubusercontent.com/wrengr/unification-fd/16301b1630a3a75168da0dd7d744c91dfaf007cc/test/experiments/feature-structures/FeatureStructure.hs
haskell
# LANGUAGE DeriveFunctor , DeriveFoldable , DeriveTraversable # # OPTIONS_GHC -Wall -fwarn-tabs # -------------------------------------------------------------- ~ 2021.10.17 | Maintainer : Stability : experimental Portability :...
Module : Copyright : Copyright ( c ) 2012 - -2021 wren License : BSD module FeatureStructure where import Prelude hiding ( mapM, mapM_, sequence, foldr, foldr1, foldl, foldl1 , any, all, and, or, elem ) import qualified Data.Map as M import Data.Foldable import Data.Traversable...
c3a4e9f7ea95fade42d16645d62c534ec6f12b0c1ff0873152f7b32c29afb06b
aggelgian/erlang-algorithms
graph_lib.erl
%% @doc Library Functions for Graph Algorithms %% -module(graph_lib). -export([reconstruct_all_paths/2, reconstruct_flow/1]). -export_type([vpath/0, path_info/0, mst/0, mst_info/0, epath/0, epath_weighted/0, flow/0]). %% @type path_info ( ) . It is used for the result of BFS , DFS and Dijkstra al...
null
https://raw.githubusercontent.com/aggelgian/erlang-algorithms/8ceee72146f2a6eff70a16e3e9a74d2ed072fa0a/src/graph_lib.erl
erlang
@doc Library Functions for Graph Algorithms <p>It's a tuple <code>{Vertex, {Cost, Path}}</code> that contains the information about the <code>Cost :: number()</code> and <code>Path :: vpath()</code> of a <code>Vertex</code>. If a vertex cannot be reached from the root vertex then instead of<code>{Cost, Path}</...
-module(graph_lib). -export([reconstruct_all_paths/2, reconstruct_flow/1]). -export_type([vpath/0, path_info/0, mst/0, mst_info/0, epath/0, epath_weighted/0, flow/0]). @type path_info ( ) . It is used for the result of BFS , DFS and Dijkstra algorithms . @type flow ( ) . It is used for the resu...
a3a6189f86e739e0f963fd33916a2355528d84d881a20fc1372643476ce9871c
ryukinix/lisp-chat
server.lisp
;; Common Lisp Script (defpackage #:lisp-chat/server (:use #:usocket #:cl #:lisp-chat/config #:bordeaux-threads) (:export #:main)) (in-package :lisp-chat/server) ;; global vars (defvar *day-names* '("Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" "...
null
https://raw.githubusercontent.com/ryukinix/lisp-chat/8a1e1809633517b6ac7debb18087b848b0061086/src/server.lisp
lisp
Common Lisp Script global vars thread control user commands prefixed with / a function defined to handle the errors of client thread
(defpackage #:lisp-chat/server (:use #:usocket #:cl #:lisp-chat/config #:bordeaux-threads) (:export #:main)) (in-package :lisp-chat/server) (defvar *day-names* '("Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" "Sunday") "Day names") (defvar *upti...
8ccbf8a6433c215a9cd19a7bad5a47118f9245f52a637047bd0ae2cf0494ca42
oofp/Beseder
BlackJackAutoApp.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE PolyKinds # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE PartialTypeSignatures #-} # LANGUAG...
null
https://raw.githubusercontent.com/oofp/Beseder/a0f5c5e3138938b6fa18811d646535ee6df1a4f4/Examples/BlackJack/Apps/BlackJackAutoApp.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE PartialTypeSignatures # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # OPTIONS_GHC -fomit-interface-pragmas # '[()] '[] ()
# LANGUAGE FlexibleInstances # # LANGUAGE PolyKinds # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # # LANGUAGE RebindableSyntax # # LANGUAGE TypeApplications # # LANGUAGE UndecidableInstances # # LANGUAGE NoMonomorphismRestriction # # LANGUAGE OverloadedL...
028f66cc9a12001447abf636f75a76c6efd956a9f0d04df1d9b774a1b4a214a1
lispbuilder/lispbuilder
primitives.lisp
SDL ( Simple Media Layer ) library using CFFI for foreign function interfacing ... ( C)2006 Justin Heyes - Jones < > and < > Thanks to and ;; see COPYING for license This file contains some useful functions for using SDL from Common lisp ;; using sdl.lisp (the CFFI wrapper) (in-package #:lispbuilder-sd...
null
https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-sdl/sdl/primitives.lisp
lisp
see COPYING for license using sdl.lisp (the CFFI wrapper)
SDL ( Simple Media Layer ) library using CFFI for foreign function interfacing ... ( C)2006 Justin Heyes - Jones < > and < > Thanks to and This file contains some useful functions for using SDL from Common lisp (in-package #:lispbuilder-sdl)
3fd7b20f0e16f1318d84920a728fbdf5a086b4c184ea8920c0b08cc24f94ba9d
russmatney/org-crud
doctor.clj
(ns org-crud.doctor (:require [babashka.fs :as fs] [org-crud.core :as core] [org-crud.update :as update])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; org helpers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defn org-files "Fetc...
null
https://raw.githubusercontent.com/russmatney/org-crud/11069d59925461601718c4bb4c29f74126093891/src/org_crud/doctor.clj
clojure
org helpers duplicate ids (println "item: " item) NOTE some interactions might necessitate a re-parse of the file ex: if lines are deleted and line-nums are relied on for updating here we use a function, not the simpler update!, to avoid setting the same uuid to all the new found ones. cli interface
(ns org-crud.doctor (:require [babashka.fs :as fs] [org-crud.core :as core] [org-crud.update :as update])) (defn org-files "Fetches org-files. Only recurses one layer, collecting roughly todo/*, todo/garden/*." [] (let [org-dir-path "/home/russ/todo"] (->> org-dir-path fs/list-dir ...
fb2c4855dce2b381a28fd86a349faed400b6e4f669b7fdc67a05f06aa2efc199
LaurentMazare/ocaml-jupyter-async
kernel_toploop.mli
include Jupyter_async.Kernel_intf.S
null
https://raw.githubusercontent.com/LaurentMazare/ocaml-jupyter-async/c7a4e237c108ffa8be9ccfe560ff4758ff6bf74c/src/toploop/kernel_toploop.mli
ocaml
include Jupyter_async.Kernel_intf.S
e08dcb2ddceac68eab819fb19e8a797d5867b04a0c2508dc0ad037e7aa9bc154
digital-asset/ghc
StrictBinds.hs
# LANGUAGE MagicHash # module StrictBinds where import GHC.Exts foo = let x = 3# +# y y = x in True
null
https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_fail/StrictBinds.hs
haskell
# LANGUAGE MagicHash # module StrictBinds where import GHC.Exts foo = let x = 3# +# y y = x in True
4aa1c22bb5ad49d0ee486a18981e64ce5cff1c1c8cd45bc787dfe1741fdd3663
camsaul/methodical
everything_test.clj
(ns methodical.impl.dispatcher.everything-test (:require [clojure.string :as str] [clojure.test :as t] [methodical.core :as m])) (def ^:private f (-> (m/multifn (m/standard-multifn-impl (m/do-method-combination) (m/everything-dispatcher) (m/standard-method-tab...
null
https://raw.githubusercontent.com/camsaul/methodical/b319d0a11b392388ff421dfc98e46e5b3536e2fa/test/methodical/impl/dispatcher/everything_test.clj
clojure
(ns methodical.impl.dispatcher.everything-test (:require [clojure.string :as str] [clojure.test :as t] [methodical.core :as m])) (def ^:private f (-> (m/multifn (m/standard-multifn-impl (m/do-method-combination) (m/everything-dispatcher) (m/standard-method-tab...
1f79a0f58eb397747d785459dd20327a3cebc3e26870bbd989d2c589b3996d98
himura/persistent-relational-record
Model.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE QuasiQuotes # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies...
null
https://raw.githubusercontent.com/himura/persistent-relational-record/fcbadcb10b6efc0fe413a0dab7cb9b7e103355d8/examples/Model.hs
haskell
# LANGUAGE GADTs #
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE QuasiQuotes # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE Undecidab...
0d75532794aa5f7eba4af80564443b9760a3deddcd99771f756036ec854925cf
simplex-chat/simplexmq
Transport.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE InstanceSigs # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LA...
null
https://raw.githubusercontent.com/simplex-chat/simplexmq/e4aad7583f425765c605cd8042e3136e048bdbec/src/Simplex/Messaging/Transport.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # | Module : Simplex.Messaging.Transport Copyright : (c) simplex.chat License : AGPL-3 Maintainer : Stability : experimental Portability : non-portable This module defines basic TCP server and client and SMP protocol en...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE InstanceSigs # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Simplex.Messaging.Trans...
fee356c6042c84f8bf1cd5f548378079ab3352d3adc329c8913acca447d0de38
andrenth/srsly
srs_util.ml
open Lwt open Util let read_srs_secrets () = let file = Srslyd_config.srs_secret_file () in let dir = Srslyd_config.srs_secrets_directory () in Lwt_io.with_file ~mode:Lwt_io.input file Lwt_io.read_line >>= fun secret -> Lwt_stream.to_list (Lwt_unix.files_of_directory dir) >>= fun secrets -> return (secret, s...
null
https://raw.githubusercontent.com/andrenth/srsly/fce92645781a6a6037512be4d35116ec53737b17/src/srs_util.ml
ocaml
open Lwt open Util let read_srs_secrets () = let file = Srslyd_config.srs_secret_file () in let dir = Srslyd_config.srs_secrets_directory () in Lwt_io.with_file ~mode:Lwt_io.input file Lwt_io.read_line >>= fun secret -> Lwt_stream.to_list (Lwt_unix.files_of_directory dir) >>= fun secrets -> return (secret, s...
a18b3e21ec1b45cf0a5ee6c82b8dce8061324eaa293f62ffddda1693f55978e5
nathanmarz/cascalog
accumulators.clj
;; Accumulators by last updated May 19 , 2009 ;; This module defines various accumulators (list, vector, map, ;; sum, product, counter, and combinations thereof) with a common interface defined by the multimethods add and combine . ;; For each accumulator type, its empty value is defined in this module. ;; Ap...
null
https://raw.githubusercontent.com/nathanmarz/cascalog/deaad977aa98985f68f3d1cc3e081d345184c0c8/cascalog-math/src/cascalog/math/contrib/accumulators.clj
clojure
Accumulators This module defines various accumulators (list, vector, map, sum, product, counter, and combinations thereof) with a common For each accumulator type, its empty value is defined in this module. Applications typically use this as a starting value and add data using the add multimethod. Public License...
by last updated May 19 , 2009 interface defined by the multimethods add and combine . Copyright ( c ) , 2009 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse (ns ^{:author "Konrad Hinsen" :doc "A generic accumulator interface and implementati...
8cefd83f58e44c58edd3781eaff3b8cbca8f151fa5c6c38a4704e0da2a9038ec
PLSysSec/lio
Common.hs
# LANGUAGE Trustworthy # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleContexts # {-# LANGUAGE DeriveDataTypeable #-} module Chat.Common where import Prelude hiding (writeFil...
null
https://raw.githubusercontent.com/PLSysSec/lio/622a3e7bc86a3b42ab4ce8be954064a5f142247a/lio-simple/examples/chat-in-memory/Chat/Common.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE TypeSynonymInstances # # LANGUAGE DeriveDataTypeable # Data model | Object Ids. Use random integers when considering malicious code. | Data type abstracting a model NB: if we didn't have nextId then, on insert, we would take a lock on the whole "DB" and if the label funct...
# LANGUAGE Trustworthy # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleContexts # module Chat.Common where import Prelude hiding (writeFile, readFile, appendFile) import Control.Applicative import Control.Monad import Data.Maybe import Data.Monoid...
c81c775a2eda1df31a41292637a1ca46410961e8347fb9f38052bdfaa8c1842e
discus-lang/ddc
Controller.hs
-- | Gang controller and user interface. module DDC.War.Interface.Controller ( Config (..) , controller) where import DDC.War.Driver import BuildBox.Control.Gang import System.IO import Control.Concurrent import Control.Concurrent.STM.TChan import Control.Monad.STM import Control.Monad import Da...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-tools/src/ddc-war/DDC/War/Interface/Controller.hs
haskell
| Gang controller and user interface. | Allow the user to control the driver from the console, and ask what to do interactively if a file is different than expected. | Pad test names out to this column width. | Suppress this prefix from the front of displayed test names. Test names usually have fully qualifie...
module DDC.War.Interface.Controller ( Config (..) , controller) where import DDC.War.Driver import BuildBox.Control.Gang import System.IO import Control.Concurrent import Control.Concurrent.STM.TChan import Control.Monad.STM import Control.Monad import Data.List import Data.Maybe import qualifie...
809f092f7f3fe7fd2fdcc54ecf2b4aaf6c49f6099bc3ec7999992af703819d0b
robert-strandh/SICL
add-remove-method.lisp
(cl:in-package #:sicl-clos) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Generic function ADD - METHOD . ;;; ;;; For the specification of this generic function, see ;;; -MOP/add-method.html ;;; ;;; This generic function is also specified in the CLHS. ;;; #add-method (defgeneric add-method (gener...
null
https://raw.githubusercontent.com/robert-strandh/SICL/d84e63931fa509d7c70e125dbce79d0b5cdb4c83/Code/CLOS/add-remove-method.lisp
lisp
For the specification of this generic function, see -MOP/add-method.html This generic function is also specified in the CLHS. #add-method For the specification of this generic function, see -MOP/remove-method.html This generic function is also specified in the CLHS. #remove-method Update the speciali...
(cl:in-package #:sicl-clos) Generic function ADD - METHOD . (defgeneric add-method (generic-function method)) Generic function REMOVE - METHOD . (defgeneric remove-method (generic-function method)) Utilities (defun compute-specializer-profile (existing-profile specializers) (loop with class-t = (find-clas...
8f3d8006af136da392d918393df9ff5ee5978295e374e64734e07ff9303123ed
tcsprojects/pgsolver
priopromdelay.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * The Delayed Promotion Procedure ...
null
https://raw.githubusercontent.com/tcsprojects/pgsolver/b0c31a8b367c405baed961385ad645d52f648325/src/solvers/priopromdelay.ml
ocaml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * The Delayed Promotion Procedure ...
c94b38a1275413e8ab63873eacc97050b1830f674dcc798291cae525ba21d287
input-output-hk/cardano-ledger
ConcreteCryptoTypes.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Test.Cardano.Ledger.Shelley.ConcreteCryptoTypes ( Mock, ExMock, C_Crypto, C, TestCrypto, StandardCrypto, ) where import Cardano.Crypto.DSIGN (MockDSIGN, ...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/ConcreteCryptoTypes.hs
haskell
# LANGUAGE ConstraintKinds # | Mocking constraints used in generators | Additional mocking constraints used in examples.
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Test.Cardano.Ledger.Shelley.ConcreteCryptoTypes ( Mock, ExMock, C_Crypto, C, TestCrypto, StandardCrypto, ) where import Cardano.Crypto.DSIGN (MockDSIGN, VerKeyDSIGN) import qualified Car...
d9f8fd1842e29349c14105c0b6e5a8eeaae7f4bb6fb36792e04593ed9fa980ee
Eonblast/Scalaxis
proposer.erl
2009 - 2011 Zuse Institute Berlin , 2010 onScale solutions GmbH Licensed under the Apache License , Version 2.0 ( the " License " ) ; % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % -2.0 % % Unless required by applicable l...
null
https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/src/paxos/proposer.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language gov...
2009 - 2011 Zuse Institute Berlin , 2010 onScale solutions GmbH Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > @doc Description : Part of generic Paxos - Consensus implementation -mod...
246b336d851d39d87bf70607609739e0feabb58154f46a2e726b9ca5fde958b0
slipstream/SlipStreamServer
dummy_lifecycle_test.clj
(ns com.sixsq.slipstream.connector.dummy-lifecycle-test (:require [clojure.test :refer [deftest use-fixtures]] [com.sixsq.slipstream.connector.dummy-template :as cit] [com.sixsq.slipstream.ssclj.resources.connector-test-utils :as tu] [com.sixsq.slipstream.ssclj.resources.lifecycle-test-utils :as ltu])...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/dummy-connector/config/test/com/sixsq/slipstream/connector/dummy_lifecycle_test.clj
clojure
(ns com.sixsq.slipstream.connector.dummy-lifecycle-test (:require [clojure.test :refer [deftest use-fixtures]] [com.sixsq.slipstream.connector.dummy-template :as cit] [com.sixsq.slipstream.ssclj.resources.connector-test-utils :as tu] [com.sixsq.slipstream.ssclj.resources.lifecycle-test-utils :as ltu])...
715550a30c7a861094598ca5b1c391a2b8fbd8889f7e2239d8298feae755dffa
deadeyejoe/fabrikk
core.cljc
(ns fabrikk.execution.core (:require [fabrikk.build-context.interface :as context] [fabrikk.directive-core.interface :as directive-core] [fabrikk.directory.interface :as directory] [fabrikk.entity.interface :as entity] [fabrikk.factory.interface :as factory] ...
null
https://raw.githubusercontent.com/deadeyejoe/fabrikk/c731cd435baaf241450a9b280286b894c8cee81c/components/execution/src/fabrikk/execution/core.cljc
clojure
update the value after the context/associate calls, overwriting the list of assoc-as values
(ns fabrikk.execution.core (:require [fabrikk.build-context.interface :as context] [fabrikk.directive-core.interface :as directive-core] [fabrikk.directory.interface :as directory] [fabrikk.entity.interface :as entity] [fabrikk.factory.interface :as factory] ...
d4883055b2f40866389b7ddad54ea7c719f08a230514ab1815a326222946449e
smallhadroncollider/taskell
MoveTo.hs
module Taskell.UI.Draw.Modal.MoveTo ( moveTo ) where import ClassyPrelude import Control.Lens ((^.)) import Brick import Taskell.Data.List (title) import Taskell.Events.State.Types (current, lists) import Taskell.Types (showListIndex) import Taskell.UI.Draw.Field (textField) impor...
null
https://raw.githubusercontent.com/smallhadroncollider/taskell/3c731476e9a58ede300cfa83aba412509b132a3e/src/Taskell/UI/Draw/Modal/MoveTo.hs
haskell
module Taskell.UI.Draw.Modal.MoveTo ( moveTo ) where import ClassyPrelude import Control.Lens ((^.)) import Brick import Taskell.Data.List (title) import Taskell.Events.State.Types (current, lists) import Taskell.Types (showListIndex) import Taskell.UI.Draw.Field (textField) impor...
3a3f6eedfb45d0163ec83a2a48a69184b0147e609829a15674dd13048671297b
athos/kitchen-async
runner.cljs
(ns kitchen-async.runner (:require [doo.runner :refer-macros [doo-tests]] kitchen-async.promise-test kitchen-async.promise.from-channel-test)) (enable-console-print!) (doo-tests 'kitchen-async.promise-test 'kitchen-async.promise.from-channel-test)
null
https://raw.githubusercontent.com/athos/kitchen-async/1f28eab4ef7126e0b8b6fd8d8887beeab7430fea/test/jvm/kitchen_async/runner.cljs
clojure
(ns kitchen-async.runner (:require [doo.runner :refer-macros [doo-tests]] kitchen-async.promise-test kitchen-async.promise.from-channel-test)) (enable-console-print!) (doo-tests 'kitchen-async.promise-test 'kitchen-async.promise.from-channel-test)
9e499b2b75775852eea776a93f48faaaec9b7a6401af1f371e98f2b972c906a9
jgm/hsb2hs
Setup.hs
import Distribution.Simple import Distribution.Simple.PreProcess import Distribution.Simple.Utils (info) import System.Directory import System.Process import System.Exit main :: IO () main = defaultMainWithHooks simpleUserHooks{ hookedPreProcessors = [ppBlobSuffixHandler] } ppBlobSuffixHandler :: PPSu...
null
https://raw.githubusercontent.com/jgm/hsb2hs/0783a947aaed223465b08aa30e5b3b1f7c9103b9/sample/Setup.hs
haskell
import Distribution.Simple import Distribution.Simple.PreProcess import Distribution.Simple.Utils (info) import System.Directory import System.Process import System.Exit main :: IO () main = defaultMainWithHooks simpleUserHooks{ hookedPreProcessors = [ppBlobSuffixHandler] } ppBlobSuffixHandler :: PPSu...
9ac24cb973bfb46a9342e225b3b9f4d8e78176ab07962b8e1294c915c61bb8bb
lispgames/cl-sdl2
rect.lisp
(in-package #:sdl2) (defun make-point (x y) "Return an SDL_Point filled in with the arguments." (c-let ((point sdl2-ffi:sdl-point)) (setf (point :x) x (point :y) y) point)) (define-struct-accessors (point sdl2-ffi:sdl-point) :x :y) (defmacro c-point ((wrapper-var) &body body) `(c-let ((,wra...
null
https://raw.githubusercontent.com/lispgames/cl-sdl2/80410b514570ca06894675d4a2a5fc93287ea7b6/src/rect.lisp
lisp
used as a helper for with-points used as a helper for with-rects The implementation of the SDL_rect.h methods. SDL_RectF used as a helper for with-f-rects
(in-package #:sdl2) (defun make-point (x y) "Return an SDL_Point filled in with the arguments." (c-let ((point sdl2-ffi:sdl-point)) (setf (point :x) x (point :y) y) point)) (define-struct-accessors (point sdl2-ffi:sdl-point) :x :y) (defmacro c-point ((wrapper-var) &body body) `(c-let ((,wra...
6329a17785ac056d3ed8ae57de1d6ab7dc11fe32b269e68e5d53a04f85201f43
rlenglet/logtilla
gen_log_analyzer.erl
2009 Google Inc. @author < > %% [/] %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, software...
null
https://raw.githubusercontent.com/rlenglet/logtilla/4335b1a9b23c9edaf793cef55bbaa24008491d78/src/gen_log_analyzer.erl
erlang
[/] you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governi...
2009 Google Inc. @author < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , The { @type LogEntry } record type is defined in header file ` ` ` handle_call(Msg::any ( ) , { From::pid ( ) , ( ) } , { ' r...
48447f3affcdb297d0f652f11f394377c0705c78984599504aa544e5829c4036
jborden/leaderboard-api
core.clj
(ns leaderboard-api.core (:require [clojure.string :as string])) ;; see -approach-for-generating-api-key ;; see #randomUUID() note that " Static factory to retrieve a type 4 ( pseudo randomly generated ) UUID . The UUID is generated using a cryptographically strong pseudo random number generator " ;; this is good ...
null
https://raw.githubusercontent.com/jborden/leaderboard-api/f5861c8a59eba634b95222cac3a04668afdcf66a/src/leaderboard_api/core.clj
clojure
see -approach-for-generating-api-key see #randomUUID() this is good enough for our purposes now
(ns leaderboard-api.core (:require [clojure.string :as string])) note that " Static factory to retrieve a type 4 ( pseudo randomly generated ) UUID . The UUID is generated using a cryptographically strong pseudo random number generator " (defn uuid [] (string/replace (str (java.util.UUID/randomUUID)) #"-" "")) (d...
0f3cccd1d98330854f8f0855589131a71b3ad0f4b559019650ac9b520d3f628d
fission-codes/fission
UCAN.hs
module Web.UCAN ( parse , module Web.UCAN.Types ) where import Data.Aeson import RIO import qualified RIO.Text as Text import Web.UCAN.Resolver.Error as Resolver import Web.UCAN.Types parse :: ( FromJSON fct , FromJSON rsc , FromJSON ptc ) => ByteString -> E...
null
https://raw.githubusercontent.com/fission-codes/fission/3435bd70c35db0350a1b13050b19c19651c165e4/hs-ucan/library/Web/UCAN.hs
haskell
module Web.UCAN ( parse , module Web.UCAN.Types ) where import Data.Aeson import RIO import qualified RIO.Text as Text import Web.UCAN.Resolver.Error as Resolver import Web.UCAN.Types parse :: ( FromJSON fct , FromJSON rsc , FromJSON ptc ) => ByteString -> E...
1223dff35950c5ff1633a3fa03e798637e7e3e6a0a61ab880929722a16515aa3
johanhaleby/stub-http
core.clj
(ns stub-http.core (:import (java.io Closeable) (fi.iki.elonen NanoHTTPD)) (:require [clojure.test :refer [function?]] [stub-http.internal.port :refer [get-free-port!]] [stub-http.internal.functions :refer [not-nil?]] [stub-http.internal.server :as nano] [s...
null
https://raw.githubusercontent.com/johanhaleby/stub-http/6ad71d8e72e9fca761b647d262f89b84cd54777e/src/stub_http/core.clj
clojure
Do actual HTTP request
(ns stub-http.core (:import (java.io Closeable) (fi.iki.elonen NanoHTTPD)) (:require [clojure.test :refer [function?]] [stub-http.internal.port :refer [get-free-port!]] [stub-http.internal.functions :refer [not-nil?]] [stub-http.internal.server :as nano] [s...
1779e52193b81e44ad17b4c03f1a702a58b8c271ce8b89afa7235d540f2b8325
rothfield/doremi-script
project.clj
(defproject doremi-server "0.1.0-SNAPSHOT" :description "doremi-script: Easy to use textual music notation supporting multiple dialects (ABC 123 AACM and Hindi/Bhatkande. " :url "-script" :dependencies [ [org.clojure/clojure "1.7.0-beta1"] [org.clojure/core.incubator "0.1.3"] ...
null
https://raw.githubusercontent.com/rothfield/doremi-script/7141720e14bb0dbac344b55caab47c4f046635a5/project.clj
clojure
mustache implementation-clostache is broken ************ I'm using boot to compile cljs ***** :target :nodejs
(defproject doremi-server "0.1.0-SNAPSHOT" :description "doremi-script: Easy to use textual music notation supporting multiple dialects (ABC 123 AACM and Hindi/Bhatkande. " :url "-script" :dependencies [ [org.clojure/clojure "1.7.0-beta1"] [org.clojure/core.incubator "0.1.3"] ...
e8b35107bd214586c74614550c2a8f919ac42d54d56248fd9167e637857deeee
CodyReichert/qi
package.lisp
$ Id$ $ URL$ ;;;; See the LICENSE file for licensing information. (in-package :cl-user) (defpackage :usocket-test (:use :common-lisp :usocket :regression-test) (:export #:do-tests #:run-usocket-tests))
null
https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/usocket-latest/test/package.lisp
lisp
See the LICENSE file for licensing information.
$ Id$ $ URL$ (in-package :cl-user) (defpackage :usocket-test (:use :common-lisp :usocket :regression-test) (:export #:do-tests #:run-usocket-tests))
010790466ac45507b0821112b9a674ac113d16c63df425345ae8c401b3e4d821
atolab/apero-core
abuf.ml
open Identifiers module Id = NumId.Make(Int64) type byte = Abytes.byte type bigstring = Abytes.bigstring type t = { id : Id.t; buffer : Abytes.t; mutable r_pos : int; mutable w_pos : int; mutable r_mark : int; mutable w_mark : int; } let compare a b = Id.compare a.id b.id let equal a b = Id.equal a.id...
null
https://raw.githubusercontent.com/atolab/apero-core/6e8b9bb8383de641396463fb4e5685b7f135755c/lib/abuf.ml
ocaml
open Identifiers module Id = NumId.Make(Int64) type byte = Abytes.byte type bigstring = Abytes.bigstring type t = { id : Id.t; buffer : Abytes.t; mutable r_pos : int; mutable w_pos : int; mutable r_mark : int; mutable w_mark : int; } let compare a b = Id.compare a.id b.id let equal a b = Id.equal a.id...
bdcd7e60bb87fbc492fab2144721957276b64c2fe211cac7d491184f1b9c0803
reagent-project/reagent-cursor
cursor.cljs
copyright ( c ) 2014 (ns reagent.cursor "Optional cursor support for Reagent. (:require [reagent.cursor :as rc]) (rc/cursor [:path :to :some :item] some-ratom) The cursor behaves in all ways like a regular Reagent atom except that it dereferences to the specified path inside the atom and updates to ...
null
https://raw.githubusercontent.com/reagent-project/reagent-cursor/eba5797ba3f295728e19ed5aa156dbdf2a56e6dc/src/reagent/cursor.cljs
clojure
not sure about how this should be implemented? should it print as an atom focused on the appropriate part of the ratom - (pr-writer (get-in @ratom path)) - or should it be a completely separate type? and do we need a reader for it? Until further investigation, it should simply be REPL friendly. the current value ...
copyright ( c ) 2014 (ns reagent.cursor "Optional cursor support for Reagent. (:require [reagent.cursor :as rc]) (rc/cursor [:path :to :some :item] some-ratom) The cursor behaves in all ways like a regular Reagent atom except that it dereferences to the specified path inside the atom and updates to ...
36a85f233acb5484ed150d939ead39042aa9b3da17e24f36a2873df1cdc2d07d
dnadales/sandbox
Injection.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TypeFamilies # {-# LANGUAGE TypeOperators #-} # LANGUAGE Undecid...
null
https://raw.githubusercontent.com/dnadales/sandbox/401c4f0fac5f8044fb6e2e443bacddce6f135b4b/typelevel-computations/src/Injection.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # | Code taken from: -12-20-closed-type-family-data-types.html Calculating where an element (functor) should be injected at the type level...
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Injection where import Data.Proxy data (f :+: g) e = Inl (f e) | Inr (g e) data Crumbs = Here | L Crumbs | R Crumbs data Res = Found Crumbs | NotFound I...
013c46b1a1d2c7448a236dabf114d00660ab6497cdf5a5b7f68741585a606899
input-output-hk/cardano-metadata-submitter
Types.hs
# LANGUAGE CPP # # LANGUAGE DataKinds # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LAN...
null
https://raw.githubusercontent.com/input-output-hk/cardano-metadata-submitter/4f084f9d449ee340a8d41114f976826378c69f1c/src/Cardano/Metadata/Types.hs
haskell
# LANGUAGE DeriveTraversable # # LANGUAGE GADTs # # LANGUAGE RankNTypes # * Subject * WellKnownProperty / Property * Well-known Properties * Attestation * Signing Subject WellKnownProperty / Property | "name" is a well-known property whose value must be a string | "description" is a well-known property wh...
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE ViewPatterns # module Cardano.Metadata.Types Subject (..) , hashSubje...
227797ac9ca267ef8deb2ed2575815ee157fa7f5637d11e21ddf136b6614d544
facebook/pyre-check
resolution.mli
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/pyre-check/1e88f735574f4ab570af61fc8a41848b81aea842/source/analysis/resolution.mli
ocaml
Return None when the assertion cannot be satisfied Attribute defined by `__getattr__`.
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
06ee0bbb72db09b5643c29941d2cc5c1f71a99ac25eafda7a26fb8419eaf6de1
pjotrp/guix
libusb.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2012 < > Copyright © 2015 < > Copyright © 2015 < > Copyright © 2015 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License...
null
https://raw.githubusercontent.com/pjotrp/guix/96250294012c2f1520b67f12ea80bfd6b98075a2/gnu/packages/libusb.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 © 2012 < > Copyright © 2015 < > Copyright © 2015 < > Copyright © 2015 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu packages libusb)...
c412722237596598a72687e9b79caf099973dbae2e970703ca67cdf75af19d9d
ijp/guildhall
expand-drt.scm
expand-drt.scm --- Macro expanders for ` define - record - type * ' Copyright ( C ) 2009 < > R6RS syntax - case port of Public ;; Domain `define-record-type*' macro expander: ;; </~campbell/scheme/defrectype*.scm> ;; This program is free software, you can redistribute it and/or modify it under the term...
null
https://raw.githubusercontent.com/ijp/guildhall/2fe2cc539f4b811bbcd69e58738db03eb5a2b778/guildhall/spells/record-types/expand-drt.scm
scheme
Domain `define-record-type*' macro expander: </~campbell/scheme/defrectype*.scm> This program is free software, you can redistribute it and/or program. If not, see <>. Commentary: Code:
expand-drt.scm --- Macro expanders for ` define - record - type * ' Copyright ( C ) 2009 < > R6RS syntax - case port of Public modify it under the terms of the new - style BSD license . You should have received a copy of the BSD license along with this #!r6rs (library (guildhall spells record-typ...
678f9be78dead165e523a5d3fd2d1cc5df4a7dd080434ff51f87fa83e1a689a3
lspitzner/brittany
Test296.hs
func = do abc <- expr abcccccccccccccccccc <- expr abcccccccccccccccccccccccccccccccccccccccccc <- expr abccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc <- expr
null
https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test296.hs
haskell
func = do abc <- expr abcccccccccccccccccc <- expr abcccccccccccccccccccccccccccccccccccccccccc <- expr abccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc <- expr
cd904be066ec72c181ea1983a0e4f0838fb0fb9e9925e0c77ffd6ff484cd9e6d
sbcl/sbcl
array.lisp
;;;; array operations for the PPC VM This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The software is in the public domain and ...
null
https://raw.githubusercontent.com/sbcl/sbcl/181370a72104503dc5dce7f89196fe5d690fa08c/src/compiler/ppc/array.lisp
lisp
array operations for the PPC VM more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. Allocator for the array header. Compute the encoded rank. See ENCODE-ARRAY-RANK. Additional accessors and se...
This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB-VM") (define-vop (make-array-header) (:translate make-array-header) (:policy :fast-safe) (:args (ty...
6ae5195f2d582525a45a0cb42c57dcabee78df0d75d17392f90a8d285d9848a9
jeapostrophe/automata
info.rkt
#lang info (define collection 'multi) (define deps '("automata-lib" "automata-doc")) (define implies '("automata-lib" "automata-doc")) (define version "1.0") (define pkg-authors '(jay))
null
https://raw.githubusercontent.com/jeapostrophe/automata/6abe851b83b18fcdcb8f2b19ab87cdabc90c71ce/automata/info.rkt
racket
#lang info (define collection 'multi) (define deps '("automata-lib" "automata-doc")) (define implies '("automata-lib" "automata-doc")) (define version "1.0") (define pkg-authors '(jay))
d273a1848955d0589d3bc6a8d1ba13132f727f203b0e764bca19757e6cf56742
s-expressionists/Eclector
additional-conditions.lisp
(cl:in-package #:eclector.reader) ;;; Type error (define-condition read-object-type-error (stream-position-reader-error type-error) ()) ;;; General escape errors (define-condition unterminated-single-escape (end-of-file incomp...
null
https://raw.githubusercontent.com/s-expressionists/Eclector/ed4ebd3d03981d225004b5d969db766d49ca16b4/code/reader/additional-conditions.lisp
lisp
Type error General escape errors Conditions related to symbols General reader macro conditions Conditions related to single quote Conditions related to strings Conditions related to quasiquotation Conditions related to lists Conditions related to read-time evaluation Conditions related to characters Conditi...
(cl:in-package #:eclector.reader) (define-condition read-object-type-error (stream-position-reader-error type-error) ()) (define-condition unterminated-single-escape (end-of-file incomplete-construct) ((%escape-char :initarg...
d12e8b86b3c235f5a1ddd378aa878ba4ed8a8362eb423bc64a7992418f51ec8b
clj-commons/seesaw
action.clj
Copyright ( c ) , 2011 . 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 ...
null
https://raw.githubusercontent.com/clj-commons/seesaw/4ca89d0dcdf0557d99d5fa84202b7cc6e2e92263/src/seesaw/action.clj
clojure
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 bound by the terms of this license. You must not rem...
Copyright ( c ) , 2011 . All rights reserved . (ns ^{:doc "Functions for dealing with Swing Actions. Prefer (seesaw.core/action)." :author "Dave Ray"} seesaw.action (:use [seesaw.util :only [resource to-mnemonic-keycode]]) (:use [seesaw icon keystroke meta] [seesaw.options :only [option-map ...
8cf7a4aa77d34eaf0d4c6e886650579afa1b6435a01582f596055789991897e4
onedata/op-worker
gs_handle_logic_test_SUITE.erl
%%%-------------------------------------------------------------------- @author ( C ) 2017 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%-------------------------------------------------------------------- %%% @doc %%% This module tests handle logic A...
null
https://raw.githubusercontent.com/onedata/op-worker/2d96b34dbdf5862b77388fac17d3bf6166b56919/test_distributed/suites/graph_sync/gs_handle_logic_test_SUITE.erl
erlang
-------------------------------------------------------------------- @end -------------------------------------------------------------------- @doc This module tests handle logic API using mocked gs_client module. @end -------------------------------------------------------------------- export for ct =============...
@author ( C ) 2017 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . -module(gs_handle_logic_test_SUITE). -author("Lukasz Opiola"). -include("logic_tests_common.hrl"). -export([all/0, init_per_suite/1, init_per_testcase/2, end_per_testcase/2, end_per_suite/1]). -e...
e60c1fbc66027d4645649e634eb9119a9dc25556844913b84964854c0ab8ee92
zoomhub/zoomhub
ViewContent.hs
# LANGUAGE BlockArguments # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # module ZoomHub.Web.Page.ViewContent ( ViewContent (..), ) where import Data.Foldable (fold) import Data.Maybe (fromJust) import Data.Monoid ((<>)) import Data.Text (Text) import qualified Data.Text...
null
https://raw.githubusercontent.com/zoomhub/zoomhub/26bb2598158c79c182261efa4c09ea23a8105778/src/ZoomHub/Web/Page/ViewContent.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE BlockArguments # # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # module ZoomHub.Web.Page.ViewContent ( ViewContent (..), ) where import Data.Foldable (fold) import Data.Maybe (fromJust) import Data.Monoid ((<>)) import Data.Text (Text) import qualified Data.Text as T import qualified Lucid as H i...
481335f4ddfcd5c2861a1621a9cc28ad17524179f3c36c5a7f5f10a9d519f6ea
deeplang-org/deeplang-type-system
WalkerTest.ml
let parse_file file : Syntax.ParseTree.top_clause list = let ch = open_in file in let lexbuf = Lexing.from_channel ch in Lexing.set_filename lexbuf file; let program = Syntax.Parser.program Syntax.Lexer.token lexbuf in program ;; open Semantics.Walker open Semantics.Table let table : table =...
null
https://raw.githubusercontent.com/deeplang-org/deeplang-type-system/4e1d1fc5a7328d32df3abbf36ce603db281a809e/Semantics/WalkerTest.ml
ocaml
let parse_file file : Syntax.ParseTree.top_clause list = let ch = open_in file in let lexbuf = Lexing.from_channel ch in Lexing.set_filename lexbuf file; let program = Syntax.Parser.program Syntax.Lexer.token lexbuf in program ;; open Semantics.Walker open Semantics.Table let table : table =...
4707052273c5ac08cb3fb559bc616afdf3c66a08cc54e32a758383e15b2bb490
mfikes/fifth-postulate
ns270.cljs
(ns fifth-postulate.ns270) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns270.cljs
clojure
(ns fifth-postulate.ns270) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
2d00bfe0f53f05b3ed64ca64d4e31ab577d5acc15fecbd27e46d57abe201281b
NelosG/fp-tests
T2Spec.hs
# OPTIONS_GHC -Wno - missing - signatures # {-# LANGUAGE QuasiQuotes #-} # LANGUAGE ScopedTypeVariables # module Hi.Test.T2Spec ( spec ) where import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range import Test.Hspec.Hedgehog import Text.RawString.QQ import Data.Char (toLower) impor...
null
https://raw.githubusercontent.com/NelosG/fp-tests/9647e3e8efee9b8d1bf824decd287c1e9b897a9c/hw3/test/Hi/Test/T2Spec.hs
haskell
# LANGUAGE QuasiQuotes #
# OPTIONS_GHC -Wno - missing - signatures # # LANGUAGE ScopedTypeVariables # module Hi.Test.T2Spec ( spec ) where import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range import Test.Hspec.Hedgehog import Text.RawString.QQ import Data.Char (toLower) import HW3.Base import Hi.Test.Common sho...
4fd55a774ad1dbf8074a8fe8d68a94951a0ce3f31858a58f62ac5ade389bffa4
blak3mill3r/noah
aot.clj
;; room for improvement on my "build tool" here (but that lickety-split repl is so nice...) (.mkdir (java.io.File. "./classes/")) (compile 'noah.serdes)
null
https://raw.githubusercontent.com/blak3mill3r/noah/b81081c3b4b1e4cd7914c7863c90b6d68810717b/aot.clj
clojure
room for improvement on my "build tool" here (but that lickety-split repl is so nice...)
(.mkdir (java.io.File. "./classes/")) (compile 'noah.serdes)
33a48044135b48cfa28ed94cbc707d9cead9de54ce3ee1bf364bd18e1e56db27
ekmett/ekmett.github.com
State.hs
{-# OPTIONS_GHC -fallow-undecidable-instances #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.Indexed.State Copyright : ( C ) 2008 -- License : BSD-style (see the file LICENSE) -- Maintainer : < > -- Stability : experimenta...
null
https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/category-extras/_darcs/pristine/src/Control/Monad/Indexed/State.hs
haskell
# OPTIONS_GHC -fallow-undecidable-instances # --------------------------------------------------------------------------- | Module : Control.Monad.Indexed.State License : BSD-style (see the file LICENSE) Stability : experimental ----------------------------------------------------------------------...
Copyright : ( C ) 2008 Maintainer : < > Portability : portable ( although the MTL instances are n't ! ) module Control.Monad.Indexed.State ( IxMonadState(..) , imodify , igets , IxStateT(..) , IxState(..) ) where import Control.Applicative import Control.Category.Hask import Control . Ca...
caeb5366fb12c0d5baf5793448dacc22b7eab9a6900fe6c769794646a0eed65d
philnguyen/soft-contract
ex-09.rkt
#lang racket (define (f x) (if (number? x) (add1 x) (string-length x))) (define (g x) (if (let ([tmp (number? x)]) (if tmp tmp (string? x))) (f x) 0)) (provide/contract [f ((or/c string? number?) . -> . number?)] [g (any/c . -> . number?)])
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/octy/ex-09.rkt
racket
#lang racket (define (f x) (if (number? x) (add1 x) (string-length x))) (define (g x) (if (let ([tmp (number? x)]) (if tmp tmp (string? x))) (f x) 0)) (provide/contract [f ((or/c string? number?) . -> . number?)] [g (any/c . -> . number?)])
fc7485484b42d1328a87d2128ffe77a121ff915591aeb7a89a8bf91f25c6f6e9
racket/string-constants
info.rkt
#lang info (define scribblings '(("string-constants.scrbl" () (gui-library))))
null
https://raw.githubusercontent.com/racket/string-constants/992be713c785cbca2e436541de75597d98c15b4b/string-constants-doc/string-constants/info.rkt
racket
#lang info (define scribblings '(("string-constants.scrbl" () (gui-library))))
0481dcb653dc76fe37c2145c6537e1514eeb4824928182504760d2911cff6edc
rmloveland/scheme48-0.53
values.scm
Copyright ( c ) 1993 - 1999 by and . See file COPYING . ; Multiple return values (define multiple-value-token (vector 'multiple-value-token)) (define (values . things) (if (and (pair? things) (null? (cdr things))) (car things) (cons multiple-value-token things))) (define (call-with-values p...
null
https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/alt/values.scm
scheme
Multiple return values
Copyright ( c ) 1993 - 1999 by and . See file COPYING . (define multiple-value-token (vector 'multiple-value-token)) (define (values . things) (if (and (pair? things) (null? (cdr things))) (car things) (cons multiple-value-token things))) (define (call-with-values producer consumer) (let ...
dd231f5ac9112b33569d32a5d20ac739f47e990058fe597dd329c07035b14f5f
bolducp/SICP
01.25.scm
complains that we went to a lot of extra work in writing expmod . ;After all, she says, since we already know how to compute exponentials, we could have simply written ; ( define ( expmod base exp m ) ; (remainder (fast-expt base exp) m)) ;Is she correct? Would this procedure serve as well for our fast prime tester...
null
https://raw.githubusercontent.com/bolducp/SICP/871babe9296b84b2b9648a02f9202752d21ebf93/exercises/chapter_01/1.2_exercises/01.25.scm
scheme
After all, she says, since we already know how to compute exponentials, we could have simply written (remainder (fast-expt base exp) m)) Is she correct? Would this procedure serve as well for our fast prime tester? Explain. Using the original version of expmod that calls fast-exp does seem to work; however, seem t...
complains that we went to a lot of extra work in writing expmod . ( define ( expmod base exp m ) (define (fast-expt b n) (cond ((= n 0) 1) ((even? n) (square (fast-expt b (/ n 2)))) (else (* b (fast-expt b (- n 1)))))) (define (expmod base exp m) (remainder (fast-expt base exp) m)) (define (ne...
c92a90fc9a893e46cc97704ab0a98c7931f3d542f547610f5dde4b4c22152689
gymgle/blockchain-reference
main-p2p.rkt
#lang racket (require "main-helper.rkt") (define args (vector->list (current-command-line-arguments))) (when (not (= 3 (length args))) (begin (printf "Usage; main-p2p.rkt db.data port ip1:port1, ip2:port2....") (newline) (exit))) (define (string-to-peer-info s) (let ([s (string-split s ":")]) (...
null
https://raw.githubusercontent.com/gymgle/blockchain-reference/21d80d2fa4bc1089a80ddfd34f24778f3c0fa2d8/blockchain-demo/racket/main-p2p.rkt
racket
#lang racket (require "main-helper.rkt") (define args (vector->list (current-command-line-arguments))) (when (not (= 3 (length args))) (begin (printf "Usage; main-p2p.rkt db.data port ip1:port1, ip2:port2....") (newline) (exit))) (define (string-to-peer-info s) (let ([s (string-split s ":")]) (...
55f52f7246051b944614d07f9f2a1dee6c42a7a64712f278ce585b371bac7b6a
fpco/ide-backend
ExeCabalServer.hs
| Run Cabal functions upon receiving RPC requests , log output and provide -- Progress updates. module IdeSession.ExeCabalServer ( exeCabalEngine ) where import Control.Concurrent.Async (async, wait) import System.Exit (ExitCode) import System.IO (IOMode(..)) import System.IO.Error (isEOFError) import qualifie...
null
https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/IdeSession/ExeCabalServer.hs
haskell
Progress updates. of progress and passing the results. Start handling RPC calls | Run the cabal functions inside the executable. Create pipe Backup stdout, then replace stdout with the pipe's write end Convert the read end to a handle Closing the write end of the stdout pipe will cause the stdout thread to ter...
| Run Cabal functions upon receiving RPC requests , log output and provide module IdeSession.ExeCabalServer ( exeCabalEngine ) where import Control.Concurrent.Async (async, wait) import System.Exit (ExitCode) import System.IO (IOMode(..)) import System.IO.Error (isEOFError) import qualified Control.Exception ...
5818b6c5bfa78696ded12721f2b26f342c433d16fb23e6bc063ce981d03ae742
edsko/ChinesePodAPI
Word.hs
-- | Definition of a Word -- This lives separate from the main Vocab module so that changes to the main " Vocab " module do not trigger a recompile of the HSK module . ( This is also -- why 'extractWord' does not live here, as that would bring in a dependency on -- the "API" module). module Servant.ChinesePod.Vocab...
null
https://raw.githubusercontent.com/edsko/ChinesePodAPI/f77ebfd55286316c4a54c42c195d5a51b4a0e4cd/src/Servant/ChinesePod/Vocab/Word.hs
haskell
| Definition of a Word why 'extractWord' does not live here, as that would bring in a dependency on the "API" module).
This lives separate from the main Vocab module so that changes to the main " Vocab " module do not trigger a recompile of the HSK module . ( This is also module Servant.ChinesePod.Vocab.Word (Word(..)) where import Prelude hiding (Word) import Data.Binary (Binary) import Data.Data (Data) import GHC.Generics (Gener...
d61e938ea1a739b15ef2ecc1a44ab70debbe8ee65353e5e8211a820533c22a81
triffon/fp-2019-20
class.rkt
#lang racket (define (id x) x) (define (count-digits n) (if (< n 10) 1 (+ 1 (count-digits (quotient n 10))))) (define (middle-digit n) (let ((dc (count-digits n))) (if (even? dc) -1 (remainder (quotient n (expt 10 (quotient dc 2))) ...
null
https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-2/exam-01/prep/class.rkt
racket
(define (sv1 l1) (if (null? l1) #t (if (member (car l1) l) #f)))
#lang racket (define (id x) x) (define (count-digits n) (if (< n 10) 1 (+ 1 (count-digits (quotient n 10))))) (define (middle-digit n) (let ((dc (count-digits n))) (if (even? dc) -1 (remainder (quotient n (expt 10 (quotient dc 2))) ...
f17f625bcbb009048a9923c795d4f4aca6ed049dd26e234f0a086320de0f35be
jiangpengnju/htdp2e
posns.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname posns) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ...
null
https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/fixed-size-data/adding-structure/posns.rkt
racket
about the language level of this file in a form that our tools can easily process. Now consider designing a function that computes the diatance of some location to the origin of the canvas: computes the distance of a-posn to origin
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname posns) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (make-posn 3 4) (define one-posn (make-posn 3 4)) (posn-x one-po...
7c5010338114fb5e96f20aa8db978b9a2889a99c74780571ecf29e0825067671
manu291/dypgen
calc.ml
let () = print_endline " Basic extensible calculator example Initial priorities: pi<p+ Initial grammar : S -> E E(pi) -> int E(p+) -> E(<=p+) + E(<p+) A -> & E(pi) -> A E When the parser reduces with the rule A -> &, the grammar is extended with the following rule: E(p*) -> E(<=p*) * E(<p*) And the relation is...
null
https://raw.githubusercontent.com/manu291/dypgen/59d11b4c70b8d0971348ca6913839ff1fb4f9b5f/demos/calc_ext/calc.ml
ocaml
let () = print_endline " Basic extensible calculator example Initial priorities: pi<p+ Initial grammar : S -> E E(pi) -> int E(p+) -> E(<=p+) + E(<p+) A -> & E(pi) -> A E When the parser reduces with the rule A -> &, the grammar is extended with the following rule: E(p*) -> E(<=p*) * E(<p*) And the relation is...
92fe097b21e77c62bbd1e4e170e574be796fc155727e18d50066f5922c7558a6
haskell-opengl/GLUT
Initialization.hs
-------------------------------------------------------------------------------- -- | Module : Graphics . UI.GLUT.Initialization Copyright : ( c ) 2002 - 2018 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- Actions and state variables in th...
null
https://raw.githubusercontent.com/haskell-opengl/GLUT/36207fa51e4c1ea1e5512aeaa373198a4a56cad0/src/Graphics/UI/GLUT/Initialization.hs
haskell
------------------------------------------------------------------------------ | License : BSD3 Stability : stable Portability : portable The primary initialization routine is 'initialize', which should only be be called before 'initialize', apart from getting or setting the state variables in this mo...
Module : Graphics . UI.GLUT.Initialization Copyright : ( c ) 2002 - 2018 Maintainer : < > Actions and state variables in this module are used to initialize GLUT state . called exactly once in a GLUT program . No other GLUT or OpenGL actions should 400 400)@ before ' initialize ' is cal...
8809c71ee31080fbe61eb8aa90dbd1756509c9545d682585848c1e02650f2297
claw/claw
config.clj
(ns claw.config "Global Claw app config. Note that configured references to other namespaces must be quoted so that the namespace don't have to be already loaded when config.clj loads. You can set overrides in your ~/.lein/profiles.clj for development mode. You can override any config values with environment varia...
null
https://raw.githubusercontent.com/claw/claw/5a83b8351e6fc89a8c7961c3485ea934ac92553b/src/claw/config.clj
clojure
The current live configuration, without any env variable derived (get) instead, so that env vars are taken into account. Nothing in the env, so try *config* Nothing there either, so log an error and return the given default. "dev" or "production" Human-readable name of the application These are auto-set in the...
(ns claw.config "Global Claw app config. Note that configured references to other namespaces must be quoted so that the namespace don't have to be already loaded when config.clj loads. You can set overrides in your ~/.lein/profiles.clj for development mode. You can override any config values with environment varia...
fbc96779d16e9aa88b4117d87d15beb1838abd37bfde9432a461dd39add6179c
csgordon/cayenne
FString.hs
module FString(FString, hmkFString, getFString, StrTable, emptyStrTable, getFStrNo, tmpFString, isTmpFString) where -- Fast strings may be represented by a number and the real string. import qualified Data.Map as M import Error(internalError) import PPrint import Util(mkSet) data FString = N !Int String -- un...
null
https://raw.githubusercontent.com/csgordon/cayenne/7fdf59b5e21124b5caa9f776199a30cd0e5d88b2/FString.hs
haskell
Fast strings may be represented by a number and the real string. unique number, actual string showsType _ = showString "FString" ++":"++show n just some start number Just for convenience
module FString(FString, hmkFString, getFString, StrTable, emptyStrTable, getFStrNo, tmpFString, isTmpFString) where import qualified Data.Map as M import Error(internalError) import PPrint import Util(mkSet) instance Eq FString where N n _ == N n' _ = n == n' instance Ord FString where N _ s `compa...
cb3ac795a50632d3fbb151a4e59630b6f85626e6fbadc7dbc69410f9a301ca46
life0fun/clojure-idiom
sender.clj
;; ;; define a set of method to send msg to queue ;; (ns msgqueue.rabbitmq.sender (:use msgqueue.rabbitmq.rabbitmq)) (defn send-single-msg [routingkey] (println "Sending test msg to " routingkey) (with-rabbit ["localhost" "guest" "guest"] (send-message routingkey (str "sending test message to " routingkey)))...
null
https://raw.githubusercontent.com/life0fun/clojure-idiom/481b297eeabea917a68b492b1fb78b8151408507/msgqueue/src/msgqueue/rabbitmq/sender.clj
clojure
define a set of method to send msg to queue
(ns msgqueue.rabbitmq.sender (:use msgqueue.rabbitmq.rabbitmq)) (defn send-single-msg [routingkey] (println "Sending test msg to " routingkey) (with-rabbit ["localhost" "guest" "guest"] (send-message routingkey (str "sending test message to " routingkey))) (println "done!")) (defn send-multicast ([] (s...
1c78961cdef75143b6bf85c0bf1913e37932696a2fd5c2e1cf896091f72c65d1
jaspervdj/firefly
Main.hs
-------------------------------------------------------------------------------- module Main where -------------------------------------------------------------------------------- import Control.Concurrent (threadDelay) import Control.Monad (forever) ------------------------...
null
https://raw.githubusercontent.com/jaspervdj/firefly/71e1f5f11293272bedc26444446553a24ee318ad/examples/Main.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----...
module Main where import Control.Concurrent (threadDelay) import Control.Monad (forever) import qualified Firefly as F import qualified Firefly.Input.Keys as FK import qualified Firefly.Input.MouseButtons as FMB import Firefly.Math.XY m...
a6dfa7426293ca6644d40bd188943f82e3c03c2051500cdf28643fc329170d8f
susanemcg/pandoc-tufteLaTeX2GitBook
Asciify.hs
Copyright ( C ) 2013 - 2014 < > This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . This program is distribut...
null
https://raw.githubusercontent.com/susanemcg/pandoc-tufteLaTeX2GitBook/00c34b4299dd89c4e339e1cde006061918b559ab/pandoc-1.12.4.2/src/Text/Pandoc/Asciify.hs
haskell
Copyright ( C ) 2013 - 2014 < > This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . This program is distribut...
9035822f447ba4f79decf16f2cff8717e24833e152621794bc50c5bcfdffbcd3
MondayMorningHaskell/haskellings
Data4.hs
-- I AM NOT DONE import Test.Tasty import Test.Tasty.HUnit - Haskell allows us to * parameterize * our types . This means the type name contains one or more lowercase " variable " types : data Grade letter = ... - We can use this variable as a substitute for a normal type in a constructor : data Grade...
null
https://raw.githubusercontent.com/MondayMorningHaskell/haskellings/fafadd5bbb722b54c1b7b114e34dc9b96bb7ca4d/exercises/data/Data4.hs
haskell
I AM NOT DONE TODO: Change this type so that the last field (occupation) is *parameterized*. "Only {x} element(s) in the list" Testing Code
import Test.Tasty import Test.Tasty.HUnit - Haskell allows us to * parameterize * our types . This means the type name contains one or more lowercase " variable " types : data Grade letter = ... - We can use this variable as a substitute for a normal type in a constructor : data Grade letter = Grade I...
17c040b18a3564c2512843b314a5fff46d83611d2b32ed70d56c23102b171777
kappelmann/eidi2_repetitorium_tum
p14.ml
open Sys open Unix open Thread open Event type col = int list [@@deriving show] type matrix = col list [@@deriving show] (* transposer *) let transpose (miso, matrix) = let rec foreach_column rest = (* transpose *) let (column, rest) = List.fold_right (fun x (c, r) -> match x with hd::tl...
null
https://raw.githubusercontent.com/kappelmann/eidi2_repetitorium_tum/1d16bbc498487a85960e0d83152249eb13944611/additional_exercises/2016_17/Blatt%2014%20L%C3%B6sungen/ocaml/p14.ml
ocaml
transposer transpose send result continue if not finished multiplier receive transposed line multiply send result to master continue Got a None? Finished! receive transposed and multiplied line sum send result to master continue Got a None? Finished! different types require different chan...
open Sys open Unix open Thread open Event type col = int list [@@deriving show] type matrix = col list [@@deriving show] let transpose (miso, matrix) = let rec foreach_column rest = let (column, rest) = List.fold_right (fun x (c, r) -> match x with hd::tl -> (hd::c, tl::r) | _ -> ([]...
4a82e186992b17aef06f3f1bdcf7392ff04250564129d1f2c7291f3843dcb8f7
wavewave/hoodle
Select.hs
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE FlexibleInstances # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeOperators # {-# LANGUAGE TypeSynonymInstances #-} # OPTIONS_GHC -fno - warn - incomplete - uni - patterns # module Data.Xournal.Select where import Co...
null
https://raw.githubusercontent.com/wavewave/hoodle/0d94530020e3e9641a652edade77cd0eb8d9a1a4/xournal-types/src/Data/Xournal/Select.hs
haskell
# LANGUAGE DeriveTraversable # # LANGUAGE TypeSynonymInstances # | | | | | | | | | | | | | | | | | | | | | | | | | | |
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleInstances # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeOperators # # OPTIONS_GHC -fno - warn - incomplete - uni - patterns # module Data.Xournal.Select where import Control.Compose ((:.) (O)) import Data.Foldable (toList) import Data.Sequen...
f4761818e9b294424af57d603073ab185752cd684c6791720b9d2e419dae285a
csabahruska/jhc-components
Traversable.hs
----------------------------------------------------------------------------- -- | Module : Data . Copyright : and 2005 -- License : BSD-style (see the LICENSE file in the distribution) -- -- Maintainer : -- Stability : experimental -- Portability : portable -- -- Class of data structu...
null
https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/lib/applicative/Data/Traversable.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style (see the LICENSE file in the distribution) Maintainer : Stability : experimental Portability : portable Class of data structures that can be traversed from left to right, performing an action on each e...
Module : Data . Copyright : and 2005 * /Applicative Programming with Effects/ , by and , online at * /The Essence of the Iterator Pattern/ , by and , in /Mathematically - Structured Functional Programming/ , 2006 , and online at Note that the functions ' mapM ' and '...
9ae69e209e84f08d845e11e74e491e854ef1b57a41eb2093c24f77e32a975810
narkisr-deprecated/core
core.clj
(comment re-core, Copyright 2012 Ronen Narkis, narkisr.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software ...
null
https://raw.githubusercontent.com/narkisr-deprecated/core/85b4a768ef4b3a4eae86695bce36d270dd51dbae/src/re_core/persistency/core.clj
clojure
(comment re-core, Copyright 2012 Ronen Narkis, narkisr.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software ...
552785bfb48d82fce91217fbb4c8841449492b21e17d406701ca550d653b81a8
MMagueta/MMaguetaGuix
utils.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2019 < > Copyright © 2020 < > ;;; ;;; This file is not part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ...
null
https://raw.githubusercontent.com/MMagueta/MMaguetaGuix/0490ffc33bc7d269e2b586637a76e7fe7914fbfb/nonguix/build/utils.scm
scheme
GNU Guix --- Functional package management for GNU This file is not 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 implie...
Copyright © 2019 < > Copyright © 2020 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (nonguix build utils) #:use-module (ice-9 match) #:use-module (ice-9 ...
f073e5d90ce3e439951c6c4a3f46d44cda69babd84de6d8c2ccec22b81290af7
xvw/quasar
storage.mli
(** Deal with Local and Session storage. *) open Js_of_ocaml (** {2 Types} *) (** Shortcut for [Dom_html.storage Js.t]. *) type t = Dom_html.storage Js.t (** Event fired by storage mutation. *) type event = Dom_html.storageEvent Js.t * { 2 Events } (** Storage event. *) val event: event Dom_events.Typ.typ * { ...
null
https://raw.githubusercontent.com/xvw/quasar/a414d32ded53562802893590e2996bb8daeb0cf3/src/browser/storage.mli
ocaml
* Deal with Local and Session storage. * {2 Types} * Shortcut for [Dom_html.storage Js.t]. * Event fired by storage mutation. * Storage event. * Raised if the Storage is not supported by the browser. * This exception will be raised in particular case of conversion. * {2 Abstract API} * This type represents a ch...
open Js_of_ocaml type t = Dom_html.storage Js.t type event = Dom_html.storageEvent Js.t * { 2 Events } val event: event Dom_events.Typ.typ * { 2 Exceptions } exception Not_supported exception Not_found * The basic interface of a storage handler . A Storage is basically a Key / Value store , using [ s...
1efa0d57ae3ed1bd504dd4608bf1659cb1eda941c23bb0e150d44c88388547c9
re-ops/re-core
digital.clj
(ns re-core.presets.digital "Digitalocean presets") (defn region [r] (fn [instance] (assoc-in instance [:digital-ocean :region] r))) (defn private [t] (fn [instance] (assoc-in instance [:digital-ocean :private_networking] t))) (defn defaults [instance] (update instance :digital-ocean (fn [m...
null
https://raw.githubusercontent.com/re-ops/re-core/e13490aedd6d34ff01f11b28adf359beb5c0bb5b/src/re_core/presets/digital.clj
clojure
(ns re-core.presets.digital "Digitalocean presets") (defn region [r] (fn [instance] (assoc-in instance [:digital-ocean :region] r))) (defn private [t] (fn [instance] (assoc-in instance [:digital-ocean :private_networking] t))) (defn defaults [instance] (update instance :digital-ocean (fn [m...
60cd740ebce7d2f2f6aefc400d46f43f09025654b50f9ad6f4e418940cf5de0f
palf/haskell-sdl2-examples
Lesson13.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} module Main (main) where import qualified SDL import qualified SDL.Image import qualified Common as C import Control.Monad.Loops (iterateUntilM) import Data.Foldable (foldl') import GHC.Word (Wor...
null
https://raw.githubusercontent.com/palf/haskell-sdl2-examples/3b4af6eea5ed362ec7941331449ac64c8f31009e/examples/lesson13/src/Lesson13.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveFoldable # # LANGUAGE DeriveTraversable #
module Main (main) where import qualified SDL import qualified SDL.Image import qualified Common as C import Control.Monad.Loops (iterateUntilM) import Data.Foldable (foldl') import GHC.Word (Word8) import SDL (($=)) data World = World { exiting :: Bool , alpha :: Word8 } ...
87786259c8011535f3cf195ac3cd0f5b59e0bd07450c244829f8088ebffe288c
sboehler/servant-starter-app
Credentials.hs
module Model.Credentials ( Password(..) , Credentials(..) ) where import Data.Aeson (FromJSON) import GHC.Generics (Generic) import Model.User (Email) -- Password newtype Password = Password { unPassword :: String } deriving (Show, Eq, Read, FromJSON) -- Credentials data Credentials = Credentials { crede...
null
https://raw.githubusercontent.com/sboehler/servant-starter-app/ebcd90ba0ec8e7ed411ebeb5ef2119e6000cc398/src/Model/Credentials.hs
haskell
Password Credentials
module Model.Credentials ( Password(..) , Credentials(..) ) where import Data.Aeson (FromJSON) import GHC.Generics (Generic) import Model.User (Email) newtype Password = Password { unPassword :: String } deriving (Show, Eq, Read, FromJSON) data Credentials = Credentials { credentialsEmail :: Email , cr...
b07cb96e23b32115aee827d0940de6da09b2ffbfa95b84dc7948205ced461b06
timjb/halma
SlashCmd.hs
module Game.Halma.TelegramBot.Controller.SlashCmd ( CmdCall (..) , parseCmdCall ) where import Control.Monad (guard) import Data.Char (isAlphaNum, isSpace) import qualified Data.Text as T data CmdCall = CmdCall { cmdCallName :: T.Text , cmdCallArgs :: Maybe T.Text } deriving (Show, Eq) parseCmdCall ::...
null
https://raw.githubusercontent.com/timjb/halma/0267d636dbed0de03d2d6527ca35458637a0021c/halma-telegram-bot/src/Game/Halma/TelegramBot/Controller/SlashCmd.hs
haskell
module Game.Halma.TelegramBot.Controller.SlashCmd ( CmdCall (..) , parseCmdCall ) where import Control.Monad (guard) import Data.Char (isAlphaNum, isSpace) import qualified Data.Text as T data CmdCall = CmdCall { cmdCallName :: T.Text , cmdCallArgs :: Maybe T.Text } deriving (Show, Eq) parseCmdCall ::...
bd8f1fb7d9061940a468d1fa4e22c501aea532d1d10894482f636c975060c19a
ryanpbrewster/haskell
types_vs_data.hs
data Value = Value Int deriving (Show, Eq, Ord) f :: Value -> Value f (Value x) = Value (x*x) type Weight = Int g :: Weight -> Weight g w = w*w
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/hello-world/types_vs_data.hs
haskell
data Value = Value Int deriving (Show, Eq, Ord) f :: Value -> Value f (Value x) = Value (x*x) type Weight = Int g :: Weight -> Weight g w = w*w
652199dcea5e19a4f080aa930616137ae25fd02fffad538bc7547301a196a4dc
satos---jp/mincaml_self_hosting
source2ast.mli
open Syntax open Spec val src2ast : string -> (Syntax.top * (string list)) val open2spec : string -> (Spec.top * (string list)) val basename : string -> string
null
https://raw.githubusercontent.com/satos---jp/mincaml_self_hosting/5fdf8b5083437d7607a924142eea52d9b1de0439/src/compiler/source2ast.mli
ocaml
open Syntax open Spec val src2ast : string -> (Syntax.top * (string list)) val open2spec : string -> (Spec.top * (string list)) val basename : string -> string
506f699025205ce538afc1c4d0033c56db586f03abf3a51a56a20c1e4603adf3
mathiasbourgoin/SPOC
Cuda.mli
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * , et ( 2011 ) * * * * This software is a computer program whose purpose is to allow * GPU programming with the OCaml language . * * T...
null
https://raw.githubusercontent.com/mathiasbourgoin/SPOC/9014d26b6d64261d1ace97db7f3fe2256a7c459c/Spoc/Cuda.mli
ocaml
*/* */*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * , et ( 2011 ) * * * * This software is a computer program whose purpose is to allow * GPU programming with the OCaml language . * * T...
c94272c87ec8dcbe67406690ab3d5747b9a1d0d6bf5edc21f5827c3e887903a5
basho/riak_test
ts_simple_api.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2015 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/ts_simple_api.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 ) 2015 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(ts_simple_api). -behav...
811b2ce66a4d8cab51f211932a88a4c108681018af0a7d91f095182621d299fe
tomferon/eventsourcing
Projection.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVa...
null
https://raw.githubusercontent.com/tomferon/eventsourcing/54bed807bf7700ec696cb16a041e1594702e7f63/eventsourcing-postgresql/src/Database/CQRS/PostgreSQL/Projection.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE GADTs # # LANGUAGE KindSignatures # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # The custom actions are transformed into a list of SQL actions by the given function. See 'fromTabularDataActions'...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE TypeApplications # # LANGUAGE UndecidableInstances # module Database.CQRS.PostgreSQL.Projection ( Projection , executeSqlActions , executeCustomActions , fromTabularDataActions ) where im...
5ed634f166639614313059ae4013e99f106435c4167346e953d20fff10d0f843
openweb-nl/kafka-graphql-examples
routes.cljs
(ns nl.openweb.bank.routes (:require [bidi.bidi :as bidi] [pushy.core :as pushy] [re-frame.core :as re-frame] [nl.openweb.bank.events :as events])) (def routes ["/" {"" :home "employee" :bank-employee ...
null
https://raw.githubusercontent.com/openweb-nl/kafka-graphql-examples/a404a265b5b0f13968a24d00c6494981063937fe/frontend/src/cljs/nl/openweb/bank/routes.cljs
clojure
(ns nl.openweb.bank.routes (:require [bidi.bidi :as bidi] [pushy.core :as pushy] [re-frame.core :as re-frame] [nl.openweb.bank.events :as events])) (def routes ["/" {"" :home "employee" :bank-employee ...
c3c4ec7b91382262828a7f052ac640d70466c9f229be690b41d7e3b99628821d
Gandalf-/coreutils
AwkSpec.hs
{-# LANGUAGE OverloadedStrings #-} module AwkSpec where import Data.Either import qualified Data.HashMap.Strict as H import Data.Text (Text) import qualified Data.Text as T import System.IO import System.IO.Temp import Text.Parsec import ...
null
https://raw.githubusercontent.com/Gandalf-/coreutils/217f6a80aa221c742acca9bd1dc28d5b40b8450f/test/AwkSpec.hs
haskell
# LANGUAGE OverloadedStrings # ??? string
module AwkSpec where import Data.Either import qualified Data.HashMap.Strict as H import Data.Text (Text) import qualified Data.Text as T import System.IO import System.IO.Temp import Text.Parsec import Coreutils.Awk import Tes...
ff6583bdc9f8e2ab5e80f427c9063a2d5854132593106feac57f49a9d0afc34b
oakes/Nightmod
core.clj
(load-game-file "entities.clj") (def score (atom 0)) (defn update-score! [entities] (doseq [e entities] (when (and (:enemy? e) (remove-enemy? e entities)) (swap! score inc)) (when (and (:enemy? e) (< (:y e) 0)) (swap! score dec))) entities) (defn update-label! [entities] (doseq [e entit...
null
https://raw.githubusercontent.com/oakes/Nightmod/e1145a49d96c5322aaf4bdd5493ae14a7f0c0f8a/resources/arcade/core.clj
clojure
(load-game-file "entities.clj") (def score (atom 0)) (defn update-score! [entities] (doseq [e entities] (when (and (:enemy? e) (remove-enemy? e entities)) (swap! score inc)) (when (and (:enemy? e) (< (:y e) 0)) (swap! score dec))) entities) (defn update-label! [entities] (doseq [e entit...
25c3eb671d38108b9e4d6e5789c83f2be99efe9d4719cd738aacd4956a2a2df2
larcenists/larceny
mzscheme-299.400.scm
For mzscheme-299.400 (require (lib "1.ss" "srfi")) (require (lib "9.ss" "srfi")) (require (lib "23.ss" "srfi")) ;=================================; ; ; SRFI 60 integers as bits ; ; ; ;=================================; Sassy uses the following subset : (define logior bitwise-ior) (define logand bi...
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/inits/mzscheme-299.400.scm
scheme
=================================; ; ; =================================; ==================================; ; ; ==================================; (he thinks) (define hash-table?)
For mzscheme-299.400 (require (lib "1.ss" "srfi")) (require (lib "9.ss" "srfi")) (require (lib "23.ss" "srfi")) Sassy uses the following subset : (define logior bitwise-ior) (define logand bitwise-and) (define lognot bitwise-not) (define ash arithmetic-shift) (load "other/srfi-60-pieces.scm") Sassy uses the foll...
3d85b6572163ae27b29af50fa47297ce4e910a971e46ca8375201f2f3824bb36
fumieval/barbies-th
TH.hs
# LANGUAGE CPP # {-# LANGUAGE RankNTypes #-} # LANGUAGE LambdaCase # # LANGUAGE PolyKinds # # LANGUAGE DataKinds # # LANGUAGE DefaultSignatures # # LANGUAGE DerivingVia # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE FlexibleContexts # # LAN...
null
https://raw.githubusercontent.com/fumieval/barbies-th/ac953769dc9f7b3ab3b128ab74da70c786d7c1d3/src/Barbies/TH.hs
haskell
# LANGUAGE RankNTypes # | A pair of a getter and a setter | Obtain a van-laarhoven lens (compatible with the lens library) from 'LensB' | The class of higher-kinded datatypes where lenses can be defined | A collection of lenses (getter-setter pairs) | barbies doesn't care about field names, but they are useful in ...
# LANGUAGE CPP # # LANGUAGE LambdaCase # # LANGUAGE PolyKinds # # LANGUAGE DataKinds # # LANGUAGE DefaultSignatures # # LANGUAGE DerivingVia # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # ...
be8d5c531a17131a1f4a4bf25ec27931d7187d51810ceec002778b46ec95e6a4
racket/racket7
tcp-accept.rkt
#lang racket/base (require "../common/check.rkt" "../host/thread.rkt" "../host/rktio.rkt" "../sandman/main.rkt" "tcp-listen.rkt" "tcp-port.rkt" "evt.rkt" "error.rkt") (provide tcp-accept tcp-accept/enable-break tcp-accept-evt tcp...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/io/network/tcp-accept.rkt
racket
in atomic mode in atomic mode ---------------------------------------- in atomic mode ---------------------------------------- in atomic mode assumes that listener is not closed in atomic mode in atomic mode
#lang racket/base (require "../common/check.rkt" "../host/thread.rkt" "../host/rktio.rkt" "../sandman/main.rkt" "tcp-listen.rkt" "tcp-port.rkt" "evt.rkt" "error.rkt") (provide tcp-accept tcp-accept/enable-break tcp-accept-evt tcp...
5d8aa6448a539e49a4101c5aec973d01f440cd47d60915666598b0f6dc1a7075
instedd/planwise
taskmaster.clj
(ns planwise.component.taskmaster (:require [taoensso.timbre :as timbre] [schema.core :as s] [clojure.core.async :refer [chan close! put! <! >! go alt!! alts! alts!! timeout]])) (timbre/refer-timbre) (def Task {:task-id s/Any :task-fn (s/pred fn?)...
null
https://raw.githubusercontent.com/instedd/planwise/1bc2a5742ae3dc377dddf1f9e9bb60f0d2f59084/src/planwise/component/taskmaster.clj
clojure
dispatcher will be polled on the next event loop iteration else
(ns planwise.component.taskmaster (:require [taoensso.timbre :as timbre] [schema.core :as s] [clojure.core.async :refer [chan close! put! <! >! go alt!! alts! alts!! timeout]])) (timbre/refer-timbre) (def Task {:task-id s/Any :task-fn (s/pred fn?)...