_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
2965bc6c822af8fa7227887484fe46f6f9ca685f00ca9afe2bc2a87571c63d1e
alanzplus/EOPL
2.12-test.rkt
#lang eopl (require rackunit "2.12.rkt") (require rackunit/text-ui) (define astack (push 1 (push 2 (empty-stack)))) (define stack-tests (test-suite "Tests for stack" (check-equal? (top astack) 1) (check-equal? (top (pop astack)) 2))) (run-tests stack-tests)
null
https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch2/2.12-test.rkt
racket
#lang eopl (require rackunit "2.12.rkt") (require rackunit/text-ui) (define astack (push 1 (push 2 (empty-stack)))) (define stack-tests (test-suite "Tests for stack" (check-equal? (top astack) 1) (check-equal? (top (pop astack)) 2))) (run-tests stack-tests)
53f994669447cfb45dc9f0d36df6e46bb7479352ba4f8c4196a1fe15ba5d0c74
RedPRL/stagedtt
Staging.mli
type mode = | Inner | Outer val run : stage:int -> (unit -> 'a) -> 'a val get_stage : unit -> int val incr_stage : int -> (mode -> 'a) -> 'a val decr_stage : int -> (mode -> 'a) -> 'a
null
https://raw.githubusercontent.com/RedPRL/stagedtt/f88538036b51cebb83ebb0b418ec9b089550275d/lib/eff/Staging.mli
ocaml
type mode = | Inner | Outer val run : stage:int -> (unit -> 'a) -> 'a val get_stage : unit -> int val incr_stage : int -> (mode -> 'a) -> 'a val decr_stage : int -> (mode -> 'a) -> 'a
41b3d89210a1c1d50e415c484fd54d7bc51ceb1ae2754b12d342c1094202572e
charlieg/Sparser
salient-objects.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*- copyright ( c ) 1991 Content Technologies Inc. copyright ( c ) 1992 -- all rights reserved ;;; ;;; File: "salient objects" Module : " interface;records : " Version : 1.0 January 1991 (in-package :sparser) ;;;-----------...
null
https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/interface/records/salient-objects.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*- File: "salient objects" ------------------------------------------------------- declaring an object type to be salient and reportable ------------------------------------------------------- ------------------- per-article state -------------------
copyright ( c ) 1991 Content Technologies Inc. copyright ( c ) 1992 -- all rights reserved Module : " interface;records : " Version : 1.0 January 1991 (in-package :sparser) (defvar *salient-object-types* nil) (defvar *pending-salient-objects* nil "Accumulates object found during the ...
c2654b30b4f559155dcec939a8f69d4fbd3abd7633201074d0739b2167317284
alanz/ghc-exactprint
TH_ppr1.hs
# LANGUAGE MultiParamTypeClasses # # LANGUAGE TemplateHaskell # module Main (main) where import Language.Haskell.TH u1 :: a u1 = undefined u2 :: a u2 = undefined f :: a f = undefined (.+.) :: a (.+.) = undefined main :: IO () main = do runQ [| f u1 u2 |] >>= p runQ [| u1 `f` u2 |] >>= p runQ ...
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc86/TH_ppr1.hs
haskell
# LANGUAGE MultiParamTypeClasses # # LANGUAGE TemplateHaskell # module Main (main) where import Language.Haskell.TH u1 :: a u1 = undefined u2 :: a u2 = undefined f :: a f = undefined (.+.) :: a (.+.) = undefined main :: IO () main = do runQ [| f u1 u2 |] >>= p runQ [| u1 `f` u2 |] >>= p runQ ...
4167aa1e968fb320dfb7fc71f2ec96047786c78aff3556b6845bb5e2e979eebb
toaq/zugai
Lex.hs
module Lex where import Control.Monad (msum) import Data.Char (isDigit, isLetter) import Data.List.Split (wordsBy) import Data.Maybe (fromMaybe, isNothing) import Data.Text (Text) import Data.Text qualified as T import Data.Text.Normalize qualified as T import Text.Parsec as P import TextUtils ( bareToaq, isToaq...
null
https://raw.githubusercontent.com/toaq/zugai/c67f9586ea52f454a83b64740f2053423d8b0624/src/Lex.hs
haskell
left as text so these can be turned into text<>"jeo". left as text so these can be turned into text<>"ga". implies natural t2 A token (or other inner type) tagged with source position and source text. " \x1b[32 m " + + T.unpack ( posSrc x ) + + " \x1b[0 m " lä mä tïo lâ mâ tîo
module Lex where import Control.Monad (msum) import Data.Char (isDigit, isLetter) import Data.List.Split (wordsBy) import Data.Maybe (fromMaybe, isNothing) import Data.Text (Text) import Data.Text qualified as T import Data.Text.Normalize qualified as T import Text.Parsec as P import TextUtils ( bareToaq, isToaq...
a482431df63ce3eea0f1c5ee3e2d4aab83d84ee544d1bd2bf5f7c78d4da9d3a9
DogLooksGood/holdem
web_server.clj
(ns poker.system.web-server (:require [aleph.http :as http] [mount.core :as mount] [poker.web.router :refer [app]] [poker.web.ws :as ws] [poker.system.config :refer [config]])) (mount/defstate web-server :start (http/start-server #'app (get config :web {:port 4000}...
null
https://raw.githubusercontent.com/DogLooksGood/holdem/f9a17a2f40009fe0f31d716897fe71a173407eb8/src/clj/poker/system/web_server.clj
clojure
(ns poker.system.web-server (:require [aleph.http :as http] [mount.core :as mount] [poker.web.router :refer [app]] [poker.web.ws :as ws] [poker.system.config :refer [config]])) (mount/defstate web-server :start (http/start-server #'app (get config :web {:port 4000}...
9af2d8971c939274fcb4c0c2aa548535f73a2106e10aa10942fe1cf76148ddf1
larcenists/larceny
srfi-59-test.sps
; Test suite for SRFI-59 ; $ Id$ (import (rnrs base) (rnrs io simple) (rnrs exceptions) (srfi :59 vicinities)) (define (writeln . xs) (for-each display xs) (newline)) (define (fail token . more) (writeln "Error: test failed: " token) #f) (define vicinity? string?) (or (call-with-c...
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/lib/SRFI/test/srfi-59-test.sps
scheme
Test suite for SRFI-59 (program-vicinity)
$ Id$ (import (rnrs base) (rnrs io simple) (rnrs exceptions) (srfi :59 vicinities)) (define (writeln . xs) (for-each display xs) (newline)) (define (fail token . more) (writeln "Error: test failed: " token) #f) (define vicinity? string?) (or (call-with-current-continuation (l...
1e1eca3c209cd2d5cee3801373d32c6ce90fa00899d67665787ef3f3292c0cf3
huangz1990/SICP-answers
4-cdr.scm
4-cdr.scm (define (cdr z) (z (lambda (p q) q)))
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/4-cdr.scm
scheme
4-cdr.scm (define (cdr z) (z (lambda (p q) q)))
340e1bda5ab2b39eaa7e5c494e060c71557b992892cc5d7c0bea6cf7dc764e02
coccinelle/coccinelle
bytesLabels.mli
external length : bytes -> int = "%string_length" external get : bytes -> int -> char = "%string_safe_get" external set : bytes -> int -> char -> unit = "%string_safe_set" external create : int -> bytes = "caml_create_string" val make : int -> char -> bytes val init : int -> f:(int -> char) -> bytes val empty : bytes v...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/bundles/stdcompat/stdcompat-current/interfaces/4.03/bytesLabels.mli
ocaml
external length : bytes -> int = "%string_length" external get : bytes -> int -> char = "%string_safe_get" external set : bytes -> int -> char -> unit = "%string_safe_set" external create : int -> bytes = "caml_create_string" val make : int -> char -> bytes val init : int -> f:(int -> char) -> bytes val empty : bytes v...
a3960e0d18fef7e7a3ca87252f0dfbfcffa89a258c8e0eca9b1d04429f465316
funcool/lentes
build.clj
(require '[cljs.build.api :as b]) (println "Building ...") (let [start (System/nanoTime)] (b/build (b/inputs "test" "src") {:main 'lentes.tests :parallel-build false :output-to "out/tests.js" :output-dir "out/tests" :target :nodejs :optimizations :none :pretty-print true :language-...
null
https://raw.githubusercontent.com/funcool/lentes/2cf7a6a2c5577aa79f2ecf30b5c134e379bdd525/scripts/build.clj
clojure
(require '[cljs.build.api :as b]) (println "Building ...") (let [start (System/nanoTime)] (b/build (b/inputs "test" "src") {:main 'lentes.tests :parallel-build false :output-to "out/tests.js" :output-dir "out/tests" :target :nodejs :optimizations :none :pretty-print true :language-...
7a27b8c570509729b80538d0e1374e00270ead34f0c467ada403fa80d4f5f43d
Bodigrim/logict
grandparents.hs
# LANGUAGE CPP # import Control.Applicative import Control.Monad.Logic #if !MIN_VERSION_base(4,8,0) import Data.Monoid (Monoid (..)) #endif #if MIN_VERSION_base(4,9,0) import Data.Semigroup (Semigroup (..)) #endif parents :: [ (String, String) ] parents = [ ("Sarah", "John") , ("Arnold", "John") ...
null
https://raw.githubusercontent.com/Bodigrim/logict/03547b22819b918036a8ee7547caf94f675766bf/example/grandparents.hs
haskell
# LANGUAGE CPP # import Control.Applicative import Control.Monad.Logic #if !MIN_VERSION_base(4,8,0) import Data.Monoid (Monoid (..)) #endif #if MIN_VERSION_base(4,9,0) import Data.Semigroup (Semigroup (..)) #endif parents :: [ (String, String) ] parents = [ ("Sarah", "John") , ("Arnold", "John") ...
8c5ac61d788d655e15cd2392c9fc1eefcd85d172bd5636e645c45b0a5842d5ec
kiselgra/c-mera
cxx.namespace.00.lisp
(include <iostream>) (using-namespace std) (namespace 'foo (typedef int bar)) (decl (((from-namespace 'foo 'bar) x = 9)) (function main () -> int (<< cout x endl) (return 0))) # # 9
null
https://raw.githubusercontent.com/kiselgra/c-mera/d06ed96d50a40a3fefe188202c8c535d6784f392/tests/cxx.namespace.00.lisp
lisp
(include <iostream>) (using-namespace std) (namespace 'foo (typedef int bar)) (decl (((from-namespace 'foo 'bar) x = 9)) (function main () -> int (<< cout x endl) (return 0))) # # 9
d98038ccfb6150d69e2586ba9172a05c31ca2cf17b4d9b36373d35d3a8176be6
exercism/babashka
example.clj
(ns largest-series-product) (defn- char->digit [c] {:pre [(Character/isDigit c)]} (Character/digit c 10)) (defn- digits [ds] (map char->digit ds)) (defn- slices [n ds] (partition n 1 (digits ds))) (defn largest-product [size ds] (cond (zero? size) 1 (> size (count ds)) (throw (Exception. "Span ...
null
https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/practice/largest-series-product/.meta/src/example.clj
clojure
(ns largest-series-product) (defn- char->digit [c] {:pre [(Character/isDigit c)]} (Character/digit c 10)) (defn- digits [ds] (map char->digit ds)) (defn- slices [n ds] (partition n 1 (digits ds))) (defn largest-product [size ds] (cond (zero? size) 1 (> size (count ds)) (throw (Exception. "Span ...
5eb1c6d78e46e08b211aff50b010aabb70430bab20b73c2d08361627c5770832
weyrick/roadsend-php
make-lib.scm
(module __make-php-gtk-lib (import (php-gtk-lib "php-gtk.scm")) (import (php-gdk-lib "php-gdk.scm")) (import (gtk-enums-lib "gtk-enums.scm")) (import (gdk-enums-lib "gdk-enums.scm")) (import (php-gtk-common-lib "php-gtk-common.scm")))
null
https://raw.githubusercontent.com/weyrick/roadsend-php/d6301a897b1a02d7a85bdb915bea91d0991eb158/runtime/ext/gtk/make-lib.scm
scheme
(module __make-php-gtk-lib (import (php-gtk-lib "php-gtk.scm")) (import (php-gdk-lib "php-gdk.scm")) (import (gtk-enums-lib "gtk-enums.scm")) (import (gdk-enums-lib "gdk-enums.scm")) (import (php-gtk-common-lib "php-gtk-common.scm")))
1afe48eac07fd3f3ec6934072332c4e209a2fd8cbfb73a430a76209a72e46090
dhleong/wish
caching.cljs
(ns ^{:author "Daniel Leong" :doc "caching"} wish.providers.caching (:require-macros [cljs.core.async :refer [go]] [wish.util.log :as log :refer [log]]) (:require [clojure.core.async :refer [alt! chan close! timeout <! >!]] [alandipert.storage-atom :refer [local-storage]] ...
null
https://raw.githubusercontent.com/dhleong/wish/9036f9da3706bfcc1e4b4736558b6f7309f53b7b/src/cljs/wish/providers/caching.cljs
clojure
if base is unavailable, we can take over clear cache delegate to base don't try to load from provider if dirty if the sheet cache is dirty, just load it from cache to avoid overwriting changes accidentally successful load couldn't load because we signed out of the provider; remove anything we had from the cach...
(ns ^{:author "Daniel Leong" :doc "caching"} wish.providers.caching (:require-macros [cljs.core.async :refer [go]] [wish.util.log :as log :refer [log]]) (:require [clojure.core.async :refer [alt! chan close! timeout <! >!]] [alandipert.storage-atom :refer [local-storage]] ...
cda6669be610cdafed24b6ca624c5b0ab92d811e1ac50fe3cc1cd166448dde7c
HealthSamurai/stresty
detailed_test.clj
(ns stresty.format.detailed-test (:require [stresty.format.detailed :as sut] [stresty.world :as world] [clojure.test :as t])) (t/deftest test-compact-fmt (world/start-test-server) (world/main "path:test" "ns:stresty.testcase" "test" "fmt:detailed" "env:stresty.testcase/env...
null
https://raw.githubusercontent.com/HealthSamurai/stresty/6e51b2e7fb41e0c4f968c4824faa4923669555c1/test/stresty/format/detailed_test.clj
clojure
(world/main "path:../fhir-stresty" "ns:servers" "test" "fmt:compact")
(ns stresty.format.detailed-test (:require [stresty.format.detailed :as sut] [stresty.world :as world] [clojure.test :as t])) (t/deftest test-compact-fmt (world/start-test-server) (world/main "path:test" "ns:stresty.testcase" "test" "fmt:detailed" "env:stresty.testcase/env...
074b7320d0f86b026a3af06543627c7a5e521807ab6d41107e2852b320625679
malcolmreynolds/GSLL
lambert.lisp
;; Lambert's W functions , Fri Apr 28 2006 - 20:40 Time - stamp : < 2008 - 10 - 25 10:59:17EDT lambert.lisp > $ Id$ (in-package :gsl) ;;; Lambert's W functions, W(x), are defined to be solutions ;;; of the equation W(x) exp(W(x)) = x. This function has multiple branches for x < 0 ; however , it has only ...
null
https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/special-functions/lambert.lisp
lisp
Lambert's W functions Lambert's W functions, W(x), are defined to be solutions of the equation W(x) exp(W(x)) = x. This function has however , it has only W < -1 for x < 0. **************************************************************************** Examples and unit test ***************************************...
, Fri Apr 28 2006 - 20:40 Time - stamp : < 2008 - 10 - 25 10:59:17EDT lambert.lisp > $ Id$ (in-package :gsl) two real - valued branches . We define W_0(x ) to be the principal branch , where W > -1 for x < 0 , and ) ) to be the other real branch , where (defmfun lambert-W0 (x) "gsl_sf_lambert_...
61aed57904d9d5c91b0571812f56b9a21ee1973e53229803309eee4de4b06aaf
tolysz/ghcjs-stack
Hpc.hs
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Program.Hpc -- Copyright : Thomas Tuegel 2011 -- -- Maintainer : -- Portability : portable -- This module provides an library interface to the @hpc@ program . module Distribution.Simple.Pro...
null
https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/Cabal/Distribution/Simple/Program/Hpc.hs
haskell
--------------------------------------------------------------------------- | Module : Distribution.Simple.Program.Hpc Copyright : Thomas Tuegel 2011 Maintainer : Portability : portable | Invoke hpc with the given parameters. library as a dependency can still work, but those that include the libr...
This module provides an library interface to the @hpc@ program . module Distribution.Simple.Program.Hpc ( markup , union ) where import Distribution.ModuleName import Distribution.Simple.Program.Run import Distribution.Simple.Program.Types import Distribution.Text import Distribution.Simple.Utils import...
b0e6b199f8a7c38f09fb250b648c89e6f322c52b33abc434b9ef5e4b4c930e0d
draperlaboratory/cbat_tools
cbat_clp_set_composite.ml
(***************************************************************************) (* *) Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc. (* *) (* This...
null
https://raw.githubusercontent.com/draperlaboratory/cbat_tools/334523cb4415f187e33f190a691e34b73733ef24/vsa/value_set/lib/src/cbat_clp_set_composite.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 !Core_kernel open Bap.Std module Word_ops = Cbat_word_ops module Utils = Cbat_vsa...
dfea140feb4144c41e00f4aa3ee654a449b824bddc50a29565a27ba27cf7475a
haskell-works/avro
DefaultsSpec.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # module Avro.DefaultsSpec where import qualified Data.Aeson as J import qualified Data.Aeson.KeyMap as KM import Data.Avro.Schema.Schema import qualified Data.HashMap.Strict as M import Data.List.NonEmpty ...
null
https://raw.githubusercontent.com/haskell-works/avro/ccb46b4b8654f2af09c7454ea3e210213ce901d6/test/Avro/DefaultsSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables # module Avro.DefaultsSpec where import qualified Data.Aeson as J import qualified Data.Aeson.KeyMap as KM import Data.Avro.Schema.Schema import qualified Data.HashMap.Strict as M import Data.List.NonEmpty (NonEmpty (..)) import qualified D...
20a7d30f4a62ea681d83298887a3b768e12cc069f6c7e765a7a2f9dff497dc01
mbacarella/opws
bin.mli
val chr : int -> char val ord : char -> int val ord32 : char -> Int32.t val and32 : Int32.t -> Int32.t -> Int32.t val xor32 : Int32.t -> Int32.t -> Int32.t val or32 : Int32.t -> Int32.t -> Int32.t val right32 : Int32.t -> int -> Int32.t val left32 : Int32.t -> int -> Int32.t val ror32 : Int32.t -> int -> Int32.t val ro...
null
https://raw.githubusercontent.com/mbacarella/opws/946b1e3e8e62712cfcdf22663ebfd857c025d5c5/bin.mli
ocaml
val chr : int -> char val ord : char -> int val ord32 : char -> Int32.t val and32 : Int32.t -> Int32.t -> Int32.t val xor32 : Int32.t -> Int32.t -> Int32.t val or32 : Int32.t -> Int32.t -> Int32.t val right32 : Int32.t -> int -> Int32.t val left32 : Int32.t -> int -> Int32.t val ror32 : Int32.t -> int -> Int32.t val ro...
b3e4d0fadfadc625fae5405931b099f08c72fd3dd719be18458480b8751d42be
charlieg/Sparser
West-Bengal_1-23-08.lisp
W Bengal bird flu 'is spreading' Officials in the Indian state of West Bengal say that the bird flu epidemic has spread to two more of the state's 19 districts, taking the total to nine. They say that the spread of the H5N1 virus means that even more chicken and duck will have to be killed than was originally estimat...
null
https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/corpus/bird-flu/West-Bengal_1-23-08.lisp
lisp
W Bengal bird flu 'is spreading' Officials in the Indian state of West Bengal say that the bird flu epidemic has spread to two more of the state's 19 districts, taking the total to nine. They say that the spread of the H5N1 virus means that even more chicken and duck will have to be killed than was originally estimat...
ca9270a9691eb44a990272f6ca196bdaaed23a5ee23e04100d7b8bf37d704791
polachok/bdf2wscons
main.hs
{-# LANGUAGE OverloadedStrings #-} import System.Environment import Data.Attoparsec.ByteString.Char8 hiding (take) import Data.Attoparsec.Combinator import qualified Data.ByteString.Char8 as BS import Control.Applicative import Data.Char import Data.Bits import Data.Map (Map) import qualified Data.Map as Map import Num...
null
https://raw.githubusercontent.com/polachok/bdf2wscons/018b85a8e64b022e3b352318d250863cc9c1a126/main.hs
haskell
# LANGUAGE OverloadedStrings #
import System.Environment import Data.Attoparsec.ByteString.Char8 hiding (take) import Data.Attoparsec.Combinator import qualified Data.ByteString.Char8 as BS import Control.Applicative import Data.Char import Data.Bits import Data.Map (Map) import qualified Data.Map as Map import Numeric toNextLine = skipWhile (/='\n...
d6042803d921930e7fc8ba2e6c3f345f405398b09df37b45e8fc7bc4597a91c5
chrovis/cljam
reader_test.clj
(ns cljam.io.vcf.reader-test (:require [clojure.test :refer [deftest is]] [cljam.io.vcf.reader :as vcf-reader])) (deftest parse-structured-line-test (is (= {:id "ID", :description "\"This\" is a description", :note "You can use \" in string fields by escaping it with \\"} (#'vcf-read...
null
https://raw.githubusercontent.com/chrovis/cljam/2b8e7386765be8efdbbbb4f18dbc52447f4a08af/test/cljam/io/vcf/reader_test.clj
clojure
(ns cljam.io.vcf.reader-test (:require [clojure.test :refer [deftest is]] [cljam.io.vcf.reader :as vcf-reader])) (deftest parse-structured-line-test (is (= {:id "ID", :description "\"This\" is a description", :note "You can use \" in string fields by escaping it with \\"} (#'vcf-read...
709c7c90c7e8caaecf1071e79283ba62b972be77e20ccc4a8ce35383894e05e0
den1k/vimsical
queries.cljc
(ns vimsical.remotes.backend.status.queries (:require [clojure.spec.alpha :as s] [vimsical.remotes.event :as event])) (s/def ::status #{:ok}) (s/def ::result (s/keys :req-un [::status])) (defmethod event/event-spec ::status [_] (s/cat :id any?)) (defmethod event/result-spec ::status [_] (s/cat :id any? :resu...
null
https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/src/common/vimsical/remotes/backend/status/queries.cljc
clojure
(ns vimsical.remotes.backend.status.queries (:require [clojure.spec.alpha :as s] [vimsical.remotes.event :as event])) (s/def ::status #{:ok}) (s/def ::result (s/keys :req-un [::status])) (defmethod event/event-spec ::status [_] (s/cat :id any?)) (defmethod event/result-spec ::status [_] (s/cat :id any? :resu...
9f6d287b8bf6ae8f338bcb698d2c601bb53add38df759afd8bae99696b735a8a
iijlab/postgresql-pure
Spec.hs
import Database.HDBC.Record (runQuery) import Database.HDBC.Session (handleSqlError', withConnectionIO) import Database.Relational (relationalQuery) import Test.Hspec import qualified DataSource as DS import qualified DataSource.Pure as DSP import qualified R...
null
https://raw.githubusercontent.com/iijlab/postgresql-pure/2a640f102f3e3540aedbcf4cfb5d1ed10310f773/test-relational-record/Spec.hs
haskell
# ANN module "HLint: ignore Redundant do" #
import Database.HDBC.Record (runQuery) import Database.HDBC.Session (handleSqlError', withConnectionIO) import Database.Relational (relationalQuery) import Test.Hspec import qualified DataSource as DS import qualified DataSource.Pure as DSP import qualified R...
1bd681418b9cd83479af4070bfb3f629f4aa826b03701ac85da91a1e41f2c7b9
8c6794b6/haskell-sc-scratch
CB.hs
{-# LANGUAGE EmptyDataDecls #-} # LANGUAGE TypeOperators # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # | Module : $ Header$ CopyRight : ( c ) 8c6794b6 License : : Stability : unstable Portability : non - portable From : < -final/CB.hs > Module : $Header$ CopyRigh...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/Oleg/TTF/CB.hs
haskell
# LANGUAGE EmptyDataDecls # ---------------------------------------------------------------------------- Call-by-name Result of subtraction is not needed. ---------------------------------------------------------------------------- Call-by-value -----------------------------------------------------------------------...
# LANGUAGE TypeOperators # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # | Module : $ Header$ CopyRight : ( c ) 8c6794b6 License : : Stability : unstable Portability : non - portable From : < -final/CB.hs > Module : $Header$ CopyRight : (c) 8c6794b6 License :...
5f630f52b9029680192064763bbd20d83f4947564cb3a9f8bfed62cf9ba47c5e
Opetushallitus/aipal
vipunen.clj
Copyright ( c ) 2016 The Finnish National Board of Education - Opetushallitus ;; This program is free software : Licensed under the EUPL , Version 1.1 or - as soon as they will be approved by the European Commission - subsequent versions of the EUPL ( the " Licence " ) ; ;; ;; You may not use this work except...
null
https://raw.githubusercontent.com/Opetushallitus/aipal/767bd14ec7153dc97fdf688443b9687cdb70082f/aipal/src/clj/aipal/arkisto/vipunen.clj
clojure
You may not use this work except in compliance with the Licence. You may obtain a copy of the Licence at: / This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Copyright ( c ) 2016 The Finnish National Board of Education - Opetushallitus This program is free software : Licensed under the EUPL , Version 1.1 or - as soon as they will be approved by the European Commission - subsequent versions European Union Public Licence for more details . (ns aipal.arkisto.vipunen...
234e5aec76ed50f880dff581e589db72393be0d923affb22f4385bd691d0c666
Apress/beg-haskell
ScottyMain.hs
# LANGUAGE OverloadedStrings , ScopedTypeVariables , RecordWildCards , QuasiQuotes , TemplateHaskell # QuasiQuotes, TemplateHaskell #-} module Main where import Prelude hiding (product) import Control.Monad.IO.Class (liftIO) import Data.Monoid (mconcat) import qualified Database.Persist.S...
null
https://raw.githubusercontent.com/Apress/beg-haskell/aaacbf047d553e6177c38807e662cc465409dffd/chapter12/src/ScottyMain.hs
haskell
import Text.Digestive.Aeson liftIO $ Db.runSqlite "example.db" insertInitialData
# LANGUAGE OverloadedStrings , ScopedTypeVariables , RecordWildCards , QuasiQuotes , TemplateHaskell # QuasiQuotes, TemplateHaskell #-} module Main where import Prelude hiding (product) import Control.Monad.IO.Class (liftIO) import Data.Monoid (mconcat) import qualified Database.Persist.S...
159b6020e3fb69cf562225bf7723ef9b5628d51deb6cd819c941773b17272df0
johnlawrenceaspden/hobby-code
clojure-hello-2022.clj
(defn factorial [n] (if (< n 2) n (* n (factorial (dec n))))) (factorial 6) (println "Hello")
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/3e67615ee936067f44cac33ebca8fc704970ecf8/clojure2022/clojure-hello-2022.clj
clojure
(defn factorial [n] (if (< n 2) n (* n (factorial (dec n))))) (factorial 6) (println "Hello")
838ee9e28b33fe896c9dbce143b65d5e03b7d50bdecb5ab7b63259bb66b6ab13
ACoquereau/psmt2-frontend
test.ml
let%test "must-return-true" = true let%test_unit "must-return-unit" = () let%test_module "module" = ( module struct let%test "must-return-true" = true end )
null
https://raw.githubusercontent.com/ACoquereau/psmt2-frontend/2318f60dbcf630d406e2d73d293fbb9ac1791026/test/inline-tests/test.ml
ocaml
let%test "must-return-true" = true let%test_unit "must-return-unit" = () let%test_module "module" = ( module struct let%test "must-return-true" = true end )
a6f7f287b5a69652f7d8a3e3d065a4c14af43c8cadc8c91d9500ce7b2046f9e8
BitGameEN/bitgamex
emysql.erl
Copyright ( c ) 2009 - 2012 < > < > < > %% Eonblast Corporation <> %% %% Permission is hereby granted, free of charge, to any person %% obtaining a copy of this software and associated documentation files ( the " Software"),to deal in the Software without restric- %% tion, including without l...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/emysql/src/emysql.erl
erlang
Eonblast Corporation <> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation tion, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to...
Copyright ( c ) 2009 - 2012 < > < > < > files ( the " Software"),to deal in the Software without restric- included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER...
beba963da853183310917236b7cb343b0588d946f5a28acedbe78ec90b836c2e
twosigma/Cook
mesos_compute_cluster.clj
(ns cook.test.mesos.mesos-compute-cluster (:require [clojure.core.async :as async] [clojure.core.cache :as cache] [clojure.data.json :as json] [clojure.test :refer :all] [cook.mesos.heartbeat :as heartbeat] [cook.mesos.mesos-compute-cluster :as mcc] ...
null
https://raw.githubusercontent.com/twosigma/Cook/d6571c5b821397c9b99a9def1919bf3948ed814f/scheduler/test/cook/test/mesos/mesos_compute_cluster.clj
clojure
Should see both clusters created. verify the sandbox-directory stored into the db verify the instance state
(ns cook.test.mesos.mesos-compute-cluster (:require [clojure.core.async :as async] [clojure.core.cache :as cache] [clojure.data.json :as json] [clojure.test :refer :all] [cook.mesos.heartbeat :as heartbeat] [cook.mesos.mesos-compute-cluster :as mcc] ...
aeea035582887a64eb5b1d93114c48314be8c4da3a8657ce85a965217c302709
jg513/enif_protobuf
ep_issue_11_tests.erl
Copyright ( c ) , -module(ep_issue_11_tests). -compile(export_all). -include_lib("eunit/include/eunit.hrl"). -include_lib("gpb/include/gpb.hrl"). % issue_11_test() -> Defs = [ { proto_defs_version , 2 } , %% {file, {"proto3_180", "proto3_180.proto"}}, %% {{msg_containment, "proto3_1...
null
https://raw.githubusercontent.com/jg513/enif_protobuf/15861eacfd87925297dd7a8a3acbaee42a1cfd4a/test/ep_issue_11_tests.erl
erlang
{file, {"proto3_180", "proto3_180.proto"}}, {{msg_containment, "proto3_180"}, [pro_180_all_prop, pro_180_items_list]}, {{enum_containment, "proto3_180"}, []},
Copyright ( c ) , -module(ep_issue_11_tests). -compile(export_all). -include_lib("eunit/include/eunit.hrl"). -include_lib("gpb/include/gpb.hrl"). issue_11_test() -> Defs = [ { proto_defs_version , 2 } , { syntax , " " } , {{msg, pro_180_items_list}, [ #field{name = id...
7b451c26e05cdf076214febb873623c9f3d239206461bc13a3886a042d5e9ab4
horie-t/iacc-riscv
compiler.scm
;;;; ユーティリティ関数 ;;; 書式と引数を取って表示し、改行を付け加えます。 例 : ( emit " addi t0 , t0 , ~s " 1 ) addi t0 , t0 , 1 ;; が表示されます。 (define (emit . args) (apply format #t args) (newline)) ;;;; オブジェクト型情報定義: タグ付きポインタ表現を使う ;;; 整数: 下位2ビットが00、上位30ビットが符号付き整数となっている 整数変換シフト量 (define fxmask #x03) ; 整数判定ビットマスク(ANDを取って0なら整数オブジェクト) ;;; b...
null
https://raw.githubusercontent.com/horie-t/iacc-riscv/2aea0b27f712f4b9354ecf04a7a0cb08f5c2117e/02_ImmediateConstants/compiler.scm
scheme
ユーティリティ関数 書式と引数を取って表示し、改行を付け加えます。 が表示されます。 オブジェクト型情報定義: タグ付きポインタ表現を使う 整数: 下位2ビットが00、上位30ビットが符号付き整数となっている 整数判定ビットマスク(ANDを取って0なら整数オブジェクト) boolean: #fの数値表現 #t boolean判定ビットマスク(ANDを取ってis_boolならbooleanオブジェクト) 空リスト: char判定ビットマスク(ANDを取って、chartagならchar) charタグ char変換シフト量 32bit(4バイト)
例 : ( emit " addi t0 , t0 , ~s " 1 ) addi t0 , t0 , 1 (define (emit . args) (apply format #t args) (newline)) 整数変換シフト量 文字 : (define fixnum-bits (- (* wordsize 8) fxshift)) (define fxlower (- (expt 2 (- fixnum-bits 1)))) (define fxupper (- (expt 2 (- fixnum-bits 1)) 1)) (define (fixnum? x) (...
19522bad674fe09fa548f7804215263366a01d029625c9b5f02e0393819cc988
ulricha/dsh
Opt.hs
| Common code for DAG - based algebra optimizers . module Database.DSH.Common.Opt ( module Database.Algebra.Rewrite.Match , module Database.Algebra.Rewrite.PatternConstruction , module Database.Algebra.Rewrite.Properties , module Database.Algebra.Rewrite.Rule , module Database.Algebra.Rewrite.Trav...
null
https://raw.githubusercontent.com/ulricha/dsh/e6cd5c6bea575e62a381e89bfc4cc7cb97485106/src/Database/DSH/Common/Opt.hs
haskell
------------------------------------------------------------ Versions of rewrite combinators that maintain the Shape description of the query structure. | Replace a root node while maintaining the query structure information. | Replace a node with a new operator while maintaining the query structure information. ...
| Common code for DAG - based algebra optimizers . module Database.DSH.Common.Opt ( module Database.Algebra.Rewrite.Match , module Database.Algebra.Rewrite.PatternConstruction , module Database.Algebra.Rewrite.Properties , module Database.Algebra.Rewrite.Rule , module Database.Algebra.Rewrite.Trav...
3c34a4612a86b91d172391bbfde34f40e1d8e757a0eedc2c3fc4c6e2e84d709e
facebook/duckling
Rules.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} module Duckling.Volume.KM...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Volume/KM/Rules.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE GADTs # # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. # LANGUAGE LambdaCase # module Duckling.Volume.KM.Rules ( rules ) where import Data.Text (Text) import Prelude import Data.String import Duckling.Dimensions.Types import Duckling.Types import Duckling.Regex.Types import Duckling.Volume.Helpers import Duckling.Nu...
2dc15874a0b309537bd1eddd0876aa0388e56dab13aa5c9faab82c3a429acc56
LightAndLight/typed-cfg
tasty.hs
module Main(main) where import Test.Tasty (defaultMain, testGroup) import Test.Tasty.HUnit (testCase, (@?=)) import qualified Test as T import qualified TestLMS as LMS import Inspection main :: IO () main = defaultMain $ testGroup "all" [ inspect_tests , testGroup "normal" [ testCase "parseA...
null
https://raw.githubusercontent.com/LightAndLight/typed-cfg/ceb3c8d3ea8990959835af1d2cc9bd3dbb100502/tests/tasty.hs
haskell
module Main(main) where import Test.Tasty (defaultMain, testGroup) import Test.Tasty.HUnit (testCase, (@?=)) import qualified Test as T import qualified TestLMS as LMS import Inspection main :: IO () main = defaultMain $ testGroup "all" [ inspect_tests , testGroup "normal" [ testCase "parseA...
f362994be7c275b5b91ff5b1d2be22fa5c607936db6bbf56fcec2f02a7b96de2
exoscale/clojure-kubernetes-client
policy_v1beta1_pod_security_policy_spec.clj
(ns clojure-kubernetes-client.specs.policy-v1beta1-pod-security-policy-spec (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] [clojure-kubernetes-client.specs.policy-v1beta1-allowed-csi-driver :refer :all] [clojure-kubernetes-client.specs.policy-v1beta1-allowed-fle...
null
https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/policy_v1beta1_pod_security_policy_spec.clj
clojure
(ns clojure-kubernetes-client.specs.policy-v1beta1-pod-security-policy-spec (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] [clojure-kubernetes-client.specs.policy-v1beta1-allowed-csi-driver :refer :all] [clojure-kubernetes-client.specs.policy-v1beta1-allowed-fle...
b65b120af492c4eb00ab195de4c3b42a7430fbac9a943ca2ca77845058a5a441
nomeata/arbtt
OSX.hs
module Capture.OSX where import Data import qualified Data.MyText as T import Control.Monad import Control.Applicative import Graphics.OSX.Window setupCapture :: IO () setupCapture = do return () captureData :: IO CaptureData captureData = do titles <- fetchWindowTitles foreground <- getFore...
null
https://raw.githubusercontent.com/nomeata/arbtt/5e9bf42785e075adaa574bf853f7adbc3408e7f4/src/Capture/OSX.hs
haskell
module Capture.OSX where import Data import qualified Data.MyText as T import Control.Monad import Control.Applicative import Graphics.OSX.Window setupCapture :: IO () setupCapture = do return () captureData :: IO CaptureData captureData = do titles <- fetchWindowTitles foreground <- getFore...
3e6ee6f45ced5367f2f8ef1b349650fbf3e086c23f05d6946fa963fce4c90a27
coord-e/mlml
closure.ml
module Expr = Tree.Expression module Mod = Tree.Module module Pat = Tree.Pattern module SS = Tree.Simple_set module Binop = Tree.Binop (* TODO: Improve this function's name *) let rec intros_and_free_of_binding is_rec = function | Expr.FunBind (ident, param, body) -> let param = Pat.introduced_idents param in ...
null
https://raw.githubusercontent.com/coord-e/mlml/ec34b1fe8766901fab6842b790267f32b77a2861/mlml/analysis/closure.ml
ocaml
TODO: Improve this function's name TODO: simplify application to subexpr define an alias because it's a long name convert to closure form
module Expr = Tree.Expression module Mod = Tree.Module module Pat = Tree.Pattern module SS = Tree.Simple_set module Binop = Tree.Binop let rec intros_and_free_of_binding is_rec = function | Expr.FunBind (ident, param, body) -> let param = Pat.introduced_idents param in let param = if is_rec then SS.add ident...
1573179ca2390f2ff839f8611537c8a13f2499a4d2201f7eeeef133fb69d428e
racket/rhombus-prototype
syntax-class.rkt
#lang racket/base (require (for-syntax racket/base syntax/parse/pre "tag.rkt" "attribute-name.rkt") syntax/parse/pre (only-in "binding.rkt" in-binding-space) (submod "quasiquote.rkt" convert) (submod "quasiquote.rkt" shap...
null
https://raw.githubusercontent.com/racket/rhombus-prototype/b05f8a1515cf01c6b431f820c2a7f62b2b9532a8/rhombus/private/syntax-class.rkt
racket
immediate-patterns shorthand Patterns within `pattern` returns a `rhombus-syntax-class` immediate-patterns shorthand patterns within `pattern` returns a `rhombus-syntax-class` returns a `rhombus-syntax-class` if `define-syntax-id` is #f, otherwise returns a list of definitions shortcut to avoid redundant parsi...
#lang racket/base (require (for-syntax racket/base syntax/parse/pre "tag.rkt" "attribute-name.rkt") syntax/parse/pre (only-in "binding.rkt" in-binding-space) (submod "quasiquote.rkt" convert) (submod "quasiquote.rkt" shap...
d718baa488a54548acbfed289f69ea0c8db4f50ee4209d7a6f33eefdeeef7412
ucsd-progsys/nate
pplex.mli
(***********************************************************************) (* *) MLTk , Tcl / Tk interface of Objective Caml (* *) , , and ...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/labltk/compiler/pplex.mli
ocaml
********************************************************************* described in file LICENSE found in the...
MLTk , Tcl / Tk interface of Objective Caml , , and projet Cristal , INRIA Rocquencourt , Kyoto University RIMS Copyright 2002 Institut National de Recherche en Informatique et en Automatique and...
b2a2ad7b962b4ba32c67e0a608cd38e4a292959c0dc82e3488984bfbe0cbeb80
godfat/sandbox
deadlock-mvar.hs
-- cabal install monad-coroutine import Control.Concurrent.MVar (MVar, newMVar, readMVar, takeMVar, putMVar) import Control.Monad.Trans (lift) import Control.Monad.Coroutine (Coroutine, resume) import Control.Monad.Coroutine.SuspensionFunctors (Yield(Yield), yield) type Fiber = Coroutine (Yield ()) IO () fiber :: M...
null
https://raw.githubusercontent.com/godfat/sandbox/eb6294238f92543339adfdfb4ba88586ba0e82b8/haskell/coroutine/deadlock-mvar.hs
haskell
cabal install monad-coroutine deadlock
import Control.Concurrent.MVar (MVar, newMVar, readMVar, takeMVar, putMVar) import Control.Monad.Trans (lift) import Control.Monad.Coroutine (Coroutine, resume) import Control.Monad.Coroutine.SuspensionFunctors (Yield(Yield), yield) type Fiber = Coroutine (Yield ()) IO () fiber :: MVar Int -> Fiber fiber i = do ...
37c47c7f809f23ca603f7855e1ef40675cf786cfd031d418a695fca275cb8158
RBornat/jape
symbol.mli
Copyright ( C ) 2003 - 19 This file is part of the proof engine , which is part of . 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 ver...
null
https://raw.githubusercontent.com/RBornat/jape/afe9f207e89e965636b43ef8fad38fd1f69737ae/distrib/camlengine/symbol.mli
ocaml
default is ID(s, None) aid for prettyprinters aid for parsers so that user can define new symbols, punctuation marks, whatever for primitive backtracking aid for keyboardists aid for name inventors
Copyright ( C ) 2003 - 19 This file is part of the proof engine , which is part of . 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 ver...
11b5381596800b43464cbafe1f17218c009d4ec5027cf6726da23e74f447f7d4
igorhvr/bedlam
printf.scm
;;;; "printf.scm" Implementation of standard C functions for Scheme Copyright ( C ) 1991 - 1993 , 1996 , 1999 - 2001 and . ; ;Permission to copy this software, to modify it, to redistribute it, ;to distribute modified versions, and to use it for any purpose is ;granted, subject to the following restrictions and u...
null
https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/slib/3b2/printf.scm
scheme
"printf.scm" Implementation of standard C functions for Scheme Permission to copy this software, to modify it, to redistribute it, to distribute modified versions, and to use it for any purpose is granted, subject to the following restrictions and understandings. in full. this software will be error-free, and I am ...
Copyright ( C ) 1991 - 1993 , 1996 , 1999 - 2001 and . 1 . Any copy made of this software must include this copyright notice 2 . I have made no warranty or representation that the operation of 3 . In conjunction with products arising from the use of this (require 'string-case) (require 'multiarg-apply) (re...
6054e6c0597dabf7d646c62cdfb1d565b7f224ca9e523e1f30b6593f277d3967
fogus/thneed
laziness.clj
(ns fogus.laziness "Utilities dealing with lazy and eager evaluation") (defn seq1 "Ensures that chunked sequences are evaluated one element at a time." [s] (lazy-seq (when-let [[x] (seq s)] (cons x (seq1 (rest s))))))
null
https://raw.githubusercontent.com/fogus/thneed/6d9527313a560af224a5a13327f1d8d7f506c6b8/src/fogus/laziness.clj
clojure
(ns fogus.laziness "Utilities dealing with lazy and eager evaluation") (defn seq1 "Ensures that chunked sequences are evaluated one element at a time." [s] (lazy-seq (when-let [[x] (seq s)] (cons x (seq1 (rest s))))))
4925f2dc7ece11de06e676d4c850348fb20ebd64f957ff2935d42975428e928e
TyOverby/mono
dice_spec_clicker_input.ml
open! Core open! Bonsai_web open Bonsai.Let_syntax module Rpgdice = Bonsai_web_rpgdice_example module Model = struct type t = { dice : int Int.Map.t ; const : int } [@@deriving equal, sexp] (* The standard RPG dice. *) let default_dice = Int.Set.of_list [ 4; 6; 8; 10; 12; 20; 100 ] let init = { ...
null
https://raw.githubusercontent.com/TyOverby/mono/9f361de248f67441dd1486419ba19044b6fa4fad/app/bonsai-examples/rpgdice/bin/dice_spec_clicker_input.ml
ocaml
The standard RPG dice.
open! Core open! Bonsai_web open Bonsai.Let_syntax module Rpgdice = Bonsai_web_rpgdice_example module Model = struct type t = { dice : int Int.Map.t ; const : int } [@@deriving equal, sexp] let default_dice = Int.Set.of_list [ 4; 6; 8; 10; 12; 20; 100 ] let init = { dice = Map.of_key_set default_d...
14c1efaeb5a64abaa597414578c4885913cf83bc99103048b8475b82e2fa16e1
portkey-cloud/aws-clj-sdk
acm_pca.clj
(ns portkey.aws.acm-pca (:require [portkey.aws])) (def endpoints '{"ap-northeast-1" {:credential-scope {:service "acm-pca", :region "ap-northeast-1"}, :ssl-common-name "acm-pca.ap-northeast-1.amazonaws.com", :endpoint "-pca.ap-northeast-1.amazonaws.com", :signature-version :v4}, "eu-west-1" {:cr...
null
https://raw.githubusercontent.com/portkey-cloud/aws-clj-sdk/10623a5c86bd56c8b312f56b76ae5ff52c26a945/src/portkey/aws/acm_pca.clj
clojure
(ns portkey.aws.acm-pca (:require [portkey.aws])) (def endpoints '{"ap-northeast-1" {:credential-scope {:service "acm-pca", :region "ap-northeast-1"}, :ssl-common-name "acm-pca.ap-northeast-1.amazonaws.com", :endpoint "-pca.ap-northeast-1.amazonaws.com", :signature-version :v4}, "eu-west-1" {:cr...
d1342053e564dd7f9a87d9c2957d906d50f8ba46f0a443c74fa8c478c17126a8
rescript-lang/rescript-compiler
lam_pass_remove_alias.ml
Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P. * Copyright ( C ) 2017 - , Authors of ReScript * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the...
null
https://raw.githubusercontent.com/rescript-lang/rescript-compiler/083212f8e5cc30d2f324155d6f460a3e06731e5b/jscomp/core/lam_pass_remove_alias.ml
ocaml
ATTENTION: Main use case, we should detect inline all immutable block .. Inline uncurried application when safe avoid nontermination, e.g, `g(g)` could be the code path {[ match x with | h::hs -> ]} be more cautious when do cross module inlining Function inlining interact ...
Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P. * Copyright ( C ) 2017 - , Authors of ReScript * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the...
4e6f134d8fe846bdef224be82dad576fd1f6246ee2914b17817bd00b604653ff
anoma/juvix-circuits
package.lisp
(defpackage #:alu.ir.new-terms (:documentation "Provides new constructors and types that can be used in the various IR's") (:local-nicknames (:util :alu.utils) (:spc :alu.spec)) (:use #:common-lisp #:serapeum) (:export ;; New Types Defined :bind :multiple-bind :standalone-ret ...
null
https://raw.githubusercontent.com/anoma/juvix-circuits/51f8ea2db5b1200c400ff1bc6d5f51249afc0073/src/intermediate/package.lisp
lisp
New Types Defined New Term Variants Defined New Term Lists Defined
(defpackage #:alu.ir.new-terms (:documentation "Provides new constructors and types that can be used in the various IR's") (:local-nicknames (:util :alu.utils) (:spc :alu.spec)) (:use #:common-lisp #:serapeum) (:export :bind :multiple-bind :standalone-ret New Constructors Defined...
34abe8548fb855472725b4cb29bae9fc823a1ebb0e5d47a5f3f6612f33fac583
hyperfiddle/electric
via6.clj
(ns dustin.via6 (:require [dustin.fiddle] [minitest :refer [tests]] [missionary.core :as m] [hyperfiddle.incremental :as I :refer [bindI joinI fmapI pureI capI]] [hyperfiddle.hfql20])) ; This fn is lifted because we are trying to test nested binds ; so we need a test fn of a -> m a (defn submissi...
null
https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2021/via/via6.clj
clojure
This fn is lifted because we are trying to test nested binds so we need a test fn of a -> m a resolve the symbol to var sanity
(ns dustin.via6 (:require [dustin.fiddle] [minitest :refer [tests]] [missionary.core :as m] [hyperfiddle.incremental :as I :refer [bindI joinI fmapI pureI capI]] [hyperfiddle.hfql20])) (defn submissions [a] (pureI (dustin.fiddle/submissions a))) (tests (submissions "alice") (capI *1) := [9])...
0cc52b42d72c9c4f4a9f71da5592fd40936087ff62f97a9cf8c14e5e529c5607
clash-lang/clash-compiler
NFDataX.hs
# LANGUAGE CPP # {-# LANGUAGE DeriveAnyClass #-} # OPTIONS_GHC -fplugin = GHC.TypeLits . KnownNat . Solver # module Clash.Tests.NFDataX where import Test.Tasty import Test.Tasty.HUnit import GHC.Generics (Generic) import Clash.Class.BitPack (pack) import Cl...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/clash-prelude/tests/Clash/Tests/NFDataX.hs
haskell
# LANGUAGE DeriveAnyClass # Test Template Haskell generated rnfX instance for tuples Test Template Haskell generated deepErrorX/ensureSpine instance for tuples
# LANGUAGE CPP # # OPTIONS_GHC -fplugin = GHC.TypeLits . KnownNat . Solver # module Clash.Tests.NFDataX where import Test.Tasty import Test.Tasty.HUnit import GHC.Generics (Generic) import Clash.Class.BitPack (pack) import Clash.Sized.Vector (Vec(..)) imp...
3c44b4a679e878866d8ca7337d1622874043abf1d9bf15855706e87b96254693
GaloisInc/daedalus
Worker.hs
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TemplateHaskell # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # -- | This module contains the worker thread, i.e., the thread which -- does all the parsing and type checking. # LANGUAGE Deriv...
null
https://raw.githubusercontent.com/GaloisInc/daedalus/76baf11113cc4a0b4ad06faba898a97e42a92e7a/daedalus-language-server/src/Daedalus/LSP/Worker.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # | This module contains the worker thread, i.e., the thread which does all the parsing and type checking. ----------------------------------------------------------------------------- Asking the worker thread to do something imagine that if the reactor is a bit...
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE DeriveFunctor # module Daedalus.LSP.Worker (requestParse, worker) where import Control.Concurrent (threadDelay) import Control.Concurrent.Async (Async, ...
143d2154799d17c5a674def0d42486b3354a0dd0e8650f4cd534fb002f7ffd96
gdamjan/erlang-irc-bot
ircbot_plugin_ping.erl
-module(ircbot_plugin_ping). -author(""). -behaviour(gen_event). -export([init/1, handle_event/2, terminate/2, handle_call/2, handle_info/2, code_change/3]). init(_Args) -> SECRET_KEY = crypto:strong_rand_bytes(32), {ok, SECRET_KEY}. handle_event(Msg, SECRET_KEY) -> case Msg of {in, Ref, [_Sende...
null
https://raw.githubusercontent.com/gdamjan/erlang-irc-bot/5e55848177b1e0e0a71d41c516f41d3cfe112784/src/ircbot_plugin_ping.erl
erlang
-module(ircbot_plugin_ping). -author(""). -behaviour(gen_event). -export([init/1, handle_event/2, terminate/2, handle_call/2, handle_info/2, code_change/3]). init(_Args) -> SECRET_KEY = crypto:strong_rand_bytes(32), {ok, SECRET_KEY}. handle_event(Msg, SECRET_KEY) -> case Msg of {in, Ref, [_Sende...
f00f109f9401402c92105af4a9f86d39324ca67506f6da3810354d09a59a54ec
panda-planner-dev/ipc2020-domains
d-09.lisp
(defdomain domain ( (:operator (!navigate ?x ?y ?z) ;; preconditions ( (type_rover ?x) (type_waypoint ?y) (type_waypoint ?z) (can_traverse ?x ?y ?z) (available ?x) (at ?x ?y) (visible ?y ?z) ) ;; delete effects ((at ?x ?y)) ;; add effects ((at ?x ?z)) ) (:operator (!sample_...
null
https://raw.githubusercontent.com/panda-planner-dev/ipc2020-domains/9adb54325d3df35907adc7115fcc65f0ce5953cc/partial-order/Rover/other/SHOP2/d-09.lisp
lisp
preconditions delete effects add effects preconditions delete effects add effects preconditions delete effects add effects preconditions delete effects add effects preconditions delete effects add effects preconditions delete effects add effects preconditions delete effects add effects preconditio...
(defdomain domain ( (:operator (!navigate ?x ?y ?z) ( (type_rover ?x) (type_waypoint ?y) (type_waypoint ?z) (can_traverse ?x ?y ?z) (available ?x) (at ?x ?y) (visible ?y ?z) ) ((at ?x ?y)) ((at ?x ?z)) ) (:operator (!sample_soil ?x ?s ?p) ( (type_rover ?x) (type_store ?s) (ty...
a44497d27cdec1f0ef1e1e47e1e397324e4cec4f6d5d6e185065ee813ee4b671
lambduli/frea
Token.hs
module Compiler.Parser.Token where data TokPosition = TokPosition { line :: Int , column :: Int } deriving (Eq, Show) data Token -- reserved identifiers/words = TokMatch | TokWith | TokData -- data | TokEliminator String -- which-_ | TokIf -- if | TokThen -- then | TokElse -- els...
null
https://raw.githubusercontent.com/lambduli/frea/939d8d8efae0147802595af5a9dbf5f2f9a97612/src/Compiler/Parser/Token.hs
haskell
reserved identifiers/words data which-_ if then else let in type _ type annotations lambda fix letrec variables | TokConstrId String special symbols ( ) [ ] , ` ; { } :: literals 'a' "string" assume rec module where
module Compiler.Parser.Token where data TokPosition = TokPosition { line :: Int , column :: Int } deriving (Eq, Show) data Token = TokMatch | TokWith | TokThe | TokDefine | TokVarUpper String | TokVarLower String | TokNativeSym String | TokOperator String | TokOpConstr Str...
da7aa1897e462a917ea038db53d3556791105040e154638940b3e37edffd724e
dfinity/motoko
ast.ml
This module originated as a copy of interpreter / syntax / ast.ml in the reference implementation . Base revision : WebAssembly / spec@a7a1856 . The changes are : * None for now The code is otherwise as untouched as possible , so that we can relatively easily apply diffs from the original code ( possi...
null
https://raw.githubusercontent.com/dfinity/motoko/399b8e8b0b47890388cd38ee0ace7638d9092b1a/src/wasm-exts/ast.ml
ocaml
* Throughout the implementation we use consistent naming conventions for * syntactic elements, associated with the types defined here and in a few * other places: * * x : var * v : value * e : instr * f : func * m : module_ * * t : value_type * s : func_type * c : context / config * * Th...
This module originated as a copy of interpreter / syntax / ast.ml in the reference implementation . Base revision : WebAssembly / spec@a7a1856 . The changes are : * None for now The code is otherwise as untouched as possible , so that we can relatively easily apply diffs from the original code ( possi...
2f7d3b4b4b36d3f873ad0b220e1ed70f9bfa998068bc11a2459b2655f672de0b
logseq/logseq
date_time_util.cljs
(ns logseq.graph-parser.date-time-util "cljs-time util fns for graph-parser" (:require [cljs-time.coerce :as tc] [cljs-time.core :as t] [cljs-time.format :as tf] [clojure.string :as string] [logseq.graph-parser.util :as gp-util])) (defn time-ms "Copy of util/time-m...
null
https://raw.githubusercontent.com/logseq/logseq/17f51c7b77c979add2685e0b656ce15a29dc447e/deps/graph-parser/src/logseq/graph_parser/date_time_util.cljs
clojure
(ns logseq.graph-parser.date-time-util "cljs-time util fns for graph-parser" (:require [cljs-time.coerce :as tc] [cljs-time.core :as t] [cljs-time.format :as tf] [clojure.string :as string] [logseq.graph-parser.util :as gp-util])) (defn time-ms "Copy of util/time-m...
60ce059e9ac0f04093ac586c5e9ec053a611038887fc162da9bd8f8a9faf17bb
mrmcc3/tailwind-clj
core.clj
(ns tailwind.core (:require [clojure.core.match :refer [match]] [clojure.pprint :refer [pprint]] [tailwind.config :as cfg :refer [cfg->]] [tailwind.base :as base] [tailwind.util :as u] [tailwind.transform :as t] [clojure.java.io :as io] [clojure.string :as str]) (:import (java.io Wri...
null
https://raw.githubusercontent.com/mrmcc3/tailwind-clj/4c5e25c2502bcc49a065e06f6919241686d11eab/src/tailwind/core.clj
clojure
emotion style extract css cli entry point
(ns tailwind.core (:require [clojure.core.match :refer [match]] [clojure.pprint :refer [pprint]] [tailwind.config :as cfg :refer [cfg->]] [tailwind.base :as base] [tailwind.util :as u] [tailwind.transform :as t] [clojure.java.io :as io] [clojure.string :as str]) (:import (java.io Wri...
30a38618aa6180175174728ded9b09924d2ea4ce80ba794d3d11c1fe4e343036
callum-oakley/advent-of-code
16.clj
(ns aoc.2017.16 (:require [aoc.string :as aocstr] [clojure.string :as str] [clojure.test :refer [deftest is]])) (defn parse [s] (map #(case (get % 0) \s ['spin [(read-string (subs % 1))]] \x ['exchange (map read-string (re-seq #"\d+" (subs % 1)))] \p ['partner [(get % 1) (get...
null
https://raw.githubusercontent.com/callum-oakley/advent-of-code/201058f08952883007bd99bdcdd2d8efa02906ab/src/aoc/2017/16.clj
clojure
(ns aoc.2017.16 (:require [aoc.string :as aocstr] [clojure.string :as str] [clojure.test :refer [deftest is]])) (defn parse [s] (map #(case (get % 0) \s ['spin [(read-string (subs % 1))]] \x ['exchange (map read-string (re-seq #"\d+" (subs % 1)))] \p ['partner [(get % 1) (get...
548630c259ce2ac8121256eb026dc713cf5a53e5aa45009845055cad93ae2fa0
blindglobe/clocc
view.lisp
-*- Mode : Common - Lisp ; Package : PICTURES ; -*- ;;; ;;; ;;; TEXAS INSTRUMENTS INCORPORATED P.O. BOX 149149 AUSTIN , TEXAS 78714 - 9149 ;;; Copyright ( C)1987,1988,1989,1990 Texas Instruments Incorporated . ;;; ;;; Permission is granted to any individual or institution to use, copy, modify,...
null
https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/gui/clue/pictures/view.lisp
lisp
Package : PICTURES ; -*- Permission is granted to any individual or institution to use, copy, modify, and distribute this software, provided that this complete copyright and permission notice is maintained, intact, in all copies and supporting documentation. express or implied warranty. Function: make-vie...
TEXAS INSTRUMENTS INCORPORATED P.O. BOX 149149 AUSTIN , TEXAS 78714 - 9149 Copyright ( C)1987,1988,1989,1990 Texas Instruments Incorporated . Texas Instruments Incorporated provides this software " as is " without Authors : , , Contributors : , , (in-package "PICTURES") (ex...
957ab944d3edd65aed418bd35362210e2e93751e2544498a2020bfde06d5ab9d
clojure-quant/infra-guix
tailscaleup.scm
(define-module (awb99 services tailscaleup) #:use-module (guix gexp) #:use-module (gnu packages) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (awb99 package tailscale) #:export (tailscaleup-service)) (define tailscaleup-shepherd-service (lambda (config) (list (shepherd-service ...
null
https://raw.githubusercontent.com/clojure-quant/infra-guix/7fc9d7318bac3107b712d81846cf208e34251a6f/modules/awb99/services/tailscaleup.scm
scheme
(append (environ))
(define-module (awb99 services tailscaleup) #:use-module (guix gexp) #:use-module (gnu packages) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (awb99 package tailscale) #:export (tailscaleup-service)) (define tailscaleup-shepherd-service (lambda (config) (list (shepherd-service ...
c90ca5bec87216e9084a77f4bca6c083e9b83e4ec396c20584935049158f00d8
CatalaLang/catala
name_resolution.ml
This file is part of the Catala compiler , a specification language for tax and social benefits computation rules . Copyright ( C ) 2020 , contributor : < > < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with th...
null
https://raw.githubusercontent.com/CatalaLang/catala/5e063dac1b41d77ae44279452f2d03d51e3efaca/compiler/desugared/name_resolution.ml
ocaml
* All variables, including scope variables and subscopes * What is the default rule to refer to for unnamed exceptions, if any * Other scopes referred to by this scope. Used for dependency analysis * Inside a scope, we distinguish between the variables and the subscopes. * Types of the fields of a struct * Types o...
This file is part of the Catala compiler , a specification language for tax and social benefits computation rules . Copyright ( C ) 2020 , contributor : < > < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with th...
dbf13b020024666ac96f5b081532b6274d9e952cb345e9be16987d9b8f59d6c9
MyDataFlow/ttalk-server
auto_export_test1.erl
Copyright 2010 - 2011 < > , < > and < > %%% This file is part of PropEr . %%% %%% PropEr is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 o...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/proper/test/auto_export_test1.erl
erlang
PropEr is free software: you can redistribute it and/or modify (at your option) any later version. PropEr is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License fo...
Copyright 2010 - 2011 < > , < > and < > This file is part of PropEr . it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Pub...
83e70ef380461acf0c390338a4f7f61f08c8766966060276efcdbf3f352b319c
exercism/ocaml
example.ml
open Base let add_to_map wcs w = Map.update wcs w ~f:(fun k -> Option.value_map k ~default:1 ~f:((+) 1)) let normalize = function | ch when Char.is_alphanum ch || Char.equal ch '\'' -> Char.lowercase ch | _ -> ' ' type position = | Start | End let quote_at s ~pos = let p = match pos with | Start -> 0...
null
https://raw.githubusercontent.com/exercism/ocaml/914e58d48e58a96fe7635fe4b06cc103af4ed683/exercises/practice/word-count/.meta/example.ml
ocaml
open Base let add_to_map wcs w = Map.update wcs w ~f:(fun k -> Option.value_map k ~default:1 ~f:((+) 1)) let normalize = function | ch when Char.is_alphanum ch || Char.equal ch '\'' -> Char.lowercase ch | _ -> ' ' type position = | Start | End let quote_at s ~pos = let p = match pos with | Start -> 0...
987a897ce7dbf0344bf26aafb50a105202323831b00c106ab9ec381690317f75
biocaml/biocaml
seq_range.ml
module type Identifier = sig include Comparable include Sexpable with type t := t val to_string : t -> string end module Make (S : Identifier) = struct type t = S.t * Range.t [@@deriving compare, sexp] let make s lo hi = let open Or_error in Range.make lo hi >>= fun r -> Or_error.return (s, r) l...
null
https://raw.githubusercontent.com/biocaml/biocaml/ac619539fed348747d686b8f628e80c1bb8bfc59/lib/unix/seq_range.ml
ocaml
module type Identifier = sig include Comparable include Sexpable with type t := t val to_string : t -> string end module Make (S : Identifier) = struct type t = S.t * Range.t [@@deriving compare, sexp] let make s lo hi = let open Or_error in Range.make lo hi >>= fun r -> Or_error.return (s, r) l...
df2d2c402c6df1e153c1bb3e52abf9c242d3fda4c4e13c75bb40199a2c91923c
patrikja/AFPcourse
Deep.hs
{-# LANGUAGE GADTs #-} module DSL.Deep (module DSL.Deep, module DSL.Common) where import DSL.Common Describe what a \emph{deep } implementation could look like . Give a type definition and describe ( in words or code ) what each of your primitive operations , and your run function , would do . Describe ...
null
https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/exam/2014-08/DSL/Deep.hs
haskell
# LANGUAGE GADTs # not in exam question Run function:
module DSL.Deep (module DSL.Deep, module DSL.Common) where import DSL.Common Describe what a \emph{deep } implementation could look like . Give a type definition and describe ( in words or code ) what each of your primitive operations , and your run function , would do . Describe what a \emph{deep} impl...
5e2fb728b41e5116d70c8fd0e7262bb22420366cb820e8c758234246c9ba78cd
LexiFi/menhir
ChopFix.mli
(******************************************************************************) (* *) (* Fix *) (* ...
null
https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/fix/src/attic/ChopFix.mli
ocaml
**************************************************************************** Fix ...
, Paris . All rights reserved . This file is distributed under the terms of the GNU Library General Public License version 2 , with a open Maps open Fix module type SYNTACTIC_EQUATIONS = sig type variable type 'variable formula val rhs: var...
526a8bcd1ebe56610af80763bcdc5f1b05a8186f020d722b95fbddd211064f80
fourmolu/fourmolu
transform-multi-line3-four-out.hs
# LANGUAGE TransformListComp # baz' xs ys = [ ( x , y ) | x <- xs , y <- ys , then group using First comment Second comment ]
null
https://raw.githubusercontent.com/fourmolu/fourmolu/1f8903a92c8d5001dc1ec8ecfd4a04a3b61c3283/data/examples/declaration/value/function/comprehension/transform-multi-line3-four-out.hs
haskell
# LANGUAGE TransformListComp # baz' xs ys = [ ( x , y ) | x <- xs , y <- ys , then group using First comment Second comment ]
3e2a17ea4df952257ca89939c9a313f589f62deaa61a9185b134455028bac150
databrary/databrary
Types.hs
# LANGUAGE OverloadedStrings , TemplateHaskell , QuasiQuotes , DeriveDataTypeable , # OPTIONS_GHC -fno - warn - orphans # module Model.Permission.Types ( Permission(..) , Access(..), accessPermission' , accessSite, accessMember, accessPermission , PublicPolicy(..) , SharedPolicy(..) , VolumeRolePolicy(..)...
null
https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Model/Permission/Types.hs
haskell
makeDBEnum "permission" "Permission" not used | TODO: Figure out what this thing represents ^ A given acting user's permission level on on the databrary site's data (e.g. volumes). The permission is computed through considering inherited permissions from the databrary site (party 0) down to the acting user. ^ ...
# LANGUAGE OverloadedStrings , TemplateHaskell , QuasiQuotes , DeriveDataTypeable , # OPTIONS_GHC -fno - warn - orphans # module Model.Permission.Types ( Permission(..) , Access(..), accessPermission' , accessSite, accessMember, accessPermission , PublicPolicy(..) , SharedPolicy(..) , VolumeRolePolicy(..)...
21fe9f7a88fa626d33247b8b49252a12010cdd076706e54fa9ac52d8c088cd49
cwmaguire/zombunity-mud
msg_client.clj
(ns zombunity.daemon.msg-client (:require [zombunity.data :as data])) (def msg-filters [:client]) (defn process-msg [msg] (data/msg-client msg) nil)
null
https://raw.githubusercontent.com/cwmaguire/zombunity-mud/ec14406f4addac9b9a0742d3043a6e7bccef1fa6/zombunity_server/src/zombunity/daemon/msg_client.clj
clojure
(ns zombunity.daemon.msg-client (:require [zombunity.data :as data])) (def msg-filters [:client]) (defn process-msg [msg] (data/msg-client msg) nil)
ff27085df1e0651a89a69f590691706ac4f826f5277fb99b55daa1eb27e5eea4
flexsurfer/rn-shadow-steroid
touchable.cljs
(ns steroid.rn.components.touchable (:require [reagent.core :as reagent] ["react-native" :as rn])) (def touchable-highlight (reagent/adapt-react-class rn/TouchableHighlight)) (def touchable-native-feedback (reagent/adapt-react-class rn/TouchableNativeFeedback)) (def touchable-opacity (reagent/adapt-react...
null
https://raw.githubusercontent.com/flexsurfer/rn-shadow-steroid/5dfa3f479a4148ae943b6f45da9c1650a009eef0/src/steroid/rn/components/touchable.cljs
clojure
(ns steroid.rn.components.touchable (:require [reagent.core :as reagent] ["react-native" :as rn])) (def touchable-highlight (reagent/adapt-react-class rn/TouchableHighlight)) (def touchable-native-feedback (reagent/adapt-react-class rn/TouchableNativeFeedback)) (def touchable-opacity (reagent/adapt-react...
d0157d6b8409ab6df619428cf0fbf8ead01d79e9360c07fb49ad04ebb0774aa1
fterrier/pylos
board_test.clj
(ns pylos.board-test (:require [clojure.test :refer :all] [pylos.core-test :refer :all] [pylos.move :refer :all] [pylos.board :refer :all])) (deftest position-on-top-test (testing "Position on top" (is (= 29 (position-on-top four (ind four [3 1 1])))) (is (= nil (positio...
null
https://raw.githubusercontent.com/fterrier/pylos/f9283cf58a32000ed271e768ab6151ac081ed37d/test/pylos/board_test.clj
clojure
(deftest square-positions-at-position-test (testing "Square positions at position" (deftest squares-at-position-test (testing "Squares at position" (deftest calculate-all-positions-test (testing "All positions"
(ns pylos.board-test (:require [clojure.test :refer :all] [pylos.core-test :refer :all] [pylos.move :refer :all] [pylos.board :refer :all])) (deftest position-on-top-test (testing "Position on top" (is (= 29 (position-on-top four (ind four [3 1 1])))) (is (= nil (positio...
ea8299f301a152cb12ec04132ef245cce4880bae6ace9fa6f9ede81eec0decc3
kahua/Kahua
kahua-dbm.scm
-*- coding : utf-8 ; mode : scheme -*- ;; test kahua.dbm module (use gauche.test) (use srfi-1) (use file.util) (use kahua.persistence) (test-start "kahua.dbm") (use kahua.dbm) (test-module 'kahua.dbm) (define-class <kahua-dbm-test1> (<kahua-dbm-record>) ()) (define-class <kahua-dbm-test2> (<kahua-dbm-record>) ()) ...
null
https://raw.githubusercontent.com/kahua/Kahua/c90fe590233e4540923e4e5cc9f61da32873692c/test/kahua-dbm.scm
scheme
mode : scheme -*- test kahua.dbm module prepair dataset string only other objects create test put everything to the database does database has all of them? does database properly deal with exceptional case? must raise an error use default does for-each and map do a right thing? does delete work? does read...
(use gauche.test) (use srfi-1) (use file.util) (use kahua.persistence) (test-start "kahua.dbm") (use kahua.dbm) (test-module 'kahua.dbm) (define-class <kahua-dbm-test1> (<kahua-dbm-record>) ()) (define-class <kahua-dbm-test2> (<kahua-dbm-record>) ()) Common dbm test suite copied from Gauche / ext / dbm / test...
fc69f218607968cd1ef473aaf1439171cfcaff367447a89a33b09608d3ef6e4d
dalaing/little-languages
SubTerm.hs
| Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Copyright : (c) Dave Laing, 2016 License : BSD3 Maintainer : Stability : experimental Portability : non-portable -} # LANGUAGE FlexibleContexts # {-# LANGUAGE RankNTypes #-} # LANGUAGE Sco...
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/modular/stlc-lang/src/Component/Term/STLC/SubTerm.hs
haskell
# LANGUAGE RankNTypes # the solution is to go back to the usual WithSTLCTerm form, and to use instantiate1 to get rid of the scope
| Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Copyright : (c) Dave Laing, 2016 License : BSD3 Maintainer : Stability : experimental Portability : non-portable -} # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAG...
a0124c162f5786a79a273e73ac443d96e9069c0e16ceca6ae2788aa221031e0f
asr/apia
List.hs
-- | Utilities on lists. {-# LANGUAGE CPP #-} # LANGUAGE UnicodeSyntax # module Apia.Utils.List ( duplicate , duplicatesElements ) where ------------------------------------------------------------------------------ import Apia.Prelude import Agda.Utils.Impossible ( Impossible(Impossible), throwI...
null
https://raw.githubusercontent.com/asr/apia/a66c5ddca2ab470539fd68c42c4fbd45f720d682/src/Apia/Utils/List.hs
haskell
| Utilities on lists. # LANGUAGE CPP # ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- | Return 'True' if the elements of a list occur in ascending order. | Return 'True' if there are duplicate element...
# LANGUAGE UnicodeSyntax # module Apia.Utils.List ( duplicate , duplicatesElements ) where import Apia.Prelude import Agda.Utils.Impossible ( Impossible(Impossible), throwImpossible ) #include "undefined.h" isSorted ∷ Ord a ⇒ [a] → Bool isSorted [] = True isSorted [_] = True isSorted (...
fa0d6ef4dcea4c6f193b53b7087870a6442bf9917dc3cc2a61ab0040dacd7aee
facebook/infer
HashSet.mli
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/ac03fddb3e37296b153e505a0638f27a3ac16c1f/infer/src/istd/HashSet.mli
ocaml
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
566c75968005ecf3cf428ee063e24e21c1e71b171766d85b2b15b6c2b57dd4cd
maximedenes/native-coq
eqschemes.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/tactics/eqschemes.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** This file builds schemes related to...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * File created by , Nov 200...
93439a19e7ab15dfaa65a287f29d53f5acbc38e2b2132bb678ac29094f5eb153
racket/games
crazy8s.rkt
#lang racket (require games/cards racket/gui racket/class racket/unit racket/file racket/async-channel) ;; Player record (define-struct player (r hand-r ; region hand) #:mutable) ; cards ;; Messages (define YOUR-NAME "You") (define OPPONENT-X-NAME "Opponent ~a") (define OPPONEN...
null
https://raw.githubusercontent.com/racket/games/e57376f067be51257ed12cdf3e4509a00ffd533d/crazy8s/crazy8s.rkt
racket
Player record region cards Messages Region layout constants Configuration Procedure for a game to use to start a sibling game Start a new game as a child process: Start the initial child game: ========== GUI ======================================== Set up the table Add status line and buttons: The "Options...
#lang racket (require games/cards racket/gui racket/class racket/unit racket/file racket/async-channel) (define YOUR-NAME "You") (define OPPONENT-X-NAME "Opponent ~a") (define OPPONENT-NAME "Opponent") (define YOUR-TURN-MESSAGE "Your turn - discard a ~a or crazy 8, or else ~a") (define PICK-A-SUIT "Pick a ...
2373ac0a70f3ce6116f34f6eb7529029961995a91243ba40078e59c3702571dc
stchang/graph
graph-unweighted.rkt
#lang racket/base (require "gen-graph.rkt" "adjlist-utils.rkt") (require racket/sequence racket/set racket/unsafe/ops) ; unweighted, adjacency-list graph (provide mk-unweighted-graph/undirected mk-unweighted-graph/directed mk-unweighted-graph/adj unweighted-graph?) (define-synta...
null
https://raw.githubusercontent.com/stchang/graph/0ff9a1934f4421c53ec4b71cb48d54a6ad86c7b9/graph-lib/graph/graph-unweighted.rkt
racket
unweighted, adjacency-list graph returns edges as a sequence and is the internal graph representation (internal adjlist functions and names have a @ suffix) undirected graph constructor neighborless vertices directed graph constructor returns vertices as a list - analogous to hash-keys vs in-hash-keys retur...
#lang racket/base (require "gen-graph.rkt" "adjlist-utils.rkt") (require racket/sequence racket/set racket/unsafe/ops) (provide mk-unweighted-graph/undirected mk-unweighted-graph/directed mk-unweighted-graph/adj unweighted-graph?) (define-syntax-rule (get-adjlist g) (unsafe-stru...
70c5a161232c58fe6398189999119ae5b36a26996def0212befef63ade05d8d8
8c6794b6/haskell-sc-scratch
ToOSC.hs
# LANGUAGE FlexibleInstances # {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE Rank2Types #-} | Module : $ Header$ CopyRight : ( c ) 8c6794b6 License : : Stability : unstable Portability : non - portable ( FlexibleInstances ) Types for OSC messages . Module...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/hsc3-lepton/src/lib/Sound/SC3/Lepton/Pattern/ToOSC.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE GADTs # # LANGUAGE Rank2Types # | OSC convertable data | Type of OSC message. | Message type is left associative, (+), (*), (-) will union given maps. # INLINE get # # INLINE get # | Type of OSC message. # INLINE get # # INLINE get # # INLINE get # # INLINE get # | Conver...
# LANGUAGE FlexibleInstances # | Module : $ Header$ CopyRight : ( c ) 8c6794b6 License : : Stability : unstable Portability : non - portable ( FlexibleInstances ) Types for OSC messages . Module : $Header$ CopyRight : (c) 8c6794b6 License : BSD3 Maintainer : Stability...
bc398cb3f97a76a07f6949aca86231e765ac854b2e575083f91676f47999205f
vikram/lisplibraries
binary-trees.lisp
(in-package :trees) (unless (assoc :normal *binary-tree-info*) (push (list :normal #'make-tree-node nil nil) *binary-tree-info*)) (defun emptyp (tree) (zerop (size tree))) (declaim (inline rotate-left rotate-right)) (defun rotate-left (node) (let ((c (right node))) (setf (right node) (left c) (le...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/trees_0.11/binary-trees.lisp
lisp
values: whether we should insert and a stack of nodes visited and the direction we traveled from each node. The newly-created node
(in-package :trees) (unless (assoc :normal *binary-tree-info*) (push (list :normal #'make-tree-node nil nil) *binary-tree-info*)) (defun emptyp (tree) (zerop (size tree))) (declaim (inline rotate-left rotate-right)) (defun rotate-left (node) (let ((c (right node))) (setf (right node) (left c) (le...
74a32e03006d38e687a3a2b33011d83300eae6c7e49fd34bc31bc271cb2ea42c
erlangonrails/devdb
rdht_tx_read.erl
2009 - 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 law or agreed to in writing, software d...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/src/transactions/rdht_tx_read.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 - 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 < > @version $ I d : rdht_tx_read.erl 957 2010 - 08 - 03 13:53:14Z $ -module(rdht_tx_read). -author(''). -vsn('$Id: r...
565651e3969b254838409e0491e843480ab88fa512a0485a8525d3376f926ec7
racket/racket7
linklet.rkt
#lang racket/base (require racket/private/primitive-table "../run/linklet-operation.rkt") ;; The `racket/private/primitive-table` module uses only ;; `primitive-table` directly, so that's the only function needed for ;; bootstrapping --- and generally so we can replace the linklet ;; implementation for bootst...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/host/linklet.rkt
racket
The `racket/private/primitive-table` module uses only `primitive-table` directly, so that's the only function needed for bootstrapping --- and generally so we can replace the linklet implementation for bootstrapping. See also "../run/linklet.rkt".
#lang racket/base (require racket/private/primitive-table "../run/linklet-operation.rkt") (define-syntax-rule (bounce id ...) (begin (provide id ...) (import-from-primitive-table As a hook for bootstrapping , first check for a replacement of the primitive ' # % linklet module : (#%bootstra...
90f2d83774cbb3c9251438bcff3d86d2b9b473c0b674ad38d2e83381a904c1f9
parof/wstat
Spec.hs
import Test.Tasty import Test.Tasty.HUnit -- import Test.Tasty import Test . Tasty . HUnit import StmtParseSpec import WhileProgramSpec import NonDetSpec import EquationBasedSpec main :: IO () main = do defaultMain (testGroup "Library tests" tests) where tests = WhileProgramSpec.tests ++ ...
null
https://raw.githubusercontent.com/parof/wstat/369cf5d1d92ef235049c29ad2f1cc6fd53747754/test/Spec.hs
haskell
import Test.Tasty ++ WideningPointsSpec.tests
import Test.Tasty import Test.Tasty.HUnit import Test . Tasty . HUnit import StmtParseSpec import WhileProgramSpec import NonDetSpec import EquationBasedSpec main :: IO () main = do defaultMain (testGroup "Library tests" tests) where tests = WhileProgramSpec.tests ++ StmtParseSpec.tests ...
4f97dcc8a168ddb70a6da46de3bc0feda2e9640918ccc723e1ac548c05aa9077
dpaetzel/aq2ledger
IBAN.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} | Module : Aq2Ledger . . IBAN Description : Parsers for IBANs Copyright : , 2020 License : GPL-3 Maintainer : < > Stability : experimental A collection of functions that split IBANs into bank code and account numb...
null
https://raw.githubusercontent.com/dpaetzel/aq2ledger/fd16e0459b83e142a625721b0f6071d28cefc20e/src/Aq2Ledger/Parse/IBAN.hs
haskell
# LANGUAGE OverloadedStrings # | A function that extracts bank code and account number from an IBAN.
# LANGUAGE NoImplicitPrelude # | Module : Aq2Ledger . . IBAN Description : Parsers for IBANs Copyright : , 2020 License : GPL-3 Maintainer : < > Stability : experimental A collection of functions that split IBANs into bank code and account number . This is required as IBAN len...
268ff25f58010937e620c04622544c0c64e25a2ce6b277173f50104e4969ec68
dmoverton/finite-domain
Main.hs
module Main where import FD import Sudoku import Queens2 import SendMoreMoney testPuzzle :: Puzzle testPuzzle = [ 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 1, 0, 6, 5, 0, 7, 4, 0, 2, 7, 0, 0, 0, 0, 0, 0, 8, 0, 3, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 8, 0, 0, 0, 0, 5, 0, 0, 9, 0, 7, 0, 0, 5, 0, 0, 0,...
null
https://raw.githubusercontent.com/dmoverton/finite-domain/65373e30aa3f72031bd41d19ebf9684bfa1e01f0/app/Main.hs
haskell
putStrLn "send + more = money" print $ zip ['s', 'e', 'n', 'd', 'm', 'o', 'r', 'y'] sendMoreMoney
module Main where import FD import Sudoku import Queens2 import SendMoreMoney testPuzzle :: Puzzle testPuzzle = [ 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 1, 0, 6, 5, 0, 7, 4, 0, 2, 7, 0, 0, 0, 0, 0, 0, 8, 0, 3, 0, 0, 1, 0, 0, 0, 0, 3, 0, 0, 0, 8, 0, 0, 0, 0, 5, 0, 0, 9, 0, 7, 0, 0, 5, 0, 0, 0,...
df0e22710c376c3ea6084fb01f76505468b92d9b210933de0dfd4b8e89709e54
bitnomial/bitcoind-rpc
Utils.hs
# LANGUAGE NumericUnderscores # # LANGUAGE TypeApplications # | Module : Data . Aeson . Utils Helper functions for JSON ( de)serialization Module: Data.Aeson.Utils Helper functions for JSON (de)serialization -} module Data.Aeson.Utils ( partialObject, (.=?), utcTime, toSatoshis, satsP...
null
https://raw.githubusercontent.com/bitnomial/bitcoind-rpc/29fe1d9696b2662a9383d509c648d6893b6472d3/bitcoind-rpc/src/Data/Aeson/Utils.hs
haskell
| Helper function for decoding POSIX timestamps | Convert sats to BTC | Read a serializable from a hex string
# LANGUAGE NumericUnderscores # # LANGUAGE TypeApplications # | Module : Data . Aeson . Utils Helper functions for JSON ( de)serialization Module: Data.Aeson.Utils Helper functions for JSON (de)serialization -} module Data.Aeson.Utils ( partialObject, (.=?), utcTime, toSatoshis, satsP...
d7e08308c553958d8f42382a3ec736b3afffedc5538f4c70830720f6104ea66d
qfpl/sv
RoundTripsDecodeEncode.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} module Data.Sv.RoundTripsDecodeEncode (test_Roundtrips) where import Control.Lens ((&), (.~)) import Data.ByteString (ByteString) import qualified Data.ByteString.Lazy as LBS import qualified Data.ByteString.UTF8 as UTF8 import Data.Semigroup ((<>)) impor...
null
https://raw.githubusercontent.com/qfpl/sv/74aa56bcdcc0d7f1d7b5783bf59e3878dfbb64bc/sv/test/Data/Sv/RoundTripsDecodeEncode.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # Round-trips an encode/decode pair. This version checks whether the pair form an isomorphism Round-trips an encode/decode pair. This version checks whether the pair idempotent.
module Data.Sv.RoundTripsDecodeEncode (test_Roundtrips) where import Control.Lens ((&), (.~)) import Data.ByteString (ByteString) import qualified Data.ByteString.Lazy as LBS import qualified Data.ByteString.UTF8 as UTF8 import Data.Semigroup ((<>)) import Data.String (IsString) import Test.Tasty (TestName, TestTree,...
0d4fd77795b9379ec3d59104d9bfa4ceb4dd63cc0099656bc576db7998a88a54
stevana/property-based-testing-stateful-systems-tutorial
Queue.hs
module Part03.Queue (module Part03.Queue) where import Control.Monad import Data.IORef import qualified Data.Vector.Mutable as Vec ------------------------------------------------------------------------ -- In order to make the queue more performant and more tricky for ourselves to -- implement, we'll make it array-...
null
https://raw.githubusercontent.com/stevana/property-based-testing-stateful-systems-tutorial/56771f02177c4e2032c28ad1bea8508d8dc0f5f5/src/Part03/Queue.hs
haskell
---------------------------------------------------------------------- In order to make the queue more performant and more tricky for ourselves to implement, we'll make it array-backed where elements are not removed from the array when they are dequeued, but rather overwritten by a later enqueue operation. In orde...
module Part03.Queue (module Part03.Queue) where import Control.Monad import Data.IORef import qualified Data.Vector.Mutable as Vec data Queue a = Queue { qCapacity :: !Int , qSize :: !(IORef Int) , qRear :: !(IORef Int) , qQueue :: !(Vec.IOVector a) } newQueue :: Int -> IO (Queue a) newQueue ...
d75294012faeff0745edaef9093724eae0390079d3ac382ee03e42f28c591718
lisp/de.setf.resource
wilbur-mediator.lisp
-*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.resource.implementation ; -*- (in-package :de.setf.resource.implementation) (:documentation "This file mediates access to wilbur RDF repositories for the 'de.setf.resource' CLOS linked data library." (copyright "Copyright 2010 [...
null
https://raw.githubusercontent.com/lisp/de.setf.resource/27bf6dfb3b3ca99cfd5a6feaa5839d99bfb4d29e/wilbur/wilbur-mediator.lisp
lisp
Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.resource.implementation ; -*- without even the reuse the sources? transaction support delegate to the database to distinguish implementation for locked v/s unlocked databases.
(in-package :de.setf.resource.implementation) (:documentation "This file mediates access to wilbur RDF repositories for the 'de.setf.resource' CLOS linked data library." (copyright "Copyright 2010 [james anderson](mailto:) All Rights Reserved" "'de.setf.resource' is free software: you can redistribute it a...
bf23960d175aea3e1f46b9024a7ae2be159d48702a8308eb270a826389f7c2dd
janestreet/async_rpc_kernel
async_rpc_kernel.ml
module Rpc = Rpc module Versioned_rpc = Versioned_rpc module Persistent_connection = Persistent_connection module Pipe_transport = Pipe_transport module Rpc_error = Rpc_error module Rpc_result = Rpc_result module Rpc_shapes = Rpc_shapes module Rpc_metadata : module type of Rpc_metadata with module Private := Rpc_met...
null
https://raw.githubusercontent.com/janestreet/async_rpc_kernel/541fb417b39fad5c930ac73b729a7aaf59bd1001/src/async_rpc_kernel.ml
ocaml
module Rpc = Rpc module Versioned_rpc = Versioned_rpc module Persistent_connection = Persistent_connection module Pipe_transport = Pipe_transport module Rpc_error = Rpc_error module Rpc_result = Rpc_result module Rpc_shapes = Rpc_shapes module Rpc_metadata : module type of Rpc_metadata with module Private := Rpc_met...
7c72c936135c8a407c420be615b9ce36548e8287e72defa8be1de3b8f13c47f4
NelosG/fp-tests
TPair.hs
# LANGUAGE StandaloneDeriving # module Test.TPair ( propPair ) where import HW2.T1 (Pair (..), mapPair) import HW2.T2 (distPair, wrapPair) import Hedgehog (Gen) import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Internal.Range as Range import Test.Common (allProps, genString) import Test.Tasty (TestTr...
null
https://raw.githubusercontent.com/NelosG/fp-tests/7e2af5c3c3279c2045662faaff8e5f895af6af6a/hw2/test/T2/Test/TPair.hs
haskell
# LANGUAGE StandaloneDeriving # module Test.TPair ( propPair ) where import HW2.T1 (Pair (..), mapPair) import HW2.T2 (distPair, wrapPair) import Hedgehog (Gen) import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Internal.Range as Range import Test.Common (allProps, genString) import Test.Tasty (TestTr...
cba34b50ddc139943a4bd38c0cb72cb55dfe100e0af9fb245db41f4ba25b3142
bn-d/ppx_make
option.ml
add compatibility for < = 4.07 type 'a t = 'a option
null
https://raw.githubusercontent.com/bn-d/ppx_make/6d3d5352b624a3d8d5fa095eb40d29c40e5177c1/test/option.ml
ocaml
add compatibility for < = 4.07 type 'a t = 'a option
43fbecc606969870021d9e72ca3d8cdedefd9934ea8d370173b902d91638ddcd
PacktWorkshops/The-Clojure-Workshop
build.clj
(require '[cljs.build.api :as b]) (println "Building ...") (let [start (System/nanoTime)] (b/build "src" {:main 'error-handling.core :output-to "out/error_handling.js" :output-dir "out" :verbose true}) (println "... done. Elapsed" (/ (- (System/nanoTime) start) 1e9) "seconds"))
null
https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter09/Exercise9.11/error-handling/scripts/build.clj
clojure
(require '[cljs.build.api :as b]) (println "Building ...") (let [start (System/nanoTime)] (b/build "src" {:main 'error-handling.core :output-to "out/error_handling.js" :output-dir "out" :verbose true}) (println "... done. Elapsed" (/ (- (System/nanoTime) start) 1e9) "seconds"))
db5275b4c06107c718cf2ed3c46007df6fe8b1cd9ca4525b39b8b53b8d6939c4
andrewthad/packed
Builder.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE MagicHash # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGE TypeInType #-} # LANGUAGE UnboxedSums # # LANGUAGE UnboxedTuples # {-# OPTIONS_GHC -Weverything -fno-warn-unsafe -fno-warn-implicit-prelude -fno-warn-missing-import-lists -O2 #-} module ...
null
https://raw.githubusercontent.com/andrewthad/packed/72437b5f99fbe745897a0a27cae72565c9727781/src/Packed/Bytes/Builder.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE RankNTypes # # LANGUAGE TypeInType # # OPTIONS_GHC -Weverything -fno-warn-unsafe -fno-warn-implicit-prelude -fno-warn-missing-import-lists -O2 # * Building * Running Callback that consumes a filled buffer. It accepts a size hint, and it returns a newly allocated buffer with...
# LANGUAGE MagicHash # # LANGUAGE ScopedTypeVariables # # LANGUAGE UnboxedSums # # LANGUAGE UnboxedTuples # module Packed.Bytes.Builder ( Builder(..) , byteArray , toByteArray , toByteArrayWith , foldlToByteArrayWith' ) where import Control.Monad.ST (runST) import Data.Primitive (ByteArray(..),MutableByt...
7e8bf33bd597930af448c9131e3ccf285f7557afda5c3a69a2d9b68c597f804b
googleson78/fp-lab-2022-23
EffectsBeforeStart.hs
-- cover all cases! # OPTIONS_GHC -fwarn - incomplete - patterns # -- warn about incomplete patterns v2 # OPTIONS_GHC -fwarn - incomplete - uni - patterns # -- write all your toplevel signatures! # OPTIONS_GHC -fwarn - missing - signatures # -- use different names! {-# OPTIONS_GHC -fwarn-name-shadowing #-} -- use all y...
null
https://raw.githubusercontent.com/googleson78/fp-lab-2022-23/6974b7b383cbfb517f84913b357bc3480fc486ad/exercises/13/EffectsBeforeStart.hs
haskell
cover all cases! warn about incomplete patterns v2 write all your toplevel signatures! use different names! # OPTIONS_GHC -fwarn-name-shadowing # use all your pattern matches! mention chaos internships mention form for more info on parsers (implementation and origin): /~pszgmh/monparsing.pdf type classes - ...
# OPTIONS_GHC -fwarn - incomplete - patterns # # OPTIONS_GHC -fwarn - incomplete - uni - patterns # # OPTIONS_GHC -fwarn - missing - signatures # # OPTIONS_GHC -fwarn - unused - matches # module Effects where import Control.Applicative (Applicative (liftA2, pure)) import Data.Maybe (catMaybes) import Prelude hiding (...
2d827662dd3c1a710ab3e69868d66046c8173e444b671986ce5aea4c55cb0556
pdincau/badalisk
badalisk_disk_logger.erl
%%%------------------------------------------------------------------- %%% File : badalisk_disk_logger.erl Author : < > %%% Description : %%% Created : 13 Aug 2011 by < > %%%------------------------------------------------------------------- -module(badalisk_disk_logger). -behaviour(gen_event). %% API ...
null
https://raw.githubusercontent.com/pdincau/badalisk/ba08c63f0e09294a1719c2af1610bc4e91f99436/src/badalisk_disk_logger.erl
erlang
------------------------------------------------------------------- File : badalisk_disk_logger.erl Description : ------------------------------------------------------------------- API gen_event callbacks ==================================================================== gen_event callbacks ===============...
Author : < > Created : 13 Aug 2011 by < > -module(badalisk_disk_logger). -behaviour(gen_event). -export([add_handler/1, delete_handler/0]). -export([init/1, handle_event/2, handle_call/2, handle_info/2, terminate/2, code_change/3]). -record(state, {name, file}). Function : add_handler ( ) - > ok |...
c017499b656d3aeb766dc70d92a966504e7c468890299b89bc8a3434c65823c2
brianhempel/maniposynth
bstd_insert.ml
type 'a btree = Node of 'a btree * 'a * 'a btree | Empty let rec bstd_insert elem tree = match tree with | Node ((l[@pos 32, -9]), (a[@pos 355, 6]), (r[@pos 545, -6])) -> if elem <= a then Node (bstd_insert elem l, a, r) else Node (l, a, bstd_insert elem r) | Empty -> Node (Empty, elem, Empty) [@@p...
null
https://raw.githubusercontent.com/brianhempel/maniposynth/8cb8e0c84db2ffb51feae2fccb10dbff40c4e0e0/expert_eval_manual/bstd_insert.ml
ocaml
type 'a btree = Node of 'a btree * 'a * 'a btree | Empty let rec bstd_insert elem tree = match tree with | Node ((l[@pos 32, -9]), (a[@pos 355, 6]), (r[@pos 545, -6])) -> if elem <= a then Node (bstd_insert elem l, a, r) else Node (l, a, bstd_insert elem r) | Empty -> Node (Empty, elem, Empty) [@@p...