_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
ccd2f17d3440b93262dbeec3ea2c259cb7849f25a80965b1f1b7accba6c0d873
slipstream/SlipStreamServer
service_config_impl_test.clj
(ns com.sixsq.slipstream.db.serializers.service-config-impl-test (:require [clojure.test :refer :all] [com.sixsq.slipstream.db.serializers.service-config-impl :as sci])) (defn not-empty-string? [x] (and (string? x) (not (empty? x)))) (deftest test-grow-coll-1->2 (is (= [] (sci/grow-coll-1->2 []))) (...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/db-serializers/test/com/sixsq/slipstream/db/serializers/service_config_impl_test.clj
clojure
(ns com.sixsq.slipstream.db.serializers.service-config-impl-test (:require [clojure.test :refer :all] [com.sixsq.slipstream.db.serializers.service-config-impl :as sci])) (defn not-empty-string? [x] (and (string? x) (not (empty? x)))) (deftest test-grow-coll-1->2 (is (= [] (sci/grow-coll-1->2 []))) (...
7ba4571a06fdfe950231d36de97635e061afcd49e1bdabc053219a646d3fa1ad
johnlawrenceaspden/hobby-code
doom.clj
to see the benefits of slow doom , you 'd need to get nrepl - ritz type ;; debugging to work reliably (defn doom[] (/ 1 0)) (defn slowdoom[n] (if (zero? n) (doom) (recur (dec n)))) (slowdoom 20)
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/doom.clj
clojure
debugging to work reliably
to see the benefits of slow doom , you 'd need to get nrepl - ritz type (defn doom[] (/ 1 0)) (defn slowdoom[n] (if (zero? n) (doom) (recur (dec n)))) (slowdoom 20)
2cb4bc6710ed1c8ce7c4d9c4b18bf8e1077da7dcfcb03b7c7e034718321492fa
clojure-interop/google-cloud-clients
WebSecurityScannerClient$ListScanConfigsPagedResponse.clj
(ns com.google.cloud.websecurityscanner.v1alpha.WebSecurityScannerClient$ListScanConfigsPagedResponse (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.websecurityscanner.v1alpha WebSecurityScannerClient$ListScanConfigsPagedResponse])) (defn *create-async "context - `com.google.api.gax....
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.websecurityscanner/src/com/google/cloud/websecurityscanner/v1alpha/WebSecurityScannerClient%24ListScanConfigsPagedResponse.clj
clojure
(ns com.google.cloud.websecurityscanner.v1alpha.WebSecurityScannerClient$ListScanConfigsPagedResponse (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.websecurityscanner.v1alpha WebSecurityScannerClient$ListScanConfigsPagedResponse])) (defn *create-async "context - `com.google.api.gax....
ec685e6a7c96b72bfbfdeb8b26a95f5e4f4da8b7ea7120502d10cabd324eb6dc
schemedoc/implementation-metadata
bdc.scm
(short-title "BDC") (title "BDC Scheme") (tagline "fast interpreter for the JVM") (homepage-url "-scheme/") (person "Brian D. Carlstrom") (academy "Massachusetts Institute of Technology") (features jvm) (documentation (title "Thesis") (web-url "")) (version-control (git-url "-scheme/bdc-scheme.git"))
null
https://raw.githubusercontent.com/schemedoc/implementation-metadata/6280d9c4c73833dc5bd1c9bef9b45be6ea5beb68/schemes/bdc.scm
scheme
(short-title "BDC") (title "BDC Scheme") (tagline "fast interpreter for the JVM") (homepage-url "-scheme/") (person "Brian D. Carlstrom") (academy "Massachusetts Institute of Technology") (features jvm) (documentation (title "Thesis") (web-url "")) (version-control (git-url "-scheme/bdc-scheme.git"))
fdcd9a17c27adeb2142f7ce19e97e846663bacc9d14b87595ef5601ac40ed764
ocamllabs/ocaml-modular-implicits
pprintast.mli
(***********************************************************************) (* *) (* OCaml *) (* *) ( Univers...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/parsing/pprintast.mli
ocaml
********************************************************************* OCaml ...
( University of Pennsylvania ) Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . type space_formatter = (unit, Format.fo...
0f77f32d3e8478ac988e664b86f831a643cd47293242cb3ff9e0bf4b9720f7d6
teropa/sproutcore-tutorial-compojure
project.clj
(defproject todos-server "1.0.0-SNAPSHOT" :description "Backend for the SproutCore tutorial app" :dependencies [[org.clojure/clojure "1.1.0"] [org.clojure/clojure-contrib "1.1.0"] [compojure "0.4.0-RC3"] [congomongo "0.1.2-SNAPSHOT"]] :dev-dependencies [[ring/ring-httpcore-adapter "0...
null
https://raw.githubusercontent.com/teropa/sproutcore-tutorial-compojure/b34e16f1992f23202e0ab3479bc2e1d797f4647f/project.clj
clojure
(defproject todos-server "1.0.0-SNAPSHOT" :description "Backend for the SproutCore tutorial app" :dependencies [[org.clojure/clojure "1.1.0"] [org.clojure/clojure-contrib "1.1.0"] [compojure "0.4.0-RC3"] [congomongo "0.1.2-SNAPSHOT"]] :dev-dependencies [[ring/ring-httpcore-adapter "0...
b1fa56a28c8d02d6ef938cadb5e4eb5810698c4b730f91157a7b2ceee16e33f0
harlanhaskins/hasm
Main.hs
{-# LANGUAGE OverloadedStrings #-} import System.Environment import Text.Read import Text.Megaparsec hiding (option) import Text.Megaparsec.ByteString import Options.Applicative import qualified Data.ByteString as B import qualified Data.Vector.Unboxed as U import qualified Data.Vector as V import Hasm.Core import Ha...
null
https://raw.githubusercontent.com/harlanhaskins/hasm/cd3bf1c3a6be48d22005a9cdbfa5178ddae3cb9e/src/Main.hs
haskell
# LANGUAGE OverloadedStrings #
import System.Environment import Text.Read import Text.Megaparsec hiding (option) import Text.Megaparsec.ByteString import Options.Applicative import qualified Data.ByteString as B import qualified Data.Vector.Unboxed as U import qualified Data.Vector as V import Hasm.Core import Hasm.Parser data Config = Config ...
eca0eb6b610ed7aa07f5f3e80c40656677403323980f91c2ce077193980a6fdf
exercism/scheme
acronym.scm
(import (rnrs)) (define (acronym test) 'implement-me!)
null
https://raw.githubusercontent.com/exercism/scheme/bad074a0b46c05820c2a0397ff922499087d8ea0/exercises/practice/acronym/acronym.scm
scheme
(import (rnrs)) (define (acronym test) 'implement-me!)
58941b3b7133c51396fec69710dc6065387ae7a44bf42a7c220dd51bc86d0986
pink-gorilla/pinkie
viz.cljc
(ns pinkie.viz)
null
https://raw.githubusercontent.com/pink-gorilla/pinkie/83f47f5cf793e24ab97f2c3716b7c8585d487976/src/pinkie/viz.cljc
clojure
(ns pinkie.viz)
d7429ca7a0466a8ac4a9f5d89818342166662aec014e14f0846a1451c153408f
Bodigrim/poly
Semiring.hs
-- | -- Module: Data.Poly.Semiring Copyright : ( c ) 2019 Licence : BSD3 Maintainer : < > -- -- Dense polynomials and a 'Semiring'-based interface. -- @since 0.2.0.0 # LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # {-# LANGUAGE PatternSynonyms #-}...
null
https://raw.githubusercontent.com/Bodigrim/poly/89ed0b6016d389aa8c084a706e27fad349a4f19a/src/Data/Poly/Semiring.hs
haskell
| Module: Data.Poly.Semiring Dense polynomials and a 'Semiring'-based interface. # LANGUAGE PatternSynonyms # | Make a 'Poly' from a vector of coefficients >>> :set -XOverloadedLists >>> toPoly [1,2,3] :: VPoly Integer | Create a monomial from a power and a coefficient. | Multiply a polynomial by a m...
Copyright : ( c ) 2019 Licence : BSD3 Maintainer : < > @since 0.2.0.0 # LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # module Data.Poly.Semiring ( Poly , VPoly , UPoly , unPoly , leading , toPoly , monomial , scale , pattern X , eva...
eee5401dffe067768b4415d46fa80cb8e6b7766d292dc5071fbdcf6669f286b0
tpope/lein-dotenv
plugin.clj
(ns lein-dotenv.plugin (:use [robert.hooke :only [add-hook]]) (:require [clojure.java.io :as io] [clojure.string :as str] [leiningen.core.eval :as eval])) (defn- expand [v m] (str/replace v #"\$\{?(\w+)\}?|\\." (fn [[all k]] (cond k (or (get m k (System/get...
null
https://raw.githubusercontent.com/tpope/lein-dotenv/fbdfebee8cfa087008488065e59e202d7f2e0ce3/src/lein_dotenv/plugin.clj
clojure
(ns lein-dotenv.plugin (:use [robert.hooke :only [add-hook]]) (:require [clojure.java.io :as io] [clojure.string :as str] [leiningen.core.eval :as eval])) (defn- expand [v m] (str/replace v #"\$\{?(\w+)\}?|\\." (fn [[all k]] (cond k (or (get m k (System/get...
bc9a7928832696c4c45ad13e4e62c0be1ace28eeac63a168c7ad87bf611d3765
active-group/sqlosure
universe.clj
(ns ^{:author "Marco Schneider"} sqlosure.universe "A universe defines a the context needed to access a particular application domain." (:require [active.clojure.record :refer [define-record-type]])) (define-record-type universe (really-make-universe base-relation-table type-table ...
null
https://raw.githubusercontent.com/active-group/sqlosure/3cd74e90df4f3c49c841a1a75941acc7444c4bfb/src/sqlosure/universe.clj
clojure
(ns ^{:author "Marco Schneider"} sqlosure.universe "A universe defines a the context needed to access a particular application domain." (:require [active.clojure.record :refer [define-record-type]])) (define-record-type universe (really-make-universe base-relation-table type-table ...
72996461bc99b175b8f9b160dbdc565476bd3c89b8220af036ec70118a2a9d53
Simre1/haskell-game
Signal.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # {-# LANGUAGE RankNTypes #-} # LANGUAGE TupleSections # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # # LANGUAGE TypeFamilies # module Sigma.Signal where import Control.Arrow (second) import Data.Functor ((<&>)) import Polysemy (interpret, Member, Sem) i...
null
https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/src/Sigma/Signal.hs
haskell
# LANGUAGE RankNTypes #
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # # LANGUAGE TypeFamilies # module Sigma.Signal where import Control.Arrow (second) import Data.Functor ((<&>)) import Polysemy (interpret, Member, Sem) import Polysemy.NonDet (NonDe...
8c23e79b28d1abada4ca406d92d1692fa63be6ae7b4a623755c22b6b8ad5f239
dktr0/estuary
RenderInfo.hs
module Estuary.Types.RenderInfo where import Data.IntMap.Strict import Data.Time.Clock import Data.Text (Text) data RenderInfo = RenderInfo { errors :: !(IntMap Text), avgRenderLoad :: !Int, animationFPS :: !Int, animationLoad :: !Int, -- average time in milliseconds it takes to draw a frame avgZoneRenderTi...
null
https://raw.githubusercontent.com/dktr0/estuary/bcf0cb2b95a9a9200942075495a4c511dcf9232b/client/src/Estuary/Types/RenderInfo.hs
haskell
average time in milliseconds it takes to draw a frame
module Estuary.Types.RenderInfo where import Data.IntMap.Strict import Data.Time.Clock import Data.Text (Text) data RenderInfo = RenderInfo { errors :: !(IntMap Text), avgRenderLoad :: !Int, animationFPS :: !Int, avgZoneRenderTime :: !(IntMap Double), avgZoneAnimationTime :: !(IntMap Double), clockRatio :...
1ce862eb1bbea3f87c9ef7d84ef2970576b016656c66071d5885722988de70fd
ghc/ghc
List.hs
# LANGUAGE Trustworthy # # LANGUAGE NoImplicitPrelude # ----------------------------------------------------------------------------- -- | -- Module : Data.List Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stabi...
null
https://raw.githubusercontent.com/ghc/ghc/146a145835f5c2e82da4dd0bcb90702460505a01/libraries/base/Data/List.hs
haskell
--------------------------------------------------------------------------- | Module : Data.List License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : stable Portability : portable --------------------------------------------------------------------------- * Basi...
# LANGUAGE Trustworthy # # LANGUAGE NoImplicitPrelude # Copyright : ( c ) The University of Glasgow 2001 Operations on lists . module Data.List ( (++) , head , last , tail , init , uncons , singleton , null , length , map , reverse , intersperse , intercalate ...
922db64c6d20a8f86b0c895b7f75d0b962e68ecc7e2b7b80ba9b6d7060c36c8f
inhabitedtype/angstrom
rFC7159.ml
open Angstrom type json = [ `Null | `False | `True | `String of string | `Number of float | `Object of (string * json) list | `Array of json list ] let ws = skip_while (function | '\x20' | '\x0a' | '\x0d' | '\x09' -> true | _ -> false) let lchar c = ws *> char c let rsb = lchar ']' let rcb = lch...
null
https://raw.githubusercontent.com/inhabitedtype/angstrom/d3bd06a3dbdd5960bffa8abbc9925d8f5b3e9922/examples/rFC7159.ml
ocaml
'0'
open Angstrom type json = [ `Null | `False | `True | `String of string | `Number of float | `Object of (string * json) list | `Array of json list ] let ws = skip_while (function | '\x20' | '\x0a' | '\x0d' | '\x09' -> true | _ -> false) let lchar c = ws *> char c let rsb = lchar ']' let rcb = lch...
f923fb19a29bd04acca29cb4cba80df83be1fa62002c1e001ec61f979b3d1dc4
UnixJunkie/rankers
flags.ml
Copyright ( C ) 2019 , laboratory , Department of Bioscience and Bioinformatics , Faculty of Computer Science and Systems Engineering , Kyushu Institute of Technology , 680 - 4 Kawazu , Iizuka , Fukuoka , 820 - 8502 , Japan . Yamanishi laboratory, Department of Bioscience and Bioin...
null
https://raw.githubusercontent.com/UnixJunkie/rankers/46772a75192c83e1b911d25a49753cdd3c7ca4ed/src/flags.ml
ocaml
default default
Copyright ( C ) 2019 , laboratory , Department of Bioscience and Bioinformatics , Faculty of Computer Science and Systems Engineering , Kyushu Institute of Technology , 680 - 4 Kawazu , Iizuka , Fukuoka , 820 - 8502 , Japan . Yamanishi laboratory, Department of Bioscience and Bioin...
31737f575c1da7fdccbd2c9a9d21347ac15629143323a1534fe0bd53216e117c
diagrams/diagrams-contrib
ProcessXKCDColors.hs
# LANGUAGE LambdaCase # import Control.Arrow import Control.Lens import Data.Char import Data.List.Split import qualified Data.Map as M data ColorDef = ColorDef { colorName :: String, colorValue :: String } main = interact process where process = generateDefs . ma...
null
https://raw.githubusercontent.com/diagrams/diagrams-contrib/63f2aec4c070d1f558a5fcefd67b5315d64faaf5/src/Diagrams/Color/ProcessXKCDColors.hs
haskell
# LANGUAGE LambdaCase # import Control.Arrow import Control.Lens import Data.Char import Data.List.Split import qualified Data.Map as M data ColorDef = ColorDef { colorName :: String, colorValue :: String } main = interact process where process = generateDefs . ma...
50e41d07593bf43b8c6489f600f3751e5f3a6101544bd59caa6eb9ff04b1e427
basho/riak_kv
riak_kv_leveled_backend.erl
%% ---------------------------------------------------------------------------- This file is provided to you under the Apache License , Version 2.0 ( the %% "License"); you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by app...
null
https://raw.githubusercontent.com/basho/riak_kv/174a73711a82f907b3b336f0e7a6d935d31a61ca/src/riak_kv_leveled_backend.erl
erlang
---------------------------------------------------------------------------- "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 WARRANTIES OR CONDITIONS OF ANY KIND, eithe...
This file is provided to you under the Apache License , Version 2.0 ( the distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(riak_kv_leveled_backend). -behavior(riak_kv_backend). KV Backend API -export([api_version/0, capabilities/1, capabilities/2, s...
29200ffdcdd1bac061f23a57cbc7a09ba275d336e6fbd230f7fa01d48fe2a303
boxer-project/boxer-sunrise
xm-lib.lisp
-*- Mode : Lisp ; rcs - header : " $ Header : /hope / lwhope1 - cam / hope.0 / compound/61 / LISPopengl / RCS / xm - lib.lisp , v 1.25.4.1 2017/01/19 11:51:04 " -*- Copyright ( c ) 1987 - -2017 LispWorks Ltd. All rights reserved . (in-package "OPENGL") ;;; capi-motif-library back-end for OpenGL ;;; TBD: prope...
null
https://raw.githubusercontent.com/boxer-project/boxer-sunrise/1ef5d5a65d00298b0d7a01890b3cd15d78adc1af/src/opengl/xm-lib.lisp
lisp
rcs - header : " $ Header : /hope / lwhope1 - cam / hope.0 / compound/61 / LISPopengl / RCS / xm - lib.lisp , v 1.25.4.1 2017/01/19 11:51:04 " -*- capi-motif-library back-end for OpenGL TBD: proper mechanism for sharing contexts. Currently shared contexts don't ever get freed. it would use XVisu...
Copyright ( c ) 1987 - -2017 LispWorks Ltd. All rights reserved . (in-package "OPENGL") PJG 9Feb1999 - Fixed code to cope with color::visual - info objects . Previously (defun find-x11-visual-info (display screen configuration) (if-let (vi (x-utilities::with-x11-foreign-calls-lock-rm-only(call-glx-Choose-Vis...
b0a29cc892f746daaf43fb33f28ca3dbee5887870b65ae326a1b699bf4296b5a
xapi-project/xen-api
http_client.mli
* Copyright ( C ) 2006 - 2010 Citrix Systems Inc. * * 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 ; version 2.1 only . with the special * exception on linking describe...
null
https://raw.githubusercontent.com/xapi-project/xen-api/5c9c44c6d40a9930f454722c9cd09c7079ec814e/ocaml/libs/http-svr/http_client.mli
ocaml
A very simple HTTP client * Thrown when we get a non-HTTP response * Thrown when we get a specific HTTP failure * [response_of_fd fd] returns an HTTP response read from fd, or None * [response_of_fd fd] returns an HTTP response read from fd, or throws an exception * [rpc fd request body f] marshals the HTTP reque...
* Copyright ( C ) 2006 - 2010 Citrix Systems Inc. * * 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 ; version 2.1 only . with the special * exception on linking describe...
85134d420327cca023a3966ab6bb494a5360e90b0cfcb1ca65a273740eef4bff
pezipink/fairylog
reader.rkt
Copyright , 2019 #lang s-exp syntax/module-reader fairylog #:wrapper1 wrapper1 #:language-info #(fairylog/lang/language-info get-language-info #f) (require "../reader.rkt")
null
https://raw.githubusercontent.com/pezipink/fairylog/f0c1d0d82e2ed9ff02486ddd91a0ede5c5483ef7/lang/reader.rkt
racket
Copyright , 2019 #lang s-exp syntax/module-reader fairylog #:wrapper1 wrapper1 #:language-info #(fairylog/lang/language-info get-language-info #f) (require "../reader.rkt")
de08cdf8be21ff54220b39172941821da3e1b58d1611dbf5ac2c3afb9c0d9d69
paurkedal/ocaml-caqti
caqti_query.ml
Copyright ( C ) 2019 - -2022 Petter A. Urkedal < > * * This library 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 License , or ( at your * option ) any la...
null
https://raw.githubusercontent.com/paurkedal/ocaml-caqti/601723929a52326ed98e01c63dafd2db20ea5f52/caqti/lib/caqti_query.ml
ocaml
stdlib 4.12.0 Using non-SQL quoting, to avoid issues with newlines and other control * characters when printing to log files.
Copyright ( C ) 2019 - -2022 Petter A. Urkedal < > * * This library 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 License , or ( at your * option ) any la...
0459da823d947369b7198c6269e9a658582a9f76b7f0c8d9972904d901b10ec6
lem-project/lem
buffer-list-manager.lisp
(in-package :lem-base) (defgeneric delete-buffer-using-manager (buffer-list-manager buffer)) (defclass buffer-list-manager () ((buffers :initarg :buffers :initform '() :accessor buffer-list-manager-buffers))) (defvar *buffer-list-manager* (make-instance 'buffer-list-manager)) (defun buffer-list-manage...
null
https://raw.githubusercontent.com/lem-project/lem/3b9b92690b48710135a946b1d3754f64d2bfdaf1/src/base/buffer-list-manager.lisp
lisp
(in-package :lem-base) (defgeneric delete-buffer-using-manager (buffer-list-manager buffer)) (defclass buffer-list-manager () ((buffers :initarg :buffers :initform '() :accessor buffer-list-manager-buffers))) (defvar *buffer-list-manager* (make-instance 'buffer-list-manager)) (defun buffer-list-manage...
63cf746476609623a96e3519ddd3fc22510c22b14f1212b2de5f65a5e1aa01ff
lettier/webviewhs
how-do-i-run-some-function-in-the-main-window-thread-while-in-some-other-thread.hs
webviewhs ( C ) 2018 lettier.com webviewhs (C) 2018 David Lettier lettier.com -} {-# LANGUAGE OverloadedStrings , QuasiQuotes #-} import System.Random import Data.Maybe import Data.Text import Control.Monad import Control.Concurrent import Language.Javascript.JMacro import qualified Graphi...
null
https://raw.githubusercontent.com/lettier/webviewhs/21ddd4b4872b2e7eb50c9735e70cfbdedf2c6c1a/examples/how-do-i-run-some-function-in-the-main-window-thread-while-in-some-other-thread.hs
haskell
# LANGUAGE OverloadedStrings , QuasiQuotes # This function runs before the loop. This function runs after the loop. This function runs every window loop. Return True to continue the loop or False to exit the loop. Every so often, change the web page background color to a random color. Instead of changing th...
webviewhs ( C ) 2018 lettier.com webviewhs (C) 2018 David Lettier lettier.com -} import System.Random import Data.Maybe import Data.Text import Control.Monad import Control.Concurrent import Language.Javascript.JMacro import qualified Graphics.UI.Webviewhs as WHS main :: IO () main = do count...
5ec8c07b67ceb55fbed0e296f2c623a8afd0d3146f31fcc2743368008ce5d28a
mentat-collective/emmy
util_test.cljc
#_"SPDX-License-Identifier: GPL-3.0" (ns emmy.util-test (:require [clojure.test :refer [is deftest testing]] [clojure.test.check.generators :as gen] [com.gfredericks.test.chuck.clojure-test :refer [checking]] [emmy.util :as u])) (deftest dict-tests (testing "keyset" (checki...
null
https://raw.githubusercontent.com/mentat-collective/emmy/535b237a8e3fd7067b9c0ade8b2a4b3419f9f132/test/emmy/util_test.cljc
clojure
#_"SPDX-License-Identifier: GPL-3.0" (ns emmy.util-test (:require [clojure.test :refer [is deftest testing]] [clojure.test.check.generators :as gen] [com.gfredericks.test.chuck.clojure-test :refer [checking]] [emmy.util :as u])) (deftest dict-tests (testing "keyset" (checki...
cb8090966e9702b544943dc60762d64170e34b7e4da60607cc1ea95dfe89fb2b
fredrikt/yxa
db_util.erl
%%%------------------------------------------------------------------- %%% File : db_util.erl @author < > %%% @doc This module contains various usefull functions used to %%% handle mnesia tables %%% @since 22 Sep 2004 by < > %%% @end %%%------------------------------------------------...
null
https://raw.githubusercontent.com/fredrikt/yxa/85da46a999d083e6f00b5f156a634ca9be65645b/src/database/db_util.erl
erlang
------------------------------------------------------------------- File : db_util.erl @doc This module contains various usefull functions used to handle mnesia tables @end ------------------------------------------------------------------- --------------------------------------------------------...
@author < > @since 22 Sep 2004 by < > -module(db_util). -export([ tab_to_list/1, delete_all_entries/1, insert_record/1, delete_record/1, delete_with_key/2, match_object/1, generic_table_info/2 ]). Records Macros @spec ( MnesiaTab ) - > [ records ] = atom (...
b52582b8d29d0aa9744338f109a54697258eabcf615f4b3ebe38524ba5b94d84
FdelMazo/cl-aristid
package.lisp
(defpackage #:cl-aristid (:use #:cl) (:export :draw :make-fractal :defaristid :defrule :[ :]))
null
https://raw.githubusercontent.com/FdelMazo/cl-aristid/d26c642212548165a4ab4aee39644b231ff6e797/package.lisp
lisp
(defpackage #:cl-aristid (:use #:cl) (:export :draw :make-fractal :defaristid :defrule :[ :]))
e25b934f43fce7b40ab0d3b05b968671a2548151e46afd360aa90a9f5dda26ec
sondresl/AdventOfCode
Day08.hs
module Day08 where import Data.Ord import Data.List import Data.List.Extra (chunksOf) color :: String -> String -> String color "" "" = "" color ('2':xs) (y:ys) = y : color xs ys color (x:xs) (_:ys) = x : color xs ys solveA :: Int -> Int -> String -> Int solveA w h str = (occ '1' xs) * (occ '2' xs) where occ n ls ...
null
https://raw.githubusercontent.com/sondresl/AdventOfCode/51525441795417f31b3eb67a690aa5534d1e699b/2019/Haskell/src/Day08.hs
haskell
module Day08 where import Data.Ord import Data.List import Data.List.Extra (chunksOf) color :: String -> String -> String color "" "" = "" color ('2':xs) (y:ys) = y : color xs ys color (x:xs) (_:ys) = x : color xs ys solveA :: Int -> Int -> String -> Int solveA w h str = (occ '1' xs) * (occ '2' xs) where occ n ls ...
9ee456d643455c5c73bf42f232dc655a6c79c2369b5e2c1589c2fe4553a6877a
xvw/planet
test.ml
let suite = Bedrock_test.suite @ Paperwork_test.suite @ Shapes_test.suite let () = Alcotest.run "planet" suite
null
https://raw.githubusercontent.com/xvw/planet/c2a77ea66f61cc76df78b9c2ad06d114795f3053/test/test.ml
ocaml
let suite = Bedrock_test.suite @ Paperwork_test.suite @ Shapes_test.suite let () = Alcotest.run "planet" suite
47b254c79e43eaf2535fe8b6934108d0a90a4167acec4945c6bd1fb7e3e497ce
fujita-y/ypsilon
lists.scm
#!nobacktrace (library (srfi :1 lists) (export xcons cons* make-list list-tabulate list-copy circular-list iota proper-list? circular-list? dotted-list? not-pair? null-list? list= first ...
null
https://raw.githubusercontent.com/fujita-y/ypsilon/44260d99e24000f9847e79c94826c3d9b76872c2/sitelib/srfi/%253a1/lists.scm
scheme
#!nobacktrace (library (srfi :1 lists) (export xcons cons* make-list list-tabulate list-copy circular-list iota proper-list? circular-list? dotted-list? not-pair? null-list? list= first ...
6daaa48ca56974c05aff37b339867c8db02598aa3b21a66083d68fbda43f62b0
fission-codes/fission
BuildDir.hs
module Fission.CLI.Prompt.BuildDir ( guess , prompt ) where import qualified RIO.ByteString as BS import RIO.Directory import RIO.FilePath import qualified RIO.Text as Text import qualified Data.ByteString.UTF8 as UTF8 import qualified System.Console.ANSI a...
null
https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-cli/library/Fission/CLI/Prompt/BuildDir.hs
haskell
| Prompt the user to see if they'd like to use a build folder instead of the root | Check path to see if a possible build folder exists there | Fold function for checking build folder guesses | Common build folders for static site generators Highest -> Lowest priority (reversed because foldM folds from the left)...
module Fission.CLI.Prompt.BuildDir ( guess , prompt ) where import qualified RIO.ByteString as BS import RIO.Directory import RIO.FilePath import qualified RIO.Text as Text import qualified Data.ByteString.UTF8 as UTF8 import qualified System.Console.ANSI a...
bc0278a8e543a3f64d4f4153a8c6c674976c23505ab0fe531a0f8f3c9a6ef890
hslua/hslua
UserdataTests.hs
{-# LANGUAGE OverloadedStrings #-} | Module : HsLua . Marshalling . UserdataTests Copyright : © 2018 - 2023 : MIT Maintainer : < tarleb+ > Tests that any data type can be pushed to Lua as userdata . Module : HsLua.Marshalling.UserdataTests Copyright : © 2018-2023 Albert Krewinkel...
null
https://raw.githubusercontent.com/hslua/hslua/178c225f3da193f09fc27877a5a30e66eef069fb/hslua-marshalling/test/HsLua/Marshalling/UserdataTests.hs
haskell
# LANGUAGE OverloadedStrings # | Specifications for Attributes parsing functions.
| Module : HsLua . Marshalling . UserdataTests Copyright : © 2018 - 2023 : MIT Maintainer : < tarleb+ > Tests that any data type can be pushed to Lua as userdata . Module : HsLua.Marshalling.UserdataTests Copyright : © 2018-2023 Albert Krewinkel License : MIT Maintainer : Al...
5af7729919a826c739cf33800099dc14263c2058213ac6af9e41ba23e6a53512
abridgewater/nq-clim
event-queue.lisp
;;; nq - clim / event / event - queue ;;; The implementation of CLIM II 8.1.1 event queues . ;;; (cl:defpackage :nq-clim/event/event-queue (:use :cl :nq-clim/event/event-queue-protocol) (:export "MAKE-EVENT-QUEUE")) (cl:in-package :nq-clim/event/event-queue) ;; FIXME: This is a very bare-bones imp...
null
https://raw.githubusercontent.com/abridgewater/nq-clim/11d339fd0ac77b6d624fc5537b170294a191a3de/event/event-queue.lisp
lisp
FIXME: This is a very bare-bones implementation, not thread-safe in the slightest. It will need to be revisited when we move to a multi-threaded system. (they are policy methods, intended for event client implementation). FIXME: Technically should block here, possibly entering PROCESS-NEXT-EVENT. find that...
nq - clim / event / event - queue The implementation of CLIM II 8.1.1 event queues . (cl:defpackage :nq-clim/event/event-queue (:use :cl :nq-clim/event/event-queue-protocol) (:export "MAKE-EVENT-QUEUE")) (cl:in-package :nq-clim/event/event-queue) (defclass event-queue () ((events :initform nil)...
77c811d6bd2adc00748fa197dd4229240aa85f0eef1080e6740e831e893645f4
saleyn/etran
etran_util.erl
%%%----------------------------------------------------------------------------- @doc Erlang parse transform utility functions @author < saleyn(at)gmail(dot)com > %%% @end %%%----------------------------------------------------------------------------- Copyright ( c ) 2021 %%% %%% Permission is hereby gra...
null
https://raw.githubusercontent.com/saleyn/etran/ba87800244452a5e2a1f0a2123ca12351a887e7d/src/etran_util.erl
erlang
----------------------------------------------------------------------------- @end ----------------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation including without limitation th...
@doc Erlang parse transform utility functions @author < saleyn(at)gmail(dot)com > Copyright ( c ) 2021 files ( the " Software " ) , to deal in the Software without restriction , publish , distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is fur...
55e0cd5c04bda6a2cce22507035bc2edfa8568e17606ad48090cd61ff1e4384c
basho/riak_cs
tools_helper.erl
%% --------------------------------------------------------------------- %% Copyright ( c ) 2007 - 2015 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . Y...
null
https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/riak_test/src/tools_helper.erl
erlang
--------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permiss...
Copyright ( c ) 2007 - 2015 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY ...
ff2c720d8caabb80d15840f7f2fbbf7c95d69503adaff7497322990785f29b11
BitGameEN/bitgamex
rest_expires_binary.erl
-module(rest_expires_binary). -export([init/2]). -export([content_types_provided/2]). -export([get_text_plain/2]). -export([expires/2]). init(Req, Opts) -> {cowboy_rest, Req, Opts}. content_types_provided(Req, State) -> {[{{<<"text">>, <<"plain">>, []}, get_text_plain}], Req, State}. get_text_plain(Req, State) ->...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/cowboy/test/old_http_SUITE_data/rest_expires_binary.erl
erlang
-module(rest_expires_binary). -export([init/2]). -export([content_types_provided/2]). -export([get_text_plain/2]). -export([expires/2]). init(Req, Opts) -> {cowboy_rest, Req, Opts}. content_types_provided(Req, State) -> {[{{<<"text">>, <<"plain">>, []}, get_text_plain}], Req, State}. get_text_plain(Req, State) ->...
d748e0d21e3e028c63846a4d684427fb66f4fd0a5bb24ed8a9ebaa0f09503636
jwiegley/notes
sum.hs
data Sum f g a = InL (f a) | InR (g a) deriving Show instance (Functor f, Functor g) => Functor (Sum f g) where fmap f (InL x) = InL (fmap f x) fmap f (InR y) = InR (fmap f y) class Natural f g where eta :: f a -> g a instance (Applicative f, Applicative g, Natural g f) => Applicative (Sum f g) ...
null
https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/sum.hs
haskell
data Sum f g a = InL (f a) | InR (g a) deriving Show instance (Functor f, Functor g) => Functor (Sum f g) where fmap f (InL x) = InL (fmap f x) fmap f (InR y) = InR (fmap f y) class Natural f g where eta :: f a -> g a instance (Applicative f, Applicative g, Natural g f) => Applicative (Sum f g) ...
d21f87c3b16aed29379dcd50cc73e20ec099a31a01f8f246d846651d8def2ade
callum-oakley/advent-of-code
25.clj
(ns aoc.2016.25 (:require [clojure.string :as str])) (defn parse [s] (mapv #(mapv read-string (re-seq #"\S+" %)) (str/split-lines s))) (defn run [m head reg] (when-let [[op x y] (get m head)] (let [read #(if (int? %) % (reg %))] (case op cpy (recur m (inc head) (assoc reg y (read x))) ...
null
https://raw.githubusercontent.com/callum-oakley/advent-of-code/da5233fc0fd3d3773d35ee747fd837c59c2b1c04/src/aoc/2016/25.clj
clojure
(ns aoc.2016.25 (:require [clojure.string :as str])) (defn parse [s] (mapv #(mapv read-string (re-seq #"\S+" %)) (str/split-lines s))) (defn run [m head reg] (when-let [[op x y] (get m head)] (let [read #(if (int? %) % (reg %))] (case op cpy (recur m (inc head) (assoc reg y (read x))) ...
ae8b9aa4692e9f00de2280864cd2bfed4c704b25f4b6c0d46d16cc8f82b1e647
stolen/edflow
edf_io_overlay.erl
-module(edf_io_overlay). -export([scan_erl_form/3, '_module_backup'/1]). -define(ORIG_IO, orig_io). '_module_backup'(io) -> ?ORIG_IO. scan_erl_form(Device, Prompt, StartLine) -> filter_result(?ORIG_IO:scan_erl_form(Device, Prompt, StartLine)). filter_result({ok, Tokens, EndLine}) -> {ok, filter_tokens(Tokens...
null
https://raw.githubusercontent.com/stolen/edflow/4d356c2c0a3f95ed807d2ac7f4f600b3678a56dd/src/edf_io_overlay.erl
erlang
Replace "slot ? Message" with handle_message(slot, Message) Replace "(slot !:)" with "del_link(slot)" Replace "(slot !:" with "set_link(slot," Treat pipe as 'when' keyword
-module(edf_io_overlay). -export([scan_erl_form/3, '_module_backup'/1]). -define(ORIG_IO, orig_io). '_module_backup'(io) -> ?ORIG_IO. scan_erl_form(Device, Prompt, StartLine) -> filter_result(?ORIG_IO:scan_erl_form(Device, Prompt, StartLine)). filter_result({ok, Tokens, EndLine}) -> {ok, filter_tokens(Tokens...
607248cc9848524a8c39a6918fecac4ca7580466419370fcd1714e7335b11ecc
fmthoma/vty-workshop
Brick.hs
# LANGUAGE LambdaCase # module Exercises.Brick ( -- * Exercises * * Exercise 5 brickListApp , brickListAppState * * Exercise 6 , dialogApp , yesNoDialog * * Exercise 7 , renderPongPaddle , pongPaddleApp -- * Utilities , simpleMain , SimpleApp (..) , runSimpleBri...
null
https://raw.githubusercontent.com/fmthoma/vty-workshop/7e39ee78e059009a3caa1c4924e4517bda428902/code/src/Exercises/Brick.hs
haskell
* Exercises * Utilities * Library Functions ** 'List' Widget ** 'Dialog' Widget ** Basic Widgets ** Rendering ** 'Event's & handling type @n@. appears on top. @ simpleAppDraw = \s -> ['str' s] @ application state * @'halt' :: s -> 'EventM' n ('Next' s)@ to end the app with a given final state * ...
# LANGUAGE LambdaCase # module Exercises.Brick ( * * Exercise 5 brickListApp , brickListAppState * * Exercise 6 , dialogApp , yesNoDialog * * Exercise 7 , renderPongPaddle , pongPaddleApp , simpleMain , SimpleApp (..) , runSimpleBrickApp , List , list, renderL...
69c9bf93dd3cde2a872085c0d4d88d30f62ce79d01e81e4c1d4128a12a574cfe
torkve/melange-seawar
ai.ml
open Message;; let is_correct (row,col) = row >= 0 && row <= 9 && col >= 0 && col <= 9;; let ai (game:Game.t) = let own_board = Board.generate (fun _ _ _ -> ()) () in let opp_board = Board.init (fun _ _ _ -> ()) () in let shot_candidates = ref [] in let not_shotted (r, c) = (Board.get opp_board r c)...
null
https://raw.githubusercontent.com/torkve/melange-seawar/e1633ef088a2dbf893536a7ba2fa8a72eac198ec/ai.ml
ocaml
Return random values as we're AI make a shot and get result receive a shot and send response make next turn
open Message;; let is_correct (row,col) = row >= 0 && row <= 9 && col >= 0 && col <= 9;; let ai (game:Game.t) = let own_board = Board.generate (fun _ _ _ -> ()) () in let opp_board = Board.init (fun _ _ _ -> ()) () in let shot_candidates = ref [] in let not_shotted (r, c) = (Board.get opp_board r c)...
515ed6772270e18825224b83675ccdf0725deba1234a7fbef4b5613322894cda
mitchellwrosen/riak2
RiakPutOpts.hs
module RiakPutOpts where import RiakUtils (difftimeToMillis) import RiakWriteQuorum (WriteQuorum) import qualified RiakWriteQuorum as WriteQuorum import Control.Lens ((.~)) import Data.Default.Class (Default(..)) import Data.ProtoLens.Runtime.Lens.Labels (HasLens') import ...
null
https://raw.githubusercontent.com/mitchellwrosen/riak2/d3c4ef4389012c70e72623cdf9a4caec0a07e568/riak2/src/RiakPutOpts.hs
haskell
module RiakPutOpts where import RiakUtils (difftimeToMillis) import RiakWriteQuorum (WriteQuorum) import qualified RiakWriteQuorum as WriteQuorum import Control.Lens ((.~)) import Data.Default.Class (Default(..)) import Data.ProtoLens.Runtime.Lens.Labels (HasLens') import ...
5203a096a1c67aafaec91cdb5c5213d9cbb314ba79f050f7581a03c21f6bf2bf
geophf/1HaskellADay
Exercise.hs
{-# LANGUAGE OverloadedStrings #-} module Y2020.M10.D30.Exercise where {-- So, the wikipedia entry for all alliances of the world: has a section on modern, or current, military alliances. These entries are saved in the wikitext-format. The wikitext format is described here: :Wikitext_examples ... but is self-evi...
null
https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2020/M10/D30/Exercise.hs
haskell
# LANGUAGE OverloadedStrings # - So, the wikipedia entry for all alliances of the world: has a section on modern, or current, military alliances. These entries are saved in the wikitext-format. The wikitext format is described here: :Wikitext_examples ... but is self-evident from the text, itself. The listing of ...
module Y2020.M10.D30.Exercise where import Data.Map (Map) import Data.Set (Set) import Data.Text (Text) dear :: FilePath moderns :: FilePath moderns = "modern-alliances.wtxt" type Alias = Text data Alliance = Alliance Name (Set Alias) (Set Country) deriving (Eq, Ord, Show) type AllianceMap = Map Name Allia...
c8cabc692f64d54f7fbc2f0ef448f8ec6f431cae04a3781e1049d5ab37c520f3
well-typed/visualize-cbn
Parser.hs
# OPTIONS_GHC -fno - warn - missing - signatures # module CBN.Parser ( parseTerm , parseModule , term , parseIO ) where import Control.Exception import Control.Monad import Data.Bifunctor import Language.Haskell.TH (Q) import Language.Haskell.TH.Quote import Text.Parsec import Text.Parsec.Language (haskell...
null
https://raw.githubusercontent.com/well-typed/visualize-cbn/499a8bc806ce03ce6d1bc12df1ea6e6df7768817/src/CBN/Parser.hs
haskell
------------------------------------------------------------------------------ Quasi-quotation ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Individual parsers --------------------------------------------...
# OPTIONS_GHC -fno - warn - missing - signatures # module CBN.Parser ( parseTerm , parseModule , term , parseIO ) where import Control.Exception import Control.Monad import Data.Bifunctor import Language.Haskell.TH (Q) import Language.Haskell.TH.Quote import Text.Parsec import Text.Parsec.Language (haskell...
239b12988e2dbebc6e501ad09c5adf9bcd070b42858cd46444fd32274cd909e0
robrix/Manifold
Name.hs
module Manifold.Name where import Manifold.Pretty data Name = N String | Q String Name | I Int deriving (Eq, Ord, Show) class Named n where name :: n -> Name setName :: Name -> n -> n instance Named Name where name = id setName = const instance Pretty Name where prettyPrec _ (N s) = prettyStrin...
null
https://raw.githubusercontent.com/robrix/Manifold/3cc7a49c90b9cc7d1da61c532d0ee526ccdd3474/src/Manifold/Name.hs
haskell
module Manifold.Name where import Manifold.Pretty data Name = N String | Q String Name | I Int deriving (Eq, Ord, Show) class Named n where name :: n -> Name setName :: Name -> n -> n instance Named Name where name = id setName = const instance Pretty Name where prettyPrec _ (N s) = prettyStrin...
41e524d3c1213f702c130957389ec46bf40421ca5a5a6301aadd6c2b14cae60a
hspec/hspec
Timer.hs
module Test.Hspec.Core.Timer (withTimer) where import Prelude () import Test.Hspec.Core.Compat import Control.Concurrent.Async import Test.Hspec.Core.Clock withTimer :: Seconds -> (IO Bool -> IO a) -> IO a withTimer delay action = do ref <- newIORef False bracket (async $...
null
https://raw.githubusercontent.com/hspec/hspec/b87b226730e6997cc516c60727120210a4cf1cf4/hspec-core/src/Test/Hspec/Core/Timer.hs
haskell
module Test.Hspec.Core.Timer (withTimer) where import Prelude () import Test.Hspec.Core.Compat import Control.Concurrent.Async import Test.Hspec.Core.Clock withTimer :: Seconds -> (IO Bool -> IO a) -> IO a withTimer delay action = do ref <- newIORef False bracket (async $...
7ae6367901747d77042a37e93358c90be0152bc1338ff58cfacc59fa1511ce5d
racket/htdp
universe-receive.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname universe-receive) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor...
null
https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-test/2htdp/tests/universe-receive.rkt
racket
about the language level of this file in a form that our tools can easily process. Distinct from other tests: launch a sending world, a receiving world, and a connecting universe a universe that channels all messages from one world to another World1 = Number Nat -> World1 World1 -> World1 World2 = Number Num...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname universe-receive) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) (require 2htdp/universe) (require 2htdp/image) ...
b2b542a5db1b65f19f4cdcb9ae5446fd273ca3de9e7e34c0bc7836ecb0836f85
project-oak/hafnium-verification
itv.ml
* 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/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/sledge/src/domain/itv.ml
ocaml
* Interval abstract domain Apron.Texpr1.typ is a sum of nullary constructors only handle positive integer exponents query apron for abstract evaluation of binary operations * abstract evaluation of boolean binary operation [te1 op te2] at [q] by translation to [te1 - te2 op 0] and intersection with [q] if me...
* 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 ...
13d974276e4fc1c76c17184304bb46b820a64bc1bb4dcb0dfacf644313b9d545
andersfugmann/ppx_protocol_conv
jsonm.mli
include Protocol_conv.Runtime.Driver with type t = Ezjsonm.value module Make(P: Ppx_protocol_driver.Parameters) : (Protocol_conv.Runtime.Driver with type t = Ezjsonm.value) val of_jsonm_exn: t -> t val of_jsonm: t -> (t, error) Protocol_conv.Runtime.result val to_jsonm: t -> t
null
https://raw.githubusercontent.com/andersfugmann/ppx_protocol_conv/add1548320707df042d64a4c81d3faa3c6cf2475/drivers/jsonm/jsonm.mli
ocaml
include Protocol_conv.Runtime.Driver with type t = Ezjsonm.value module Make(P: Ppx_protocol_driver.Parameters) : (Protocol_conv.Runtime.Driver with type t = Ezjsonm.value) val of_jsonm_exn: t -> t val of_jsonm: t -> (t, error) Protocol_conv.Runtime.result val to_jsonm: t -> t
dc7c4bcc967969ccd27cfce38f70ac965b5df41f7dbe9b6e26aa19db33a8d63c
ocaml-flambda/flambda-backend
fexpr_to_flambda.mli
val conv : Compilation_unit.t -> Fexpr.flambda_unit -> Flambda_unit.t
null
https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/4783162eea022f8247829757aea35515592b14a3/middle_end/flambda2/parser/fexpr_to_flambda.mli
ocaml
val conv : Compilation_unit.t -> Fexpr.flambda_unit -> Flambda_unit.t
ef2dd2a699392786744d6b1fa0c34f8eb058fbaee6984c6289c64db37be58605
softlab-ntua/bencherl
rt_simple.erl
2008 - 2011 Zuse Institute Berlin 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 di...
null
https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/scalaris/src/rt_simple.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...
2008 - 2011 Zuse Institute Berlin 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 : rt_simple.erl 2639 2012 - 01 - 03 15:00:45Z $ -module(rt_simple). -author(''). -vsn('$Id: rt_simp...
9d9f4b0f1d3061586a3e5d74afeb41404ac3037eb6bb4f1bfd2b9806b2366bcb
c-cube/trustee
test_kernel.ml
open Helpers open OUnit2 (* test substitution of terms and types *) let t_subst1 _ctx = let module M = Make() in let open M in let a' = v' "a" type_ in let x = v' "x" (v a') in let c_foo = new_const "foo" tau in let foo = const c_foo [] in let th = Thm.axiom ctx [] (v x === (lambda x (v x) @@@ v x))...
null
https://raw.githubusercontent.com/c-cube/trustee/499cc5df22c3c261120ad9b72879797ddb5a081e/tests/core/test_kernel.ml
ocaml
test substitution of terms and types
open Helpers open OUnit2 let t_subst1 _ctx = let module M = Make() in let open M in let a' = v' "a" type_ in let x = v' "x" (v a') in let c_foo = new_const "foo" tau in let foo = const c_foo [] in let th = Thm.axiom ctx [] (v x === (lambda x (v x) @@@ v x)) in let x_tau = v' "x" tau in let sub...
7569f8abac9ddf15678223551ed8b8bbc6d6c746993271190ed79867a3b4e681
SquidDev/illuaminate
lens.mli
* A custom PPX deriving plugin for generating lenses . val register : unit -> unit
null
https://raw.githubusercontent.com/SquidDev/illuaminate/da18b101b4710881b71c42554d70a3a7d17c3cd6/src/deriving/lens.mli
ocaml
* A custom PPX deriving plugin for generating lenses . val register : unit -> unit
540a7b8aee55c451f606b57b136d70fc8b5bfe68cc575a7b288ebb0e5ca2951f
yetanalytics/datasim
errors.clj
(ns com.yetanalytics.datasim.util.errors (:require [clojure.spec.alpha :as s])) (defn explain-to-map-coll "Convert spec error data for personae, alignments, and parameters into a map coll acceptable to the Datasim UI." [spec-kw spec-ed] (->> (::s/problems spec-ed) (map-indexed (fn [idx proble...
null
https://raw.githubusercontent.com/yetanalytics/datasim/14544e3e483641d59075035d0d843798ef21f8ae/src/main/com/yetanalytics/datasim/util/errors.clj
clojure
(ns com.yetanalytics.datasim.util.errors (:require [clojure.spec.alpha :as s])) (defn explain-to-map-coll "Convert spec error data for personae, alignments, and parameters into a map coll acceptable to the Datasim UI." [spec-kw spec-ed] (->> (::s/problems spec-ed) (map-indexed (fn [idx proble...
6d103a5dff38f349c5b6cbfa95388df1ae50e624f065cdb7d7d72ff55a4a1c5e
rowangithub/DOrder
qualifymod.mli
* Copyright © 2008 The Regents of the University of California . All rights reserved . * * Permission is hereby granted , without written agreement and without * license or royalty fees , to use , copy , modify , and distribute this * software and its documentation for any purpose , provided that the ...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/liquid/qualifymod.mli
ocaml
* Copyright © 2008 The Regents of the University of California . All rights reserved . * * Permission is hereby granted , without written agreement and without * license or royalty fees , to use , copy , modify , and distribute this * software and its documentation for any purpose , provided that the ...
8f995e052fcaaa0598286eeb7e3b790d5aeb38930323199898d55d8dec92c2b1
haskell/play-haskell
Priority.hs
module Data.Queue.Priority ( PQueue, empty, insert, pop, Data.Queue.Priority.length, ) where import Data.List.NonEmpty (NonEmpty(..)) import qualified Data.List.NonEmpty as NE import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map newtype PQueue p a = PQueue (Map p (NonEmpty a)) -- | O(1). e...
null
https://raw.githubusercontent.com/haskell/play-haskell/a8ae8e62f9b6867b72ea94b47c837408b9a867f7/play-haskell-server/src/Data/Queue/Priority.hs
haskell
| O(1). | O(log(n)). | O(log(n)). | Note: O(n).
module Data.Queue.Priority ( PQueue, empty, insert, pop, Data.Queue.Priority.length, ) where import Data.List.NonEmpty (NonEmpty(..)) import qualified Data.List.NonEmpty as NE import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map newtype PQueue p a = PQueue (Map p (NonEmpty a)) empty :: PQu...
018576897a956d669b1c8447ad4dd632c786a88a46e576052b279cf721d50540
wavewave/hoodle
Window.hs
module Hoodle.Type.Window where import Hoodle.Type.Canvas (CanvasId) -- | data WindowConfig = Node CanvasId | HSplit WindowConfig WindowConfig | VSplit WindowConfig WindowConfig deriving (Show, Eq) data SplitType = SplitHorizontal | SplitVertical deriving (Show) | split window in the place of cidold spl...
null
https://raw.githubusercontent.com/wavewave/hoodle/fa7481d14a53733b2f6ae9debc95357d904a943c/core/src/Hoodle/Type/Window.hs
haskell
| | old window | new additional window | canvas id
module Hoodle.Type.Window where import Hoodle.Type.Canvas (CanvasId) data WindowConfig = Node CanvasId | HSplit WindowConfig WindowConfig | VSplit WindowConfig WindowConfig deriving (Show, Eq) data SplitType = SplitHorizontal | SplitVertical deriving (Show) | split window in the place of cidold splitWin...
dbf40c63ef6cade8b73af0676a8af64fd55e242283e4cf3c016cc7de370680e2
bitemyapp/esqueleto
PersistentImport.hs
{-# language CPP #-} | Re - export " Database . Persist . " without any clashes with -- @esqueleto@. module Database.Esqueleto.Internal.PersistentImport (module Database.Persist.Sql) where import Database.Persist.Sql hiding ( BackendSpecificFilter , Filter(..) , PersistQuery , Selec...
null
https://raw.githubusercontent.com/bitemyapp/esqueleto/440aad82fe24531e8c8ff099ca0ca6e309aba22e/src/Database/Esqueleto/Internal/PersistentImport.hs
haskell
# language CPP # @esqueleto@.
| Re - export " Database . Persist . " without any clashes with module Database.Esqueleto.Internal.PersistentImport (module Database.Persist.Sql) where import Database.Persist.Sql hiding ( BackendSpecificFilter , Filter(..) , PersistQuery , SelectOpt(..) , Update(..) ,...
955acb780b4ae008649f78b69bf1fd619ef48fcc871babf3f7cb8ff830cd2440
bonkf/trackerscraper
magnet_lex.mli
type token = | Name of string | Udp_tracker of string * int | Http_tracker of string * int * string | Peer of string * int | EOF val prefix : Lexing.lexbuf -> string val read : Lexing.lexbuf -> token
null
https://raw.githubusercontent.com/bonkf/trackerscraper/973600c0589d58f680a93b78e495726ad5ff1330/src/magnet_lex.mli
ocaml
type token = | Name of string | Udp_tracker of string * int | Http_tracker of string * int * string | Peer of string * int | EOF val prefix : Lexing.lexbuf -> string val read : Lexing.lexbuf -> token
f73a86861d3d59eb6f452e1bea42bfa4481d44d8b6751a414319f88f39bb675b
ekmett/semigroupoids
Traversable.hs
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # {-# LANGUAGE Safe #-} ----------------------------------------------------------------------------- -- | Copyright : ( C ) 2011 - 2015 -- License : BSD-style (see the file LICENSE) -- Maintainer : < > -- Stability : provisional -- Portability : p...
null
https://raw.githubusercontent.com/ekmett/semigroupoids/f63f7a2d696fdd6ed72eea90798fca1f86d6d040/src/Data/Semigroup/Traversable.hs
haskell
# LANGUAGE Safe # --------------------------------------------------------------------------- | License : BSD-style (see the file LICENSE) Stability : provisional Portability : portable -------------------------------------------------------------------------- * Defining Traversable1 instances $travers...
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # Copyright : ( C ) 2011 - 2015 Maintainer : < > module Data.Semigroup.Traversable ( Traversable1(..) , traverse1Maybe , gtraverse1 , gsequence1 , foldMap1Default ) where import Control.Applicative #if !(MIN_VERSION_base(4,11,0)) import Data.Se...
b56e8f75730a762b677af783ec0a9ed6c1030e7fc2feebf2e42bbe2874eab35e
Atidot/language-powerquery
Editor.hs
{-# LANGUAGE PackageImports #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGE RankNTypes #-} module Language.PowerQuery.Editor.Editor where import Prelude hiding (head) import "base" Control.Monad.IO.Class (liftIO) impo...
null
https://raw.githubusercontent.com/Atidot/language-powerquery/e396e2c2f2855b1a82f1158b91c67db6495bc2d3/language-powerquery-editor/src/Language/PowerQuery/Editor/Editor.hs
haskell
# LANGUAGE PackageImports # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # code editor rate limit change events from editor Tokens JSON viewer variables _ <- select2 def variablesD JSON editor
# LANGUAGE ScopedTypeVariables # module Language.PowerQuery.Editor.Editor where import Prelude hiding (head) import "base" Control.Monad.IO.Class (liftIO) import "lens" Control.Lens import "data-default" ...
c87594ca216826c4d79198fba9a66932b1dc27736ec9135f769ec4a0ed96bc25
kowainik/life-sync
Message.hs
{-# LANGUAGE MultiWayIf #-} # LANGUAGE ViewPatterns # | Copyright : ( c ) 2017 - 2020 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > Contains functions for colorful printing , prompt and other terminal related messages . Copyright: (c) 2017-2020 Kowainik SPDX-License-Identifier: ...
null
https://raw.githubusercontent.com/kowainik/life-sync/ea80581a6735d2f3e2df0fda1d1bc0b0b41ad6d0/src/Life/Message.hs
haskell
# LANGUAGE MultiWayIf # * Questions -------------------------------------------------------------------------- Ansi-terminal -------------------------------------------------------------------------- Explicit flush ensures prompt messages are in the correct order on all systems. | Read 'Text' from standard input ...
# LANGUAGE ViewPatterns # | Copyright : ( c ) 2017 - 2020 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > Contains functions for colorful printing , prompt and other terminal related messages . Copyright: (c) 2017-2020 Kowainik SPDX-License-Identifier: MPL-2.0 Maintainer: Kowainik <...
5e1c344c1554f192cba1d5112b5269fd590facc5d1d13bf4b4ea428499897704
OCamlPro/ocamlexc
printparse.ml
(***********************************************************************) (* *) (* Ocamlexc *) (* *) , projet Cris...
null
https://raw.githubusercontent.com/OCamlPro/ocamlexc/a9ddcfff6f376f5dd6c5fcc3211b8f89e36f79fe/typing/printparse.ml
ocaml
********************************************************************* Ocamlexc ...
, projet Cristal , INRIA Rocquencourt Copyright 1998 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . open Format ;; let rec pp_core_type ppf core_ty = pp_core_type_desc ppf core_ty.Parsetree.ptyp_desc and i...
dad112173c19fb6fc7220463d484b954e640e16327207772713d08d88a87bf48
mmcgrana/fleetdb
core_test.clj
(ns fleetdb.core-test (:require (fleetdb [core :as core])) (:use (clj-unit core) (fleetdb test-util [util "only" (def- defmacro-)]))) (defn- db-with [coll records ispecs] (let [empty (core/init) with-records (first (core/query empty ["insert" coll records])) with-indexes (reduce #(first (core/que...
null
https://raw.githubusercontent.com/mmcgrana/fleetdb/563e3ccb9aa436eb88bea1bff4aa010db5838819/test/fleetdb/core_test.clj
clojure
(ns fleetdb.core-test (:require (fleetdb [core :as core])) (:use (clj-unit core) (fleetdb test-util [util "only" (def- defmacro-)]))) (defn- db-with [coll records ispecs] (let [empty (core/init) with-records (first (core/query empty ["insert" coll records])) with-indexes (reduce #(first (core/que...
12b4aee36b0e463790c8922790f5c3bbe13589d66fb64de88aba05e774e409c3
ocaml/odoc
m3.mli
type m3t = string
null
https://raw.githubusercontent.com/ocaml/odoc/2f639d7d661bc5397afce83dfaa71af53d2a8677/test/pages/tree.t/m3.mli
ocaml
type m3t = string
41e7850c16bae339ff57426dcec0fb0e1c888f920eebafcc44b50e029cb3b55e
mirage/irmin-server
command.mli
include Command_intf.Command (** inline *)
null
https://raw.githubusercontent.com/mirage/irmin-server/6f7945acb683a34fb39e92a02af7cf1b849d6cfd/src/irmin-server-internal/command.mli
ocaml
* inline
include Command_intf.Command
08f7a83bb837580c080546014ad4d415aeb5910e65a46d106988bd3b91107fc9
atgeller/WASM-Redex
Utilities.rkt
#lang racket (require redex/reduction-semantics "../Utilities.rkt" "TypingSyntax.rkt") (provide (all-defined-out)) (define (list-ref-right lst pos) (list-ref (reverse lst) pos)) (define-metafunction WASM-Typing reverse-get : (any ...) j -> any [(reverse-get (any ...) j) ,(list-ref-right (...
null
https://raw.githubusercontent.com/atgeller/WASM-Redex/81f882f9fd95b645a10baf2565f27efc8f8766e5/Validation/Utilities.rkt
racket
Below are various setters used to functionally update a field of the module type context (used in inductive typing rules, such as blocks) Sets the local variable types, used in the typing rule for functions to set up the context to type check the function body Adds a branch condition (the pre-condition of a branch i...
#lang racket (require redex/reduction-semantics "../Utilities.rkt" "TypingSyntax.rkt") (provide (all-defined-out)) (define (list-ref-right lst pos) (list-ref (reverse lst) pos)) (define-metafunction WASM-Typing reverse-get : (any ...) j -> any [(reverse-get (any ...) j) ,(list-ref-right (...
d5a293a18a3e94e4e31190cdaf7dadc842393e9c02487cbb70287c7d98758bb6
lettier/webviewhs
how-do-i-log-some-debug-information.hs
webviewhs ( C ) 2018 lettier.com webviewhs (C) 2018 David Lettier lettier.com -} {-# LANGUAGE OverloadedStrings #-} import Data.Text import qualified Data.Text.Lazy as DTL import Data.Text.Format.Heavy import qualified Graphics.UI.Webviewhs as WHS main :: IO () main = WHS.withWindowLoop ...
null
https://raw.githubusercontent.com/lettier/webviewhs/21ddd4b4872b2e7eb50c9735e70cfbdedf2c6c1a/examples/how-do-i-log-some-debug-information.hs
haskell
# LANGUAGE OverloadedStrings # This function runs before the loop. This function runs after the loop. This function runs every window loop. Return True to continue the loop or False to exit the loop. webviewhs provides log and log'. log uses text-format-heavy which provides a "full-featured string For more i...
webviewhs ( C ) 2018 lettier.com webviewhs (C) 2018 David Lettier lettier.com -} import Data.Text import qualified Data.Text.Lazy as DTL import Data.Text.Format.Heavy import qualified Graphics.UI.Webviewhs as WHS main :: IO () main = WHS.withWindowLoop WHS.WindowParams { WHS.windowP...
5d007570282e284a4f73babf18526f0f3d9c9b8b221b4d8363721fa5f8f947ad
kit-clj/modules
hello.clj
(ns <<ns-name>>.web.views.hello (:require [ctmx.core :as ctmx :refer [defcomponent]] [<<ns-name>>.web.htmx :refer [page-htmx]])) (defcomponent ^:endpoint hello [req my-name] [:div#hello "Hello " my-name]) (defn ui-routes [base-path] (ctmx/make-routes base-path (fn [req] (page-htmx ...
null
https://raw.githubusercontent.com/kit-clj/modules/076d9b5a066e8dd3bb791f99c043b674380f5019/ctmx/assets/src/hello.clj
clojure
(ns <<ns-name>>.web.views.hello (:require [ctmx.core :as ctmx :refer [defcomponent]] [<<ns-name>>.web.htmx :refer [page-htmx]])) (defcomponent ^:endpoint hello [req my-name] [:div#hello "Hello " my-name]) (defn ui-routes [base-path] (ctmx/make-routes base-path (fn [req] (page-htmx ...
a12811599cd49c059592a4902e43fa58e9748db0445d1ec8efc1cc36daef5662
janestreet/base
test_int32.ml
open! Import open! Int32 let%expect_test "hash coherence" = check_int_hash_coherence [%here] (module Int32); [%expect {| |}] ;; let numbers = [ 0x10_20l; 0x11_22_33l; 0x11_22_33_1Fl; 0x11_22_33_44l ] let test = test_conversion ~to_string:(fun x -> Int32.Hex.to_string_hum x) let%expect_test "bswap16" = List.ite...
null
https://raw.githubusercontent.com/janestreet/base/221b085f3fcd77597f8245b4d73de3970b238e71/test/test_int32.ml
ocaml
open! Import open! Int32 let%expect_test "hash coherence" = check_int_hash_coherence [%here] (module Int32); [%expect {| |}] ;; let numbers = [ 0x10_20l; 0x11_22_33l; 0x11_22_33_1Fl; 0x11_22_33_44l ] let test = test_conversion ~to_string:(fun x -> Int32.Hex.to_string_hum x) let%expect_test "bswap16" = List.ite...
1edd82446b6fffeb84102fb9bc9eebafbb851392222a3a060ac14030debfa2b4
Twinside/Juicy.Pixels
Export.hs
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE TypeFamilies # # LANGUAGE ScopedTypeVariables # -- | Module implementing a basic png export, no filtering is applyed, but -- export at least valid images. module Codec.Picture.Png.Internal.Export( PngSavable( .. ) ...
null
https://raw.githubusercontent.com/Twinside/Juicy.Pixels/8b1644255fb5dbe680dff352cf9114a2ce1903ef/src/Codec/Picture/Png/Internal/Export.hs
haskell
# LANGUAGE TypeSynonymInstances # | Module implementing a basic png export, no filtering is applyed, but export at least valid images. | Encode a paletted image into a png if possible. | Equivalent to 'encodePalettedPng' but allow writing of metadatas. See `encodePngWithMetadata` for the details of encoded met...
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # # LANGUAGE ScopedTypeVariables # module Codec.Picture.Png.Internal.Export( PngSavable( .. ) , PngPaletteSaveable( .. ) , writePng , encodeDynamicPng ...
5df059aa36a9c634e277f3106437eecc243aee1888afae5272edcbafbcf0b1f1
reborg/clojure-essential-reference
3.clj
(require '[clojure.set :as s]) < 1 > ;; #{} < 2 > ;; nil (s/intersection #{1 2 3} nil #{}) ; <3> ;; #{}
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Sets/union%2Cdifferenceandintersection/3.clj
clojure
#{} nil <3> #{}
(require '[clojure.set :as s]) < 1 > < 2 >
a2bc2c5f1c857c24feeb9b3af47c70ebd6ed388d3e0a03bd581130dcf62c8dce
flatironinstitute/flathub
Catalog.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE StandaloneDeriving # # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # module Catalog ( Simulation , Catalog(..) , takeCatalogField , lookupField , Grouping(..) , group...
null
https://raw.githubusercontent.com/flatironinstitute/flathub/767c97b32a7de729b5f076c5e4da54debe478541/src/Catalog.hs
haskell
# LANGUAGE OverloadedStrings # |Just a catalog identifier (name) ^display order in catalog list ^primary key ^sort field(s) for index ^(intended) number of rows |Virtual top-level grouping |Intersection |'mempty' is unbounded
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE RecordWildCards # # LANGUAGE StandaloneDeriving # # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # module Catalog ( Simulation , Catalog(..) , takeCatalogField , lookupField , Grouping(..) , groupingName , groupingCatalog , Gro...
9d2ed4812cead91aa464013e8f7f6540a9203e1a80fa488067b1bab5a63f573f
markcox80/lisp-executable
gnu-style-command-line-arguments.lisp
Copyright ( c ) 2011 , ;; All rights reserved. ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions are ;; met: ;; - Redistributions of source code must retain the above copyright ;; notice, this list of conditions and the fo...
null
https://raw.githubusercontent.com/markcox80/lisp-executable/989b68ed946e1d99e6e65b7383a64ff035e833c7/src/gnu-style-command-line-arguments.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in...
Copyright ( c ) 2011 , " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT (in-package "LIS...
81532aaa0a0530036c8f4c79e0b382c39df5605342e4234b2a008419f9f6e28f
cojna/iota
FenwickTreeSpec.hs
# LANGUAGE ViewPatterns # module Data.FenwickTreeSpec (main, spec) where import Control.Monad import Control.Monad.Primitive import Data.FenwickTree import Data.Monoid import qualified Data.Vector.Unboxed as U import Test.Prelude main :: IO () main = hspec spec spec :: Spec spec = do describe "buildFenwickTree" $...
null
https://raw.githubusercontent.com/cojna/iota/6d2ad5b71b1b50bca9136d6ed84f80a0b7713d7c/test/Data/FenwickTreeSpec.hs
haskell
# LANGUAGE ViewPatterns # module Data.FenwickTreeSpec (main, spec) where import Control.Monad import Control.Monad.Primitive import Data.FenwickTree import Data.Monoid import qualified Data.Vector.Unboxed as U import Test.Prelude main :: IO () main = hspec spec spec :: Spec spec = do describe "buildFenwickTree" $...
45fbdc9dc2058f8548e3315e33455f6ab37771f3b3ee1c5ac38d244001e97f5e
marijnh/Postmodern
package.lisp
-*- Mode : LISP ; Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : CL - USER ; -*- (defpackage :cl-postgres (:use :common-lisp) (:export #:database-error #:database-connection-lost #:database-error-message #:database-error-code #:database-error-detail #...
null
https://raw.githubusercontent.com/marijnh/Postmodern/d8c57ef277240535353cee3c478bee34dba2ff1b/cl-postgres/package.lisp
lisp
Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : CL - USER ; -*- Optimization settings (only used by functions that need it).
(defpackage :cl-postgres (:use :common-lisp) (:export #:database-error #:database-connection-lost #:database-error-message #:database-error-code #:database-error-detail #:database-error-query #:database-error-cause #:database-error-constr...
7da491be25f5497d2812c78d70303c4f5ffa316fb665331318cc95a783c382c3
ucsd-progsys/liquidhaskell
HiddenData.hs
module HiddenData where import HiddenDataLib (blub) @ foo : : @ foo = blub
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/20cd67af038930cb592d68d272c8eb1cbe3cb6bf/tests/measure/pos/HiddenData.hs
haskell
module HiddenData where import HiddenDataLib (blub) @ foo : : @ foo = blub
dc11ad95cb158f493bb5c7f97fa637d02258e878cdb792e8f0c3886f03d83dd4
input-output-hk/cardano-ledger
RefundsAndDeposits.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE PatternSynonyms # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Cardano.Ledger.Shelley.LedgerState.RefundsAndDeposits ( totalTxDeposits, totalCertsDeposits, keyTxRefunds, keyCertsRefunds, ) whe...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/e0947b0c2e99ef929d20593be03e199560392f42/eras/shelley/impl/src/Cardano/Ledger/Shelley/LedgerState/RefundsAndDeposits.hs
haskell
# LANGUAGE BangPatterns # The block may (legitimately) contain multiple registration certificates any subsequent ones as re-registration. As such, we must only take a transaction to have multiple pool registration for the same pool, so as we process pool registrations, we must keep track of those that are already ...
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE PatternSynonyms # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Cardano.Ledger.Shelley.LedgerState.RefundsAndDeposits ( totalTxDeposits, totalCertsDeposits, keyTxRefunds, keyCertsRefunds, ) where import Cardano.Ledger.Coin...
c8aaa3d057e64c6292c28db0698e0766d64fc4121e274cd57fd1814c8f119ce0
rzetterberg/orgmode-sql
ClockSpec.hs
{-| Tests that use complete org-mode documents to verify that the whole process of parsing and importing the data to the database works as expected. -} module Database.Query.ClockSpec (spec) where import TestImport import qualified Database.OrgMode.Internal.Query.Heading as Heading import qualified Databas...
null
https://raw.githubusercontent.com/rzetterberg/orgmode-sql/98cf35b96e6ce63f60ce11ace18be55e5770352e/test/Database/Query/ClockSpec.hs
haskell
| Tests that use complete org-mode documents to verify that the whole process of parsing and importing the data to the database works as expected. -----------------------------------------------------------------------------
module Database.Query.ClockSpec (spec) where import TestImport import qualified Database.OrgMode.Internal.Query.Heading as Heading import qualified Database.OrgMode.Internal.Query.Clock as Clock spec :: Spec spec = do describe "getByHeading" $ do it "example 1_clock_2_hours" $ do clocks...
90f8c5df7b87eb3ddaa0dd1a501f16c58fbe063cf517ae0fd68657a99a056a85
ghc/packages-directory
Xdg.hs
# LANGUAGE CPP # module Xdg where #if MIN_VERSION_base(4, 7, 0) import qualified Data.List as List import System.Environment (setEnv, unsetEnv) import System.FilePath (searchPathSeparator) #if !defined(mingw32_HOST_OS) import System.FilePath ((</>)) #endif #endif #include "util.inl" main :: TestEnv -> IO () main _t = ...
null
https://raw.githubusercontent.com/ghc/packages-directory/75165a9d69bebba96e0e3a1e519ab481d1362dd2/tests/Xdg.hs
haskell
smoke tests avoid warnings about redundant imports unset variables, so env doesn't affect test running non-absolute paths are ignored, and the fallback is used
# LANGUAGE CPP # module Xdg where #if MIN_VERSION_base(4, 7, 0) import qualified Data.List as List import System.Environment (setEnv, unsetEnv) import System.FilePath (searchPathSeparator) #if !defined(mingw32_HOST_OS) import System.FilePath ((</>)) #endif #endif #include "util.inl" main :: TestEnv -> IO () main _t = ...
b611362e2af7c87eabce7adadfb1f5b290eea1c220124d96a8cb24b3b2f9f52f
naoiwata/sicp
q2.39.scm
;; @author naoiwata SICP Chapter2 question 2.39 (add-load-path "." :relative) (load "q2.38.scm") (define (reverse-r sequence) (fold-right (lambda (x y) (append y (list x))) () sequence)) ; test (print (reverse-r (list 1 2 3 4))) ; (4 3 2 1) (define (reverse-l sequence) (fold-left (lambda (x y) (...
null
https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter2/q2.39.scm
scheme
@author naoiwata test (4 3 2 1) test (4 3 2 1) END
SICP Chapter2 question 2.39 (add-load-path "." :relative) (load "q2.38.scm") (define (reverse-r sequence) (fold-right (lambda (x y) (append y (list x))) () sequence)) (define (reverse-l sequence) (fold-left (lambda (x y) (cons y x)) () sequence))
457f6faa19c0e02944b1f82eedc1883ad91cc386d706a15b013e0a0a783d005f
idris-lang/Idris-dev
Codegen.hs
| Module : IRTS.JavaScript . Description : The JavaScript common code generator . License : : The Idris Community . Module : IRTS.JavaScript.Codegen Description : The JavaScript common code generator. License : BSD3 Maintainer : The Idris Community. -} # LANGUAGE CPP , OverloadedStr...
null
https://raw.githubusercontent.com/idris-lang/Idris-dev/a13caeb4e50d0c096d34506f2ebf6b9d140a07aa/src/IRTS/JavaScript/Codegen.hs
haskell
| Code generation stats hold information about the generated user code. Based on that information we add additional code to make things work. generation stats. rts external libraries user code | Generate code for each declaration and collect stats. preceded by a comment that gives their name. Constructor decl...
| Module : IRTS.JavaScript . Description : The JavaScript common code generator . License : : The Idris Community . Module : IRTS.JavaScript.Codegen Description : The JavaScript common code generator. License : BSD3 Maintainer : The Idris Community. -} # LANGUAGE CPP , OverloadedStr...
e5d412fcd9269b3c89d9ee483dfdefd8d4e02295ff0dc79fdebe1967d7bb51bf
lexi-lambda/megaparsack
util.rkt
#lang racket/base (require (for-label data/functor data/applicative data/monad data/either megaparsack megaparsack/text megaparsack/parser-tools/lex parser-tools/lex ...
null
https://raw.githubusercontent.com/lexi-lambda/megaparsack/298794de04db02cc12bd41f4d7af1e77332732da/megaparsack-doc/scribblings/megaparsack/util.rkt
racket
#lang racket/base (require (for-label data/functor data/applicative data/monad data/either megaparsack megaparsack/text megaparsack/parser-tools/lex parser-tools/lex ...
de5c099909e455279f76ea5445ec0ffc5a4e747c501041b27fc01dcdff62f2ad
mirage/ocaml-matrix
bench.ml
let user = "bonjour" let pwd = "bonjour" let host = "localhost" let userid = Fmt.str "@%s:%s" user host open Shexp_process.Infix let ( let* ) = ( >>= ) let ( let+ ) = ( >>| ) let setup_server () = let open Shexp_process in run_exit_code "rm" ["-rf"; "/tmp/ocaml-matrix/"] |> map ~f:ignore >> mkdir "/tmp/ocaml...
null
https://raw.githubusercontent.com/mirage/ocaml-matrix/e844c91fed508e4bedd3723a696395c8c3885d07/bench/bench.ml
ocaml
let user = "bonjour" let pwd = "bonjour" let host = "localhost" let userid = Fmt.str "@%s:%s" user host open Shexp_process.Infix let ( let* ) = ( >>= ) let ( let+ ) = ( >>| ) let setup_server () = let open Shexp_process in run_exit_code "rm" ["-rf"; "/tmp/ocaml-matrix/"] |> map ~f:ignore >> mkdir "/tmp/ocaml...
33d4b55a9fe4fed69f36e6f47e3d26e2da41d75b1e6492a35d62d36d8ccde67a
tsloughter/kuberl
kuberl_v2beta2_object_metric_source.erl
-module(kuberl_v2beta2_object_metric_source). -export([encode/1]). -export_type([kuberl_v2beta2_object_metric_source/0]). -type kuberl_v2beta2_object_metric_source() :: #{ 'describedObject' := kuberl_v2beta2_cross_version_object_reference:kuberl_v2beta2_cross_version_object_reference(), 'metric' := kuberl...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v2beta2_object_metric_source.erl
erlang
-module(kuberl_v2beta2_object_metric_source). -export([encode/1]). -export_type([kuberl_v2beta2_object_metric_source/0]). -type kuberl_v2beta2_object_metric_source() :: #{ 'describedObject' := kuberl_v2beta2_cross_version_object_reference:kuberl_v2beta2_cross_version_object_reference(), 'metric' := kuberl...
7cc21dfe0513b50cec8735a507f7f3b350d3f527e15b4ca42a071ca11cb07ade
fluree/ledger
dbsync2.clj
(ns fluree.db.ledger.consensus.dbsync2 (:require [fluree.db.storage.core :as storage] [fluree.db.ledger.storage :as ledger-storage] [clojure.core.async :as async :refer [go <! >!]] [fluree.db.util.log :as log] [fluree.db.ledger.storage.filestore :as filestore] ...
null
https://raw.githubusercontent.com/fluree/ledger/2b7819f38c6d9f8347028e4458fb8a301a3d9a35/src/fluree/db/ledger/consensus/dbsync2.clj
clojure
reset all servers keep map same, not time to adjust yet Note - do not use storage-write on the connection, as that will write through consensus layer - we just want to write locally here send-rpc has args: [raft server operation data callback] optionally, we can pass in an extra finished? channel - used for syncin...
(ns fluree.db.ledger.consensus.dbsync2 (:require [fluree.db.storage.core :as storage] [fluree.db.ledger.storage :as ledger-storage] [clojure.core.async :as async :refer [go <! >!]] [fluree.db.util.log :as log] [fluree.db.ledger.storage.filestore :as filestore] ...
8789cd5ad5697e501d71dc00da7768f14b391321ad378d12f747cb30c8aea801
tomjaguarpaw/haskell-opaleye
ToFields.hs
# LANGUAGE FlexibleContexts # * Creating ' Field 's from Haskell values toFields, toFieldsI, -- * Creating @ToFields@ C.toToFields, -- * Explicit versions toFieldsExpl...
null
https://raw.githubusercontent.com/tomjaguarpaw/haskell-opaleye/b7aacc07c6392654cae439fc3b997620c3aa7a87/src/Opaleye/ToFields.hs
haskell
* Creating @ToFields@ * Explicit versions * Adaptor | 'toFields' provides a convenient typeclass wrapper around the convenience it doesn't provide any additional functionality. The following is an example of a function for inserting custom types. @ customInsert => Connection -> 'Opaleye.Table' f...
# LANGUAGE FlexibleContexts # * Creating ' Field 's from Haskell values toFields, toFieldsI, C.toToFields, toFieldsExplicit, C.ToFields, ) where import qualified Opal...
a1488edf91720668126fd87573d6b575a1dee940d147f64986c97c5c98ae5db1
ericclack/racket-examples
forest1.rkt
#lang racket ;; 3D forest game ;; Version 1 ;; To Do: ;; - Adapt from stars.rkt ;; - How big does something look at position x,y,z? Not just about z ;; - Why do trees get smaller as they get closer? ;; - move-tree should be move-player ;; - We currently have space physics -- up/down shouldn't keep us running ;; - Tu...
null
https://raw.githubusercontent.com/ericclack/racket-examples/ee858daac3577ead0c8463b9701a8653220039de/forest1.rkt
racket
3D forest game Version 1 To Do: - Adapt from stars.rkt - How big does something look at position x,y,z? Not just about z - Why do trees get smaller as they get closer? - move-tree should be move-player - We currently have space physics -- up/down shouldn't keep us running - Turn left/right - to + of this valu...
#lang racket (require 2htdp/universe 2htdp/image) (require "util.rkt") (require "3d.rkt") (require unstable/debug) (define MAX-TREE-XY 500) (define MAX-TREES 25) (define MAX-ALIENS 10) (define ALIEN-SIZE 150) (define TICK-RATE 1/50) (define START-Z 100) (define speed 0.1) (define MAX-SPEED 2.9) (define score ...
9dc3c457f6706fb32e0fe42141827ce0b4a0661427caad051c1c1cf520e2bf22
TorXakis/TorXakis
Common.hs
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} ----------------------------------------...
null
https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/txs-compiler/src/TorXakis/Parser/Common.hs
haskell
------------------------------------------------------------------------------ | Stability : experimental Portability : portable Common types and functionality for the 'TorXakis' parser. ------------------------------------------------------------------------------ | Type of the parser intput stream. | Par...
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} Module : TorXakis . . Common ...
8c4ec616df5de6b99372ed4e18e41bff919ed17c7cd4817c210e8954bb444481
ynadji/lisp
lazy-eval.lisp
;;;; Application #1: Lazy Evaluation (defconstant unforced (gensym)) (defstruct delay forced closure) (defmacro delay (expr) (let ((self (gensym))) `(let ((,self (make-delay :forced unforced))) (setf (delay-closure ,self) #'(lambda () (setf (delay-forced ,self) ,expr))) ,self))) (defun fo...
null
https://raw.githubusercontent.com/ynadji/lisp/758b5aebaa01f4994407d20026e617ebef90739e/chiglug-macros/lazy-eval.lisp
lisp
Application #1: Lazy Evaluation
(defconstant unforced (gensym)) (defstruct delay forced closure) (defmacro delay (expr) (let ((self (gensym))) `(let ((,self (make-delay :forced unforced))) (setf (delay-closure ,self) #'(lambda () (setf (delay-forced ,self) ,expr))) ,self))) (defun force (x) (if (delay-p x) (if (...
1dac3e4f579fa1c8987f92b329ea46edb5de01abe4e61974bb5d6c6dd1939f71
e-bigmoon/haskell-blog
Streaming.hs
#!/usr/bin/env stack -- stack script --resolver lts-17.3 {-# LANGUAGE OverloadedStrings #-} import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString as S import qualified Data.Conduit.List as CL import Network.HTTP.Simple import System.IO (stdout) m...
null
https://raw.githubusercontent.com/e-bigmoon/haskell-blog/5c9e7c25f31ea6856c5d333e8e991dbceab21c56/sample-code/yesod/appendix/ap4/Streaming.hs
haskell
stack script --resolver lts-17.3 # LANGUAGE OverloadedStrings #
#!/usr/bin/env stack import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString as S import qualified Data.Conduit.List as CL import Network.HTTP.Simple import System.IO (stdout) main :: IO () main = httpSink "" $ \response -> do liftIO $ putStrLn...
2024c971517890857ae77505f475a00e862637f12fb904ccde30af560040b552
samrushing/irken-compiler
t_vm.scm
;; -*- Mode: Irken -*- (include "lib/core.scm") (include "lib/string.scm") (include "lib/pair.scm") (include "lib/io.scm") (include "lib/os.scm") (datatype object (:int int) (:char char) (:bool bool) (:string string) (:undefined undefined) (:symbol symbol) (:continuation continuation) (:closure (vecto...
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_vm.scm
scheme
-*- Mode: Irken -*- when calling an unknown function. XXX need a way to declare record types! (datatype code ;; <lits> <insns> (:t (vector object) (vector int)) ) read vector of literals performance hacks - these could definitely go away with a little more smarts in analyze.py. VM registers the tracing ...
(include "lib/core.scm") (include "lib/string.scm") (include "lib/pair.scm") (include "lib/io.scm") (include "lib/os.scm") (datatype object (:int int) (:char char) (:bool bool) (:string string) (:undefined undefined) (:symbol symbol) (:continuation continuation) (:closure (vector (object)) (vector int...
6654b6cda80f2eb2dcf648197785b676554ab3651cc1f0b8673ffd45e98918ec
siraben/haoc-2021
day3.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE LambdaCase # # LANGUAGE TupleSections # # LANGUAGE NoMonomorphismRestriction # # OPTIONS_GHC -Wno - incomplete - patterns # import Control.Applicative import Control.Monad import Criterion.Main import Data.Foldable import Data.Function import Data.List import Data.Map (Map) imp...
null
https://raw.githubusercontent.com/siraben/haoc-2021/e2cf761c9a9332e9ca5815620b8c0ef4db1b4828/day3.hs
haskell
# LANGUAGE BangPatterns # | Repeat a function until you get the same result twice. most common and least common bits
# LANGUAGE LambdaCase # # LANGUAGE TupleSections # # LANGUAGE NoMonomorphismRestriction # # OPTIONS_GHC -Wno - incomplete - patterns # import Control.Applicative import Control.Monad import Criterion.Main import Data.Foldable import Data.Function import Data.List import Data.Map (Map) import qualified Data.Map as M d...
2669517c6f3eef3ca025b03daf777625a9106e7cd78f851be54a3f2002508496
binsec/binsec
smt_external.ml
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2022 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/binsec/22ee39aad58219e8837b6ba15f150ba04a498b63/src/smt/smt_external.ml
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2022 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
7b34d535118a8eafba5183e338c0834a2107684d1c4c963abdc0ad58ecd7cda9
3b/3bgl-misc
shaders.lisp
(cl:defpackage basecode-vr-shaders (:use :3bgl-glsl/cl #++ :3bgl-material-lib-shaders) ) (in-package basecode-vr-shaders) (uniform matrix :mat4) (input position :vec4 :location 0) (input uv-coords-in :vec2 :location 1) ;; render-model, comanion-window (input color-in :vec4 :stage :vertex :location 1) ;; controller...
null
https://raw.githubusercontent.com/3b/3bgl-misc/e3bf2781d603feb6b44e5c4ec20f06225648ffd9/basecode-vr/shaders.lisp
lisp
render-model, comanion-window controller controller render-model render-model render-model
(cl:defpackage basecode-vr-shaders (:use :3bgl-glsl/cl #++ :3bgl-material-lib-shaders) ) (in-package basecode-vr-shaders) (uniform matrix :mat4) (input position :vec4 :location 0) (uniform diffuse :sampler-2d) (output output-color :vec4) (defun controller-transform-vertex () (setf output-color (vec4 (.xyz col...
7599417496db9eea91ead84c061ce99af1e75f0e0724415b0d77430446a84fa3
dongcarl/guix
apl.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 < > Copyright © 2014 , 2015 < > Copyright © 2017 , 2019 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as publish...
null
https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/apl.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2013 < > Copyright © 2014 , 2015 < > Copyright © 2017 , 2019 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu packages apl) #:use-modul...
171e89796594d048408711000f3d6d3550000c7544e7eee724796e8f0cd92029
archaelus/webmachine
webmachine_skel.erl
@author < > @author < > 2007 - 2008 Basho Technologies %% 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 ...
null
https://raw.githubusercontent.com/archaelus/webmachine/1d30b6a1763d6a66664f3aff4c811753e7e1a5ed/src/webmachine_skel.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. limitations under the License. Extern...
@author < > @author < > 2007 - 2008 Basho Technologies Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , See the License for the specific language governing permissions and -module(webmachine_skel). -ex...
f64c74853dc6b7b7fccaf427cabf79b45029be45add79c0f1fb8094598461e05
Octachron/babilim
option.ml
let maybe f x = match x with | Some x -> f x | None -> () let bind f x = match x with | Some x -> f x | None -> None let (>>) x f = maybe f x let (>>=) x f = bind f x let (>>|) x f = x >>= (fun x -> Some(f x))
null
https://raw.githubusercontent.com/Octachron/babilim/46b0412cd6efef5efe26bfd379566688bf7ab571/po/option.ml
ocaml
let maybe f x = match x with | Some x -> f x | None -> () let bind f x = match x with | Some x -> f x | None -> None let (>>) x f = maybe f x let (>>=) x f = bind f x let (>>|) x f = x >>= (fun x -> Some(f x))
f7e1cfc9d19f79d0eeba6a3cda63d2f09a37743149c291fde232ca07c1ca9181
dylex/haskell-nfs
State.hs
module Network.NFS.V4.State ( anonymousStateid , bypassStateid , currentStateid , invalidStateid ) where import Network.ONCRPC.XDR.Array (padLengthArray) import qualified Network.NFS.V4.Prot as NFS anonymousStateid, bypassStateid, currentStateid, invalidStateid :: NFS.Stateid4 anonymousStateid =...
null
https://raw.githubusercontent.com/dylex/haskell-nfs/07d213e09f7bf9e6fe3200aca3de494c3dcd54f7/nfs/Network/NFS/V4/State.hs
haskell
module Network.NFS.V4.State ( anonymousStateid , bypassStateid , currentStateid , invalidStateid ) where import Network.ONCRPC.XDR.Array (padLengthArray) import qualified Network.NFS.V4.Prot as NFS anonymousStateid, bypassStateid, currentStateid, invalidStateid :: NFS.Stateid4 anonymousStateid =...