_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
0303be070b0b2c1be6ff7b8491db4779918f337c4cde6f4ed2db0083e0ba4689
donut/OCamURL-server
aliases_qry.ml
open Lwt.Infix open Graphql_lwt module DB = Lib_db module Model = Lib_model type or_error = { error: Error.t option; aliases: Model.Alias.t list option; } let aliases_or_error db_conn = Error.make_x_or_error "AliasesOrError" ~x_name:"aliases" ~x_type:Schema.(list (non_null (Alias.alias db_conn))) ~resolve_...
null
https://raw.githubusercontent.com/donut/OCamURL-server/87738c1a0bbfc2c848f9f4e2052cacc81a176489/lib/schema/aliases_qry.ml
ocaml
open Lwt.Infix open Graphql_lwt module DB = Lib_db module Model = Lib_model type or_error = { error: Error.t option; aliases: Model.Alias.t list option; } let aliases_or_error db_conn = Error.make_x_or_error "AliasesOrError" ~x_name:"aliases" ~x_type:Schema.(list (non_null (Alias.alias db_conn))) ~resolve_...
8e98549a004404c73a822cdf22568c4ca645e30b36d4daa97f2341f1540aa327
rumblesan/improviz
OSC.hs
module Server.OSC ( startOSCServer ) where import Control.Concurrent ( ThreadId , forkIO ) import Control.Concurrent.STM ( atomically ...
null
https://raw.githubusercontent.com/rumblesan/improviz/23e16ae7b2d55d2204417ec60c7cb6673a93df7d/src/Server/OSC.hs
haskell
module Server.OSC ( startOSCServer ) where import Control.Concurrent ( ThreadId , forkIO ) import Control.Concurrent.STM ( atomically ...
3ba89a2ae219535ae479a0b1b661020db39aac476c62c0a574b1501c67e51057
lancelet/wgpu-hs
ChainedStruct.hs
# LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # module WGPU.Internal.ChainedStruct ( -- * Types ChainedStruct (..), ) where import Foreign (Ptr, castPtr, nullPtr) import WGPU.Internal.Memory (ToRaw, raw) import WGPU.Raw.Generated.Enum.WGPUSType (WGPUSType) import WGPU.Raw.Generated.Struct.WGPU...
null
https://raw.githubusercontent.com/lancelet/wgpu-hs/42d7931cdd793970bf4844906b382d908bbb196f/wgpu-hs/src-internal/WGPU/Internal/ChainedStruct.hs
haskell
* Types ----------------------------------------------------------------------------- | Represents a chained structure. | Empty chained structure, but with a type tag. | Chained structue that points to the next structure in a chain.
# LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # module WGPU.Internal.ChainedStruct ChainedStruct (..), ) where import Foreign (Ptr, castPtr, nullPtr) import WGPU.Internal.Memory (ToRaw, raw) import WGPU.Raw.Generated.Enum.WGPUSType (WGPUSType) import WGPU.Raw.Generated.Struct.WGPUChainedStruct (...
65181f61b4214cf49ae63163d4448f9aeb83e76ca48c6d2dbb41b35a109eeec4
8c6794b6/haskell-sc-scratch
Sirens.hs
------------------------------------------------------------------------------ -- | -- Module : $Header$ CopyRight : ( c ) 8c6794b6 -- License : BSD3 Maintainer : -- Stability : unstable -- Portability : non-portable -- -- Sirens. -- -- <> -- module DesigningSound.Sirens where import Sound.SC3 im...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/designing-sound/src/DesigningSound/Sirens.hs
haskell
---------------------------------------------------------------------------- | Module : $Header$ License : BSD3 Stability : unstable Portability : non-portable Sirens. <> | Using lagUD and lfPulse for both pitch curve and waveform synthesis. > SynthDef(\dsaf_horn1, { |rate=0.1| > > // This f...
CopyRight : ( c ) 8c6794b6 Maintainer : module DesigningSound.Sirens where import Sound.SC3 import DesigningSound.Util > var freq = LFPulse.kr(rate , 0.99 , 0.4).lagud(0.4 / rate , 0.6 / rate ) * 800 + 300 ; > var son = LFPulse.ar(freq , 0.99 , / freq , 0.6 / freq ) * 2 - 1 ; > son = BPF....
0399fd233ea238f901d60c58a05d6ff9e855217e4564d97ecd669a50f6fdd74c
entangled/entangled
Entangled.hs
~\~ language = Haskell filename = src / -- ~\~ begin <<lit/12-main.md|src/Entangled.hs>>[init] # LANGUAGE NoImplicitPrelude # # LANGUAGE MultiParamTypeClasses # module Entangled where import RIO import RIO.Writer (MonadWriter, WriterT, runWriterT, tell) import qualified RIO.Text as T import qualified Data.Map.Lazy...
null
https://raw.githubusercontent.com/entangled/entangled/bd3e996959f3beddba6c0727e9a11d1190e8cb7b/src/Entangled.hs
haskell
~\~ begin <<lit/12-main.md|src/Entangled.hs>>[init] ~\~ end
~\~ language = Haskell filename = src / # LANGUAGE NoImplicitPrelude # # LANGUAGE MultiParamTypeClasses # module Entangled where import RIO import RIO.Writer (MonadWriter, WriterT, runWriterT, tell) import qualified RIO.Text as T import qualified Data.Map.Lazy as LM import Control.Monad.Except ( MonadError(..) ) ...
1d2334c7e27dc7d3eda00f166c6d3b299ce801c8db179d817682d8517f7f8465
armedbear/abcl
test-ironclad.lisp
(ql:quickload '(:ironclad :ironclad/tests)) (time (asdf:test-system :ironclad))
null
https://raw.githubusercontent.com/armedbear/abcl/36a4b5994227d768882ff6458b3df9f79caac664/ci/test-ironclad.lisp
lisp
(ql:quickload '(:ironclad :ironclad/tests)) (time (asdf:test-system :ironclad))
3d2e615f06fc125544dcdf54e9229fcfa02b33f88013340c92909a65dc93d69b
euhmeuh/rilouworld
engine.rkt
#lang reprovide rilouworld/private/core/engine
null
https://raw.githubusercontent.com/euhmeuh/rilouworld/184dea6c187f4f94da6616b89ec15cc8ba6bb786/engine.rkt
racket
#lang reprovide rilouworld/private/core/engine
d2c57f0e0b868e48847a76158c830837f2f7e8580b895553edcef068336b0332
AccelerateHS/accelerate-examples
BlackScholes.hs
module BlackScholes where import Random import System.Random.MWC import Data.Array.IArray as IArray import Data.Array.Accelerate as Acc import Prelude as P riskfree, volatility :: Float riskfree = 0.02 volatility = 0.30 Black - Scholes option pricing ------------------------------- horner :...
null
https://raw.githubusercontent.com/AccelerateHS/accelerate-examples/a973ee423b5eadda6ef2e2504d2383f625e49821/examples/icebox/tests/simple/BlackScholes.hs
haskell
----------------------------- Main ----
module BlackScholes where import Random import System.Random.MWC import Data.Array.IArray as IArray import Data.Array.Accelerate as Acc import Prelude as P riskfree, volatility :: Float riskfree = 0.02 volatility = 0.30 Black - Scholes option pricing horner :: Num a => [a] -> a -> a horner ...
1355996eda63bfeecfbe2de280ad75ae5f1334721853b7bdc65bf634bdeff31f
michalkonecny/aern2
Values.hs
| Module : Values Description : common functions for MPBall benchmarks Copyright : ( c ) : : Stability : experimental Portability : portable Module : Values Description : common functions for MPBall benchmarks Copyright : (c)...
null
https://raw.githubusercontent.com/michalkonecny/aern2/1c8f12dfcb287bd8e3353802a94865d7c2c121ec/aern2-mp/bench/old/Values.hs
haskell
| Module : Values Description : common functions for MPBall benchmarks Copyright : ( c ) : : Stability : experimental Portability : portable Module : Values Description : common functions for MPBall benchmarks Copyright : (c)...
bea4b3603626214d89783b05e2983b315577838f0b9bd1eebb3a95dec4c3a5a1
haskell/ThreadScope
SumEuler1.hs
------------------------------------------------------------------------------- -- This demonstrates that f `par` (f + e) does not result in parallelism. module Main where import System.Time import Control.Parallel import System.Mem ----------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/haskell/ThreadScope/d70f45eb1d6a5dab13d4ea338d58d91389b77bd4/papers/haskell_symposium_2009/sumEuler/SumEuler1.hs
haskell
----------------------------------------------------------------------------- This demonstrates that f `par` (f + e) does not result in parallelism. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- ----------...
module Main where import System.Time import Control.Parallel import System.Mem fib :: Int -> Int fib 0 = 0 fib 1 = 1 fib n = fib (n-1) + fib (n-2) mkList :: Int -> [Int] mkList n = [1..n-1] relprime :: Int -> Int -> Bool relprime x y = gcd x y == 1 euler :: Int -> Int euler n = length (f...
b0191725ece858a0bb817c0c185140a01134d0a6661b774bcd694d4284bc7be5
CodyReichert/qi
release.lisp
#!/usr/bin/env clisp ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- (defpackage :release-script (:use #:cl #:regexp)) (in-package :release-script) ;;;; Configuration ------------------------------------------------------------ (defparameter *project-name* "trivial-garbage") (defparameter *asdf-file* (format nil "~A....
null
https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/trivial-garbage-latest/release.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- Configuration ------------------------------------------------------------ -------------------------------------------------------------------------- yes, anaphoric, deal with it. Running commands XXX: quote arguments. XXX: parameterize figure out what version we'll be...
#!/usr/bin/env clisp (defpackage :release-script (:use #:cl #:regexp)) (in-package :release-script) (defparameter *project-name* "trivial-garbage") (defparameter *asdf-file* (format nil "~A.asd" *project-name*)) (defparameter *host* "common-lisp.net") (defparameter *release-dir* (format nil "/project/~A/public_ht...
8a91a2c899ddcc63dbe0a4cbca3e230cb651ade5adf6e24141f64556163b9d93
haskell/statistics
NonParametric.hs
# LANGUAGE FlexibleContexts # # LANGUAGE ViewPatterns # Tests for Statistics . Test . NonParametric module Tests.NonParametric (tests) where import Statistics.Distribution.Normal (standard) import Statistics.Test.KolmogorovSmirnov import Statistics.Test.MannWhitneyU import Statistics.Test.KruskalWallis import S...
null
https://raw.githubusercontent.com/haskell/statistics/a2aa25181e50cd63db4a785c20c973a3c4dd5dac/tests/Tests/NonParametric.hs
haskell
-------------------------------------------------------------- List of (Sample A, Sample B, (Positive Rank, Negative Rank)) List of (Sample A, Sample B, (Positive Rank, Negative Rank)) Taken from the Mitic paper: List of (Sample A, Sample B, (Positive Rank, Negative Rank)) Worked example from the Internet: Worked...
# LANGUAGE FlexibleContexts # # LANGUAGE ViewPatterns # Tests for Statistics . Test . NonParametric module Tests.NonParametric (tests) where import Statistics.Distribution.Normal (standard) import Statistics.Test.KolmogorovSmirnov import Statistics.Test.MannWhitneyU import Statistics.Test.KruskalWallis import S...
b00d6ad9ed0056162cf7687e1f8cb5858eaa25f9b99442e72636093b85c78b4d
PacktWorkshops/The-Clojure-Workshop
stock_trading.clj
;;; In REPL (def client-account (ref 2100)) (def broker-account (ref 10000)) (def acme-corp-share-price (ref 22)) (def broker-stocks (ref {:acme-corp 50})) (def client-stocks (ref {:acme-corp 0})) ;;; In REPL (defn buy-acme-corp-shares [n] (dosync (let [purchase-price (* n @acme-corp-share-price)] (alter c...
null
https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter12/Exercise12.03/stock_trading.clj
clojure
In REPL In REPL In REPL In REPL In REPL In REPL In REPL
(def client-account (ref 2100)) (def broker-account (ref 10000)) (def acme-corp-share-price (ref 22)) (def broker-stocks (ref {:acme-corp 50})) (def client-stocks (ref {:acme-corp 0})) (defn buy-acme-corp-shares [n] (dosync (let [purchase-price (* n @acme-corp-share-price)] (alter client-account #(- % purc...
87ef260cb7817a5bf2a5d71be91769d7720c0286ebd71d4f84625cc8c76776f5
nasa/Common-Metadata-Repository
util.clj
(ns cmr.metadata-db.data.util "This is a utility namespace for functions useful by two or more implementations as well as other parts of the CMR. Putting them here avoids having to call into an implementation." (:require [cheshire.core :as json] [clojure.set :as set] [clojure.string :as string] [cmr...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/67820501151731b535b7087e11990ab1c2240042/metadata-db-app/src/cmr/metadata_db/data/util.clj
clojure
We add "ISO-SMAP" mapping here to work with data that are bootstrapped or synchronized directly from catalog-rest. Since catalog-rest uses ISO-SMAP as the format value in its database and if it's anything else, including "UMM_JSON", use the map lookup
(ns cmr.metadata-db.data.util "This is a utility namespace for functions useful by two or more implementations as well as other parts of the CMR. Putting them here avoids having to call into an implementation." (:require [cheshire.core :as json] [clojure.set :as set] [clojure.string :as string] [cmr...
bfa8b20bc8fbc011d8a998129e3405c56afb508040886ae4f8c9458b6d892420
mivoq/hunpos
file_statistics.mli
open File_node val get_locs_data : File_node.file_node list -> File_node.file_node list
null
https://raw.githubusercontent.com/mivoq/hunpos/0f0f775039fa749e67711c07ac681a16c0979349/ocaml-cmake/examples/code-analysis/file_statistics.mli
ocaml
open File_node val get_locs_data : File_node.file_node list -> File_node.file_node list
0a526dd824665ac95ee4406df6f5d85300f6cf3fe7697cf576d697e83d431ba7
piotr-yuxuan/choose-a-new-phone
visible_back_stop.cljs
(ns choose-a-new-phone.components.visible-back-stop "Keep ip simple, stupid. This is enough for a simple lazy list." (:require [goog.object :as object] [reagent.core :as reagent])) (defn check-visible-fn "Use thresholds. This implies that `on-visible-threshold` must result in filling the viewport a...
null
https://raw.githubusercontent.com/piotr-yuxuan/choose-a-new-phone/b66affc9383cb0b0515dfb2f10d90f4964c2b869/src/choose_a_new_phone/components/visible_back_stop.cljs
clojure
(ns choose-a-new-phone.components.visible-back-stop "Keep ip simple, stupid. This is enough for a simple lazy list." (:require [goog.object :as object] [reagent.core :as reagent])) (defn check-visible-fn "Use thresholds. This implies that `on-visible-threshold` must result in filling the viewport a...
63bc55b3dbf416d2ab49470d86392a234102b048df0d8435abe3e26e0f559c8c
grin-compiler/ghc-wpc-sample-programs
test-pandoc.hs
# LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -Wall # module Main where import Prelude import GHC.IO.Encoding import Test.Tasty import qualified Tests.Command import qualified Tests.Lua import qualified Tests.Lua.Module import qualified Tests.Old import qualified Tests.Readers.Creole import qualified Tests.Readers.Doc...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/test/test-pandoc.hs
haskell
# LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -Wall # module Main where import Prelude import GHC.IO.Encoding import Test.Tasty import qualified Tests.Command import qualified Tests.Lua import qualified Tests.Lua.Module import qualified Tests.Old import qualified Tests.Readers.Creole import qualified Tests.Readers.Doc...
18dd2ab41225a882dbd9ffb39c03e157e2c17bdcdde0ed299ceb9a06eeccb7d4
tomhanika/conexp-clj
file_exporter.clj
(ns conexp.gui.draw.control.file-exporter (:require [conexp.gui.draw.control.util :refer :all] [conexp.gui.draw.scenes :refer :all] [conexp.gui.util :refer :all] [seesaw.core :refer [listen]] [conexp.gui.draw.scene-layouts :refer :all] [conexp.gui.draw.scene...
null
https://raw.githubusercontent.com/tomhanika/conexp-clj/6ca4c86237ecfa6ef293da61805c09a9d2753868/src/main/clojure/conexp/gui/draw/control/file_exporter.clj
clojure
(ns conexp.gui.draw.control.file-exporter (:require [conexp.gui.draw.control.util :refer :all] [conexp.gui.draw.scenes :refer :all] [conexp.gui.util :refer :all] [seesaw.core :refer [listen]] [conexp.gui.draw.scene-layouts :refer :all] [conexp.gui.draw.scene...
9bf6ebab8ec692d7b1445cffe2663c001b92ecb6a953492de53edcc5cd6c8d8a
tweag/ormolu
type-operators3-out.hs
# LANGUAGE PolyKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE NoStarIsType # class PNum x where type (a :: x) * (b :: x) instance PNum Nat where type a * b = ()
null
https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/class/type-operators3-out.hs
haskell
# LANGUAGE PolyKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE NoStarIsType # class PNum x where type (a :: x) * (b :: x) instance PNum Nat where type a * b = ()
b20ab50a1efe2f12e76060e5bf33e427d57f1ae6186a028a6764300960ed6dbb
khinsen/leibniz
builtins.rkt
#lang racket (provide number-term.sort number-term.builtin-type truth-sorts truth-signature symbol-sorts symbol-signature string-sorts string-signature integer-sorts integer-signature rational-sorts rational-signature IEEE-float-sorts IEEE-float-signature) (requir...
null
https://raw.githubusercontent.com/khinsen/leibniz/881955b4c642114fbdc2f36ecc99582ae2371238/leibniz/builtins.rkt
racket
These are standard operator-argument terms, but they are built in because built-in operations such as equality testing depend on them. The remaining built-in term types are special terms in that they do not follow the operator-arguments structure. These are the standard fundamental data types that most progra...
#lang racket (provide number-term.sort number-term.builtin-type truth-sorts truth-signature symbol-sorts symbol-signature string-sorts string-signature integer-sorts integer-signature rational-sorts rational-signature IEEE-float-sorts IEEE-float-signature) (requir...
d606e3d813a45c96f268a12e35f3af4acb4938c523d57ce74474293e015d315c
heraldry/heraldicon
options.cljs
(ns heraldicon.heraldry.charge-group.options (:require [heraldicon.heraldry.option.position :as position] [heraldicon.interface :as interface] [heraldicon.options :as options])) (def ^:private type-choices [[:string.charge-group.type/rows :heraldry.charge-group.type/rows] [:string.charge-group.type/col...
null
https://raw.githubusercontent.com/heraldry/heraldicon/71126cfd7ba342dea0d1bb849be92cbe5290a6fd/src/heraldicon/heraldry/charge_group/options.cljs
clojure
TODO: this should be added at some point, but there are some issues around corners, so I'll leave it for now
(ns heraldicon.heraldry.charge-group.options (:require [heraldicon.heraldry.option.position :as position] [heraldicon.interface :as interface] [heraldicon.options :as options])) (def ^:private type-choices [[:string.charge-group.type/rows :heraldry.charge-group.type/rows] [:string.charge-group.type/col...
d8629097abff09df8a179f33d7ff9d88bdf57da3234e94834622b2cdba3fa2be
ocaml-gospel/gospel
invariant1.mli
type t = { a : int } @ invariant a > = 0 { gospel_expected| [ 125 ] File " invariant1.mli " , line 1 , characters 0 - 44 : 1 | type t = { a : int } 2 | ( * @ invariant a > = 0 [125] File "invariant1.mli", line 1, characters 0-44: 1 | type t = { a : int } 2 | (*@ invari...
null
https://raw.githubusercontent.com/ocaml-gospel/gospel/79841c510baeb396d9a695ae33b290899188380b/test/negative/invariant1.mli
ocaml
@ invariant a >= 0
type t = { a : int } @ invariant a > = 0 { gospel_expected| [ 125 ] File " invariant1.mli " , line 1 , characters 0 - 44 : 1 | type t = { a : int } 2 | ( * @ invariant a > = 0 [125] File "invariant1.mli", line 1, characters 0-44: 1 | type t = { a : int } Error: Invaria...
fdf450353ca50497721f037eb453bd6697137f1aeb458cb2332b93b085e4a3ad
comby-tools/comby
test_string_literals.ml
open Core open Comby_kernel open Matchers open Test_helpers let all ?(configuration = configuration) (module M : Matchers.Matcher.S) template source = M.all ~configuration ~template ~source () let rewrite_all engine template source rewrite_template = all engine template source |> Rewrite.all ~source ~rewrite_te...
null
https://raw.githubusercontent.com/comby-tools/comby/a36c63fb1e686adaff3e90aed00e88404f8cda78/test/common/test_string_literals.ml
ocaml
this tests special functionality in non-literal hole parser but which must still ignore unbalanced delims within strings
open Core open Comby_kernel open Matchers open Test_helpers let all ?(configuration = configuration) (module M : Matchers.Matcher.S) template source = M.all ~configuration ~template ~source () let rewrite_all engine template source rewrite_template = all engine template source |> Rewrite.all ~source ~rewrite_te...
3b5d52348a7e20374ccb2a63a1ee71891e72dc3e23031d3451c160b988733eec
erikd/vector-algorithms
Radix.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE ScopedTypeVariables # -- --------------------------------------------------------------------------- -- | -- Module : Data.Vector.Algorithms.Radix Copyright : ( c ) 2008 - 2011 Maintainer : < > -- Stability...
null
https://raw.githubusercontent.com/erikd/vector-algorithms/d25f05648ebf419a96755eeba7352df6b7f7dd3f/src/Data/Vector/Algorithms/Radix.hs
haskell
# LANGUAGE BangPatterns # --------------------------------------------------------------------------- | Module : Data.Vector.Algorithms.Radix Stability : Experimental Portability : Non-portable (scoped type variables, bang patterns) This module provides a radix sort for a subclass of unboxed arrays. The ...
# LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE ScopedTypeVariables # Copyright : ( c ) 2008 - 2011 Maintainer : < > constant space overhead of 2*size*sizeOf(Int ) for the sort , so it is not A standard example ( upon which one could base their own Radix instance ) is : * We ch...
45a9f33c0a69a3bfec50f8b3b958c29cd36908e2865dd2d70ea93cd82b491c3a
kupl/LearnML
original.ml
let rec iter ((n : int), (f : int -> int)) x : int = if n = 0 then 0 else f (iter (n - 1, f) x)
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/iter/sub17/original.ml
ocaml
let rec iter ((n : int), (f : int -> int)) x : int = if n = 0 then 0 else f (iter (n - 1, f) x)
529d05be468863669b47c8579f37f05557d26cfd2c313e03442c82f15ff352a2
robstewart57/hdph-rs
mandel.hs
A set creation in -- Author : Date : 10th July 2013 -- Adapted from monad-par implementation -- monad-par paper: -us/um/people/simonpj/papers/parallel/monad-par.pdf -- monad-par implemenation: -par/master/examples/src/mandel.hs -- Note : is a case study Section 4 of " Visualizing Parallel Funct...
null
https://raw.githubusercontent.com/robstewart57/hdph-rs/5074e7de02ec13707361b1c117fa25c8a796b59e/src/Test/HdpH/mandel.hs
haskell
Adapted from monad-par implementation monad-par paper: -us/um/people/simonpj/papers/parallel/monad-par.pdf monad-par implemenation: -par/master/examples/src/mandel.hs -marburg.de/~eden/paper/ParCo07EdenTV.pdf --------------------------------------------------------------------------- # LANGUAGE BangPatt...
A set creation in Author : Date : 10th July 2013 Note : is a case study Section 4 of " Visualizing Parallel Functional Program Runs - Case Studies with the Eden Trace Viewer " by and # LANGUAGE FlexibleInstances # # LANGUAGE TemplateHaskell # # LANGUAGE DeriveGeneric # module Main whe...
04a97dfea2d2f366a0117cb4741b07f23339ee93dec067bce4b386b45ae26040
facebook/pyre-check
fixpoint.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/pyre-check/da40c240d7d8a54a77436a22eafde94b6acd78a7/source/analysis/fixpoint.ml
ocaml
At this point, we know we have a local fixpoint. * Since operators are monotonic, `new_head_precondition` is also * a post fixpoint. This is basically the argument for performing * decreasing iteration sequence with a narrowing operator. * Therefore, `new_hea...
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
488d146995e027995b3bc28827599de9b7bc917dbedca3609d43ad0e48a04954
bjorng/esdl
testjoy.erl
Copyright ( c ) 2001 %% See the file "license.terms" for information on usage and redistribution %% of this file, and for a DISCLAIMER OF ALL WARRANTIES. %%%---------------------------------------------------------------------- %%% File : testjoy.erl %%% Author : <> %%% Purpose : Test joystick handling C...
null
https://raw.githubusercontent.com/bjorng/esdl/dbd8ce9228aa36828091df2e8706c364094a3e22/test/testjoy.erl
erlang
See the file "license.terms" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. ---------------------------------------------------------------------- File : testjoy.erl Author : <> Purpose : Test joystick handling ---------------------------------------------...
Copyright ( c ) 2001 Created : 20 Apr 2001 by < > -module(testjoy). -author(''). -compile(export_all). -include_lib("wx/include/gl.hrl"). -include("sdl.hrl"). -include("sdl_video.hrl"). -include("sdl_keyboard.hrl"). -include("sdl_events.hrl"). -include("sdl_joystick.hrl"). 1 2 {-10.0, -10.0, -10.0}, 4...
fbec36c4f7fa016cb7875dbf3cedb6d387eba1f2bf303ea46bc981c62348bb3c
dyoo/whalesong
test-helpers.rkt
#lang racket/base (require (prefix-in racket: racket/base) racket/runtime-path "../compiler/compiler-structs.rkt" "../compiler/compiler.rkt" "../parser/parse-bytecode.rkt" "../get-module-bytecode.rkt" "../language-namespace.rkt") (provide parse parse-module run-...
null
https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/tests/test-helpers.rkt
racket
Use Racket's compiler, and then parse the resulting bytecode to our own AST structures. 'racket/base)] We want to disable some optimizations for the moment. See: -lang.org/drracket/module.html
#lang racket/base (require (prefix-in racket: racket/base) racket/runtime-path "../compiler/compiler-structs.rkt" "../compiler/compiler.rkt" "../parser/parse-bytecode.rkt" "../get-module-bytecode.rkt" "../language-namespace.rkt") (provide parse parse-module run-...
74dde1642c16dd25fc9782607e842b23a5bb3293b9d55f7550a5a3aa148ea1a2
opencog/opencog
pln-reasoner.scm
;; Background PLN reasoning ;; Very simplistic and hacky at the moment , loop of 2 rules ;; 1 . Preprocessing to turn r2l outputs into something that PLN can reason on ;; 2 . Limited induction reasoning ;; The reasoner does n't use the URE . Instead if merely applies the 2 ;; rules one after the other in a loop...
null
https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/opencog/ghost/procedures/pln-reasoner.scm
scheme
Background PLN reasoning rules one after the other in a loop. have time to diggest them. guile -l main.scm ; positive sentence , also helps to generate answer ;; positive sentences ;; negative sentences ; Statement about ;; Question about happiness. Answer should be: crazy people are happy Since ...
Very simplistic and hacky at the moment , loop of 2 rules 1 . Preprocessing to turn r2l outputs into something that PLN can reason on 2 . Limited induction reasoning The reasoner does n't use the URE . Instead if merely applies the 2 You may test it as following ( wait for a couple seconds between each comm...
0e91c12e7928c7e2bfd9385aa18489f7fbf2d49919afa58057f351d31cab013e
unnohideyuki/bunny
sample259.hs
main = print $ splitAt 5 [1..10]
null
https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample259.hs
haskell
main = print $ splitAt 5 [1..10]
cb4a28dd1df94f05c486419b14ab4024009ac7fbc2a95391a7791b20529fef84
esl/MongooseIM
mongoose_metrics_probe_muc_online_rooms.erl
%%============================================================================== Copyright 2019 Erlang Solutions Ltd. %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% ...
null
https://raw.githubusercontent.com/esl/MongooseIM/212126c18cda3c05af95fb845fc2d6925bac06bc/src/metrics/mongoose_metrics_probe_muc_online_rooms.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 ex...
Copyright 2019 Erlang Solutions Ltd. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(mongoose_metrics_probe_muc_online_rooms). -behaviour(mongoose_metrics_probe). -export([sample/0, datapoints/0]). datapoints() ->...
1165ecd7dcff3118a67b94908c1af0cd268aca6fdb5e97ae5b7247e071706a30
crategus/cl-cffi-gtk
gobject.gobject-class.lisp
;;; ---------------------------------------------------------------------------- ;;; gobject.gobject-class.lisp ;;; This file contains code from a fork of cl - gtk2 . ;;; See -lisp.net/project/cl-gtk2/ ;;; Copyright ( C ) 2009 - 2011 Copyright ( C ) 2011 - 2014 ;;; ;;; This program is free software: you can r...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/7f5a09f78d8004a71efa82794265f2587fff98ab/gobject/gobject.gobject-class.lisp
lisp
---------------------------------------------------------------------------- gobject.gobject-class.lisp See -lisp.net/project/cl-gtk2/ This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License for Lisp License, or (at your option) any later...
This file contains code from a fork of cl - gtk2 . Copyright ( C ) 2009 - 2011 Copyright ( C ) 2011 - 2014 as published by the Free Software Foundation , either version 3 of the the GNU Lesser General Public License that clarifies the terms for use GNU Lesser General Public License for more details . ...
310a605fe6fbab39c562e3b8ce419db56a8881bfa34c61ff348a2ed8fc741e29
typelead/etlas
Run.hs
----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Run -- Maintainer : -- Portability : portable -- -- Implementation of the 'run' command. ----------------------------------------------------------------------------- {-# LANGUAGE MultiWayIf #-} ...
null
https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas/Distribution/Client/Run.hs
haskell
--------------------------------------------------------------------------- | Module : Distribution.Client.Run Maintainer : Portability : portable Implementation of the 'run' command. --------------------------------------------------------------------------- # LANGUAGE MultiWayIf # | Return the execut...
module Distribution.Client.Run ( run, splitRunArgs ) where import Prelude () import Data.List import Distribution.Client.Compat.Prelude import Distribution.Types.TargetInfo (targetCLBI) import Distribution.Types.LocalBuildInfo (componentNameTargets') import Distribution.Client.Utils (tryCanon...
5eee7d8fc9e5bf6b976d9a50467f5c83bcd68fd353be72848ca1d1b2c14ce496
bergsans/glossy-haskell-game
Main.hs
# LANGUAGE UnicodeSyntax # module Main where import Graphics.Gloss import Graphics.Gloss.Interface.Pure.Game data MoveDirection = East | West | None deriving (Eq) data Heading = FacingWest | FacingEast deriving (Eq) data GameState = GameState { position :: Point , direction :: MoveDirectio...
null
https://raw.githubusercontent.com/bergsans/glossy-haskell-game/97a85cb54f575b2af91db3f9a07cd765854945cb/app/Main.hs
haskell
# LANGUAGE UnicodeSyntax # module Main where import Graphics.Gloss import Graphics.Gloss.Interface.Pure.Game data MoveDirection = East | West | None deriving (Eq) data Heading = FacingWest | FacingEast deriving (Eq) data GameState = GameState { position :: Point , direction :: MoveDirectio...
6934b3d835eba39be2a91981e2f628c865bd409a60a21ba972e81484a801c13d
namin/lambdajam
sugar.scm
(define-syntax while (syntax-rules () ((_ c b r) (let loop () (if c (begin b (loop)) r))))) (define (show x) (display x) (newline))
null
https://raw.githubusercontent.com/namin/lambdajam/58824eeccc15b11f09a02db5a3e3660fbdfe9c3d/sugar.scm
scheme
(define-syntax while (syntax-rules () ((_ c b r) (let loop () (if c (begin b (loop)) r))))) (define (show x) (display x) (newline))
e62fb34d80b775c5796466366e4764f8211ffd375277f616e9507f32fdfd88b9
CUTE-Lang/miniCUTE
LLVMTest.hs
HLINT ignore " Redundant do " HLINT ignore " Reduce duplication " # OPTIONS_GHC -fno - warn - name - shadowing # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # -- | Copyright : ( c ) 2018 - present -- License: BSD 3-Clause module Minicute.Transpilers.LLVMTest ( spec_generateMachineCode ) where...
null
https://raw.githubusercontent.com/CUTE-Lang/miniCUTE/b6c8a48b10e2af0786a50175d57b5339be7be2de/main-packages/llvm-generator/test/Minicute/Transpilers/LLVMTest.hs
haskell
# LANGUAGE OverloadedStrings # | License: BSD 3-Clause | UpdateAsInteger 0 Return Return Eval Pop 1 Unwind Copy 0 Eval Pop 2 Unwind MakeInteger 0 Eval Pop 1 Unwind
HLINT ignore " Redundant do " HLINT ignore " Reduce duplication " # OPTIONS_GHC -fno - warn - name - shadowing # # LANGUAGE QuasiQuotes # Copyright : ( c ) 2018 - present module Minicute.Transpilers.LLVMTest ( spec_generateMachineCode ) where import Test.Tasty.Hspec import Control.Monad import Data.Tuple...
9dd7692e32e291116f1256129091662a6b051174ae8d7611007ac48a372b234f
dybber/fcl
ArrayLib.hs
# LANGUAGE FlexibleContexts , AllowAmbiguousTypes # -- Simple array library using delay-arrays for FCL-interpreter module FCL.Eval.ArrayLib (FCLArray, sizeOf, indices, fromList, toList, fromFunction, index, mapA, foldlA, scanlA, reduceA, joinA, splitA, materializeM ) where data FCLArray a = FCLArray { ...
null
https://raw.githubusercontent.com/dybber/fcl/e794a4b9d3ab6207fbe89fcddaafe97ae0d379dd/src/FCL/Eval/ArrayLib.hs
haskell
Simple array library using delay-arrays for FCL-interpreter Not very elegant, nor efficient.
# LANGUAGE FlexibleContexts , AllowAmbiguousTypes # module FCL.Eval.ArrayLib (FCLArray, sizeOf, indices, fromList, toList, fromFunction, index, mapA, foldlA, scanlA, reduceA, joinA, splitA, materializeM ) where data FCLArray a = FCLArray { len :: Int , idx :: Int -> a ...
d5f04b5fe7374a92b7a513b0ed9a70aeb97db90bd852839fb5476ab4d79b0f34
graphqlize/graphqlize
arg.clj
(ns graphqlize.lacinia.arg (:require [honeyeql.meta-data :as heql-md] [graphqlize.lacinia.type :as l-type])) (defn- primary-key-attrs->args [heql-meta-data primary-key-attrs] (reduce (fn [args attr-ident] (let [attr-meta-data (heql-md/attr-meta-data heql-meta-data attr-ident) ...
null
https://raw.githubusercontent.com/graphqlize/graphqlize/d82ca3b169331ae9b1dcd256281e9f35b8361e17/src/graphqlize/lacinia/arg.clj
clojure
(ns graphqlize.lacinia.arg (:require [honeyeql.meta-data :as heql-md] [graphqlize.lacinia.type :as l-type])) (defn- primary-key-attrs->args [heql-meta-data primary-key-attrs] (reduce (fn [args attr-ident] (let [attr-meta-data (heql-md/attr-meta-data heql-meta-data attr-ident) ...
4b2b98841a89e7a6297f2005f3625e4445e9b7c51fef096d76918666317eeba9
takikawa/drracket-vim-tool
info.rkt
#lang setup/infotab (define drracket-tools '(("tool.rkt"))) (define drracket-tool-names (list "Vim Emulation")) (define drracket-tool-icons '(#f)) (define blurb '("Vim-style editing for DrRacket")) (define categories '(devtools)) (define primary-file "tool.rkt") (define deps '("base" "gui-lib" "data-lib" "drracket-p...
null
https://raw.githubusercontent.com/takikawa/drracket-vim-tool/c347e8f8dcb0d89efd44755587b108e1f420912a/info.rkt
racket
#lang setup/infotab (define drracket-tools '(("tool.rkt"))) (define drracket-tool-names (list "Vim Emulation")) (define drracket-tool-icons '(#f)) (define blurb '("Vim-style editing for DrRacket")) (define categories '(devtools)) (define primary-file "tool.rkt") (define deps '("base" "gui-lib" "data-lib" "drracket-p...
49f4c59f759821747d229f764832952a0d919f9ef709e218685bf41ce357f84a
rabbitmq/rabbitmq-web-mqtt
config_schema_SUITE.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . %% -module(config_schema_SUITE). -compile(export_al...
null
https://raw.githubusercontent.com/rabbitmq/rabbitmq-web-mqtt/4a338fd10a2b2f317999f61c4c767ae097ff84a3/test/config_schema_SUITE.erl
erlang
------------------------------------------------------------------- Testsuite setup/teardown. ------------------------------------------------------------------- ------------------------------------------------------------------- Testcases. -------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . -module(config_schema_SUITE). -compile(export_all). a...
c2b5d966ca76c96e8781ff0d99a1d83395bfcc53c3dc0786ba0ba15e4b0b4c22
pirapira/coq2rust
declarations.mli
open Names open Cic val force_constr : constr_substituted -> constr val force_lazy_constr_univs : Cic.constant_def -> Univ.constraints val from_val : constr -> constr_substituted val indirect_opaque_access : (DirPath.t -> int -> constr) ref val indirect_opaque_univ_access : (DirPath.t -> int -> Univ.constraints) ref ...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/checker/declarations.mli
ocaml
* Constant_body Modules Substitutions
open Names open Cic val force_constr : constr_substituted -> constr val force_lazy_constr_univs : Cic.constant_def -> Univ.constraints val from_val : constr -> constr_substituted val indirect_opaque_access : (DirPath.t -> int -> constr) ref val indirect_opaque_univ_access : (DirPath.t -> int -> Univ.constraints) ref ...
c7df869a4da8b8ba62f82a0f8f9d3a5db45229e45ab32a79a85deb026f4ec2b0
jacobobryant/platypub
middleware.clj
(ns com.platypub.middleware (:require [clojure.set :as set] [com.platypub.ui :as ui] [com.platypub.util :as util] [xtdb.api :as xt])) (defn ensure-owner [user doc] (when (some #(= (:xt/id user) (get doc %)) [:item/user :list/user :site/user :image/user]) doc)) (defn wrap-si...
null
https://raw.githubusercontent.com/jacobobryant/platypub/fc7537ad4e194dee74fcf33f8d1ad8030d4e9e6f/src/com/platypub/middleware.clj
clojure
(ns com.platypub.middleware (:require [clojure.set :as set] [com.platypub.ui :as ui] [com.platypub.util :as util] [xtdb.api :as xt])) (defn ensure-owner [user doc] (when (some #(= (:xt/id user) (get doc %)) [:item/user :list/user :site/user :image/user]) doc)) (defn wrap-si...
cf0ac6d6d5be8d43ccc09c1d7155f664a1fd42829b82f7894c938a290b2a76a7
tek/ribosome
Command.hs
{-# options_haddock prune #-} -- |Compute the command options and arguments based on handler function parameters. module Ribosome.Host.Handler.Command where import Type.Errors.Pretty (type (%), type (<>)) import Ribosome.Host.Data.Args (ArgList, Args, JsonArgs, Options) import Ribosome.Host.Data.Bang (Bang) import R...
null
https://raw.githubusercontent.com/tek/ribosome/f801aca3a7ff9a178e05a03d7874a06e88f4ac2b/packages/host/lib/Ribosome/Host/Handler/Command.hs
haskell
# options_haddock prune # |Compute the command options and arguments based on handler function parameters. |Represents the value for the command option @-nargs@. |@-nargs=0@ |@-nargs=*@ |@-nargs=+@ |Determines how different special command handler parameter types may interact. |Are special option parameters allo...
module Ribosome.Host.Handler.Command where import Type.Errors.Pretty (type (%), type (<>)) import Ribosome.Host.Data.Args (ArgList, Args, JsonArgs, Options) import Ribosome.Host.Data.Bang (Bang) import Ribosome.Host.Data.Bar (Bar) import Ribosome.Host.Data.CommandMods (CommandMods) import Ribosome.Host.Data.CommandR...
c453cf6a6af2091129b45b8c41e592eab8ab5e00cb03a109a17ec148ffb7d5c8
ghc/nofib
TExpr2DExpr.hs
-- ==========================================================-- -- === Turn type expressions into domain expressions. ===-- -- === TExpr2DExpr.hs ===-- -- ==========================================================-- module TExpr2DExpr where import BaseDefs import Utils import M...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/real/anna/TExpr2DExpr.hs
haskell
==========================================================-- === Turn type expressions into domain expressions. ===-- === TExpr2DExpr.hs ===-- ==========================================================-- ==========================================================-- This may ...
module TExpr2DExpr where import BaseDefs import Utils import MyUtils import DomainExpr import MakeDomains import TypeCheck5 1.3 4 Feb : solved the above problem by replacing the offending domain variables with 2 . 5 Feb : fixed to curry domains properly , if necessary . txGetInstantiations :: DExpr -...
f054a9a0c23b9ea618dcc4b84dba28c41ee87abf79892b54a7c7ccc9a43ed110
namin/staged-miniKanren
full-interp.scm
The definition of ' letrec ' is based based on code , using the " half - closure " approach from 's definitional ;; interpreters. (define (evalo expr val) (eval-expo expr initial-env val)) (define (eval-expo expr env val) (conde ((== `(quote ,val) expr) (absento 'closure val) (absento 'prim ...
null
https://raw.githubusercontent.com/namin/staged-miniKanren/f5b665170000720f5d499ab03f31b5c55871ec4f/full-interp.scm
scheme
interpreters. Multi-argument variadic Multi-argument Multiple argument need to make sure lambdas are well formed. grammar constraints would be useful here!!!
The definition of ' letrec ' is based based on code , using the " half - closure " approach from 's definitional (define (evalo expr val) (eval-expo expr initial-env val)) (define (eval-expo expr env val) (conde ((== `(quote ,val) expr) (absento 'closure val) (absento 'prim val) (not-in...
8467ede123fb3a3486ae64d33e07d81c66befdad7dbb911e869da8ee35201664
weavejester/environ
core_test.cljc
(ns environ.core-test (:require #?(:clj [clojure.java.io :as io]) #?(:cljs [goog.object :as obj]) [clojure.test :refer [deftest is testing]] [environ.core :as environ])) #?(:cljs (def nodejs? (exists? js/require))) #?(:cljs (def fs (when nodejs? (js/require "fs")))) #?(:cljs (def ...
null
https://raw.githubusercontent.com/weavejester/environ/bd355e6422399703c46abe7c890b54685632ae10/environ/test/environ/core_test.cljc
clojure
(ns environ.core-test (:require #?(:clj [clojure.java.io :as io]) #?(:cljs [goog.object :as obj]) [clojure.test :refer [deftest is testing]] [environ.core :as environ])) #?(:cljs (def nodejs? (exists? js/require))) #?(:cljs (def fs (when nodejs? (js/require "fs")))) #?(:cljs (def ...
b8beea785768fb1ab24cc17c2aee72ef3701408e93823235266d03584db74b37
sboehler/beans
LedgerStep.hs
module Beans.LedgerStep ( LedgerStep (LS), new, add, insert, valuate, ) where import Beans.Assertion (Assertion) import Beans.Close (Close) import Beans.Command (Command (..)) import Beans.Date (Date) import Beans.Open (Open) import Beans.Price (Price) import Beans.Prices (NormalizedPrices) import ...
null
https://raw.githubusercontent.com/sboehler/beans/897fc30a602f49906eb952c4fd5c8c0bf05a6beb/src/Beans/LedgerStep.hs
haskell
module Beans.LedgerStep ( LedgerStep (LS), new, add, insert, valuate, ) where import Beans.Assertion (Assertion) import Beans.Close (Close) import Beans.Command (Command (..)) import Beans.Date (Date) import Beans.Open (Open) import Beans.Price (Price) import Beans.Prices (NormalizedPrices) import ...
217816ad9c023afd33620aebd36f08163e6cfadc20ab0417ea018bc3faa6ef7c
emina/rosette
infeasible.rkt
#lang rosette (define-symbolic b boolean?) (if b (if (! b) (1) 2) 3)
null
https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/test/trace/code/infeasible.rkt
racket
#lang rosette (define-symbolic b boolean?) (if b (if (! b) (1) 2) 3)
60a3a9fd28e36e179cc53b19f824f661aebad6519c26b6660a9fd541f11658b3
techascent/tech.ml.dataset
categorical.clj
(ns tech.v3.dataset.categorical "Conversions of categorical values into numbers and back. Two forms of conversions are supported, a straight value->integer map and one-hot encoding. The functions in this namespace manipulate the metadata on the columns of the dataset, wich can be inspected via `clojure.core/me...
null
https://raw.githubusercontent.com/techascent/tech.ml.dataset/c12b5fc850159e514f37e1486930a5544c36d6ef/src/tech/v3/dataset/categorical.clj
clojure
This file uses categorical-map loosely. Really they are lookup tables from categorical object value to integer. Finally, auto-generate values for anything not mapped yet. just to be sure
(ns tech.v3.dataset.categorical "Conversions of categorical values into numbers and back. Two forms of conversions are supported, a straight value->integer map and one-hot encoding. The functions in this namespace manipulate the metadata on the columns of the dataset, wich can be inspected via `clojure.core/me...
17ffd912de522e37d82865531b156ee9e92c4ff0e35b8681d421fc8e4c84f0eb
dariusf/ppx_polyprint
PPEnv.ml
(** Information passed across traversals *) (** Configuration module path provided for each function name *) module NameConfigMap = Map.Make(String) let configuration_modules = ref (NameConfigMap.empty : string list NameConfigMap.t) (** The default module to use if not explicitly given *) let specified_default_modul...
null
https://raw.githubusercontent.com/dariusf/ppx_polyprint/6cd87e948a27888d251f851424ad8bd5545989ad/src/PPEnv.ml
ocaml
* Information passed across traversals * Configuration module path provided for each function name * The default module to use if not explicitly given
module NameConfigMap = Map.Make(String) let configuration_modules = ref (NameConfigMap.empty : string list NameConfigMap.t) let specified_default_module = ref (None : string list option) let debug_mode = ref false let check_debug_mode () = try ignore @@ Sys.getenv "POLYPRINT_DEBUG"; debug_mode := true ...
47e5419b74d7eb6712d86e44748e9b01800280d3076c5ae60174998ad13f10c0
PseudoPower/AFSM
Core.hs
----------------------------------------------------------------------------- -- | -- Module : Data.AFSM.SFM.Core Copyright : ( c ) , 2016 , License : MIT License -- -- Maintainer : -- Stability : experimental -- Portability : portable ---------------------------------------------------...
null
https://raw.githubusercontent.com/PseudoPower/AFSM/9d6ace9d279992a18f44856058040a0ef391abd6/src/Data/AFSM/SFM/Core.hs
haskell
--------------------------------------------------------------------------- | Module : Data.AFSM.SFM.Core Maintainer : Stability : experimental Portability : portable --------------------------------------------------------------------------- Category ArrowApply ArrowLoop
Copyright : ( c ) , 2016 , License : MIT License { - # LANGUAGE ExistentialQuantification # - } # LANGUAGE RecursiveDo # module Data.AFSM.SFM.Core where import Control.Category import Control.Arrow import Control.Monad import Control.Monad.Fix import Data.AFSM.SFM.CoreType instance Monad m...
6cef8cf908fdbfe3ae445526e1c670eb8f5e77772764e5aa9e2dbaa5a2cc7087
singnet/snet-minting-policy
Main.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # {-# LANGUAGE RankNTypes #-} # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Main(main) where import Control.Monad (void) import Control.Mona...
null
https://raw.githubusercontent.com/singnet/snet-minting-policy/1eb6ce64d408318e715d809cbe2e32a302aaabeb/pab/Main.hs
haskell
# LANGUAGE RankNTypes # import Registry import RegistryV2 Example of spinning up a game instance on startup void $ Simulator.activateContract (Wallet 1) GameContract You can add simulator actions here: etc. That way, the simulation gets to a predefined state and you don't have to use the HTTP API for setup. Sp...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Main(main) where import Control.Monad (void) import Control.Monad.Freer (interpret) import C...
b797049fdb5f04263b14948b89ddcf98379ca2c885add780ed32e1fe79ffa114
dradtke/Lisp-Text-Editor
gobject.stable-pointer.lisp
(in-package :gobject) (defvar *registered-stable-pointers* (make-array 0 :adjustable t :fill-pointer t)) (defun allocate-stable-pointer (thing) "Allocates the stable pointer for @code{thing}. Stable pointer is an integer that can be dereferenced with @fun{get-stable-pointer-value} and freed with @fun{free-stable-po...
null
https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/cl-gtk2/glib/gobject.stable-pointer.lisp
lisp
(in-package :gobject) (defvar *registered-stable-pointers* (make-array 0 :adjustable t :fill-pointer t)) (defun allocate-stable-pointer (thing) "Allocates the stable pointer for @code{thing}. Stable pointer is an integer that can be dereferenced with @fun{get-stable-pointer-value} and freed with @fun{free-stable-po...
1ee0faeabe11bb462f07baa18f4f1db65d6c07301c72835977e56f7f000ab270
TrustInSoft/tis-kernel
defs.mli
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/scope/defs.mli
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of Frama - C. Copyright ( C ) 2007 - 2015 ...
9195644e09df7e90bd81d3371cbff8c4a99a39f1ce983bd132ccef442cdf6c73
exercism/scheme
example.scm
(import (rnrs)) (define (transpose xs) (if (null? xs) '() (apply map list xs)))
null
https://raw.githubusercontent.com/exercism/scheme/aa880e6222a393fcf5d672decb5c5dd6fae286ff/exercises/practice/transpose/.meta/example.scm
scheme
(import (rnrs)) (define (transpose xs) (if (null? xs) '() (apply map list xs)))
806dc7f0108b20ec48767ba4cd499f6106f3a0e0b8135c3f1e71428dc421c34c
raviksharma/bartosz-basics-of-haskell
evaluate6.hs
import Data.Char import qualified Data.Map as M import Control.Applicative import Control.Monad (liftM, ap) data Operator = Plus | Minus | Times | Div deriving (Show, Eq) data Token = TokOp Operator | TokAssign | TokLParen | TokRParen | TokIdent String | Tok...
null
https://raw.githubusercontent.com/raviksharma/bartosz-basics-of-haskell/86d40d831f61415ef0022bff7fe7060ae6a23701/evaluate6.hs
haskell
-- parser ---- show /show -- evaluator ---- show /show
import Data.Char import qualified Data.Map as M import Control.Applicative import Control.Monad (liftM, ap) data Operator = Plus | Minus | Times | Div deriving (Show, Eq) data Token = TokOp Operator | TokAssign | TokLParen | TokRParen | TokIdent String | Tok...
5ef31f1d097466e51c77d6b0d8157473705aad0101a4c618fe458b513a584623
IndianRoboticsOrganization/ArimaTTS
INST_es_VOX_f0model.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Carnegie Mellon University ; ; ; and and ; ; ; Copyright ( c ) 1998 - 2000 ...
null
https://raw.githubusercontent.com/IndianRoboticsOrganization/ArimaTTS/7377dca466306e2e6b90a063427273142cd50616/festvox/src/vox_files/es/INST_es_VOX_f0model.scm
scheme
;;; ; ; ; ; ; ; ; ; ;;; Permission is hereby granted, free of charge, to use and distribute ;;; this software and its documentation without restriction, including ;;; withou...
(set! cmu_us_afl_txt1_int_lr_params '( (model_f0_mean 170) (model_f0_std 34))) (define (INST_es_VOX_targ_func1 utt syl) "(INST_es_VOX_targ_func1 utt syl) Simple hat accents." (let ((start (item.feat syl 'syllable_start)) (end (item.feat syl 'syllable_end)) (ulen (item.feat (utt.relation.la...
ead466b28c753ee9374dde488f39c01fbb193ea0fdf07306f7ea8d7f6843e8ea
racket/draw
callback.rkt
#lang racket/base (require ffi/unsafe racket/port) (provide callback-atomic? sanitize-input-port sanitize-output-port flush-sanitized-output) The Racket BC can handle concurrent callbacks in different Racket ;; threads, because it copies the C stack in and out to implement ;; th...
null
https://raw.githubusercontent.com/racket/draw/a6558bdc18438e784c23d452ffd877dac867a7fd/draw-lib/racket/draw/unsafe/callback.rkt
racket
threads, because it copies the C stack in and out to implement threads. The Racket CS cannot do that, so callbacks have to be atomic. At the same time, we need some atomic callbacks to be able to escape with an exception. Atomicity implies that a callback cannot read from or write to an arbitrary port, so we have...
#lang racket/base (require ffi/unsafe racket/port) (provide callback-atomic? sanitize-input-port sanitize-output-port flush-sanitized-output) The Racket BC can handle concurrent callbacks in different Racket (define callback-atomic? (eq? 'chez-scheme (system-type 'vm))) (defi...
c729f2ef852155e4c8f287bc0616f5377e69b8f69bc9aefab07cd8f244d0f1fb
danidiaz/streamy
Bytes.hs
# LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE RankNTypes #-} module Streamy.Pipes.Bytes ( SingleByte , Bytes , ByteStream , ByteIndex , Streamy.Pipes.Bytes.empty , Streamy.Pipes.Bytes.singleton , Streamy.Pipes.Bytes.pack , Streamy.Pipes.Bytes.u...
null
https://raw.githubusercontent.com/danidiaz/streamy/2d167569f3a3ea82eeb1b664d444a5c637618859/streamy-pipes/lib/Streamy/Pipes/Bytes.hs
haskell
# LANGUAGE RankNTypes #
# LANGUAGE GeneralizedNewtypeDeriving # module Streamy.Pipes.Bytes ( SingleByte , Bytes , ByteStream , ByteIndex , Streamy.Pipes.Bytes.empty , Streamy.Pipes.Bytes.singleton , Streamy.Pipes.Bytes.pack , Streamy.Pipes.Bytes.unpack , Streamy.Pip...
e7e15f35c7da42a05ef038a6f1d8326f7e808f527cbb2bb1bf648d0c994e4933
SKS-Keyserver/sks-keyserver
nbMsgContainer.ml
(***********************************************************************) nbMsgContainer.ml - message wrapper that allows for non - blocking (* reads. Warning: this should be used only with *) one channel , since it keeps track of the last (* size...
null
https://raw.githubusercontent.com/SKS-Keyserver/sks-keyserver/a4e5267d817cddbdfee13d07a7fb38a9b94b3eee/nbMsgContainer.ml
ocaml
********************************************************************* reads. Warning: this should be used only with size read. ...
nbMsgContainer.ml - message wrapper that allows for non - blocking one channel , since it keeps track of the last Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 , 2011 , 2012 , 2013 and Contributors This file is part of SKS . ...
b19b596ad0afff8b69245f056b0a7caccaf6fa0024a44e8bf5d17572735cc0ec
huangz1990/real-world-haskell-cn
isInAny4.hs
-- file: ch04/isInAny4.hs import Data.List (isInfixOf) isInAny4 needle haystack = any (needle `isInfixOf`) haystack
null
https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch04/isInAny4.hs
haskell
file: ch04/isInAny4.hs
import Data.List (isInfixOf) isInAny4 needle haystack = any (needle `isInfixOf`) haystack
7b44cab0f4f0554d01f3289b77d3e374fe82f33069888751419329f8acc1caf3
mzp/coq-ruby
coqide.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/ide/coqide.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 **********************************************************************
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : coqide.mli 6621 2...
b16a6b45b702dba077cb4bb96f8a7abe68a8b3614e410da27cd1161acd6f4279
xh4/web-toolkit
condition.lisp
(in-package :json) (define-condition json-syntax-error (simple-error stream-error) ((stream-file-position :reader stream-error-stream-file-position :initarg :stream-file-position)) (:report (lambda (condition stream) (format stream "~? [in ~S~@[ at position ~D~]]" (sim...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/json/condition.lisp
lisp
(in-package :json) (define-condition json-syntax-error (simple-error stream-error) ((stream-file-position :reader stream-error-stream-file-position :initarg :stream-file-position)) (:report (lambda (condition stream) (format stream "~? [in ~S~@[ at position ~D~]]" (sim...
f5f8cfd1038284bab09bf8472070de5b32cd062bc1414f7b40e1707847de315a
penpot/penpot
file_uploader.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.main.ui.components.file-uploader (:require [app.main.store :as st] [app.util.dom :as dom] [...
null
https://raw.githubusercontent.com/penpot/penpot/ac7cb3c8c735106efedc8352dcafc631fd922102/frontend/src/app/main/ui/components/file_uploader.cljs
clojure
Copyright (c) KALEIDOS INC
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.main.ui.components.file-uploader (:require [app.main.store :as st] [app.util.dom :as dom] [rumext.v2 :as mf])) (mf/defc fil...
ea5b59d3d42e936821af523f1e16040a592cb1e5ba99887b86237331691056d0
idream-build/idream
Add.hs
module Idream.Command.Add ( addImpl , PackageDirAlreadyExistsErr (..) , PackageNameAlreadyExistsErr (..) ) where import qualified Data.Text as T import Idream.Command.Common (readProjFile, resolveProj) import Idream.Effects.FileSystem (fsCreateDir, fsDoesDirectoryExist, fsWriteFile) import Idream.Effects.Serde...
null
https://raw.githubusercontent.com/idream-build/idream/61af6ef68abe6d4f9b67c10f1a3efde9bd93827b/src/Idream/Command/Add.hs
haskell
| Creates a new project template.
module Idream.Command.Add ( addImpl , PackageDirAlreadyExistsErr (..) , PackageNameAlreadyExistsErr (..) ) where import qualified Data.Text as T import Idream.Command.Common (readProjFile, resolveProj) import Idream.Effects.FileSystem (fsCreateDir, fsDoesDirectoryExist, fsWriteFile) import Idream.Effects.Serde...
6663bf7f1399587f5c8e1fee80909fc4563e5bf39c1593161f7aa5d50ec86ba0
angavrilov/ecl-compute
compute-macros.lisp
;;; -*- mode:lisp; indent-tabs-mode: nil; -*- (in-package fast-compute) (defvar *compute-with-cuda* t) (defmacro error-fallback (message fallback &body code) "Args: (message fallback &body code)" `(block handle (handler-bind ((condition #'(lambda (cond) (format t ,message c...
null
https://raw.githubusercontent.com/angavrilov/ecl-compute/466f0d287f8b6ab0e2b5c2ac03693ad4f4df6a3f/compute-macros.lisp
lisp
-*- mode:lisp; indent-tabs-mode: nil; -*-
(in-package fast-compute) (defvar *compute-with-cuda* t) (defmacro error-fallback (message fallback &body code) "Args: (message fallback &body code)" `(block handle (handler-bind ((condition #'(lambda (cond) (format t ,message cond) (return-from han...
b6907d06cde008237a3dcf28be3d73ead1247f6d938a476a6e7b29b9edc103dc
input-output-hk/project-icarus-importer
Util.hs
-- | Slotting functions. module Pos.Core.Slotting.Util ( flattenSlotId , flattenSlotIdExplicit , flattenEpochIndex , flattenEpochOrSlot , unflattenSlotId , unflattenSlotIdExplicit , diffEpochOrSlot , flatSlotId , crucialSlot , unsafeMkLocalSlotIndex...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/core/src/Pos/Core/Slotting/Util.hs
haskell
| Slotting functions. | Flatten 'SlotId' (which is basically pair of integers) into a single number. | Transforms some 'HasEpochOrSlot' to a single number. modulus. that epoch. If the difference is negative, the result will be 'Nothing'. are stable. | Shift slot index by given amount, and return 'Nothing' if i...
module Pos.Core.Slotting.Util ( flattenSlotId , flattenSlotIdExplicit , flattenEpochIndex , flattenEpochOrSlot , unflattenSlotId , unflattenSlotIdExplicit , diffEpochOrSlot , flatSlotId , crucialSlot , unsafeMkLocalSlotIndexExplicit , unsafeM...
6065ea475485b5b408065100c1de21f03141ce1c1889eb8fee0cc2ddf42b780f
LambdaHack/LambdaHack
Watch.hs
-- | Display atomic commands received by the client. module Game.LambdaHack.Client.UI.Watch ( watchRespUpdAtomicUI, watchRespSfxAtomicUI ) where import Prelude () import Game.LambdaHack.Client.UI.Watch.WatchSfxAtomicM import Game.LambdaHack.Client.UI.Watch.WatchUpdAtomicM
null
https://raw.githubusercontent.com/LambdaHack/LambdaHack/de028c9197255f077125d034f7f2fd8781d8fb80/engine-src/Game/LambdaHack/Client/UI/Watch.hs
haskell
| Display atomic commands received by the client.
module Game.LambdaHack.Client.UI.Watch ( watchRespUpdAtomicUI, watchRespSfxAtomicUI ) where import Prelude () import Game.LambdaHack.Client.UI.Watch.WatchSfxAtomicM import Game.LambdaHack.Client.UI.Watch.WatchUpdAtomicM
3865aa9cb464aa72190ba1ec54274936703025b63922d0678e766202b19192d3
faber-lang/faber
Typing.hs
# LANGUAGE FlexibleInstances # {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeSynonymInstances #-} module Typing where import Control.Lens hiding (Level) import Control.Monad.Except import Control.Monad.Extra (fromMaybeM, maybeM) import Control.Mo...
null
https://raw.githubusercontent.com/faber-lang/faber/d022f52b22f209f1f10609949495b689e886c75f/src/Typing.hs
haskell
# LANGUAGE TemplateHaskell # # LANGUAGE TypeSynonymInstances # generalization and instantiation TODO: Stop using `Infer` here (use of `unify` in `generalizer` should be prohibited) TODO: Bool TODO: Bool type evaluator constraint solver
# LANGUAGE FlexibleInstances # module Typing where import Control.Lens hiding (Level) import Control.Monad.Except import Control.Monad.Extra (fromMaybeM, maybeM) import Control.Monad.Reader import Control.Monad.State import Control.Mon...
ecaa30a504358ee629e0cac69c5c84d27d5196f23ffa2fcb48acbbe5666e3487
roswell/roswell
dist-use.lisp
(defpackage :roswell.dist.use (:use :cl)) (in-package :roswell.dist.use) (defun use (&rest r) (setf r (cdr r)) (if r (let* ((name (first r)) (version (second r)) (alist (ql-dist:available-versions (ql-dist:dist name))) (found (cdr (assoc version alist :test 'equal))))...
null
https://raw.githubusercontent.com/roswell/roswell/0107dfb54393aff1a776deb79d58f67f642135cb/lisp/dist-use.lisp
lisp
(defpackage :roswell.dist.use (:use :cl)) (in-package :roswell.dist.use) (defun use (&rest r) (setf r (cdr r)) (if r (let* ((name (first r)) (version (second r)) (alist (ql-dist:available-versions (ql-dist:dist name))) (found (cdr (assoc version alist :test 'equal))))...
198f98ab11afcdc2e129e5ac5659d0f878081c8af858118bc05e8d0902f82a3b
chetmurthy/ensemble
gcast.ml
(**************************************************************) GCAST.ML Author : , 12/96 (* BUG: refcounts are not done correctly here *) (**************************************************************) open Trans open Layer open Event open Util open View (*******************************************************...
null
https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/layers/scale/gcast.ml
ocaml
************************************************************ BUG: refcounts are not done correctly here ************************************************************ ************************************************************ ************************************************************ *******************************...
GCAST.ML Author : , 12/96 open Trans open Layer open Event open Util open View let name = Trace.filel "GCAST" let failwith = Trace.make_failwith name type header = NoHdr | Cast of rank type state = { fanout : int ; mutable failed : bool Arrayf.t ; mutable forward : rank Arrayf.t Arrayf.t } let (mod) ...
a8b9c1e92dd2377cdc3b19baadb515843b1332319e4771af1b8bcb9dccefd162
igrishaev/farseer
stub_test.clj
(ns ^:integration farseer.stub-test (:require [farseer.stub :as stub] [clj-http.client :as client] [clojure.test :refer [deftest is]])) (def PORT 18008) (def config {:jetty/port PORT :stub/handlers {:user/get-by-id {:name "Ivan" :email ""} :some/trigger-error stub/invalid...
null
https://raw.githubusercontent.com/igrishaev/farseer/8c27808aa675e0822aae2ccb9bd1b8b403ad9608/farseer-stub/test/farseer/stub_test.clj
clojure
(ns ^:integration farseer.stub-test (:require [farseer.stub :as stub] [clj-http.client :as client] [clojure.test :refer [deftest is]])) (def PORT 18008) (def config {:jetty/port PORT :stub/handlers {:user/get-by-id {:name "Ivan" :email ""} :some/trigger-error stub/invalid...
898e3c5d9ef5579f3e2f0488c7583fdc262045776597f0c2151eaedfa0b87d46
semperos/webdriver-logic
util.clj
(ns ^{:doc "Utilties atop third-party dependendies."} webdriver-logic.util (:use [clojure.core.logic :only [lvar?]]) (:require [clj-webdriver.core :as wd]) (:import [org.openqa.selenium InvalidElementStateException] [org.openqa.selenium.remote ErrorHandler$UnknownServerException])) (defn fresh? "R...
null
https://raw.githubusercontent.com/semperos/webdriver-logic/d6fa8795ebf9e023d3f6baffbdba27cdf784368f/src/webdriver_logic/util.clj
clojure
(ns ^{:doc "Utilties atop third-party dependendies."} webdriver-logic.util (:use [clojure.core.logic :only [lvar?]]) (:require [clj-webdriver.core :as wd]) (:import [org.openqa.selenium InvalidElementStateException] [org.openqa.selenium.remote ErrorHandler$UnknownServerException])) (defn fresh? "R...
7bd3af092ca03e14fd3cb78ad8702fab1c812444662d215165b63886481e5c54
acid-state/acid-state
KeyValue.hs
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} module KeyValue (main) where import Data.Acid import Data.Acid.Remote import Control.Applicative import Control.Monad.Reader import Control.Monad.State import ...
null
https://raw.githubusercontent.com/acid-state/acid-state/1a9290570bcb48373bfa5f9de16cc694068c4d01/examples/KeyValue.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # ---------------------------------------------------- ---------------------------------------------------- The transaction we will execute over the state. ----------------------------------------------------
module KeyValue (main) where import Data.Acid import Data.Acid.Remote import Control.Applicative import Control.Monad.Reader import Control.Monad.State import Data.SafeCopy import System.Environment import System.Exit import Sy...
56692ed362b55b50315f6e0bc9b311d4fb8f6493e35a82b04a6ea565d32242f1
RefactoringTools/HaRe
D2_TokOut.hs
module D2 where --Any type/data constructor name declared in this module can be renamed. --Any type variable can be renamed. Rename type Constructor ' BTree ' to ' MyBTree ' data BTree a = Empty | T a (BTree a) (BTree a) deriving Show buildtree :: Ord a => [a] -> BTree a buildtree [] = Empty buildtre...
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/testing/unfoldAsPatterns/D2_TokOut.hs
haskell
Any type/data constructor name declared in this module can be renamed. Any type variable can be renamed.
module D2 where Rename type Constructor ' BTree ' to ' MyBTree ' data BTree a = Empty | T a (BTree a) (BTree a) deriving Show buildtree :: Ord a => [a] -> BTree a buildtree [] = Empty buildtree (x:xs) = insert x (buildtree xs) insert :: Ord a => a -> BTree a -> BTree a insert val v2 = let f (T val E...
64d3e5d4675326f58a8cb4ac28cc9befd0bca80b1103fadc333efa30e91331b6
spechub/Hets
ToSExpr.hs
| Module : ./CASL / ToSExpr.hs Description : translate CASL to S - Expressions Copyright : ( c ) , DFKI 2008 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : portable translation of CASL to S - Expressions Module ...
null
https://raw.githubusercontent.com/spechub/Hets/bbaa9dd2d2e5eb1f2fd3ec6c799a6dde7dee6da2/CASL/ToSExpr.hs
haskell
| Module : ./CASL / ToSExpr.hs Description : translate CASL to S - Expressions Copyright : ( c ) , DFKI 2008 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : portable translation of CASL to S - Expressions Module ...
a4e42c56c72e2ed4c4a795c7041d25edf116803f2f94080878ec7ea1f423e1bc
ddssff/refact-global-hse
Main.hs
import Data.Monoid import Options.Applicative import CleanImports import MoveDecls import Decorate data Action = CleanImports CleanImports.Params | MoveDecls MoveDecls.Params | Decorate Decorate.Params deriving Show options :: Parser Action options = subparser $ (command "clean" (clean `with...
null
https://raw.githubusercontent.com/ddssff/refact-global-hse/519a017009cae8aa1a3db1b46eb560d76bd9895d/scripts/Main.hs
haskell
import Data.Monoid import Options.Applicative import CleanImports import MoveDecls import Decorate data Action = CleanImports CleanImports.Params | MoveDecls MoveDecls.Params | Decorate Decorate.Params deriving Show options :: Parser Action options = subparser $ (command "clean" (clean `with...
ace78feafe5826202af69f4f818c68b8486dbf92cfec7d6324f1475277a0edec
bytekid/mkbtt
parser.ml
Copyright 2008 , Christian Sternagel , * GNU Lesser General Public License * * This file is part of TTT2 . * * TTT2 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 ve...
null
https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/automata/src/parser.ml
ocaml
** OPENS ******************************************************************* ** MODULES ***************************************************************** ** MODULES **************************************************************** ** INCLUDES ***************************************************************
Copyright 2008 , Christian Sternagel , * GNU Lesser General Public License * * This file is part of TTT2 . * * TTT2 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 ve...
ba33b61dcc474b5c95e3f3dff3e2c0c6fcf93208f288180b8688fac19413bc0f
fdopen/ppx_cstubs
options.mli
This file is part of ppx_cstubs ( ) * Copyright ( c ) 2018 - 2019 fdopen * * 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 , with linking exception ; * either version...
null
https://raw.githubusercontent.com/fdopen/ppx_cstubs/638b019ab5eb0d8a187710d00414a1d2536e249c/src/internal/options.mli
ocaml
This file is part of ppx_cstubs ( ) * Copyright ( c ) 2018 - 2019 fdopen * * 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 , with linking exception ; * either version...
747d1e78ef81ec04137ae049c967c0da243727a8760996589ae862910aac727a
defaultxr/cl-patterns
utility.lisp
;;;; utility.lisp - various utility functions that are either fundamental to other functionality, or just don't belong anywhere else. (in-package #:cl-patterns) ;;; special variables (defvar *event* nil "The event special variable. Can be referenced inside a pattern's code.") (defvar *clock* nil "The default cl...
null
https://raw.githubusercontent.com/defaultxr/cl-patterns/e4bcdcf1dff29dcdf83de79ade4412896753a027/src/utility.lisp
lisp
utility.lisp - various utility functions that are either fundamental to other functionality, or just don't belong anywhere else. special variables symbol stuff string stuff = > (: C 4 ) = > (: A # 7 ) (note-name-and-octave :c-1) ;=> (:C -1) = > ( :D 4 ) list stuff = > ( 1/4 1/4 1/4 1/4 ) = > ( 1/3 2/3 1 ) =...
(in-package #:cl-patterns) (defvar *event* nil "The event special variable. Can be referenced inside a pattern's code.") (defvar *clock* nil "The default clock to run tasks on.") (defparameter eop 'eop "End Of Pattern; the symbol yielded by patterns after their last output.") (defun pattern-pstream-class-n...
f150b77388982218ce7ac6811116c0cac51854b1d626dfabf7f8e1f4b9c914d0
clojurecup2014/parade-route
repl.clj
Copyright ( c ) , Dec 2008 . All rights reserved . ; The use and distribution terms for this software are covered by the ; Common Public License 1.0 () ; which can be found in the file CPL.TXT at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; th...
null
https://raw.githubusercontent.com/clojurecup2014/parade-route/adb2e1ea202228e3da07902849dee08f0bb8d81c/Assets/Clojure/Internal/Plugins/clojure/repl.clj
clojure
The use and distribution terms for this software are covered by the Common Public License 1.0 () which can be found in the file CPL.TXT at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, o...
Copyright ( c ) , Dec 2008 . All rights reserved . Utilities meant to be used interactively at the REPL (ns ^{:author "Chris Houser, Christophe Grand, Stephen Gilardi, Michel Salim" :doc "Utilities meant to be used interactively at the REPL"} clojure.repl (def ^:private special-doc-map '{. {:url "...
422e0a626085361400d9ff004919d1fe29a12302fe0265e3f2551d7e731bc887
fractalide/fractalide
model.rkt
#lang racket (require fractalide/modules/rkt/rkt-fbp/agent fractalide/modules/rkt/rkt-fbp/def) (require/edge ${guiv2.list-counter}) (require/edge ${guiv2.counter}) (define-agent #:input '("in") ; in array port #:output '("out") ; out port (define msg (recv (input "in"))) (define acc (try-recv (i...
null
https://raw.githubusercontent.com/fractalide/fractalide/9c54ec2615fcc2a1f3363292d4eed2a0fcb9c3a5/modules/rkt/rkt-fbp/agents/guiv2/model.rkt
racket
in array port out port
#lang racket (require fractalide/modules/rkt/rkt-fbp/agent fractalide/modules/rkt/rkt-fbp/def) (require/edge ${guiv2.list-counter}) (require/edge ${guiv2.counter}) (define-agent (define msg (recv (input "in"))) (define acc (try-recv (input "acc"))) (match msg [(cons 'list-counter ls) ...
a7a4c5663c67dc006355058387e27e1fbc24fc4e2f80dd64fb7b9646cfed96b5
astine/Sacraspot
initialize.lisp
( C ) 2009 - 2010 (cl:in-package #:sacraspot) (defmacro load-settings (file-path) "Opens a file with sexp ordered pairs and of the form: (SYMBOL . VALUE) and for each pair, creates a global variable of the name SYMBOL and valule VALUE. Does so at compile time." (with-open-file (settings file-path) ...
null
https://raw.githubusercontent.com/astine/Sacraspot/9cdce12e8b15b7a00e40c9150fbafa04034f17f0/initialize.lisp
lisp
load all of the settings database server (start *acceptor*) logs general log logs connection attempts debugging timezone scheduler logging ;;Possibly will add an extended logging engine, if needed (defcategory maintenance-job) (defcategory access) (defvar *log-file* (open "sacraspot.messages" :direction :output :...
( C ) 2009 - 2010 (cl:in-package #:sacraspot) (defmacro load-settings (file-path) "Opens a file with sexp ordered pairs and of the form: (SYMBOL . VALUE) and for each pair, creates a global variable of the name SYMBOL and valule VALUE. Does so at compile time." (with-open-file (settings file-path) ...
83aa540b5ad4c2fd59c1dde6cb6c260f46a5d24af5dff716af138895da861111
uswitch/big-replicate
materialize.clj
(ns uswitch.big-replicate.materialize (:require [clojure.tools.cli :refer (parse-opts)] [clojure.tools.logging :refer (info error)] [gclouj.bigquery :as bq]) (:gen-class)) (def cli [["-p" "--project-id PROJECT_ID" "Google Cloud Project ID"] ["-d" "--dataset-id DATASET_ID" "Output ...
null
https://raw.githubusercontent.com/uswitch/big-replicate/461085d4c9cdb6064cfdc64499f427f757bfcc8a/src/uswitch/big_replicate/materialize.clj
clojure
(ns uswitch.big-replicate.materialize (:require [clojure.tools.cli :refer (parse-opts)] [clojure.tools.logging :refer (info error)] [gclouj.bigquery :as bq]) (:gen-class)) (def cli [["-p" "--project-id PROJECT_ID" "Google Cloud Project ID"] ["-d" "--dataset-id DATASET_ID" "Output ...
13804f962a01deebee8a055cfb4b3b3622e666c78620ac874a3b1b0cc34819a5
ds-wizard/engine-backend
Migration.hs
module Registry.Database.Migration.Production.Migration_0006_templateTimestamps.Migration ( definition, ) where import Control.Monad.Logger import Control.Monad.Reader (liftIO) import Data.Pool (Pool, withResource) import Database.PostgreSQL.Migration.Entity import Database.PostgreSQL.Simple definition = (meta, mig...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-registry/src/Registry/Database/Migration/Production/Migration_0006_templateTimestamps/Migration.hs
haskell
module Registry.Database.Migration.Production.Migration_0006_templateTimestamps.Migration ( definition, ) where import Control.Monad.Logger import Control.Monad.Reader (liftIO) import Data.Pool (Pool, withResource) import Database.PostgreSQL.Migration.Entity import Database.PostgreSQL.Simple definition = (meta, mig...
c8d943e8357fc950e5dea52cf9356c4c48c8b4a3a97c06173f8da8d51cc2e55a
CodeforSouth/fbi-api
routes.clj
(ns fbi-api.routes (:require [liberator.core :refer [resource]] [compojure.core :refer [defroutes ANY GET]] [compojure.route :refer [not-found]] [taoensso.timbre :as log] ;; internal [fbi-api.db :as db] [fbi-api.util :as util] [fbi-api.validations :as validate] [fbi-api.handlers.businesses ...
null
https://raw.githubusercontent.com/CodeforSouth/fbi-api/ddc1f1c45269bd9a0401c5047d0c5ab1dbe299ba/src/fbi_api/routes.clj
clojure
internal all routes return app/json;charset=UTF-8 headers (thanks to liberator/compojure) TODO: return different status code and different body if no inspection with provided id?
(ns fbi-api.routes (:require [liberator.core :refer [resource]] [compojure.core :refer [defroutes ANY GET]] [compojure.route :refer [not-found]] [taoensso.timbre :as log] [fbi-api.db :as db] [fbi-api.util :as util] [fbi-api.validations :as validate] [fbi-api.handlers.businesses :as businesses]...
db9870abd5d135e9f114203eb22a9118f7698f827be05cbdf3f367d0b0bda111
avsm/eeww
dynlink.ml
#3 "otherlibs/dynlink/native/dynlink.ml" (**************************************************************************) (* *) (* OCaml *) (* ...
null
https://raw.githubusercontent.com/avsm/eeww/651d8da20a3cc9e88354ed0c8da270632b9c0c19/boot/ocaml/otherlibs/dynlink/native/dynlink.ml
ocaml
************************************************************************ OCaml ...
#3 "otherlibs/dynlink/native/dynlink.ml" , projet Cristal , INRIA Rocquencourt and , Jane Street Europe Copyright 1996 Institut National de Recherche en Informatique et Copyright 2017 - -2018 Jane Street Group LLC the G...
38fa4aea5f25c9944881f12d6fd6e3c21b9a36363527a0438d70154b1562f3b6
Liam-Eagen/BulletproofsPP
Parse.hs
# LANGUAGE DeriveGeneric , ConstraintKinds , RankNTypes # # LANGUAGE QuantifiedConstraints , TypeFamilies , DeriveAnyClass # # LANGUAGE OverloadedStrings , DeriveFunctor # module Parse where import GHC.Generics import Data.Aeson import Data.Aeson.Types import qualified Data.Text as T import Data.Curve hiding (id) im...
null
https://raw.githubusercontent.com/Liam-Eagen/BulletproofsPP/0494201e2048f5c679f4ce3ee0cc6ac0ff9d3ef7/app/Parse.hs
haskell
{ curve :: Maybe T.Text -- Currently only SECP256K1 , basisSeed :: Maybe T.Text -- Use to generate basis points via hash , basisFile :: Maybe T.Text -- File to read basis points from , randomSeed :: Maybe T.Text -- Generate challenges from hashing this value If true ,...
# LANGUAGE DeriveGeneric , ConstraintKinds , RankNTypes # # LANGUAGE QuantifiedConstraints , TypeFamilies , DeriveAnyClass # # LANGUAGE OverloadedStrings , DeriveFunctor # module Parse where import GHC.Generics import Data.Aeson import Data.Aeson.Types import qualified Data.Text as T import Data.Curve hiding (id) im...
728f52ac02a47ca28252b5d942b3e4b754f097f483b698d5de9340c3e8c92c91
Noeda/dfterm3
Running.hs
-- | Internal module to `Dfterm3.Game.DwarfFortress`. -- module Dfterm3.Game.DwarfFortress.Internal.Running ( DFPid , DFState() , newDFState , allAliveInstances , ProcureStatus(..) , takeOldOrStartProcuring , registerNew , unregister ) where import Data.Word import Data.IORef impor...
null
https://raw.githubusercontent.com/Noeda/dfterm3/6b33c9b4712da486bb84356f6c9f48abb8074faf/src/Dfterm3/Game/DwarfFortress/Internal/Running.hs
haskell
| Internal module to `Dfterm3.Game.DwarfFortress`.
module Dfterm3.Game.DwarfFortress.Internal.Running ( DFPid , DFState() , newDFState , allAliveInstances , ProcureStatus(..) , takeOldOrStartProcuring , registerNew , unregister ) where import Data.Word import Data.IORef import Data.Maybe ( catMaybes ) import Control.Monad import Co...
583398cd754228c17e5bd890dd0d64e07a1125b27ca1c5684486506f64123d27
PikachuHy/texmacs-converter-tm2md
markdownout.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; MODULE : tmmarkdown.scm ;; DESCRIPTION : markdown-stree to markdown-document or markdown-snippet COPYRIGHT : ( C ) 2017 and ;; This software falls under the GNU general public license version 3 or later . ;; It come...
null
https://raw.githubusercontent.com/PikachuHy/texmacs-converter-tm2md/65a81cee2c796cab6f891821ad5bd944f94e799c/markdownout.scm
scheme
MODULE : tmmarkdown.scm DESCRIPTION : markdown-stree to markdown-document or markdown-snippet It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE in the root directory or <-3.0.html>. "Global" state for document serialization and config options Usage is wrapped within a "with-gl...
COPYRIGHT : ( C ) 2017 and This software falls under the GNU general public license version 3 or later . (texmacs-module (convert markdown markdownout) (:use (convert tools output))) (define footnote-nr 0) (define equation-nr 0) (define num-line-breaks 2) (define paragraph-width #f) (define paper-aut...
d5c5630acea40418c81eca64f43f54636e98e970ab7e98728f01744fc9fb8517
yahoojapan/big3store
tp_query_node.erl
%% %% Triple Pattern Query Node processes %% 2014 - 2019 UP FAMNIT and Yahoo Japan Corporation %% @version 0.3 @since May , 2014 @author < > @author < > %% %% @doc Triple pattern query node is implemented as gen-process. It realizes %% access method to local triple-store based on triple patterns. Acces...
null
https://raw.githubusercontent.com/yahoojapan/big3store/c4142395695a836fec60b7c202f9f12d46a8ed01/src/tp_query_node.erl
erlang
Triple Pattern Query Node processes @version 0.3 @doc Triple pattern query node is implemented as gen-process. It realizes access method to local triple-store based on triple patterns. Access method supports index based access to triple-table. TP query node is implemented as state machine. Input and output ...
2014 - 2019 UP FAMNIT and Yahoo Japan Corporation @since May , 2014 @author < > @author < > active , db_access , eos , and inactive . Message start inits state to active . accessing triple - store state moves to eos . Eval can be received multiple times if in state active or eos . Finally , stop me...
e1e8217efae0987982efa4e506b9ac8793d1fa39b49b5379cb16d52aa3af5f09
kunstmusik/pink
demo5.clj
;; Test of Exponential Envelope ;; index is held in an atom, reader reads from atom and returns a buffer (ns pink.demo.demo5 (:require [pink.engine :refer :all] [pink.config :refer :all] [pink.envelopes :refer [env exp-env adsr xar]] [pink.oscillators :refer [sine sine2]] ...
null
https://raw.githubusercontent.com/kunstmusik/pink/7d37764b6a036a68a4619c93546fa3887f9951a7/src/demo/pink/demo/demo5.clj
clojure
Test of Exponential Envelope index is held in an atom, reader reads from atom and returns a buffer test design work mutable value will be held in an atom reader will be the audio-func to read from the atom
(ns pink.demo.demo5 (:require [pink.engine :refer :all] [pink.config :refer :all] [pink.envelopes :refer [env exp-env adsr xar]] [pink.oscillators :refer [sine sine2]] [pink.util :refer [mul swapd! sum const create-buffer getd setd! arg shared let-s reader]])) (defn ...
c81af62b7cd53e43d1ff634cbed6aa96ceb99fd44202347ef2f308ec48dfac2e
fujita-y/ypsilon
run-guile.scm
;; GUILE_JIT_THRESHOLD=0 guile --no-debug run-guile.scm ;; " Set GUILE_JIT_THRESHOLD to -1 to disable JIT compilation , or 0 to eagerly JIT - compile each function as it ’s first seen . " (define warmup #t) (define filename "bench.guile.out") (use-modules (ice-9 time)) (add-to-load-path "./gambit-benchmarks") (de...
null
https://raw.githubusercontent.com/fujita-y/ypsilon/ed117b399ea8153fda9fadc1f731ed03975535ce/bench/run-guile.scm
scheme
GUILE_JIT_THRESHOLD=0 guile --no-debug run-guile.scm
" Set GUILE_JIT_THRESHOLD to -1 to disable JIT compilation , or 0 to eagerly JIT - compile each function as it ’s first seen . " (define warmup #t) (define filename "bench.guile.out") (use-modules (ice-9 time)) (add-to-load-path "./gambit-benchmarks") (define bitwise-and logand) (define bitwise-not lognot) (defin...
39366eff744795681005eecc1289f9a38e2e1418bb27d2da30267104ee850b8c
lumihq/persistent-documentation
DocumentationSpec.hs
# LANGUAGE CPP # # LANGUAGE MultiParamTypeClasses # # LANGUAGE DerivingStrategies # # LANGUAGE DataKinds # # LANGUAGE StandaloneDeriving # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # # L...
null
https://raw.githubusercontent.com/lumihq/persistent-documentation/6b57b9b968315167b82e06af982f1fc9f04cb119/test/DocumentationSpec.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # ^ do ^ do
# LANGUAGE CPP # # LANGUAGE MultiParamTypeClasses # # LANGUAGE DerivingStrategies # # LANGUAGE DataKinds # # LANGUAGE StandaloneDeriving # # LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # LANGUAGE TemplateHaskell # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE QuasiQuote...
eca93675722be28280b375cfca3c14d3f8eec5a7b88a665b39c5ad6d3e51c853
smimram/monadic-synth
OSC.ml
(** OSC controllers. *) open Stream let m = Mutex.create () let handlers = ref [] let add_handler path h = handlers := (path,h) :: !handlers let ts f = try Mutex.lock m; f (); Mutex.unlock m with | e -> Mutex.unlock m; raise e let handler path msg = let msg = Array.to_list msg in L...
null
https://raw.githubusercontent.com/smimram/monadic-synth/928ba063ce147aa04a0091c845c0002ff396a854/src/OSC.ml
ocaml
* OSC controllers. TODO: initialize sliders
open Stream let m = Mutex.create () let handlers = ref [] let add_handler path h = handlers := (path,h) :: !handlers let ts f = try Mutex.lock m; f (); Mutex.unlock m with | e -> Mutex.unlock m; raise e let handler path msg = let msg = Array.to_list msg in List.iter (fun (p,h) -> i...
1c987e74b16b7f0dd1f228b17a7c9a362882d672f13cb018449234ed20dbba19
imandra-ai/fix-engine
test_server.ml
let ( let* ) = Lwt.bind let log_box : Runtime.event Lwt_mvar.t = Lwt_mvar.create_empty () let model_box : Runtime.event Lwt_mvar.t = Lwt_mvar.create_empty () let config = Engine. { comp_id = "TEST_SERVER"; target_id = "TEST_CLIENT"; host_id = None; on_behalf_id = None; timer = 0.1...
null
https://raw.githubusercontent.com/imandra-ai/fix-engine/4d24f4d89a262ed7f16ff898570dbc9319730374/tests/test_server.ml
ocaml
let ( let* ) = Lwt.bind let log_box : Runtime.event Lwt_mvar.t = Lwt_mvar.create_empty () let model_box : Runtime.event Lwt_mvar.t = Lwt_mvar.create_empty () let config = Engine. { comp_id = "TEST_SERVER"; target_id = "TEST_CLIENT"; host_id = None; on_behalf_id = None; timer = 0.1...
01b14af5f3380e93565341123a8ac0a5fa193d31dc64776263bc03b8a66035e0
jerith/chaocaml
events.ml
open Entities module Create_message = struct type t = { id : string; timestamp : string; channel_id : string; author : string; content : string; tts : bool; mentions : string list; mention_everyone : bool; } let from_json event_json = { id = Json_utils.get_string "id" event_j...
null
https://raw.githubusercontent.com/jerith/chaocaml/9489ee4386f9e97becebc5afab85cada6c5466ab/lib/events.ml
ocaml
open Entities module Create_message = struct type t = { id : string; timestamp : string; channel_id : string; author : string; content : string; tts : bool; mentions : string list; mention_everyone : bool; } let from_json event_json = { id = Json_utils.get_string "id" event_j...
f2e8fa7be8c339201e3443e43c66e1b4d545e9574120ce443317cae467918ac7
kana/sicp
ex-4.13.scm
Exercise 4.13 . Scheme allows us to create new bindings for variables by ;;; means of `define`, but provides no way to get rid of bindings. Implement ;;; for the evaluator a special form `make-unbound!` that removes the binding ;;; of a given symbol from the environment in which the `make-unbound!` ;;; expression i...
null
https://raw.githubusercontent.com/kana/sicp/912bda4276995492ffc2ec971618316701e196f6/ex-4.13.scm
scheme
means of `define`, but provides no way to get rid of bindings. Implement for the evaluator a special form `make-unbound!` that removes the binding of a given symbol from the environment in which the `make-unbound!` expression is evaluated. This problem is not completely specified. For environment? Complete the spe...
Exercise 4.13 . Scheme allows us to create new bindings for variables by example , should we remove only the binding in the first frame of the (require "./ex-4.12") (define (make-unbound-first! var env) (define undef (if #f #t)) (scan-environment var env (lambda (vars vals) (set-car! vars...
6690876193a09f47378bf335342b67eabab49c6088a16108467509475e4b8306
herd/herdtools7
lexMisc.mli
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/lib/lexMisc.mli
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2010 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...