_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 |
|---|---|---|---|---|---|---|---|---|
4e822485f093dd6288e2794dc51059f88ce8b54d1882f60ec497efd47246778e | gfour/gic | Poly2.hs | module Poly2 where
main :: IO ()
main = putStrLn (show result)
result :: Int
result = (double inc 1) + lengthZ (double ident [1, 2, 3])
double :: (a->a) -> a -> a
double f x = f (f x)
inc :: Int -> Int
inc z = z + 1
ident :: a -> a
ident x = x
lengthZ :: [Int] -> Int
lengthZ z =
case z of
[] -> 0
x:xs... | null | https://raw.githubusercontent.com/gfour/gic/d5f2e506b31a1a28e02ca54af9610b3d8d618e9a/Examples/Polymorphic/Poly2.hs | haskell | module Poly2 where
main :: IO ()
main = putStrLn (show result)
result :: Int
result = (double inc 1) + lengthZ (double ident [1, 2, 3])
double :: (a->a) -> a -> a
double f x = f (f x)
inc :: Int -> Int
inc z = z + 1
ident :: a -> a
ident x = x
lengthZ :: [Int] -> Int
lengthZ z =
case z of
[] -> 0
x:xs... | |
fc99fc4e423a39d98f82ddd70101ad571ee2a9e8dc600e9a0da7b3215abb3ae4 | KaroshiBee/weevil | dap_event_message.mli | include Dap_message_types.EVENT_T
| null | https://raw.githubusercontent.com/KaroshiBee/weevil/1b166ba053062498c1ec05c885e04fba4ae7d831/lib/dapper/dap_event_message.mli | ocaml | include Dap_message_types.EVENT_T
| |
810f20e3082028d7b880bcecea6a76deaf5f35a1ef7733706a8b5793ffeedb48 | mathematical-systems/clml | dlasq6.lisp | ;;; Compiled by f2cl version:
( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:0... | null | https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/lapack/dlasq6.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t)
(:relaxed-array-decls t) (:coerce-assigns :as-needed)
(:array-type ':array) (:array-slicing t)
(:declare-common nil) (:float-format double-float)) | ( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:03:25 rtoy Exp $ "
" $ I d :... |
01ae310e0536c168add5f529381a0d21fb9512f3f3336fc3f2c104e08ea5784d | soegaard/metapict | parametric-plot.rkt | #lang racket/base
;;;
;;; Parametric Plot
;;;
(require racket/math racket/draw metapict)
(provide parametric-plot) ; draw the graph of a function
(define graph-join --)
(define (parametric-plot fx fy
tmin tmax
#:samples [n 50]
#:diffx [df/... | null | https://raw.githubusercontent.com/soegaard/metapict/5712a0fa6ad6671d17726c4221396d6ffac5cbd3/metapict/parametric-plot.rkt | racket |
Parametric Plot
draw the graph of a function
t -> (fx(t),fy(t))
vector along tangent
(define (window-outline win)
(defv (p q) (window-opposite-corners win))
(rectangle p q))
(define (clip-to-window c [win (curve-pict-window)])
(clipped (window-outline win) c)) | #lang racket/base
(require racket/math racket/draw metapict)
(define graph-join --)
(define (parametric-plot fx fy
tmin tmax
#:samples [n 50]
#:diffx [df/dx #f]
#:diffy [df/dy #f])
(def ε 1.0e-10)
(define (nd... |
c7e1b8bf04e2e7644662287312e2d02cec3767dfbff3946c2b5743dd2d89a5f4 | gilith/hol-light | friendship.ml | (* ========================================================================= *)
(* The friendship theorem. *)
(* *)
Proof from " Combinatorics Tutorial 2 : Friendship Theorem " , copyright ... | null | https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/100/friendship.ml | ocaml | =========================================================================
The friendship theorem.
=========================================================================
---------------... | Proof from " Combinatorics Tutorial 2 : Friendship Theorem " , copyright
MathOlymp.com , 2001 . Apparently due to and .
needs "Library/prime.ml";;
needs "Library/pocklington.ml";;
Useful inductive breakdown principle ending at gcd .
let GCD_INDUCT = prove
(`!P. (!m n. P m ... |
d838b8ec662a9f510dd63b24636b11047c97c861da18c0f78f7e87fc5d9849a4 | let-def/lrgrep | Numbering.mli | (******************************************************************************)
(* *)
(* Fix *)
(* ... | null | https://raw.githubusercontent.com/let-def/lrgrep/29e64174dc9617bcd1871fd2e4fd712269568324/lib/fix/Numbering.mli | ocaml | ****************************************************************************
Fix
... | , Paris
. All rights reserved . This file is distributed under the
terms of the GNU Library General Public License version 2 , with a
open Sigs
* The functor { ! Make } requires an implementation of maps for the type [ ]
and offers a two - p... |
cb9ca97e58b16efcabd04dcb4a6543d6020ac4efca74f5a1a890bff96b0feae5 | stchang/graph | timing-test-scc.rkt | #lang racket
(require rackunit racket/unsafe/ops file/gunzip)
(require graph/graph-weighted
graph/graph-fns-basic
graph/gen-graph
"test-utils.rkt")
times determined from running cmd line racket , on 2.40Ghz quad - core cpu ( Q6600 )
;; otherwise when indicated, times recorded using i7-26... | null | https://raw.githubusercontent.com/stchang/graph/0ff9a1934f4421c53ec4b71cb48d54a6ad86c7b9/graph-test/tests/graph/timing-test-scc.rkt | racket | otherwise when indicated, times recorded using i7-2600k
unzip file
scc timing test ------------------------------------------------------------
see also -005/forum/thread?thread_id=623
no difference when using with-input-from-file and open-input-file
on work machine: ~22s
(last line has no \n)
#\space
(for ... | #lang racket
(require rackunit racket/unsafe/ops file/gunzip)
(require graph/graph-weighted
graph/graph-fns-basic
graph/gen-graph
"test-utils.rkt")
times determined from running cmd line racket , on 2.40Ghz quad - core cpu ( Q6600 )
(when (not (file-exists? "SCC.txt")) (gunzip "SCC.txt.... |
9d5c8f4b497b6d374f187dae17df6fca354bada5888f1cd42fcf9a767712fe8c | pirapira/coq2rust | summary.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/library/summary.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Special handling of the ml_module ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Errors
open Util... |
daa23d045cab43f75f5de976906c259d4244a1c375c88f320297dba99ca33af0 | AdaCore/why3 | alt_ergo.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
(* ... | null | https://raw.githubusercontent.com/AdaCore/why3/03f27e383b7191f9df0c7df84016a6450603f864/src/printer/alt_ergo.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
General Public License version 2.1 , with the special exception
open Format
open Pp
open Wstdlib
open Ident
open Ty
open Term
open Decl
open Printer
open Cntexmp_printer
... |
853ebf708f12e98b994f5cfb88b7c39adbd4be9cdc3774f4bd607da068d6364f | wedesoft/sfsim25 | quaternion.clj | (ns sfsim25.quaternion
"Complex algebra implementation."
(:refer-clojure :exclude [+ - *])
(:require [clojure.core :as c]
[clojure.math :refer (cos sin sqrt) :as m]
[clojure.core.matrix :refer (matrix mul)]
[clojure.core.matrix.linear :as l]
[sfsim25.util :refer (si... | null | https://raw.githubusercontent.com/wedesoft/sfsim25/0d439804cf61ecdea499e9fab6adaee9d91b65d1/src/sfsim25/quaternion.clj | clojure | (ns sfsim25.quaternion
"Complex algebra implementation."
(:refer-clojure :exclude [+ - *])
(:require [clojure.core :as c]
[clojure.math :refer (cos sin sqrt) :as m]
[clojure.core.matrix :refer (matrix mul)]
[clojure.core.matrix.linear :as l]
[sfsim25.util :refer (si... | |
f8000973aafdde7dec7d79e3990b75b340a004892b03e0e29fa73c61a2d0c9da | bmeurer/ocamljit2 | test4.ml | let output_lock = Mutex.create()
let rec fib n = if n <= 2 then 1 else fib(n-1) + fib(n-2)
let fibtask n =
while true do
Mutex.lock output_lock;
print_int(fib n); print_newline();
Mutex.unlock output_lock
done
let _ =
Thread.create fibtask 28;
Thread.delay 1.0;
while true do
let l = read_li... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/testsuite/tests/lib-threads/test4.ml | ocaml | let output_lock = Mutex.create()
let rec fib n = if n <= 2 then 1 else fib(n-1) + fib(n-2)
let fibtask n =
while true do
Mutex.lock output_lock;
print_int(fib n); print_newline();
Mutex.unlock output_lock
done
let _ =
Thread.create fibtask 28;
Thread.delay 1.0;
while true do
let l = read_li... | |
a9b0cab1b372604b2a897eed7a75d00e1f4b2c47eedaa9a90806e130ba203a9e | sgbj/MaximaSharp | sqfr.lisp | Author
University of Nebraska at Kearney
Copyright ( C ) 2004 ,
Brief Description : Maxima code for linear homogeneous second order
;; differential equations.
Maxima odelin is free software ; you can redistribute it and/or
modify it under the terms of the GNU General Public License ,
;; .
Maxima od... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/contrib/diffequations/sqfr.lisp | lisp | differential equations.
you can redistribute it and/or
.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If x is a symbol for a subvarp, return its general representation.
Otherwise signal an error---the argument f is the string name of
a function that requires the symbol. | Author
University of Nebraska at Kearney
Copyright ( C ) 2004 ,
Brief Description : Maxima code for linear homogeneous second order
modify it under the terms of the GNU General Public License ,
Maxima odelin has NO WARRANTY , not even the implied warranty of
($put '$sqfr 1 '$version)
(eval-when
... |
c58a1c3640c687cf1941d6bf8e6e3e6d192ea87b4e7f1727821c438c136c2a89 | flosell/lambdacd-git | ssh_agent_support.clj | (ns lambdacd-git.ssh-agent-support
(:require [clojure.tools.logging :as log])
(:import (org.eclipse.jgit.transport SshSessionFactory JschConfigSessionFactory)
(com.jcraft.jsch.agentproxy.connector SSHAgentConnector)
(org.eclipse.jgit.util FS)
(com.jcraft.jsch.agentproxy RemoteIdenti... | null | https://raw.githubusercontent.com/flosell/lambdacd-git/3677c7afc1324bef6eb1c20f66bd83d99a1c54a9/src/lambdacd_git/ssh_agent_support.clj | clojure | (ns lambdacd-git.ssh-agent-support
(:require [clojure.tools.logging :as log])
(:import (org.eclipse.jgit.transport SshSessionFactory JschConfigSessionFactory)
(com.jcraft.jsch.agentproxy.connector SSHAgentConnector)
(org.eclipse.jgit.util FS)
(com.jcraft.jsch.agentproxy RemoteIdenti... | |
ac9f46e76a5fb0a4b1144b26600f7a2929660f6b1a70a6fddee99e66fe45878c | GaloisInc/tower | Common.hs | {-# LANGUAGE Rank2Types #-}
Create build script .
--
( c ) 2015 Galois , Inc.
--
module Tower.AADL.Build.Common where
import Data.Char
import Data.Maybe (maybeToList, fromMaybe)
import System.FilePath
import Text.PrettyPrint.Leijen hiding ((</>))
import Ivory.Artifact
import Ivory.Tower
import qualified Ivory.... | null | https://raw.githubusercontent.com/GaloisInc/tower/a43f5e36c6443472ea2dc15bbd49faf8643a6f87/tower-aadl/src/Tower/AADL/Build/Common.hs | haskell | # LANGUAGE Rank2Types #
Combinators to make building make statements easier ------------------------
-----------------------------------------------------------------------------
Makefile pretty printer ----------------------------------------------------
------------------------------------------------------------... | Create build script .
( c ) 2015 Galois , Inc.
module Tower.AADL.Build.Common where
import Data.Char
import Data.Maybe (maybeToList, fromMaybe)
import System.FilePath
import Text.PrettyPrint.Leijen hiding ((</>))
import Ivory.Artifact
import Ivory.Tower
import qualified Ivory.Compile.C.CmdlineFrontend as O
im... |
69a913b21748ae47d06e80d4ffb136bfb8b365682615af93071ddf834f54ea70 | haskell/bytestring | RealFloat.hs | -- |
-- Module : Data.ByteString.Builder.RealFloat
Copyright : ( c ) 2021
-- License : BSD-style
-- Maintainer :
--
-- Floating point formatting for @Bytestring.Builder@
--
-- This module primarily exposes `floatDec` and `doubleDec` which do the
equivalent of converting through @'Data . ByteString .... | null | https://raw.githubusercontent.com/haskell/bytestring/f6065faed6347893beb1b6db88b6788ca15280c1/Data/ByteString/Builder/RealFloat.hs | haskell | |
Module : Data.ByteString.Builder.RealFloat
License : BSD-style
Maintainer :
Floating point formatting for @Bytestring.Builder@
This module primarily exposes `floatDec` and `doubleDec` which do the
It also exposes `formatFloat` and `formatDouble` with a similar API as
output (specifically with r... | Copyright : ( c ) 2021
equivalent of converting through @'Data . ByteString . Builder.string7 ' . ' show'@.
` GHC.Float.formatRealFloat ` .
NB : The float - to - string conversions exposed by this module match ` show ` 's
For example , for fidelity , we match ` show ` on the output below .
" 1.0e23 "
... |
033d6ef4ed23f49f2824234ed83a495f50f28116fc1e566e5abc107eefe8bd74 | vvvvalvalval/datofu | uid.clj | (ns datofu.uid
"Utilities for generating unique identifiers."
(:require [datofu.schema.dsl :as sch]
[datomic.api :as d]
[clojure.string :as str]))
(defn schema-tx
[]
[;; storing the state in a separate partitions so that it won't pollute the Peers.
(sch/part :datofu.parts/uid)
(sc... | null | https://raw.githubusercontent.com/vvvvalvalval/datofu/c596c3beca92309135d88e338f233163c0e9cf5f/src/datofu/uid.clj | clojure | storing the state in a separate partitions so that it won't pollute the Peers.
TODO doc | (ns datofu.uid
"Utilities for generating unique identifiers."
(:require [datofu.schema.dsl :as sch]
[datomic.api :as d]
[clojure.string :as str]))
(defn schema-tx
[]
(sch/part :datofu.parts/uid)
(sch/attr :datofu.uid.impl.cell.string/id :string :identity)
(sch/attr :datofu.uid.im... |
e8814385fbdeb1bab60d7c4f53390e07d0316c88dbaf47d267b6ee7b3d860753 | cojna/iota | GoldenSectionSearchSpec.hs | module Algorithm.GoldenSectionSearchSpec where
import Algorithm.GoldenSectionSearch
import Data.Semigroup
import Test.Prelude
main :: IO ()
main = hspec spec
eps :: Double
eps = 1e-6
spec :: Spec
spec = do
describe "phi" $ do
it "phi = (1 + sqrt 5) / 2" $ do
phi `shouldSatisfy` approx eps ((1 + sqrt 5) ... | null | https://raw.githubusercontent.com/cojna/iota/6d2ad5b71b1b50bca9136d6ed84f80a0b7713d7c/test/Algorithm/GoldenSectionSearchSpec.hs | haskell | module Algorithm.GoldenSectionSearchSpec where
import Algorithm.GoldenSectionSearch
import Data.Semigroup
import Test.Prelude
main :: IO ()
main = hspec spec
eps :: Double
eps = 1e-6
spec :: Spec
spec = do
describe "phi" $ do
it "phi = (1 + sqrt 5) / 2" $ do
phi `shouldSatisfy` approx eps ((1 + sqrt 5) ... | |
b9fde582d8ec70c969504a230717c49f6fa23165b47ea98fdfde936b0c54931b | GrammaTech/sel | defmethod-2.lisp | (defmethod m :before (arg)
(+ 1 2)
(- 2 3)
(/ 3 4)
(* 4 2))
| null | https://raw.githubusercontent.com/GrammaTech/sel/a59174c02a454e8d588614e221cf281260cf12f8/test/etc/lisp-scopes/defmethod-2.lisp | lisp | (defmethod m :before (arg)
(+ 1 2)
(- 2 3)
(/ 3 4)
(* 4 2))
| |
a1ea4cd004fa0da96bcd61f66ec8b05c4b839923a33e0f6cbaf7651efc67194b | let-def/ocaml-recovery-parser | pprintast.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/let-def/ocaml-recovery-parser/87a87a25c9436f2e3187b82ec59a5f75c0e2446b/lib/pprintast.ml | ocaml | ************************************************************************
OCaml
Fabrice L... | , OCamlPro
, University of Pennsylvania
Copyright 2007 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
Original Code from Ber - metaocaml , modified... |
d2f84354ff1b205aa0ad792ec4209b6488606f19cca847b033a7b90e0c69fc29 | FlowerWrong/mblog | bertie.erl | %% ---
Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for... | null | https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/jaerlang2_code/bertie/bertie.erl | erlang | ---
Copyrights apply to this code. It may not be used to create training material,
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
--- | Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
-module(bertie).
-export([start/0]).
start() ->
Handle = bitcask:open("bertie_database", [read_write]),
N = fetch(Handle),
store(Handle, N+1),
io:format("Bertie has been run ~p times~n",[N]),
... |
19d03aeab337da01f0b82566333cb3144d7d2951eb72fd8faaea9eb8c4156d78 | vikram/lisplibraries | stefil.lisp | ;;; -*- mode: Lisp; Syntax: Common-Lisp; -*-
;;;
Copyright ( c ) 2006 by the authors .
;;;
;;; See LICENCE for details.
(in-package :stefil)
#.(file-header)
Warning : setf - ing these variables in not a smart idea because other systems may rely on their default value .
It 's smarter to rebind them in an : arou... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/stefil/stefil.lisp | lisp | -*- mode: Lisp; Syntax: Common-Lisp; -*-
See LICENCE for details.
their keyword counterparts.
this is not thread-safe, but...
conditions
some classes
make sure the specialized writer below is triggered
test repository
the real thing
drop failures recorded by the previous run of this test
TODO: this wil... | Copyright ( c ) 2006 by the authors .
(in-package :stefil)
#.(file-header)
Warning : setf - ing these variables in not a smart idea because other systems may rely on their default value .
It 's smarter to rebind them in an : around method from your .asd or shadow stefil : deftest with your own that sets
(defva... |
1e79adf7defdd05b31087a5675317fca64bdd60b3c362cdf415fd42ed8f18a24 | ku-fpg/kansas-lava | Stream.hs | {-# LANGUAGE DeriveDataTypeable #-}
-- | This implementation of the Stream data type. It's defined similarly to
-- other implementation of infinite streams found on hackage, except the
-- elements of the stream are strict to prevent some space leaks.
module Language.KansasLava.Stream where
import Data.Traversable
impo... | null | https://raw.githubusercontent.com/ku-fpg/kansas-lava/cc0be29bd8392b57060c3c11e7f3b799a6d437e1/Language/KansasLava/Stream.hs | haskell | # LANGUAGE DeriveDataTypeable #
| This implementation of the Stream data type. It's defined similarly to
other implementation of infinite streams found on hackage, except the
elements of the stream are strict to prevent some space leaks.
| Set the precedence of infix `Cons`.
| A stream is an infinite sequence of v... | module Language.KansasLava.Stream where
import Data.Traversable
import qualified Data.Foldable as F
import Control.Applicative
import Control.Monad
import Prelude hiding (zipWith,zipWith3, repeat)
import Data.Monoid
import qualified Data.List as List
import Data.Dynamic
import Debug.Trace
infixr 5 `Cons`
data Stream... |
9e7524985dae9f68fa8580c494c1f92c2b15f2bf2a45cead871f2cdd4f6e493b | stumpwm/stumpwm-contrib | numpad-layouts.lisp | ;;;; numpad-layouts.lisp
(in-package #:numpad-layouts)
(export '(set-numpad-layout))
(defparameter *layouts*
'((us . ((87 10 . 16) (88 11 . 16) (89 12 . 16) (106 61 . 16)
(83 13 . 16) (84 14 . 16) (85 15 . 16) (86 21 . 17)
(79 16 . 16) (80 17 . 16) (81 18 . 16) (63 17 . 17)
(8... | null | https://raw.githubusercontent.com/stumpwm/stumpwm-contrib/a7dc1c663d04e6c73a4772c8a6ad56a34381096a/util/numpad-layouts/numpad-layouts.lisp | lisp | numpad-layouts.lisp |
(in-package #:numpad-layouts)
(export '(set-numpad-layout))
(defparameter *layouts*
'((us . ((87 10 . 16) (88 11 . 16) (89 12 . 16) (106 61 . 16)
(83 13 . 16) (84 14 . 16) (85 15 . 16) (86 21 . 17)
(79 16 . 16) (80 17 . 16) (81 18 . 16) (63 17 . 17)
(82 20 . 16) (104 36 . 16) ... |
5e4d73056dec48329e64ac1703adc1f7855ccb9424a96d29beec2fc4aef564fc | loganallen/CmlControl | branch.ml | open Unix
open Universal
(****************************** Branch Module *********************************)
(******************************************************************************)
(* validate the branch name *)
let validate_branch (branch : string) : unit =
if branch.[0] = '.' || branch.[0] = '-' then
ra... | null | https://raw.githubusercontent.com/loganallen/CmlControl/24bf4616b36672bc12225b9bd93b1ae662733663/modules/branch.ml | ocaml | ***************************** Branch Module ********************************
****************************************************************************
validate the branch name
returns a list of all branches in alphabetical order
returns string of name of the current branch
returns the head ptr of the given bra... | open Unix
open Universal
let validate_branch (branch : string) : unit =
if branch.[0] = '.' || branch.[0] = '-' then
raise (Fatal "invalid branch name")
else ()
let get_branches () : string list =
let rec branch_loop acc q =
match q with
| [] -> acc
| h::t -> begin
let temp = ".cml/head... |
9577acab680743e577028559d99c681b704384e56b860b088963ac4a5fe63a2e | dsorokin/aivika | MachRep3.hs |
It corresponds to model MachRep3 described in document
-- Introduction to Discrete-Event Simulation and the SimPy Language
-- [/~matloff/156/PLN/DESimIntro.pdf].
SimPy is available on [ / ] .
--
-- The model description is as follows.
--
Variation of models MachRep1 , MachRep2 . Two machines , but
-- sometim... | null | https://raw.githubusercontent.com/dsorokin/aivika/7a14f460ab114b0f8cdfcd05d5cc889fdc2db0a4/examples/MachRep3.hs | haskell | Introduction to Discrete-Event Simulation and the SimPy Language
[/~matloff/156/PLN/DESimIntro.pdf].
The model description is as follows.
sometimes break down. Up time is exponentially distributed with mean
until both machines are down. We find the proportion of up time. It
number of machines currently up
... |
It corresponds to model MachRep3 described in document
SimPy is available on [ / ] .
Variation of models MachRep1 , MachRep2 . Two machines , but
1.0 , and repair time is exponentially distributed with mean 0.5 . In
this example , there is only one repairperson , and she is not summoned
should come out to ... |
d0cc1a12e3f172a4ee8661db5051acfb2abf41ef2d5829790c04b90b22181329 | Clozure/ccl-tests | load-pathnames.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Nov 29 04:33:05 2003
;;;; Contains: Load tests for pathnames and logical pathnames
(in-package :cl-test)
(compile-and-load "pathnames-aux.lsp")
(load "pathnames.lsp")
(load "pathname.lsp")
(load "pathnamep.lsp")
(load "make-pathname.lsp")
(load "pathname-host... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/load-pathnames.lsp | lisp | -*- Mode: Lisp -*-
Contains: Load tests for pathnames and logical pathnames | Author :
Created : Sat Nov 29 04:33:05 2003
(in-package :cl-test)
(compile-and-load "pathnames-aux.lsp")
(load "pathnames.lsp")
(load "pathname.lsp")
(load "pathnamep.lsp")
(load "make-pathname.lsp")
(load "pathname-host.lsp")
(load "pathname-device.lsp")
(load "pathname-directory.lsp")
(load "pathname-na... |
c61a2d7f0d74dca670688bb2a5293301df8b3f13df5932800913d537b344ff34 | db48x/xe2 | tutorial.lisp | (in-package :xong)
;;; Text labels
(defcell balloon
(categories :initform '(:drawn :actor))
text stroke-color background-color timeout)
(define-method initialize balloon (&key text (stroke-color ".white") (background-color ".blue")
(style :balloon) (timeout nil))
(setf <text> text)
(setf <stroke-color>... | null | https://raw.githubusercontent.com/db48x/xe2/7896fcc69f5c6e28eaf6f6abb7966d6663370a66/xong/tutorial.lisp | lisp | Text labels
leave as frames if integer | (in-package :xong)
(defcell balloon
(categories :initform '(:drawn :actor))
text stroke-color background-color timeout)
(define-method initialize balloon (&key text (stroke-color ".white") (background-color ".blue")
(style :balloon) (timeout nil))
(setf <text> text)
(setf <stroke-color> stroke-color)
... |
2700473678a52c15ca5f17a9a9ee1d4bdc752e4ffdb122197f424bd95935e88c | bdeket/rktsicm | quad.rkt | #lang racket/base
(require "quad/quad-flo.rkt"
)
(provide (all-from-out "quad/quad-flo.rkt"
)) | null | https://raw.githubusercontent.com/bdeket/rktsicm/588acaf709a0e652b6474921f85524926d0f218d/rktsicm/sicm/numerics/quad.rkt | racket | #lang racket/base
(require "quad/quad-flo.rkt"
)
(provide (all-from-out "quad/quad-flo.rkt"
)) | |
57c86361accb3cfa133238b926406e72ced29fa650b96d797f0dc229fce2b5ae | dinosaure/cri | nickname.ml | type t = string
module BNF = struct
open Angstrom
let nickname = peek_char >>= function
| Some ('a' .. 'z' | 'A' .. 'Z' | '\x5b' .. '\x60' | '\x7b' .. '\x7d') ->
( take_while1 @@ function
| 'a' .. 'z'
| 'A' .. 'Z'
| '0' .. '9'
| '\x5b' .. '\x60'
| '\x7b' .. '\x7d'
| '... | null | https://raw.githubusercontent.com/dinosaure/cri/ef0a05a9d8c18a0cd35b9ad4984d8ea01ee64f03/lib/nickname.ml | ocaml | type t = string
module BNF = struct
open Angstrom
let nickname = peek_char >>= function
| Some ('a' .. 'z' | 'A' .. 'Z' | '\x5b' .. '\x60' | '\x7b' .. '\x7d') ->
( take_while1 @@ function
| 'a' .. 'z'
| 'A' .. 'Z'
| '0' .. '9'
| '\x5b' .. '\x60'
| '\x7b' .. '\x7d'
| '... | |
ca45a366430ba79ef8630f503122264df4fdb6d927060d8dad229afbc25fad76 | transient-haskell/transient-stack | test5.hs | #!/usr/bin/env execthirdlinedocker.sh
info : use sed -i ' s/\r//g ' file if report " /usr / bin / env : ‘ execthirdlinedocker.sh\r ’ : No such file or directory "
LIB="./ " & & runghc -DDEBUG -i${LIB}/transient / src -i${LIB}/transient - universe / src -i${LIB}/axiom / src $ 1 $ { 2 } $ { 3 }
{-# LANGUAGE... | null | https://raw.githubusercontent.com/transient-haskell/transient-stack/dde6f6613a946d57bb70879a5c0e7e5a73a91dbe/transient/tests/test5.hs | haskell | # LANGUAGE ScopedTypeVariables, OverloadedStrings #
import Transient.Move
import Transient.Move.Utils
import Transient.Logged
import Transient.EVars
async exceptions
-------------------------------------------------------
labelState "JOB" | #!/usr/bin/env execthirdlinedocker.sh
info : use sed -i ' s/\r//g ' file if report " /usr / bin / env : ‘ execthirdlinedocker.sh\r ’ : No such file or directory "
LIB="./ " & & runghc -DDEBUG -i${LIB}/transient / src -i${LIB}/transient - universe / src -i${LIB}/axiom / src $ 1 $ { 2 } $ { 3 }
module Main ... |
d28b91baaa873c2b9f75b5893c003e2597b6ce1a0930ed613e237b2268393584 | klarna/jesse | jesse_schema_validator.erl | %%%=============================================================================
Copyright 2014 Klarna AB
%%
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
%%
%% Unles... | null | https://raw.githubusercontent.com/klarna/jesse/830738e8a03413851cc48a55a5e70f459391cc00/src/jesse_schema_validator.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... | Copyright 2014 Klarna AB
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@doc Json schema validation module .
This module is the core of jesse , it implements the validation functionality
-module(jesse_schema_validator... |
e819dd9038e4c314080fe15674a3f399e19084eec6af730e508687e5a752e6bd | danieljharvey/mimsa | Shared.hs | module Calc.Parser.Shared
( inBrackets,
myLexeme,
withLocation,
stringLiteral,
addLocation,
addTypeLocation,
)
where
import Calc.ExprUtils
import Calc.Parser.Types
import Calc.TypeUtils
import Calc.Types.Annotation
import Data.Functor (($>))
import Data.Text (Text)
import Text.Megaparsec
import... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/c5bcab3e9f961216cea540edb95a8a66db773980/llvm-calc2/src/Calc/Parser/Shared.hs | haskell | | wraps any parser of Type and adds location information | module Calc.Parser.Shared
( inBrackets,
myLexeme,
withLocation,
stringLiteral,
addLocation,
addTypeLocation,
)
where
import Calc.ExprUtils
import Calc.Parser.Types
import Calc.TypeUtils
import Calc.Types.Annotation
import Data.Functor (($>))
import Data.Text (Text)
import Text.Megaparsec
import... |
b1b6b01acc17c05a150432b79b369ddc1e71180ba377e93d14a24b29df3b7ed5 | alanz/ghc-exactprint | CommentPlacement5.hs | module CommentPlacement5 where
bar :: Foo -> ()
bar a =
case a of
GInt -> ()
-- GBool -> ()
bar _ = ()
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/3b36f5d0a498e31d882fe111304b2cf5ca6cad22/tests/examples/ghc92/CommentPlacement5.hs | haskell | GBool -> () | module CommentPlacement5 where
bar :: Foo -> ()
bar a =
case a of
GInt -> ()
bar _ = ()
|
c8581d50ba8da33d2993cc3931cb99f97b31ec2dfca3c1ae74000d8c8fed6db3 | jackfirth/racket-expect | rackunit.rkt | #lang reprovide
"private/rackunit/main.rkt"
| null | https://raw.githubusercontent.com/jackfirth/racket-expect/9530df30537ae05400b6a3add9619e5f697dca52/rackunit.rkt | racket | #lang reprovide
"private/rackunit/main.rkt"
| |
706e153742e9dfbccb85a3b6b936a755c820b052cdeed2b1345a8c20765b1e13 | Kakadu/fp2022 | utils.mli | * Copyright 2021 - 2022 ,
* SPDX - License - Identifier : LGPL-3.0 - or - later
val explode : string -> char list
val implode : char list -> Stdlib.String.t
val isChar : char -> bool
val isDigit : char -> bool
| null | https://raw.githubusercontent.com/Kakadu/fp2022/47f471ccdb86713930e4aa518a96bf4ce0b3e53f/Lua/lib/utils.mli | ocaml | * Copyright 2021 - 2022 ,
* SPDX - License - Identifier : LGPL-3.0 - or - later
val explode : string -> char list
val implode : char list -> Stdlib.String.t
val isChar : char -> bool
val isDigit : char -> bool
| |
525c518d385311238c85e374b8acae66d293d04b7c814466321b1e9e37cfd083 | vikram/lisplibraries | examples.lisp | Copyright ( c ) 2007 , 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... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/vecto-1.1/doc/examples.lisp | lisp |
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 binary form ... | Copyright ( c ) 2007 , All Rights Reserved
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
$ I d : examples.lisp , v 1.4 2007/10/01 19:57:15 xach Exp $
(defpackage #:vecto-examples
(:use #:cl #:vecto))
(in-package #:vec... |
5268483d17112f33f223ed9bd6da06e99cbcb09d13052f4eb8942a056e81f18a | tek/proteome | PersistLoadTest.hs | module Proteome.Test.PersistLoadTest where
import qualified Data.Text.IO as Text
import Exon (exon)
import Path (absdir, reldir, relfile, toFilePath, (</>))
import Path.IO (createDirIfMissing)
import qualified Polysemy.Test as Test
import Polysemy.Test (UnitTest, assertJust, (===))
import Ribosome (pathText)
import Ri... | null | https://raw.githubusercontent.com/tek/proteome/019928432bd5f5ba87d35eab19e341a5c98b1bba/packages/proteome/test/Proteome/Test/PersistLoadTest.hs | haskell | module Proteome.Test.PersistLoadTest where
import qualified Data.Text.IO as Text
import Exon (exon)
import Path (absdir, reldir, relfile, toFilePath, (</>))
import Path.IO (createDirIfMissing)
import qualified Polysemy.Test as Test
import Polysemy.Test (UnitTest, assertJust, (===))
import Ribosome (pathText)
import Ri... | |
5a8dfabd02ee3bbab145315e36fff3c5bf6e8a4d4b7715c4e16a42bc2bd7746d | pablo-meier/ScrabbleCheat | move.erl | -module(move).
-define(SCRABBLE_RACK_SIZE, 7).
-define(SCRABBLE_BINGO_BONUS, 50).
-include("gameinfo.hrl").
-import(tile, [get_tile_letter/1, is_wildcard/1, get_tile_location/1, is_occupied/1, get_tile_bonus/1, duplicate_tile/2]).
-import(board, [place_move_on_board/2, to_beginning/1, orthogonals/1, get_adjacent/3, ... | null | https://raw.githubusercontent.com/pablo-meier/ScrabbleCheat/718cb768a910f2ba7ca6cd1d2aae0e342849bf0a/code/server/src/move.erl | erlang | The move datatype. Checks structural integrity of moves, not
responsible for legal placement relative to a board, or dictionary
checks. Implemented simply as a list of tuples.
new_move :: () -> Move
The atom prevents move from being flattened.
add_to_move :: Tile * Move -> Move
Adds to the move, or throws an... | -module(move).
-define(SCRABBLE_RACK_SIZE, 7).
-define(SCRABBLE_BINGO_BONUS, 50).
-include("gameinfo.hrl").
-import(tile, [get_tile_letter/1, is_wildcard/1, get_tile_location/1, is_occupied/1, get_tile_bonus/1, duplicate_tile/2]).
-import(board, [place_move_on_board/2, to_beginning/1, orthogonals/1, get_adjacent/3, ... |
fb33f4680c1aac5f014cb51170d889aa00806708fbfd0cc8b5351dcb01977e8d | DogLooksGood/holdem | player_avatar_cards.cljs | (ns poker.components.player-avatar-cards
(:require
[nubank.workspaces.core :as ws]
[nubank.workspaces.card-types.react :as ct.react]
[poker.components.player-avatar :refer [player-avatar]]
[reagent.core :as reagent]))
(ws/defcard player-at-showdown
(ct.react/react-card
(reagent/as-element [player-a... | null | https://raw.githubusercontent.com/DogLooksGood/holdem/bc0f93ed65cab54890c91f78bb95fe3ba020a41f/test/cljs/poker/components/player_avatar_cards.cljs | clojure | (ns poker.components.player-avatar-cards
(:require
[nubank.workspaces.core :as ws]
[nubank.workspaces.card-types.react :as ct.react]
[poker.components.player-avatar :refer [player-avatar]]
[reagent.core :as reagent]))
(ws/defcard player-at-showdown
(ct.react/react-card
(reagent/as-element [player-a... | |
68720f712263ddd8e7467c2d0e6f849c12c28428c244526a720ffc29b00436f6 | yzhs/ocamlllvm | asmpackager.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/asmcomp/asmpackager.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2002 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 .
$ Id$
" Package " a set of .cmx/.o... |
c03904f459ec875d075044e0401cd8aed9faddd3dc3d6a4310ad955860bb5913 | nervous-systems/kvlt | chan.cljc | (ns kvlt.test.chan
(:require [kvlt.chan :as chan]
#? (:clj [clojure.core.async :as async :refer [go]])
#? (:cljs [cljs.core.async :as async])
[kvlt.test.util :as util #?(:clj :refer :cljs :refer-macros) [deftest is=]])
#? (:cljs (:require-macros [cljs.core.async.macros :refer [g... | null | https://raw.githubusercontent.com/nervous-systems/kvlt/26fe43eb9de6d7cc7ad8a466953fa0ffe09889ca/test/kvlt/test/chan.cljc | clojure | (ns kvlt.test.chan
(:require [kvlt.chan :as chan]
#? (:clj [clojure.core.async :as async :refer [go]])
#? (:cljs [cljs.core.async :as async])
[kvlt.test.util :as util #?(:clj :refer :cljs :refer-macros) [deftest is=]])
#? (:cljs (:require-macros [cljs.core.async.macros :refer [g... | |
aecfc1832226b7f6a7beda41d19733db6a769f0ae1e775a8230b8d6cc548dadb | clojure-interop/aws-api | AWSServiceCatalogAsyncClientBuilder.clj | (ns com.amazonaws.services.servicecatalog.AWSServiceCatalogAsyncClientBuilder
"Fluent builder for AWSServiceCatalogAsync. Use of the builder is
preferred over using constructors of the client class."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.services.servicecatalog AWSServiceCatal... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.servicecatalog/src/com/amazonaws/services/servicecatalog/AWSServiceCatalogAsyncClientBuilder.clj | clojure | (ns com.amazonaws.services.servicecatalog.AWSServiceCatalogAsyncClientBuilder
"Fluent builder for AWSServiceCatalogAsync. Use of the builder is
preferred over using constructors of the client class."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.services.servicecatalog AWSServiceCatal... | |
d9f88d01003efa13b2e870a2c13838d2c7b9d71d11de0d0a928cb5f6933bd5b7 | sinahab/shamir-secret-sharing | UtilSpec.hs | module UtilSpec (main, spec) where
import Test.Hspec
import Util (combinations)
-- `main` is here so that this module can be run from GHCi on its own. It is
-- not needed for automatic spec discovery.
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "combinations" $ do
it "Returns all possible... | null | https://raw.githubusercontent.com/sinahab/shamir-secret-sharing/9c39190f52f2316962d597fc5307819d68c7c790/test/UtilSpec.hs | haskell | `main` is here so that this module can be run from GHCi on its own. It is
not needed for automatic spec discovery. | module UtilSpec (main, spec) where
import Test.Hspec
import Util (combinations)
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "combinations" $ do
it "Returns all possible combinations of n elements." $ do
let myList = [1,2,3,4]
combinations 1 myList `shouldBe` [[1], [2], [... |
4307c48600638c6f2752bece8290a7f7547390e5109fd024a5cbc53a3e675353 | mcorbin/tour-of-clojure | functions.clj | (defn add-five
"Add 5 to the number `n`"
[n]
(+ 5 n))
(println (add-five 5))
(println (add-five 10.5) "\n")
(def multiply
"multiply the 2 parameters"
(fn [n m]
(+ n m) ;; do nothing
(str "Hello " "world" "!") ;; do nothing
(println "Side effects") ... | null | https://raw.githubusercontent.com/mcorbin/tour-of-clojure/57f97b68ca1a8c96904bfb960f515217eeda24a6/resources/public/pages/code/functions.clj | clojure | do nothing
do nothing
i/o
returned value
you can define functions using #(...) | (defn add-five
"Add 5 to the number `n`"
[n]
(+ 5 n))
(println (add-five 5))
(println (add-five 10.5) "\n")
(def multiply
"multiply the 2 parameters"
(fn [n m]
(println (multiply 2 4) "\n")
(def add-three #(+ % 3))
(println (add-three 10) "\n")
(def add #(+ %1 %2))
(println (add 10 5))
|
faaafbe88c5b8c64bbde2aaf1906f074a18b944ca12b89d9998be230ae144f74 | nboldi/c-parser-in-haskell | PrettyPrint.hs | # LANGUAGE FlexibleInstances , FlexibleContexts , UndecidableInstances , NamedFieldPuns #
-- | Adds source templates to a source tree and uses them
-- to pretty print it with the original format.
module MiniC.PrettyPrint where
import SourceCode.SourceTree
import SourceCode.ToSourceTree
import MiniC.SourceNota... | null | https://raw.githubusercontent.com/nboldi/c-parser-in-haskell/1a92132e7d1b984cf93ec89d6836cc804257b57d/MiniC/PrettyPrint.hs | haskell | | Adds source templates to a source tree and uses them
to pretty print it with the original format.
| Pretty prints an AST by using source templates stored as node info
When only a part of the source tree is printed,
linked nodes can be missing.
Left err -> error ("Error while pretty printing: "
++ err +... | # LANGUAGE FlexibleInstances , FlexibleContexts , UndecidableInstances , NamedFieldPuns #
module MiniC.PrettyPrint where
import SourceCode.SourceTree
import SourceCode.ToSourceTree
import MiniC.SourceNotation
import MiniC.Representation
import MiniC.RangeTree
import Data.Maybe
import Data.List
import Data.F... |
e5edd2366885295fe84e7e585ae982c8ea859e0e18e9220aedb923cbb17450d3 | alanz/ghc-exactprint | T11077.hs | module T11077 (module X, foo) where
import Data.List as X
foo = undefined
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/T11077.hs | haskell | module T11077 (module X, foo) where
import Data.List as X
foo = undefined
| |
d7cde20d7b825b5534f775b312966a52c8d4ae705a81e145b57807e023950a5e | sebashack/servantRestfulAPI | Interpreter.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeOper... | null | https://raw.githubusercontent.com/sebashack/servantRestfulAPI/e625535d196acefaff4f5bf03108816be668fe4d/libs/Domains/BookingDomain/Bookable/Interpreter.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
Also note that we are using sets for roomIds so that we avoid repetition.
Given a bookableId, get that bookable. ... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# LANGUAGE ScopedTypeVariables #
module Domains.BookingDomain.Bookable.Interpreter ( bookableServer ) where
import Data.ByteString.Char8 (... |
4f31c433e150da3021f670ab523c552bd35c8fe2cbbeeb66fa3c490239d254ed | clojure/core.typed | method.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/src/clojure/core/typed/checker/check/jvm/method.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns clojure.core.typed.checker.check.jvm.method
(:require [clojure.core.typed.checker.type-rep :as r]
[clojure.core.typed.util-vars :as vs]
[clojure.core.typed.errors :as err]
[clojure.core.typed.checker.check.jvm.type-hints :as type-hin... |
ee7acfb83dfeea974279216cdc0a62ccc7f61f58ee0122334b1ad386fb0e528b | duo-lang/duo-lang | Options.hs | module Options
( Options(..)
, DebugFlags(..)
, parseOptions
) where
import Data.Foldable (fold)
import Options.Applicative
data Options where
OptLSP :: Options
OptRun :: FilePath -> DebugFlags -> Options
OptTypecheck :: FilePath -> DebugFlags -> Options
OptDeps :: FilePath -> Options
OptV... | null | https://raw.githubusercontent.com/duo-lang/duo-lang/09bc7abc451049e1aadd9b4e7ba8019ff14b8953/app/Options.hs | haskell | -------------------------------------------------------------------------------
Debug flags
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------... | module Options
( Options(..)
, DebugFlags(..)
, parseOptions
) where
import Data.Foldable (fold)
import Options.Applicative
data Options where
OptLSP :: Options
OptRun :: FilePath -> DebugFlags -> Options
OptTypecheck :: FilePath -> DebugFlags -> Options
OptDeps :: FilePath -> Options
OptV... |
d88d4fce07e50696873f9e10ae15797336f57827887292eea75b4b56700a3d73 | jeromesimeon/Galax | namespace_symbols.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/namespace/namespace_symbols.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : namespace_symbols.ml , v 1.12 2007/08/20 13:12:40 simeon Exp $
open Error
open Pool
open Namespace_names
open Namespace_builtin
open Namespace_context
module Prefix =
struct
type t = prefix
let equal = ... |
6b51adc583f9223390c9abaef9d732db2001b50d50aeb9c18b179db57b79b8ef | jarohen/yoyo | yoyo_api.clj | (ns leiningen.new.yoyo-api
(:require [leiningen.new.templates :refer [renderer name-to-path ->files]]))
(def render (renderer "yoyo-api"))
(defn yoyo-api
"Create a new Yo-yo API"
[app-name]
(println "Creating a new Yo-yo API...")
(let [data {:name app-name
:sanitized (name-to-path app-name)}... | null | https://raw.githubusercontent.com/jarohen/yoyo/b579d21becd06b5330dee9f5963708db03ce1e25/templates/yoyo-api/src/leiningen/new/yoyo_api.clj | clojure | (ns leiningen.new.yoyo-api
(:require [leiningen.new.templates :refer [renderer name-to-path ->files]]))
(def render (renderer "yoyo-api"))
(defn yoyo-api
"Create a new Yo-yo API"
[app-name]
(println "Creating a new Yo-yo API...")
(let [data {:name app-name
:sanitized (name-to-path app-name)}... | |
1bbc0dd70e0febc35accc4b8385167d48396ea4eceee8cd5ffcaa20f9a0ae17e | janestreet/core_bench | benchmark.ml | open Core
open Core_bench_internals
module Unix = Core_unix
let stabilize_gc () =
let rec loop failsafe last_heap_live_words =
if failsafe <= 0
then failwith "unable to stabilize the number of live words in the major heap";
Gc.compact ();
let stat = Gc.stat () in
if stat.Gc.Stat.live_words <> las... | null | https://raw.githubusercontent.com/janestreet/core_bench/d3bf745cdaf8a0b169c5e464584a35aeb5b08291/src/benchmark.ml | ocaml | The main benchmarking function
test function
the samples
counters
THE MAIN TEST LOOP
pre-run measurements
MEASURE A SINGLE SAMPLE
END OF MEASUREMENT
post-run measurements
save measurements
determine the next number of runs
if [next] would put us over the quota, we decrease as necessary
otherwis... | open Core
open Core_bench_internals
module Unix = Core_unix
let stabilize_gc () =
let rec loop failsafe last_heap_live_words =
if failsafe <= 0
then failwith "unable to stabilize the number of live words in the major heap";
Gc.compact ();
let stat = Gc.stat () in
if stat.Gc.Stat.live_words <> las... |
48bc56b7369b1aabba4ac7b5602308a155575ef9b660988db46c0b0a03402de2 | Vaguery/klapaucius | set_able_test.clj | (ns push.instructions.aspects.set-able-test
(:require [push.interpreter.core :as i])
(:require [push.core :as push])
(:use midje.sweet)
(:use push.util.stack-manipulation)
(:use push.type.core)
(:use push.instructions.aspects)
(:use push.instructions.aspects.set-able)
)
;; set-able instructions
(f... | null | https://raw.githubusercontent.com/Vaguery/klapaucius/17b55eb76feaa520a85d4df93597cccffe6bdba4/test/push/instructions/aspects/set_able_test.clj | clojure | set-able instructions | (ns push.instructions.aspects.set-able-test
(:require [push.interpreter.core :as i])
(:require [push.core :as push])
(:use midje.sweet)
(:use push.util.stack-manipulation)
(:use push.type.core)
(:use push.instructions.aspects)
(:use push.instructions.aspects.set-able)
)
(fact "conj-set-instruction... |
26291a48f8a6664ac2818dd26578094caf9a7ce8dd2bc6d350ceff8034b920ba | isovector/ld52 | DespawnTrigger.hs | module Game.Objects.DespawnTrigger where
import Control.Monad (void)
import qualified Data.Map as M
import Data.Monoid
import Game.Common
despawnTrigger :: V2 WorldPos -> OriginRect Double -> Set ObjectId -> Object
despawnTrigger pos ore despawns =
playerHitRectObj'
(proc oi -> d... | null | https://raw.githubusercontent.com/isovector/ld52/949f6f589672fcaf24e7fffa8f737092993c7b6e/src/Game/Objects/DespawnTrigger.hs | haskell | module Game.Objects.DespawnTrigger where
import Control.Monad (void)
import qualified Data.Map as M
import Data.Monoid
import Game.Common
despawnTrigger :: V2 WorldPos -> OriginRect Double -> Set ObjectId -> Object
despawnTrigger pos ore despawns =
playerHitRectObj'
(proc oi -> d... | |
3246aad80bda4c81ec05aa2dd2c65373873c67ca1cffa5f69ad888c10987fda2 | racket/racket-lang-org | docs.rkt | #lang plt-web
(require (only-in "../www/resources.rkt" www-site)
"../testing.rkt"
plt-web/private/image-version)
(define docs-site (site "stubs/docs"
#:url (rewrite-for-testing "-lang.org/")
#:always-abs-url? #t
#:page-style? #... | null | https://raw.githubusercontent.com/racket/racket-lang-org/88dada2ee769ada9afaf1e3ec1fb28b8ddf216db/stubs/docs.rkt | racket | This is a stub page to get the header for tweaked doc pages
| #lang plt-web
(require (only-in "../www/resources.rkt" www-site)
"../testing.rkt"
plt-web/private/image-version)
(define docs-site (site "stubs/docs"
#:url (rewrite-for-testing "-lang.org/")
#:always-abs-url? #t
#:page-style? #... |
d1be86761a8cffdb27cf552d4c032e6e83c0eefc31ed0c76b2d0ff5a1dc8a1f0 | juspay/atlas | LocationGps.hs | |
Copyright 2022 Juspay Technologies Pvt 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
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/public-transport-bap/src/Core/Spec/Search/LocationGps.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt 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
Unless required by applicable law or agreed to in writing , software
dis... | |
a3935cbf90610e6f726daae134894899c9915792f962355af6b80a7c6b231168 | jjsimpso/magic | reader-tester.rkt | #lang magic
#Copyright 2019 Jonathan Simpson
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# -2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | null | https://raw.githubusercontent.com/jjsimpso/magic/d5f6804ee2cf9b927efda07c31355e29d6bbe38b/reader-tester.rkt | racket |
|[[]) | #lang magic
#Copyright 2019 Jonathan Simpson
#
# 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
# distributed under the License is distributed on an "AS IS" BASIS,
... |
8af3c026bc10af6806f5de54fc543eb5bb94b11672145d4ce9aabe0a87e0d024 | ghcjs/jsaddle-dom | CommandLineAPIHost.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.CommandLineAPIHost
(clearConsoleMessages, copyText, inspect, inspectedObject,
inspectedObject_, getEventLis... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/CommandLineAPIHost.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.CommandLineAPIHost
(clearConsoleMessages, copyText, inspect, inspectedObject,
inspectedObject_, getEventListeners, getEventListeners_,
databaseId, databaseId_, storageId, storageId_,
Command... |
a0ad4b56369bc200bc7b607943772f6c21d7e6664e19995fb89309aff401026b | asmala/clj-simple-form | i18n.clj | (ns clj-simple-form.i18n
"Functions for translating form contents, such as labels."
(:require [taoensso.tower :as tower]))
(def ^:dynamic *translation-scope* [])
(defmacro with-form-translation-scope
"Sets up a binding for form element translations.
### Example
(with-form-translation-scope :profile
... | null | https://raw.githubusercontent.com/asmala/clj-simple-form/b1c566b1f0fe532639b15832b557f1608598a0a2/clj-simple-form-core/src/clj_simple_form/i18n.clj | clojure | (ns clj-simple-form.i18n
"Functions for translating form contents, such as labels."
(:require [taoensso.tower :as tower]))
(def ^:dynamic *translation-scope* [])
(defmacro with-form-translation-scope
"Sets up a binding for form element translations.
### Example
(with-form-translation-scope :profile
... | |
51f5e6048ddec3ade1bc4aa3062d0700fdc672ea6fe278a2a22b7f76eecb7c20 | thi-ng/demos | utils.clj | (ns ws-ldn-2.utils)
(defn deep-merge
"Merge fn to be used with `merge-with`. Recursively merges map
values which are maps or seqs (for the latter `into` is used). If
the RHS value has the metadata key :replace set, it is used as new
value without merging."
[l r]
(cond
(:replace (meta r)) r
... | null | https://raw.githubusercontent.com/thi-ng/demos/048cd131099a7db29be56b965c053908acad4166/ws-ldn-2/src/clj/ws_ldn_2/utils.clj | clojure | example usage
; merged
:d ["e" "e2"] ;; merged
:f ["f2"] ;; replaced | (ns ws-ldn-2.utils)
(defn deep-merge
"Merge fn to be used with `merge-with`. Recursively merges map
values which are maps or seqs (for the latter `into` is used). If
the RHS value has the metadata key :replace set, it is used as new
value without merging."
[l r]
(cond
(:replace (meta r)) r
... |
4336dc159d2b213eebf7dfec667f180fc0da5d45c4fe7f73a202ead7a102e2c9 | inhabitedtype/ocaml-aws | unassignIpv6Addresses.ml | open Types
open Aws
type input = UnassignIpv6AddressesRequest.t
type output = UnassignIpv6AddressesResult.t
type error = Errors_internal.t
let service = "ec2"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endp... | null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/ec2/lib/unassignIpv6Addresses.ml | ocaml | open Types
open Aws
type input = UnassignIpv6AddressesRequest.t
type output = UnassignIpv6AddressesResult.t
type error = Errors_internal.t
let service = "ec2"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endp... | |
e811076e1a98c9bde5727b489ac7d73c9f3e06c405aafc8cae4563779893b710 | DomainDrivenArchitecture/dda-git-crate | app.clj | Licensed to the Apache Software Foundation ( ASF ) under one
; or more contributor license agreements. See the NOTICE file
; distributed with this work for additional information
; regarding copyright ownership. The ASF licenses this file
to you under the Apache License , Version 2.0 ( the
; "License"); you may not... | null | https://raw.githubusercontent.com/DomainDrivenArchitecture/dda-git-crate/3c6ea47931bc4566692f3fbf70ef2ecda1ec750b/main/src/dda/pallet/dda_git_crate/app.clj | clojure | or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
"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 b... | Licensed to the Apache Software Foundation ( ASF ) under one
to you under the Apache License , Version 2.0 ( the
distributed under the License is distributed on an " AS IS " BASIS ,
(ns dda.pallet.dda-git-crate.app
(:require
[schema.core :as s]
[dda.pallet.commons.secret :as secret]
[dda.pallet.core.a... |
d5e240dae4a0dd2dfea0b600b2d119d12f1791417afcfc55a6de4d357bf7e5c4 | logicmoo/wam_common_lisp | package.lsp | -*- Mode : LISP ; Syntax : Common - lisp ; Base : 10 ; Lowercase : Yes ; -*-
Copyright ( c ) 1990 X Consortium
;;;
;;; Permission is hereby granted, free of charge, to any person obtaining
;;; a copy of this software and associated documentation files (the
" Software " ) , to deal in the Software without res... | null | https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/prolog/wam_cl/src/clx/package.lsp | lisp | Syntax : Common - lisp ; Base : 10 ; Lowercase : Yes ; -*-
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
the following conditions:
The above copyright n... | Copyright ( c ) 1990 X Consortium
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to
permit persons to whom the Software is furnished to do so , subject to
in all copies or substantial portions of the Software .
TH... |
a133cac353979c6f74eb26334eba0737acfb1880e51279269dfefbd30f28d630 | why-not-try-calmer/feedo | Mongo.hs | # LANGUAGE RecordWildCards #
module Mongo (saveToLog, HasMongo (..), checkDbMapper) where
import Control.Concurrent (writeChan)
import Control.Exception
import Control.Monad (unless, when)
import Control.Monad.IO.Class (MonadIO (liftIO))
import Crypto.Hash (SHA256 (SHA256), hashWith)
import Data.Aeson (eitherDecodeSt... | null | https://raw.githubusercontent.com/why-not-try-calmer/feedo/15d9bbc0551894a1d3d04cd4711e4e956d213554/src/Mongo.hs | haskell | Evaluation
Actions
FIX ME --
This should be adapted to the Data API
Items
Feeds
Chats, Settings
Logs
Admins
Pages
Cleanup
Mapping | # LANGUAGE RecordWildCards #
module Mongo (saveToLog, HasMongo (..), checkDbMapper) where
import Control.Concurrent (writeChan)
import Control.Exception
import Control.Monad (unless, when)
import Control.Monad.IO.Class (MonadIO (liftIO))
import Crypto.Hash (SHA256 (SHA256), hashWith)
import Data.Aeson (eitherDecodeSt... |
528de2b6cce354768480479be4253d41831bf9dbe1043f4b828592f04ddcea6e | codedownio/sandwich | HasMainFunction.hs | {-# LANGUAGE MultiWayIf #-}
# LANGUAGE TemplateHaskell #
module Test.Sandwich.TH.HasMainFunction (
fileHasMainFunction
, ShouldWarnOnParseError(..)
) where
import Control.Monad
import Data.String.Interpolate
import Language.Haskell.Exts
import Language.Haskell.TH (runIO, reportWarning)
-- import Debug.Trace
... | null | https://raw.githubusercontent.com/codedownio/sandwich/9c8f56b5aee94ba65c70b3e52bde8959010aecc1/sandwich/src/Test/Sandwich/TH/HasMainFunction.hs | haskell | # LANGUAGE MultiWayIf #
import Debug.Trace
traceM [i|Sucessfully parsed #{path}: #{moduleHead}|]
traceM [i|FOUND MAIN FUNCTION FOR #{path}|] | # LANGUAGE TemplateHaskell #
module Test.Sandwich.TH.HasMainFunction (
fileHasMainFunction
, ShouldWarnOnParseError(..)
) where
import Control.Monad
import Data.String.Interpolate
import Language.Haskell.Exts
import Language.Haskell.TH (runIO, reportWarning)
data ShouldWarnOnParseError = WarnOnParseError | N... |
a412e4049ff79e752437b7a24f6701f5fae616928bf70a5a9c406590691a8425 | yomimono/stitchcraft | ingest.ml | open Lwt.Infix
let p_name =
let doc = "name to associate with the pattern" in
Cmdliner.Arg.(value & pos 0 string "My Very Excellent Mother Just Served Us Nine Patterns!" & info [] ~doc ~docv:"NAME")
let input =
let doc = "file to read for pattern ingestion. -, the default, is stdin" in
Cmdliner.Arg.(value & ... | null | https://raw.githubusercontent.com/yomimono/stitchcraft/6b57efa8a145541e976c9cb1f04ffde984b318bd/ingest_pattern/ingest.ml | ocaml | open Lwt.Infix
let p_name =
let doc = "name to associate with the pattern" in
Cmdliner.Arg.(value & pos 0 string "My Very Excellent Mother Just Served Us Nine Patterns!" & info [] ~doc ~docv:"NAME")
let input =
let doc = "file to read for pattern ingestion. -, the default, is stdin" in
Cmdliner.Arg.(value & ... | |
2115a9928bc9f764517d1ebe38f373f1bd64b7d8fce6b3342ce6dff7f446769b | haskell-works/hw-prim | Container.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
module HaskellWorks.Data.Container
( Container(..)
) where
import Data.Int
import Data.Word
import qualified Data.ByteString as BS
import qualified Data.Vector as DV
import qualified Data.... | null | https://raw.githubusercontent.com/haskell-works/hw-prim/aff74834cd2d3fb0eb4994b24b2d1cdef1e3e673/src/HaskellWorks/Data/Container.hs | haskell | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
module HaskellWorks.Data.Container
( Container(..)
) where
import Data.Int
import Data.Word
import qualified Data.ByteString as BS
import qualified Data.Vector as DV
import qualified Data.... | |
bfd8817fd97665c2c4f2d9a55f369c1d962d373bb8c4a5ab7fcf56f653753041 | Jell/euroclojure-2016 | project.clj | (defproject euroclojure "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:min-lein-version "2.6.1"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.89"]
[org.clojure... | null | https://raw.githubusercontent.com/Jell/euroclojure-2016/a8ca883e8480a4616ede19995aaacd4a495608af/project.clj | clojure | the presence of a :figwheel configuration here
will cause figwheel to inject the figwheel client
into your build
:open-urls will pop open your application
started and complied your application.
Comment this out once it no longer serves you.
-devtools
This next build is an compressed minified build for
producti... | (defproject euroclojure "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:min-lein-version "2.6.1"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.89"]
[org.clojure... |
635025a29ee67301fcc1afe24b48c7ae0b44b1d787aec38b477c1783688c8cc3 | hakaru-dev/hakaru | Summary.hs | # LANGUAGE CPP ,
OverloadedStrings ,
PatternGuards ,
DataKinds ,
KindSignatures ,
GADTs ,
FlexibleContexts ,
TypeOperators
#
OverloadedStrings,
PatternGuards,
Da... | null | https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/commands/Summary.hs | haskell | # LANGUAGE CPP ,
OverloadedStrings ,
PatternGuards ,
DataKinds ,
KindSignatures ,
GADTs ,
FlexibleContexts ,
TypeOperators
#
OverloadedStrings,
PatternGuards,
Da... | |
ddd2332d3781df7d34d9e578b7ca9a9d7fb0b186d3cfc4bbf8f0b318b55f6b04 | nasa/Common-Metadata-Repository | core_test.clj | (ns cmr.graph.core-test
(:require
[clojure.test :refer :all]
[cmr.graph.core :as core]))
(deftest a-test
(is (= 1 1)))
| null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/graph/test/cmr/graph/core_test.clj | clojure | (ns cmr.graph.core-test
(:require
[clojure.test :refer :all]
[cmr.graph.core :as core]))
(deftest a-test
(is (= 1 1)))
| |
8d21cd902e7b1cf76f03f889991c5a39e65b75b3df9b51259cecad49ef1fc283 | mwand/eopl3 | interp.scm | (module interp (lib "eopl.ss" "eopl")
;; interpreter for the PROC language, using the procedural
;; representation of procedures.
The \commentboxes are the latex code for inserting the rules into
;; the code in the book. These are too complicated to put here, see
;; the text, sorry.
(require "drscheme... | null | https://raw.githubusercontent.com/mwand/eopl3/b50e015be7f021d94c1af5f0e3a05d40dd2b0cbf/chapter3/proc-lang/proc-rep/interp.scm | scheme | interpreter for the PROC language, using the procedural
representation of procedures.
the code in the book. These are too complicated to put here, see
the text, sorry.
the interpreter ;;;;;;;;;;;;;;;;
\commentbox{ (value-of (const-exp \n{}) \r) = \n{}}
\commentbox{ (value-of (var-exp \x{}) \r) = (apply-env \r \x{... | (module interp (lib "eopl.ss" "eopl")
The \commentboxes are the latex code for inserting the rules into
(require "drscheme-init.scm")
(require "lang.scm")
(require "data-structures.scm")
(require "environments.scm")
(provide value-of-program value-of)
value - of - program : Program - > ExpVal
(... |
027d9c69606dc090994c585fd7ebab0d06b7e2688afa6c66dfe6ab6568a5d25f | input-output-hk/ouroboros-network | RateLimiting.hs | # LANGUAGE NamedFieldPuns #
-- | Rage limiting of accepted connections
--
module Ouroboros.Network.Server.RateLimiting
( AcceptedConnectionsLimit (..)
, runConnectionRateLimits
-- * Tracing
, AcceptConnectionsPolicyTrace (..)
) where
import Control.Monad (when)
import Control.Monad.Cla... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/6c15a8093bac34091ad96af2b8b0d1f7fe54b732/ouroboros-network-framework/src/Ouroboros/Network/Server/RateLimiting.hs | haskell | | Rage limiting of accepted connections
* Tracing
| Policy which governs how to limit the number of accepted connections.
| Hard limit of accepted connections.
| Soft limit of accepted connections. If we are above this threshold,
we will start rate limiting.
regression starting from 0 at the soft limit up t... | # LANGUAGE NamedFieldPuns #
module Ouroboros.Network.Server.RateLimiting
( AcceptedConnectionsLimit (..)
, runConnectionRateLimits
, AcceptConnectionsPolicyTrace (..)
) where
import Control.Monad (when)
import Control.Monad.Class.MonadSTM
import Control.Monad.Class.MonadTime
impo... |
e47f3f4236aa9c10f304fb80c1a9737dc227477840fc7dfc5a68a18a462a1bf9 | RefactoringTools/HaRe | WhereIn1_TokOut.hs | module WhereIn1 where
--A definition can be lifted from a where or let into the surronding binding group.
--Lifting a definition widens the scope of the definition.
--In this example, lift 'sq' in 'sumSquares'
--This example aims to test add parameters to 'sq'.
sumSquares x y = (sq pow) x + (sq pow) y
... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/testing/liftOneLevel/WhereIn1_TokOut.hs | haskell | A definition can be lifted from a where or let into the surronding binding group.
Lifting a definition widens the scope of the definition.
In this example, lift 'sq' in 'sumSquares'
This example aims to test add parameters to 'sq'. | module WhereIn1 where
sumSquares x y = (sq pow) x + (sq pow) y
where
pow=2
sq pow 0 = 0
sq pow z = z^pow
anotherFun 0 y = sq y
where sq x = x^2
|
1e16863d0a08694a9b6eba38d1f90c7f530f539e1e87501fe0ff1df2e5d31e3e | composewell/streamly | ConcurrentEager.hs | # LANGUAGE FlexibleContexts #
-- |
-- Module : Main
Copyright : ( c ) 2018 Composewell Technologies
--
-- License : BSD3
-- Maintainer :
import Stream.ConcurrentCommon (allBenchmarks)
import Streamly.Benchmark.Common (runWithCLIOpts, defaultStreamSize)
import qualified Streamly.Internal.Data.Stream.Co... | null | https://raw.githubusercontent.com/composewell/streamly/071745844371ef0abe3b1a51b7ee6eed8e15ccb5/benchmark/Streamly/Benchmark/Data/Stream/ConcurrentEager.hs | haskell | |
Module : Main
License : BSD3
Maintainer :
-----------------------------------------------------------------------------
Main
----------------------------------------------------------------------------- | # LANGUAGE FlexibleContexts #
Copyright : ( c ) 2018 Composewell Technologies
import Stream.ConcurrentCommon (allBenchmarks)
import Streamly.Benchmark.Common (runWithCLIOpts, defaultStreamSize)
import qualified Streamly.Internal.Data.Stream.Concurrent as Async
moduleName :: String
moduleName = "Data.Stream.Conc... |
98c4510ecc5e790c0dbbb7a8c00381b3e61f88b1ad0dc572b075a6bef3b14a31 | dyzsr/ocaml-selectml | chi2.ml | (* TEST
*)
A basic chi - square test to detect simple errors in the Random module .
Accumulate [ n ] samples from function [ f ] and check the chi - square .
Only the low 8 bits of the result of [ f ] are sampled .
Only the low 8 bits of the result of [f] are sampled. *)
let chisquare n f =
let r = 256... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/lib-random/chi2.ml | ocaml | TEST
|
A basic chi - square test to detect simple errors in the Random module .
Accumulate [ n ] samples from function [ f ] and check the chi - square .
Only the low 8 bits of the result of [ f ] are sampled .
Only the low 8 bits of the result of [f] are sampled. *)
let chisquare n f =
let r = 256 in
let f... |
d173debbd5838e6353515693152705fec1d026f3d515e0db6eabac09561ee2af | polyfy/polylith | diff.clj | (ns polylith.clj.core.help.diff
(:require [polylith.clj.core.util.interface.color :as color]))
(defn help [color-mode]
(str " Shows changed files since the most recent stable point in time.\n"
"\n"
" poly diff\n"
"\n"
" Internally, it executes 'git diff SHA --name-only' where SHA is ... | null | https://raw.githubusercontent.com/polyfy/polylith/febea3d8a9b30a60397594dda3cb0f25154b8d8d/components/help/src/polylith/clj/core/help/diff.clj | clojure | (ns polylith.clj.core.help.diff
(:require [polylith.clj.core.util.interface.color :as color]))
(defn help [color-mode]
(str " Shows changed files since the most recent stable point in time.\n"
"\n"
" poly diff\n"
"\n"
" Internally, it executes 'git diff SHA --name-only' where SHA is ... | |
ecee62aa7ff64cb6c4349d9d9e0f2d1ac791c5f82c7a078c75f5bd9e7e8c8fe0 | runtimeverification/haskell-backend | Symbol.hs | |
Copyright : ( c ) Runtime Verification , 2019 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2019-2021
License : BSD-3-Clause
-}
module Kore.Internal.Symbol (
Symbol (..),
toSymbolOrAlias,
isConstructorLike,
isConstructor,
isSortInjection,
isTotal,
... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/93a705112305a2d7e084e98dca93ec33e0d661d5/kore/src/Kore/Internal/Symbol.hs | haskell | * Re-exports
| Coerce a sort injection symbol's source and target sorts.
Use @coerceSortInjection@ to update the internal representation of a sort
injection 'Symbol' when evaluating or simplifying sort injections.
| Original sort injection symbol
| New source sort
| New target sort | |
Copyright : ( c ) Runtime Verification , 2019 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2019-2021
License : BSD-3-Clause
-}
module Kore.Internal.Symbol (
Symbol (..),
toSymbolOrAlias,
isConstructorLike,
isConstructor,
isSortInjection,
isTotal,
... |
ee67a6814b0b4cca39bf74f30423b4bbb6b61e8bc36bcaad19045af522641645 | PLTools/GT | plugin_intf.ml | * Base class type that all trait should follow .
For single type declaration
[
type ( ' a , ' b , ... ) typ = ...
]
plugin generate a { i plugin class } called [ traitnname_typ_t ] and
a { i transformation function } called [ traitname_t ] .
Generated transformation functio... | null | https://raw.githubusercontent.com/PLTools/GT/62d1a424a3336f2317ba67e447a9ff09d179b583/common/plugin_intf.ml | ocaml | * A type that stores additional arguments passed to each plugin.
* Base class type for all plugins.
Is parametrized by output AST types for convenience. All plugins receive input data as
OCaml AST and return pieces specific for backend.
* {1 Methods that are specific for a concrete plugin implementation }
... | * Base class type that all trait should follow .
For single type declaration
[
type ( ' a , ' b , ... ) typ = ...
]
plugin generate a { i plugin class } called [ traitnname_typ_t ] and
a { i transformation function } called [ traitname_t ] .
Generated transformation functio... |
0d2ca8d72ef13f52d7c3a8ffeaf3ebb0eb4f5ec025f4e4748174e9f339018179 | ucsd-progsys/liquidhaskell | BinahUpdateLib.hs | {-@ LIQUID "--expect-any-error" @-}
{-@ LIQUID "--no-adt" @-}
{-@ LIQUID "--exact-data-con" @-}
{-@ LIQUID "--higherorder" @-}
{-@ LIQUID "--no-termination" @-}
{-@ LIQUID "--ple" @-}
# LANGUAGE ExistentialQuantification , Ki... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/ple/neg/BinahUpdateLib.hs | haskell | @ LIQUID "--expect-any-error" @
@ LIQUID "--no-adt" @
@ LIQUID "--exact-data-con" @
@ LIQUID "--higherorder" @
@ LIQUID "--no-termination" @
@ LIQUID "--ple" @ |
# LANGUAGE ExistentialQuantification , KindSignatures , TypeFamilies , GADTs #
module BinahUpdateLib where
class PersistEntity record where
data EntityField record typ :: *
instance PersistEntity Blob where
@ data EntityField Blob typ where
BinahUpdateLib . BlobYVal : : EntityField { v : _ | True... |
102e77a01db3cb83dea4a68be9f06102ffb72b53ca639d9a0723b2208a128b88 | johnlawrenceaspden/hobby-code | scrapcode.clj | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(comment
(def starts (map (fn[tile][[tile 0]]) tiles))
(map ptilelist starts)
(count starts)
(def it1 (mapcat tilelist->longertilelists starts))
(map ptilelist it1)
(count it1)
(def it2 (mapcat tilelist->longertilelists it1))
(count it2)
(map p... | null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/scrapcode.clj | clojure |
(comment
(def starts (map (fn[tile][[tile 0]]) tiles))
(map ptilelist starts)
(count starts)
(def it1 (mapcat tilelist->longertilelists starts))
(map ptilelist it1)
(count it1)
(def it2 (mapcat tilelist->longertilelists it1))
(count it2)
(map ptilelist it2)
(def it3 (mapcat tilelist->longertilelists it2))
(count it3)
... | |
8083081ac907b03833f6ed3aeebd8e472527c5af9e0ed20c4ed0a6b5fbec5c7c | ucsd-progsys/liquidhaskell | T2096.hs | # LANGUAGE KindSignatures #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
{-# LANGUAGE GADTs #-}
@ embed GHC.Natural . Natural as int @
{-@ LIQUID "--no-totality" @-}
module T2096 where
import Prelude
import GHC.TypeLits
import GHC.Natural
import Unsafe.Coerce
-- See -progsys/liquidhaskell/issues/2095
workaroun... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/284c2ad4e9b87bcb4729ae3f228043b22646ae46/tests/pos/T2096.hs | haskell | # LANGUAGE GADTs #
@ LIQUID "--no-totality" @
See -progsys/liquidhaskell/issues/2095 | # LANGUAGE KindSignatures #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
@ embed GHC.Natural . Natural as int @
module T2096 where
import Prelude
import GHC.TypeLits
import GHC.Natural
import Unsafe.Coerce
workaround :: (n1 + 1) ~ (n2 + 1) => Vec n1 a -> Vec n2 a
workaround = unsafeCoerce
data Vec (n :: Nat) ... |
4177cacac2db9488d8c9d38e83cb5732b8aca81fe5259b91c182e57c4dbd70eb | bevuta/pepa | preloader.cljs | (ns pepa.preloader
(:require [cljs.core.async :as async]
[clojure.browser.event :as event])
(:require-macros [pepa.resources :as res]
[cljs.core.async.macros :refer [go]])
(:import goog.net.ImageLoader))
(def +image-pathnames+ (res/image-resources))
(defn preload []
(go
(let... | null | https://raw.githubusercontent.com/bevuta/pepa/0a9991de0fd1714515ca3def645aec30e21cd671/src-cljs/pepa/preloader.cljs | clojure | (ns pepa.preloader
(:require [cljs.core.async :as async]
[clojure.browser.event :as event])
(:require-macros [pepa.resources :as res]
[cljs.core.async.macros :refer [go]])
(:import goog.net.ImageLoader))
(def +image-pathnames+ (res/image-resources))
(defn preload []
(go
(let... | |
e5f44b8b73d4d6ba265871031c6c9d71de71ea201250e722837752ccf258241c | fujita-y/ypsilon | destructuring.scm | #!core
Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
;;; See LICENSE file for terms and conditions of use.
(library (core destructuring)
(export destructuring-match
destructuring-bind)
(import (core primitives)
(core lists)
(core syntax-case))
(de... | null | https://raw.githubusercontent.com/fujita-y/ypsilon/f640c9ecf98eb805de268db65316db704fb31831/stdlib/core/destructuring.scm | scheme | See LICENSE file for terms and conditions of use.
[end] | #!core
Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
(library (core destructuring)
(export destructuring-match
destructuring-bind)
(import (core primitives)
(core lists)
(core syntax-case))
(define ca---r (make-core-hashtable))
(define cd---r (... |
ce6328464572f17b9287efeae47b3a207b6807ad512e3ee61cbd9732d1071769 | nakkaya/static | core.clj | (ns static.test.core
(:require [clojure.test :refer :all]
[static.core :refer :all]
[static.io :refer :all]
[static.test.dummy-fs :refer :all])
(:import (java.io File)
(org.apache.commons.io FileUtils)))
(defn delete-file-recursively [f]
(FileUtils/deleteDirectory f... | null | https://raw.githubusercontent.com/nakkaya/static/59b51210ee4dffa2a4b48971a5d994b70e548817/test/static/test/core.clj | clojure | (ns static.test.core
(:require [clojure.test :refer :all]
[static.core :refer :all]
[static.io :refer :all]
[static.test.dummy-fs :refer :all])
(:import (java.io File)
(org.apache.commons.io FileUtils)))
(defn delete-file-recursively [f]
(FileUtils/deleteDirectory f... | |
ae04d904c1a252558a3c847897a6d4c527d66d604df2efd8447cc0e0b9f497d3 | erp12/fijit | try_test.clj | (ns erp12.fijit.try-test
(:require [clojure.test :refer :all]
[expectations.clojure.test :refer :all]
[erp12.fijit.try :as sc-try])
(:import (clojure.lang ExceptionInfo)))
(deftest get-test
(testing "Re-throwing improved errors"
(let [msg "Failed division!"]
(expect (more-> Exce... | null | https://raw.githubusercontent.com/erp12/fijit/7657cf2e6058cd916e2024bf9d16ad1f2a07d48b/test/erp12/fijit/try_test.clj | clojure | (ns erp12.fijit.try-test
(:require [clojure.test :refer :all]
[expectations.clojure.test :refer :all]
[erp12.fijit.try :as sc-try])
(:import (clojure.lang ExceptionInfo)))
(deftest get-test
(testing "Re-throwing improved errors"
(let [msg "Failed division!"]
(expect (more-> Exce... | |
7a31ef5677b1ec59fd33218039a6cbd678f7466cc911fa0543aab44b78c8f695 | racket/web-server | hmac-sha1.rkt | #lang racket/base
(require racket/contract
web-server/stuffers/stuffer
racket/runtime-path
openssl/libcrypto
(rename-in ffi/unsafe
[-> f->]))
(define EVP_SHA1
(and libcrypto
(get-ffi-obj 'EVP_sha1 libcrypto
(_fun f-> _fpointer))))
(d... | null | https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/stuffers/hmac-sha1.rkt | racket | It returns the same pointer always
(bytes-copy | #lang racket/base
(require racket/contract
web-server/stuffers/stuffer
racket/runtime-path
openssl/libcrypto
(rename-in ffi/unsafe
[-> f->]))
(define EVP_SHA1
(and libcrypto
(get-ffi-obj 'EVP_sha1 libcrypto
(_fun f-> _fpointer))))
(d... |
29c9ea35a4a17182dfeeb8460cfbeb591641fed4b2e6d34e77970543b70e7e4f | racketscript/racketscript | simple.rkt | #lang racket
(define (extract-current-continuation-marks key)
(continuation-mark-set->list
(current-continuation-marks)
key))
(displayln
(with-continuation-mark 'key 'mark
(extract-current-continuation-marks 'key)))
(displayln
(with-continuation-mark 'key1 'mark1
(with-continuation-mark 'key2 'mark2
... | null | https://raw.githubusercontent.com/racketscript/racketscript/f94006d11338a674ae10f6bd83fc53e6806d07d8/tests/wcm/simple.rkt | racket | replaces previous mark
continuation extended to evaluate the argument | #lang racket
(define (extract-current-continuation-marks key)
(continuation-mark-set->list
(current-continuation-marks)
key))
(displayln
(with-continuation-mark 'key 'mark
(extract-current-continuation-marks 'key)))
(displayln
(with-continuation-mark 'key1 'mark1
(with-continuation-mark 'key2 'mark2
... |
c9db12c75e512091b6ddfcd6d33b3521bf734654f2766461d61ea99796f06e48 | sneeuwballen/zipperposition | trace_tstp.mli |
This file is free software , part of Logtk . See file " license " for more details .
(** {1 Trace of a TSTP prover} *)
open Logtk
type id = Ast_tptp.name
type term = STerm.t
type form = STerm.t
type clause = term SLiteral.t list
type t =
| Axiom of string * string (* filename, axiom name *)
| Theory of stri... | null | https://raw.githubusercontent.com/sneeuwballen/zipperposition/7f1455fbe2e7509907f927649c288141b1a3a247/src/parsers/trace_tstp.mli | ocaml | * {1 Trace of a TSTP prover}
filename, axiom name
a theory used to do an inference
* Equisatisfiable step?
* Force the lazy proof step, if any
* {3 Proof traversal}
* Traverse the proof. Each proof node is traversed only once,
using the set to recognize already traversed proofs.
* Traversal of parent proof... |
This file is free software , part of Logtk . See file " license " for more details .
open Logtk
type id = Ast_tptp.name
type term = STerm.t
type form = STerm.t
type clause = term SLiteral.t list
type t =
| InferForm of form * step lazy_t
| InferClause of clause * step lazy_t
and step = {
id : id;
rule ... |
7238f11385bc72f3797b7eb759ae657cd5f7cd4fd47fd9b2ee7bc4f0ba156ecd | rbkmoney/consuela | consuela_zombie_reaper.erl | %%%
%%% A process to defer reaping up zombie names, which process is dead but name is still possibly there in
%%% Consul. Also can be used to asynchronously reap registrations when a processes die for example.
-module(consuela_zombie_reaper).
%% api
-type registry() :: consuela_registry:t().
-export([start_link/2])... | null | https://raw.githubusercontent.com/rbkmoney/consuela/56d065bff0f1c8de4cede40d670b9061942b4ea8/src/consuela_zombie_reaper.erl | erlang |
A process to defer reaping up zombie names, which process is dead but name is still possibly there in
Consul. Also can be used to asynchronously reap registrations when a processes die for example.
api
-export([dequeue/3]) ?.
gen server
pulse
Try to drain queue right away? (false by default)
Wait for enqueue ... |
-module(consuela_zombie_reaper).
-type registry() :: consuela_registry:t().
-export([start_link/2]).
-export([enqueue/2]).
-export([enqueue/3]).
TODO
-export([drain/1]).
-behaviour(gen_server).
-export([init/1]).
-export([handle_call/3]).
-export([handle_cast/2]).
-export([handle_info/2]).
-export([terminate... |
eeba07e8b576fc3ac8ce48e7d1afd4ad4da174de832520fd54fbf7a4e47b6b94 | vitorenesduarte/tricks | tricks.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2018 . 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 . You may obtain
%% a copy of the Li... | null | https://raw.githubusercontent.com/vitorenesduarte/tricks/9ba11252be128be481b4d4a00fe162ccdbdac501/src/tricks.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2018 . 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
-module(tricks).
-author("Vitor... |
e2e2d3b85405fefb671271334b7a419655545bff2ef8e4481938e8c57ecc2e6e | malcolmreynolds/GSLL | dilogarithm.lisp | Dilogarithm
, Fri Mar 17 2006 - 18:44
Time - stamp : < 2008 - 10 - 21 22:57:50EDT dilogarithm.lisp >
$ Id$
(in-package :gsl)
;;; dilog merge complex and real
(defgeneric dilogarithm (x)
"The dilogarithm."))
(defmfun dilogarithm ((x float))
"gsl_sf_dilog_e" ((x :double) (ret sf-result))
:definitio... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/special-functions/dilogarithm.lisp | lisp | dilog merge complex and real | Dilogarithm
, Fri Mar 17 2006 - 18:44
Time - stamp : < 2008 - 10 - 21 22:57:50EDT dilogarithm.lisp >
$ Id$
(in-package :gsl)
(defgeneric dilogarithm (x)
"The dilogarithm."))
(defmfun dilogarithm ((x float))
"gsl_sf_dilog_e" ((x :double) (ret sf-result))
:definition :method)
(defmfun dilogarithm ... |
de7735517b6b063c371427a1ebf7dcedd27b47cab7501bef078908594a7942f1 | ChillkroeteTTS/fischer | ws.cljs | (ns fischerboot.ws
(:require
[clojure.string :as str]
[cljs.core.async :as async :refer (<! >! put! chan)]
[taoensso.encore :as encore :refer-macros (have have?)]
[taoensso.timbre :as timbre :refer-macros (tracef debugf infof warnf errorf)]
[taoensso.sente :as sente :refer (cb-success?)]
[fisc... | null | https://raw.githubusercontent.com/ChillkroeteTTS/fischer/2f479ac0d410f536f5bd89659d7f69113422784a/src/cljs/fischerboot/ws.cljs | clojure | Dispatch on event-id
Default/fallback case (no other matching handler)
TODO Add your (defmethod -event-msg-handler <event-id> [ev-msg] <body>)s here... | (ns fischerboot.ws
(:require
[clojure.string :as str]
[cljs.core.async :as async :refer (<! >! put! chan)]
[taoensso.encore :as encore :refer-macros (have have?)]
[taoensso.timbre :as timbre :refer-macros (tracef debugf infof warnf errorf)]
[taoensso.sente :as sente :refer (cb-success?)]
[fisc... |
4666158aebeadc7fb619869332ef62f741812ba9781a655ea4c561ed0d3bb3d4 | developandplay/material-components-web-miso | LinearProgress.hs | {-# LANGUAGE OverloadedStrings #-}
module Material.LinearProgress
( Config (..),
config,
setReverse,
setClosed,
setAttributes,
indeterminate,
determinate,
buffered,
)
where
import qualified Data.Map as M
import Data.Maybe
import Miso
-- | Linear progress configuration
data Config msg ... | null | https://raw.githubusercontent.com/developandplay/material-components-web-miso/97a20097bf522b62743c884b66757eb895edd690/sample-app-jsaddle/Material/LinearProgress.hs | haskell | # LANGUAGE OverloadedStrings #
| Linear progress configuration
| Default linear progress configuration
| Specify whether a linear progress indicator should be hidden
| Specify whether the direction of a linear progress indicator should be reversed
| Specify additional attributes
| Indeterminate linear progress va... |
module Material.LinearProgress
( Config (..),
config,
setReverse,
setClosed,
setAttributes,
indeterminate,
determinate,
buffered,
)
where
import qualified Data.Map as M
import Data.Maybe
import Miso
data Config msg = Config
{ reverse :: Bool,
closed :: Bool,
additionalAttrib... |
bf0419e2a588f083e8783b78dcf6a9c4c80cb20fae56c0d7c1fd3c13166501c6 | mbutterick/beautiful-racket | chip8.rkt | #lang br
;-to-write-an-emulator-chip-8-interpreter/
;
;
(define (split-bytes val)
(cond
[(zero? val) (list 0)]
[else
(define-values (bytes residual)
(for/fold ([bytes empty][residual val])
([i (in-naturals)]
#:break (zero? residual))
(define m (modulo... | null | https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/chip8-demo/chip8.rkt | racket | -to-write-an-emulator-chip-8-interpreter/
pixels
stack pointer
keys
Set up render system and register input callbacks
(setup-graphics chip8)
(setup-input chip8)
(define (initialize c)
(initialize chip8)
(load-game chip8 "pong")
(define (emulate-cycle c)
// Decode Opcode
// Execute Opcode
// Update timer... | #lang br
(define (split-bytes val)
(cond
[(zero? val) (list 0)]
[else
(define-values (bytes residual)
(for/fold ([bytes empty][residual val])
([i (in-naturals)]
#:break (zero? residual))
(define m (modulo residual 16))
(values (cons m bytes) (a... |
6eabdea66e422efca3fe64164dbc2a0589db1a8f5c64c74cecca78a17186200a | serperu/secer | orddict_tests.erl | -module(orddict_tests).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
from_list_old_test() ->
from_list_test_common(orddict_old).
from_list_new_ok_test() ->
from_list_test_common(orddict_new_ok).
from_list_new_wrong_test() ->
from_list_test_common(orddict_new_wrong).
from_list_test_com... | null | https://raw.githubusercontent.com/serperu/secer/ffe2f9602356c34c9465c44534c82cc758b809b5/examples/orddict/orddict_tests.erl | erlang | -module(orddict_tests).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
from_list_old_test() ->
from_list_test_common(orddict_old).
from_list_new_ok_test() ->
from_list_test_common(orddict_new_ok).
from_list_new_wrong_test() ->
from_list_test_common(orddict_new_wrong).
from_list_test_com... | |
27a900503963cd8fe4db70802c5d9b3a8fab122d9db2b1e010bbef60b0877d3e | zalando-stups/kio | user.clj | (ns user
"Tools for interactive development with the REPL. This file should
not be included in a production build of the application."
(:require [clojure.java.javadoc :refer [javadoc]]
[clojure.pprint :refer [pprint]]
[clojure.reflect :refer [reflect]]
[clojure.repl :refer [apr... | null | https://raw.githubusercontent.com/zalando-stups/kio/d84dd2e27d155340c4d2ae45908a11d637563493/dev/user.clj | clojure | (ns user
"Tools for interactive development with the REPL. This file should
not be included in a production build of the application."
(:require [clojure.java.javadoc :refer [javadoc]]
[clojure.pprint :refer [pprint]]
[clojure.reflect :refer [reflect]]
[clojure.repl :refer [apr... | |
599dda2b76d3642184f9b565b7dee50d020d1f2f1f9b9a097935fe70dcc3abde | melhadad/fuf | alt.lisp | ;;; -*- Mode:Lisp; Syntax:Common-Lisp; Package: FUG5 -*-
;;; -----------------------------------------------------------------------
;;; File: alt.l
;;; Description: Unification of disjunctions
Author :
Created : 22 May 1990
;;; Modified: find-good-branches returns a list of all branches... | null | https://raw.githubusercontent.com/melhadad/fuf/57bd0e31afc6aaa03b85f45f4c7195af701508b8/src/alt.lisp | lisp | -*- Mode:Lisp; Syntax:Common-Lisp; Package: FUG5 -*-
-----------------------------------------------------------------------
File: alt.l
Description: Unification of disjunctions
Modified: find-good-branches returns a list of all branches
compatible with index - allows for none in index.... | Author :
Created : 22 May 1990
22 Feb 91 : Allowed list of bk - class instead of only 1 .
Add IGNORE and WAIT ( freeze ) .
11 Aug 91 : Add trace fro IGNORE and WAIT .
03 Jan 91 : Untrace alt when freezing .
Package : F... |
c368aae5a6684083ef962d7bcf036579485f769a4a58549a24a1c8e0c7f53a60 | DogLooksGood/holdem | store.cljs | (ns poker.events.store
(:require [akiroz.re-frame.storage :refer [reg-co-fx!]]))
(reg-co-fx! :holdem
{:fx :store
:cofx :store})
| null | https://raw.githubusercontent.com/DogLooksGood/holdem/bc0f93ed65cab54890c91f78bb95fe3ba020a41f/src/cljs/poker/events/store.cljs | clojure | (ns poker.events.store
(:require [akiroz.re-frame.storage :refer [reg-co-fx!]]))
(reg-co-fx! :holdem
{:fx :store
:cofx :store})
| |
f4f288a702584729cf7e76a6b31a9c81280d16782e26ca52d75469e53db52228 | patricoferris/ocaml-multicore-monorepo | test.ml | open Eio.Std
module Ctf = Eio.Private.Ctf
let () =
Logs.(set_level ~all:true (Some Debug));
Logs.set_reporter @@ Logs.format_reporter ();
Printexc.record_backtrace true
let read_one_byte ~sw r =
Fiber.fork_promise ~sw (fun () ->
let r = Option.get (Eio_linux.get_fd_opt r) in
Eio_linux.Low_level.a... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/624b3293ee41e83736fe7ac3a79f810c2b70f68b/duniverse/eio/lib_eio_linux/tests/test.ml | ocaml | Write a string to a pipe and read it out again. | open Eio.Std
module Ctf = Eio.Private.Ctf
let () =
Logs.(set_level ~all:true (Some Debug));
Logs.set_reporter @@ Logs.format_reporter ();
Printexc.record_backtrace true
let read_one_byte ~sw r =
Fiber.fork_promise ~sw (fun () ->
let r = Option.get (Eio_linux.get_fd_opt r) in
Eio_linux.Low_level.a... |
dd45e88a7e250b829d885b13c94f358ca80b6cb2b72ab5e6d38cc6cb94f7cb71 | ocamllabs/ocaml-modular-implicits | tracing.ml | List.fold_left;;
#trace List.fold_left;;
0;;
List.fold_left (+) 0 [1;2;3];;
| null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-toplevel/tracing.ml | ocaml | List.fold_left;;
#trace List.fold_left;;
0;;
List.fold_left (+) 0 [1;2;3];;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.