_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
f1d8f96a192ce7cbef7a8384705bbb834cd3ec23aa5f477399694dd80b9ec1f8
ageneau/blossom
core.cljc
(ns blossom.core (:require [blossom.max-weight-matching :as mwm] [blossom.matching :as m])) (def API-FUNCTIONS #{`mwm/max-weight-matching `m/is-matching? `m/is-maximal-matching? `m/is-perfect-matching? `m/maximal-matching...
null
https://raw.githubusercontent.com/ageneau/blossom/67a6a2bcc30776867fe16b4e79122e7f43e4928a/src/blossom/core.cljc
clojure
(ns blossom.core (:require [blossom.max-weight-matching :as mwm] [blossom.matching :as m])) (def API-FUNCTIONS #{`mwm/max-weight-matching `m/is-matching? `m/is-maximal-matching? `m/is-perfect-matching? `m/maximal-matching...
a417604c5f5798e4b631e11a4a1314adb820f6f22e5b6aac98434940d730e44a
S8A/htdp-exercises
ex163.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-beginner-reader.ss" "lang")((modname ex163) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex163.rkt
racket
about the language level of this file in a form that our tools can easily process. - '() - (cons Number ListOfFTemps) interpretation a list of temperature measurements in - '() interpretation a list of temperature measurements in Celsius
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex163) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t ...
78daed4f51ecfea7f4b560918977f56ef5c0c9cee4c0fdfae08070fed20a55b0
haskell/vector
OtherFoo.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Inspect.DerivingVia.OtherFoo where import qualified Data.Vector.Generic ...
null
https://raw.githubusercontent.com/haskell/vector/bdaaa86560a6c7eb13a7987b66fd5712e900a405/vector/tests-inspect/Inspect/DerivingVia/OtherFoo.hs
haskell
| Simple product data type for which we derive Unbox instances using generics and iso-deriving. It's defined in separate module in order to test that it doesn't impede optimizer
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Inspect.DerivingVia.OtherFoo where import qualified Data.Vector.Generic ...
042060e275b472553ef4ac6a9971ec308d65463a931b009c0c6771fc64e90209
EveryTian/Haskell-Codewars
Tests.hs
# LANGUAGE RecordWildCards # import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import ArmstrongNumbers (armstrong) main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs specs :: Spec specs ...
null
https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/exercism/armstrong-numbers/test/Tests.hs
haskell
# LANGUAGE RecordWildCards # import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import ArmstrongNumbers (armstrong) main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs specs :: Spec specs ...
b13e22195d89d83cb02bb41e892754971378b10a7b7cacfba408f4fefa95e9fa
BitGameEN/bitgamex
erlcloud_lambda.erl
-module(erlcloud_lambda). -author(''). -include("erlcloud.hrl"). -include("erlcloud_aws.hrl"). -include("erlcloud_lambda.hrl"). -define(API_VERSION, "2015-03-31"). Library initialization . -export([configure/2, configure/3, configure/4, new/2, new/3, new/4]). -export([create_alias/4, create_alias/5, ...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/erlcloud/src/erlcloud_lambda.erl
erlang
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----...
-module(erlcloud_lambda). -author(''). -include("erlcloud.hrl"). -include("erlcloud_aws.hrl"). -include("erlcloud_lambda.hrl"). -define(API_VERSION, "2015-03-31"). Library initialization . -export([configure/2, configure/3, configure/4, new/2, new/3, new/4]). -export([create_alias/4, create_alias/5, ...
44abeb4464f3482c27de959b0e545fdc03c070154359966dd507b39bd19a505e
zotonic/cowmachine
main_sup.erl
%%%------------------------------------------------------------------- %% @doc main top level supervisor. %% @end %%%------------------------------------------------------------------- -module(main_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). start_link() -> ...
null
https://raw.githubusercontent.com/zotonic/cowmachine/ad592a3e70ccce87434e3555c58fa1664bfa00c6/examples/markdown_middleware/src/main_sup.erl
erlang
------------------------------------------------------------------- @doc main top level supervisor. @end ------------------------------------------------------------------- sup_flags() = #{strategy => strategy(), % optional intensity => non_neg_integer(), % optional optional child_spec() =...
-module(main_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). start_link() -> supervisor:start_link({local, ?SERVER}, ?MODULE, []). init([]) -> SupFlags = #{strategy => one_for_one, intensity => 0, period => 1}, Main...
be8a01a4f36e7b079744357c6c5ae4a2c6f337395cd81a9d605bdf8db5dac4a8
xxyzz/SICP
Exercise_4_78.rkt
#lang racket/base amb code from exercise 4.51 (define primitive-procedures (list (list 'car car) (list 'cdr cdr) (list 'cons cons) (list 'null? null?) (list 'list list) (list 'not not) (list 'eq? eq?) (list '+ +) (list '- -) (list '* *) ...
null
https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/4_Metalinguistic_Abstraction/4.4_Logic_Programming/Exercise_4_78.rkt
racket
retry former not current query inside amb evaluator loop: query evaluator: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** it won't interleave results it will always return the same result
#lang racket/base amb code from exercise 4.51 (define primitive-procedures (list (list 'car car) (list 'cdr cdr) (list 'cons cons) (list 'null? null?) (list 'list list) (list 'not not) (list 'eq? eq?) (list '+ +) (list '- -) (list '* *) ...
f1dae72ba7cec4cff1919997901a67303078be14fa051aec88823ff298266aa5
static-analysis-engineering/codehawk
cCHFunctionTranslator.ml
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk C Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Copyrig...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/f2891d9120d5a776ea9ac1feec7bf98cce335e12/CodeHawk/CHC/cchanalyze/cCHFunctionTranslator.ml
ocaml
chutil xprlib cchlib cchanalyze TBD: see ref
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk C Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Copyrig...
593ff493312e94ed72f6aa1cf14af5f94668a43e91504f8958a17caf1b0dea4e
0install/0install
env.ml
Copyright ( C ) 2013 , the README file for details , or visit . * See the README file for details, or visit . *) type t = string XString.Map.t type name = string let empty = XString.Map.empty let parse_binding line = match Str.bounded_split_delim XString.re_equals line 2 with | [key; value] -> (key...
null
https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/support/env.ml
ocaml
Copyright ( C ) 2013 , the README file for details , or visit . * See the README file for details, or visit . *) type t = string XString.Map.t type name = string let empty = XString.Map.empty let parse_binding line = match Str.bounded_split_delim XString.re_equals line 2 with | [key; value] -> (key...
ebc15e8639de1721c5dd2ff394ee6402f15fe631d5c063e9ca333402e78293de
lispnik/cl-http
ff-compatibility-mcl.lisp
-*- Mode : Lisp ; Package : ( FFC ) -*- Foreign function compatibility module for MCL , LWW and ACL ( MCL version ) Version 0.85 Copyright ( C ) 1999 . All rights reserved . ;; ;; ;; Documentation and the license agreement can be found in file ;; "sql-odbc-documentation.lisp". ;; Bug reports and suggestions ...
null
https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/contrib/pmeurer/sql/mcl/ff-compatibility-mcl.lisp
lisp
Package : ( FFC ) -*- Documentation and the license agreement can be found in file "sql-odbc-documentation.lisp". Bug reports and suggestions are highly welcome. In this file the platform specific code is isolated. The code in this file consists mostly of wrapper functions and macros around the platform-dep...
Foreign function compatibility module for MCL , LWW and ACL ( MCL version ) Version 0.85 Copyright ( C ) 1999 . All rights reserved . This file contains MCL specific code . (defpackage "FFC" (:use "COMMON-LISP" "CCL") (:import-from "CCL" "WITH-CSTR") (:export "*FOREIGN-MODULE*" "DEFINE-FOREIGN-FUNCT...
beb558324f42bef93b77ac6baccd9f3d666f1c333c1c2f5d6961d84d89a03296
ekmett/coda
Layout.hs
{-# language CPP #-} # language OverloadedLists # # language LambdaCase # # OPTIONS_GHC -Wno - incomplete - patterns # module Layout where import Control.Lens #if __GLASGOW_HASKELL__ < 804 import Data.Semigroup #endif import Relative.Class import Relative.Delta import Relative.Cat as Cat import Rev import Syntax.Pre...
null
https://raw.githubusercontent.com/ekmett/coda/bca7e36ab00036f92d94eb86298712ab1dbf9b8d/src/layout/Layout.hs
haskell
# language CPP # this is for debugging the Layout Monoid # unpack # # unpack # this is for debugging the Layout Monoid # unpack # # unpack # # unpack # It might be worth adding a Cat Run after the Run for the middle of the V, to track things which have the same indent as the middle of the V. be shorter than the ri...
# language OverloadedLists # # language LambdaCase # # OPTIONS_GHC -Wno - incomplete - patterns # module Layout where import Control.Lens #if __GLASGOW_HASKELL__ < 804 import Data.Semigroup #endif import Relative.Class import Relative.Delta import Relative.Cat as Cat import Rev import Syntax.Prefix import Dyck dat...
9a06759572fc8e89c9410cac04270cea4124947ad0c0521139bed3fb4d12aeb8
acl2/acl2
apply-meta-lemmas@useless-runes.lsp
(RP::RP-RW-META-RULE-MAIN-VALID-EVAL (924 8 (:DEFINITION RP::EVAL-AND-ALL)) (680 17 (:DEFINITION RP::RP-TRANS)) (393 291 (:REWRITE DEFAULT-CAR)) (357 306 (:REWRITE DEFAULT-CDR)) (306 17 (:DEFINITION RP::TRANS-LIST)) (255 3 (:DEFINITION RP::RP-TERMP)) (244 26 (:DEFINITION RP::INCLUDE-FNC)) (207 17 (:REWRITE RP::...
null
https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/projects/rp-rewriter/proofs/.sys/apply-meta-lemmas%40useless-runes.lsp
lisp
(RP::RP-RW-META-RULE-MAIN-VALID-EVAL (924 8 (:DEFINITION RP::EVAL-AND-ALL)) (680 17 (:DEFINITION RP::RP-TRANS)) (393 291 (:REWRITE DEFAULT-CAR)) (357 306 (:REWRITE DEFAULT-CDR)) (306 17 (:DEFINITION RP::TRANS-LIST)) (255 3 (:DEFINITION RP::RP-TERMP)) (244 26 (:DEFINITION RP::INCLUDE-FNC)) (207 17 (:REWRITE RP::...
b9b4cba63e7e707e7188b264a6634d47f0339557e5dd2474d3cf594cbfd29087
cstar/erls3
erls3server.erl
%%%------------------------------------------------------------------- %%% File : erls3.erl Author : < > %%% Description : %%% Created : 14 Nov 2007 by < > %%%------------------------------------------------------------------- -module(erls3server). -behaviour(gen_server). -define(TIMEOUT, 400000 ). %%-...
null
https://raw.githubusercontent.com/cstar/erls3/16f675a30e6866957f7086179fe26648e9432644/src/erls3server.erl
erlang
------------------------------------------------------------------- File : erls3.erl Description : ------------------------------------------------------------------- -------------------------------------------------------------------- External exports -----------------------------------------------------------...
Author : < > Created : 14 Nov 2007 by < > -module(erls3server). -behaviour(gen_server). -define(TIMEOUT, 400000 ). -export([ start_link/1, stop/0 ]). -define(DEBUG(T, P), error_logger:info_msg(T, P)). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -inc...
3ab1c93a4df75cceb6ec521a3907a84bece777975860a5404f20259c198ac1cd
sharplispers/montezuma
tc-segment-infos.lisp
(in-package #:montezuma) (deftestfun test-segment-infos (let ((dir (make-instance 'ram-directory))) (let ((sis (make-instance 'segment-infos))) (test segment-infos-1 (segment-infos-read-current-version dir) 0) (let ((seg0 (make-instance 'segment-info :name "seg0" :doc-count 5 :director...
null
https://raw.githubusercontent.com/sharplispers/montezuma/ee2129eece7065760de4ebbaeffaadcb27644738/tests/unit/index/tc-segment-infos.lisp
lisp
(in-package #:montezuma) (deftestfun test-segment-infos (let ((dir (make-instance 'ram-directory))) (let ((sis (make-instance 'segment-infos))) (test segment-infos-1 (segment-infos-read-current-version dir) 0) (let ((seg0 (make-instance 'segment-info :name "seg0" :doc-count 5 :director...
104ccff13e5b6ca9efb01436c71a47d4dec03958c1d381789d926704952d3e82
dbushenko/sitecompiler
htmlparser.clj
(ns sitecompiler.parsers.htmlparser (:require [sitecompiler.header :as header]) (:use sitecompiler.common)) (defrecord HtmlParser [] Supported (supported? [this ext] (= "html" ext)) Parser (parse [this fl] (let [h (header/parse-file fl)] (assoc h :content (:content h))))) (defn...
null
https://raw.githubusercontent.com/dbushenko/sitecompiler/ff916d4539a3c4694a1664f087a45cfdf847ecdc/src/sitecompiler/parsers/htmlparser.clj
clojure
(ns sitecompiler.parsers.htmlparser (:require [sitecompiler.header :as header]) (:use sitecompiler.common)) (defrecord HtmlParser [] Supported (supported? [this ext] (= "html" ext)) Parser (parse [this fl] (let [h (header/parse-file fl)] (assoc h :content (:content h))))) (defn...
53caf21f83e87aa2ae5a681ebccf4c2dccd8a865cadfb0209468c6e0c767cea5
Panthevm/cleancss
data_readers.cljc
{c cleancss.data-readers/class i cleancss.data-readers/identifier}
null
https://raw.githubusercontent.com/Panthevm/cleancss/73d9b5f3c6fcb6c12e83926b660f6f0f9fb8880c/src/data_readers.cljc
clojure
{c cleancss.data-readers/class i cleancss.data-readers/identifier}
6a511e9c2199e07a140e130b34f340fe9352bde260ed7c7908e2c94d0a41731d
nd/sicp
2.58.scm
(load "~/projects/sicp/ch02/deriv.scm") ;;a (define (make-sum a1 a2) (cond ((and (number? a1) (number? a2)) (+ a1 a2)) ((=number? a1 0) a2) ((=number? a2 0) a1) (else (list a1 '+ a2)))) (define (make-product m1 m2) (cond ((and (number? m1) (number? m2)) (* m1 m2)) ((or (=number? m1...
null
https://raw.githubusercontent.com/nd/sicp/d8587a0403d95af7c7bcf59b812f98c4f8550afd/ch02/2.58.scm
scheme
a b
(load "~/projects/sicp/ch02/deriv.scm") (define (make-sum a1 a2) (cond ((and (number? a1) (number? a2)) (+ a1 a2)) ((=number? a1 0) a2) ((=number? a2 0) a1) (else (list a1 '+ a2)))) (define (make-product m1 m2) (cond ((and (number? m1) (number? m2)) (* m1 m2)) ((or (=number? m1 0) ...
c313927c65b13a92bc32575c5ea2b3d32aa96da829e856cd23c9c8a863829e54
bvaugon/ocapic
cgrom.ml
(*************************************************************************) (* *) (* OCaPIC *) (* *) ...
null
https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/src/simulator/lcd/cgrom.ml
ocaml
*********************************************************************** OCaPIC ...
This file is distributed under the terms of the CeCILL license . exception Parsing_error of string * int let file = Filename.concat Config.libdir "lcd_cgrom.txt" let parse () = let line_counter = ref 0 in let ic = open_in file in let input_l...
05b75d17d6b2358020687e3ebe39456e335a054533a4477073c889e80c8765e9
twosigma/Cook
tools.clj
;; Copyright ( c ) Two Sigma Open Source , LLC ;; 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/twosigma/Cook/a0903361213198da3d2d0205ead0ee66a418edc9/scheduler/src/cook/tools.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permi...
Copyright ( c ) Two Sigma Open Source , LLC distributed under the License is distributed on an " AS IS " BASIS , (ns cook.tools (:require [chime] [clj-time.coerce :as tc] [clj-time.core :as t] [clj-time.format :as tf] [clj-time.periodic :as tp] [clojure....
7a6ee43c81f0781ee5525e62e95fd45780cc9f083114b807336a0edced1d506f
Frama-C/Frama-C-snapshot
eval_typ.mli
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/value/utils/eval_typ.mli
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
8684923bf9f8ae2b1de9fa5efac44e28ee21153c46c894ed524faae3ce0ebe3d
haskellari/tree-diff
Pretty.hs
| Utilities to pretty print ' ' and ' ' module Data.TreeDiff.Pretty ( -- * Explicit dictionary Pretty (..), ppExpr, ppEditExpr, ppEditExprCompact, -- * pretty prettyPretty, prettyExpr, prettyEditExpr, prettyEditExprCompact, -- * ansi-wl-pprint ansiWlPretty, ansiWl...
null
https://raw.githubusercontent.com/haskellari/tree-diff/53665c4d50a80ff53cf8dbc14344a5e28e961f4a/src/Data/TreeDiff/Pretty.hs
haskell
* Explicit dictionary * pretty * ansi-wl-pprint ** background * Utilities $setup | Because we don't want to commit to single pretty printing library, we use explicit dictionary. ^ Display 'ConstructorName' ^ Display 'App' ^ Display 'Rec' ^ Display unchanged parts ^ Display added parts ^ Display removed pa...
| Utilities to pretty print ' ' and ' ' module Data.TreeDiff.Pretty ( Pretty (..), ppExpr, ppEditExpr, ppEditExprCompact, prettyPretty, prettyExpr, prettyEditExpr, prettyEditExprCompact, ansiWlPretty, ansiWlExpr, ansiWlEditExpr, ansiWlEditExprCompact, ansiWlBgPret...
e95c90f7951915da7ed76de89011f0b0ba84c2f9db48dc1bbb14463956700e03
svenpanne/EOPL3
exercise-3-21.rkt
#lang eopl ; ------------------------------------------------------------------------------ Exercise 3.21 See : exercise 3.19 ; ; We do not use currying internally. Instead, we change the representation of ; procedural values to support n-ary functions. ; ----------------------------------------------------------...
null
https://raw.githubusercontent.com/svenpanne/EOPL3/3fc14c4dbb1c53a37bd67399eba34cea8f8234cc/chapter3/exercise-3-21.rkt
racket
------------------------------------------------------------------------------ We do not use currying internally. Instead, we change the representation of procedural values to support n-ary functions. ------------------------------------------------------------------------------ Approximation. ------------------...
#lang eopl Exercise 3.21 See : exercise 3.19 Scanner and parser specification (define scanner-spec '((whitespace (whitespace) skip) (comment ("%" (arbno (not #\newline))) skip) (number (digit (arbno digit)) number) (number ("-" digit (arbno digit)) number) (nullary-op ("emptylist") string) ...
1e7798be9c7f7263c67b3862a2fc6f2e0b2a97251762e7647d9e69da9375673e
dccsillag/dotfiles
Commands.hs
# LANGUAGE BlockArguments # module XMonad.Csillag.Commands ( commandHandler, ) where import Control.Monad import System.Exit (exitSuccess) import Text.Read (readMaybe) import XMonad import XMonad.Actions.CopyWindow (copy, kill1) import XMonad.Actions.DynamicWorkspaces (addHiddenWorkspace, removeEmptyWorkspaceAfte...
null
https://raw.githubusercontent.com/dccsillag/dotfiles/1a8aa69b19c560ce7355990d15e28eb05eacfc65/.xmonad/lib/XMonad/Csillag/Commands.hs
haskell
Directional actions Floating windows Close windows Screens (Xinerama) Workspaces Layouts Scratchpads No such command
# LANGUAGE BlockArguments # module XMonad.Csillag.Commands ( commandHandler, ) where import Control.Monad import System.Exit (exitSuccess) import Text.Read (readMaybe) import XMonad import XMonad.Actions.CopyWindow (copy, kill1) import XMonad.Actions.DynamicWorkspaces (addHiddenWorkspace, removeEmptyWorkspaceAfte...
b2f8e333771ca535a18f2da115106988b621ead81b49b2cc3198c325a67066c0
ngorogiannis/cyclist
ord_constraints.mli
(** A structure representing a set of constraints on ordinal-valued variables. The structure may be queried to test whether the constraint set entails particular relationships between pairs of ordinal variables. *) open Lib module Elt : sig include BasicType val tags : t -> Tags.t val subst_tags : ...
null
https://raw.githubusercontent.com/ngorogiannis/cyclist/c93a168d586b308ab2a2c730cd1b2375ab263167/src/generic/ord_constraints.mli
ocaml
* A structure representing a set of constraints on ordinal-valued variables. The structure may be queried to test whether the constraint set entails particular relationships between pairs of ordinal variables. * Return a set of pairs representing the identity function over the tags in the constraint set, ...
open Lib module Elt : sig include BasicType val tags : t -> Tags.t val subst_tags : Tagpairs.t -> t -> t val satisfiable : t Fun.predicate val valid : t Fun.predicate val unify : ?update_check:Tagpairs.t Unification.state_update Fun.predicate -> (Tagpairs.t, 'a, t) Unification.cps_unifie...
a5b313f6b60668a8fef1af9927b2b0245998ce88190266ba68e8a0a57a7e290c
sibylfs/sibylfs_src
fs_test.ml
(****************************************************************************) Copyright ( c ) 2013 , 2014 , 2015 , , , , ( as part of the SibylFS project ) (* *) (* Permission to use, copy, modify, and/or d...
null
https://raw.githubusercontent.com/sibylfs/sibylfs_src/30675bc3b91e73f7133d0c30f18857bb1f4df8fa/fs_test/fs_test.ml
ocaml
************************************************************************** Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright no...
Copyright ( c ) 2013 , 2014 , 2015 , , , , ( as part of the SibylFS project ) THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL PROFITS , WHETHER IN AN ACTION OF CONTRACT , NEGLIGENCE OR OTHER TORTIOUS ACTION , ARISING OUT OF OR IN CONNE...
c5a4ce172346d895f8b82844ede71994c198649123bafde40b81a7ef3106e66f
dmoverton/finite-domain
FD.hs
# LANGUAGE TemplateHaskell # module FD ( -- Types Monad for finite domain constraint solver Constraint FDVar, -- Finite domain solver variable FDExpr, -- Constraint expression Functions on FDVars runFD, -- Run the monad and return a list of solutions. Create a new FDVar Cr...
null
https://raw.githubusercontent.com/dmoverton/finite-domain/ae4afe755c1c1880d1283b9fdae90c1dc4a03f10/src/FD.hs
haskell
Types Finite domain solver variable Constraint expression Run the monad and return a list of solutions. Backtracking search for all solutions Functions on FDExprs Look up the current domain of a variable. Update the domain of a variable and fire all delayed constraints associated with that variable. Add a new...
# LANGUAGE TemplateHaskell # module FD ( Monad for finite domain constraint solver Constraint Functions on FDVars Create a new FDVar Create multiple FDVars Constrain a to a specific value Constrain two FDVars to be the same Constrain two FDVars to be different Constrain a list of FDVars to be differ...
dbc99b5952f944be513b5ce729ed07a573fec960b163cba22b2ece97ede1ec53
GracielaUSB/graciela
State.hs
{-# LANGUAGE NamedFieldPuns #-} # LANGUAGE OverloadedLists # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Language.Graciela.Parser.State ( State (..) , CurrentRoutine (..) , CurrentFunc , CurrentProc , errors , symbolTable , filesToRead , definitions , currentProc ...
null
https://raw.githubusercontent.com/GracielaUSB/graciela/db69c8b225d6172aaa0ff90a67f4a997e4d8a0c6/src/Haskell/Language/Graciela/Parser/State.hs
haskell
# LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------
# LANGUAGE OverloadedLists # # LANGUAGE TemplateHaskell # module Language.Graciela.Parser.State ( State (..) , CurrentRoutine (..) , CurrentFunc , CurrentProc , errors , symbolTable , filesToRead , definitions , currentProc , currentFunc , currentStruct , typeVars , existsDT , dataTyp...
6360dd0260eb1e953065b1cc2b57d7af762d2cae129a10f538bdf3bb9a22003e
NalaGinrut/artanis
handshake.scm
-*- indent - tabs - mode : nil ; coding : utf-8 -*- ;; Copyright (C) 2017,2018 " Mu Lei " known as " NalaGinrut " < > Artanis is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License and GNU Lesser General Public License published by the Free S...
null
https://raw.githubusercontent.com/NalaGinrut/artanis/3412d6eb5b46fde71b0965598ba085bacc2a6c12/artanis/websocket/handshake.scm
scheme
coding : utf-8 -*- Copyright (C) 2017,2018 any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License and GNU Lesser General Public License for more details. and GNU Lesser General Public Licen...
" Mu Lei " known as " NalaGinrut " < > Artanis is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License and GNU Lesser General Public License published by the Free Software Foundation , either version 3 of the License , or ( at your option ) A...
721416580d18b2f4a9b0e728c0f515a1414594d30e30e3ffe01d5265b7adf36e
dongcarl/guix
dunst.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2015 , 2017 , 2018 < > Copyright © 2018 < > Copyright © 2019 < > Copyright © 2020 < > Copyright © 2021 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under...
null
https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/dunst.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2015 , 2017 , 2018 < > Copyright © 2018 < > Copyright © 2019 < > Copyright © 2020 < > Copyright © 2021 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see <...
6a79e5623321b1d1485ea77b8d7fbefada243c89c1d931ce143dc22df061e436
jacius/lispbuilder
package.lisp
;;;; lispbuilder-sdl-ttf-binaries (in-package #:cl-user) (defpackage #:lispbuilder-sdl-ttf-binaries (:use #:cl) (:nicknames #:sdl-ttf-bin) (:documentation "The main package of `lispbuilder-sdl-ttf'.") (:export ;; globals.lisp #:*dll-path*))
null
https://raw.githubusercontent.com/jacius/lispbuilder/e693651b95f6818e3cab70f0074af9f9511584c3/lispbuilder-sdl-ttf/bin/package.lisp
lisp
lispbuilder-sdl-ttf-binaries globals.lisp
(in-package #:cl-user) (defpackage #:lispbuilder-sdl-ttf-binaries (:use #:cl) (:nicknames #:sdl-ttf-bin) (:documentation "The main package of `lispbuilder-sdl-ttf'.") (:export #:*dll-path*))
d4359506f4fdd8b5384f0196e80937eec60ce6947a71f4fbe1f89694d3780a84
0install/0install
feed_cache.mli
Copyright ( C ) 2013 , the README file for details , or visit . * See the README file for details, or visit . *) (** Caching downloaded feeds on disk *) open General open Support open Support.Common type interface_config = { stability_policy : Stability.t option; (* Overrides config.help_with_tes...
null
https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/zeroinstall/feed_cache.mli
ocaml
* Caching downloaded feeds on disk Overrides config.help_with_testing if set * Load a cached feed. * As a convenience, this will also load local feeds. * Check whether feed [url] is stale. * Returns false if it's stale but last-check-attempt is recent * Low-level part of [is_stale] that doesn't automatically loa...
Copyright ( C ) 2013 , the README file for details , or visit . * See the README file for details, or visit . *) open General open Support open Support.Common type interface_config = { Feeds added manually with " 0install add - feed " } val get_cached_feed : config -> [< Feed_url.non_distro_feed] -> ...
8f400bf4aa7f7980917faef6d41dd377ea2be62ff0b241ada2e4ac581e24c864
lucasdicioccio/zmcat
Zmcat.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import System.Exit (exitFailure) import System.IO import System.Environment (getArgs) import qualified Data.ByteString.Char8 as C import Network.Zmcat main :: IO () main = do args <- getArgs case args of ["pub", uri, k] -> pub uri k ["sub", uri, k]  -> s...
null
https://raw.githubusercontent.com/lucasdicioccio/zmcat/18cff04dd7524cc9ef147b9ea86e34a93ff151e7/bin/Zmcat.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import System.Exit (exitFailure) import System.IO import System.Environment (getArgs) import qualified Data.ByteString.Char8 as C import Network.Zmcat main :: IO () main = do args <- getArgs case args of ["pub", uri, k] -> pub uri k ["sub", uri, k]  -> sub uri $ C.pack k ["pub", uri] -...
83ea91b13da4c5a4b5d8aa34601247e1a33b1ea9f7e967ce77563d8f854fa0ef
ekmett/category-extras
Composition.hs
# OPTIONS_GHC -cpp ------------------------------------------------------------------------------------------- -- | -- Module : Control.Functor.Composition Copyright : 2008 -- License : BSD -- Maintainer : < > -- Stability : experimental -- Portability : non-portable (class-associated types) -- -- Gene...
null
https://raw.githubusercontent.com/ekmett/category-extras/f0f3ca38a3dfcb49d39aa2bb5b31b719f2a5b1ae/Control/Functor/Composition.hs
haskell
----------------------------------------------------------------------------------------- | Module : Control.Functor.Composition License : BSD Stability : experimental Portability : non-portable (class-associated types) Generalized functor composition. Since we have many reasons for which you might want to com...
# OPTIONS_GHC -cpp Copyright : 2008 Maintainer : < > module Control.Functor.Composition ( CompF(..) , Composition(..) , associateComposition , coassociateComposition , (:.:) , preTransform , postTransform , Comp , (:++:) , (:**:) , liftComp ) where import Control.Functor import Control.Fu...
df7850ba12b49e2e8c0700fbb29cb8dbac8333dc340497b2f07bddb0bc9e8faf
workframers/catchpocket
core.clj
(ns catchpocket.test.core (:require [clojure.test :refer :all] [catchpocket.test-util :as tu] [clojure.tools.logging :as log] [datomic.api :as d])) (use-fixtures :once tu/once) (deftest test-music-generation (let [schema (tu/generate-schema :music)] (is (some? (:catchpocket...
null
https://raw.githubusercontent.com/workframers/catchpocket/cf7c4244e7e2547a2408fe08f5d26e7f0d589dba/test/catchpocket/test/core.clj
clojure
(ns catchpocket.test.core (:require [clojure.test :refer :all] [catchpocket.test-util :as tu] [clojure.tools.logging :as log] [datomic.api :as d])) (use-fixtures :once tu/once) (deftest test-music-generation (let [schema (tu/generate-schema :music)] (is (some? (:catchpocket...
7f5efe0ff79d53f1e1c5b867220371a177d9f3dc4d860221af195f0c7ad84a6a
4clojure/4clojure
version.clj
(ns foreclojure.version (:use [foreclojure.template :only [def-page]] [foreclojure.config :only [repo-url]] [foreclojure.git :only [sha tag]] [compojure.core :only [defroutes GET]])) (def-page version [] {:title "About/version" :content (if tag [:p [:a {:href (...
null
https://raw.githubusercontent.com/4clojure/4clojure/25dec057d9d6871ce52aee9e2c3de7efdab14373/src/foreclojure/version.clj
clojure
(ns foreclojure.version (:use [foreclojure.template :only [def-page]] [foreclojure.config :only [repo-url]] [foreclojure.git :only [sha tag]] [compojure.core :only [defroutes GET]])) (def-page version [] {:title "About/version" :content (if tag [:p [:a {:href (...
7bbcb0efdac7f1c86ec9ffd60907f7a0da84f74ff785de1b8749bb4fe10b0e2e
input-output-hk/cardano-wallet
TxMeta.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # -- | Copyright : © 2018 - 2020 IOHK -- License: Apache-2.0 -- This module provides the ` TxMeta ` data types used b...
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet/80756f919d7811219e23632bbe59214e0f5e25f5/lib/wallet/src/Cardano/Wallet/Primitive/Types/Tx/TxMeta.hs
haskell
| License: Apache-2.0 | Additional information about a transaction, derived from the transaction application-specific data included with the transaction. ^ Amount seen from the perspective of the wallet. Refers either to a spent value for outgoing transaction, or a received value on incoming transaction. ^ T...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # Copyright : © 2018 - 2020 IOHK This module provides the ` TxMeta ` data types used by the wallet . module Cardano.W...
a096aba7aef67093e1e332192b68140228dd7cf4651ad5da9d88e6464b813ca4
ultralisp/ultralisp
check.lisp
(uiop:define-package #:ultralisp/models/check (:use #:cl) (:import-from #:ultralisp/models/project #:project-sources #:get-name #:project #:project2) (:import-from #:ultralisp/models/source) (:import-from #:cl-dbi) (:import-from #:log) (:import...
null
https://raw.githubusercontent.com/ultralisp/ultralisp/37bd5d92b2cf751cd03ced69bac785bf4bcb6c15/src/models/check.lisp
lisp
#:make-added-project-check #:make-via-webhook-check #:make-via-cron-check Unless check was processed we can't know the result: TODO: remove, replaced withh pending-checks (upgrade-types (select-dao 'base-check (includes 'project) (left-join 'project :on (:= 'check.project_id ...
(uiop:define-package #:ultralisp/models/check (:use #:cl) (:import-from #:ultralisp/models/project #:project-sources #:get-name #:project #:project2) (:import-from #:ultralisp/models/source) (:import-from #:cl-dbi) (:import-from #:log) (:import...
7c619f02ea3a0e889f107be958cf5eab9a7bff6219ce8d418e25017fce9d8c05
klarna/snabbkaffe
causality_tests.erl
-module(causality_tests). -include_lib("eunit/include/eunit.hrl"). -include_lib("snabbkaffe.hrl"). %% Strict Pairs No Guards -define(SPNG(Trace), ?find_pairs( true , #{foo := _A}, #{bar := _A} , Trace )). %% Fuzzy Pairs No Guards -define(FPNG(Trace), ...
null
https://raw.githubusercontent.com/klarna/snabbkaffe/2bdf6e842c825ca935b34884528f51158dd31e6e/test/causality_tests.erl
erlang
Strict Pairs No Guards Fuzzy Pairs No Guards Strict Pairs With Guard Test that match specs in ?find_pairs capture variables from the context:
-module(causality_tests). -include_lib("eunit/include/eunit.hrl"). -include_lib("snabbkaffe.hrl"). -define(SPNG(Trace), ?find_pairs( true , #{foo := _A}, #{bar := _A} , Trace )). -define(FPNG(Trace), ?find_pairs( false , #{fo...
d67047c48bebbf0e9706bc09e81cc54766d82267540a782cc8d7075c21e745af
openmusic-project/openmusic
accords.lisp
;========================================================================= OpenMusic : Visual Programming Language for Music Composition ; Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France . ; This file is part of the OpenMusic environment sources ; OpenMusic is free software : you ...
null
https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/projects/harmonicproject/code/accords.lisp
lisp
========================================================================= (at your option) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ======...
OpenMusic : Visual Programming Language for Music Composition Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France . This file is part of the OpenMusic environment sources OpenMusic is free software : you can redistribute it and/or modify it under the terms of the GNU General Public ...
e5b9160201a65e0b9971ee204ad32a65acad84928ac0db36ced00a4eb7acddf4
Stylitics/corona
cmd.clj
(ns corona.cmd (:require [clojure.java.shell :refer [sh]] [me.raynes.fs :as fs])) (def ^:dynamic *solr-home* (System/getenv "SOLR_HOME")) FIXME : add windows variant : / solr.cmd (def bin-solr (str *solr-home* "/bin/solr")) (defn exec! [& commands] (:out (apply sh bin-solr (map name commands))...
null
https://raw.githubusercontent.com/Stylitics/corona/6fa8954d3c345c3f8067481db0555e8c41587248/src/corona/cmd.clj
clojure
(ns corona.cmd (:require [clojure.java.shell :refer [sh]] [me.raynes.fs :as fs])) (def ^:dynamic *solr-home* (System/getenv "SOLR_HOME")) FIXME : add windows variant : / solr.cmd (def bin-solr (str *solr-home* "/bin/solr")) (defn exec! [& commands] (:out (apply sh bin-solr (map name commands))...
e4f99f9d7106c2a5183b01713e156c5cdc3190de3cf52e989abb94530a7a23e9
juxt/apex
html.clj
Copyright © 2020 , JUXT LTD . (ns juxt.apex.alpha.html.html (:require [clojure.java.io :as io] [ring.util.codec :as codec] [clojure.string :as str])) (def handlebars-pattern #"\{\{([^\}]*)\}\}") (defn escape [s] (str/replace s #"([\<\>&\"\'])" (fn [[_ match]] (case match "<" "&lt;" ...
null
https://raw.githubusercontent.com/juxt/apex/cb4c0016d817ebb03d4f84e572ca71edd84ed79d/modules/html/src/juxt/apex/alpha/html/html.clj
clojure
")))) dynamic
Copyright © 2020 , JUXT LTD . (ns juxt.apex.alpha.html.html (:require [clojure.java.io :as io] [ring.util.codec :as codec] [clojure.string :as str])) (def handlebars-pattern #"\{\{([^\}]*)\}\}") (defn escape [s] (str/replace s #"([\<\>&\"\'])" (fn [[_ match]] (case match "<" "&lt;" ...
c05f7bb1350e807fceb073235d013cfcfc69aeff5058ca7138e1bba3480f2531
kiselgra/c-mera
c.for.00.lisp
(include <stdio.h>) (function main () -> int (for ((int i = 0) (< i 10) ++i)) (printf "should appear only once.\\n") (return 0)) ;;## should appear only once.
null
https://raw.githubusercontent.com/kiselgra/c-mera/d06ed96d50a40a3fefe188202c8c535d6784f392/tests/c.for.00.lisp
lisp
## should appear only once.
(include <stdio.h>) (function main () -> int (for ((int i = 0) (< i 10) ++i)) (printf "should appear only once.\\n") (return 0))
95451d619b6169c4c4ad9f66967ce008d7014a020bd2f8e40f11ca7894850629
mbattyani/cl-typesetting
boxes.lisp
cl - typesetting copyright 2002 - 2021 see license.txt for the details ;;; You can reach me at or ;;; The homepage of cl-typesetting is here: -typesetting.html (in-package #:typeset) (defclass box () ((dx :accessor dx :initform 0 :initarg :dx) (dy :accessor dy :initform 0 :initarg :dy) (baseline :access...
null
https://raw.githubusercontent.com/mbattyani/cl-typesetting/86eba981fc4254addebecf765578ec350d6e3b75/boxes.lisp
lisp
You can reach me at or The homepage of cl-typesetting is here: -typesetting.html non trimmable white space Values: box-fitted, box-left, dy-left Do nothing if has already been adjusted by v-split.
cl - typesetting copyright 2002 - 2021 see license.txt for the details (in-package #:typeset) (defclass box () ((dx :accessor dx :initform 0 :initarg :dx) (dy :accessor dy :initform 0 :initarg :dy) (baseline :accessor baseline :initform 0 :initarg :baseline) (offset :accessor offset :initform *offset* ...
638ccab442d218d692173d7de1c1045cb2e93dc34f32907d4cda5031630884b7
mzp/bs-lwt
pa_lwt_log.ml
Lightweight thread library for OCaml * * Module Pa_lwt_log * Copyright ( C ) 2009 * * 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 exceptions ; ...
null
https://raw.githubusercontent.com/mzp/bs-lwt/f37a3c47d038f4efcd65912c41fab95d1e6633ce/lwt/src/camlp4/pa_lwt_log.ml
ocaml
Lightweight thread library for OCaml * * Module Pa_lwt_log * Copyright ( C ) 2009 * * 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 exceptions ; ...
e9496d6a537fdc442b85637f6829cc8403b253312a8fd8d330945d7e49c865ad
bitonic/anapo
Component.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE CPP # -- | Note: we use 'Traversal' to keep a cursor to the -- write end of the state, but really we should use an -- "affine traversal" which guarantees we have either 0 or 1 positions to traverse . See -- </> -- for why affine traversals do not play well with lens. modu...
null
https://raw.githubusercontent.com/bitonic/anapo/8f3c020973d16cecb5ee83a03d91fb00294d34c7/anapo/src/Anapo/Component.hs
haskell
# LANGUAGE OverloadedStrings # | Note: we use 'Traversal' to keep a cursor to the write end of the state, but really we should use an "affine traversal" which guarantees we have either 0 </> for why affine traversals do not play well with lens. * affine traversals * Register / handler * AnapoM * Component * b...
# LANGUAGE CPP # or 1 positions to traverse . See module Anapo.Component ( Rerender(..) , AffineTraversal , AffineTraversal' , AffineFold , toMaybeOf , RegisterThread , HandleException , forkRegistered , Action , DispatchM(..) , DispatchM' , dispatch , dispatchRerender , actFork , actZ...
17e764212afbf566feaef12c7f6be0dace51e639f5da27d87f60e047df933917
zwizwa/rai
test-delay.rkt
#lang racket/base (require rai/tools rai/stream-syntax rai/ai-array rai/ai-array-c (for-syntax racket/base)) (module test rai/stream (require rai/stream-lib rai/stream-meta) (provide (all-defined-out)) (define (test-delay (dl) (x)) (let ((sum (+ x ...
null
https://raw.githubusercontent.com/zwizwa/rai/6bcacb7da4172971816027fd88a0209adbd60e30/test/test-delay.rkt
racket
while dl-read is generic, dl-ref is shoe-horned into a functional semantics. the ai-array language only implements in-place update. (test test-delay2) (test test-svec) (test test-var-delay) (test bar) (test test-df) FIXME: delay and loop don't mix (test test-delay-map)
#lang racket/base (require rai/tools rai/stream-syntax rai/ai-array rai/ai-array-c (for-syntax racket/base)) (module test rai/stream (require rai/stream-lib rai/stream-meta) (provide (all-defined-out)) (define (test-delay (dl) (x)) (let ((sum (+ x ...
d57b67e0aca4d1496a060e3692ce8472a2729f4229a7acbdc42f703d84e34a47
synduce/Synduce
largest_even_pos_v2.ml
let base_case a = 0 = (a % 2) ? a : 0 let f0 b = b > b ? b : 0 let f1 c x = (c > 0) && (0 = (c % 2)) ? max c x : x let rec amax = function Elt(x) -> base_case x | Cons(hd, tl) -> hd ≤ 0 ? f0 hd : f1 hd (lpen tl)
null
https://raw.githubusercontent.com/synduce/Synduce/289888afb1c312adfd631ce8d90df2134de827b8/extras/solutions/constraints/sortedlist/largest_even_pos_v2.ml
ocaml
let base_case a = 0 = (a % 2) ? a : 0 let f0 b = b > b ? b : 0 let f1 c x = (c > 0) && (0 = (c % 2)) ? max c x : x let rec amax = function Elt(x) -> base_case x | Cons(hd, tl) -> hd ≤ 0 ? f0 hd : f1 hd (lpen tl)
facf25dd9885376511f64fc848fd40cb8fc79bf1c7a1884153022bb45b8c456a
static-analysis-engineering/codehawk
bCHDwarfUtils.mli
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer ------------------------------------------------------------------------------ The MIT License ( MIT ) Copyrig...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/e8fed9f226abe38578768968279c8242eb21fea9/CodeHawk/CHB/bchlibelf/bCHDwarfUtils.mli
ocaml
bchlibelf
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer ------------------------------------------------------------------------------ The MIT License ( MIT ) Copyrig...
0da5c4469e84014715751eb129799c6a87daaa56d25a323e844b341699de5fa2
racket/plot
leftover-contracts.rkt
#lang racket/base (require racket/contract "axis-transform.rkt" "sample.rkt" "math.rkt" "ticks.rkt") (provide (all-defined-out)) (define axis-transform/c (real? real? invertible-function? . -> . invertible-function?)) (define ticks-layout/c (real? real? . -> . (listof pre-tick?))...
null
https://raw.githubusercontent.com/racket/plot/c4126001f2c609e36c3aa12f300e9c673ab1a806/plot-lib/plot/private/common/leftover-contracts.rkt
racket
#lang racket/base (require racket/contract "axis-transform.rkt" "sample.rkt" "math.rkt" "ticks.rkt") (provide (all-defined-out)) (define axis-transform/c (real? real? invertible-function? . -> . invertible-function?)) (define ticks-layout/c (real? real? . -> . (listof pre-tick?))...
0b10a7fb92403a4b600e9cce270da1078c833b95e81855ccdbef430e6be60e3e
mirage/mirage-entropy
entropy.ml
* Copyright ( c ) 2014 * Copyright ( c ) 2014 Anil Madhavapeddy < > * Copyright ( c ) 2014 - 2016 Meršinjak * Copyright ( c ) 2015 Citrix Systems Inc * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that ...
null
https://raw.githubusercontent.com/mirage/mirage-entropy/8d4c9ed42dbea225b306af082acd8e15464287ba/lib/entropy.ml
ocaml
Note: * `bootstrap` is not a simple feedback loop. It attempts to exploit CPU-level * data races that lead to execution-time variability of identical instructions. * See Whirlwind RNG: * -security.org/TC/SP2014/papers/Not-So-RandomNumbersinVirtualizedLinuxandtheWhirlwindRNG.pdf
* Copyright ( c ) 2014 * Copyright ( c ) 2014 Anil Madhavapeddy < > * Copyright ( c ) 2014 - 2016 Meršinjak * Copyright ( c ) 2015 Citrix Systems Inc * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that ...
9f23753549bbc0566c8e482ee35094c8f92335c19b523df32165ea18182a5799
input-output-hk/cardano-sl
Example.hs
module Test.Pos.Chain.Genesis.Example ( exampleGenesisAvvmBalances0 , exampleGenesisAvvmBalances1 , exampleGenesisAvvmBalances2 , exampleStaticConfig_GCSpec0 , exampleStaticConfig_GCSpec1 , exampleStaticConfig_GCSpec2 , exampleStaticConfig_GCSrc , exampleGenesisDa...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/chain/test/Test/Pos/Chain/Genesis/Example.hs
haskell
module Test.Pos.Chain.Genesis.Example ( exampleGenesisAvvmBalances0 , exampleGenesisAvvmBalances1 , exampleGenesisAvvmBalances2 , exampleStaticConfig_GCSpec0 , exampleStaticConfig_GCSpec1 , exampleStaticConfig_GCSpec2 , exampleStaticConfig_GCSrc , exampleGenesisDa...
a5249e37523253ab2d88d0b2e271fb7ea7e23919c26c2d82f39ff8ece302cd7a
komamitsu/oraft
oraft.mli
type leader_node = { host : string; port : int } type current_state = { mode : Base.mode; term : int; leader : leader_node option; } type t = { conf : Conf.t; process : unit Lwt.t; post_command : string -> bool Lwt.t; current_state : unit -> current_state; } val start : conf_file:string -> apply_log:Ba...
null
https://raw.githubusercontent.com/komamitsu/oraft/fb84c275645658821ae79e36b2ef8a35f54d80b0/lib/oraft.mli
ocaml
type leader_node = { host : string; port : int } type current_state = { mode : Base.mode; term : int; leader : leader_node option; } type t = { conf : Conf.t; process : unit Lwt.t; post_command : string -> bool Lwt.t; current_state : unit -> current_state; } val start : conf_file:string -> apply_log:Ba...
7ee5b7ca5cb343a21aa6f049fcd51c9ed44668b95cc048fc55c104576124ddc9
pva701/Haskell-Practices
Task5.hs
module Task5 ( unsafeInterleaveIO , unIO ) where import Prelude hiding (IO) data State s data RealWorld newtype IO a = IO {unIO :: State RealWorld -> (State RealWorld, a)} unsafeInterleaveIO :: IO a -> IO a unsafeInterleaveIO (IO m) = IO $ \s -> let r = case m s of (_, res) -> res in (s, r)
null
https://raw.githubusercontent.com/pva701/Haskell-Practices/71b9241cf92c757fa793fd0c0c053af77e68205d/lecture6-practice/src/Task5.hs
haskell
module Task5 ( unsafeInterleaveIO , unIO ) where import Prelude hiding (IO) data State s data RealWorld newtype IO a = IO {unIO :: State RealWorld -> (State RealWorld, a)} unsafeInterleaveIO :: IO a -> IO a unsafeInterleaveIO (IO m) = IO $ \s -> let r = case m s of (_, res) -> res in (s, r)
9d52cbaf6466cc9ecc7f65105bd874a8ad39e8e736b08a38c55f36b7bd3afaf4
simmone/racket-simple-qr
append-remainder.rkt
#lang racket (require "../../../../share/func.rkt") (provide (contract-out [write-report-append-remainder (-> natural? natural? string? path-string? void?)] )) (define (write-report-append-remainder s18_length remainder_bits_width data_bits express_path) (let* ([scrbl_dir (build-path express_pa...
null
https://raw.githubusercontent.com/simmone/racket-simple-qr/904f1491bc521badeafeabd0d7d7e97e3d0ee958/simple-qr/write/lib/express/append-remainder/append-remainder.rkt
racket
#lang racket (require "../../../../share/func.rkt") (provide (contract-out [write-report-append-remainder (-> natural? natural? string? path-string? void?)] )) (define (write-report-append-remainder s18_length remainder_bits_width data_bits express_path) (let* ([scrbl_dir (build-path express_pa...
958bfd9910bd8bd169350b4a2ba2c07e12fdc2f26109d9d53e430488a141b9b8
michiakig/LispInSmallPieces
chap10n.scm
$ I d : chap10n.scm , v 4.0 1995/07/10 ;;;(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) ;;; This file is part of the files that accompany the book: LISP Implantation Semantique Programmation ( InterEditions , France ) By Christian Queinnec < > ;;; Newest version may be retrie...
null
https://raw.githubusercontent.com/michiakig/LispInSmallPieces/0a2762d539a5f4c7488fffe95722790ac475c2ea/src/chap10n.scm
scheme
(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) This file is part of the files that accompany the book: Newest version may be retrieved from: Check the README file before using this file. (((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) Tests: this function redefin...
$ I d : chap10n.scm , v 4.0 1995/07/10 LISP Implantation Semantique Programmation ( InterEditions , France ) By Christian Queinnec < > ( IP 128.93.2.54 ) ftp.inria.fr : INRIA / Projects / icsla / Books / LiSP*.tar.gz (define (compile->C e out) (set! g.current '()) (let* ((ee (letify (Sexp->obj...
2266ce94d94694d34e4afb18350804e0ba843f570740d3c6337c54d808c4dbbb
yrashk/erlang
ssh_sftpd.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2005 - 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/ssh/src/ssh_sftpd.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 2005 - 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 " -module(ssh_sftpd). -behaviour(ssh_chan...
591d341d76272d217a5f11825f4118118f31d94edca32413ce138734a5d7dc95
metaocaml/ber-metaocaml
main.ml
(* TEST modules = "syntax.ml gram_aux.ml grammar.mly scan_aux.ml scanner.mll \ lexgen.ml output.ml" files = "input" arguments = "input" ocamllex_flags = " -q " ocamlyacc_flags = " -q " flags = " -w a " *) (* The lexer generator. Command-line parsing. *) open Syntax open Scanner open Gr...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/tool-lexyacc/main.ml
ocaml
TEST modules = "syntax.ml gram_aux.ml grammar.mly scan_aux.ml scanner.mll \ lexgen.ml output.ml" files = "input" arguments = "input" ocamllex_flags = " -q " ocamlyacc_flags = " -q " flags = " -w a " The lexer generator. Command-line parsing.
open Syntax open Scanner open Grammar open Lexgen open Output let main () = if Array.length Sys.argv <> 2 then begin prerr_string "Usage: camllex <input file>\n"; exit 2 end; let source_name = Sys.argv.(1) in let dest_name = if Filename.check_suffix source_name ".mll" then Filename.chop_suf...
6e8c25f62b4347fea797331fd2677003b67745f92c6340d6c33b5ed6bbd9b589
RolfRolles/PandemicML
CFGDemo-WithDebug.ml
let show_x86_cfg cfg title = let open X86CFG.X86CFGBuilder.C in let open IDAGraph in let open X86 in let rup i = (i * 3) / 2 in let n = rup (G.nb_vertex cfg) in let i2vmap = Hashtbl.create n in let v2imap = Hashtbl.create n in let _ = G.fold_vertex (fun v i -> Hashtbl.add i2vmap i v; Hashtbl.add v2ima...
null
https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/Projects/CFGDemo-WithDebug.ml
ocaml
let show_x86_cfg cfg title = let open X86CFG.X86CFGBuilder.C in let open IDAGraph in let open X86 in let rup i = (i * 3) / 2 in let n = rup (G.nb_vertex cfg) in let i2vmap = Hashtbl.create n in let v2imap = Hashtbl.create n in let _ = G.fold_vertex (fun v i -> Hashtbl.add i2vmap i v; Hashtbl.add v2ima...
dced7254d619f5d037297d7aa1170b546799093b07fe22e2d1b2a55f19a2286e
facebook/pyre-check
startupNotificationTest.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/pyre-check/10c375bea52db5d10b71cb5206fac7da9549eb0c/source/server/test/startupNotificationTest.ml
ocaml
* 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...
7f85f5512b4cfcb3fe8f49abcfd38b1c5af9d4f70e12d7bbaa53f366e7f5a7a2
AlacrisIO/legicash-facts
court_registry.ml
open Legilogic_lib open Action type schema type data type any_digest type search_criterion type operation = | Publish of schema*data | Get_signature of schema*any_digest | Get_data of schema*any_digest | Subscribe of schema*search_criterion type registry_state type ('input, 'output) registry_action = ('i...
null
https://raw.githubusercontent.com/AlacrisIO/legicash-facts/5d3663bade68c09bed47b3f58fa12580f38fdb46/src/alacris_lib/court_registry.ml
ocaml
open Legilogic_lib open Action type schema type data type any_digest type search_criterion type operation = | Publish of schema*data | Get_signature of schema*any_digest | Get_data of schema*any_digest | Subscribe of schema*search_criterion type registry_state type ('input, 'output) registry_action = ('i...
5bcf37d32303f62b24e7f689ee8933fb560232807f20785ff4ae9925a23db6de
tadeuzagallo/verve-lang
Registry.hs
module Lib.Registry ( registry , isType , isValue , isCtor , isInternal , name , decl , impl ) where import Typing.Types hiding (list) import Interpreter.Builtin import Interpreter.Value import qualified Typing.Types as Types (list) import Control.Monad.Writer (Writer, execWriter, tell) data Ent...
null
https://raw.githubusercontent.com/tadeuzagallo/verve-lang/43850b76e7301c1faa45b73a758e39ce97af19ff/src/Lib/Registry.hs
haskell
REGISTRY Float String FILTERS TRANSFORMERS Helpers for better syntax for expressing types
module Lib.Registry ( registry , isType , isValue , isCtor , isInternal , name , decl , impl ) where import Typing.Types hiding (list) import Interpreter.Builtin import Interpreter.Value import qualified Typing.Types as Types (list) import Control.Monad.Writer (Writer, execWriter, tell) data Ent...
ecff53108bfea4c0ec6cfb88b8b162ca45ace2ad5ef65dc885782f73553fdf05
LightTable/LightTable
dom.cljs
(ns lt.util.dom "Provide DOM related functions." (:refer-clojure :exclude [parents remove next val empty])) (defn lazy-nl-via-item "Return lazy seq of NodeList." ([nl] (lazy-nl-via-item nl 0)) ([nl n] (when (< n (. nl -length)) (lazy-seq (cons (. nl (item n)) (lazy...
null
https://raw.githubusercontent.com/LightTable/LightTable/3760844132a17fb0c9cf3f3b099905865aed7e3b/src/lt/util/dom.cljs
clojure
Assume there exists a div such as: <div class=\"tabsets\"> Assume there exists a div such as: Returns nil, but makes the change. => nil Assume there exists a div such as: => \"34px\" Returns nil, but makes the change. => nil Assume there exists a div such as: <div class=\"tabsets\"> Returns nil, but makes the ...
(ns lt.util.dom "Provide DOM related functions." (:refer-clojure :exclude [parents remove next val empty])) (defn lazy-nl-via-item "Return lazy seq of NodeList." ([nl] (lazy-nl-via-item nl 0)) ([nl n] (when (< n (. nl -length)) (lazy-seq (cons (. nl (item n)) (lazy...
5d674eaf900170e57920ce9f5f6699bdbc2e3e43ec17dd0b816e2aa8577d78d1
elastic/eui-cljs
last.cljs
(ns eui.last (:require ["@elastic/eui/lib/components/date_picker/super_date_picker/time_options.js" :as eui])) (def LAST eui/LAST) (def NEXT eui/NEXT) (def RenderI18nTimeOptions eui/RenderI18nTimeOptions) (def useI18nTimeOptions eui/useI18nTimeOptions)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/last.cljs
clojure
(ns eui.last (:require ["@elastic/eui/lib/components/date_picker/super_date_picker/time_options.js" :as eui])) (def LAST eui/LAST) (def NEXT eui/NEXT) (def RenderI18nTimeOptions eui/RenderI18nTimeOptions) (def useI18nTimeOptions eui/useI18nTimeOptions)
bc67cb7b3cf3fbe542bb11f82115d64d7b3e90c658c2618699e10d6ad5d2c03b
jwiegley/notes
CallStack.hs
module Main where import GHC.Stack myError :: HasCallStack => String -> a myError msg = let ((_, pos):_) = getCallStack (freezeCallStack callStack) in errorWithoutStackTrace $ srcLocFile pos ++ ":" ++ show (srcLocStartLine pos) ++ ": " ++ msg main :: IO () main = do myError "oops!"
null
https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/CallStack.hs
haskell
module Main where import GHC.Stack myError :: HasCallStack => String -> a myError msg = let ((_, pos):_) = getCallStack (freezeCallStack callStack) in errorWithoutStackTrace $ srcLocFile pos ++ ":" ++ show (srcLocStartLine pos) ++ ": " ++ msg main :: IO () main = do myError "oops!"
879db3a1e2604e423673ce5466bad806b37283c17d3bd482e526c409af470c67
CryptoKami/cryptokami-core
HDDiscovery.hs
| Functions which iterate over and search for -- addresses which correspond to specified HD passphrases. module Pos.Crypto.HDDiscovery ( discoverHDAddress , discoverHDAddresses ) where import Universum import Data.Conduit (mapOutput, runConduitRes, (.|)) import qualified D...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/lib/src/Pos/Crypto/HDDiscovery.hs
haskell
addresses which correspond to specified HD passphrases.
| Functions which iterate over and search for module Pos.Crypto.HDDiscovery ( discoverHDAddress , discoverHDAddresses ) where import Universum import Data.Conduit (mapOutput, runConduitRes, (.|)) import qualified Data.Conduit.List as CL import Pos.Core (AddrAttr...
5de706f9314ba1446d65f28763d4076d25be8033decc5e65dc49a628f102f43e
nikita-volkov/rebase
Bitraversable.hs
module Rebase.Data.Semigroup.Bitraversable ( module Data.Semigroup.Bitraversable ) where import Data.Semigroup.Bitraversable
null
https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Data/Semigroup/Bitraversable.hs
haskell
module Rebase.Data.Semigroup.Bitraversable ( module Data.Semigroup.Bitraversable ) where import Data.Semigroup.Bitraversable
5e1bdb0617178e206d62ee3bb48f882feafd2141b65762d6016ad9723bd29d9d
ndmitchell/hlint
Naming.hs
# LANGUAGE ViewPatterns # # LANGUAGE FlexibleContexts # Suggest the use of camelCase Only permit : _ * [ A - Za - z ] * _ * # * ' * Apply this to things that would get exported by default only Also allow prop _ as it 's a standard QuickCheck idiom Also allow case _ as it 's a stand...
null
https://raw.githubusercontent.com/ndmitchell/hlint/b5b5ec13360232db2c987245ec53d6fb9722cf86/src/Hint/Naming.hs
haskell
data Yes = Bar | TestBar yesFoo = ... yesFooPattern Nothing = ... data Yes = FOO_A | FooB castFoo = ... data Yes = Bar | TestBar yesFoo = ... yesFooPattern Nothing = ... data Yes = FOO_A | FooB castFoo = ... -refact/issues/39
# LANGUAGE ViewPatterns # # LANGUAGE FlexibleContexts # Suggest the use of camelCase Only permit : _ * [ A - Za - z ] * _ * # * ' * Apply this to things that would get exported by default only Also allow prop _ as it 's a standard QuickCheck idiom Also allow case _ as it 's a stand...
7f08f141b8dda1f6d8faf6d04c1e7f30f8e0f3048aa5ed581a367da98391a69e
MaartenFaddegon/Hoed
Utils.hs
module Utils where import qualified Data.Map as Map import Data.Map(Map) foldlWithKeyM :: Monad m => (a -> k -> b -> m a) -> a -> Map k b -> m a foldlWithKeyM f acc = Map.foldlWithKey f' (return acc) where f' ma k b = ma >>= \a -> f a k b
null
https://raw.githubusercontent.com/MaartenFaddegon/Hoed/8769d69e309928aab439b22bc3f3dbf5452acc77/examples/ZLang/1/Utils.hs
haskell
module Utils where import qualified Data.Map as Map import Data.Map(Map) foldlWithKeyM :: Monad m => (a -> k -> b -> m a) -> a -> Map k b -> m a foldlWithKeyM f acc = Map.foldlWithKey f' (return acc) where f' ma k b = ma >>= \a -> f a k b
b37a715c73fc2c9573a050ae3d296edafdc5ab42ce27bc39ab6eee963d8580ee
li-clutter-org/http2-test
Settings.hs
# LANGUAGE StandaloneDeriving , FlexibleInstances , MultiParamTypeClasses , FunctionalDependencies # module Rede.SpdyProtocol.Framing.Settings ( getSettingsFrame ,getDefaultWindowSize ,SettingsFrame(..) ,SettingsValidFlags(..) ,SettingsSettingsId(..) ,SettingItem ,PersistSettings(..) ...
null
https://raw.githubusercontent.com/li-clutter-org/http2-test/38d6706511f93af875273f7702fa0ea8582d5d8e/hs-src/Rede/SpdyProtocol/Framing/Settings.hs
haskell
Create a different prologue with a correct size, since we are not sure this one is... settingsFrame :: Int -> Int -> SettingsFrame SettingsFrame
# LANGUAGE StandaloneDeriving , FlexibleInstances , MultiParamTypeClasses , FunctionalDependencies # module Rede.SpdyProtocol.Framing.Settings ( getSettingsFrame ,getDefaultWindowSize ,SettingsFrame(..) ,SettingsValidFlags(..) ,SettingsSettingsId(..) ,SettingItem ,PersistSettings(..) ...
395bd184a61d3286957388a75b16ab869b2de5b65c97e90c0d2dc60c5b360f28
agda/agda
Tests.hs
module CubicalSucceed.Tests where import qualified Data.Text as T import Data.List (isInfixOf) import Data.Monoid ((<>)) import System.Exit import System.FilePath import Test.Tasty ( testGroup, TestTree ) import Test.Tasty.Silver ( printProcResult ) import Test.Tasty.Silver.Advanced ( GDiff...
null
https://raw.githubusercontent.com/agda/agda/e00667d04e7b0056bb3b4e3913aa5e804c8ea586/test/CubicalSucceed/Tests.hs
haskell
^ Agda file to test. We don't really have a golden file. Just use a dummy update function. TODO extend tasty-silver to handle this use case properly ignore - interfaces@ option for avoiding type-check the cubical library in every TODO: fail if unexpected warnings?
module CubicalSucceed.Tests where import qualified Data.Text as T import Data.List (isInfixOf) import Data.Monoid ((<>)) import System.Exit import System.FilePath import Test.Tasty ( testGroup, TestTree ) import Test.Tasty.Silver ( printProcResult ) import Test.Tasty.Silver.Advanced ( GDiff...
4ae8a52f0a90e4985b071d674cc8d32a738981262fc1ee11cb1d555055358045
akabe/ppx_bigarray
ppx_bigarray_runtime.ml
ppx_bigarray --- A PPX extension for providing big array literals in OCaml Copyright ( C ) 2015 This software is distributed under MIT License See LICENSE.txt for details . Copyright (C) 2015 Akinori ABE This software is distributed under MIT License See LICENSE.txt for details. *) * This...
null
https://raw.githubusercontent.com/akabe/ppx_bigarray/c77a5a786a781a6780e78320684a65a88c897a33/src/ppx_bigarray_runtime.ml
ocaml
ppx_bigarray --- A PPX extension for providing big array literals in OCaml Copyright ( C ) 2015 This software is distributed under MIT License See LICENSE.txt for details . Copyright (C) 2015 Akinori ABE This software is distributed under MIT License See LICENSE.txt for details. *) * This...
1cb7b81e61a22d8ccb9a3691cce160a94b581116c0a80419f0bc1f8b26bc72b5
degree9/enterprise
auth_test.cljc
(ns degree9.auth-test (:require jwt.examples degree9.auth meta.client degree9.client meta.promise goog.object [javelin.core :as j] [cljs.test :refer-macros [deftest is async]])) ; TESTS #?(:browser (do (defn ??passes-validation [done jwt payload] (prn jwt payload) (-> (degree9.a...
null
https://raw.githubusercontent.com/degree9/enterprise/36e4f242c18b1dde54d5a15c668b17dc800c01ff/src/degree9/auth_test.cljc
clojure
TESTS VALID JWTS #?(:browser (deftest ??verify-jwt--valid (async done (??passes-validation done jwt.examples/jwt-valid jwt.examples/jwt-valid-payload)))) #?(:browser (deftest ??verify-jwt--invalid-signature (async done (??passes-validation done jwt.ex...
(ns degree9.auth-test (:require jwt.examples degree9.auth meta.client degree9.client meta.promise goog.object [javelin.core :as j] [cljs.test :refer-macros [deftest is async]])) #?(:browser (do (defn ??passes-validation [done jwt payload] (prn jwt payload) (-> (degree9.auth/veri...
3ef8e24015361c4a0e14873d60f8faa7a42e78b5e8bdc82ac084c6a7f0ff3944
keithfancher/kept
ParseSpec.hs
module ParseSpec (spec) where import Data.Either (isLeft) import Data.Text qualified as T import Note (ChecklistItem (..), Metadata (..), Note (..), NoteContent (..), mkTags) import Parse import Test.Hspec spec :: Spec spec = do describe "parseNote" $ do it "fails if given an empty string input" $ do pars...
null
https://raw.githubusercontent.com/keithfancher/kept/f7ff01ba1e7f71ca93b539440628788a9c770d5b/test/ParseSpec.hs
haskell
module ParseSpec (spec) where import Data.Either (isLeft) import Data.Text qualified as T import Note (ChecklistItem (..), Metadata (..), Note (..), NoteContent (..), mkTags) import Parse import Test.Hspec spec :: Spec spec = do describe "parseNote" $ do it "fails if given an empty string input" $ do pars...
b5607c329649b34e160afd89ff27c0fad45e86413d95b3499d0dabc4dec7d4ff
crclark/foundationdb-haskell
Internal.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # -- | This module is a relatively direct translation of the official directory layer code in Python and Go . module FoundationDB.Layer.Directory.Internal where import Control.Monad (unless, when) import Data.ByteString (ByteStrin...
null
https://raw.githubusercontent.com/crclark/foundationdb-haskell/c8c9527ffa02dd2d08c15e23b09dd982a0b2a0ec/src/FoundationDB/Layer/Directory/Internal.hs
haskell
# LANGUAGE OverloadedStrings # | This module is a relatively direct translation of the official directory | Represents a directory tree. A value of this type must be supplied to all functions in this module. | Subspace for directory metadata. | Subspace for directory content. | A path is a list of unicode strings...
# LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # layer code in Python and Go . module FoundationDB.Layer.Directory.Internal where import Control.Monad (unless, when) import Data.ByteString (ByteString) import qualified Data.ByteString as BS import Data.Foldable (forM_) import Data.Maybe (isJust) import Data.Seq...
5628488b323d2e5db9b0a13ba8fafde76dcd661d33835f32eb1fc9577914313f
stain/rdf-clj
commonsrdf.clj
(ns rdf.commonsrdf (:import (clojure.lang Seqable) (java.util ServiceLoader) (org.apache.commons.rdf.api Graph IRI Triple RDF RDFTerm Literal BlankNode) (org.apache.commons.rdf.simple SimpleRDF)) (:require [rdf.utils :refer [if-instance]] [rdf.protocols :as p])) (defn- key-for-rdf-impl [rdf...
null
https://raw.githubusercontent.com/stain/rdf-clj/3fc767af3c561cf85b661c27b8d014d395190519/src/rdf/commonsrdf.clj
clojure
Last part of implementation class package name, e.g. return as-is return as-is coerce to a Commons RDF instance Return same instance must be type must be non-nil lang TODO: Type conversion Odd case - a non-IRI non-Literal non-BlankNode RDFTerm. Not much we can support then..
(ns rdf.commonsrdf (:import (clojure.lang Seqable) (java.util ServiceLoader) (org.apache.commons.rdf.api Graph IRI Triple RDF RDFTerm Literal BlankNode) (org.apache.commons.rdf.simple SimpleRDF)) (:require [rdf.utils :refer [if-instance]] [rdf.protocols :as p])) (defn- key-for-rdf-impl [rdf...
403671e2a9a8bd5f9b7b234d487f9744f1c3bbb4068ed1287981a447317dec70
jbracker/supermonad
Scanner.hs
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * H M T C * * ...
null
https://raw.githubusercontent.com/jbracker/supermonad/2595396a225a65b1dce6ed9a1ce59960f392a55b/examples/monad/hmtc/original/Scanner.hs
haskell
The parser uses the function "scanner". Both the scanner and parser monadic, making use of the parse monad P. They work in a tightly interleaved fashion, with the parser passing control to the scanner when it needs a new token, and the scanner passing control back to the parser when a token has successfully been r...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * H M T C * * ...
9ec698ae158c1556f8d043bbcd2e7aa62085ee0619df97167c2d5cd3c65754c0
bioclojure/bio.ensembl
core_test.clj
(ns org.bioclojure.bio.ensembl.core-test (:require [clojure.test :refer :all] [org.bioclojure.bio.ensembl.core :as ens])) (deftest human-exon-test (testing "Retrieve exon coordinates from human Ensembl database." (ens/with-registry (ens/registry :ensembldb) (let [species "human" g...
null
https://raw.githubusercontent.com/bioclojure/bio.ensembl/b178ab5dc11b6bee4300feb36fec87dd28397d0f/test/org/bioclojure/bio/ensembl/core_test.clj
clojure
(ns org.bioclojure.bio.ensembl.core-test (:require [clojure.test :refer :all] [org.bioclojure.bio.ensembl.core :as ens])) (deftest human-exon-test (testing "Retrieve exon coordinates from human Ensembl database." (ens/with-registry (ens/registry :ensembldb) (let [species "human" g...
e9f559dbfa3ebbe407255bfd2ed1ac22d585f56b8593a1ff0007b2cfb6d74270
binaryage/chromex
autotest_private.cljs
(ns chromex.ext.autotest-private (:require-macros [chromex.ext.autotest-private :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn initialize-events* [config] (gen-wrap :function ::ini...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts_private/chromex/ext/autotest_private.cljs
clojure
-- events -----------------------------------------------------------------------------------------------------------------
(ns chromex.ext.autotest-private (:require-macros [chromex.ext.autotest-private :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn initialize-events* [config] (gen-wrap :function ::ini...
bd0b9b761b9de3023704cff100280ac7f823869e17d100a125a8f17d09b3759c
ztellman/pushkin
core.clj
(ns pushkin.test.core (:require [criterium.core])) (defmacro bench [name & body] `(do (println "\n-----\n" ~name "\n-----\n") (criterium.core/quick-bench (do ~@body) :reduce-with #(and %1 %2)))) (defmacro long-bench [name & body] `(do (println "\n-----\n" ~name "\n-----\n") ...
null
https://raw.githubusercontent.com/ztellman/pushkin/b49c76a8a137f9f59697791d2cf94f94008367f2/test/pushkin/test/core.clj
clojure
(ns pushkin.test.core (:require [criterium.core])) (defmacro bench [name & body] `(do (println "\n-----\n" ~name "\n-----\n") (criterium.core/quick-bench (do ~@body) :reduce-with #(and %1 %2)))) (defmacro long-bench [name & body] `(do (println "\n-----\n" ~name "\n-----\n") ...
99fa7b85de7baf8f611218b6450ea9cc62acd0de82897f5d1027e042c635d967
jaredly/belt
belt_MutableStack.ml
Copyright ( C ) 2017 Authors of BuckleScript * * 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 , either version 3 of the License , or * ( at your option ) any later versi...
null
https://raw.githubusercontent.com/jaredly/belt/4d07f859403fdbd3fbfc5a9547c6066d657a2131/belt_src/belt_MutableStack.ml
ocaml
using root, [f] may change it
Copyright ( C ) 2017 Authors of BuckleScript * * 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 , either version 3 of the License , or * ( at your option ) any later versi...
040eb4cf75edc8fd23baf918558675495e5d5738c424f0798f49ba2ebfabcc61
xoken/xoken-node
GraphDB.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE DeriveGeneric # # LANGUAGE MonoLocalBinds # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE TupleSections # # LANGUA...
null
https://raw.githubusercontent.com/xoken/xoken-node/180a3401d160af8beaf68d4ff90d3478297ae785/node/src/Network/Xoken/Node/GraphDB.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE ConstraintKinds # # LANGUAGE OverloadedStrings # we do not need Maps and Structures in this example [MerkleBranchNode] |Returns Neo4j DB version Fetch the Allegory Name branch Fetch the outpoint & script associated with Allegory name Return confirmed nUTXO node with supplie...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE DeriveGeneric # # LANGUAGE MonoLocalBinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TupleSections # # LANGUAGE RecordWildCards # module Network.Xoken.Node.GraphDB where import Arivi.P2P.P2PEnv as PE hiding (...
bdeedccd3020afb30ae1b1f104a371905f4fd9d5f7b21343058a047e526b535d
Ericson2314/lighthouse
IOState.hs
-- #hide -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.IOState Copyright : ( c ) 2002 - 2006 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : -- Stability : stable -- Portability ...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/OpenGL/Graphics/Rendering/OpenGL/GL/IOState.hs
haskell
#hide ------------------------------------------------------------------------------ | Module : Graphics.Rendering.OpenGL.GL.IOState License : BSD-style (see the file libraries/OpenGL/LICENSE) Maintainer : Stability : stable Portability : portable This is a purely internal module for an IO ...
Copyright : ( c ) 2002 - 2006 module Graphics.Rendering.OpenGL.GL.IOState ( IOState(..), getIOState, peekIOState, evalIOState, nTimes ) where import Foreign.Ptr ( Ptr, plusPtr ) import Foreign.Storable ( Storable(sizeOf,peek) ) newtype IOState s a = IOState { runIOState :: Ptr s -> IO (a, Ptr s) } inst...
d3f5f85d29c26d743ee378bd6549c045f7124eef3d709759760cc6733238829a
BradWBeer/clinch
node-animation.lisp
;;;; animation.lisp Please see the licence.txt for the CLinch (in-package :clinch) (defclass node-animation (animation) ((node :initform nil :initarg :node :accessor node))) (defmethod initialize-instance :after ((this node-animation) &key ai-animation node-names) (with-accessors ((f frames) ...
null
https://raw.githubusercontent.com/BradWBeer/clinch/421de1e4844a5142e37cb06805bc2d9d13ba048f/clinch-classimp/node-animation.lisp
lisp
animation.lisp (n node) Not using PRE-STATE or POST-STATE until later... Then I'll use cl:easing...cool stuff. mixes the keyframes...needs a function specifier. (PRINT "HELLO?") (defmethod get-animation-time ((this node-animator)) (get-animation-time (animation (animation this)))) "Render child objects....
Please see the licence.txt for the CLinch (in-package :clinch) (defclass node-animation (animation) ((node :initform nil :initarg :node :accessor node))) (defmethod initialize-instance :after ((this node-animation) &key ai-animation node-names) (with-accessors ((f frames) (r repeat) (l...
a4494783a639980a322212e9eaa3368a5a4002ca34c9e1e7e605e8c1247057e7
xvw/quasar
iterator.mli
(** Iterator implementation. *) open Js_of_ocaml * { 3 JavaScript boilerplate } class type ['a] step_js = object method _done : bool Js.t Js.readonly_prop method value : 'a Js.Optdef.t Js.readonly_prop end class type ['a] js = object method next : 'a step_js Js.t Js.meth end (** {2 Types} *) ...
null
https://raw.githubusercontent.com/xvw/quasar/a414d32ded53562802893590e2996bb8daeb0cf3/src/js/iterator.mli
ocaml
* Iterator implementation. * {2 Types} * A Step of an iteration. * Returns the next value of the iterator.
open Js_of_ocaml * { 3 JavaScript boilerplate } class type ['a] step_js = object method _done : bool Js.t Js.readonly_prop method value : 'a Js.Optdef.t Js.readonly_prop end class type ['a] js = object method next : 'a step_js Js.t Js.meth end * A JavaScript iterator . type 'a t = 'a js Js.t ...
48a501fae1156bfca0431bf101a2978da280a90678b0554455cc8df24cb5258d
greglook/merkle-db
key_test.clj
(ns merkle-db.key-test (:require [clojure.test :refer :all] [clojure.test.check.generators :as gen] [com.gfredericks.test.chuck.clojure-test :refer [checking]] [merkle-db.key :as key])) (deftest printing (is (= "#merkle-db/key \"012345\"" (pr-str (key/create [0x01 0x23 0x45]))))) (deftest key-pr...
null
https://raw.githubusercontent.com/greglook/merkle-db/449f58005cac0390a40ea15f9bf5403443f3be7d/lib/core/test/merkle_db/key_test.clj
clojure
(ns merkle-db.key-test (:require [clojure.test :refer :all] [clojure.test.check.generators :as gen] [com.gfredericks.test.chuck.clojure-test :refer [checking]] [merkle-db.key :as key])) (deftest printing (is (= "#merkle-db/key \"012345\"" (pr-str (key/create [0x01 0x23 0x45]))))) (deftest key-pr...
f8cae7fc3b4b4cef58449046485aaee2eb74a1a1b30c9c1ae7d8abcc80752cb0
jwiegley/notes
Synonyms.hs
# LANGUAGE DeriveFunctor # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE PatternSynonyms # # LANGUAGE ViewPatterns # module Synonyms where import Control.Monad.Free data TeletypeF r = GetF (String -> r) | PutF String r deriving Functor newtype Teletype a = Teletype { runTeletype :: Free TeletypeF a } d...
null
https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/Synonyms.hs
haskell
# LANGUAGE DeriveFunctor # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE PatternSynonyms # # LANGUAGE ViewPatterns # module Synonyms where import Control.Monad.Free data TeletypeF r = GetF (String -> r) | PutF String r deriving Functor newtype Teletype a = Teletype { runTeletype :: Free TeletypeF a } d...
f1fa56fc86e212068e2e8b2ed69e64305fd7e9aa7e73f3095bbd8e62326bd97b
dom96/ElysiaBot
MUEval.hs
{-# LANGUAGE OverloadedStrings #-} import PluginUtils import Network.SimpleIRC.Messages import qualified Data.ByteString.Char8 as B import Data.Maybe import System.Process import System.IO import Control.Monad (when) main = do initPlugin ["heval"] ["privmsg"] onMessage onMessage mInfo (MsgCmd cMsg server pref...
null
https://raw.githubusercontent.com/dom96/ElysiaBot/3accf5825e67880c7f1696fc81e3fc449efe3294/src/Plugins/MUEval/MUEval.hs
haskell
# LANGUAGE OverloadedStrings #
import PluginUtils import Network.SimpleIRC.Messages import qualified Data.ByteString.Char8 as B import Data.Maybe import System.Process import System.IO import Control.Monad (when) main = do initPlugin ["heval"] ["privmsg"] onMessage onMessage mInfo (MsgCmd cMsg server prefix cmd rest) = do evalResult <- e...
2024446b1391be45de2858d1826a93edbf1debae061f8cca41057ccd9848c5ff
Chris00/ocaml-mindstorm
connect_lwt.ml
open Lwt open Lwt_io module NXT = Mindstorm_lwt.NXT type connection = Bluetooth of string | USB let dev = ref None type t = { args : (Arg.key * Arg.spec * Arg.doc) list; f : 'a. 'a NXT.conn -> unit Lwt.t; } let default_args = [ "--bt", Arg.String(fun n -> dev := Some(Bluetooth n)), "addr Connects to this blu...
null
https://raw.githubusercontent.com/Chris00/ocaml-mindstorm/a96ea45059cafd136c98190674b6214f03357cf8/tests-lwt/common/connect_lwt.ml
ocaml
open Lwt open Lwt_io module NXT = Mindstorm_lwt.NXT type connection = Bluetooth of string | USB let dev = ref None type t = { args : (Arg.key * Arg.spec * Arg.doc) list; f : 'a. 'a NXT.conn -> unit Lwt.t; } let default_args = [ "--bt", Arg.String(fun n -> dev := Some(Bluetooth n)), "addr Connects to this blu...
3b5887b902b40352fe2e0e9dbb5e3411d350eba90be0134f142559df8139b281
ChaosEternal/guile-termite
mailbox.scm
;;; This file is part of guile-termite. ;;; - termite is free software : you can redistribute it and/or modify ;;; it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or ;;; (at your option) any later version. ;...
null
https://raw.githubusercontent.com/ChaosEternal/guile-termite/f571fd37bc2031e59e50496cdf0d53a8d2c7033a/thread-mailbox/mailbox.scm
scheme
This file is part of guile-termite. it under the terms of the GNU Lesser General Public License as published by (at your option) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the throw, set-cdr!, ca...
- termite is free software : you can redistribute it and/or modify the Free Software Foundation , either version 3 of the License , or - termite is distributed in the hope that it will be useful , GNU Lesser General Public License for more details . You should have received a copy of the GNU ...
d1a5c26fa3f6b0d8a86ee90a594d6576b12a3de6e06421bfa4017074cd240840
mstksg/tensor-ops
Util.hs
# LANGUAGE DeriveFoldable # {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE PolyKinds #-} # LANGUAGE Standalo...
null
https://raw.githubusercontent.com/mstksg/tensor-ops/1958642d60d879e311da14469c3dd09c186b5fda/src/Data/Type/Combinator/Util.hs
haskell
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE DeriveTraversable # # LANGUAGE GADTs # # LANGUAGE PolyKinds #
# LANGUAGE DeriveFoldable # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE StandaloneDeriving # module Data.Type.Combinator.Util where import Control.DeepSeq import Data.Distributive import Data.Type.Combinator import GHC.Generics instance Distributiv...
1979761ab9caafd8255ea03cb5f6cf2c58782ba4d1d91e38e0d643c8359552cb
typeable/compaREST
Traced.hs
# OPTIONS_GHC -Wno - orphans # module Data.OpenApi.Compare.Validate.Schema.Traced ( Step (..), tracedAllOf, tracedAnyOf, tracedOneOf, tracedItems, tracedAdditionalProperties, tracedDiscriminator, tracedProperties, tracedConjunct, PartitionLocation (..), PartitionChoice (..), ...
null
https://raw.githubusercontent.com/typeable/compaREST/5727f6bf83ce59a81293837e593822c4a66fcc0b/src/Data/OpenApi/Compare/Validate/Schema/Traced.hs
haskell
included, excluded | Invariant (for better memoization only): the "tail" of the trace is the "least" of the traces of the conjuncted schemata
# OPTIONS_GHC -Wno - orphans # module Data.OpenApi.Compare.Validate.Schema.Traced ( Step (..), tracedAllOf, tracedAnyOf, tracedOneOf, tracedItems, tracedAdditionalProperties, tracedDiscriminator, tracedProperties, tracedConjunct, PartitionLocation (..), PartitionChoice (..), ...
d229eb0e89936e45ca955d80cbf3394b9800bcec7aba5ab2d58ce3da387c3cf1
metosin/compojure-api
pizza.clj
(ns examples.pizza (:require [schema.core :as s] [compojure.api.sweet :refer :all] [ring.util.http-response :refer :all] [ring.swagger.schema :as rs])) ;; Pizza Store ;; (s/defschema Topping {:type (s/enum :cheese :olives :ham :pepperoni :habanero) :qty L...
null
https://raw.githubusercontent.com/metosin/compojure-api/5c88f32fe56cdb6fcdb3cc506bb956943fcd8c17/examples/thingie/src/examples/pizza.clj
clojure
Repository Data Routes
(ns examples.pizza (:require [schema.core :as s] [compojure.api.sweet :refer :all] [ring.util.http-response :refer :all] [ring.swagger.schema :as rs])) Pizza Store (s/defschema Topping {:type (s/enum :cheese :olives :ham :pepperoni :habanero) :qty Long}) ...
d559d24bb016169b04d0927a65ddf78e13273c417463a7aba985ddd3bc8e78f2
ChrisPenner/json-to-haskell
Printer.hs
# LANGUAGE TemplateHaskell # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ViewPatterns # # LANGUAGE FlexibleContexts # # LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} module JsonToHaskell.Internal.Printer where import Lens.Micro.Platform (makeLenses) import JsonToHaskell.Internal.Parser import J...
null
https://raw.githubusercontent.com/ChrisPenner/json-to-haskell/37276529efa2d861f061d8cf0642daef5ab8c47b/src/JsonToHaskell/Internal/Printer.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE GADTs # | The environment used for printing the module | Convert a name into a valid haskell field name | Wrap a writer in parens | Embed the given writer at the correct level of indentation and add a newline | Add a newline | Write out all the given records and their ins...
# LANGUAGE TemplateHaskell # # LANGUAGE LambdaCase # # LANGUAGE ViewPatterns # # LANGUAGE FlexibleContexts # # LANGUAGE DataKinds # module JsonToHaskell.Internal.Printer where import Lens.Micro.Platform (makeLenses) import JsonToHaskell.Internal.Parser import JsonToHaskell.Internal.Options import Control.Monad.State i...
bb669eaf1297a9e57e41bd0c0ccb7a1318e906766d91747523ad8f14f3ee088a
antono/guix-debian
download.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2012 , 2013 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of t...
null
https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/guix/scripts/download.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2012 , 2013 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (guix scripts download) #:use-module (guix ui) #:use-module (guix store) #:use-module ...
253415d7649f7e778a68134010ec9f86ce0bd8fb7e7e1efa868f810c4d5f235b
janestreet/hardcaml
bits.ml
open Base type t = Bits0.t let number_of_data_bytes (t : t) = Bits0.number_of_data_bytes t let unsafe_get_int64 = Bits0.unsafe_get_int64 let unsafe_set_int64 = Bits0.unsafe_set_int64 module Expert = struct let unsafe_underlying_repr (t : t) = (t :> Bytes.t) let offset_for_data = 8 end module Mutable = struct ...
null
https://raw.githubusercontent.com/janestreet/hardcaml/15727795c2bf922dd852cc0cd895a4ed1d9527e5/src/bits.ml
ocaml
Use [lxor] instead of [lnot] since the former is exposed as a primitive in base's mli. Note; across the recursive call we turn [carry] into an int. This avoids an allocation (same in the sub routine below) must be equal Note: Caml.Obj.magic is the most efficient way to convert bool to int without ...
open Base type t = Bits0.t let number_of_data_bytes (t : t) = Bits0.number_of_data_bytes t let unsafe_get_int64 = Bits0.unsafe_get_int64 let unsafe_set_int64 = Bits0.unsafe_set_int64 module Expert = struct let unsafe_underlying_repr (t : t) = (t :> Bytes.t) let offset_for_data = 8 end module Mutable = struct ...
fd7c7c2380aed456cddd0cf6e321cd9e784200cdda4ddb9520557ab17d7be070
inconvergent/weir
weir.lisp
(in-package #:weir-tests) (defun test-weir (wer) (do-test (weir:add-vert! wer (vec:vec 0d0 0d0)) 0) (do-test (weir:add-vert! wer (vec:vec 10d0 0d0)) 1) (do-test (weir:add-vert! wer (vec:vec 3d0 3d0)) 2) (do-test (weir:add-vert! wer (vec:vec 4d0 3d0)) 3) (do-test (weir:add-vert! wer (vec:vec 7d0 200d0)...
null
https://raw.githubusercontent.com/inconvergent/weir/3c364e3a0e15526f0d6985f08a57b312b5c35f7d/test/weir.lisp
lisp
graph sequentially while relying on the state of the graph this exhibits "side-effects" this exhibits "side-effects" no "side effect" in the sense described above. alterations avoid side-effects alterations avoid side-effects
(in-package #:weir-tests) (defun test-weir (wer) (do-test (weir:add-vert! wer (vec:vec 0d0 0d0)) 0) (do-test (weir:add-vert! wer (vec:vec 10d0 0d0)) 1) (do-test (weir:add-vert! wer (vec:vec 3d0 3d0)) 2) (do-test (weir:add-vert! wer (vec:vec 4d0 3d0)) 3) (do-test (weir:add-vert! wer (vec:vec 7d0 200d0)...
1852924a65d9f4d61d32ac34f1c100fe523f4198add94503ce0f7d69dd898c8f
patrikja/AFPcourse
Types.hs
module Problem1.Types where type Value = Double type Err = String type Mem = Value
null
https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/exam/2010-08/Problem1/Types.hs
haskell
module Problem1.Types where type Value = Double type Err = String type Mem = Value
d369309769a86d18316cf5ec4a9fc9e93e88318d54e1049d79fa01ce4cc19140
Funky-Punky/FPV_SS22_Repetitorium
libFileSystem.ml
open LibCommon module type FileSystem = sig type t val init : unit -> t val kill : t -> unit val read : t -> read_request -> file_content val write : t -> write_request -> t val delete : t -> file_reference -> t end module RunTimeFileSystem : FileSystem = struct type t = file list let init () = [] ...
null
https://raw.githubusercontent.com/Funky-Punky/FPV_SS22_Repetitorium/99e0d0f63513d3b809d7b26bb1a511f28d1d71c3/solutions/file_server/src/file_system/libFileSystem.ml
ocaml
open LibCommon module type FileSystem = sig type t val init : unit -> t val kill : t -> unit val read : t -> read_request -> file_content val write : t -> write_request -> t val delete : t -> file_reference -> t end module RunTimeFileSystem : FileSystem = struct type t = file list let init () = [] ...
e1cb08e7fb3207ced8bc832a07521653123c959f7aa118598c72853fb80841bc
c-cube/qcheck
QCheck2.ml
QCheck : Random testing for OCaml copyright ( c ) 2013 - 2017 , , , , , , all rights reserved . QCheck: Random testing for OCaml copyright (c) 2013-2017, Guillaume Bury, Simon Cruanes, Vincent Hugot, Jan Midtgaard, Julien Debon, Valentin Chaboche all rights reserved. *) * { 1 Quickcheck inspired ...
null
https://raw.githubusercontent.com/c-cube/qcheck/063c1d74795a24eb77fa661d218c4715382df566/src/core/QCheck2.ml
ocaml
let split s = let i1 = bits64 s in let i2 = bits64 s in let i3 = bits64 s in let i4 = bits64 s in mk i1 i2 i3 i4 raised if precondition is false raised if an example failed to be found The following functions are copied from to support older OCaml versions. End of copy of old functions. * Tak...
QCheck : Random testing for OCaml copyright ( c ) 2013 - 2017 , , , , , , all rights reserved . QCheck: Random testing for OCaml copyright (c) 2013-2017, Guillaume Bury, Simon Cruanes, Vincent Hugot, Jan Midtgaard, Julien Debon, Valentin Chaboche all rights reserved. *) * { 1 Quickcheck inspired ...
a7d2afb18063d62260a5980d17c34da20453ed62616b0706812525809fcd994c
mdsebald/link_blox_app
lblx_int_to_str.erl
%%% @doc BLOCKTYPE %%% Convert Integer to String %%% DESCRIPTION %%% Convert an input integer number input to a string using the selected number base %%% LINKS %%% @end -module(lblx_int_to_str). -author("Mark Sebald"). -include("../block_state.hrl"). %% ==========================================...
null
https://raw.githubusercontent.com/mdsebald/link_blox_app/64034fa5854759ad16625b93e3dde65a9c65f615/src/block_types/lblx_int_to_str.erl
erlang
@doc Convert Integer to String DESCRIPTION Convert an input integer number input to a string using the selected number base LINKS @end ==================================================================== API functions ==================================================================== Merge t...
BLOCKTYPE -module(lblx_int_to_str). -author("Mark Sebald"). -include("../block_state.hrl"). -export([groups/0, version/0]). -export([create/2, create/4, create/5, upgrade/1, initialize/1, execute/2, delete/1]). groups() -> [conversion]. version() -> "0.1.0". -spec default_configs(BlockName :: block_name()...