_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
6bb09fd93cda3888ca4ed42bd7b84917d24ddefe9ba5252c435568423248fc01
senapk/funcional_arcade
student.hs
import Debug.Trace ( trace ) import Data.Function ( (&) ) data Car = Car { pass :: Int , maxPass :: Int , gas :: Int , maxGas :: Int , km :: Int } deriving (Eq, Show, Read) data Op = Op { name :: String , result :: Bool ...
null
https://raw.githubusercontent.com/senapk/funcional_arcade/38493f4c23be0a0f44a0a9c523dc1a167b5628fb/base/507/student.hs
haskell
import Debug.Trace ( trace ) import Data.Function ( (&) ) data Car = Car { pass :: Int , maxPass :: Int , gas :: Int , maxGas :: Int , km :: Int } deriving (Eq, Show, Read) data Op = Op { name :: String , result :: Bool ...
f62e4d83f25c2d2ec4b3a305db2a90f0305d5df8d660f613b84b4708203575bb
patricoferris/ocaml-multicore-monorepo
testing.ml
--------------------------------------------------------------------------- Copyright ( c ) 2015 The ptime programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/ptime/test/testing.ml
ocaml
Value equality and pretty printing Pretty printers bof... Assertion counters Logging Testing scopes Passing and failing tests Checking values Tracing and checking function applications. Gathers information about the application fail_count checkpoint when the app starts
--------------------------------------------------------------------------- Copyright ( c ) 2015 The ptime programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------...
702b96f102cc56d3648eac2f226cccabd872eed55246370eb5979014094da3c2
rtrusso/scp
badsrhi.scm
(define x (make-string 3 #\a)) (display (string-ref x 3)) (newline)
null
https://raw.githubusercontent.com/rtrusso/scp/2051e76df14bd36aef81aba519ffafa62b260f5c/src/tests/badsrhi.scm
scheme
(define x (make-string 3 #\a)) (display (string-ref x 3)) (newline)
3b96ccdc8ed9492e82688d4a95f00746f9d4f352eadd6e99451dc3bfde1a002a
alanz/ghc-exactprint
T10285.hs
module T10285 where import T10285a import Data.Type.Coercion import Data.Coerce oops :: Coercion (N a) (N b) -> a -> b oops Coercion = coerce unsafeCoerce :: a -> b unsafeCoerce = oops coercion
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/T10285.hs
haskell
module T10285 where import T10285a import Data.Type.Coercion import Data.Coerce oops :: Coercion (N a) (N b) -> a -> b oops Coercion = coerce unsafeCoerce :: a -> b unsafeCoerce = oops coercion
842d1eb5524a550e43fa2a830d90e2c53171f6b2963a7b1b4d74f48dd7f84194
huangjs/cl
macro.lisp
(in-package :cl-user) (defpackage :hjs.meta.macro (:use :cl :iterate :hjs.meta.essential :hjs.meta.lisp) (:export #:defcondition #:defnewconstant #:define-constant #:with-type #:with-collect #:with-functions #:collect-list #:define-class #:defalias #:switch #:eswitch #:c...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/mylib/macro.lisp
lisp
defcondition define a condition with conventions define constant a more cautious one with-type for numerical computation especially with some modifications." with-collect with-functions collect -- list comprehension collect by loop (labels ((build-form (qualifiers body) (if (not qualifiers) bod...
(in-package :cl-user) (defpackage :hjs.meta.macro (:use :cl :iterate :hjs.meta.essential :hjs.meta.lisp) (:export #:defcondition #:defnewconstant #:define-constant #:with-type #:with-collect #:with-functions #:collect-list #:define-class #:defalias #:switch #:eswitch #:c...
096cf18704a15b76b18f83360628e65b1583383e4d4553f1dfd747e563bf82bd
GNOME/gimp-tiny-fu
t-o-p-logo.scm
Trace of Particles Effect ;; Shuji Narazaki () Time - stamp : < 97/03/15 17:27:33 > Version 0.2 (define (apply-t-o-p-logo-effect img logo-layer b-size hit-rate edge-size ...
null
https://raw.githubusercontent.com/GNOME/gimp-tiny-fu/a64d85eec23b997e535488d67f55b44395ba3f2e/scripts/t-o-p-logo.scm
scheme
Shuji Narazaki ()
Trace of Particles Effect Time - stamp : < 97/03/15 17:27:33 > Version 0.2 (define (apply-t-o-p-logo-effect img logo-layer b-size hit-rate edge-size ...
e5bfbd58a8c5445d404ce3e673313fc367214a8632a1434f412c358714d5d5f6
protojure/lib
compression.clj
Copyright © 2019 State Street Bank and Trust Company . All rights reserved Copyright © 2019 - 2022 Manetu , Inc. All rights reserved ;; SPDX - License - Identifier : Apache-2.0 (ns protojure.grpc.codec.compression (:import (java.io InputStream OutputStream) (org.apache.commons.compress.compresso...
null
https://raw.githubusercontent.com/protojure/lib/795080d2f608eac3f25ddc143e9b1ea9344e3b61/modules/core/src/protojure/grpc/codec/compression.clj
clojure
-------------------------------------------------------------------------------------- compression support --------------------------------------------------------------------------------------
Copyright © 2019 State Street Bank and Trust Company . All rights reserved Copyright © 2019 - 2022 Manetu , Inc. All rights reserved SPDX - License - Identifier : Apache-2.0 (ns protojure.grpc.codec.compression (:import (java.io InputStream OutputStream) (org.apache.commons.compress.compressors....
fa225d3d6a3e8cd4c058b2b1932fb3e25b4604e11344cef5782d28e0df9958a5
spectrum-finance/cardano-dex-sdk-haskell
Crypto.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGE GADTs #-} module WalletAPI.Internal.Crypto where import Crypto.Cipher.Types (BlockCipher(..), Cipher(..), IV, makeIV) import Crypto.Error (CryptoFailable(..), CryptoError(..)) import qualified Crypto.Random.Ty...
null
https://raw.githubusercontent.com/spectrum-finance/cardano-dex-sdk-haskell/85b3e6b4fa18e7cc2196672102b2217461f2b0c2/wallet-api/src/WalletAPI/Internal/Crypto.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE GADTs # | Generate a random initialization vector for a given block cipher | Generate random salt of a given size | Initialize a block cipher
# LANGUAGE ScopedTypeVariables # module WalletAPI.Internal.Crypto where import Crypto.Cipher.Types (BlockCipher(..), Cipher(..), IV, makeIV) import Crypto.Error (CryptoFailable(..), CryptoError(..)) import qualified Crypto.Random.Types as CRT import Data.ByteArray (Byte...
7d5fc1d05dabfcf740c2cc8db05cdc66b3d76c8d53a0e18e10ffe9d7fe639927
JanHenryNystrom/jhn_stdlib
r_tree_tests.erl
%%============================================================================== Copyright 2016 - 2021 Jan < > %% 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 %% %% U...
null
https://raw.githubusercontent.com/JanHenryNystrom/jhn_stdlib/ffe3d8a58db28a4b0e270597fef7aa599dff9647/test/r_tree_tests.erl
erlang
============================================================================== you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either ex...
Copyright 2016 - 2021 Jan < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , eunit unit tests for the r_tree library module . @author < > ( C ) 2016 - 2021 , < > -module(r_tree_tests). -copyright('Jan ...
c8b25983b55a324fe2b263f7eb82c102fd637aa7276ffd356482f1b6b602b45a
project-oak/hafnium-verification
control.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/sledge/src/control.ml
ocaml
* Iterative Breadth-First Bounded Exploration The analysis' semantics of control flow. * return from a possibly-recursive call Treat a stack as a code location in a hypothetical expansion of the program where all non-recursive functions have been completely inlined. In particular, this means to co...
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
a86b9664267003daf51f2ef7cbacdfaa3b49fbc023b116fdf8e9b86830d491a1
inaka/canillita
canillita_news_SUITE.erl
-module(canillita_news_SUITE). -include_lib("mixer/include/mixer.hrl"). -mixin([{ canillita_test_utils , [ init_per_suite/1 , end_per_suite/1 ] }]). -export([ all/0 , init_per_testcase/2 , end_per_testcase/2 ]). -export([news_api_test/1, last_event_id_test/...
null
https://raw.githubusercontent.com/inaka/canillita/56e7fa6b7441a591dbf2396dc85a43cdca6878c6/test/canillita_news_SUITE.erl
erlang
common tests API tests Every newsitem needs to be attached to an existing newspaper create a newsitem check it matches the expected response create a new newsitem check it matches the expected response create a new newsitem for a different newspaper and check it is also been notified close shotgun connecti...
-module(canillita_news_SUITE). -include_lib("mixer/include/mixer.hrl"). -mixin([{ canillita_test_utils , [ init_per_suite/1 , end_per_suite/1 ] }]). -export([ all/0 , init_per_testcase/2 , end_per_testcase/2 ]). -export([news_api_test/1, last_event_id_test/...
5c2a7753416b8c15cee5dc04c2866673b8a787dd2239bfd93dbb72695a89e64f
ddssff/cabal-debian
Generic.hs
-- | Some generic operations with specializations to avoid broken Data -- instances in types like Text and Set. # LANGUAGE DeriveDataTypeable , RankNTypes , StandaloneDeriving # # OPTIONS_GHC -fno - warn - orphans # module Debian.Debianize.Generic ( geq , gdiff , gshow ) where import Prelude hiding (...
null
https://raw.githubusercontent.com/ddssff/cabal-debian/763270aed987f870762e660f243451e9a34e1325/Attic/Generic.hs
haskell
| Some generic operations with specializations to avoid broken Data instances in types like Text and Set. These instances are only used here, to create debugging messages. ext2Q' :: (Data d, Typeable2 t) => (d -> q) -> (forall d1 d2. (Data d1, Data d2) => t d1 d2 -> q) -> d -> q ext2Q' = ext2Q will throw an excep...
# LANGUAGE DeriveDataTypeable , RankNTypes , StandaloneDeriving # # OPTIONS_GHC -fno - warn - orphans # module Debian.Debianize.Generic ( geq , gdiff , gshow ) where import Prelude hiding (GT) , ext2Q , Typeable2 , dataTypeName , dataTypeOf import Data.List (sort) import qualified Data.Text as T im...
f5999eafe825841ccfcef281275b5211f7ae2cf65da0510dd5c0070dd67bddd2
crategus/cl-cffi-gtk
gtk.color-chooser-widget.lisp
;;; ---------------------------------------------------------------------------- ;;; gtk.color-chooser-widget.lisp ;;; The documentation of this file is taken from the GTK+ 3 Reference Manual Version 3.24 and modified to document the Lisp binding to the GTK+ library . ;;; See <>. The API documentation of the Lisp b...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/da748ec5300141e9f07aabeeab7a9acb2b37ecf2/gtk/gtk.color-chooser-widget.lisp
lisp
---------------------------------------------------------------------------- gtk.color-chooser-widget.lisp See <>. The API documentation of the Lisp binding is This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License for Lisp License, or (...
The documentation of this file is taken from the GTK+ 3 Reference Manual Version 3.24 and modified to document the Lisp binding to the GTK+ library . available from < -cffi-gtk/ > . Copyright ( C ) 2012 - 2021 as published by the Free Software Foundation , either version 3 of the the GNU Lesser General Pu...
f2ed5f4a790bfc4706b2e0d8d51caff450e51396a2a5052d477abf9ea8fddb38
pixlsus/registry.gimp.org_static
darning.scm
Copyright 2013 ( ) ; 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/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/darning.scm
scheme
You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2013 ( ) you may not use this file except in compliance with the License . distributed under the License is distributed on an " AS IS " BASIS , (define interval (lambda (a b) (if (= a b) (list a) (append (list a) (interval (+ a 1) b))))) (define (script-fu-darning ...
a0001d61c0d908bbe3dee3d6e1adf596e37928c2a331fa87c48cab21665bc2a3
zotonic/zotonic
filter_normalize_email.erl
@author < > 2022 %% @doc Normalize an email address, as used for the keys in the identity table. %% @end Copyright 2022 %% 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...
null
https://raw.githubusercontent.com/zotonic/zotonic/86d9c7b3456040babc87b60263de1b0f4ea63cf1/apps/zotonic_mod_admin_identity/src/filters/filter_normalize_email.erl
erlang
@doc Normalize an email address, as used for the keys in the identity table. @end 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, ...
@author < > 2022 Copyright 2022 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(filter_normalize_email). -export([ normalize_email/2 ]). normalize_email(undefined, _Context) -> undefined; normali...
59faf9b355016c746e1a6416b2ff0530aca4cd65c0d320e9c734286d674ded03
MinaProtocol/mina
fee_payer.ml
open Core open Mina_ledger open Currency open Signature_lib module U = Transaction_snark_tests.Util module Spec = Transaction_snark.For_tests.Update_states_spec open Mina_base open Mina_transaction let%test_module "Fee payer tests" = ( module struct let `VK vk, `Prover zkapp_prover = Lazy.force U.trivial_zkapp ...
null
https://raw.githubusercontent.com/MinaProtocol/mina/be9a92606cf395aadd5b67b4cb309d07fad54bb4/src/lib/transaction_snark/test/fee_payer/fee_payer.ml
ocaml
TODO : match on exact error Sparse ledger application fails Create non-zkapp accounts
open Core open Mina_ledger open Currency open Signature_lib module U = Transaction_snark_tests.Util module Spec = Transaction_snark.For_tests.Update_states_spec open Mina_base open Mina_transaction let%test_module "Fee payer tests" = ( module struct let `VK vk, `Prover zkapp_prover = Lazy.force U.trivial_zkapp ...
df56fe6fc7a9c5e724dbd54f647fd54aec81d27ef71327842fb7080f1ceb66ca
oakes/play-cljc
macros_java.clj
(ns play-cljc.macros-java (:require [play-cljc.transforms :as t])) (defmacro math "Wraps java.lang.Math, calling a method if the provided symbol starts with a lower-case letter, or a static field if it starts with an upper-case letter." [n & args] (let [s (str n) ^Character l (nth s 0)] (if (Char...
null
https://raw.githubusercontent.com/oakes/play-cljc/ccf9571c1dbc96c044e1d03057cb3b1533100ace/src/play_cljc/macros_java.clj
clojure
(ns play-cljc.macros-java (:require [play-cljc.transforms :as t])) (defmacro math "Wraps java.lang.Math, calling a method if the provided symbol starts with a lower-case letter, or a static field if it starts with an upper-case letter." [n & args] (let [s (str n) ^Character l (nth s 0)] (if (Char...
ef194a91fa064b6692d1d54361ee9eeaad138bca3844fae3148c03f2b01569e7
byorgey/AoC
18Golf.hs
import Text.Parsec hiding (State) import Text.Parsec.Expr import Text.Parsec.Language (emptyDef) import qualified Text.Parsec.Token as T main = interact $ unlines . map show . (\i -> map ($i) [s [["+","*"]],s [["+"],["*"]]]) . lines s ops = sum . map (either undefined id . pars...
null
https://raw.githubusercontent.com/byorgey/AoC/30eb51eb41af9ca86b05de598a3a96d25bd428e3/2020/18/18Golf.hs
haskell
import Text.Parsec hiding (State) import Text.Parsec.Expr import Text.Parsec.Language (emptyDef) import qualified Text.Parsec.Token as T main = interact $ unlines . map show . (\i -> map ($i) [s [["+","*"]],s [["+"],["*"]]]) . lines s ops = sum . map (either undefined id . pars...
2510685922d23c0bf6d1cfd6c69a93420de0e58c846e04d26465d98fd7415863
FestCat/festival-ca
nitech_us_slt_arctic_duration.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Carnegie Mellon University ; ; ; and and ; ; ; Copyright ( c ) 1998 - 2000 ...
null
https://raw.githubusercontent.com/FestCat/festival-ca/f6b2d9bf4fc4f77b80890ebb95770075ad36ccaf/src/data/festvox.orig/nitech_us_slt_arctic_duration.scm
scheme
;;; ; ; ; ; ; ; ; ; ;;; Permission is hereby granted, free of charge, to use and distribute ;;; this software and its documentation without restriction, including ;;; withou...
Duration for English (require 'nitech_us_slt_arctic_durdata) (define (nitech_us_slt_arctic::select_duration) "(nitech_us_slt_arctic::select_duration) Set up duration for English." (set! duration_cart_tree nitech_us_slt_arctic::zdur_tree) (set! duration_ph_info nitech_us_slt_arctic::phone_durs) (Parameter.se...
ee18f781d2715caed50bf139fca2ef61a4d3f0dafdfbec497bf2add15672fa6c
Tener/deeplearning-thesis
trace-games.hs
module Main where import Board import Tournament import Control.Monad import Text.Printf import System.IO import Control.Concurrent import Control.Concurrent.Async import Data.Time.Clock.POSIX import System.Process main :: IO () main = do let cutoff = 300 threads <- getNumCapabilities starttime <- getPOSIXTime...
null
https://raw.githubusercontent.com/Tener/deeplearning-thesis/c56866bf6f48db3185b4b62348d292bf39a7a2af/src/trace-games.hs
haskell
dropHalf dropHalf xs = drop (length xs `div` 2) xs
module Main where import Board import Tournament import Control.Monad import Text.Printf import System.IO import Control.Concurrent import Control.Concurrent.Async import Data.Time.Clock.POSIX import System.Process main :: IO () main = do let cutoff = 300 threads <- getNumCapabilities starttime <- getPOSIXTime...
cbabe4f15c83140c3adb5f370fa387a35d553b6305c5bfc895ab34628cb2f92b
fstamour/breeze
functional-classes.lisp
(cl:in-package #:common-lisp-user) #+ (or) (ql:quickload '(#:value-semantics-utils)) ;; ^^^ Failed, can't find `with-macroexpand-time-branching` (defpackage #:functional-classes (:use #:cl)) (in-package #:functional-classes) (defun be-paranoid (a b) "Signals an error when A and B are not equalp." (unless (equ...
null
https://raw.githubusercontent.com/fstamour/breeze/e76ce087980fdb30a4124c77177d06748ad5c73e/scratch-files/functional-classes.lisp
lisp
^^^ Failed, can't find `with-macroexpand-time-branching` So, let's say I have this tree that I want to modify because mutating a literal is not ideal Let's say I want to add something, but keep the original intact. The naive way is just to copy the whole thing and do the mutation. But this method (copying everyth...
(cl:in-package #:common-lisp-user) #+ (or) (ql:quickload '(#:value-semantics-utils)) (defpackage #:functional-classes (:use #:cl)) (in-package #:functional-classes) (defun be-paranoid (a b) "Signals an error when A and B are not equalp." (unless (equalp a b) (error "What!? these should be the equivalent!"...
5f8d58c30dea6a1ae0568aeea813bdac650ece656a8d07f28d1a959dbbc8b62e
jeromesimeon/Galax
code_prune.ml
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/code_selection/code/code_prune.ml
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . $ I d : , v 1.12 2007/02/01 22:08:45 simeon Exp $ open Error open Code_selection_context open Cs_util_coercion open Physical_item open Physical_sequence open Physical_value open Physical_value_util open Xquery_algebra_ast open Xquery_algebr...
c3e27d1d3ca3258776886b6f6c46136e2d8633c58249f853322fadadc30aaaf7
Ptival/chick
Script.hs
# LANGUAGE FlexibleInstances # module Script ( Script (..), ) where import Data.List (intercalate) import Term.Variable (Variable) import Vernacular (Vernacular) newtype Script α ν = Script {unScript :: [Vernacular α ν]} instance (Show α, Show ν) => Show (Script α ν) where show (Script l) = intercalate "\n" $...
null
https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/lib/Script.hs
haskell
# LANGUAGE FlexibleInstances # module Script ( Script (..), ) where import Data.List (intercalate) import Term.Variable (Variable) import Vernacular (Vernacular) newtype Script α ν = Script {unScript :: [Vernacular α ν]} instance (Show α, Show ν) => Show (Script α ν) where show (Script l) = intercalate "\n" $...
a14eb6792b0da6b7420e049837a8cd819bafe895fc5b8ed0b594876a95ac8de7
ocamllabs/ocaml-modular-implicits
t040-makeblock1.ml
type t = { mutable a : int; };; { a = 0 };; * 0 CONST0 1 MAKEBLOCK1 0 3 ATOM0 4 SETGLOBAL T040 - makeblock1 6 STOP * 0 CONST0 1 MAKEBLOCK1 0 3 ATOM0 4 SETGLOBAL T040-makeblock1 6 STOP **)
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t040-makeblock1.ml
ocaml
type t = { mutable a : int; };; { a = 0 };; * 0 CONST0 1 MAKEBLOCK1 0 3 ATOM0 4 SETGLOBAL T040 - makeblock1 6 STOP * 0 CONST0 1 MAKEBLOCK1 0 3 ATOM0 4 SETGLOBAL T040-makeblock1 6 STOP **)
27018e00d4f8c2bcea4b2880f4e6fd93b78996f1dec9134f54a1fe570e762806
strint/sicpAns
2081_generic_arithmetic_system_coercion.scm
; ***************operation-and-type table********************** (define op-type-table (make-hash-table)) (define (put op-name data-type procdure) (hash-table/put! op-type-table (list op-name data-type) procdure)) (define (get op-name data-type) (hash-table/get op-type-table (list op-name data-type) #f)) ;notice, ...
null
https://raw.githubusercontent.com/strint/sicpAns/efc4bdfaab7583117d42f2141d4b3b9e12792b79/2.5.1-2_GenericArithmeticSystem/2081_generic_arithmetic_system_coercion.scm
scheme
***************operation-and-type table********************** notice, must return #f when get no method if return '(), there will have a bug in apply-generic ERROR: the object () is not applicable. because in apply-generic (let ((proc (get op type-tags))) (if proc (apply proc (map contents args)) when p...
(define op-type-table (make-hash-table)) (define (put op-name data-type procdure) (hash-table/put! op-type-table (list op-name data-type) procdure)) (define (get op-name data-type) (hash-table/get op-type-table (list op-name data-type) #f)) (define op-type-table-coercion (make-hash-table)) (define (put-coercion da...
6b098e35e08f55662e3b0426a1b35931370e63442dd7e214b2c4c83851613475
zwizwa/staapl
arm-macro-unit.rkt
#lang racket/unit (require racket/pretty "asm.rkt" "sig.rkt" "../sig.rkt" "../sig.rkt" "../coma/macro.rkt" "../control/op.rkt" "../ns.rkt" "../comp/postprocess.rkt" ) (import) (export machine^ stack^ comma^ cjump^ rstack^ postproc^ arm-assembler^ ) (...
null
https://raw.githubusercontent.com/zwizwa/staapl/e30e6ae6ac45de7141b97ad3cebf9b5a51bcda52/arm/arm-macro-unit.rkt
racket
machine^ comma^ cjump^ rstack^ fixme postproc^ See pic18 code eliminate other pseudo ops
#lang racket/unit (require racket/pretty "asm.rkt" "sig.rkt" "../sig.rkt" "../sig.rkt" "../coma/macro.rkt" "../control/op.rkt" "../ns.rkt" "../comp/postprocess.rkt" ) (import) (export machine^ stack^ comma^ cjump^ rstack^ postproc^ arm-assembler^ ) (...
033ab8b01ca9998f6931b637c05a68459d14cd8d1090ca2f9cab5a11df1eea52
emil0r/reverie
cached.clj
(ns reverie.site.endpoints.cached (:require [reverie.core :refer [defpage]] [reverie.cache :as cache])) (defn rand-fn [request] (rand-int 100)) (defn cached-rand-get-fn [request page params] (Thread/sleep 5000) (str "get foo -> " (cache/skip rand-fn))) (defn cached-rand-post-fn [request page para...
null
https://raw.githubusercontent.com/emil0r/reverie/a29c223b7326e6d5a5e0874d33c37ff2fa0dfd4d/reverie-test/src/reverie/site/endpoints/cached.clj
clojure
(ns reverie.site.endpoints.cached (:require [reverie.core :refer [defpage]] [reverie.cache :as cache])) (defn rand-fn [request] (rand-int 100)) (defn cached-rand-get-fn [request page params] (Thread/sleep 5000) (str "get foo -> " (cache/skip rand-fn))) (defn cached-rand-post-fn [request page para...
70d0c987ebcfe20f860adbf4db1c94e4263ac7b9598ed09500cdc7816ca956e6
martinodb/bobtailbot
core.clj
(ns bobtailbot.core (:require [user :as u] [me.raynes.fs :as fs :refer [list-dir]] [taoensso.timbre :as timbre :refer [log trace debug info warn error fatal report logf tracef debugf infof warnf errorf fatalf reportf spy get-env]] ...
null
https://raw.githubusercontent.com/martinodb/bobtailbot/c7d5a2bc31bebfdbe68f5cbae1f3b7ecc2d4d8d9/src/bobtailbot/core.clj
clojure
to use with libraries that use clojure.tools.logging A brain ns must always be: "bobtailbot.brains.<brain-name>.brain" [bobtailbot.brains.template.brain ] ; brains are now dynamically loaded. Uncomment if dynamic loading gives problems. [bobtailbot.brains.general.brain ] [bobtailbot.brains.zinc.brain ] An adapter ns...
(ns bobtailbot.core (:require [user :as u] [me.raynes.fs :as fs :refer [list-dir]] [taoensso.timbre :as timbre :refer [log trace debug info warn error fatal report logf tracef debugf infof warnf errorf fatalf reportf spy get-env]] ...
d06d7b3ece6835e61ef2c586ea4dff136ac04ddfd9fb55d578837e0ebe42ebc6
ocaml/dune
virt.ml
let t = "melange"
null
https://raw.githubusercontent.com/ocaml/dune/b8fd9dffecfd1a102720ca2ab485e80fcee2cb65/test/blackbox-tests/test-cases/melange/virtual_lib_compilation.t/impl_melange/virt.ml
ocaml
let t = "melange"
9723f7ae39e79ce3d1620a9e4fb1ab87d0a04293f8da91ae4b7d38230f683e69
CodeforSouth/fbi-api
environment.clj
(ns fbi-api.environment (:require [environ.core :refer [env]] [taoensso.timbre :refer [info]])) (defn get-env-port "Detect PORT environment variable." [] (if-let [port (env :port)] (do (info "Environment variable PORT detected: " port) (Integer. port)) (do (info "No-Environment vari...
null
https://raw.githubusercontent.com/CodeforSouth/fbi-api/ddc1f1c45269bd9a0401c5047d0c5ab1dbe299ba/src/fbi_api/environment.clj
clojure
(ns fbi-api.environment (:require [environ.core :refer [env]] [taoensso.timbre :refer [info]])) (defn get-env-port "Detect PORT environment variable." [] (if-let [port (env :port)] (do (info "Environment variable PORT detected: " port) (Integer. port)) (do (info "No-Environment vari...
94e294e4c35a330257ff47bd9400e524a893d9740b5c3ce4a8ee155b1bdd537e
i-am-tom/world-building-in-haskell
Render.hs
# LANGUAGE RecordWildCards # # LANGUAGE ViewPatterns # module Render ( Mapping , Sprites , Tiles (..) , loadMapping , loadSprites , mappedSprites , sprites , pixels , blackAndWhite , heatmap , greyscale , isometric , scale ) where import Codec.Picture (Image (..), Pixel) import qualif...
null
https://raw.githubusercontent.com/i-am-tom/world-building-in-haskell/fe7369b9069793ee6dd2a11e031a53b4af764d1a/src/Render.hs
haskell
| Scale an image by an integer factor.
# LANGUAGE RecordWildCards # # LANGUAGE ViewPatterns # module Render ( Mapping , Sprites , Tiles (..) , loadMapping , loadSprites , mappedSprites , sprites , pixels , blackAndWhite , heatmap , greyscale , isometric , scale ) where import Codec.Picture (Image (..), Pixel) import qualif...
5bfb2abf3c3412397143245e503489548e617e5e84ab23deed16634f4756dd8f
tip-org/tools
Types.hs
-- | the abstract syntax # LANGUAGE RecordWildCards # # LANGUAGE DeriveFunctor , , DeriveTraversable , PatternGuards # # LANGUAGE ExplicitForAll , FlexibleContexts , FlexibleInstances , TemplateHaskell , MultiParamTypeClasses , DeriveDataTypeable , DeriveGeneric , DeriveAnyClass # module Tip.Types where import Data.G...
null
https://raw.githubusercontent.com/tip-org/tools/6b9ce833146b6e259abc7629357518e667420ba8/tip-types/src/Tip/Types.hs
haskell
| the abstract syntax ^ Function application: always perfectly saturated. Merge with Quant? (caseExpr can do this for you), and there must not be any overlapping cases other than the default case ^ @Let (Local x t) b e@ = @(let ((l x)) b e)@ variable-/expression-pairs. Fix? ^ Recursive let. Must *not* normally ...
# LANGUAGE RecordWildCards # # LANGUAGE DeriveFunctor , , DeriveTraversable , PatternGuards # # LANGUAGE ExplicitForAll , FlexibleContexts , FlexibleInstances , TemplateHaskell , MultiParamTypeClasses , DeriveDataTypeable , DeriveGeneric , DeriveAnyClass # module Tip.Types where import Data.Generics.Geniplate import ...
641b64c60615b3e10049791e74cc65c02d08321cf2ea52bf05dd58eba9776ac3
exercism/erlang
queen_attack.erl
-module(queen_attack). -export([can_attack/2]). can_attack(_WhiteQueen, _BlackQueen) -> undefined.
null
https://raw.githubusercontent.com/exercism/erlang/57ac2707dae643682950715e74eb271f732e2100/exercises/practice/queen-attack/src/queen_attack.erl
erlang
-module(queen_attack). -export([can_attack/2]). can_attack(_WhiteQueen, _BlackQueen) -> undefined.
c35f6c703ad0f397133d7db3330b305939c2e5cc87358cf323f50fcf662175fd
thheller/shadow-cljs
react_native.cljs
(ns shadow.react-native (:require ["react-native" :as rn] ["create-react-class" :as crc])) (defonce root-ref (atom nil)) (defonce root-component-ref (atom nil)) (defn render-root "Renders the application root component in a hot-reloadable way, should be called after every reload. - app-id (string) ...
null
https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/main/shadow/react_native.cljs
clojure
(ns shadow.react-native (:require ["react-native" :as rn] ["create-react-class" :as crc])) (defonce root-ref (atom nil)) (defonce root-component-ref (atom nil)) (defn render-root "Renders the application root component in a hot-reloadable way, should be called after every reload. - app-id (string) ...
cef77ed06a4639a64607d4f8277c5992738d3b9450a395e15d9bf85331411b83
deobald/jok
pink.clj
(ns jok.views.pink (:require [jok.views.layou :as layou]) (:use [hiccup.core :only [html]])) (defn- song-list [song] [:li.queued-song [:div [:h1 (:title song)] [:h2 (:artist song)] [:h2 (:album song)]] [:div "(art)"] [:div.play [:a {:href "/pink/play"} "Play"]] [:div.pause [:a...
null
https://raw.githubusercontent.com/deobald/jok/e1b9373603ad7fcc3dbc7304cb8b88b8163e73bc/src/jok/views/pink.clj
clojure
(ns jok.views.pink (:require [jok.views.layou :as layou]) (:use [hiccup.core :only [html]])) (defn- song-list [song] [:li.queued-song [:div [:h1 (:title song)] [:h2 (:artist song)] [:h2 (:album song)]] [:div "(art)"] [:div.play [:a {:href "/pink/play"} "Play"]] [:div.pause [:a...
612c8d7bbc99b1ed6649e5fa66c14e7116cf0114975ec17e1e2fa1ccd95f9433
haskellfoundation/error-message-index
MissingSpaceBangPattern.hs
module MissingSpaceBangPattern where (!) :: Int -> Int -> Bool (!) a b = a == b infixl 5 ! f :: Int -> Bool f x = x ! 1
null
https://raw.githubusercontent.com/haskellfoundation/error-message-index/6b80c2fe6d8d2941190bda587bcea6f775ded0a4/message-index/messages/GHC-95644/example1/after/MissingSpaceBangPattern.hs
haskell
module MissingSpaceBangPattern where (!) :: Int -> Int -> Bool (!) a b = a == b infixl 5 ! f :: Int -> Bool f x = x ! 1
a0bd676c2ac05b7f27aaff053aa599b6d483c0adddceb4dc8818701283c8fb15
grin-compiler/ghc-grin
FromStg.hs
# LANGUAGE LambdaCase , TupleSections , StandaloneDeriving , TypeSynonymInstances , FlexibleInstances , RecordWildCards , OverloadedStrings # module Lambda.FromStg (codegenLambda) where import Data.List (intercalate, partition) import Data.Set (Set) import qualified Data.Set as Set import Data.Map.Strict (Map) import ...
null
https://raw.githubusercontent.com/grin-compiler/ghc-grin/ebc4dca2e1f5b3581d4b84726730564ce909d786/ghc-grin/src/Lambda/FromStg.hs
haskell
GHC Dump Lambda bind chain handling name handling data constructors utility data con handling name handling rep type conversion external type conversion NOTE: literal conversion data con and ty con conversion stg ast conversion CG bind chain operations tagToEnum special case this builds a bind chain S...
# LANGUAGE LambdaCase , TupleSections , StandaloneDeriving , TypeSynonymInstances , FlexibleInstances , RecordWildCards , OverloadedStrings # module Lambda.FromStg (codegenLambda) where import Data.List (intercalate, partition) import Data.Set (Set) import qualified Data.Set as Set import Data.Map.Strict (Map) import ...
53781d212f7327382dba11afa2b57d89615e05f6f3333772e1e5e67309ba694f
juxt/fuzz
slacky.cljs
(ns fuzz.slacky (:require-macros [cljs.core.async.macros :refer [go go-loop]] [hiccups.core :refer [html]]) (:require [cljs.core.async :refer [timeout <! chan]] [cljs-http.client :as http])) (defn poll-slacky "Poll slack" [] (let [msg-chan (chan)] (go-loop [latest nil] ...
null
https://raw.githubusercontent.com/juxt/fuzz/688b64b8750137402857e01e89c0c0307ea87425/src/cljs/fuzz/slacky.cljs
clojure
(ns fuzz.slacky (:require-macros [cljs.core.async.macros :refer [go go-loop]] [hiccups.core :refer [html]]) (:require [cljs.core.async :refer [timeout <! chan]] [cljs-http.client :as http])) (defn poll-slacky "Poll slack" [] (let [msg-chan (chan)] (go-loop [latest nil] ...
34cc35994ae92b8d57c97e7d35cbb773fe69fae710a17fb36e17d149857b74d0
racket/typed-racket
object.rkt
#lang racket/base Static contracts for class constructs . ;; Currently supports object/c and class/c. (require "../../utils/utils.rkt" "../structures.rkt" "../constraints.rkt" "simple.rkt" racket/list racket/match (contract-req) racket/syntax typed-racket/utils/...
null
https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-lib/typed-racket/static-contracts/combinators/object.rkt
racket
Currently supports object/c and class/c. Bottom-out members
#lang racket/base Static contracts for class constructs . (require "../../utils/utils.rkt" "../structures.rkt" "../constraints.rkt" "simple.rkt" racket/list racket/match (contract-req) racket/syntax typed-racket/utils/opaque-object (for-template racket/...
0bfd88057cfb4c10f35240a47b975e7cb63e53866fe8df98cee74428c55d5dbb
input-output-hk/project-icarus-importer
Mode.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE TemplateHaskell # {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} -- | Execution modes for block logic tests. module Test.Pos.Block.Logic.Mode ( TestParams (..) , HasTestParams (..) , TestInitModeContext (..) , BlockTestContextT...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/generator/src/Test/Pos/Block/Logic/Mode.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # | Execution modes for block logic tests. MonadSlots -------------------------------------------------------------------------- Parameters -------------------------------------------------------------------------- | This data type...
# LANGUAGE TemplateHaskell # module Test.Pos.Block.Logic.Mode ( TestParams (..) , HasTestParams (..) , TestInitModeContext (..) , BlockTestContextTag , PureDBSnapshotsVar(..) , BlockTestContext(..) , BlockTestMode , runBlockTestMode , initBlockTestContext...
9cd543b5ed04cdab5ea8e863adea00cba8a759b3bb60f43467a1230886949402
alx741/graphite
Morphisms.hs
module Data.Graph.Morphisms () where import Data.Graph.DGraph import Data.Graph.Types import Data.Graph.UGraph | Tell if two graphs are isomorphic TODO : check first : same number of vertices , same number of edges areIsomorphic :: Graph g => g v e -> g v' e' -> Bool areIsomorphic = undefined isomorphism...
null
https://raw.githubusercontent.com/alx741/graphite/c911d7dae2c17d20c70ad9b7da1a1f7b142cbb9a/src/Data/Graph/Morphisms.hs
haskell
outdegree
module Data.Graph.Morphisms () where import Data.Graph.DGraph import Data.Graph.Types import Data.Graph.UGraph | Tell if two graphs are isomorphic TODO : check first : same number of vertices , same number of edges areIsomorphic :: Graph g => g v e -> g v' e' -> Bool areIsomorphic = undefined isomorphism...
f8cb237907d1db1a264522ca0710ddfe07d4ab639fd7f549ef9c3b5e86bfb202
shonfeder/nomad
result.ml
include Stdlib.Result module Let = struct let ( let* ) = bind let ( let+ ) x f = map f x end let of_rresult : ('a, Rresult.R.msg) t -> ('a, string) t = fun x -> Rresult.R.reword_error (fun (`Msg m) -> m) x
null
https://raw.githubusercontent.com/shonfeder/nomad/40c00e1792b3d45c0aa51ecec46abbc15410dd1c/lib/result.ml
ocaml
include Stdlib.Result module Let = struct let ( let* ) = bind let ( let+ ) x f = map f x end let of_rresult : ('a, Rresult.R.msg) t -> ('a, string) t = fun x -> Rresult.R.reword_error (fun (`Msg m) -> m) x
83681ac8654a0ceaeb2a5542c85824346ee6b00fb2e4a3f48295af253978e318
uw-unsat/serval
arm64.rkt
#lang racket/base (require ffi/unsafe) (provide (all-defined-out)) (define _uc_arm64_reg (_enum '(invalid = 0 x29 = 1 x30 = 2 nzcv = 3 sp = 4 wsp = 5 wzr = 6 xzr = 7 b0 = 8 b1 = 9 b2 = 10 b3 = 1...
null
https://raw.githubusercontent.com/uw-unsat/serval/be11ecccf03f81b8bd0557acf8385a6a5d4f51ed/serval/unicorn/const/arm64.rkt
racket
#lang racket/base (require ffi/unsafe) (provide (all-defined-out)) (define _uc_arm64_reg (_enum '(invalid = 0 x29 = 1 x30 = 2 nzcv = 3 sp = 4 wsp = 5 wzr = 6 xzr = 7 b0 = 8 b1 = 9 b2 = 10 b3 = 1...
cc82f1da7a77ab014fd4943feef32f6d34ef08708729d755e37e042a8a023547
tsloughter/kuberl
kuberl_v1_server_address_by_client_cidr.erl
-module(kuberl_v1_server_address_by_client_cidr). -export([encode/1]). -export_type([kuberl_v1_server_address_by_client_cidr/0]). -type kuberl_v1_server_address_by_client_cidr() :: #{ 'clientCIDR' := binary(), 'serverAddress' := binary() }. encode(#{ 'clientCIDR' := ClientCIDR, 'serverAddr...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_server_address_by_client_cidr.erl
erlang
-module(kuberl_v1_server_address_by_client_cidr). -export([encode/1]). -export_type([kuberl_v1_server_address_by_client_cidr/0]). -type kuberl_v1_server_address_by_client_cidr() :: #{ 'clientCIDR' := binary(), 'serverAddress' := binary() }. encode(#{ 'clientCIDR' := ClientCIDR, 'serverAddr...
0f4c1c46b6c1d3d616bfcdf959b4aeabe696c70aec9580c301fdb9593d100247
vindarel/cl-cookieweb
run-tests.lisp
(load "{{ cookiecutter.project_name}}.asd") (load "{{ cookiecutter.project_name}}-tests.asd") (ql:quickload "{{ cookiecutter.project_name}}-tests") (in-package :{{ cookiecutter.project_name}}-tests) (uiop:quit (if (run-all-tests) 0 1))
null
https://raw.githubusercontent.com/vindarel/cl-cookieweb/4079a3e84e958caa84ba1c97824149a6dc3e32b8/%7B%7Bcookiecutter.repo_name%7D%7D/run-tests.lisp
lisp
(load "{{ cookiecutter.project_name}}.asd") (load "{{ cookiecutter.project_name}}-tests.asd") (ql:quickload "{{ cookiecutter.project_name}}-tests") (in-package :{{ cookiecutter.project_name}}-tests) (uiop:quit (if (run-all-tests) 0 1))
9abfacfc4d26ed93bb6ff785b0641781e540d4f04d4ad2fe7eb3747abe3f7539
racket/racket7
main.rkt
#lang racket/base (require (only-in "input-port.rkt" input-port? prop:input-port) (only-in "output-port.rkt" output-port? prop:output-port) "bytes-input.rkt" "string-input.rkt" "special-input.rkt" "progr...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/io/port/main.rkt
racket
#lang racket/base (require (only-in "input-port.rkt" input-port? prop:input-port) (only-in "output-port.rkt" output-port? prop:output-port) "bytes-input.rkt" "string-input.rkt" "special-input.rkt" "progr...
161c901deca16d5dda169b419658763866d06d1d6ef031c6baec78ad55d3e205
facebook/flow
ty_printer.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/2cd54bfc70898f3643ed176be52b2ebaa8ce62fb/src/common/ty/ty_printer.ml
ocaml
********* Utils ********* *********************** *********************** util to limit the number of calls to a (usually recursive) function The depth parameter is useful for formatting unions: Top-level does not get parentheses. Same as Compact_printer with the exception of locations this printer do...
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
d3f30cb3c8f281062584b2c27126fc8ce7aec1400d4fea4f06c5ee712a6a899c
tweag/ormolu
following-comment-last-1.hs
module Main where -- | Another datatype... data D' deriving (Show) ^ ... with two docstrings . -- more
null
https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/other/following-comment-last-1.hs
haskell
| Another datatype... more
module Main where data D' deriving (Show) ^ ... with two docstrings .
db019fe2681eb12810adac504d0cb0dba8fa09050ceae5cdeeb0b0addea92d5d
yesodweb/persistent
Base.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE DeriveLift #-} # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE PolyKinds # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Database.Persist.Types.Base ( module Database.Persist.Types.Base -- * Re-exp...
null
https://raw.githubusercontent.com/yesodweb/persistent/0831288b820e198f203ea14ff68b084830f789cd/persistent/Database/Persist/Types/Base.hs
haskell
# LANGUAGE DeriveLift # # LANGUAGE RankNTypes # * Re-exports Bring `Lift (Map k v)` instance into scope, as well as `Lift Text` instance on pre-1.2.4 versions of `text` | A 'Checkmark' should be used as a field type whenever a uniqueness constraint should guarantee that a certain kind of record may appear at most...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Database.Persist.Types.Base ( module Database.Persist.Types.Base , PersistValue(..) , fromPersistValueText , LiteralType(..)...
a52cc7b08c2bebf78b836114c2957eeb1255ba58770c0b4a36ce51f3fca4dcc8
ocaml-obuild/obuild
metacache.ml
open Meta open Gconf open Helper let pkgs_cache : (string, Meta.t) Hashtbl.t = Hashtbl.create 100 let get_from_disk name = verbose Debug " fetching META %s\n%!" name; try Meta.findLib name with Meta.LibraryNotFound n -> raise (Dependencies.DependencyMissing n) let get name = try Hashtbl.find pkg...
null
https://raw.githubusercontent.com/ocaml-obuild/obuild/28252e8cee836448e85bfbc9e09a44e7674dae39/obuild/metacache.ml
ocaml
open Meta open Gconf open Helper let pkgs_cache : (string, Meta.t) Hashtbl.t = Hashtbl.create 100 let get_from_disk name = verbose Debug " fetching META %s\n%!" name; try Meta.findLib name with Meta.LibraryNotFound n -> raise (Dependencies.DependencyMissing n) let get name = try Hashtbl.find pkg...
1fd451b49af0e06ee522edca0dabef2bd98d0c025077d2704ff2894445e7f76c
rvl/flatris
Main.hs
# LANGUAGE FlexibleContexts , TypeFamilies , RecordWildCards , RecursiveDo # module Main where import Reflex import Reflex.Dom import GHCJS.DOM.EventM (mouseOffsetXY, EventM, event, mouseClientXY, uiPageXY, mouseButton, eventTarget) import GHCJS.DOM.Types (IsMouseEvent(..), DOMRect) import qualified GHCJS.DOM.Types ...
null
https://raw.githubusercontent.com/rvl/flatris/f5f099e5b67a6d745280bee869f2c76d9f101737/app-reflex/Main.hs
haskell
space, semicolon, Q/E enter or F DOM.preventDefault DOM.stopPropagation DOM.returnValue False mouse event co-ordinates relative to document. mouse event co-ordinates relative to an element fixme: padding hardcoded -- need to get element position from dom
# LANGUAGE FlexibleContexts , TypeFamilies , RecordWildCards , RecursiveDo # module Main where import Reflex import Reflex.Dom import GHCJS.DOM.EventM (mouseOffsetXY, EventM, event, mouseClientXY, uiPageXY, mouseButton, eventTarget) import GHCJS.DOM.Types (IsMouseEvent(..), DOMRect) import qualified GHCJS.DOM.Types ...
4b4147bb8b07c439205076a297e9a1eea374d37f65e0b617c28f86c7e533e88a
Eduap-com/WordMat
max_ext.lisp
;;Autoloads for maxima (in-package :maxima) ($auto_mexpr '$lratsubst "lrats") ($auto_mexpr '$fullratsubst "lrats") ($auto_mexpr '$nusum "nusum") ($auto_mexpr '$unsum "nusum") ($auto_mexpr '$funcsolve "nusum") ($auto_mexpr '$bffac "bffac") ($auto_mexpr '$cbffac "bffac") ($auto_mexpr '$bfzeta "bffac") ($auto_mexpr '$b...
null
https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/src/max_ext.lisp
lisp
Autoloads for maxima functions from share/linearalgebra eigens-by-jacobi.lisp linalgcholesky.lisp linalg-utilities.lisp lu.lisp mring.lisp linearalgebra.mac
(in-package :maxima) ($auto_mexpr '$lratsubst "lrats") ($auto_mexpr '$fullratsubst "lrats") ($auto_mexpr '$nusum "nusum") ($auto_mexpr '$unsum "nusum") ($auto_mexpr '$funcsolve "nusum") ($auto_mexpr '$bffac "bffac") ($auto_mexpr '$cbffac "bffac") ($auto_mexpr '$bfzeta "bffac") ($auto_mexpr '$bfpsi "bffac") ($auto_me...
1aca2d5358f7751a087c302cd239b02b9fa36afa1a87c860776084bfa4a54af7
futurice/haskell-mega-repo
Navigation.hs
{-# LANGUAGE OverloadedStrings #-} module Futurice.Lucid.Navigation ( Navigation (..), page_, navigation_, futuriceCss, pageParamsWithJS, pageParamsWithCSS, ) where import Futurice.Colour (AccentColour (..), AccentFamily (..), Colour (..), colourClay) import Futurice.Lucid.Foundation h...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/futurice-foundation/src/Futurice/Lucid/Navigation.hs
haskell
# LANGUAGE OverloadedStrings # | Class for navigation descriptions. Which proxy the service descriptions too | Service name. | Description of the link.
module Futurice.Lucid.Navigation ( Navigation (..), page_, navigation_, futuriceCss, pageParamsWithJS, pageParamsWithCSS, ) where import Futurice.Colour (AccentColour (..), AccentFamily (..), Colour (..), colourClay) import Futurice.Lucid.Foundation hiding (page_) import Futurice.Prelu...
e09d1e593454b4ab69bf87832ce6669c857dcdcafd7a825fb989e519eea18f9e
8c6794b6/guile-tjit
t-tail-call-06.scm
;; Loop with tail-call, side trace ends with `tail-call'. (define (g n acc) (if (= n 0) acc (if (< 300 n) (g (- n 1) (+ acc n)) (g (- n 1) (+ acc n 1))))) (define (loop n acc) (define (f n acc) (if (< n 300) (+ acc 2) (+ acc 1))) (if (= n 0) ac...
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-tail-call-06.scm
scheme
Loop with tail-call, side trace ends with `tail-call'.
(define (g n acc) (if (= n 0) acc (if (< 300 n) (g (- n 1) (+ acc n)) (g (- n 1) (+ acc n 1))))) (define (loop n acc) (define (f n acc) (if (< n 300) (+ acc 2) (+ acc 1))) (if (= n 0) acc (if (< 300 n) (loop (- n 1) (f n (g n (+...
4a96ee099764271ca532f444993ad98289b66d26794c11acd731507bd82b23ea
moonlightdrive/ocaml-ec2
describe_regions.ml
open EC2 open EC2_t let _ = let filters = [("endpoint",["*ap*";"*west*"])] in let describe_regs = Lwt_main.run (Monad.run (Regions.describe ~filters () )) in let print_resp {Region.name; endpoint} = print_endline (Printf.sprintf "%s: %s" (string_of_region name) endpoint) in List.map pri...
null
https://raw.githubusercontent.com/moonlightdrive/ocaml-ec2/06df35a4a29f1b51416013ddf126eeb43587dc11/examples/describe_regions.ml
ocaml
open EC2 open EC2_t let _ = let filters = [("endpoint",["*ap*";"*west*"])] in let describe_regs = Lwt_main.run (Monad.run (Regions.describe ~filters () )) in let print_resp {Region.name; endpoint} = print_endline (Printf.sprintf "%s: %s" (string_of_region name) endpoint) in List.map pri...
2d0a0494f24ff6e8c7ebcdf6121111b89edc8290224384329a840614ed9017e0
rmculpepper/gamble
univariate.rkt
Copyright ( c ) 2014 - 2015 Released under the terms of the 2 - clause BSD license . ;; See the file COPYRIGHT for details. #lang racket/base (require (for-syntax racket/base syntax/parse syntax/parse/experimental/template syntax/parse/experimental/e...
null
https://raw.githubusercontent.com/rmculpepper/gamble/a5231e2eb3dc0721eedc63a77ee6d9333846323e/gamble/dist/univariate.rkt
racket
See the file COPYRIGHT for details. implicit in define-dist-type ============================================================ FIXME: is this a good thing to do??? mode = α / (α + β), peakedness = α + β = S (our choice) So if we want dist peaked at x: α = S * x "peakedness" parameter [0, inf) Want to multip...
Copyright ( c ) 2014 - 2015 Released under the terms of the 2 - clause BSD license . #lang racket/base (require (for-syntax racket/base syntax/parse syntax/parse/experimental/template syntax/parse/experimental/eh racket/syntax) ...
fe4ed546aea006152cbd412db9fe770f68471f0ea44e3058ea4da6aa37c0e0cc
jdreaver/amy
Desugar.hs
{-# LANGUAGE OverloadedStrings #-} module Amy.Core.Desugar ( desugarModule ) where import Data.List (foldl') import Data.List.NonEmpty (NonEmpty(..)) import qualified Data.List.NonEmpty as NE import qualified Data.Map.Strict as Map import Data.Maybe (maybeToList) import Amy.Core.AST as C import Amy.Core.Monad im...
null
https://raw.githubusercontent.com/jdreaver/amy/a0c73f6c02e7d923f1d85c0de89f78dc204dae2f/library/Amy/Core/Desugar.hs
haskell
# LANGUAGE OverloadedStrings # Bind the scrutinee to a variable Case Expressions
module Amy.Core.Desugar ( desugarModule ) where import Data.List (foldl') import Data.List.NonEmpty (NonEmpty(..)) import qualified Data.List.NonEmpty as NE import qualified Data.Map.Strict as Map import Data.Maybe (maybeToList) import Amy.Core.AST as C import Amy.Core.Monad import Amy.Core.PatternCompiler as PC...
e641a22d3066bca107d2b2d52d38fbd0983f7f5de35694d907ca41249ff3c974
jvf/scalaris
json2.erl
Copyright ( c ) 2005 - 2006 , A2Z Development USA , Inc. All Rights Reserved . %%% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %%% compliance with the License. You should have received a copy of the %%% Erlang Publi...
null
https://raw.githubusercontent.com/jvf/scalaris/c069f44cf149ea6c69e24bdb08714bda242e7ee0/contrib/yaws/src/json2.erl
erlang
compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved via the world wide web at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations ...
Copyright ( c ) 2005 - 2006 , A2Z Development USA , Inc. All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " The Initial Develo...
3dbf5a97cf6011eec1285d5260694c9f289cc3d73f133268124cd3386103e8b3
aryx/xix
chan_.ml
open Types type qid = { less : really need more than 32 billions files ? qpath: int64; qver: int; qtype: qid_kind; } and qid_kind = | QFile | QDir (* less: more stuff here*) (* less: opti: use a bitset *) type open_mode = { read: bool; write: bool; (* less: more stuff here*) } type t = { qid:...
null
https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/kernel/core/chan_.ml
ocaml
less: more stuff here less: opti: use a bitset less: more stuff here less: dev: int
open Types type qid = { less : really need more than 32 billions files ? qpath: int64; qver: int; qtype: qid_kind; } and qid_kind = | QFile | QDir type open_mode = { read: bool; write: bool; } type t = { qid: qid; chantype: devid; mode: open_mode; offset: int64; path: string list; ism...
401c8f9ea3e1f82ed72a9d0cadf34d43fc59d2f402079707cb3c61320fa7daca
abcdw/rde
emacs.scm
(define-module (gnu home-services emacs) #:use-module (gnu home services) #:use-module (gnu home-services-utils) #:use-module (gnu home services shepherd) #:use-module (gnu packages emacs) #:use-module (gnu services configuration) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (ice...
null
https://raw.githubusercontent.com/abcdw/rde/5b8605f421d0b8a9569e43cb6f7e651e7a8f7218/src/gnu/home-services/emacs.scm
scheme
String with path to a Here is content of test-init.el Another comment built-in emacs packages in case of collisions (define* (mixed-text-file name #:rest text) "Return an object representing store file NAME containing TEXT. TEXT is a sequence of strings and file-like objects, as in: (mixed-text-file \"pro...
(define-module (gnu home-services emacs) #:use-module (gnu home services) #:use-module (gnu home-services-utils) #:use-module (gnu home services shepherd) #:use-module (gnu packages emacs) #:use-module (gnu services configuration) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (ice...
268186d8908e129c89a4a4f6d0ad470e1738f40df7123b0ac0093e8fb1cce16a
quil/quil
manual.clj
(ns ^:manual manual (:require [quil.core :as q] [quil.middlewares.fun-mode :as fm] [clojure.test :refer [deftest]])) (defn draw-text [& txt] (q/fill 0) (q/background 255) (q/text-size 20) (q/fill 0) (q/text-align :center :center) (q/text (apply str txt) (/ (q/width) 2) ...
null
https://raw.githubusercontent.com/quil/quil/1f214e712d834ede311fdc652eafe9cc0232c96e/test/clj/manual.clj
clojure
no-stroke -> stroke -> no-stroke stroke -> no stroke -> original stroke stroke -> different stroke -> original stroke no-stroke -> no-stroke -> no-stroke no-fill -> fill -> no-fill fill -> no-fill -> fill fill -> different fill -> original fill no-fill -> no-fill -> no-fill
(ns ^:manual manual (:require [quil.core :as q] [quil.middlewares.fun-mode :as fm] [clojure.test :refer [deftest]])) (defn draw-text [& txt] (q/fill 0) (q/background 255) (q/text-size 20) (q/fill 0) (q/text-align :center :center) (q/text (apply str txt) (/ (q/width) 2) ...
f8aada353caa927a961f2e0cc594f163358592dabfa9105aab6a79044182d090
patricoferris/ocaml-multicore-monorepo
js_traverse.ml
Js_of_ocaml compiler * / * Copyright ( C ) 2013 Hugo Heuzard * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of th...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/624b3293ee41e83736fe7ac3a79f810c2b70f68b/duniverse/js_of_ocaml/compiler/lib/js_traverse.ml
ocaml
generic js ast walk/map var substitution Some js bundler get confused when the argument of 'require' is not a literal do not replace constant in switch case this optimisation should be done at the lowest common scope def/used/free variable special merge here we need to propagate both def and use...
Js_of_ocaml compiler * / * Copyright ( C ) 2013 Hugo Heuzard * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of th...
45370d542201482b8d18615e7ab31f3fdad0c1163ec9bdde8ae469178db3cdc4
albertoruiz/easyVision
Tesseract.hs
----------------------------------------------------------------------------- | Module : ImagProc . Contrib . Tesseract Copyright : ( c ) 2011 License : GPL Maintainer : ( aruiz at um dot es ) Stability : provisional Interface to tesseract OCR ( currently using temp fil...
null
https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/packages/contrib/tesseract/src/ImagProc/Contrib/Tesseract.hs
haskell
--------------------------------------------------------------------------- -------------------------------------------------------------------- , espeak -------------------------------------------------------------------- -------------------------------------------------------------------- espeak :: String -> IO ()...
| Module : ImagProc . Contrib . Tesseract Copyright : ( c ) 2011 License : GPL Maintainer : ( aruiz at um dot es ) Stability : provisional Interface to tesseract OCR ( currently using temp files and system calls . ) Module : ImagProc.Contrib.Tesseract Copyright...
36a76d4c49c39c8a5f9ba4c089fa88a2792ee6e7423c6f1c0e9e3b67e545c1a1
billstclair/trubanc-lisp
fad.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - FAD ; Base : 10 -*- $ Header : /usr / local / cvsrep / cl - fad / fad.lisp , v 1.33 2008/03/12 00:10:43 edi Exp $ Copyright ( c ) 2004 , . All rights reserved . Copyright ( c ) 2004 - 2008 , Dr. . All rights reserved . ;;; Redistribution and us...
null
https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/cl-fad-0.6.2/fad.lisp
lisp
Syntax : COMMON - LISP ; Package : CL - FAD ; Base : 10 -*- 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 ...
$ Header : /usr / local / cvsrep / cl - fad / fad.lisp , v 1.33 2008/03/12 00:10:43 edi Exp $ Copyright ( c ) 2004 , . All rights reserved . Copyright ( c ) 2004 - 2008 , Dr. . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAU...
940812b3d466b76ba907384c43d6c6428688b80c8aacc83dde4c8e0660c30faa
BitGameEN/bitgamex
usr_useractivation.erl
%%%-------------------------------------------------------- %%% @Module: usr_useractivation %%% @Description: 自动生成 %%%-------------------------------------------------------- -module(usr_useractivation). -export([get_one/1, set_one/1, set_field/3, del_one/1, syncdb/1, clean_all_cache/0, cache_key/1]). -include("common....
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/data/usr_useractivation.erl
erlang
-------------------------------------------------------- @Module: usr_useractivation @Description: 自动生成 --------------------------------------------------------
-module(usr_useractivation). -export([get_one/1, set_one/1, set_field/3, del_one/1, syncdb/1, clean_all_cache/0, cache_key/1]). -include("common.hrl"). -include("record_usr_useractivation.hrl"). get_one(Id = Id) -> case run_data:in_trans() of true -> case run_data:trans_get(usr_useractivation, Id) of [] -> ...
a72f95926a279959c686d421534f5d70bbfe6ef585877021a8491ed76a568840
nada-attia/dama
test.ml
open OUnit2 open Board open Command What we tested : We had 7 modules : Board , Move , Command , State , Ai , , Main . Ai , , and Main were tested manually : Ai was tested by playing the game against the AI through the terminal as well as the GUI . Main was tested through the terminal and was teste...
null
https://raw.githubusercontent.com/nada-attia/dama/0a9aabd14a55b56af531aaaeb1601500d665fc72/src/test.ml
ocaml
open OUnit2 open Board open Command What we tested : We had 7 modules : Board , Move , Command , State , Ai , , Main . Ai , , and Main were tested manually : Ai was tested by playing the game against the AI through the terminal as well as the GUI . Main was tested through the terminal and was teste...
44e0f3daffed6cbb50bc3dc0e65fc3b23b7d296431b54f82fb19153cf9b1ebff
UlfNorell/insane
Monad.hs
# LANGUAGE ExistentialQuantification , DeriveFunctor , GeneralizedNewtypeDeriving # GeneralizedNewtypeDeriving #-} module TypeChecker.Monad where import Control.Applicative import Control.Monad.State import Control.Monad.Reader import Control.Monad.Error import Data.Map as Map import Data....
null
https://raw.githubusercontent.com/UlfNorell/insane/694d5dcfdc3d4dd4f31138228ef8d87dd84fa9ec/typechecker/TypeChecker/Monad.hs
haskell
------------------------------------------------------------------------- * Environment ------------------------------------------------------------------------- ------------------------------------------------------------------------- ** Context -----------------------------------------------------------------------...
# LANGUAGE ExistentialQuantification , DeriveFunctor , GeneralizedNewtypeDeriving # GeneralizedNewtypeDeriving #-} module TypeChecker.Monad where import Control.Applicative import Control.Monad.State import Control.Monad.Reader import Control.Monad.Error import Data.Map as Map import Data....
67415a842d3708eda7c62534381f9f598f16e08c78c5891d50ed080461522594
emotiq/emotiq
cosi-tests.lisp
(in-package :cosi-bls-test) (define-test basis-consistency (assert-true (hash-check range-proofs::*digits-of-pi* range-proofs::*chk-digits-of-pi*)) (assert-true (hash-check range-proofs::*bp-basis* range-proofs::*chk-bp-basis*))) (define-test uncloaked-transaction-consistency (let* ((k (pbc:make-key-pair :d...
null
https://raw.githubusercontent.com/emotiq/emotiq/9af78023f670777895a3dac29a2bbe98e19b6249/src/Cosi-BLS/test/cosi-tests.lisp
lisp
genesis keying
(in-package :cosi-bls-test) (define-test basis-consistency (assert-true (hash-check range-proofs::*digits-of-pi* range-proofs::*chk-digits-of-pi*)) (assert-true (hash-check range-proofs::*bp-basis* range-proofs::*chk-bp-basis*))) (define-test uncloaked-transaction-consistency (pkey (pbc:keying-triple-pk...
b33e27b67cce7ba2aeaaeecf79742c50698fbf309dd3fe01fa0c61866ced648d
tdbgamer/flink-statefulfun-hs
Stateful.hs
# LANGUAGE PatternSynonyms # module Network.Flink.Internal.Stateful ( StatefulFunc ( insideCtx, getCtx, setCtx, modifyCtx, sendMsg, sendMsgDelay, sendEgressMsg ), flinkWrapper, createApp, flinkServer, flinkApi, Address(.., Address'), ...
null
https://raw.githubusercontent.com/tdbgamer/flink-statefulfun-hs/702c24987712e8c88897943d8cfe02d864f2aeae/src/Network/Flink/Internal/Stateful.hs
haskell
# COMPLETE Address' # - | Table of stateful functions `(functionNamespace, functionType) -> function | Monad stack used for the execution of a Flink stateful function Don't reference this directly in your code if possible | Type name TODO: add adt name | Used to represent all Flink stateful function capabilities. ...
# LANGUAGE PatternSynonyms # module Network.Flink.Internal.Stateful ( StatefulFunc ( insideCtx, getCtx, setCtx, modifyCtx, sendMsg, sendMsgDelay, sendEgressMsg ), flinkWrapper, createApp, flinkServer, flinkApi, Address(.., Address'), ...
0aa701e9f3ac7045b2a20ebcd7bdecc600a3a81d7521ff216f9be2862e211069
guardian/content-api-haskell-client
Reference.hs
{-# LANGUAGE OverloadedStrings #-} module Network.Guardian.ContentApi.Reference where import Control.Monad (mzero) import Data.Aeson import Data.Text (Text) newtype ReferenceType = ReferenceType { unReferenceType :: Text } deriving (Show) data Reference = Reference { referenceType :: ReferenceType , refer...
null
https://raw.githubusercontent.com/guardian/content-api-haskell-client/f80195c4117570bc3013cbe93ceb9c5d3f5e17bd/guardian-content-api-client/Network/Guardian/ContentApi/Reference.hs
haskell
# LANGUAGE OverloadedStrings #
module Network.Guardian.ContentApi.Reference where import Control.Monad (mzero) import Data.Aeson import Data.Text (Text) newtype ReferenceType = ReferenceType { unReferenceType :: Text } deriving (Show) data Reference = Reference { referenceType :: ReferenceType , referenceId :: Text } deriving Show i...
db7352362673136315de4dfb04f9545d91b1c5cd4b63dea75a44bb9ef8c4b5c6
rowangithub/DOrder
delaunay.ml
(**************************************************************************) (* *) : a generic graph library for OCaml Copyright ( C ) 2004 - 2007 , and (* ...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/external/ocamlgraph/src/delaunay.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
: a generic graph library for OCaml Copyright ( C ) 2004 - 2007 , and modify it under the terms of the GNU Library General Public License version 2 , with the special exception on linking $ I d :...
9ca8fffb6fc8ab693455f1388f4ebf4f8e824bf4ea772092ea0c980b1ec10c6c
system-f/fp-course
Applicative.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # # LANGUAGE InstanceSigs # # LANGUAGE RebindableSyntax # module Course.Applicative where import Course.Core import Course.ExactlyOne import Course.Functor import Course.List import Course.Optional import qualified Prelude as P(fmap, pure, (>>=)) | All ...
null
https://raw.githubusercontent.com/system-f/fp-course/ada33f57099f02960b13ccd835d592c8d80e1ffb/src/Course/Applicative.hs
haskell
These laws are not checked by the compiler. These laws are given as: * The law of identity * The law of composition `∀u v w. pure (.) <*> u <*> v <*> w = u <*> (v <*> w)` * The law of homomorphism * The law of interchange `∀u y. u <*> pure y = pure ($ y) <*> u` Pronounced, apply. >>> ExactlyOne (+10)...
# LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # # LANGUAGE InstanceSigs # # LANGUAGE RebindableSyntax # module Course.Applicative where import Course.Core import Course.ExactlyOne import Course.Functor import Course.List import Course.Optional import qualified Prelude as P(fmap, pure, (>>=)) | All ...
25126e74d99ceb636adad923ff0a1508a51158aa3c370437a4d563bf4a2d3b98
bobzhang/fan
label.ml
value f ~a:_ ?b:_ = ();
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/test/fixtures/label.ml
ocaml
value f ~a:_ ?b:_ = ();
e0dd46edaa4d47c66843544e75078eebd2f0ff53a8961df5017536e9dac40ed8
lagenorhynque/spec-examples
play.clj
(ns spec-examples.blackjack.play (:require [spec-examples.blackjack :as bj])) (let [g (atom (bj/init-game)) show #(bj/show-status @g) hit-by-dealer #(while (< (bj/sum-hand (::bj/dealer @g)) 17) (reset! g (bj/hit @g ::bj/dealer)) (show))] (defn init [] (...
null
https://raw.githubusercontent.com/lagenorhynque/spec-examples/08abc27cf56f1b1517da25b5723f36c5fb391b9f/src/clj/spec_examples/blackjack/play.clj
clojure
(ns spec-examples.blackjack.play (:require [spec-examples.blackjack :as bj])) (let [g (atom (bj/init-game)) show #(bj/show-status @g) hit-by-dealer #(while (< (bj/sum-hand (::bj/dealer @g)) 17) (reset! g (bj/hit @g ::bj/dealer)) (show))] (defn init [] (...
02eeab7b169a008959494aab5ac1314210a1649567434d1cd723be2cc3e7eb3b
pigworker/Syrup
Dot.hs
------------------------------------------------------------------------------ ----- ----- --- Dot : Compiler to Dot graph format ----- ----- ----- ---...
null
https://raw.githubusercontent.com/pigworker/Syrup/d59e3a9b65274075f14f19b48746182a773bafc5/SRC/Dot.hs
haskell
---------------------------------------------------------------------------- --- ----- - Dot : Compiler to Dot graph format ----- --- ----- -----------...
# LANGUAGE LambdaCase # # LANGUAGE TupleSections # # LANGUAGE GeneralisedNewtypeDeriving # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE DeriveFoldable # module Syrup.SRC.Dot where import Control.Monad.Writer import Control.Mo...
58a1111703e147f87b827c4f54a792dc06d6a69f459c00725824b8960271cab3
nyampass/conceit
csv.clj
(ns conceit.commons.csv (require [clojure.string :as string])) (defn csv-value [value] (str \" (string/replace (if (or (keyword? value) (symbol? value)) (name value) (str value)) "\"" "\"\"") \")) (defn csv-row [values] (apply str (interpose \, (map csv-value values)))) (defn csv-rows [values-seq] (apply str...
null
https://raw.githubusercontent.com/nyampass/conceit/2b8ba8cc3d732fe2f58d320e2aa4ecdd6f3f3be5/conceit-commons/src/conceit/commons/csv.clj
clojure
(ns conceit.commons.csv (require [clojure.string :as string])) (defn csv-value [value] (str \" (string/replace (if (or (keyword? value) (symbol? value)) (name value) (str value)) "\"" "\"\"") \")) (defn csv-row [values] (apply str (interpose \, (map csv-value values)))) (defn csv-rows [values-seq] (apply str...
0c4a30d3046f0203d9315d4e2b4bc363603f3ad02d480b6f3f66ef15b5633627
kumarshantanu/cambium
codec_cheshire_test.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file LICENSE at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; the ...
null
https://raw.githubusercontent.com/kumarshantanu/cambium/8e0bce44f6bc9a37adb4182f1a9e65ef9ddf4152/cambium.codec-cheshire/test/cambium/codec_cheshire_test.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 LICENSE at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this ...
Copyright ( c ) . All rights reserved . (ns cambium.codec-cheshire-test (:require [clojure.test :refer :all] [cambium.codec :as codec])) (deftest test-nesting-support (is (true? codec/nested-nav?))) (deftest test-stringify-key (testing "string keys" (is (= "foo" (codec/stringify-key "f...
abe818d10aa3901b7a26527f058f1a94b1f079732db066ae5fcfd2fafebdbc19
Jugendhackt/haskell-ricochet
Crypto.hs
| Module : Network . Ricochet . Testing . Crypto Description : The tests for Network . Ricochet . Crypto " Network . Ricochet . Testing . Crypto " contains all of the tests for " Network . Ricochet . Crypto " . Module : Network.Ricochet.Testing.Crypto Description : The tests for Network.Ri...
null
https://raw.githubusercontent.com/Jugendhackt/haskell-ricochet/aa84fb96b2e73c6ea18ecb0c95d6b5c9b9e9bacb/test/Network/Ricochet/Testing/Crypto.hs
haskell
| Check the base64 Prism | Check the sign and verify functions | Check the raw sign and verify functions | Assert that torDomain computes the correct domain
| Module : Network . Ricochet . Testing . Crypto Description : The tests for Network . Ricochet . Crypto " Network . Ricochet . Testing . Crypto " contains all of the tests for " Network . Ricochet . Crypto " . Module : Network.Ricochet.Testing.Crypto Description : The tests for Network.Ri...
ba082548f86982286acbadca273a845c86428fe265f4bbc519e45687e314369b
BrunoBonacci/1config
backends.clj
(ns ^{:author "Bruno Bonacci (@BrunoBonacci)" :no-doc true} com.brunobonacci.oneconfig.backends (:refer-clojure :exclude [find load list]) (:require [com.brunobonacci.oneconfig.backend :refer :all] [com.brunobonacci.oneconfig.backends [dynamo :refer [dynamo-config-backend default...
null
https://raw.githubusercontent.com/BrunoBonacci/1config/4cf8284b1b490253ac617bec9d2348c3234931e6/1config-core/src/com/brunobonacci/oneconfig/backends.clj
clojure
The different backends work as layers with different responsibilities. configuration is a valid json or that it encrypted before it reaches a shared storage. They all work based on the IConfigBackend protocol and they might accept a secondary backed where they will "pass-on" the request after they are done with...
(ns ^{:author "Bruno Bonacci (@BrunoBonacci)" :no-doc true} com.brunobonacci.oneconfig.backends (:refer-clojure :exclude [find load list]) (:require [com.brunobonacci.oneconfig.backend :refer :all] [com.brunobonacci.oneconfig.backends [dynamo :refer [dynamo-config-backend default...
e268a6a06bf20828b4da3931e864af9ffef3f120c009d38047e592f8b30be1e1
mgritter/aoc-lh
Main.hs
module Main (main) where import LoadLines import Data.List.Split import qualified Data.Set as Set import Data.Maybe data Move = R Int | U Int | L Int | D Int parseMove :: String -> Maybe Move parseMove s = case (splitOneOf " " s) of ("R":n:[]) -> Just $ R (read n) ("U":n:[]) -> Just $ U (read n) ("L":n...
null
https://raw.githubusercontent.com/mgritter/aoc-lh/404ef156aae866afe2492fa25b5078b400d9fed4/2022/day9/Main.hs
haskell
@ measure yCoord @ @ measure xCoord @ -- Doesn't work, why? absVal :: Int -> Int absVal i = if i < 0 then (0 - i) else i {-@ measure absVal @ NOTE: if it's a measure instead, then moveOneStep fails type-checking with a long error @ inline withinTwo @ Given the head position and the tail position, describe the next p...
module Main (main) where import LoadLines import Data.List.Split import qualified Data.Set as Set import Data.Maybe data Move = R Int | U Int | L Int | D Int parseMove :: String -> Maybe Move parseMove s = case (splitOneOf " " s) of ("R":n:[]) -> Just $ R (read n) ("U":n:[]) -> Just $ U (read n) ("L":n...
13d5167e6240fad1e07c73e46c756abce94e4f1cdcc2ad76577fb33762ff6b05
c-cube/trustee
expr_printer.ml
open Common_ (** Abstract view of expressions *) type ('t, 'ty) view = | Var of string | Bound_var_db of int | App of 't * 't | Const of string * 'ty list | Lambda of string * 'ty * 't | Lambda_db of string option * 'ty * 't | Box of 't list * 't module type EXPR = sig type ty type t val pp_ty :...
null
https://raw.githubusercontent.com/c-cube/trustee/8ae3d777f55ef2b499b43c0b26e5fde1f2ea7761/src/syntax/expr_printer.ml
ocaml
* Abstract view of expressions TODO: improve printer @param p current precedence @param k depth of DB indices @param names optional name for each DB index (len: k) use name from the corresponding binder regular infix not a DB binder
open Common_ type ('t, 'ty) view = | Var of string | Bound_var_db of int | App of 't * 't | Const of string * 'ty list | Lambda of string * 'ty * 't | Lambda_db of string option * 'ty * 't | Box of 't list * 't module type EXPR = sig type ty type t val pp_ty : Notation.t -> ty Fmt.printer val...
c05df475650f097df5d408917c91eaee56d32a4659e2e51a6d3c0e0d06baff3b
baconpaul/composition-kit
folk_dances_3.clj
(ns composition-kit.compositions.folk-dances.folk-dances-3 (:require [composition-kit.music-lib.midi-util :as midi]) (:require [composition-kit.music-lib.tempo :as tempo]) (:require [composition-kit.music-lib.tonal-theory :as th]) (:require [composition-kit.music-lib.logical-sequence :as ls]) (:require [compo...
null
https://raw.githubusercontent.com/baconpaul/composition-kit/fce0addb74a9c30ba06e051d3bca51c5a2b0ce6f/src/composition_kit/compositions/folk_dances/folk_dances_3.clj
clojure
- Bells in middle section Whack together a clock here find the highest _ (try-out ph2 sin-bell) (try-out (<*> alto-mid tenor-mid) chorus) alternate here please! (agent-error player) (def s (composition-kit.events.physical-sequence/stop player))
(ns composition-kit.compositions.folk-dances.folk-dances-3 (:require [composition-kit.music-lib.midi-util :as midi]) (:require [composition-kit.music-lib.tempo :as tempo]) (:require [composition-kit.music-lib.tonal-theory :as th]) (:require [composition-kit.music-lib.logical-sequence :as ls]) (:require [compo...
a21c8b96244d64c17aa4e18216876a667464355b0aa2efd3a87ba068719778b7
DeepSec-prover/deepsec
term.ml
(**************************************************************************) (* *) DeepSec (* *) ...
null
https://raw.githubusercontent.com/DeepSec-prover/deepsec/8ddc45ec79de5ec49810302ea7da32d3dc9f46e4/Source/core_library/term.ml
ocaml
************************************************************************ ...
DeepSec , project PESTO , , project PESTO , , project PESTO , Copyright ( C ) INRIA 2017 - 2020 the GNU General Publ...
473729c5d97379edc50d22bcbb8e4756de8b4e141de11d158c5ee4a8e19e4eae
granule-project/granule
Desugar.hs
-- Provides the desugaring step of the language # LANGUAGE ViewPatterns # module Language.Granule.Interpreter.Desugar where import Language.Granule.Syntax.Def import Language.Granule.Syntax.Expr import Language.Granule.Syntax.Identifiers import Language.Granule.Syntax.Pattern import Language.Granule.Syntax.Span impo...
null
https://raw.githubusercontent.com/granule-project/granule/aa869e0522ad961f6627e827055700c5fcabfc75/interpreter/src/Language/Granule/Interpreter/Desugar.hs
haskell
Provides the desugaring step of the language desugar adt@ADT{} = adt Error cases List of variables to represent each argument Guard expression case for each equation
# LANGUAGE ViewPatterns # module Language.Granule.Interpreter.Desugar where import Language.Granule.Syntax.Def import Language.Granule.Syntax.Expr import Language.Granule.Syntax.Identifiers import Language.Granule.Syntax.Pattern import Language.Granule.Syntax.Span import Language.Granule.Syntax.Type import Control.M...
2b25e1340a6141dc5f1d3ad6a804696a79a1efcb677741aaea5d148dcc36a6c3
milankinen/cuic
chrome.clj
(ns cuic.chrome "Functions for Chrome process launching and management" (:require [clojure.spec.alpha :as s] [clojure.tools.logging :refer [trace debug error fatal]] [clojure.java.io :as io] [clojure.string :as string] [clojure.data.json :as json] [cuic.in...
null
https://raw.githubusercontent.com/milankinen/cuic/94718c0580da2aa127d967207f163c7a546b6fb1/src/clj/cuic/chrome.clj
clojure
Launch headless instance using provided defaults and auto-detected binary Launch non-headless instance using pre-defined data directory Launch chrome from non-standard location Launch headless instance and use it as a default browser and close the instance after usage
(ns cuic.chrome "Functions for Chrome process launching and management" (:require [clojure.spec.alpha :as s] [clojure.tools.logging :refer [trace debug error fatal]] [clojure.java.io :as io] [clojure.string :as string] [clojure.data.json :as json] [cuic.in...
b6a61274c888a3f3a9b77cc411cc98c5cbe33cdf5a579c4577b8c9be7d726e0a
binaryage/cljs-devtools
defaults.cljs
(ns devtools.defaults ; warning: when touching this ns form, update also eval-css-arg in defaults.clj (:require-macros [devtools.defaults :as d :refer [css span named-color]])) (def known-features (delay [:formatters :hints :async])) (def default-features (delay [:formatters])) (def feature-groups (delay {:all ...
null
https://raw.githubusercontent.com/binaryage/cljs-devtools/67e93e31ea53a31a5e3cb632f407057b444e3d2b/src/lib/devtools/defaults.cljs
clojure
warning: when touching this ns form, update also eval-css-arg in defaults.clj -- installation ------------------------------------------------------------------------------------------------------ you can specify a list/vector of features from known-features or a keyword from feature-groups the detector is flaky in...
(ns devtools.defaults (:require-macros [devtools.defaults :as d :refer [css span named-color]])) (def known-features (delay [:formatters :hints :async])) (def default-features (delay [:formatters])) (def feature-groups (delay {:all @known-features :default @default-features})) (def c...
e2a8328e3461d75700ea450af67ece198c65eec389dc30d2f4b74d54707f60e6
ducki2p/i2conomy
run.clj
(ns script.run (:require [clojure.contrib.sql :as sql]) (:use ring.adapter.jetty) (:require i2conomy.wallet) (:require [i2conomy.db :as db])) (defn runserver [] (sql/with-connection db/file-db (db/create-tables) (let [port (Integer/parseInt (get (System/getenv) "PORT" "8000"))] (run-jetty #'i2conom...
null
https://raw.githubusercontent.com/ducki2p/i2conomy/d4e70cafd80210ebdf8dcb596dbb929a32bf7e11/src/script/run.clj
clojure
(ns script.run (:require [clojure.contrib.sql :as sql]) (:use ring.adapter.jetty) (:require i2conomy.wallet) (:require [i2conomy.db :as db])) (defn runserver [] (sql/with-connection db/file-db (db/create-tables) (let [port (Integer/parseInt (get (System/getenv) "PORT" "8000"))] (run-jetty #'i2conom...
98a64856b378ab5a626f3ae5d1f1690353052f3e611d49519a7765ef29bc425d
wireapp/wire-server
Tag.hs
# LANGUAGE StandaloneKindSignatures # # LANGUAGE TemplateHaskell # -- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published ...
null
https://raw.githubusercontent.com/wireapp/wire-server/090e762ec0a2026a266c1fd2a288301b3759d92f/libs/wire-api/src/Wire/API/Conversation/Action/Tag.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTI...
# LANGUAGE StandaloneKindSignatures # # LANGUAGE TemplateHaskell # Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Af...
e445c92f500da4a495899ae62fb803f94822b972478cffd90e167e3371251b7d
clj-kondo/clj-kondo
errors.clj
Copyright ( c ) , , Rich Hickey & 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 ...
null
https://raw.githubusercontent.com/clj-kondo/clj-kondo/626978461cbf113c376634cdf034d7262deb429f/inlined/clj_kondo/impl/toolsreader/v1v2v2/clojure/tools/reader/impl/errors.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 ) , , Rich Hickey & contributors . (ns ^{:no-doc true} clj-kondo.impl.toolsreader.v1v2v2.clojure.tools.reader.impl.errors (:require [clj-kondo.impl.toolsreader.v1v2v2.clojure.tools.reader.reader-types :as types] [clj-kondo.impl.toolsreader.v1v2v2.clojure.tools.reader.impl.inspect :a...
8fd5d08f8a1989473fff101cf8c193ef00c9d7d03b74bb89f1651e91fdefec86
rspeer/wikiparsec
AnnotatedText.hs
# LANGUAGE NoImplicitPrelude , OverloadedStrings # import Test.HUnit import Text.MediaWiki.AnnotatedText import WikiPrelude import Control.Monad linkTest = makeLink "" "test" "" "test" linkExample = makeLink "en" "example" "#English" "example" at1 = annotate [linkTest] "test" at2 = annotate [linkExample] "example" ...
null
https://raw.githubusercontent.com/rspeer/wikiparsec/38d944a272fe3148822cf28aa6011c0ba57287bb/tests/AnnotatedText.hs
haskell
# LANGUAGE NoImplicitPrelude , OverloadedStrings # import Test.HUnit import Text.MediaWiki.AnnotatedText import WikiPrelude import Control.Monad linkTest = makeLink "" "test" "" "test" linkExample = makeLink "en" "example" "#English" "example" at1 = annotate [linkTest] "test" at2 = annotate [linkExample] "example" ...
2fe50297d7e81d0180e58b98776a85b05fe235391af062b38dbb42149fb48b18
jacekschae/learn-datomic-course-files
server.clj
(ns cheffy.server (:require [cheffy.router :as router] [environ.core :refer [env]] [integrant.core :as ig] [ring.adapter.jetty :as jetty] [datomic.client.api :as d] [datomic.dev-local :as dl] [clojure.edn :as edn])) (defn has-ident? [db ident]...
null
https://raw.githubusercontent.com/jacekschae/learn-datomic-course-files/c337e9efe3744705fe2aac786cf87a89995517b9/increments/34-transaction-fn-config/src/main/cheffy/server.clj
clojure
(ns cheffy.server (:require [cheffy.router :as router] [environ.core :refer [env]] [integrant.core :as ig] [ring.adapter.jetty :as jetty] [datomic.client.api :as d] [datomic.dev-local :as dl] [clojure.edn :as edn])) (defn has-ident? [db ident]...
8e8c1a1128182c539afa417b53584ad097463d07c36596dd7ff12466458dddef
ocurrent/ocaml-ci
git_forge.ml
include Git_forge_intf module Make (F : Forge) : View = struct module Repo = Repo.Make (F) module Ref = Ref.Make (F) module Step = Step.Make (F) module History = History.Make (F) let prefix = F.prefix let request_prefix = F.request_prefix let list_history = History.list let list_repos = Repo.list le...
null
https://raw.githubusercontent.com/ocurrent/ocaml-ci/85a6f26b09386a442744ebe0acd961c1169eb14f/web-ui/view/git_forge.ml
ocaml
include Git_forge_intf module Make (F : Forge) : View = struct module Repo = Repo.Make (F) module Ref = Ref.Make (F) module Step = Step.Make (F) module History = History.Make (F) let prefix = F.prefix let request_prefix = F.request_prefix let list_history = History.list let list_repos = Repo.list le...
b817b8ff7c7633eab2fcf98f8f37f953edfffb2c9d33cfc049f445ec9b3ba674
wfnuser/sicp-solutions
e3-55.scm
(define (add-streams s1 s2) (stream-map + s1 s2)) (define integers (cons-stream 1 (add-streams ones integers))) (define (partial-sums s) (add-streams s (cons-stream 0 (partial-sums s))))
null
https://raw.githubusercontent.com/wfnuser/sicp-solutions/2c94b28d8ee004dcbfe7311f866e5a346ee01d12/ch3/e3-55.scm
scheme
(define (add-streams s1 s2) (stream-map + s1 s2)) (define integers (cons-stream 1 (add-streams ones integers))) (define (partial-sums s) (add-streams s (cons-stream 0 (partial-sums s))))
0514b36c7b6b2ed02db4133f30905e7f1cc25cef87d11aa97e733e24e9d6b831
input-output-hk/ouroboros-network
QuickCheck.hs
{-# LANGUAGE RankNTypes #-} module Ouroboros.Network.Testing.QuickCheck ( runSimGen , monadicSim ) where import Test.QuickCheck import Test.QuickCheck.Gen.Unsafe (Capture (..), capture) import Test.QuickCheck.Monadic import Control.Monad.IOSim | ' ' analogue of ' run...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/6c15a8093bac34091ad96af2b8b0d1f7fe54b732/ouroboros-network-testing/src/Ouroboros/Network/Testing/QuickCheck.hs
haskell
# LANGUAGE RankNTypes # > runSTGen :: (forall s. Gen (ST s a)) -> Gen a > monadicST :: Testable a => (forall s. PropertyM (ST s) a) -> Property
module Ouroboros.Network.Testing.QuickCheck ( runSimGen , monadicSim ) where import Test.QuickCheck import Test.QuickCheck.Gen.Unsafe (Capture (..), capture) import Test.QuickCheck.Monadic import Control.Monad.IOSim | ' ' analogue of ' runSTGen ' > runSimGen : : ( ...
cc11eb08691f73395edf56e7d4325a52038fa3478c0362d8aa2f97c6702a272b
maximedenes/native-coq
common.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/plugins/extraction/common.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * By default, in module Format, you ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Libnames open...
a3b2e88a6e9de8717af2752a3bf2cbe4569a43731d5251b1a12866d9e81aad90
cardmagic/lucash
rx-lib.scm
Procedures that appear in code produced by ( RX ... ) . ;;; In sexp syntax, a ,<exp> or ,@<exp> form may evaluate to a string, char, char - set , or regexp value . Coerce one of these to a regexp value . (define (coerce-dynamic-regexp x) (cond ((string? x) (make-re-string x)) ((char? x) (make-re-str...
null
https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scsh/rx/rx-lib.scm
scheme
In sexp syntax, a ,<exp> or ,@<exp> form may evaluate to a string, char, a ,<exp> or form must be coercable to a char-set.
Procedures that appear in code produced by ( RX ... ) . char - set , or regexp value . Coerce one of these to a regexp value . (define (coerce-dynamic-regexp x) (cond ((string? x) (make-re-string x)) ((char? x) (make-re-string (string x))) ((char-set? x) (make-re-char-set x)) ((regexp? x) x) ...
44e709cb21450f0893e251b9279b096f00bc53236e52fda77c8da071318fda57
well-typed-lightbulbs/ocaml-esp32
hashtbl.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/stdlib/hashtbl.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the type ('a, 'b) t = } and ('a, 'b) bucketlist = Empty | Cons of { mutable key: 'a; ...
3e7a63e56a7d9dace7d4661a5e7cffed1e021ca966596d1c1473efb4e6cdf448
skinkade/uniformity
util.clj
(ns uniformity.internals.java.util (:require [clojure.data.json :as json] [msgpack.core :as msg] [msgpack.clojure-extensions]) (:import [org.apache.commons.codec.binary Base64 Hex])) (defn base64-encode ^String [^bytes bytes] (Base64/encodeBase64String bytes)) (defn base64-encode-urlsa...
null
https://raw.githubusercontent.com/skinkade/uniformity/e9d007a7be833e70b4358c02700fd81866de775a/src/uniformity/internals/java/util.clj
clojure
(ns uniformity.internals.java.util (:require [clojure.data.json :as json] [msgpack.core :as msg] [msgpack.clojure-extensions]) (:import [org.apache.commons.codec.binary Base64 Hex])) (defn base64-encode ^String [^bytes bytes] (Base64/encodeBase64String bytes)) (defn base64-encode-urlsa...
bf32218a13403f780606bf01c806f860772c6f29d24b9c7de1be67860503f74a
monadbobo/ocaml-core
extended_float_test.ml
open Core.Std open Core_extended.Std open OUnit let test = "extended_float" >::: [ "pretty" >:: (fun () -> List.iter ~f:(fun (f, s) -> string_of_float f @? (s = Float.pretty ~on_negative:`Print_dir f)) [ (0.004, "0"); (0.0049, "0"); (0.005, "0.01"); (0.009, "...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/extended/lib_test/extended_float_test.ml
ocaml
open Core.Std open Core_extended.Std open OUnit let test = "extended_float" >::: [ "pretty" >:: (fun () -> List.iter ~f:(fun (f, s) -> string_of_float f @? (s = Float.pretty ~on_negative:`Print_dir f)) [ (0.004, "0"); (0.0049, "0"); (0.005, "0.01"); (0.009, "...
535ce55cfe914a806faabdcce6d94800f583f86ec050e9f126092667bd698ff9
tokenmill/timewords
cleaner_test.clj
(ns timewords.cleaner-test (:require [clojure.test :refer :all] [timewords.fuzzy.en.utils :refer [clean]])) (deftest cleaner-test (testing "Dirty dates" (is (= "2015-02-02" (clean "2015-02-02"))) (is (= "2015-02-02, 12:13" (clean "2015-02-02, 12:13"))) (is (= "2015-02-02, 12:13" (clean ",20...
null
https://raw.githubusercontent.com/tokenmill/timewords/431ef3aa9eb899f2abd47cebc20a232f8c226b4a/test/timewords/cleaner_test.clj
clojure
(ns timewords.cleaner-test (:require [clojure.test :refer :all] [timewords.fuzzy.en.utils :refer [clean]])) (deftest cleaner-test (testing "Dirty dates" (is (= "2015-02-02" (clean "2015-02-02"))) (is (= "2015-02-02, 12:13" (clean "2015-02-02, 12:13"))) (is (= "2015-02-02, 12:13" (clean ",20...