_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
f5a12f350db12f301635a49e381ebd683b6a8a4e7344cb1088e12c226241f691
jepsen-io/jepsen
topology.clj
(ns jepsen.faunadb.topology "Working with FaunaDB topologies: the assignment of nodes to replicas, and log nodes." (:require [clojure.set :as set] [jepsen.util :refer [rand-nth-empty]])) (defn replica-name "Constructs a replica name for a given replica number." [n] (str "replica-" n)) (defn in...
null
https://raw.githubusercontent.com/jepsen-io/jepsen/a75d5a50dd5fa8d639a622c124bf61253460b754/faunadb/src/jepsen/faunadb/topology.clj
clojure
Working with replicas Log partitions each partition being a list of nodes." You can only remove nodes which aren't participating in the log without-log-part (->> topo :nodes (remove :log-part) (map :node) set) We need to make sure ...
(ns jepsen.faunadb.topology "Working with FaunaDB topologies: the assignment of nodes to replicas, and log nodes." (:require [clojure.set :as set] [jepsen.util :refer [rand-nth-empty]])) (defn replica-name "Constructs a replica name for a given replica number." [n] (str "replica-" n)) (defn in...
08849f009fb132965b2673907d654ec409145f4c168f569b27f842fd028ceea4
nshepperd/funn
Flat.hs
# LANGUAGE NoStarIsType # # LANGUAGE TypeFamilies , MultiParamTypeClasses , FlexibleContexts , FlexibleInstances # # LANGUAGE KindSignatures , DataKinds , TypeOperators # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE BangPatterns #-} # LANGUAGE ForeignFunctionInterface # module AI.Funn.Flat.Flat (fcDiff, preluDiff, rel...
null
https://raw.githubusercontent.com/nshepperd/funn/23138fc44cfda90afd49927c39b122ed78945293/AI/Funn/Flat/Flat.hs
haskell
# LANGUAGE BangPatterns # Diff -- Special --
# LANGUAGE NoStarIsType # # LANGUAGE TypeFamilies , MultiParamTypeClasses , FlexibleContexts , FlexibleInstances # # LANGUAGE KindSignatures , DataKinds , TypeOperators # # LANGUAGE ScopedTypeVariables # # LANGUAGE ForeignFunctionInterface # module AI.Funn.Flat.Flat (fcDiff, preluDiff, reluDiff, sigmoidDiff, ...
b45038ca32b79506b8eb5e25d9363fe72dcf897b6d53d1bdb673862d1268234a
gilith/hol-light
class.ml
(* ========================================================================= *) Extensional , classical reasoning with AC starts now ! (* *) , University of Cambridge Computer Laboratory (* ...
null
https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/class.ml
ocaml
========================================================================= ========================================================================= ---------------...
Extensional , classical reasoning with AC starts now ! , University of Cambridge Computer Laboratory ( c ) Copyright , University of Cambridge 1998 ( c ) Copyright , 1998 - 2007 needs "ind_defs.ml";; ...
418ba361816b1c88d873842e52b508b6a8f746382567fae539b9d1c379ff3465
c-cube/ocaml-containers
CCMonomorphic.mli
(* This file is free software, part of containers. See file "license" for more details. *) * { 1 Shadow unsafe functions and operators from } (** @since 2.0 *) val ( = ) : int -> int -> bool val ( <> ) : int -> int -> bool val ( < ) : int -> int -> bool val ( > ) : int -> int -> bool val ( <= ) : int -> int -> bool...
null
https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/src/monomorphic/CCMonomorphic.mli
ocaml
This file is free software, part of containers. See file "license" for more details. * @since 2.0
* { 1 Shadow unsafe functions and operators from } val ( = ) : int -> int -> bool val ( <> ) : int -> int -> bool val ( < ) : int -> int -> bool val ( > ) : int -> int -> bool val ( <= ) : int -> int -> bool val ( >= ) : int -> int -> bool val compare : int -> int -> int val min : int -> int -> int val max : int ->...
9dc5b3e6f9cc52a1f6a2d9f24069ad579304bfccad7f67033934749e616d0558
Drup/adtr
name.ml
include String let hash = Hashtbl.hash let pp = Fmt.string module Map = CCMap.Make(String) module Set = CCSet.Make(String)
null
https://raw.githubusercontent.com/Drup/adtr/a2d1cb8473522a52e475fd1261892cf363f215aa/src/name.ml
ocaml
include String let hash = Hashtbl.hash let pp = Fmt.string module Map = CCMap.Make(String) module Set = CCSet.Make(String)
a77be6136e2228c1ed186d4461be00c3d7e6ff7bb8e7b69fc3439622c5bc30c3
facebook/infer
alarm.mli
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/6c8bb21cd99ef2e729a5cbcd2bf263aa51777806/sledge/src/alarm.mli
ocaml
* [v kind location pp_action action pp_state state] is a [kind] alarm triggered at [location] by [action] (which can be printed by [pp_action]) on [state] (which can be printed by [pp_state]). * print an alarm for the user report * print an error for the debug trace
* 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 ...
885fc527042df0dcbb26b727da3776537283b7265f461bbd256d6430624b93bf
huangjs/cl
dasum.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ " " f2cl6.l ,...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/lapack/blas/dasum.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ " " f2cl6.l , v 1.48 2008/08/24 00:56:27 rt...
99acc1e51763ac0ea2386834916bd9b4ee5e80fa58927f053b06992224859d7d
Sophia-Gold/madhava
parser.clj
(ns madhava.parser (:require [madhava.ast :refer [ast example]] [clojure.core.async.impl.ioc-macros :refer [parse-to-state-machine]] [clojure.pprint :refer [pprint]])) (defmacro ssa [f] `(-> ~f ast second parse-to-state-machine second :blocks vals ...
null
https://raw.githubusercontent.com/Sophia-Gold/madhava/f780c8fe342c79877ccd03ceac525d12d85b10e7/src/madhava/parser.clj
clojure
(ns madhava.parser (:require [madhava.ast :refer [ast example]] [clojure.core.async.impl.ioc-macros :refer [parse-to-state-machine]] [clojure.pprint :refer [pprint]])) (defmacro ssa [f] `(-> ~f ast second parse-to-state-machine second :blocks vals ...
7ac404f99a5beb6b5513eaa9b298146d6756209a714e2a9e43683bc3110c4a43
discus-lang/ddc
SizeInference.hs
-- | Performing size inference on a program in Combinator Normal Form module DDC.Core.Flow.Transform.Rates.SizeInference ( Type(..), K(..), Env, Scope(..), Scheme(..) , generate , lookupV , iter , parents , trans ) where import DDC.Core.Flow.Transform.Rates.Combinators import DDC.Data.Pretty im...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core-flow/DDC/Core/Flow/Transform/Rates/SizeInference.hs
haskell
| Performing size inference on a program in Combinator Normal Form --------------------------------- = Size types, constraints and schemes | Given some variable type, append a number of primes onto it. | tau ::= | k | tau * tau | Find all variables in type | C ::= | true | v = tau | C /\ C | Big conjunction...
module DDC.Core.Flow.Transform.Rates.SizeInference ( Type(..), K(..), Env, Scope(..), Scheme(..) , generate , lookupV , iter , parents , trans ) where import DDC.Core.Flow.Transform.Rates.Combinators import DDC.Data.Pretty import Data.List import Data.Function (on) import Data.Maybe import qual...
1ef21d6c0e47c752e04b7372fd8191ed3526e2a9503b68a37e6bec72cf659598
mirage/spamtacus
extract.ml
Parser open Angstrom type t = Word of string | Num of string | Upper of string (* [lowercase s] maps uppercase in [s] to lowercase. *) let lowercase s = String.lowercase_ascii s [ s ] checks if a string is all uppercase characters let is_all_uppercase s = try String.iter (function 'A' .. 'Z' -> () | _ -> ...
null
https://raw.githubusercontent.com/mirage/spamtacus/1b84b87b5182a1edfb81ffaaa310e506d50c6765/bayesian_filter/extract.ml
ocaml
[lowercase s] maps uppercase in [s] to lowercase. [numeric] is defined are a string of digit or dot, comma, dollar, euro or percent char. Idea of improvement : add the possibility of choosing the way a string is parsed with a [angstrom.t] as input. [split string] splits [string] into [t] elements (word, nu...
Parser open Angstrom type t = Word of string | Num of string | Upper of string let lowercase s = String.lowercase_ascii s [ s ] checks if a string is all uppercase characters let is_all_uppercase s = try String.iter (function 'A' .. 'Z' -> () | _ -> raise Exit) s; true with Exit -> false let is_let...
668b853160bbf4bd8d622b5010e4c7d4dc46fcd36cfe30dfab71d147b1b24d94
zotonic/zotonic
action_wires_submit.erl
@author < > 2009 %% @doc Submits a form. Either a targeted form or form closest to an id or the trigger. Copyright 2009 %% 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 a...
null
https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_wires/src/actions/action_wires_submit.erl
erlang
@doc Submits a form. Either a targeted form or form closest to an id or the trigger. 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 KIN...
@author < > 2009 Copyright 2009 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(action_wires_submit). -include_lib("zotonic_core/include/zotonic.hrl"). -export([render_action/4]). render_action(Trigge...
7d0e3df6e91b6094b884c36c3a409e9d96c719df1feb0ae3a67d31e4136c9f9e
AdRoll/rebar3_hank
a_module.erl
-module(a_module).
null
https://raw.githubusercontent.com/AdRoll/rebar3_hank/9666a9ffd7a657a34c87a3da5e38a720ad41cdf1/test/files/test_app/test/a_folder/a_module.erl
erlang
-module(a_module).
0ef7417be9f3b9b5753ab8cca12dc12ff8a1f384336a2564363228f12e8dab6e
gregr/icfp2017-artifact-auas7pp
test-interp.scm
(load "test-check.scm") (load "mk.scm") eval - expo relies on the mutable variable as a helper function . (define eval-expo (lambda (exp env val) (conde ((fresh (rator rand x body env^ a) (== `(,rator ,rand) exp) (eval-expo rator env `(closure ,x ,body ,env^)) (eval-expo rand ...
null
https://raw.githubusercontent.com/gregr/icfp2017-artifact-auas7pp/98de885bd1cb9eef53c8ac3d85720b56122ca541/src/mk/test-interp.scm
scheme
MUTABLE!
(load "test-check.scm") (load "mk.scm") eval - expo relies on the mutable variable as a helper function . (define eval-expo (lambda (exp env val) (conde ((fresh (rator rand x body env^ a) (== `(,rator ,rand) exp) (eval-expo rator env `(closure ,x ,body ,env^)) (eval-expo rand ...
bef5686dc3305f45f7540ba4b38a24a63c4e35b55f62586ebe6feec3224cb723
processone/ejabberd
nodetree_tree.erl
%%%---------------------------------------------------------------------- %%% File : nodetree_tree.erl Author : %%% Purpose : Standard node tree plugin Created : 1 Dec 2007 by %%% %%% ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne %%% %%% This program is free software; you can redistribute ...
null
https://raw.githubusercontent.com/processone/ejabberd/c103182bc7e5b8a8ab123ce02d1959a54e939480/src/nodetree_tree.erl
erlang
---------------------------------------------------------------------- File : nodetree_tree.erl Purpose : Standard node tree plugin This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, b...
Author : Created : 1 Dec 2007 by ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License along wit...
f69ee451ad051f34f85fba97fc88eebef69bb889b24bcaffb075d92286cc9b72
rvirding/luerl
hello2.erl
%% File : hello2.erl %% File : luerl/examples/hello/hello2.erl Purpose : Demonstration of the Luerl interface . Author : Use : $ cd examples / hello & & erlc hello2.erl & & erl -pa .. / .. /ebin -s hello2 run -s init stop -noshell %% Or : $ make examples -module(hello2). -export([run/0]). ru...
null
https://raw.githubusercontent.com/rvirding/luerl/fc668ef337b04ca2aee83c648cf6853dab8babe6/examples/hello/hello2.erl
erlang
File : hello2.erl File : luerl/examples/hello/hello2.erl Or : $ make examples execute a string execute a string, get a result execute a file execute a file, get a result execute a standard function separately parse, then execute a file. The file defines a function no() separately parse, then execut...
Purpose : Demonstration of the Luerl interface . Author : Use : $ cd examples / hello & & erlc hello2.erl & & erl -pa .. / .. /ebin -s hello2 run -s init stop -noshell -module(hello2). -export([run/0]). run() -> io:format("-------------------------------------------~n"), io:format("This is an ...
b325c256eebc8a476db2c89fea9af9ca4d4ec82547a7442168c211d95951a33a
ngless-toolkit/ngless
Minimap2.hs
Copyright 2018 - 2019 NGLess Authors - License : MIT - License: MIT -} module StandardModules.Minimap2 ( loadModule ) where import qualified Data.Text as T import Data.Default import NGLess import Modules import NGLess.NGLEnvironment loadModule :: T.Text -> NGLessIO Module loadModule _ = do up...
null
https://raw.githubusercontent.com/ngless-toolkit/ngless/6522017c229fa3796d3abbee85547b76b6c4f41d/NGLess/StandardModules/Minimap2.hs
haskell
Copyright 2018 - 2019 NGLess Authors - License : MIT - License: MIT -} module StandardModules.Minimap2 ( loadModule ) where import qualified Data.Text as T import Data.Default import NGLess import Modules import NGLess.NGLEnvironment loadModule :: T.Text -> NGLessIO Module loadModule _ = do up...
c10070cf2c4acb1a09153b306ea327e46c7e0f43196c603b3dd21d3f0813da73
gator1/jepsen
checker.clj
(ns cassandra.checker (require [clojure.core.reducers :as r] [clojure.tools.logging :refer [debug info warn]] [jepsen.model :as model] [jepsen.checker.perf :as latency] [knossos.core :as knossos]) (:import jepsen.checker.Checker)) (defn complete-rewrite-fold-op "Tempor...
null
https://raw.githubusercontent.com/gator1/jepsen/1932cbd72cbc1f6c2a27abe0fe347ea989f0cfbb/cassandra/src/cassandra/checker.clj
clojure
An invocation; remember where it is Enforce the singlethreaded constraint. A completion; fill in the completed value. A failure; fill in either value. No change for info messages Remove worlds with equivalent states Wait, is this backwards? Should degenerate- world-key be the key in this map? New write Check p...
(ns cassandra.checker (require [clojure.core.reducers :as r] [clojure.tools.logging :refer [debug info warn]] [jepsen.model :as model] [jepsen.checker.perf :as latency] [knossos.core :as knossos]) (:import jepsen.checker.Checker)) (defn complete-rewrite-fold-op "Tempor...
3e385470f9e3757e525bcf1d84b726a37916ea11544dae29dadc5b2be71fed16
TrustInSoft/tis-kernel
dataflow2.mli
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/kernel_services/analysis/dataflow2.mli
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of Frama - C. Copyright ( C ) 2007 - 2015 ...
fd47eeedd56c9f19ebf5032ea96ae054d6a70d46c7939a60f02c383351ab8fcc
altsun/My-Lisps
(NB) [Rename_SelectedBlock] Doi ten Block Reference hang loat (khong dung cho Block thuoc tinh-Block dong).lsp
;; free lisp from cadviet.com this lisp was downloaded from -y%C3%AAu-c%E1%BA%A7u-lisp-%C4%91%E1%BB%95i-t%C3%AAn-blog-%C4%91%C6%B0%E1%BB%A3c-ch%E1%BB%8Dn/ ;| Change Anonymous Block to normal with new Name @ Ketxu 27 - 9 - 2011 |; (defun c:nb( / blkObj blkName blkNew_Name fn pt) (vl-load-com) (defun ST:SS->List-Vla (s...
null
https://raw.githubusercontent.com/altsun/My-Lisps/85476bb09b79ef5e966402cc5158978d1cebd7eb/Block/Rename/(NB)%20%5BRename_SelectedBlock%5D%20Doi%20ten%20Block%20Reference%20hang%20loat%20(khong%20dung%20cho%20Block%20thuoc%20tinh-Block%20dong).lsp
lisp
free lisp from cadviet.com | Change Anonymous Block to normal with new Name change the name
this lisp was downloaded from -y%C3%AAu-c%E1%BA%A7u-lisp-%C4%91%E1%BB%95i-t%C3%AAn-blog-%C4%91%C6%B0%E1%BB%A3c-ch%E1%BB%8Dn/ @ Ketxu 27 - 9 - 2011 (defun c:nb( / blkObj blkName blkNew_Name fn pt) (vl-load-com) (defun ST:SS->List-Vla (ss / n e l) (setq n (sslength ss)) (while (setq e (ssname ss (setq n (1- n)))) (se...
8cbfa969d56146b4bf6fa7dbc1d0618da69c652469a1f3e361cb5a46e2f54013
pfdietz/ansi-test
flet.lsp
;-*- Mode: Lisp -*- Author : Created : Tue Oct 8 22:55:02 2002 ;;;; Contains: Tests of FLET (deftest flet.1 (flet ((%f () 1)) (%f)) 1) (deftest flet.2 (flet ((%f (x) x)) (%f 2)) 2) (deftest flet.3 (flet ((%f (&rest args) args)) (%f 'a 'b 'c)) (a b c)) ;;; The optional argu...
null
https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/data-and-control-flow/flet.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of FLET The optional arguments are not in the block defined by the local function declaration Key arguments are not in the block defined by the local function declaration The aux parameters are not in the block defined by the local function declaration The function is not ...
Author : Created : Tue Oct 8 22:55:02 2002 (deftest flet.1 (flet ((%f () 1)) (%f)) 1) (deftest flet.2 (flet ((%f (x) x)) (%f 2)) 2) (deftest flet.3 (flet ((%f (&rest args) args)) (%f 'a 'b 'c)) (a b c)) (deftest flet.4 (block %f (flet ((%f (&optional (x (return-from %f :...
c770e413207b7aae2bd89e49b351a4ce6b8175750eca1381edb770a18c3df7f6
monadfix/ormolu-live
IfaceSyn.hs
( c ) The University of Glasgow 2006 ( c ) The GRASP / AQUA Project , Glasgow University , 1993 - 1998 (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 -} # LANGUAGE CPP # # LANGUAGE LambdaCase # module IfaceSyn ( module IfaceType, IfaceDecl(..), Ifac...
null
https://raw.githubusercontent.com/monadfix/ormolu-live/d8ae72ef168b98a8d179d642f70352c88b3ac226/ghc-lib-parser-8.10.1.20200412/compiler/iface/IfaceSyn.hs
haskell
* Binding names Misc Free Names Pretty printing ************************************************************************ * * Declarations * * ***************...
( c ) The University of Glasgow 2006 ( c ) The GRASP / AQUA Project , Glasgow University , 1993 - 1998 (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 -} # LANGUAGE CPP # # LANGUAGE LambdaCase # module IfaceSyn ( module IfaceType, IfaceDecl(..), Ifac...
5ebae738e3b1f8ef685bb92462ba7084a333c78c8491134337944d4255681316
mirage/ocaml-cstruct
cstruct.ml
* Copyright ( c ) 2012 Anil Madhavapeddy < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS...
null
https://raw.githubusercontent.com/mirage/ocaml-cstruct/2034628f31be85a4beb1782dc38a3cf78fbaeb1f/lib/cstruct.ml
ocaml
for thread safety. The following call is safe, since b is not visible elsewhere. Note that this is only safe as long as all [t]s are coherent. * [sum_lengths ~caller acc l] is [acc] plus the sum of the lengths of the elements of [l]. Raises [Invalid_argument caller] if arithmetic overflows. The followi...
* Copyright ( c ) 2012 Anil Madhavapeddy < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS...
f11d5612123334653884e89f37f980210a145a65091469ae06502df4785e6592
clojure/core.async
timers_test.clj
(ns clojure.core.async.timers-test (:require [clojure.test :refer :all] [clojure.core.async.impl.timers :refer :all] [clojure.core.async :as async])) (deftest timeout-interval-test (let [start-stamp (System/currentTimeMillis) test-timeout (timeout 500)] (is (<= (+ start-stamp 50...
null
https://raw.githubusercontent.com/clojure/core.async/5282c0f42cba832e262965164b154f5995954513/src/test/clojure/clojure/core/async/timers_test.clj
clojure
(ns clojure.core.async.timers-test (:require [clojure.test :refer :all] [clojure.core.async.impl.timers :refer :all] [clojure.core.async :as async])) (deftest timeout-interval-test (let [start-stamp (System/currentTimeMillis) test-timeout (timeout 500)] (is (<= (+ start-stamp 50...
f2785c3cb103fb8bd54364a1cb58f0a5953c81a330a37eefed5f7f6eba038d88
tnelson/Forge
time-client-with-threads.rkt
#lang racket/base ;; Client for time-server.rkt. ;; Public Domain. (module+ main (require "../../rfc6455.rkt") (require net/url) (void (thread (lambda () (printf "Connecting...\n") (define c (ws-connect (string->url "ws:8081/"))) (printf "Connected.\n") (ws-send! c "Hello from tim...
null
https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/racket-rfc6455/net/rfc6455/examples/time-client-with-threads.rkt
racket
Client for time-server.rkt. Public Domain.
#lang racket/base (module+ main (require "../../rfc6455.rkt") (require net/url) (void (thread (lambda () (printf "Connecting...\n") (define c (ws-connect (string->url "ws:8081/"))) (printf "Connected.\n") (ws-send! c "Hello from time-client-with-threads.rkt") (let loop () ...
49a25a947130dda15b2947a6fd437f98c1f3a031cd991d5dff1c243f1f170f42
nick8325/quickspec
Regex.hs
-- Regular expressions. # LANGUAGE GeneralizedNewtypeDeriving , DeriveDataTypeable , FlexibleInstances # import qualified Control.Monad.State as S import Control.Monad.State hiding (State, state) import qualified Data.Map as M import Data.List import Data.Map(Map) import Data.Typeable import QuickSpec import Test.Quick...
null
https://raw.githubusercontent.com/nick8325/quickspec/cb61f719d3d667674431867037ff44dec22ca4f9/examples/Regex.hs
haskell
Regular expressions. This should really use observational equality instead.
# LANGUAGE GeneralizedNewtypeDeriving , DeriveDataTypeable , FlexibleInstances # import qualified Control.Monad.State as S import Control.Monad.State hiding (State, state) import qualified Data.Map as M import Data.List import Data.Map(Map) import Data.Typeable import QuickSpec import Test.QuickCheck import Test.QuickC...
c6912eb9fa25064d8735b876e135a98686797374c4b9c3c54138aee5bf586707
kowainik/life-sync
Init.hs
# LANGUAGE TemplateHaskell # | Copyright : ( c ) 2017 - 2020 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > Contains a function to create the main repository — @dotfiles@. Copyright: (c) 2017-2020 Kowainik SPDX-License-Identifier: MPL-2.0 Maintainer: Kowainik <> Contains a function ...
null
https://raw.githubusercontent.com/kowainik/life-sync/ea80581a6735d2f3e2df0fda1d1bc0b0b41ad6d0/src/Life/Main/Init.hs
haskell
TODO: initialize .life from repo? :thinking_suicide: to ask one if it needed to be initialised. ^ Command name ^ Process to do
# LANGUAGE TemplateHaskell # | Copyright : ( c ) 2017 - 2020 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > Contains a function to create the main repository — @dotfiles@. Copyright: (c) 2017-2020 Kowainik SPDX-License-Identifier: MPL-2.0 Maintainer: Kowainik <> Contains a function ...
4f46fd5b35de3c8cb039f5ead716d9712ac84105dcbeccdd3592f0f55b379759
slegrand45/examples_ocsigen
textEncoder.ml
open Js_of_ocaml class type t = object method encode_uint8 : Js.js_string Js.t -> Typed_array.uint8Array Js.t Js.meth end let textEncoder = Js.Unsafe.global##._TextEncoder
null
https://raw.githubusercontent.com/slegrand45/examples_ocsigen/e2f5efe57caf7a644795ac6b14f6d6e04168e4be/jsoo/build-local-csv-file/textEncoder.ml
ocaml
open Js_of_ocaml class type t = object method encode_uint8 : Js.js_string Js.t -> Typed_array.uint8Array Js.t Js.meth end let textEncoder = Js.Unsafe.global##._TextEncoder
a717739a4c5c7b23aa93081b27e4dc675e68c10a741718cdaed05fe26a3a0016
haskell/cabal
Q.hs
module Q where import P q = p ++ " world"
null
https://raw.githubusercontent.com/haskell/cabal/c46eb51def10a0f16d82a29082738f3ac820b483/cabal-install/tests/IntegrationTests2/regression/program-options/q/Q.hs
haskell
module Q where import P q = p ++ " world"
5316918563c59cb75c118a2a1a087091ee442386acedc700d4a3968c147e76f3
simnalamburt/snucse.pl
ex5.ml
type nat = ZERO | SUCC of nat let rec natadd ((left, right): nat * nat): nat = match right with | ZERO -> left | SUCC r1 -> natadd ((SUCC(left)), r1) let rec natmul ((left, right): nat * nat): nat = match right with | ZERO -> ZERO | SUCC r1 -> natadd ((natmul (left, r1)), left)
null
https://raw.githubusercontent.com/simnalamburt/snucse.pl/a130f826c6f27224c88b0dd2e1588f35bccc9ebb/hw1/ex5.ml
ocaml
type nat = ZERO | SUCC of nat let rec natadd ((left, right): nat * nat): nat = match right with | ZERO -> left | SUCC r1 -> natadd ((SUCC(left)), r1) let rec natmul ((left, right): nat * nat): nat = match right with | ZERO -> ZERO | SUCC r1 -> natadd ((natmul (left, r1)), left)
4063fdc780488eef264a8c14e87d84af74dffa2766456106b9a9aefb1cb11be3
strojure/zizzmap
impl_test.cljs
(ns strojure.zizzmap.impl-test (:require [clojure.test :as test :refer [deftest testing]] [strojure.zizzmap.impl :as impl :include-macros true])) (declare thrown?) #_(test/run-tests) ;;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, (def ^:private -e ...
null
https://raw.githubusercontent.com/strojure/zizzmap/27940fd8dc80b2758bab6dc6eae18a84893fd26d/test/strojure/zizzmap/impl_test.cljs
clojure
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
(ns strojure.zizzmap.impl-test (:require [clojure.test :as test :refer [deftest testing]] [strojure.zizzmap.impl :as impl :include-macros true])) (declare thrown?) #_(test/run-tests) (def ^:private -e (impl/boxed-map-entry :k (impl/boxed-delay :x))) (deftest boxed-map-entry-t (test/are [expr result...
53839799cdd019c9dda7e6c54f82b6f5cd3aebe905b0b068c43fbae2ec26eb7f
mirage/conan
process.ml
let invalid_arg fmt = Format.kasprintf invalid_arg fmt let reword_error f = function Ok _ as v -> v | Error err -> Error (f err) open Sigs let process_fmt : type test v. Metadata.t -> (test, v) Ty.t -> v Tree.fmt -> v -> Metadata.t = fun m t tree_fmt v -> match t with | Ty.Clear -> Metadata.clear m | _ -> ...
null
https://raw.githubusercontent.com/mirage/conan/fb144c7785ff0aa4ec6d8c87e58ca2a0c2d328db/src/process.ml
ocaml
ugly, as f*ck!
let invalid_arg fmt = Format.kasprintf invalid_arg fmt let reword_error f = function Ok _ as v -> v | Error err -> Error (f err) open Sigs let process_fmt : type test v. Metadata.t -> (test, v) Ty.t -> v Tree.fmt -> v -> Metadata.t = fun m t tree_fmt v -> match t with | Ty.Clear -> Metadata.clear m | _ -> ...
9ff2a24f4d3647c5327a7e8486b0e80575a66b27980720f391dd5f7c864f9232
well-typed/optics
Core.hs
# LANGUAGE DataKinds # -- | -- Module: Optics.Indexed.Core -- Description: Core definitions for indexed optics. -- -- This module defines basic functionality for indexed optics. See the "Indexed optics " section of the overview documentation in the @Optics@ module of the main @optics@ package for more details . --...
null
https://raw.githubusercontent.com/well-typed/optics/7cc3f9c334cdf69feaf10f58b11d3dbe2f98812c/optics-core/src/Optics/Indexed/Core.hs
haskell
| Module: Optics.Indexed.Core Description: Core definitions for indexed optics. This module defines basic functionality for indexed optics. See the "Indexed * Class for optic kinds that can be indexed * Composition of indexed optics * Indexed optic flavours * Functors with index ** Foldable with index >>>...
# LANGUAGE DataKinds # optics " section of the overview documentation in the @Optics@ module of the main @optics@ package for more details . module Optics.Indexed.Core ( IxOptic(..) , conjoined , (%) , (<%>) , (%>) , (<%) , reindexed , icompose , icompose3 , icompose4 , icompose5 , ico...
40710b93025ad52ddd4291d356826368d81df4f9f9c11ab9fa3d3b9cf53bd9d0
mejgun/haskell-tdlib
TestCallVectorStringObject.hs
{-# LANGUAGE OverloadedStrings #-} -- | module TD.Query.TestCallVectorStringObject where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified TD.Data.TestString as TestString import qualified Utils as U -- | -- Returns the received vector of objects containing a string; for testin...
null
https://raw.githubusercontent.com/mejgun/haskell-tdlib/81516bd04c25c7371d4a9a5c972499791111c407/src/TD/Query/TestCallVectorStringObject.hs
haskell
# LANGUAGE OverloadedStrings # | | Returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization @x Vector of objects to return |
module TD.Query.TestCallVectorStringObject where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified TD.Data.TestString as TestString import qualified Utils as U data TestCallVectorStringObject = TestCallVectorStringObject x :: Maybe [TestString.TestString] } deriving (Eq...
191454e11b4822f6f123e7228ae7d54d9ea2344586d2757c879199c64baadc8d
Clojure2D/clojure2d-examples
bvh.clj
(ns rt4.the-next-week.ch05a.bvh (:require [rt4.the-next-week.ch05a.hittable :as hittable] [rt4.the-next-week.ch05a.aabb :as aabb] [rt4.the-next-week.ch05a.interval :as interval] [fastmath.core :as m])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch05a/bvh.clj
clojure
(ns rt4.the-next-week.ch05a.bvh (:require [rt4.the-next-week.ch05a.hittable :as hittable] [rt4.the-next-week.ch05a.aabb :as aabb] [rt4.the-next-week.ch05a.interval :as interval] [fastmath.core :as m])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-...
0bdf4dc4238e0ec0bec04a1730bed0c5f4f874165fe52fe9bbf20f0af8667961
hstreamdb/hstream
LogAttributes.hs
# OPTIONS_GHC -pgmPcpphs -optP -- cpp # # LANGUAGE BangPatterns # {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE MultiWayIf #-} Note that we need this UnboxedTuples to force ghci use -fobject - code for all related modules . Or ghci will complain ...
null
https://raw.githubusercontent.com/hstreamdb/hstream/b8779986ab3371e331ead8cc08bc51fcc5c80ec9/hstream-store/HStream/Store/Internal/LogDevice/LogAttributes.hs
haskell
cpp # # LANGUAGE CPP # # LANGUAGE DeriveAnyClass # # LANGUAGE MagicHash # # LANGUAGE MultiWayIf # # OPTIONS_GHC -fobject - code # Note that we need this UnboxedTuples to force ghci use -fobject-code for all related modules. Or ghci will complain "panic". Also, manual add @{-# OPTIONS_GHC -fobject...
# LANGUAGE BangPatterns # Note that we need this UnboxedTuples to force ghci use -fobject - code for all related modules . Or ghci will complain " panic " . to add all imported local modules. :( Relatead ghc issues: * /-/issues/19733 * /-/issues/15454 -} # LANGUAGE UnboxedTuples # module HStream.Store.Inte...
9b98797d1cabcbcf54d7bfacbbbed7862b8d7885c6379fd486a9b40acd9525d4
janegca/htdp2e
Exercise-407-gcd-generative.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-407-gcd-generative) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t ...
null
https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/05-GenerativeRecursion/Exercise-407-gcd-generative.rkt
racket
about the language level of this file in a form that our tools can easily process. in the interactions area. generative recursion (gcd larger smaller) = (gcd larger (remainder larger smaller)) Result: cpu time: 0 real time: 0 gc time: 0
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-407-gcd-generative) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) Exercise 407 . Copy gcd - genera...
465b3b3b94131372f42b6e676628f0f79f73e00d633b3893892f88b39629ab09
LexiFi/dead_code_analyzer
matchopt.mli
./examples/dir/matchopt.ml:5: w
null
https://raw.githubusercontent.com/LexiFi/dead_code_analyzer/c44dc2ea5ccb13df2145e9316e21c39f09dad506/check/classic/examples/dir/matchopt.mli
ocaml
./examples/dir/matchopt.ml:5: w
bb11d384b8c44e56b2d155e6fb908618a7aa90ac4d7bc1c1765f9d3c11cd49bd
mentat-collective/emmy
interpolate_test.cljc
#_"SPDX-License-Identifier: GPL-3.0" (ns emmy.rational-function.interpolate-test (:require [clojure.test :refer [is deftest testing]] [emmy.rational-function.interpolate :as ri] [same :refer [ish?]])) (deftest rational-interpolation-tests (let [points [[0 1] [2 1.4] [5 2] [8 10]] e...
null
https://raw.githubusercontent.com/mentat-collective/emmy/90a1de10e78187c70d546c3cfd63c8d32b783bed/test/emmy/rational_function/interpolate_test.cljc
clojure
the diagonal
#_"SPDX-License-Identifier: GPL-3.0" (ns emmy.rational-function.interpolate-test (:require [clojure.test :refer [is deftest testing]] [emmy.rational-function.interpolate :as ri] [same :refer [ish?]])) (deftest rational-interpolation-tests (let [points [[0 1] [2 1.4] [5 2] [8 10]] e...
35030d4c430c7b30e16e8544d4fcaba5975260cbd2accbb9998789f3666a823a
jekor/vocabulink
CGI.hs
-- Our program is by nature a CGI application. This is handy and troublesome at the same time . For one , we have to deal with producing some reasonable -- output for the client of our program, even when given incomplete or -- incorrect inputs. But, since we're dealing with each of many requests in -- their own threa...
null
https://raw.githubusercontent.com/jekor/vocabulink/7f938cd11ac81504b42a414998d48cf3b34a8a87/hs/Vocabulink/CGI.hs
haskell
Our program is by nature a CGI application. This is handy and troublesome at output for the client of our program, even when given incomplete or incorrect inputs. But, since we're dealing with each of many requests in their own threads, it's not the end of the world if we generate an error or don't catch an except...
the same time . For one , we have to deal with producing some reasonable module Vocabulink.CGI ( notFound, notAuthorized, maybeNotFound , bodyVars, bodyVar, bodyVarDefault, bodyVarRequired , redirect, permRedirect, referrerOrVocabulink , setCookie ...
dca7e621467cd623596d9ad5bb6cfe257da19a08d0945143c332acbcee2ce7e2
jkk/formative
core_test.cljc
(ns formative.core-test #?(:cljs (:require-macros [cemerick.cljs.test :refer [is are deftest run-tests]])) (:require [formative.core :as f] #?(:cljs [cemerick.cljs.test :as t] :clj [clojure.test :refer [is are deftest run-tests]]))) (def form1 {:method :post :action "/example/path" ...
null
https://raw.githubusercontent.com/jkk/formative/e1b69161c05438a48d3186bd2eb5126377ffe2e3/test/formative/core_test.cljc
clojure
(run-tests)
(ns formative.core-test #?(:cljs (:require-macros [cemerick.cljs.test :refer [is are deftest run-tests]])) (:require [formative.core :as f] #?(:cljs [cemerick.cljs.test :as t] :clj [clojure.test :refer [is are deftest run-tests]]))) (def form1 {:method :post :action "/example/path" ...
4c129d753bf7adc97eafc3fb22083e989fb54dbec176d58a3f37e6b257b0c201
dmjio/miso
Subscription.hs
----------------------------------------------------------------------------- -- | Module : Miso . Subscription Copyright : ( C ) 2016 - 2018 -- License : BSD3-style (see the file LICENSE) Maintainer : < > -- Stability : experimental -- Portability : non-portable -----------------...
null
https://raw.githubusercontent.com/dmjio/miso/f38f28d86780b3f2137f16419ff9ec3e39e890af/src/Miso/Subscription.hs
haskell
--------------------------------------------------------------------------- | License : BSD3-style (see the file LICENSE) Stability : experimental Portability : non-portable --------------------------------------------------------------------------
Module : Miso . Subscription Copyright : ( C ) 2016 - 2018 Maintainer : < > module Miso.Subscription ( module Miso.Subscription.Mouse , module Miso.Subscription.Keyboard , module Miso.Subscription.History , module Miso.Subscription.Window , module Miso.Subscription.WebSocket , ...
4fe8a95b63c2861de125ae91115f426ad625bbe057d7a8ee6051e5bb93437651
TyGuS/hoogle_plus
Common.hs
module Types.Common where {- This is a place for any top-level types that will be used by many modules. This should have no dependencies on any other files in this project. This should be the Top Level module. -} type Id = String type GroupId = String varName = "_v"
null
https://raw.githubusercontent.com/TyGuS/hoogle_plus/d02a1466d98f872e78ddb2fb612cb67d4bd0ca18/src/Types/Common.hs
haskell
This is a place for any top-level types that will be used by many modules. This should have no dependencies on any other files in this project. This should be the Top Level module.
module Types.Common where type Id = String type GroupId = String varName = "_v"
89888865b0644c5aa619ccc08d8cfc2a7d41d20cd951e5835817e443e1565286
appleshan/cl-http
sax-basics.lisp
(in-package :xml-sax) ;;; ---------------------------------------------------------------------------- ;;; Much of the contents of this file are subject to the NOKOS License Version 1.0a ;;; (the "License"); you may not use this file except in compliance with ;;; the License. ;;; Software distributed unde...
null
https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/contrib/janderson/xml-2001-10-03/demos/saxandsoap/sax-basics.lisp
lisp
---------------------------------------------------------------------------- (the "License"); you may not use this file except in compliance with the License. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under ...
(in-package :xml-sax) Much of the contents of this file are subject to the NOKOS License Version 1.0a Software distributed under the License is distributed on an " AS IS " The Original Software is WILBUR : Nokia RDF / XML Processor for CLOS Copyright ( c ) 2001 Nokia and others . All Rights Reser...
27c4acd9b8b695b50d8ff0bcd4b7402eeabbb25700f7d291127f1a6e7b0e6af8
cpeikert/Lol
Diagnostic.hs
| Module : Crypto . Lol . Utils . PrettyPrint . Diagnostic Description : Pretty - printing for benchmark results across levels of the Lol stack . Copyright : ( c ) , 2011 - 2017 , 2011 - 2017 License : GPL-3 Maintainer : Stability : experimental Portability : PO...
null
https://raw.githubusercontent.com/cpeikert/Lol/4416ac4f03b0bff08cb1115c72a45eed1fa48ec3/lol/Crypto/Lol/Utils/PrettyPrint/Diagnostic.hs
haskell
| Options for the diagnostic benchmark printout. ^ Verbosity ^ Which levels of Lol to benchmark. The empty list means run all levels. ^ Which operations to benchmark. The empty list means run all benchmarks. ^ How many times larger a benchmark must be (compared to the minimum benchmark for that parameter, ...
| Module : Crypto . Lol . Utils . PrettyPrint . Diagnostic Description : Pretty - printing for benchmark results across levels of the Lol stack . Copyright : ( c ) , 2011 - 2017 , 2011 - 2017 License : GPL-3 Maintainer : Stability : experimental Portability : PO...
2ee95db0ba02e4ae9cd88ae0fe7959a308d95a675d57d81037bb79ab27874a24
NorfairKing/bevel
Select.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # module Bevel.CLI.Select ( SelectAppSettings (..), LoadSource, selectApp, loadChoices, ) where import Bevel.CLI.Choices import Bevel.CLI.Env impor...
null
https://raw.githubusercontent.com/NorfairKing/bevel/0a02fe1a8a31dcd9d9f12ef4680cc7165c010dc7/bevel-cli/src/Bevel/CLI/Select.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # Left always works because the worker runs forever Empty query Update the search bar Reset the choices Update the state Ignore any loading for queries that aren't relevant anymore. | Request a reload with the current query | A bunch of choices that were lo...
# LANGUAGE FlexibleContexts # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # module Bevel.CLI.Select ( SelectAppSettings (..), LoadSource, selectApp, loadChoices, ) where import Bevel.CLI.Choices import Bevel.CLI.Env import Bevel.CLI.Score import Bevel.CLI.Search import Brick.AttrMap im...
eca0ff2f448c5cf295772232ffe2ccd45cdea52a6de50cc255352ef2d324079b
clojure/test.generative
array_test.clj
Copyright ( c ) , , and contributors . ; 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 epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are a...
null
https://raw.githubusercontent.com/clojure/test.generative/b8eb1c34a4c8da1086d71f0cb276ee1c9d6a4640/src/examples/clojure/clojure/test/array_test.clj
clojure
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 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....
Copyright ( c ) , , and contributors . (ns clojure.test.array-test (:use clojure.test.generative) (:require [clojure.data.generators :as gen])) (defn nan-or-= [a b] (or (= a b) (and (Double/isNaN a) (Double/isNaN b)))) (defmacro array-access-specs [pdescs] `(do ~@(map ...
73caf08a8016da7d254459b9dbd83f61aed13d62ee001f1975533d67c1ffeb8a
yrashk/erlang
erl_scan.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2009 . 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 Pub...
null
https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/stdlib/src/erl_scan.erl
erlang
%CopyrightBegin% 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 online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 1996 - 2009 . 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 " Erlang token scanning functions of io li...
0fda27c40b5cd0c16701b117df001cb1fd89c57b59b1f6f309cf5071d73cb49d
inlinestyle/lein-aggravate
project.clj
(defproject lein-aggravate "0.1.2-SNAPSHOT" :description "Concatenate your files! Compress css files with YuiCompressor!" :url "-aggravate" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.4.0"] [com.yahoo.platform.yui/yuicompressor "...
null
https://raw.githubusercontent.com/inlinestyle/lein-aggravate/b331246488612429d0997e8da9ad694e3d73d71f/project.clj
clojure
(defproject lein-aggravate "0.1.2-SNAPSHOT" :description "Concatenate your files! Compress css files with YuiCompressor!" :url "-aggravate" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.4.0"] [com.yahoo.platform.yui/yuicompressor "...
7a0efec84657c711d355af631f0f722db33ee517b9e93887d0ca7055af5c9345
kompendium-ano/factom-haskell-client
EntryCreditRate.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # {-# LANGUAGE TypeOperators #-} module Factom.RPC.Types.EntryCreditRate where import Control.Applicative import Contro...
null
https://raw.githubusercontent.com/kompendium-ano/factom-haskell-client/87a73bb9079859f6223f8259da0dc9da568d1233/src/Factom/RPC/Types/EntryCreditRate.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards # # LANGUAGE TypeOperators # ------------------------------------------------------------------------------
# LANGUAGE DeriveGeneric # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # module Factom.RPC.Types.EntryCreditRate where import Control.Applicative import Control.Monad (forM_, join, mzero) import Data.Aeson (FromJSON (..),...
d6e60b87ff9c448eded3be7c691d004867d75ded9133005a9f94fba9fc1170ae
kevinlynx/icerl
msg.erl
%% %% msg.erl %% 04.20.2013 %% -module(msg). -include("msg.hrl"). -export([encode_request/1, encode_validate_conn_msg/0, encode_close_msg/0, encode_request_msg/1, encode_reply_msg/1]). -import(stream, [bjoin/1]). -compile(export_all). decode_identify(B) -> {Name, B1} = stream:read(string, B), {Cate...
null
https://raw.githubusercontent.com/kevinlynx/icerl/d10602b5cc18e40f7394d22b440c371d8c66571b/src/msg.erl
erlang
msg.erl 04.20.2013 encode a `request' to binary encode a `header` to binary decode a reply record.
-module(msg). -include("msg.hrl"). -export([encode_request/1, encode_validate_conn_msg/0, encode_close_msg/0, encode_request_msg/1, encode_reply_msg/1]). -import(stream, [bjoin/1]). -compile(export_all). decode_identify(B) -> {Name, B1} = stream:read(string, B), {Cate, B2} = stream:read(string, B1)...
74e386c078f27a1ef228ca462934bc81879f3de5cf959cad0f71d89a1cf74c4c
alanz/ghc-exactprint
T9600.hs
import Control.Applicative newtype Foo a = Foo (a -> a) deriving Applicative
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/T9600.hs
haskell
import Control.Applicative newtype Foo a = Foo (a -> a) deriving Applicative
a39f3b72d799fb0ba6dd4e6da13ab9c1d5ee970ad86671e1628b95aaa34b2ae9
buntine/Simply-Scheme-Exercises
10-3.scm
; A real human playing tic-tac-toe would look at a board like this: ; ; o x o ; o x x ; x o ; and notice that it ’s a tie , rather than moving in square 9 . Modify tie - game ? from Exercise 10.2 to notice this situation and return # t. ; ; (Can you improve the program’s ability to recognize ties even further? What...
null
https://raw.githubusercontent.com/buntine/Simply-Scheme-Exercises/c6cbf0bd60d6385b506b8df94c348ac5edc7f646/10-example_tic-tac-toe/10-3.scm
scheme
A real human playing tic-tac-toe would look at a board like this: o x o o x x x o (Can you improve the program’s ability to recognize ties even further? What about Note to self: Fix this one..
and notice that it ’s a tie , rather than moving in square 9 . Modify tie - game ? from Exercise 10.2 to notice this situation and return # t. boards with two free squares ? ) (define (tie-game? position) (let ((underscores (appearances '_ position))) (cond ((= underscores 1) (tie-game-helper ...
0342ab9ac51a2c8770e6ddd4cc2689983a406ad32ed5db496eccd5cea843669d
zellige/zellige
Clip.hs
# LANGUAGE FlexibleContexts # TODO Work out how to create instance of Unboxed Vector -- TODO Change to linear ring for polygons. -- TODO Change to valid segment (non empty vector?) for lines. module Data.Geometry.Clip ( createBoundingBox , clipPoint , clipPoints , clipLineLb , clipLinesLb , clipLineCs , clipLines...
null
https://raw.githubusercontent.com/zellige/zellige/87e6dab11ac4c1843009043580f14422a1d83ebf/src/Data/Geometry/Clip.hs
haskell
TODO Change to linear ring for polygons. TODO Change to valid segment (non empty vector?) for lines.
# LANGUAGE FlexibleContexts # TODO Work out how to create instance of Unboxed Vector module Data.Geometry.Clip ( createBoundingBox , clipPoint , clipPoints , clipLineLb , clipLinesLb , clipLineCs , clipLinesCs , clipLineQc , clipLinesQc , clipLineNLN , clipLinesNLN , clipPolygonSh , clipPolygonsSh , clipPolygonQc...
2459f84a1885cf14bc8c925dd746d32c3d3c4d686699ab08fd4c47beb5ab08a4
reborg/clojure-essential-reference
13.clj
(import '[java.time Duration Instant] '[java.time.format DateTimeFormatter] '[java.time.temporal TemporalAccessor]) < 1 > {:t "2017-05-04T13:09:52Z" :msg "msg2"} {:t "2017-05-04T13:11:03Z" :msg "msg3"} {:t "2017-05-04T23:13:10Z" :msg "msg4"} {:t "20...
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/SequentialProcessing/partition%2Cpartition-allandpartition-by/13.clj
clojure
<3>
(import '[java.time Duration Instant] '[java.time.format DateTimeFormatter] '[java.time.temporal TemporalAccessor]) < 1 > {:t "2017-05-04T13:09:52Z" :msg "msg2"} {:t "2017-05-04T13:11:03Z" :msg "msg3"} {:t "2017-05-04T23:13:10Z" :msg "msg4"} {:t "20...
18c674a48720bb61bbb095c68ba756be9293710af4fa645b6090be2a031f1bb3
fmi-lab/fp-elective-2017
fact-iter.scm
(require rackunit rackunit/text-ui) (define (fact-iter n) (define (helper counter result) (if (= 1 counter) result (helper (- counter 1) (* result counter)))) (if (<= n 1) 1 (helper n 1))) (define fact-iter-tests (test-suite "Tests for fact-iter" (check = (fact-iter 0) 1)...
null
https://raw.githubusercontent.com/fmi-lab/fp-elective-2017/e88d5c0319b6d03c0ecd8a12a2856fb1bf5dcbf3/exercises/02/fact-iter.scm
scheme
(require rackunit rackunit/text-ui) (define (fact-iter n) (define (helper counter result) (if (= 1 counter) result (helper (- counter 1) (* result counter)))) (if (<= n 1) 1 (helper n 1))) (define fact-iter-tests (test-suite "Tests for fact-iter" (check = (fact-iter 0) 1)...
9e70b3af9fd8f23410f8e5de038d6463fe3d1f6cbde1b63c451da122ccfabe01
Ptival/recursion-schemes-examples
Natural.hs
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # -- | module Histomorphisms.Natural ( change , changeAlgebraHelper ) where import Control.Comonad.Cofree import Data.Functor.Foldable import Data.List hiding (lookup) import Numeric.Natural import Prelude hiding (lookup) im...
null
https://raw.githubusercontent.com/Ptival/recursion-schemes-examples/bd2a506d38887e9b5d4f2afc435fc7bddf12a92e/lib/Histomorphisms/Natural.hs
haskell
| | Computing all the ways to make change given some denominations `deepseq` result
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # module Histomorphisms.Natural ( change , changeAlgebraHelper ) where import Control.Comonad.Cofree import Data.Functor.Foldable import Data.List hiding (lookup) import Numeric.Natural import Prelude hiding (lookup) import ...
76d1133f24e3a7ff22a722887a7a40505d953b5205a8b0dfccd31498f8c228ef
brianium/indexed.db
database.cljs
(ns ^:no-doc indexed.db.impl.database (:require [indexed.db.impl.protocols :as impl] [indexed.db.impl.store :as store] [indexed.db.impl.transaction :as transaction]) (:refer-clojure :exclude [name])) (defn clj->create-store-options [{:keys [key-path auto-increment]}] (let [options #js {...
null
https://raw.githubusercontent.com/brianium/indexed.db/251bb9b461bd0fc9f5543656d73a4774de28d2bc/src/indexed/db/impl/database.cljs
clojure
(ns ^:no-doc indexed.db.impl.database (:require [indexed.db.impl.protocols :as impl] [indexed.db.impl.store :as store] [indexed.db.impl.transaction :as transaction]) (:refer-clojure :exclude [name])) (defn clj->create-store-options [{:keys [key-path auto-increment]}] (let [options #js {...
03b315b546e640d11ea9373bba62c6e5285a39666776fc240d34fd8d7324c158
CatalaLang/catala
optimizations.mli
This file is part of the Catala compiler , a specification language for tax and social benefits computation rules . Copyright ( C ) 2022 , contributors : < > , < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with...
null
https://raw.githubusercontent.com/CatalaLang/catala/6ecca5c66450c26a528304d0ecff4bf2bd9bb127/compiler/dcalc/optimizations.mli
ocaml
* Optimization passes for default calculus programs and expressions
This file is part of the Catala compiler , a specification language for tax and social benefits computation rules . Copyright ( C ) 2022 , contributors : < > , < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with...
5d435f6d58596a1571b6b5b9762e1121c7b82c02aa3a10075af087734061c42a
dchelimsky/sicp-exercises
ex-1.4.scm
#lang scheme (define (a-plus-abs-b a b) ((if (> b 0) + -) a b)) ; a-plus-abs-b checks to see if b is positive or negative. ; if positive, the inner function returns the + operator. ; if negative, the inner function returns the - operator, which has the same effect as taking the absolute value of the 2nd argument ...
null
https://raw.githubusercontent.com/dchelimsky/sicp-exercises/55c804e3775b87a490e05f8337fc59bc7ce07f28/chapter-1/ex-1.4.scm
scheme
a-plus-abs-b checks to see if b is positive or negative. if positive, the inner function returns the + operator. if negative, the inner function returns the - operator, which has the same effect
#lang scheme (define (a-plus-abs-b a b) ((if (> b 0) + -) a b)) as taking the absolute value of the 2nd argument .
0b9f880c2ea684c0085c7159286a5bfadaf490e170dc6e0d693ce3aca99c51e5
facundominguez/stitch-lh
Pretty.hs
# LANGUAGE ViewPatterns # # OPTIONS_GHC -fplugin = LiquidHaskell # ----------------------------------------------------------------------------- -- | -- Module : Language.Stitch.LH.Pretty Copyright : ( C ) 2015 -- License : BSD-style (see LICENSE) Maintainer : ( ) -- Stability : experim...
null
https://raw.githubusercontent.com/facundominguez/stitch-lh/506f1f3c9061e43b57d5f6bb1f616db0dd98e2c1/src/Language/Stitch/LH/Pretty.hs
haskell
--------------------------------------------------------------------------- | Module : Language.Stitch.LH.Pretty License : BSD-style (see LICENSE) Stability : experimental Helpers for prettyprinting expressions. -------------------------------------------------------------------------- | Returns (...
# LANGUAGE ViewPatterns # # OPTIONS_GHC -fplugin = LiquidHaskell # Copyright : ( C ) 2015 Maintainer : ( ) module Language.Stitch.LH.Pretty where import Language.Stitch.LH.Op import Language.Stitch.LH.Util import Language.Stitch.LH.Data.Nat import Text.PrettyPrint.ANSI.Leijen lamPrec, appPrec, ap...
523d79e590a994ba0d677e72a133c0a459c63d40189488840effbfb25de8e87a
uw-unsat/leanette-popl22-artifact
patch.rkt
#lang racket (provide BUG PATCH PATCH-TEST with-jit-bug) (define jit-bug (make-parameter #f)) (define-syntax-rule (BUG body ...) (when (jit-bug) body ...)) (define-syntax-rule (PATCH body ...) (unless (jit-bug) body ...)) (define-syntax-rule (PATCH-TEST expr) (and (not (jit-bug)) expr)) (define-synt...
null
https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-3/jitterbug/jitterbug/racket/lib/patch.rkt
racket
#lang racket (provide BUG PATCH PATCH-TEST with-jit-bug) (define jit-bug (make-parameter #f)) (define-syntax-rule (BUG body ...) (when (jit-bug) body ...)) (define-syntax-rule (PATCH body ...) (unless (jit-bug) body ...)) (define-syntax-rule (PATCH-TEST expr) (and (not (jit-bug)) expr)) (define-synt...
03e47062f3eb58f90024925f8282ac249cc1040acf911240ab04f2b3172bc552
matijapretnar/eff
constraints.ml
open Utils open Type module DirtConstraints = struct module DirtParamGraph = Graph.Make (Dirt.Param) (struct type t = DirtCoercionParam.t * Effect.Set.t let[@warning "-27"] print ?(safe = false) (edge, effect_set) ppf = let print_effect_set ppf = if Effect.Set.i...
null
https://raw.githubusercontent.com/matijapretnar/eff/0b0ec7a83e7db4d040ed8fdfc1ac6e3c0f344be1/src/01-language/constraints.ml
ocaml
Since we only add and never remove type constraints, the set of constraints is empty if and only iff there are no skeleton graphs in it Since we only add and never remove type constraints, the set of constraints is empty if and only iff there are no skeleton graphs in it
open Utils open Type module DirtConstraints = struct module DirtParamGraph = Graph.Make (Dirt.Param) (struct type t = DirtCoercionParam.t * Effect.Set.t let[@warning "-27"] print ?(safe = false) (edge, effect_set) ppf = let print_effect_set ppf = if Effect.Set.i...
b8ff6c94d4b4999eed6db999b16d450b7b71e1de03d7b541c611cc9d09d2eec6
db48x/xe2
startup.lisp
(in-package :void) (void)
null
https://raw.githubusercontent.com/db48x/xe2/7896fcc69f5c6e28eaf6f6abb7966d6663370a66/void/startup.lisp
lisp
(in-package :void) (void)
296bb34c222576c97e6d8a2a6f998f68bd7b711f19a32d5a76bf17bed5d2d3c2
clojure-interop/aws-api
core.clj
(ns com.amazonaws.services.redshift.core (:refer-clojure :only [require comment defn ->]) (:import )) (require '[com.amazonaws.services.redshift.AbstractAmazonRedshift]) (require '[com.amazonaws.services.redshift.AbstractAmazonRedshiftAsync]) (require '[com.amazonaws.services.redshift.AmazonRedshift]) (require '[c...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.redshift/src/com/amazonaws/services/redshift/core.clj
clojure
(ns com.amazonaws.services.redshift.core (:refer-clojure :only [require comment defn ->]) (:import )) (require '[com.amazonaws.services.redshift.AbstractAmazonRedshift]) (require '[com.amazonaws.services.redshift.AbstractAmazonRedshiftAsync]) (require '[com.amazonaws.services.redshift.AmazonRedshift]) (require '[c...
0d974e16a14f1935f2bc22aa0c66c0e7e7cbac0a5a1e174485aed91faa6391cd
data61/javaclass
ThisAccessFlags.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # module Language.Java.Class.ThisAccessFlags( ThisAccessFlags(..) , HasThisAccessFlags(..) , ThisAccessFlagsError(..) , HasThisAccessFlag...
null
https://raw.githubusercontent.com/data61/javaclass/cc2429264a46f03dd0839090a88ec31e597a5af7/src/Language/Java/Class/ThisAccessFlags.hs
haskell
|
# LANGUAGE NoImplicitPrelude # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # module Language.Java.Class.ThisAccessFlags( ThisAccessFlags(..) , HasThisAccessFlags(..) , ThisAccessFlagsError(..) , HasThisAccessFlag...
e7c45bbce130ce694a0a0276de493b45acfbedd75fde8c13dccb283b2e6f6264
fdopen/ppx_cstubs
main.ml
This file is part of ppx_cstubs ( ) * Copyright ( c ) 2018 - 2019 fdopen * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version...
null
https://raw.githubusercontent.com/fdopen/ppx_cstubs/638b019ab5eb0d8a187710d00414a1d2536e249c/src/internal/main.ml
ocaml
trigger exceptions use native Findlib.init ()
This file is part of ppx_cstubs ( ) * Copyright ( c ) 2018 - 2019 fdopen * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version...
5e9255a901c6bdc86060ef8f8a6ca97b0f32976f5aa65b2bf174e22a85fac39d
tmattio/gettext
gettext_test.ml
open Alcotest let fixture_1 = [ ( Gettext_locale.of_string "en", Gettext.LC_MESSAGES, "messages", Gettext_po.read_po {| msgid "Hello World" msgstr "" msgid "I ate a %s" msgstr "" msgid "A horse" msgid_plural "Horses" msgstr[0] "" msgstr[1] "" msgid "I have %i pen" msgid_plural "I hav...
null
https://raw.githubusercontent.com/tmattio/gettext/a15c2f0693510fd53ff46ef3501749fe9526bbf3/test/gettext_test.ml
ocaml
open Alcotest let fixture_1 = [ ( Gettext_locale.of_string "en", Gettext.LC_MESSAGES, "messages", Gettext_po.read_po {| msgid "Hello World" msgstr "" msgid "I ate a %s" msgstr "" msgid "A horse" msgid_plural "Horses" msgstr[0] "" msgstr[1] "" msgid "I have %i pen" msgid_plural "I hav...
701597799ab0c41a115b99863d61b65fe414975ab47e5daf649af375129c631d
melange-re/melange
ounit_int_vec_tests.ml
let ( >:: ), ( >::: ) = OUnit.(( >:: ), ( >::: )) let ( =~ ) = OUnit.assert_equal let suites = __FILE__ >::: [ ( __LOC__ >:: fun _ -> OUnit.assert_bool __LOC__ (Int_vec_util.mem 3 (Vec_int.of_list [ 1; 2; 3 ])); OUnit.assert_bool __LOC__ (not @@ Int_vec_util...
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/ounit_tests/ounit_int_vec_tests.ml
ocaml
let ( >:: ), ( >::: ) = OUnit.(( >:: ), ( >::: )) let ( =~ ) = OUnit.assert_equal let suites = __FILE__ >::: [ ( __LOC__ >:: fun _ -> OUnit.assert_bool __LOC__ (Int_vec_util.mem 3 (Vec_int.of_list [ 1; 2; 3 ])); OUnit.assert_bool __LOC__ (not @@ Int_vec_util...
b4270a07e85066c50fd4cf7f8a9c7d0e9632935a40f02d49492589f92cf2f90a
janestreet/learn-ocaml-workshop
direction.ml
open! Base type t = | Left | Up | Right | Down [@@deriving sexp_of] (* TODO: Implement [next_position]. Make sure to take a look at the signature of this function to understand what it does. Recall that the origin of the board is in the lower left hand corner. *) let next_position t position = position...
null
https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/03-snake/lib/direction.ml
ocaml
TODO: Implement [next_position]. Make sure to take a look at the signature of this function to understand what it does. Recall that the origin of the board is in the lower left hand corner.
open! Base type t = | Left | Up | Right | Down [@@deriving sexp_of] let next_position t position = position
e8ac64d7168e12a799869905e5545e21eb45b323e5a3311d650cd18ae674cc0f
simingwang/emqx-plugin-kafkav5
ms_transform.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2002 - 2021 . All Rights Reserved . %% 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 applic...
null
https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/stdlib-3.17.1/src/ms_transform.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific l...
Copyright Ericsson AB 2002 - 2021 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(ms_transform). -export([format_error/1,transform_from_shell/3, parse_transform/2,parse_transform_in...
4ed9500e74fa6cefce9f0701dd31fdb94b4d72f90fe1857f1d69f7ddbd64fcfc
joyofclojure/book-source
bots.clj
(ns joy.bots "The bots example demonstrating closures from section 7.2") (def bearings [{:x 0, :y 1} ; north {:x 1, :y 0} ; east {:x 0, :y -1} ; south {:x -1, :y 0}]) ; west (defn forward [x y bearing-num] [(+ x (:x (bearing...
null
https://raw.githubusercontent.com/joyofclojure/book-source/a2a0ba264c286639a510caf4909c81f40341eac2/src/clj/joy/bots.clj
clojure
north east south west
(ns joy.bots "The bots example demonstrating closures from section 7.2") (defn forward [x y bearing-num] [(+ x (:x (bearings bearing-num))) (+ y (:y (bearings bearing-num)))]) (defn bot [x y bearing-num] {:coords [x y] :bearing ([:north :east :south :west] bearing-num) :forward (fn [] (bot...
19dceca9d232c0ca7bca56e867cdce3a5b9ceb6d632b4e993529702878e6ce6c
mewhhaha/apecs-unity-tutorial-haskell
Main.hs
module Main where import Game (initGame, step) import Play (play) import Relude import qualified SDL main :: IO () main = play step "At any cost" (SDL.V2 640 480) initGame
null
https://raw.githubusercontent.com/mewhhaha/apecs-unity-tutorial-haskell/d995e5311210b4c186ededbd38c64f6861f5eae1/app/Main.hs
haskell
module Main where import Game (initGame, step) import Play (play) import Relude import qualified SDL main :: IO () main = play step "At any cost" (SDL.V2 640 480) initGame
c5e7f1407acfe0fc67e5745a13996f042c11fb1d3bd295d9b405fcb4fccc55db
joelmccracken/reddup
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import qualified Data.Text as T import Prelude hiding (FilePath, concat) import qualified Turtle as Tu import qualified Config as C import Control.Monad.Reader import qualified Options ...
null
https://raw.githubusercontent.com/joelmccracken/reddup/1bce9371d79c410b30b91c10bf040777260777ad/app/Main.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import qualified Data.Text as T import Prelude hiding (FilePath, concat) import qualified Turtle as Tu import qualified Config as C import Control.Monad.Reader import qualified Options as O import qualified Reddup ...
8d16c782ee222f3281a2bea33972d9c140bd556abd54956139f2e28da35bfe87
TerrorJack/ghc-alter
genericNegative001.hs
-- Test for import System.Environment import Data.List main = do (n:_) <- getArgs print (genericTake (read n) "none taken") print (genericDrop (read n) "none dropped") print (genericSplitAt (read n) "none split")
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/genericNegative001.hs
haskell
Test for
import System.Environment import Data.List main = do (n:_) <- getArgs print (genericTake (read n) "none taken") print (genericDrop (read n) "none dropped") print (genericSplitAt (read n) "none split")
17494c3cc1fc6dd0581d36dd4ce560db57b6eb543c5977c86949df4ac454054b
juspay/atlas
Allocation.hs
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
null
https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/atlas-transport/src/Services/Allocation/Allocation.hs
haskell
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
3cdbaa8ab8397bc5d7c30414bbbbbc4552b3a5ff260ae38eb208258d61851776
bravit/hid-examples
Contexts.hs
module Contexts where import Control.Monad.Writer readNumber :: IO Int readNumber = do s <- getLine pure (read s) sumN :: Int -> Writer String Int sumN 0 = writer (0, "finish") sumN n = do tell (show n ++ ",") s <- sumN (n-1) pure (n + s) cartesianProduct :: [Int] -> [Int] -> [(Int, Int)] cartesianProduc...
null
https://raw.githubusercontent.com/bravit/hid-examples/913e116b7ee9c7971bba10fe70ae0b61bfb9391b/ch02/Contexts.hs
haskell
module Contexts where import Control.Monad.Writer readNumber :: IO Int readNumber = do s <- getLine pure (read s) sumN :: Int -> Writer String Int sumN 0 = writer (0, "finish") sumN n = do tell (show n ++ ",") s <- sumN (n-1) pure (n + s) cartesianProduct :: [Int] -> [Int] -> [(Int, Int)] cartesianProduc...
26d477cf1ebcf7713c45dec9a10cc60607e513b162549349c4d902ff473b7e56
funcool/catacumba
core.clj
(ns interceptor.core (:require [catacumba.core :as ct] [catacumba.http :as http] [catacumba.handlers.misc]) (:gen-class)) (defn index [context] (http/ok "<strong>Hello World</strong>" {:content-type "text/html; encoding=utg-8"})) (defn- time-interceptor [exc type cont] ...
null
https://raw.githubusercontent.com/funcool/catacumba/a493843176ee8defa2f3c6afa23c720f495d9341/examples/interceptor/src/interceptor/core.clj
clojure
(ns interceptor.core (:require [catacumba.core :as ct] [catacumba.http :as http] [catacumba.handlers.misc]) (:gen-class)) (defn index [context] (http/ok "<strong>Hello World</strong>" {:content-type "text/html; encoding=utg-8"})) (defn- time-interceptor [exc type cont] ...
13af1971440c7bafbc080cccf02113cab6f6f4c61eb894c20b9eb496d6806f08
zcaudate/hara
result_test.clj
(ns hara.lib.aether.result-test (:use hara.test) (:require [hara.lib.aether.result :refer :all] [clojure.string :as string])) ^{:refer hara.lib.aether.result/clojure-core? :added "3.0"} (fact "checks if artifact represents clojure.core" (clojure-core? '[org.clojure/clojure "1.2.0"]) => true) ^{:r...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/lib/aether/result_test.clj
clojure
(ns hara.lib.aether.result-test (:use hara.test) (:require [hara.lib.aether.result :refer :all] [clojure.string :as string])) ^{:refer hara.lib.aether.result/clojure-core? :added "3.0"} (fact "checks if artifact represents clojure.core" (clojure-core? '[org.clojure/clojure "1.2.0"]) => true) ^{:r...
97b33d50f6e23a51638186866887a625837c0d5e50bb11fd9ef33a6e6a5ac68e
dyoo/whalesong
js-binding.rkt
#lang whalesong (require whalesong/js) (define js-plus (js-function->procedure "function(x, y) { return x + y; }")) (define js-minus (js-function->procedure "function(x, y) { return x - y; }")) (define raw-sleep (js-async-function->procedure "function(success, fail, n) { setTimeout(function() { success(plt....
null
https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/tests/more-tests/js-binding.rkt
racket
I need exception handling... (define i-should-fail (js-async-function->procedure "function(success, fail) { fail('I should fail'); }")) (i-should-fail)
#lang whalesong (require whalesong/js) (define js-plus (js-function->procedure "function(x, y) { return x + y; }")) (define js-minus (js-function->procedure "function(x, y) { return x - y; }")) (define raw-sleep (js-async-function->procedure "function(success, fail, n) { setTimeout(function() { success(plt....
01a5fcdd3478c447493357a7d6c4baf61caae30a2d490d4404d39ed51205e5e2
outergod/cl-heredoc
package.lisp
;;;; cl-heredoc - package.lisp Copyright ( C ) 2009 , 2010 < > ;;;; This file is part of cl-heredoc. ;;;; cl-heredoc is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the License , or...
null
https://raw.githubusercontent.com/outergod/cl-heredoc/a8c8a3557bb6b4854adff86f10182c22e6676ac8/test/package.lisp
lisp
cl-heredoc - package.lisp This file is part of cl-heredoc. cl-heredoc is free software; you can redistribute it and/or modify either version 3 of the License , or (at your option) any later version. cl-heredoc is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied ...
Copyright ( C ) 2009 , 2010 < > it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License (in-package :cl-user) (defpackage :cl-heredoc-test (:use :cl :cl-heredoc :stefil) (:export :all)) (in-package :cl-heredoc-test) (in-ro...
2da886e18e7f65287b98feafbd161d8630a671b2a261b9c159de7569e8de1bfb
voicerepublic/vr-logorrhoe
vrapi.clj
(ns vr-logorrhoe.vrapi (:require [vr-logorrhoe [config :as config :refer [setting state merge-state!]]] [taoensso.timbre :as timbre :refer [debug]] [clj-http.client :as client] [cheshire.core :as json])) ;; ------------------------------ knocking (rest) ;; this can e...
null
https://raw.githubusercontent.com/voicerepublic/vr-logorrhoe/e01c4a8599cdbbd25f982acece474669dd7fd6ef/src/vr_logorrhoe/vrapi.clj
clojure
------------------------------ knocking (rest) this can easily be hardcoded, since it will NEVER change watching the state ------------------------------ registering (rest) ------------------------------ polling (rest) Since the poll also replaces the heartbeat it is a HTTP PUT.
(ns vr-logorrhoe.vrapi (:require [vr-logorrhoe [config :as config :refer [setting state merge-state!]]] [taoensso.timbre :as timbre :refer [debug]] [clj-http.client :as client] [cheshire.core :as json])) (def ^{:private true} default-endpoint "") (def ^{:private t...
1769f1b33f8d2de502f9dd7e38673d2109956f391d5672ec64dce2c0cc584bf1
chrovis/cljam
util_test.clj
(ns cljam.io.util-test (:require [clojure.test :refer [deftest is are testing]] [clojure.java.io :as cio] [cljam.test-common :refer [with-before-after prepare-cache! clean-cache! temp-dir test-sam-file medium-sa...
null
https://raw.githubusercontent.com/chrovis/cljam/2b8e7386765be8efdbbbb4f18dbc52447f4a08af/test/cljam/io/util_test.clj
clojure
fail fail fail fail fail unsupported fail fail
(ns cljam.io.util-test (:require [clojure.test :refer [deftest is are testing]] [clojure.java.io :as cio] [cljam.test-common :refer [with-before-after prepare-cache! clean-cache! temp-dir test-sam-file medium-sa...
8d8e0888bd6775c66c3bd9870d2803222ac0d80bf78d45ed9e53a3ea6d2e289a
input-output-hk/rscoin-haskell
Operations.hs
{-# LANGUAGE FlexibleContexts #-} # LANGUAGE PatternGuards # {-# LANGUAGE Rank2Types #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # -- | Basic operations with wallet. module RSCoin.User.Operations ( A.openState , A.openMemState , A.closeState , A....
null
https://raw.githubusercontent.com/input-output-hk/rscoin-haskell/109d8f6f226e9d0b360fcaac14c5a90da112a810/src/RSCoin/User/Operations.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE Rank2Types # | Basic operations with wallet. Maximum number of blocks requested by user at once. | Checks address id (should be in [0..length allAddrs)) to be so | Updates wallet to given blockchain height assuming that it's in previous height state already. | ...
# LANGUAGE PatternGuards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # module RSCoin.User.Operations ( A.openState , A.openMemState , A.closeState , A.initState , A.initStateBank , walletInitialized , commitError , checkAddressId ...
236457ee976074b49e249dfad448ddf1d52a0095eaa5371701ff012df7b033f6
earl-ducaine/cl-garnet
gauge-pix.lisp
(create-instance 'win inter:interactor-window (:top 100) (:left 300) (:height 220) (:width 500) (:aggregate (create-instance 'agg opal:aggregate))) (create-instance 'pres-gauge garnet-gadgets:gauge (:left 30) (:top 30) (:title "Pressure")) (create-instance 'temp-gauge garnet-gadgets:gauge (:left 275) (:top 55) ...
null
https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/doc/src/gadgets/garnet-code/gauge-pix.lisp
lisp
(create-instance 'win inter:interactor-window (:top 100) (:left 300) (:height 220) (:width 500) (:aggregate (create-instance 'agg opal:aggregate))) (create-instance 'pres-gauge garnet-gadgets:gauge (:left 30) (:top 30) (:title "Pressure")) (create-instance 'temp-gauge garnet-gadgets:gauge (:left 275) (:top 55) ...
8963865f7d04deadc129827b592a4859ac65d0874afa44b92f60c705d44f1844
mflatt/scope-sets
bib.rkt
#lang at-exp racket (require scriblib/autobib scribble/base) (provide (all-defined-out) in-bib) (define-cite ~cite citet generate-bibliography) (define popl "Principles of Programming Languages") (define pldi "Programming Language Design and Implementation") (define gpce "Generative Programming: Co...
null
https://raw.githubusercontent.com/mflatt/scope-sets/4d3ae9d8a0f6ff83aa597612d280406cb6d82f5b/bib.rkt
racket
-trier.de/rec/bibtex/conf/lfp/BawdenR88
#lang at-exp racket (require scriblib/autobib scribble/base) (provide (all-defined-out) in-bib) (define-cite ~cite citet generate-bibliography) (define popl "Principles of Programming Languages") (define pldi "Programming Language Design and Implementation") (define gpce "Generative Programming: Co...
6b50376af0b7f191ef8a9cb524020a562c4a62506c8c2693d6e869cec2ac4804
Opetushallitus/ataru
component_content.cljs
(ns ataru.virkailija.editor.components.component-content (:require [re-frame.core :refer [subscribe]] [reagent.core :as r])) (defn- component-fold-transition [component folded? state height] (cond (= [true :unfolded] [@folded? @state]) ;; folding, calculate and set height (do (reset! ...
null
https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/src/cljs/ataru/virkailija/editor/components/component_content.cljs
clojure
folding, calculate and set height folding, render folded unfolding, set height unfolding, render unfolded
(ns ataru.virkailija.editor.components.component-content (:require [re-frame.core :refer [subscribe]] [reagent.core :as r])) (defn- component-fold-transition [component folded? state height] (cond (= [true :unfolded] [@folded? @state]) (do (reset! height (.-scrollHeight (r/dom-node component)...
10748807022d798a05eef938d4d28783e6f5cec4649f6712d2d291083e86f012
ocaml-ppx/ppx_tools_versioned
ppx_tools_411.ml
module Ast_convenience = Ast_convenience_411 module Ast_mapper_class = Ast_mapper_class_411
null
https://raw.githubusercontent.com/ocaml-ppx/ppx_tools_versioned/00a0150cdabfa7f0dad2c5e0e6b32230d22295ca/ppx_tools_411.ml
ocaml
module Ast_convenience = Ast_convenience_411 module Ast_mapper_class = Ast_mapper_class_411
7819974cac3aa053a8b67d1175b1fe863ee96e1adb21d439439dfbc6cd4a4a82
tarides/dune-release
deprecate.mli
module Opam_1_x : sig val file_format_warning : string * Message warning users that they need to upgrade their opam files from the 1.x to the 2.x format to be compatible with dune - release 2.0.0 1.x to the 2.x format to be compatible with dune-release 2.0.0 *) val remove_me : _ (** Dummy value use...
null
https://raw.githubusercontent.com/tarides/dune-release/6bfed0f299b82c0931c78d4e216fd0efedff0673/lib/deprecate.mli
ocaml
* Dummy value used to flag part of the code we should remove when dropping support for opam 1.x * Documentation bit indicating the --user option is deprecated because it is redundant with the --remote-repo option. * Message warning users they used the deprecated --user option and that they should us...
module Opam_1_x : sig val file_format_warning : string * Message warning users that they need to upgrade their opam files from the 1.x to the 2.x format to be compatible with dune - release 2.0.0 1.x to the 2.x format to be compatible with dune-release 2.0.0 *) val remove_me : _ end module Config_us...
341752b46d5629e1ebc96f8e54f934684e2a30484e9c64a1767d095741e69296
slipstream/SlipStreamServer
service_benchmark_test.cljc
(ns com.sixsq.slipstream.ssclj.resources.spec.service-benchmark-test (:require [clojure.test :refer [deftest]] [com.sixsq.slipstream.ssclj.resources.service-benchmark :as sb-resource] [com.sixsq.slipstream.ssclj.resources.spec.service-benchmark :as sb] [com.sixsq.slipstream.ssclj.resources.spec.spec-t...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi-resources/test/com/sixsq/slipstream/ssclj/resources/spec/service_benchmark_test.cljc
clojure
mandatory keywords optional keywords
(ns com.sixsq.slipstream.ssclj.resources.spec.service-benchmark-test (:require [clojure.test :refer [deftest]] [com.sixsq.slipstream.ssclj.resources.service-benchmark :as sb-resource] [com.sixsq.slipstream.ssclj.resources.spec.service-benchmark :as sb] [com.sixsq.slipstream.ssclj.resources.spec.spec-t...
347ece962eb4ce9baa001f5c55e30852590363decb4113aa099815b2d2923d31
ghc/testsuite
tcfail197.hs
{-# LANGUAGE RankNTypes #-} module ShouldFail where foo :: [forall a. a] -> Int foo = error "urk"
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail197.hs
haskell
# LANGUAGE RankNTypes #
module ShouldFail where foo :: [forall a. a] -> Int foo = error "urk"
84b568b6161b9b7c2c4e992c48e0f30033c9fa47dd8fd2a591b8f4c1106d227d
haskell/cabal
CmdRun.hs
# LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # -- | cabal-install CLI command: run -- module Distribution.Client.CmdRun ( * The @run@ CLI and action runCommand, runAction, handleShebang, validScript, -- *...
null
https://raw.githubusercontent.com/haskell/cabal/7d4b33f58cbdc435d557f4dc7e7a949f04e98086/cabal-install/src/Distribution/Client/CmdRun.hs
haskell
# LANGUAGE OverloadedStrings # | cabal-install CLI command: run * Internals exposed for testing first if necessary. The component can be either an executable, a test, or a benchmark. This is particularly useful for passing arguments to exes/tests/benchs by simply appending them after a @--@. For more details on...
# LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # module Distribution.Client.CmdRun ( * The @run@ CLI and action runCommand, runAction, handleShebang, validScript, matchesMultipleProblem, noExesProblem, selectPackageTargets, selec...
dc6c971d90162093b94eff90858be1d96ccbfd90950ef558e564f1bf02e63547
dakk/caravand-fullnode
constants.mli
val version: string val version_btc: string val name: string val name_lower: string
null
https://raw.githubusercontent.com/dakk/caravand-fullnode/72735bf380812aea32ba0d3d4aa671f741cdaecb/src/utils/constants.mli
ocaml
val version: string val version_btc: string val name: string val name_lower: string
3072968918460871912f4ea0b886a48420f3711965f01583ec92db82cc65ac6b
clojure/clojurescript
core.cljs
(ns trivial.core) (. js/console (log "Hello!"))
null
https://raw.githubusercontent.com/clojure/clojurescript/a4673b880756531ac5690f7b4721ad76c0810327/src/test/cljs_build/trivial/core.cljs
clojure
(ns trivial.core) (. js/console (log "Hello!"))
fed85304d179ac5a028f90ea767437362826dcb1211dbfa6ea8494b2418a08d6
clojure/core.rrb-vector
test_cljs.cljs
(ns clojure.core.rrb-vector.test-cljs (:require [cljs.test :as test] [clojure.core.rrb-vector :as fv] [clojure.core.rrb-vector.test-utils :as u] clojure.core.rrb-vector.test-common clojure.core.rrb-vector.test-cljs-only clojure.core.rrb-vector.long-test)) ...
null
https://raw.githubusercontent.com/clojure/core.rrb-vector/88c2f814b47c0bbc4092dad82be2ec783ed2961f/src/test/cljs/clojure/core/rrb_vector/test_cljs.cljs
clojure
in the data.xml library tests, then modified for use by core.rrb-vector, so that core.rrb-vector's ClojureScript tests could also be run on build.clojure.org via a mvn command. Function -main-nashorn is called when running tests using a maven command such as this one: mvn -DCLOJURE_VERSION=1.10.1 -Dclojure.versio...
(ns clojure.core.rrb-vector.test-cljs (:require [cljs.test :as test] [clojure.core.rrb-vector :as fv] [clojure.core.rrb-vector.test-utils :as u] clojure.core.rrb-vector.test-common clojure.core.rrb-vector.test-cljs-only clojure.core.rrb-vector.long-test)) ...
a81e85b248eec069d7935fbda7e56d6864d692a24d551f2cfc20c5b1ded47899
ds-wizard/engine-backend
APISpec.hs
module Registry.Specs.API.Locale.APISpec where import Test.Hspec import Test.Hspec.Wai hiding (shouldRespondWith) import Registry.Specs.API.Common import Registry.Specs.API.Locale.Detail_Bundle_GET import Registry.Specs.API.Locale.Detail_GET import Registry.Specs.API.Locale.List_GET localeAPI baseContext appContext...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/0ec94a4b0545f2de8a4e59686a4376023719d5e7/engine-registry/test/Registry/Specs/API/Locale/APISpec.hs
haskell
module Registry.Specs.API.Locale.APISpec where import Test.Hspec import Test.Hspec.Wai hiding (shouldRespondWith) import Registry.Specs.API.Common import Registry.Specs.API.Locale.Detail_Bundle_GET import Registry.Specs.API.Locale.Detail_GET import Registry.Specs.API.Locale.List_GET localeAPI baseContext appContext...
78541ec274f4319b60b6e10b9fe8d365770a98e0a871f9f2f0b5d624f4bfd871
JonasDuregard/testing-feat
Feat.hs
# OPTIONS_GHC -fno - warn - warnings - deprecations # -- | This module contains a (hopefully) manageable subset of the functionality -- of Feat. The rest resides only in the Test.Feat.* modules. module Test.Feat( -- * Testing driver test, testOptions, Options(..), defOptions, -- * The type class Enu...
null
https://raw.githubusercontent.com/JonasDuregard/testing-feat/a1b32842a8cc8ab467d93a9f97f2365330a02113/Test/Feat.hs
haskell
| This module contains a (hopefully) manageable subset of the functionality of Feat. The rest resides only in the Test.Feat.* modules. * Testing driver * The type class ** Automatic derivation * Accessing data import Test.Feat.Class import Test.Feat.Modifiers
# OPTIONS_GHC -fno - warn - warnings - deprecations # module Test.Feat( test, testOptions, Options(..), defOptions, Enumerate(), Enumerable(..), datatype, c0, c1, c2, c3, c4, c5, c6, c7, deriveEnumerable, optimal, index, select, values, uniform, ) where import Test.Feat.Access impo...
2e3686b401b48c93aebc257854aee1090f89ceb124f37637a2d12b2ece5bc895
merijn/lambda-except
Eval.hs
# LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # module Eval where import Data.Bifunctor import Data.Maybe import AST matchPatWithEval :: forall a . (Expr a -> Expr a) -> Expr a -> Alt Expr a -> Maybe (Expr a) matchPatWithEval eval expr (Alt pat body _) = inst . snd <$> match pat expr whe...
null
https://raw.githubusercontent.com/merijn/lambda-except/e043c0eb547e58fc9aa06c5fe35bfd9a5c699340/Eval.hs
haskell
# LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # module Eval where import Data.Bifunctor import Data.Maybe import AST matchPatWithEval :: forall a . (Expr a -> Expr a) -> Expr a -> Alt Expr a -> Maybe (Expr a) matchPatWithEval eval expr (Alt pat body _) = inst . snd <$> match pat expr whe...
7a510d7e0366e366b53983ff17509bed7f4c8c9a4285691e41766f7a77d77e60
haskell-opengl/OpenGLRaw
PNTriangles.hs
# LANGUAGE PatternSynonyms # -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.ATI.PNTriangles Copyright : ( c ) 2019 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- --------------------...
null
https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/ATI/PNTriangles.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.GL.ATI.PNTriangles License : BSD3 Stability : stable Portability : portable ------------------------------------------------------------------------------ * Extension Support * Enums * Functions
# LANGUAGE PatternSynonyms # Copyright : ( c ) 2019 Maintainer : < > module Graphics.GL.ATI.PNTriangles ( glGetATIPNTriangles, gl_ATI_pn_triangles, pattern GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI, pattern GL_PN_TRIANGLES_ATI, pattern GL_PN_TRIANGLES_NORMAL_MODE_ATI, pattern GL_PN_TRIANG...
58debfc011516443f71cfd9fef428cea5c10bcee3a871fd617692e290dd1aa4d
abengoa/clj-stripe
cards.clj
Copyright ( c ) 2011 . 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 epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound b...
null
https://raw.githubusercontent.com/abengoa/clj-stripe/d4870d6ea57140d23385878bcf7faea21cf90da8/src/clj_stripe/cards.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 ) 2011 . All rights reserved . (ns clj-stripe.cards "Functions for Stripe Cards API" (:use clj-stripe.common) (:require [clj-stripe.util :as util])) (defn create-card-token "Creates a create-card-token operation. Requires a card (see common/card). Optionally accepts a money-quant...
107b2272f8be6c6994d22f9cc67f0841a577e515ad7165313f16157e04bfd4a4
ifigueroap/racket-quickcheck
main.rkt
#lang racket/base (provide quickcheck quickcheck-results make-config (struct-out result) arbitrary? arbitrary (struct-out generator) (struct-out config) with-test-count with-small-test-count with-medium-test-count with...
null
https://raw.githubusercontent.com/ifigueroap/racket-quickcheck/902eb30fa8f5c0df7910df22c1442ff866b3920d/quickcheck/main.rkt
racket
#lang racket/base (provide quickcheck quickcheck-results make-config (struct-out result) arbitrary? arbitrary (struct-out generator) (struct-out config) with-test-count with-small-test-count with-medium-test-count with...