_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
63cedee57034838f149370bc64f3ff69a4b46668f38240078c730c8538ee9cc2
nvim-treesitter/nvim-treesitter
locals.scm
; Scopes [ (function_call) (code_block) (function_block) (control_structure) ] @scope ; Definitions (argument name: (identifier) @definition.parameter (#set! "definition.var.scope" "local") ) (variable_definition name: (variable (local_var (identifier) @definition.var ))) (variable_definition name: (variabl...
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/56634f49ab3d8122153c8c5582c581fb6a6af075/queries/supercollider/locals.scm
scheme
Scopes Definitions
[ (function_call) (code_block) (function_block) (control_structure) ] @scope (argument name: (identifier) @definition.parameter (#set! "definition.var.scope" "local") ) (variable_definition name: (variable (local_var (identifier) @definition.var ))) (variable_definition name: (variable (environment_var (ide...
b10034261cbd8eec881045be242d49f43ce90893fb556bc3e8489257c87352ce
bmeurer/ocamljit2
arrayLabels.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , Kyot...
null
https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/stdlib/arrayLabels.ml
ocaml
********************************************************************* Objective Caml ...
, Kyoto University RIMS Copyright 2001 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with $ Id$ include Array
2a1e6d162037f8b579f3cbe68e84d9e91f42d17e128c05eb54e796eed0cc7879
jbracker/supermonad
PreludeWithoutMonad.hs
-- | A verson of the standard prelude that does not export anything that -- involves standard monads. module Control.Super.Monad.PreludeWithoutMonad ( -- * Prelude -- ** Standard types, classes and related functions -- *** Basic data types P.Bool(..) , (P.&&), (P.||), P.not, P.otherwise , P.Maybe(...
null
https://raw.githubusercontent.com/jbracker/supermonad/2595396a225a65b1dce6ed9a1ce59960f392a55b/src/Control/Super/Monad/PreludeWithoutMonad.hs
haskell
| A verson of the standard prelude that does not export anything that involves standard monads. * Prelude ** Standard types, classes and related functions *** Basic data types *** Basic type classes *** Numbers **** Numeric types **** Numeric type classes **** Numeric functions *** (Monads and) functors ...
module Control.Super.Monad.PreludeWithoutMonad P.Bool(..) , (P.&&), (P.||), P.not, P.otherwise , P.Maybe(..) , P.maybe , P.Either(..) , P.either , P.Ordering(..) , P.Char, P.String * * * * Tuples , P.fst, P.snd, P.curry, P.uncurry , P.Eq(..), P.Ord(..), P.Enum(..), P.Bounded(..) , P.Int, P.In...
211f7e8806b3ee7d18a8aaf6fb94693760e4a302cedcc7465f8d537daccc42df
cxxxr/apispec
parameter.lisp
(defpackage #:apispec/tests/classes/parameter (:use #:cl #:rove #:apispec/classes/parameter) (:import-from #:apispec/classes/schema #:object #:schema) (:import-from #:assoc-utils #:alist-hash)) (in-package #:apispec/tests/classes/parameter) (deftest...
null
https://raw.githubusercontent.com/cxxxr/apispec/4bdd238f6b5effed305d284e0e6b7cef214e94a2/tests/classes/parameter.lisp
lisp
(defpackage #:apispec/tests/classes/parameter (:use #:cl #:rove #:apispec/classes/parameter) (:import-from #:apispec/classes/schema #:object #:schema) (:import-from #:assoc-utils #:alist-hash)) (in-package #:apispec/tests/classes/parameter) (deftest...
6158bd3759908a65abfcab600e9c86e756c545580c42d2c92689b59986fda147
privet-kitty/cl-competitive
2cc.lisp
(defpackage :cp/test/2cc (:use :cl :fiveam :cp/2cc :cp/set-equal) (:import-from :cp/test/base #:base-suite)) (in-package :cp/test/2cc) (in-suite base-suite) (test 2cc ;; Graph example is from (let* ((graph #(() (2 5) (1 3) (2 4 5) (3) (1 3 7 8) (8) (5 8) (5 6 7 9) (8))) (2cc (make-2cc graph)) ...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/a1e3077015824b53272e2c5c9c30639a9192cf86/module/test/2cc.lisp
lisp
Graph example is from empty graph
(defpackage :cp/test/2cc (:use :cl :fiveam :cp/2cc :cp/set-equal) (:import-from :cp/test/base #:base-suite)) (in-package :cp/test/2cc) (in-suite base-suite) (test 2cc (let* ((graph #(() (2 5) (1 3) (2 4 5) (3) (1 3 7 8) (8) (5 8) (5 6 7 9) (8))) (2cc (make-2cc graph)) (comps (2cc-components 2cc...
f758ea46c1f0a07d72ced447e7eea58be1ff461b377ab4e7b50cd8b71cfe8fac
schell/odin
Evented.hs
# LANGUAGE LambdaCase # module Control.Monad.Evented where import Control.Monad.IO.Class import Control.Monad.Trans.Class newtype EventT m b = EventT { runEventT :: m (Either b (EventT m b)) } -------------------------------------------------------------------------------- -- Constructors --------...
null
https://raw.githubusercontent.com/schell/odin/97ae1610a7abd19aa150bc7dfc132082d88ca9ea/src/Control/Monad/Evented.hs
haskell
------------------------------------------------------------------------------ Constructors ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Combinators --------------------------------------------------------...
# LANGUAGE LambdaCase # module Control.Monad.Evented where import Control.Monad.IO.Class import Control.Monad.Trans.Class newtype EventT m b = EventT { runEventT :: m (Either b (EventT m b)) } done :: Monad m => a -> EventT m a done = EventT . return . Left next :: Monad m => EventT m a -> EventT...
9bd998869095b25c564f1512ad11609324d2284632c4fa95dd875054cd54fa44
tsloughter/kuberl
kuberl_v1beta2_stateful_set_spec.erl
-module(kuberl_v1beta2_stateful_set_spec). -export([encode/1]). -export_type([kuberl_v1beta2_stateful_set_spec/0]). -type kuberl_v1beta2_stateful_set_spec() :: #{ 'podManagementPolicy' => binary(), 'replicas' => integer(), 'revisionHistoryLimit' => integer(), 'selector' := kuberl_v1_label_se...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1beta2_stateful_set_spec.erl
erlang
-module(kuberl_v1beta2_stateful_set_spec). -export([encode/1]). -export_type([kuberl_v1beta2_stateful_set_spec/0]). -type kuberl_v1beta2_stateful_set_spec() :: #{ 'podManagementPolicy' => binary(), 'replicas' => integer(), 'revisionHistoryLimit' => integer(), 'selector' := kuberl_v1_label_se...
a317250406501fbce846907bc722cfba82caca07b33773a1afc8d2ead21a264d
dlowe-net/local-time
local-time.lisp
(in-package #:local-time) ;;; Types (defclass timestamp () ((day :accessor day-of :initarg :day :initform 0 :type integer) (sec :accessor sec-of :initarg :sec :initform 0 :type integer) (nsec :accessor nsec-of :initarg :nsec :initform 0 :type (integer 0 999999999)))) (defstruct subzone (abbrev nil) (offs...
null
https://raw.githubusercontent.com/dlowe-net/local-time/a177eb911c0e8116e2bfceb79049265a884b701b/src/local-time.lisp
lisp
Types Variables Month information the current date and -4713-01-01T00:00:00+00:00 we currently just do the date arithmetic and don't adjust for the time of day. try converting the local time to a timestamp using each available subtimezone, until we find one where the offset matches the offset that applies at t...
(in-package #:local-time) (defclass timestamp () ((day :accessor day-of :initarg :day :initform 0 :type integer) (sec :accessor sec-of :initarg :sec :initform 0 :type integer) (nsec :accessor nsec-of :initarg :nsec :initform 0 :type (integer 0 999999999)))) (defstruct subzone (abbrev nil) (offset nil) ...
33dc4933b89782c187dcd9854420b0f74ad63a8b0ebc8a044de8586824795b34
cram2/cram
matrix-product-hermitian.lisp
Regression test MATRIX - PRODUCT - HERMITIAN for GSLL , automatically generated ;; Copyright 2009 , 2010 , 2014 Distributed under the terms of the GNU General Public License ;; ;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as publ...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/matrix-product-hermitian.lisp
lisp
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Publi...
Regression test MATRIX - PRODUCT - HERMITIAN for GSLL , automatically generated Copyright 2009 , 2010 , 2014 Distributed under the terms of the GNU General Public License it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or...
5eda460c1131cdb8f080e1db4a69e72f92fd66e84930b4f5ad399523a63784e5
clojure/core.typed
recur_utils.clj
Copyright ( c ) , contributors . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;...
null
https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/src/clojure/core/typed/checker/check/recur_utils.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) , contributors . (ns ^:skip-wiki clojure.core.typed.checker.check.recur-utils (:require [clojure.core.typed.checker.utils :as u] [clojure.core.typed.checker.type-rep :as r])) (u/def-type RecurTarget [dom rest drest kws] "A target for recur" [(every? r/Type? dom) ((some-...
afd8a6b387c6f764c893393ea7745b74ec356a9d7a14ea34507c09294abd5611
arcadia-unity/ArcadiaGodot
def.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/arcadia-unity/ArcadiaGodot/d9881c8132c46f21efde4eb4eb9a534d808cdb20/Clojure/clojure/test_clojure/def.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns clojure.test-clojure.def (:use clojure.test clojure.test-helper clojure.test-clojure.protocols)) (deftest defn-error-messages (testing "multiarity syntax invalid parameter declaration" (is (fails-with-cause? clojure.lang.ExceptionInfo ...
67346d60950823ab853bf7e903d6a95929dd8edc25a2c7da482c1fbec6418abd
Mesabloo/HaSM
Mmap.hs
# LANGUAGE CPP , ForeignFunctionInterface # module System.Mmap ( mmap, munmap , module System.Mmap.Flags , module System.Mmap.Exception ) where import Foreign.Ptr import Foreign.C.Types import System.Mmap.Flags import System.Mmap.Exception import Control.Exception (throwIO) import Control.Monad (when) import Data.Wor...
null
https://raw.githubusercontent.com/Mesabloo/HaSM/7d75f0a81055d1e9c9dd0d351f3e9b9c00c7dadd/src/System/Mmap.hs
haskell
| The 'mmap' function is used to allocate pages. | The 'munmap' function is used to free pages.
# LANGUAGE CPP , ForeignFunctionInterface # module System.Mmap ( mmap, munmap , module System.Mmap.Flags , module System.Mmap.Exception ) where import Foreign.Ptr import Foreign.C.Types import System.Mmap.Flags import System.Mmap.Exception import Control.Exception (throwIO) import Control.Monad (when) import Data.Wor...
1639703c085df05c5c3d0d9912cd19795a65cd01205be57e3a29efe5079f9cc4
kazzmir/master-of-magic
exmouse.ml
Example program for the Allegro library , by . * * This program demonstrates how to get mouse input . The * first part of the test retrieves the raw mouse input data * and displays it on the screen without using any mouse * cursor . When you press a key the standard arrow - like mouse * ...
null
https://raw.githubusercontent.com/kazzmir/master-of-magic/830bfd1c549a5ac7370fa6a72bb06be5d3435fa0/lib/ocaml-allegro-20080222/ml_examples/exmouse.ml
ocaml
Detect mouse presence On most platforms (eg. DOS) things will still work correctly * without this call, but it is a good idea to include it in any * programs that you want to be portable, because on some platforms * you may not be able to get any mouse input without it. the mouse position is st...
Example program for the Allegro library , by . * * This program demonstrates how to get mouse input . The * first part of the test retrieves the raw mouse input data * and displays it on the screen without using any mouse * cursor . When you press a key the standard arrow - like mouse * ...
376924bceb3f2871e995024082049ea5ce1732c6d77aa91a9307a89e7caab4d3
shayan-najd/NativeMetaprogramming
FailDueToGivenOverlapping.hs
# LANGUAGE FlexibleContexts # module FailDueToGivenOverlapping where class C a where class D a where dop :: a -> () instance C a => D [a] -- should succeed since we can't learn anything more for 'a' foo :: (C a, D [Int]) => a -> () foo x = dop [x] class E a where eop :: a -> () instance E [a] where eop = un...
null
https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.hs
haskell
should succeed since we can't learn anything more for 'a' should fail since we can never be sure that we learnt everything about the free unification variable.
# LANGUAGE FlexibleContexts # module FailDueToGivenOverlapping where class C a where class D a where dop :: a -> () instance C a => D [a] foo :: (C a, D [Int]) => a -> () foo x = dop [x] class E a where eop :: a -> () instance E [a] where eop = undefined bar :: E [Int] => () -> () bar _ = eop [undefined]
0d995c47f342382eb952f3b6a61502c8a5f219a7a5b56a35a763f9a4633e249a
hasktorch/ffi-experimental
Generator.hs
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # module ATen.Unmanaged.Type.Generator where import qualified Language.C.Inline.Cpp as C impo...
null
https://raw.githubusercontent.com/hasktorch/ffi-experimental/54192297742221c4d50398586ba8d187451f9ee0/ffi/src/ATen/Unmanaged/Type/Generator.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # module ATen.Unmanaged.Type.Generator where import qualified Language.C.Inline.Cpp as C import qualified Language.C.Inline.Cpp....
ac2637a2a3e199aff32e041f4a7a0520f0b17600bf10eb6aac0483b8575c78d2
haskell-gi/gi-gtk-examples
ProgressThreadedRTS.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # Example of concurrent and Gtk . -- This demo uses GHC 's support for OS level threads . It has to be -- linked using the ghc -threaded flag. -- Because Gtk+ is single threaded we have to be very careful to call -- Gtk+ only from the main GUI thread....
null
https://raw.githubusercontent.com/haskell-gi/gi-gtk-examples/38c7c0c4bfa68efc04165d55ba53e1a2acc1dcef/concurrent/ProgressThreadedRTS.hs
haskell
# LANGUAGE OverloadedStrings # linked using the ghc -threaded flag. Gtk+ only from the main GUI thread. So while it's ok to forkIO, any GUI actions in that thread have to be 'posted' to the main GUI
# LANGUAGE PatternSynonyms # Example of concurrent and Gtk . This demo uses GHC 's support for OS level threads . It has to be Because Gtk+ is single threaded we have to be very careful to call thread as in the example here . import Control.Applicative import Prelude import Control.Concurrent import qualifie...
c253f0da44411c7ccbeb05bfc27ed5a6188857c54c537aec52065e292e81a073
trez/LazyNES
Helpers.hs
module Helpers ( -- * Bit bitBool , boolBit * , (<+>) , whenM , unlessM -- * Addresses. , toAddr , mkAddr , (<#>) -- * Type conversions. , signed , signed16 , unsigned , unsigned8 ) where import Control.Monad (liftM2, when, unless) impo...
null
https://raw.githubusercontent.com/trez/LazyNES/8f2572e6bb60d1c0ab2c94c584144220ff9e05d1/src/Helpers.hs
haskell
* Bit * Addresses. * Type conversions. | Return a bits representation of bool. | Monadic when. | Monadic unless. | Transforms an operand into a Address.
module Helpers ( bitBool , boolBit * , (<+>) , whenM , unlessM , toAddr , mkAddr , (<#>) , signed , signed16 , unsigned , unsigned8 ) where import Control.Monad (liftM2, when, unless) import CPU.Types | Set bit @n@ of bits according to @b@. bitBool ::...
1440aa8ebc47891408b60e8a178ffdbc0c368391e2fb0f52a21d4b9ca9694841
stamourv/racket-benchmark
types.rkt
#lang racket (provide (struct-out benchmark-result) benchmark-logger) ;;;;;;;;;;;;;;;;;;;;;;;;; Benchmark Results ;;;;;;;;;;;;;;;;;;;;;;;;; (struct benchmark-result (name ;; any/c ( listof any / c ) ( listof number ? ) ) #:prefab ) (define benchmark-logger (make-logger 'benchmark (current-lo...
null
https://raw.githubusercontent.com/stamourv/racket-benchmark/de7e84539de23834508dba42e07859cf13bde20c/benchmark/types.rkt
racket
Benchmark Results ;;;;;;;;;;;;;;;;;;;;;;;;; any/c
#lang racket (provide (struct-out benchmark-result) benchmark-logger) (struct benchmark-result ( listof any / c ) ( listof number ? ) ) #:prefab ) (define benchmark-logger (make-logger 'benchmark (current-logger)))
649180d68fc0d92669ca38a6c108fb190ddab8ba4d78148d4cc79d74577196c7
tomahawkins/atom
ValidData.hs
-- | -- Module: ValidData -- Description: Capturing data that can either be valid or invalid Copyright : ( c ) 2013 Lee Pike -- -- Capturing data that can either be valid or invalid. module Language.Atom.Common.ValidData ( ValidData , validData , getValidData , whenValid , whenInvalid ) where import ...
null
https://raw.githubusercontent.com/tomahawkins/atom/e552e18859c6d249af4b293e9d2197878c0fd4fd/Language/Atom/Common/ValidData.hs
haskell
| Module: ValidData Description: Capturing data that can either be valid or invalid Capturing data that can either be valid or invalid. | 'ValidData' captures the data and its validity condition. 'ValidData' is abstract to prevent rules from using invalid data. | Create 'ValidData' given the data and validit...
Copyright : ( c ) 2013 Lee Pike module Language.Atom.Common.ValidData ( ValidData , validData , getValidData , whenValid , whenInvalid ) where import Language.Atom.Expressions import Language.Atom.Language data ValidData a = ValidData a (E Bool) validData :: a -> E Bool -> ValidData a validData = Va...
d222d75c78046d05c57fbfe8ef70d345a7508ae58881a1b56bdac7ddba92682c
OCamlPro/opam-bin
commandPull.ml
(**************************************************************************) (* *) Copyright 2020 OCamlPro & Origin Labs (* *) (* All rights ...
null
https://raw.githubusercontent.com/OCamlPro/opam-bin/322e46827280af0fdf6a24ac65893b67d3b9f269/src/opam_bin_lib/commandPull.ml
ocaml
************************************************************************ All rights reserved. This file is distributed under the terms of the exception on linking descr...
Copyright 2020 OCamlPro & Origin Labs GNU Lesser General Public License version 2.1 , with the special open Ezcmd.TYPES open EzConfig.OP open Ez_file.V1 open EzFile.OP let cmd_name = "pull" let action () = match !!Config.rsync_url with | None -> Printf.eprintf ...
b5fdd4e56e31819824d979b62d507c5186f1a1ede0af95c5ed27a458be008d6a
PrincetonUniversity/lucid
addDefaultBranches.ml
(* make sure every match statement has an explicit default case. *) open CoreSyntax module CL = Caml.List let is_default_pats pats = let is_wild pat = match pat with | PWild -> true | _ -> false in CL.map is_wild pats |> CL.fold_left ( & ) true ;; let new_default_branch exps : branch = CL.map (fun _...
null
https://raw.githubusercontent.com/PrincetonUniversity/lucid/d7f41caa00654bc01eb2e6c0307d93800cbc749b/src/lib/midend/transformations/addDefaultBranches.ml
ocaml
make sure every match statement has an explicit default case.
open CoreSyntax module CL = Caml.List let is_default_pats pats = let is_wild pat = match pat with | PWild -> true | _ -> false in CL.map is_wild pats |> CL.fold_left ( & ) true ;; let new_default_branch exps : branch = CL.map (fun _ -> PWild) exps, snoop let add_default_branches ds = let v = ...
370b349c85c949084293fb4cb5c8cdbdd3040cac874a6bf457c8be743b623f8f
paulcadman/the-little-typer
chapter-15-Absurd.rkt
#lang pie Exercises on Absurd from Chapter 15 of The Little Typer (claim + (-> Nat Nat Nat)) (define + (λ (a b) (rec-Nat a b (λ (_ b+a-k) (add1 b+a-k))))) (claim double (-> Nat Nat)) (define double (λ (n) (rec-Nat n ...
null
https://raw.githubusercontent.com/paulcadman/the-little-typer/0a5c6877a902f26fc7f100de593f44f6a986624c/exercises/chapter-15-Absurd.rkt
racket
The following is not required for the statement of exercises but will be required in some solutions. than or equal to n.
#lang pie Exercises on Absurd from Chapter 15 of The Little Typer (claim + (-> Nat Nat Nat)) (define + (λ (a b) (rec-Nat a b (λ (_ b+a-k) (add1 b+a-k))))) (claim double (-> Nat Nat)) (define double (λ (n) (rec-Nat n ...
8b65c7bf975a4794ad3f8953ac1c84f3b89074f3542f94217853ffef7b7db8c6
anoma/juvix
Repl.hs
# LANGUAGE QuasiQuotes # module Commands.Dev.Geb.Repl where import Commands.Base hiding (command) import Commands.Dev.Geb.Repl.Format import Commands.Dev.Geb.Repl.Options import Control.Exception (throwIO) import Control.Monad.State.Strict qualified as State import Data.String.Interpolate (i, __i) import Juvix.Compil...
null
https://raw.githubusercontent.com/anoma/juvix/0ef464668da2211e52725a73f36f342c52e37489/app/Commands/Dev/Geb/Repl.hs
haskell
`multiline` is included here for auto-completion purposes only. `repline`'s `multilineCommand` logic overrides this no-op.
# LANGUAGE QuasiQuotes # module Commands.Dev.Geb.Repl where import Commands.Base hiding (command) import Commands.Dev.Geb.Repl.Format import Commands.Dev.Geb.Repl.Options import Control.Exception (throwIO) import Control.Monad.State.Strict qualified as State import Data.String.Interpolate (i, __i) import Juvix.Compil...
d830d567bbae6afab575bbdd313cfc88b5a48d44c2d3dc9f10cc08c09957c464
5HT/ant
Glyph.mli
open XNum; open Runtime; open Substitute; open FontMetric; open Box; value attach_accent : font_metric -> glyph_desc -> font_metric -> glyph_desc -> box; value vertical_extendable : num -> font_metric -> glyph_desc -> glyph_desc -> glyph_desc -> glyph_desc -> box; value horizon...
null
https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Typesetting/Glyph.mli
ocaml
open XNum; open Runtime; open Substitute; open FontMetric; open Box; value attach_accent : font_metric -> glyph_desc -> font_metric -> glyph_desc -> box; value vertical_extendable : num -> font_metric -> glyph_desc -> glyph_desc -> glyph_desc -> glyph_desc -> box; value horizon...
1ce650531f905ac4fbba463508909428a6a4fff0997c4ccb89fd1abea1f31c2b
input-output-hk/marlowe-cardano
ChainSync.hs
{-# LANGUAGE Arrows #-} # LANGUAGE DataKinds # # LANGUAGE DuplicateRecordFields # {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE StrictData #-} module Language.Marlowe.Runtime.ChainSync ( ChainSyncDependencies(..) , chainSync ) where import Cardano.Api (CardanoEra, CardanoMode, Tx, TxValidation...
null
https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/bc9a0325f13b886e90ea05196ffb70a46c2ab095/marlowe-chain-sync/libchainsync/Language/Marlowe/Runtime/ChainSync.hs
haskell
# LANGUAGE Arrows # # LANGUAGE GADTs # # LANGUAGE RankNTypes # # LANGUAGE StrictData #
# LANGUAGE DataKinds # # LANGUAGE DuplicateRecordFields # module Language.Marlowe.Runtime.ChainSync ( ChainSyncDependencies(..) , chainSync ) where import Cardano.Api (CardanoEra, CardanoMode, Tx, TxValidationErrorInMode) import qualified Cardano.Api as Cardano import Cardano.Api.Shelley (AcquiringFailure) impo...
f825acc9003a587e20a5e537fe12ec8f7cd69327929aad45c3678436a7936780
ejgallego/coq-lsp
init.ml
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * INRIA , CNRS and contributors - Copyright 1999 - 2018 (* <O___,, * (see CREDITS file for the list of authors) *) \VV/ * * * *...
null
https://raw.githubusercontent.com/ejgallego/coq-lsp/70a3d4d41192671ca710775c98adfba4cfd5fae7/coq/init.ml
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team <O___,, * (see CREDITS file for the list of authors) // * This file is distributed under the terms of the * (see LICENSE file for...
v * INRIA , CNRS and contributors - Copyright 1999 - 2018 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser General Public License Version 2.1 Copyright 2016 - 2019 MINES ParisT...
9f8a8d10c1d36f6b2dd8abfd9abed7aca83e8cc6ecaad005a0cedef967ac2e88
faylang/fay
emptyMain.hs
module EmptyMain where main :: Fay () main = return ()
null
https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/tests/emptyMain.hs
haskell
module EmptyMain where main :: Fay () main = return ()
e74350ff6da882c092e3b794360b6e9530294b4e8d53ececc2b1a1df63d4e174
ChicagoBoss/ChicagoBoss
boss_controller_compiler_test.erl
%%------------------------------------------------------------------- @author ChicagoBoss Team and contributors , see file in root directory %% @end This file is part of ChicagoBoss project . See file in root directory %% for license information, see LICENSE file in root directory %% @end %...
null
https://raw.githubusercontent.com/ChicagoBoss/ChicagoBoss/113bac70c2f835c1e99c757170fd38abf09f5da2/test/boss_controller_compiler_test.erl
erlang
------------------------------------------------------------------- @end for license information, see LICENSE file in root directory @end @doc ------------------------------------------------------------------- {map_tokens, 1} -type route_form() :: boss_controller_compiler:route_form().
@author ChicagoBoss Team and contributors , see file in root directory This file is part of ChicagoBoss project . See file in root directory -module(boss_controller_compiler_test). -include_lib("proper/include/proper.hrl"). -include_lib("eunit/include/eunit.hrl"). -include("../src/boss/boss_we...
453ea83e2e818271e8b12dcbc6d148883e930f18201bab20709c6404d8f8eee8
choener/BiobaseXNA
properties.hs
module Main where import Control.Monad (join) import Data.Bits import Data.Function (on) import Data.Int (Int16(..)) import Data.List (groupBy,sort,permutations,nub,(\\)) import Data.Maybe (isJust) import Data.Word (Word) import Debug.Tra...
null
https://raw.githubusercontent.com/choener/BiobaseXNA/ebec70a3906106a50c29cdbbce9a3247d6ebb15f/tests/properties.hs
haskell
-- | Check if both the memoized version and the population enumeration -- produce the same multisets, but maybe in different order. -- -- prop> \(n :: Int16) -> let b = popCount n in memoSorted b == enumSorted b -- memo = memoSorted b enum = enumSorted b memoSorted b = map sort . groupBy ((==) `on` p...
module Main where import Control.Monad (join) import Data.Bits import Data.Function (on) import Data.Int (Int16(..)) import Data.List (groupBy,sort,permutations,nub,(\\)) import Data.Maybe (isJust) import Data.Word (Word) import Debug.Tra...
06476360202bdebfb9fc156fc40801d47528e954945094fae92f202f9325c705
zenspider/schemers
exercise.2.25.scm
#lang racket/base (require "../lib/test.rkt") Exercise 2.25 . Give combinations of cars and that will pick 7 from each of ;; the following lists: ;; ( 1 3 ( 5 7 ) 9 ) ( ( 7 ) ) ( 1 ( 2 ( 3 ( 4 ( 5 ( 6 7 ) ) ) ) ) ) (define a '(1 3 (5 7) 9)) (define b '((7))) (define c '(1 (2 (3 (4 (5 (6 7))))))) (assert...
null
https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.25.scm
scheme
the following lists: or
#lang racket/base (require "../lib/test.rkt") Exercise 2.25 . Give combinations of cars and that will pick 7 from each of ( 1 3 ( 5 7 ) 9 ) ( ( 7 ) ) ( 1 ( 2 ( 3 ( 4 ( 5 ( 6 7 ) ) ) ) ) ) (define a '(1 3 (5 7) 9)) (define b '((7))) (define c '(1 (2 (3 (4 (5 (6 7))))))) (assert-equal 7 (car (cdaddr a))) ...
0197a889f7ab42b7b3208043640566aadc15fed16175e93e69856aae894a55f2
emqx/emqx
emqx_authz_api_sources.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/emqx/609cd01a35859bf079043a933c4edb72ea2ea8e2/apps/emqx_authz/src/emqx_authz_api_sources.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_authz_api_sources). -behaviour(minirest_api). -include("emqx_authz.hrl"). -includ...
86b27c1d79ea3503bfddc4759989d8c4a51c1eacb3e282c91ea2fdc25a36ce98
chaoxu/fancy-walks
UnionFind.hs
import Control.Monad.ST import Data.Array.ST type UnionFind s = STUArray s Int Int buildUF :: (Int, Int) -> ST s (UnionFind s) buildUF bnds = newArray bnds (-1) findUF :: UnionFind s -> Int -> ST s Int findUF uf a = do fa <- readArray uf a if fa == -1 then return a else do ret <- findUF ...
null
https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/snippets/UnionFind.hs
haskell
import Control.Monad.ST import Data.Array.ST type UnionFind s = STUArray s Int Int buildUF :: (Int, Int) -> ST s (UnionFind s) buildUF bnds = newArray bnds (-1) findUF :: UnionFind s -> Int -> ST s Int findUF uf a = do fa <- readArray uf a if fa == -1 then return a else do ret <- findUF ...
a21c85d640bae53492e85b206fd238567296ba92407e0ee0235615916be38fc1
pablomarx/Thomas
runtime-functions.scm
* Copyright 1992 Digital Equipment Corporation ;* All Rights Reserved ;* ;* Permission to use, copy, and modify this software and its documentation is ;* hereby granted only under the following terms and conditions. Both the ;* above copyright notice and this permission notice mus...
null
https://raw.githubusercontent.com/pablomarx/Thomas/c8ab3f6fa92a9a39667fe37dfe060b651affb18e/kits/gambit/src/runtime-functions.scm
scheme
* All Rights Reserved * * Permission to use, copy, and modify this software and its documentation is * hereby granted only under the following terms and conditions. Both the * above copyright notice and this permission notice must appear in all copies * of the software, derivative works or modi...
* Copyright 1992 Digital Equipment Corporation * and hereby grant back to Digital a non - exclusive , unrestricted , royalty - free * their best efforts to return to Digital any such changes , enhancements or * extensions that they make and inform Digital of noteworthy uses of this * software . Correspo...
cf61c3ac627f0ae135708ae767f3fae06d585d3d7e5b4e79d29870299eb5222e
mfoemmel/erlang-otp
egd_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2007 - 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/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/percept/test/egd_SUITE.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 2007 - 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(egd_SUITE). -include("test_server....
89d5959bd155069c881e9f2dcbb03b8d356bac3977a1ae01505f52311102f805
cenary-lang/cenary
CodegenError.hs
module Cenary.Codegen.CodegenError where import Cenary.Syntax import Data.Semigroup ((<>)) data ErrorDetails = NoDetails | ExprDetails Expr | StmtDetails Stmt | TextDetails String deriving Show -- TODO: we can use a manual ins...
null
https://raw.githubusercontent.com/cenary-lang/cenary/bf5ab4ac6bbc2353b072d32de2f3bc86cbc88266/src/Cenary/Codegen/CodegenError.hs
haskell
TODO: we can use a manual instance declaration, actually.
module Cenary.Codegen.CodegenError where import Cenary.Syntax import Data.Semigroup ((<>)) data ErrorDetails = NoDetails | ExprDetails Expr | StmtDetails Stmt | TextDetails String data CodegenError = MainFunctionDoesNotExist | VariableNo...
915184a634bec7104f804563972a6d745c88ce38a8881d217fb049ce2e6adcad
hammerlab/biokepi
ttfi_pipeline.ml
(** This test uses the high-level EDSL and tries different compilation targets, but does not produce runnable workflows. The workflow itself is voluntarily too big and abuses lambda expressions. *) open Nonstd module type TEST_PIPELINE = functor (Bfx : Biokepi.EDSL.Semantics) -> sig val run : unit ->...
null
https://raw.githubusercontent.com/hammerlab/biokepi/d64eb2c891b41bda3444445cd2adf4e3251725d4/src/test/ttfi_pipeline.ml
ocaml
* This test uses the high-level EDSL and tries different compilation targets, but does not produce runnable workflows. The workflow itself is voluntarily too big and abuses lambda expressions.
open Nonstd module type TEST_PIPELINE = functor (Bfx : Biokepi.EDSL.Semantics) -> sig val run : unit -> unit Bfx.observation end module Run_test(Test_pipeline : TEST_PIPELINE) = struct let write_file file ~content = let out_file = open_out file in try output_string out_file content; ...
f01f909cbc7b804b17fc65d7a1126c239b13ef4d90ac479c9f102140a8236b1f
SamB/coq
discharge.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/toplevel/discharge.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i $Id$ i
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Sign open Cooking ope...
2ac090fec9515ddfd2c5c11d9cd3875998d56155b1da84a4bee0b4b0d7ab64ca
EligiusSantori/L2Apf
refresh_manor.scm
(module logic racket/base (require "../packet/game/client/refresh_manor_list.scm" (only-in "../system/connection.scm" send-packet) ) (provide refresh-manor) (define (refresh-manor connection) (send-packet connection (game-client-packet/refresh-manor-list)) ) )
null
https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/api/refresh_manor.scm
scheme
(module logic racket/base (require "../packet/game/client/refresh_manor_list.scm" (only-in "../system/connection.scm" send-packet) ) (provide refresh-manor) (define (refresh-manor connection) (send-packet connection (game-client-packet/refresh-manor-list)) ) )
b23f698b200bea8a92548e4321ac85bbe25b5f5398f0fbe8d0199937bed16f5f
ryanpbrewster/haskell
distinct_subsequences.hs
-- distinct_subsequences.hs - Challenge Description : - - A subsequence of a given sequence S consists of S with zero or more elements - deleted . Formally , a sequence Z = z1z2 .. zk is a subsequence of - X = x1x2 ... xm , if there exists a strictly increasing sequence < i1,i2 ... > - of indicies of...
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/CodeEval/distinct_subsequences.hs
haskell
distinct_subsequences.hs
- Challenge Description : - - A subsequence of a given sequence S consists of S with zero or more elements - deleted . Formally , a sequence Z = z1z2 .. zk is a subsequence of - X = x1x2 ... xm , if there exists a strictly increasing sequence < i1,i2 ... > - of indicies of X such that for all j=1,2, ...
8a30716d8bea762061999f821aa7854120f1761839d7b47adae01f66eedceda5
Shirakumo/kandria
main-menu.lisp
(in-package #:org.shirakumo.fraf.kandria) (defclass news-display (label) ((alloy:value :initform "") (up-to-date :initform T :accessor up-to-date) (markup :initform () :accessor markup))) (defmethod initialize-instance :after ((display news-display) &key) (fetch-news display)) (presentations:define-realiza...
null
https://raw.githubusercontent.com/Shirakumo/kandria/5bde3e568967063a37341454a70d0424ffff0484/ui/main-menu.lisp
lisp
Swap out the next and previous. i<max_attempts; ++i){ Only enter the wave if we have tesselation available. Show prompt to try and resume from report save file.
(in-package #:org.shirakumo.fraf.kandria) (defclass news-display (label) ((alloy:value :initform "") (up-to-date :initform T :accessor up-to-date) (markup :initform () :accessor markup))) (defmethod initialize-instance :after ((display news-display) &key) (fetch-news display)) (presentations:define-realiza...
e727c2251cad4c45d3a692e5bca7f01b4338182ab867c279abc20fb677596b02
jakemcc/sicp-study
1.17.clj
Exercise 1.17 Original O(b ) ( defn my - mult [ a b ] ; (if (= b 0) ; 0 ; (+ a (my-mult a (- b 1))))) (defn doub [x] (* x 2)) (defn halve [x] (/ x 2)) (defn my-mult [a b] (cond (= b 0) 0 (even? b) (my-mult (doub a) (halve b)) :else (+ a (my-mult a (dec b))))) (defn print-mult [a b] ...
null
https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section1.2/1.17.clj
clojure
(if (= b 0) 0 (+ a (my-mult a (- b 1)))))
Exercise 1.17 Original O(b ) ( defn my - mult [ a b ] (defn doub [x] (* x 2)) (defn halve [x] (/ x 2)) (defn my-mult [a b] (cond (= b 0) 0 (even? b) (my-mult (doub a) (halve b)) :else (+ a (my-mult a (dec b))))) (defn print-mult [a b] (do println (str a " * " b " = " (my-mult a b)))) (print-mu...
3e13c3793df09c3fb84354d68b0e7243092fce4e25884d56ac27408e19237cb6
nikita-volkov/ptr-poker
Write.hs
module PtrPoker.Write where import qualified Data.ByteString as ByteString import qualified Data.ByteString.Internal as ByteString import qualified PtrPoker.ByteString as ByteString import qualified PtrPoker.Ffi as Ffi import qualified PtrPoker.Poke as Poke import PtrPoker.Prelude hiding (concat) import qualified PtrP...
null
https://raw.githubusercontent.com/nikita-volkov/ptr-poker/f2bb3652ae0f0ca58d4b4528888c4340257d0249/library/PtrPoker/Write.hs
haskell
| | Specification of how many bytes to allocate and how to populate them. Useful for creating strict bytestrings and tasks like that. # INLINE (<>) # | # INLINE fromString # | | Render Word8 as byte. | Render Word16 in Little-endian. | Render Word16 in Big-endian. | | Render Word32 in Big-endian. | Re...
module PtrPoker.Write where import qualified Data.ByteString as ByteString import qualified Data.ByteString.Internal as ByteString import qualified PtrPoker.ByteString as ByteString import qualified PtrPoker.Ffi as Ffi import qualified PtrPoker.Poke as Poke import PtrPoker.Prelude hiding (concat) import qualified PtrP...
9fce5667ebd538329de70e15fe7f8ac7789e0e47c0ccfc496480f321d5352471
poor-a/erlang-ffi
OTP.hs
-- | Module : Foreign . Erlang . OTP Copyright : ( c ) , 2008 ( c ) , 2015 -- License : GPL3 -- -- Maintainer : -- Stability : experimental -- Portability : portable -- module Foreign.Erlang.OTP ( module Foreign.Erlang.OTP.GenServer , module Foreign.Erlang.OTP.Mnesia )...
null
https://raw.githubusercontent.com/poor-a/erlang-ffi/9d03d5a0f2000ad3e3f12c721c8b597ba42185b6/src/Foreign/Erlang/OTP.hs
haskell
| License : GPL3 Maintainer : Stability : experimental Portability : portable
Module : Foreign . Erlang . OTP Copyright : ( c ) , 2008 ( c ) , 2015 module Foreign.Erlang.OTP ( module Foreign.Erlang.OTP.GenServer , module Foreign.Erlang.OTP.Mnesia ) where import Foreign.Erlang.OTP.GenServer import Foreign.Erlang.OTP.Mnesia
c5642a1f97fb3e58bf6c225ae6a99ea0e99305eaab09642d80e7bdcbf9f017d3
pfdietz/ansi-test
format-o.lsp
;-*- Mode: Lisp -*- Author : Created : Sun Aug 1 06:36:30 2004 ;;;; Contains: Tests of format directive ~O (deftest format.o.1 (let ((fn (formatter "~o"))) (with-standard-io-syntax (loop for x = (ash 1 (+ 2 (random 80))) for i = (- (random (+ x x)) x) for s1 = (for...
null
https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/printer/format/format-o.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of format directive ~O Comma tests Must add tests for non-integers when the parameters are specified, but it's not clear what the meaning is. Are comma-char and comma-interval always ignored? # arguments Randomized test
Author : Created : Sun Aug 1 06:36:30 2004 (deftest format.o.1 (let ((fn (formatter "~o"))) (with-standard-io-syntax (loop for x = (ash 1 (+ 2 (random 80))) for i = (- (random (+ x x)) x) for s1 = (format nil "~O" i) for j = (let ((*read-base* 8)) (read-from...
5891e9b8e6560deb2cc37486d60449e652a2a571a8c6cb88b21e206ce487894a
hyperfiddle/electric
hfql16.clj
(ns dustin.hfql16 (:refer-clojure :exclude [sequence]) (:require [dustin.fiddle :refer :all] [dustin.hf-nav :refer :all] [meander.epsilon :as m :refer [match]] [minitest :refer [tests]] [promesa.core :as p])) (defn pureSR [a] (fn [s] (p/resolved [s a]))) (defn ru...
null
https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2020/hfql/hfql16.clj
clojure
fails (fn [s] (let [as (->> Sas (map (fn [Sa] (let [[s' a] (run Sa s)] a))))] [s (apply f as)]))) (tests (run (sequence []) {}) := [{} []] ) --- lift ?
(ns dustin.hfql16 (:refer-clojure :exclude [sequence]) (:require [dustin.fiddle :refer :all] [dustin.hf-nav :refer :all] [meander.epsilon :as m :refer [match]] [minitest :refer [tests]] [promesa.core :as p])) (defn pureSR [a] (fn [s] (p/resolved [s a]))) (defn ru...
0edc31f62fa7d25117ef6860f3ee879f05a406c6d48b9a19b39510a1b90784f7
xu-hao/QueryArrow
Utils.hs
# LANGUAGE TypeFamilies , MultiParamTypeClasses , ExistentialQuantification , FlexibleInstances , OverloadedStrings , RankNTypes , FlexibleContexts , GADTs # RankNTypes, FlexibleContexts, GADTs #-} module QueryArrow.Utils where import QueryArrow.DB.ResultStream import QueryArrow.Syntax.Term import QueryA...
null
https://raw.githubusercontent.com/xu-hao/QueryArrow/4dd5b8a22c8ed2d24818de5b8bcaa9abc456ef0d/QueryArrow-common/src/QueryArrow/Utils.hs
haskell
map from predicate name to database names construct map from predicates to db names update property insert delete update property
# LANGUAGE TypeFamilies , MultiParamTypeClasses , ExistentialQuantification , FlexibleInstances , OverloadedStrings , RankNTypes , FlexibleContexts , GADTs # RankNTypes, FlexibleContexts, GADTs #-} module QueryArrow.Utils where import QueryArrow.DB.ResultStream import QueryArrow.Syntax.Term import QueryA...
d5332b6e9590aa450da81ba475a7e85815192223e49b649b1fbadde499b8c008
jyh/metaprl
nuprl_experiments.mli
extends Ma_subtype_1
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/mesa/nuprl_experiments.mli
ocaml
extends Ma_subtype_1
45db1be3b9b391d7d27e877f1c43a3cae3041a17a0000f8f1c306ca560cdf9f2
AlexanderButs/ecrontab
crontab_schedule_tests.erl
-module(crontab_schedule_tests). -author("alexb"). -include_lib("eunit/include/eunit.hrl"). -compile(export_all). % parse tests should_throw_if_incorrect_field_value_test() -> ?assertException(throw, {bad_field, _}, crontab_schedule:parse("/10 * * * *")), ?assertException(throw, {bad_field, _}, crontab...
null
https://raw.githubusercontent.com/AlexanderButs/ecrontab/a3d43cb05685917620f0af693a5309c764b87304/src/crontab_schedule_tests.erl
erlang
parse tests slash tests dash tests comma tests mixed tests just numer tests get_next_occurrence tests Minute tests Hour tests Test month 30,31 days Non-leap year tests get_next_occurrence_after_ms tests
-module(crontab_schedule_tests). -author("alexb"). -include_lib("eunit/include/eunit.hrl"). -compile(export_all). should_throw_if_incorrect_field_value_test() -> ?assertException(throw, {bad_field, _}, crontab_schedule:parse("/10 * * * *")), ?assertException(throw, {bad_field, _}, crontab_schedule:parse...
5e4927f7dd7ecf4db0230c785de5b1deca2b06cd476a3d9790937f4e61c3a8b6
ghcjs/ghcjs-dom
CSSKeyframesRule.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.CSSKeyframesRule (js_insertRule, insertRule, js_appendRule, appendRule, js_dele...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/CSSKeyframesRule.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.CSSKeyframesRule (js_insertRule, insertRule, js_appendRule, appendRule, js_deleteRule, deleteRule, js_findRule, findRule, findRule_, findRuleUnsafe, findRuleUnchecked, js...
61341a34a675ccc0ac1c15b820d14edbbb397110031ac6f7dd6a623d8dd62954
callum-oakley/advent-of-code
10.clj
(ns aoc.2018.10 (:require [aoc.ocr :as ocr] [aoc.vector :refer [+v]] [clojure.test :refer [deftest is]])) (defn parse [s] (->> s (re-seq #"-?\d+") (map read-string) (partition 2) (map vec) (partition 2))) (defn part-* [seconds points] (->> points (iterate #(map (fn [[p v]] [(+v p v) v]) %)) (dro...
null
https://raw.githubusercontent.com/callum-oakley/advent-of-code/c8d9d912471415b0014707f768946b18f29b4531/src/aoc/2018/10.clj
clojure
by inspection
(ns aoc.2018.10 (:require [aoc.ocr :as ocr] [aoc.vector :refer [+v]] [clojure.test :refer [deftest is]])) (defn parse [s] (->> s (re-seq #"-?\d+") (map read-string) (partition 2) (map vec) (partition 2))) (defn part-* [seconds points] (->> points (iterate #(map (fn [[p v]] [(+v p v) v]) %)) (dro...
55948beb00dbd390cd94ee191a548551f7324cdcb6e7163a8626fde2d4f528a8
practicalli/four-clojure
012_intro_to_sequences.clj
(ns four-clojure.012-intro-to-sequences) # 012 Intro to Sequences ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Difficulty: Elementary ;; Topics: All Clojure collections support sequencing . You can operate on sequences with functions like first , second , and last . ;; Tests (= _ _ ( first ' ( 3 2 1 ) ) ) ...
null
https://raw.githubusercontent.com/practicalli/four-clojure/9812b63769a06f9b0bfd63e5ffce380b67e5468b/src/four_clojure/012_intro_to_sequences.clj
clojure
Difficulty: Elementary Topics: Tests (= __ (last (list 1 2 3))) A simple exploration of data structures as sequences. Notice that the sequence functions work on both lists and vectors in the same way. Answers summary
(ns four-clojure.012-intro-to-sequences) # 012 Intro to Sequences All Clojure collections support sequencing . You can operate on sequences with functions like first , second , and last . (= _ _ ( first ' ( 3 2 1 ) ) ) (= _ _ ( second [ 2 3 4 ] ) ) Deconstruct the problem (first '(3 2 1)) = > 3 (...
17410a3550319709af05fa295f7ddbb04652861d0e805bcedb7ce54f6624e844
nyu-acsys/drift
a-sub.ml
let rec sub_helper hi hstart hn hlen (ha: int array) (hb: int array) = if (hlen > 0 && hi < hlen) then (Array.set hb hi (Array.get ha hstart); sub_helper (hi + 1) (hstart + 1) hn hlen ha hb) else () let rec sub (ma: int array) mstart mlen = let la = Array.length ma in let mb = Array.make mlen 0 in sub_helpe...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks_call/DRIFT/array/a-sub.ml
ocaml
let rec sub_helper hi hstart hn hlen (ha: int array) (hb: int array) = if (hlen > 0 && hi < hlen) then (Array.set hb hi (Array.get ha hstart); sub_helper (hi + 1) (hstart + 1) hn hlen ha hb) else () let rec sub (ma: int array) mstart mlen = let la = Array.length ma in let mb = Array.make mlen 0 in sub_helpe...
666f8a0044995c36ffd86bb9f72a9840748c3028536ea773debbdb6fe5be8304
theangelperalta/cl-objc
reader-macro.lisp
(in-package :objc-reader) (defparameter *old-readtable* nil) (defparameter *objc-readtable* nil) (defparameter *objc-argument-readtable* nil "The readtable used to read arguments of messages") (defparameter *accept-untyped-call* t "If nil, methods have to be invoked with input type parameters.") (defparameter *use...
null
https://raw.githubusercontent.com/theangelperalta/cl-objc/6daf2edf6d922e7ee1acaf259ea5510b16580379/src/reader-macro.lisp
lisp
using the old readtable so we need to convert the ] into 'eof the params are read All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above cop...
(in-package :objc-reader) (defparameter *old-readtable* nil) (defparameter *objc-readtable* nil) (defparameter *objc-argument-readtable* nil "The readtable used to read arguments of messages") (defparameter *accept-untyped-call* t "If nil, methods have to be invoked with input type parameters.") (defparameter *use...
85cbb438c6653bbeefdeb491d38ecc4851968b3a8783f68ff1745745ac081a51
AeroNotix/lispkit
package.lisp
(defpackage #:lispkit-test (:use :cl :lispkit :prove))
null
https://raw.githubusercontent.com/AeroNotix/lispkit/2482dbeabc79667407dabe7765dfbffc16584b08/test/package.lisp
lisp
(defpackage #:lispkit-test (:use :cl :lispkit :prove))
2396d04af3d5eaf7e29dc33236ee2b6432ce2a6573e8af1142345d5866b6498c
alex-hhh/ActivityLog2
inspect-best-avg.rkt
#lang racket/base ;; inspect-mean-max.rkt -- mean-max plot view for a session. This is not ;; supported for swimming activites. ;; ;; This file is part of ActivityLog2, an fitness activity tracker Copyright ( C ) 2015 , 2018 , 2019 , 2020 , 2021 < > ;; ;; This program is free software: you can redistribute it and...
null
https://raw.githubusercontent.com/alex-hhh/ActivityLog2/b3aa88bb840b79e5a363a96b5ab35faf7aaf5a5b/rkt/session-inspector/inspect-best-avg.rkt
racket
inspect-mean-max.rkt -- mean-max plot view for a session. This is not supported for swimming activites. This file is part of ActivityLog2, an fitness activity tracker This program is free software: you can redistribute it and/or modify it any later version. This program is distributed in the hope that it will...
#lang racket/base Copyright ( C ) 2015 , 2018 , 2019 , 2020 , 2021 < > under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) (require data-frame db/base pict/snip plot-container ...
4aff82047b7b251b5517b83a1443aaaf5694abdf2bf3cb90b8e650bc41fa35f1
jeapostrophe/raart
hack.rkt
#lang racket/base (require racket/match racket/format racket/list lux raart struct-define) (define rows 24) (define cols 80) (define world-rows (- rows 3)) (define world-cols cols) (struct obj (ox oy oc)) (define-struct-define obj-define obj) (define-struct-define hack-de...
null
https://raw.githubusercontent.com/jeapostrophe/raart/9d82f2f8ad0052c2f4a6a75a00d957b9806f33df/t/hack.rkt
racket
#lang racket/base (require racket/match racket/format racket/list lux raart struct-define) (define rows 24) (define cols 80) (define world-rows (- rows 3)) (define world-cols cols) (struct obj (ox oy oc)) (define-struct-define obj-define obj) (define-struct-define hack-de...
3bc537d22f7160ec49fe55fda130b203dd7aeb30c5f9e671ea083aa22b5303bb
LaurentMazare/ocaml-bert
gpt2_vocab.ml
vocab file : -vocab.json merge file : -merges.txt merge file: -merges.txt *) open! Base module String_pair = struct module T = struct type t = string * string [@@deriving sexp] let compare (s1, s1') (s2, s2') = let cmp = String.compare s1 s2 in if cmp <> 0 then cmp else String.compar...
null
https://raw.githubusercontent.com/LaurentMazare/ocaml-bert/23d6697833cc54173d075f904a1018db0265261d/src/tokenize/gpt2_vocab.ml
ocaml
vocab file : -vocab.json merge file : -merges.txt merge file: -merges.txt *) open! Base module String_pair = struct module T = struct type t = string * string [@@deriving sexp] let compare (s1, s1') (s2, s2') = let cmp = String.compare s1 s2 in if cmp <> 0 then cmp else String.compar...
9054867f7c651eef2b56001732e275cdcebc269d75633fd61beba7d2cdd1e299
Bogdanp/racket-kafka
producer.rkt
#lang racket/base (require kafka kafka/producer racket/format) (define c (make-client)) (define p (make-producer c)) (define t "example-topic") (create-topics c (make-CreateTopic #:name t #:partitions 2)) (define evts (for/list ([i (in-range 128)]) (define pid (modulo i 2)) (define k...
null
https://raw.githubusercontent.com/Bogdanp/racket-kafka/81f10078fa3c31b0dfd493a2142408c2c8dd1b59/example/producer.rkt
racket
#lang racket/base (require kafka kafka/producer racket/format) (define c (make-client)) (define p (make-producer c)) (define t "example-topic") (create-topics c (make-CreateTopic #:name t #:partitions 2)) (define evts (for/list ([i (in-range 128)]) (define pid (modulo i 2)) (define k...
f77324eda8a118f942ee2a0754952dfc192132a63b6c1ad9417b73fd0b74ffa8
vbmithr/ocaml-actor
test.ml
open Core open Async open Alcotest_async module Event = struct type t = unit let dummy = () let level () = Logs.Info let pp ppf () = Format.pp_print_bool ppf true let http_port = None end module Request = struct type 'a t = unit type view = unit let view () = () let level _ = Logs.Debug let pp p...
null
https://raw.githubusercontent.com/vbmithr/ocaml-actor/d1c7dd1ad81a8e33efb1de07d5ce7db2edb91273/test/test.ml
ocaml
open Core open Async open Alcotest_async module Event = struct type t = unit let dummy = () let level () = Logs.Info let pp ppf () = Format.pp_print_bool ppf true let http_port = None end module Request = struct type 'a t = unit type view = unit let view () = () let level _ = Logs.Debug let pp p...
603f07a7d9da9eb8441cbbb1b18a63bbb382952e37e16be69ef7a421b5016cc6
haskell/fgl
Monad.hs
# LANGUAGE CPP , MultiParamTypeClasses # ( c ) 2002 by [ see file COPYRIGHT ] -- | Monadic Graph Algorithms module Data.Graph.Inductive.Query.Monad( -- * Additional Graph Utilities mapFst, mapSnd, (><), orP, -- * Graph Transformer Monad GT(..), apply, apply', applyWith, applyWith', runGT, condMGT'...
null
https://raw.githubusercontent.com/haskell/fgl/a2c7fb6bd4b5658c885f0927dad7d61dd7a94f80/Data/Graph/Inductive/Query/Monad.hs
haskell
| Monadic Graph Algorithms * Additional Graph Utilities * Graph Transformer Monad * Graph Computations Based on Graph Monads ** Monadic Graph Accessing Functions * Examples: Graph Algorithms as Instances of Recursion Operators ** Instances of graphRec Why all this? graph monad ensures single-threaded access ...
# LANGUAGE CPP , MultiParamTypeClasses # ( c ) 2002 by [ see file COPYRIGHT ] module Data.Graph.Inductive.Query.Monad( mapFst, mapSnd, (><), orP, GT(..), apply, apply', applyWith, applyWith', runGT, condMGT', recMGT', condMGT, recMGT, getNode, getContext, getNodes', getNodes, sucGT, sucM, * * De...
5d991448390c82d81873ac85db41f6c5dbc76d7ddc9b3b6deaa2735a859e884c
ygmpkk/house
DebugLex.hs
module Main where import System (getArgs) import IO import Text.XML.HaXml.Lex (xmlLex) import Text.XML.HaXml.Wrappers (fix2Args) Debug the HaXml library by showing what the lexer generates . main = fix2Args >>= \(inf,outf)-> ( if inf=="-" then getContents else readFile inf ) >>= \content-> ...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/HaXml/examples/DebugLex.hs
haskell
module Main where import System (getArgs) import IO import Text.XML.HaXml.Lex (xmlLex) import Text.XML.HaXml.Wrappers (fix2Args) Debug the HaXml library by showing what the lexer generates . main = fix2Args >>= \(inf,outf)-> ( if inf=="-" then getContents else readFile inf ) >>= \content-> ...
0d4187b62fd6915a75acc94f5d7fb58de00f461e2e8bc512ffe8236db8a471a7
shortishly/pgec
pgec.erl
Copyright ( c ) 2022 < > %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, software distributed under...
null
https://raw.githubusercontent.com/shortishly/pgec/c9dc938340cb8d0db5e1a241f8ab122313e7b9ea/src/pgec.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissi...
Copyright ( c ) 2022 < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(pgec). -export([get_env/1]). -export([priv_consult/1]). -export([priv_dir/0]). -export([start/0]). -export([version/0]). version() ->...
9fcf0233416e3c257d79fedacae72bc493a177529ca7813b5fd559fe2ebe01e4
batsh-dev-team/Dlist
dlist_test.ml
Copyright ( c ) 2013 , BYVoid < > All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : * Redistributions of source code must retain the above copyright notice , this list of condit...
null
https://raw.githubusercontent.com/batsh-dev-team/Dlist/4f57f7cd0231d30b51673da7a64ed2cf52c14074/test/dlist_test.ml
ocaml
Copyright ( c ) 2013 , BYVoid < > All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : * Redistributions of source code must retain the above copyright notice , this list of condit...
8976d32ea26ee1d5cad5a8f9d6132e33d4519abd2d75d0d811623c942f3477ee
namin/biohacker
sudoku-prototype.lisp
(in-package :COMMON-LISP-USER) (eval `(constraint sudoku-board ,(apply #'concatenate 'list (loop for i from 1 to 9 collect (loop for j from 1 to 9 collect `(,(name i j) cell)))) (formulae ,@(apply #'concatenate 'list (loop for vss in (list (rows) (cols) (units)) collect (apply...
null
https://raw.githubusercontent.com/namin/biohacker/6b5da4c51c9caa6b5e1a68b046af171708d1af64/BPS/tcon/sudoku-prototype.lisp
lisp
(in-package :COMMON-LISP-USER) (eval `(constraint sudoku-board ,(apply #'concatenate 'list (loop for i from 1 to 9 collect (loop for j from 1 to 9 collect `(,(name i j) cell)))) (formulae ,@(apply #'concatenate 'list (loop for vss in (list (rows) (cols) (units)) collect (apply...
ac2bd66f32a935e2953dce2f717b36c6bece8ea94e83b7b67702d1e48b672b0f
kompendium-ano/api-factom
Chain.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # {-# LANGUAGE TypeOperators #-} module Factom.Rest.Client.Types.Chain where import Control....
null
https://raw.githubusercontent.com/kompendium-ano/api-factom/68359e60d82515c6fd66134f8b3661e827eb6599/factom-oapi-client/src/Factom/Rest/Client/Types/Chain.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards # # LANGUAGE TypeOperators # ------------------------------------------------------------------------------
# LANGUAGE DeriveGeneric # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # module Factom.Rest.Client.Types.Chain where import Control.Applicative import Control.Monad (forM_, join, mzero) import Data.Aeson (FromJSON (..), T...
935e4e828ca952559081e6dd74584dd554f9b872dbb615bf3cd30a7615f0e19a
Tclv/HaskellBook
numberintowords.hs
module WordNumber where import Data.List (intersperse) import Data.Char digitToWord :: Int -> String digitToWord n | n >= 0 && n < 10 = (chr ((ord '0') + n)) : [] digits :: Int -> [Int] digits n | n < 10 = [n] | otherwise = (digits quot) ++ [rem] where (quot, rem) = quotRem n 10 wordNumber :: I...
null
https://raw.githubusercontent.com/Tclv/HaskellBook/78eaa5c67579526b0f00f85a10be3156bc304c14/ch8/numberintowords.hs
haskell
module WordNumber where import Data.List (intersperse) import Data.Char digitToWord :: Int -> String digitToWord n | n >= 0 && n < 10 = (chr ((ord '0') + n)) : [] digits :: Int -> [Int] digits n | n < 10 = [n] | otherwise = (digits quot) ++ [rem] where (quot, rem) = quotRem n 10 wordNumber :: I...
a76a4f797a14423653c0d49c12bb3a52e378bf210d57d464628d4728b693ef69
ThoughtWorksInc/infra-problem
core.clj
(ns common-utils.core) (defn config "Gets a configuration value from the environment" [var-name default] (if-let [val (get (System/getenv) var-name)] val default))
null
https://raw.githubusercontent.com/ThoughtWorksInc/infra-problem/cd4e94377e11d5545de06732e36213ccbd05c2ba/common-utils/src/common_utils/core.clj
clojure
(ns common-utils.core) (defn config "Gets a configuration value from the environment" [var-name default] (if-let [val (get (System/getenv) var-name)] val default))
f3dc486053eba5a83a5652df074782cc0b0c91e8bc4bfc5d2d56c9ff21b5a49e
cedlemo/OCaml-GI-ctypes-bindings-generator
Menu_direction_type.mli
open Ctypes type t = Parent | Child | Next | Prev val of_value: Unsigned.uint32 -> t val to_value: t -> Unsigned.uint32 val t_view: t typ
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Menu_direction_type.mli
ocaml
open Ctypes type t = Parent | Child | Next | Prev val of_value: Unsigned.uint32 -> t val to_value: t -> Unsigned.uint32 val t_view: t typ
0809d8048f6f844a426305369cc9778bb747ef4e4a41010d7ccd5340bdb6bb3b
racket/typed-racket
mandelbrot.rkt
#lang typed/racket/base/shallow #:optimize (require racket/future racket/flonum) (define: MAX-ITERS : Positive-Fixnum 50) (define MAX-DIST 2.0) (define: N : Positive-Fixnum 512) (: mandelbrot-point : Integer Integer -> Integer) (define (mandelbrot-point x y) (define c (+ (- (/ (* 2.0 (->fl x)) N) 1.5) (* 0...
null
https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/shallow/mandelbrot.rkt
racket
#lang typed/racket/base/shallow #:optimize (require racket/future racket/flonum) (define: MAX-ITERS : Positive-Fixnum 50) (define MAX-DIST 2.0) (define: N : Positive-Fixnum 512) (: mandelbrot-point : Integer Integer -> Integer) (define (mandelbrot-point x y) (define c (+ (- (/ (* 2.0 (->fl x)) N) 1.5) (* 0...
682392897810d8a596f61e2f2025a08a8964b74a2d0a7e481dc255204564e6cb
vseloved/cl-agraph
agraph.lisp
CL - AGRAPH core ( c ) Vsevolod Dyomkin . see LICENSE file for permissions (in-package :agraph) (named-readtables:in-readtable rutils-readtable) (defstruct (ag-config (:conc-name ag-)) (scheme :http) (host "localhost") (port 10035) catalog repo (user "test") (pass "xyzzy") session) (defvar *ag* ...
null
https://raw.githubusercontent.com/vseloved/cl-agraph/e605b34fa57a9ede6fb6cc13ef82fc3438898567/src/agraph.lisp
lisp
CL - AGRAPH core ( c ) Vsevolod Dyomkin . see LICENSE file for permissions (in-package :agraph) (named-readtables:in-readtable rutils-readtable) (defstruct (ag-config (:conc-name ag-)) (scheme :http) (host "localhost") (port 10035) catalog repo (user "test") (pass "xyzzy") session) (defvar *ag* ...
bbabcc0512058958eca7d5e5b554d464ff4ebe40f7a131f6523f1c0203765a88
byulparan/cl-collider
synthdef.lisp
(in-package #:sc) (defclass synthdef () ((name :initarg :name :accessor name) (controls :initarg :controls :initform nil :accessor controls) (named-controls :initform nil :accessor named-controls) (control-names :initarg :control-names :initform nil :accessor control-names) (control-ugen-count :accessor...
null
https://raw.githubusercontent.com/byulparan/cl-collider/d601c1b6ace8fb7cf6d1ee0862a85fd80441d1ab/synthdef.lisp
lisp
build -------------------------------------------------------------------------------------- default to full volume for embedded synths avoid converting names of local bindings ====================================================================== ===================================================================...
(in-package #:sc) (defclass synthdef () ((name :initarg :name :accessor name) (controls :initarg :controls :initform nil :accessor controls) (named-controls :initform nil :accessor named-controls) (control-names :initarg :control-names :initform nil :accessor control-names) (control-ugen-count :accessor...
f2c3d040f1a11996a377d1bfdb2bcdb23f0a1a658198e8fee40bb49c65d1ea3c
yrashk/erlang
orddict.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/stdlib/src/orddict.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(orddict). -export([new/0,is_key/2...
1695268466785b2cd68150d636c3601b246f63007645f8ed584bd630680a0b02
ChrisPenner/rasa
StatusBar.hs
{-# language OverloadedStrings #-} module Rasa.Ext.Views.Internal.StatusBar ( getTopStatusBar , getBottomStatusBar , addTopStatus , addBottomStatus ) where import Rasa.Ext import Rasa.Ext.Views.Internal.AnyRenderable import Data.List import Data.Maybe data GetTopStatusBar = GetTopStatusBar data GetBott...
null
https://raw.githubusercontent.com/ChrisPenner/rasa/a2680324849088ee92f063fab091de21c4c2c086/rasa-ext-views/src/Rasa/Ext/Views/Internal/StatusBar.hs
haskell
# language OverloadedStrings #
module Rasa.Ext.Views.Internal.StatusBar ( getTopStatusBar , getBottomStatusBar , addTopStatus , addBottomStatus ) where import Rasa.Ext import Rasa.Ext.Views.Internal.AnyRenderable import Data.List import Data.Maybe data GetTopStatusBar = GetTopStatusBar data GetBottomStatusBar = GetBottomStatusBar data S...
0c31dfecb4df21cbe00760ff216b3120fcf6aa8aab1a10e8aae27b903a0dae66
racket/frtime
graphics-unit.rkt
#lang racket/base (provide graphics@) (require racket/unit "graphics-sig.rkt" "graphics-posn-less-unit.rkt") (define-unit posn@ (import) (export graphics:posn^) (define-struct posn (x y) #:mutable)) (define-compound-unit/infer graphics@ (import) (export graphics:posn^ graphics:posn-less^) ...
null
https://raw.githubusercontent.com/racket/frtime/9b9db67581107f4d7b995541c70f2d08f03ae89e/animation/graphics-unit.rkt
racket
#lang racket/base (provide graphics@) (require racket/unit "graphics-sig.rkt" "graphics-posn-less-unit.rkt") (define-unit posn@ (import) (export graphics:posn^) (define-struct posn (x y) #:mutable)) (define-compound-unit/infer graphics@ (import) (export graphics:posn^ graphics:posn-less^) ...
96bbc17e83d3e4c7e77769cf68362217461130b77537ca4cde99037cd4de9655
racketscript/racketscript
interop.rkt
#lang racket/base (require racket/match racket/string (only-in racketscript/compiler/util-untyped js-identifier?)) (provide (rename-out [x-read read] [x-read-syntax read-syntax])) (define (x-read in) (syntax->datum (x-read-syntax #f in))) (define (x-read-sy...
null
https://raw.githubusercontent.com/racketscript/racketscript/f94006d11338a674ae10f6bd83fc53e6806d07d8/racketscript-compiler/racketscript/boot/lang/private/interop.rkt
racket
#lang racket/base (require racket/match racket/string (only-in racketscript/compiler/util-untyped js-identifier?)) (provide (rename-out [x-read read] [x-read-syntax read-syntax])) (define (x-read in) (syntax->datum (x-read-syntax #f in))) (define (x-read-sy...
83ab37b6e4279d99217abbf116e8fc2458d4579393f889834e5be166c7afabfb
sulami/spielwiese
006-sum-square-difference.hs
-- Sum square difference Problem 6 -- The sum of the squares of the first ten natural numbers is , 12 + 22 + ... + 102 = 385 -- The square of the sum of the first ten natural numbers is , ( 1 + 2 + ... + 10)^2 = 552 = 3025 -- Hence the difference between the sum of the squares of the first ten natural num...
null
https://raw.githubusercontent.com/sulami/spielwiese/da354aa112d43d7ec5f258f4b5afafd7a88c8aa8/hEuler/006-sum-square-difference.hs
haskell
Sum square difference natural numbers and the square of the sum. # OPTIONS_GHC -O2 #
Problem 6 The sum of the squares of the first ten natural numbers is , 12 + 22 + ... + 102 = 385 The square of the sum of the first ten natural numbers is , ( 1 + 2 + ... + 10)^2 = 552 = 3025 Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is ...
71e4971c1c247e556ea2b7b803de7f64c5083e162afdb685e1639b7091a86dd0
larcenists/larceny
iter2.scm
(text (iter (seq (nop) (seq z! a!) (nop) ge!))) 00000000 90 nop 00000001 7505 jnz 0x8 00000003 7603 jna 0x8 00000005 90 nop 00000006 7DF8 jnl 0x0
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/prims/iter2.scm
scheme
(text (iter (seq (nop) (seq z! a!) (nop) ge!))) 00000000 90 nop 00000001 7505 jnz 0x8 00000003 7603 jna 0x8 00000005 90 nop 00000006 7DF8 jnl 0x0
6337607aea7820ff9b472ac13885ffee86aedfea4b6af544a3a9db60581b794f
xapi-project/xenvm
log.ml
open Sexplib.Std type traced_operation = [ | `Set of string * string * [ `Producer | `Consumer | `Suspend | `Suspend_ack ] * [ `Int64 of int64 | `Bool of bool ] | `Get of string * string * [ `Producer | `Consumer | `Suspend | `Suspend_ack ] * [ `Int64 of int64 | `Bool of bool ] ] with sexp type traced_operation_li...
null
https://raw.githubusercontent.com/xapi-project/xenvm/401754dfb05376b5fc78c9290453b006f6f38aa1/idl/log.ml
ocaml
open Sexplib.Std type traced_operation = [ | `Set of string * string * [ `Producer | `Consumer | `Suspend | `Suspend_ack ] * [ `Int64 of int64 | `Bool of bool ] | `Get of string * string * [ `Producer | `Consumer | `Suspend | `Suspend_ack ] * [ `Int64 of int64 | `Bool of bool ] ] with sexp type traced_operation_li...
bb7b92913c5bfb144c9fdca84c742713d38ea8f279102f14615e406d4f05044d
GaloisInc/mistral
ResolveTags.hs
module Mistral.CodeGen.ResolveTags where import Mistral.Driver import Mistral.ModuleSystem.Name ( mangleName ) import Mistral.TypeCheck.AST import Mistral.Utils.SCC ( Group ) import Mistral.Utils.PP import Control.Applicative ( (<$>), (<*>), pure ) import Data.Foldable ( foldMap, foldl' ) import q...
null
https://raw.githubusercontent.com/GaloisInc/mistral/3464ab332d73c608e64512e822fe2b8a619ec8f3/src/Mistral/CodeGen/ResolveTags.hs
haskell
| Sets of tags, and the thing that they map to. error "Explicit fail on ambiguous tags pending further discussion" | Construct the static task-tag map for a program. NOTE: resolving tags for bindings won't change the structure of a recursive group, as tags aren't used to identify functions, beyond task declaration...
module Mistral.CodeGen.ResolveTags where import Mistral.Driver import Mistral.ModuleSystem.Name ( mangleName ) import Mistral.TypeCheck.AST import Mistral.Utils.SCC ( Group ) import Mistral.Utils.PP import Control.Applicative ( (<$>), (<*>), pure ) import Data.Foldable ( foldMap, foldl' ) import q...
9040a79c9d8a7683f8c177300629cad4ce9a6c711ee02b86cbdd931e9f882f25
metaocaml/ber-metaocaml
unused_functor_parameter.ml
(* TEST flags = " -w A " * expect *) module Foo(Unused : sig end) = struct end;; [%%expect {| Line 1, characters 11-17: 1 | module Foo(Unused : sig end) = struct end;; ^^^^^^ Warning 60: unused module Unused. module Foo : functor (Unused : sig end) -> sig end |}] module type S = functor (Unused :...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-warnings/unused_functor_parameter.ml
ocaml
TEST flags = " -w A " * expect
module Foo(Unused : sig end) = struct end;; [%%expect {| Line 1, characters 11-17: 1 | module Foo(Unused : sig end) = struct end;; ^^^^^^ Warning 60: unused module Unused. module Foo : functor (Unused : sig end) -> sig end |}] module type S = functor (Unused : sig end) -> sig end;; [%%expect {| Line 1,...
4f102ca002e521cb1a52343f47cd9ffa9069c5cfcd11b177c2d384bb98746acb
codereport/SICP-2020
conor_hoekstra_solutions.rkt
#lang sicp ;;;;; Code from 4.1 ;;;;; from footnote on page 520 ;; -7.4/doc-html/scheme_2.html#SEC24 ;; A Scheme expression is a construct that returns a value. An expression may be a: 1 . literal , 2 . a variable reference , 3 . a special form , 4 . or a procedure call . (define (my-apply p...
null
https://raw.githubusercontent.com/codereport/SICP-2020/2d1e60048db89678830d93fcc558a846b7f57b76/Chapter%205.4%20Solutions/conor_hoekstra_solutions.rkt
racket
-7.4/doc-html/scheme_2.html#SEC24 A Scheme expression is a construct that returns a value. An expression may be a: formal parameters body no else clause enables: eval-if; if? clause in eval enables: lambda? clause in eval enables: variable? clause of eval :( enables: eval-assignment; assignment? c...
#lang sicp Code from 4.1 from footnote on page 520 1 . literal , 2 . a variable reference , 3 . a special form , 4 . or a procedure call . (define (my-apply procedure arguments) (cond ((primitive-procedure? procedure) (apply-primitive-procedure procedure arguments)) ((com...
502c08978d293b75b4780fe9cbcd3c7af1e1bcb29576c96d6ad175034f6c7c07
crategus/cl-cffi-gtk
gtk.builder.lisp
;;; ---------------------------------------------------------------------------- ;;; gtk.builder.lisp ;;; ;;; The documentation of this file is taken from the GTK 3 Reference Manual Version 3.24 and modified to document the Lisp binding to the GTK library . ;;; See <>. The API documentation of the Lisp binding is a...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/ba198f7d29cb06de1e8965e1b8a78522d5430516/gtk/gtk.builder.lisp
lisp
---------------------------------------------------------------------------- gtk.builder.lisp The documentation of this file is taken from the GTK 3 Reference Manual See <>. The API documentation of the Lisp binding is This program is free software: you can redistribute it and/or modify it under the terms of t...
Version 3.24 and modified to document the Lisp binding to the GTK library . available from < -cffi-gtk/ > . Copyright ( C ) 2009 - 2011 Copyright ( C ) 2011 - 2021 as published by the Free Software Foundation , either version 3 of the the GNU Lesser General Public License that clarifies the terms for us...
3f84d46920e19f30c6aa072142033da2eed0ad248d8de11ebbe05136b81f0d39
owickstrom/twitter-kinesis-lab
core_test.clj
(ns twitter-producer.core-test (:require [clojure.test :refer :all] [twitter-producer.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/owickstrom/twitter-kinesis-lab/254111d100b11a1896f713c82d55f9e8e98f2e9e/twitter-producer/test/twitter_producer/core_test.clj
clojure
(ns twitter-producer.core-test (:require [clojure.test :refer :all] [twitter-producer.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
eafaf37981bb6705deb82741619b0ef6f7b12c837a261dff396a5d0e768c166a
kadena-io/chainweaver
ModuleDetails.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # # LANGUAGE ExtendedDefaultRules # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE Type...
null
https://raw.githubusercontent.com/kadena-io/chainweaver/5d40e91411995e0a9a7e782d6bb2d89ac1c65d52/frontend/src/Frontend/UI/ModuleExplorer/ModuleDetails.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE OverloadedStrings # | Details view for a particular module. offers an interface for calling its functions. License : BSD-style (see the file LICENSE) ---------------------------------------------------------------------------- ----------------------------------------...
# LANGUAGE DataKinds # # LANGUAGE ExtendedDefaultRules # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # This view shows details about a particular Pact modu...
1a74ea8493ac8853d3afbdf0100729696a896dffbad56381ae94e165993f3d6a
inclojure-org/intermediate-clojure-workshop
utils.clj
(ns workshop-app.utils (:import (java.time LocalDate) (java.time.temporal ChronoUnit))) (defn parse-dt-str [dt-str] (when (seq dt-str) (LocalDate/parse dt-str))) (defn years-between [d1 d2] (.between ChronoUnit/YEARS d1 d2))
null
https://raw.githubusercontent.com/inclojure-org/intermediate-clojure-workshop/3338a476aa815a587fa9e0b8b3804aa43492d15e/save-points/7/src/workshop_app/utils.clj
clojure
(ns workshop-app.utils (:import (java.time LocalDate) (java.time.temporal ChronoUnit))) (defn parse-dt-str [dt-str] (when (seq dt-str) (LocalDate/parse dt-str))) (defn years-between [d1 d2] (.between ChronoUnit/YEARS d1 d2))
b5ec8abaf425432180dc5bdb7ea58b26ba48542bc0069ecc194d9403e6c44ef3
avsm/melange
dnsquery.ml
dnsquery.ml -- map DNS query - response mechanism onto trie database Copyright ( c ) 2005 - 2006 < > dnsquery.ml -- map DNS query-response mechanism onto trie database Copyright (c) 2005-2006 Tim Deegan <> *) open Dnsrr open Dnstrie open Dns open Dns_rr module H = Hashcons We answe...
null
https://raw.githubusercontent.com/avsm/melange/e92240e6dc8a440cafa91488a1fc367e2ba57de1/lib/dns/dnsquery.ml
ocaml
XXX handle multiple TXT cstrings properly XXX handle multiple cstrings properly XXX Handle multible charstrings properly XXX Support unknown-type responses Get an RRSet, which may not exist Get an RRSet, which must exist Get the SOA RRSet for a negative response Don't need to check if it's already there ...
dnsquery.ml -- map DNS query - response mechanism onto trie database Copyright ( c ) 2005 - 2006 < > dnsquery.ml -- map DNS query-response mechanism onto trie database Copyright (c) 2005-2006 Tim Deegan <> *) open Dnsrr open Dnstrie open Dns open Dns_rr module H = Hashcons We answe...
6798447284ad478ac7b71acf074eb6a3320050abe23e5a9a5e9ce751ecb8d069
0xd34df00d/can-i-haz
Spec.hs
# LANGUAGE MultiParamTypeClasses , RankNTypes , GADTs # import Test.Hspec import Test.HUnit.Lang import Control.DeepSeq import Control.Exception import Data.List import Control.Monad.Except.CoHas import Control.Monad.Reader.Has import Common import TypecheckFailures Reimplementing due to -not-typecheck/issues/18...
null
https://raw.githubusercontent.com/0xd34df00d/can-i-haz/da27c09b1380ee10b859152d542489bcb6296fed/test/Spec.hs
haskell
# LANGUAGE MultiParamTypeClasses , RankNTypes , GADTs # import Test.Hspec import Test.HUnit.Lang import Control.DeepSeq import Control.Exception import Data.List import Control.Monad.Except.CoHas import Control.Monad.Reader.Has import Common import TypecheckFailures Reimplementing due to -not-typecheck/issues/18...
f66a6f939f0998daca9d09fc8b7d53959c52b91eec42c474947316c13d987880
yakaz/yamerl
yamerl_node_binary.erl
%- Copyright ( c ) 2012 - 2014 Yakaz Copyright ( c ) 2016 - 2022 < > % All rights reserved. % % Redistribution and use in source and binary forms, with or without % modification, are permitted provided that the following conditions % are met: 1 . Redistributions of source code must retain the above copyright...
null
https://raw.githubusercontent.com/yakaz/yamerl/bf9d8b743bfc9775f2ddad9fb8d18ba5dc29d3e1/src/yamerl_node_binary.erl
erlang
- All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer. notice, this list of conditions and the following disclaimer in the documen...
Copyright ( c ) 2012 - 2014 Yakaz Copyright ( c ) 2016 - 2022 < > 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ` ` AS IS '' AND IMPLIED WARRANTIES OF MERC...
5396b7b763e78bf8cd67011946ed212601254a7287b21922ff21d6b563b3f701
gregnwosu/haskellbook
Main.hs
module Main where import Addition main :: IO () main = return ()
null
https://raw.githubusercontent.com/gregnwosu/haskellbook/b21fb6772e58f07cff334d9c551d0477ec856897/chapter14/testing/app/Main.hs
haskell
module Main where import Addition main :: IO () main = return ()
ed3d62b97fee6a859163ae07cfc61a2bedb25e3881d3129fa7da81f547b3aa8a
gtk2hs/gtk2hs
UTFString.hs
# LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} GIMP Toolkit ( GTK ) UTF aware string marshalling -- Author : -- Created : 22 June 2001 -- Copyright ( c ) 1999 .. 2002 -- -- This library is free software; you can redistribute it and/or -- modify it under the...
null
https://raw.githubusercontent.com/gtk2hs/gtk2hs/0f90caa1dae319a0f4bbab76ed1a84f17c730adf/glib/System/Glib/UTFString.hs
haskell
# LANGUAGE OverloadedStrings # This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS...
# LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # GIMP Toolkit ( GTK ) UTF aware string marshalling Author : Created : 22 June 2001 Copyright ( c ) 1999 .. 2002 License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your option ) any later version...
98ec94797bf9ca131c63dc638c5a677a0f906e859c1ab1172504955d4e226e28
johnwhitington/haskell-from-the-very-beginning-exercises
Exercises.hs
--Prelimineries length' :: Num b => [a] -> b length' [] = 0 length' (_:xs) = 1 + length' xs map' :: (a -> b) -> [a] -> [b] map' f [] = [] map' f (x:xs) = f x : map' f xs not' :: Bool -> Bool not' False = True not' True = False take' :: (Eq a, Num a) => a -> [b] -> [b] take' 0 l = [] take' n (x:xs) = x : take'...
null
https://raw.githubusercontent.com/johnwhitington/haskell-from-the-very-beginning-exercises/18bda69bf8a0233feb6f023c6a2219b7c20e9fa1/exercises/Chapter9/Exercises.hs
haskell
Prelimineries Haskell won't let us re-use a name in a script, so we call this length'2
length' :: Num b => [a] -> b length' [] = 0 length' (_:xs) = 1 + length' xs map' :: (a -> b) -> [a] -> [b] map' f [] = [] map' f (x:xs) = f x : map' f xs not' :: Bool -> Bool not' False = True not' True = False take' :: (Eq a, Num a) => a -> [b] -> [b] take' 0 l = [] take' n (x:xs) = x : take' (n - 1) xs el...
2655a7c34e1d60a2fc50ac2019b09633a5656c3a5ae334d973f8c71335b7d6c1
input-output-hk/ouroboros-network
Serialisation.hs
{-# LANGUAGE DerivingStrategies #-} # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes ...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/ebb34fa4d1ba1357e3b803a49f750d2ae3df19e5/ouroboros-consensus-byron-test/test/Test/Consensus/Byron/Serialisation.hs
haskell
# LANGUAGE DerivingStrategies # # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -----...
# LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeApplications ...
c1863f6f695cb19d26176e6df5c131014d273ebfa8732e223eaa3cc9866c76ad
scmlab/gcl
Error.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeSynonymInstances #-} module Pretty.Error where import Data.Foldable ( toList ) import Data.Loc import Prettyprinter import Error import GCL.Type ( TypeError(..) ) import ...
null
https://raw.githubusercontent.com/scmlab/gcl/b91605267750d38c20b1491c142632e632a28673/src/Pretty/Error.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE TypeSynonymInstances # | Error
module Pretty.Error where import Data.Foldable ( toList ) import Data.Loc import Prettyprinter import Error import GCL.Type ( TypeError(..) ) import GCL.WP.Type ( StructError(..) ...
1b88135b959bc463969a9a5149e2c2cc57ec0746831c1baec511681f76f74275
sjl/bobbin
tests.lisp
(in-package :bobbin.test) ;;;; Utils -------------------------------------------------------------------- (defmacro define-test (name &body body) `(test ,(intern (concatenate 'string (symbol-name 'test-) (symbol-name name))) (let ((*package* ,*package*)) ,@body))) (defun run-tests () (1am:run)) (defu...
null
https://raw.githubusercontent.com/sjl/bobbin/b454e8241b24ceab674eeeae464c8082b1b6d8ce/test/tests.lisp
lisp
Utils -------------------------------------------------------------------- Tests --------------------------------------------------------------------
(in-package :bobbin.test) (defmacro define-test (name &body body) `(test ,(intern (concatenate 'string (symbol-name 'test-) (symbol-name name))) (let ((*package* ,*package*)) ,@body))) (defun run-tests () (1am:run)) (defun f (&rest args) (apply #'format nil args)) (defmacro check (input width resu...
2d0c22672c6b01fa179fce842d21043e6a3901d4b76cf10348a786b5658a81ea
facebook/pyre-check
model.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/b79c341c39e65877b36e55f538efa081853d33ed/source/interprocedural_analyses/taint/model.ml
ocaml
Map from parameter or return value to sanitizers applying in both traces. Don't analyze at all Remove positions and other info that are not needed at call site Apply the global sanitizer. Here, we are applying the legacy behavior of sanitizers, where we only * sanitize the forward trace or the backward trac...
* 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...
4a6157f28e1eaef79c8e90a1553bfcac70934b99b5d911a8da371581805ad230
owickstrom/gi-gtk-declarative
Collected.hs
# LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # -- | Internal helpers for applying attributes and signal handlers to GTK+ -- widgets. module GI.Gtk.Declarative.Attributes.Collected ( CollectedProperties ...
null
https://raw.githubusercontent.com/owickstrom/gi-gtk-declarative/205351a54698be7b583dd34d189a89470ee2b11b/gi-gtk-declarative/src/GI/Gtk/Declarative/Attributes/Collected.hs
haskell
# LANGUAGE GADTs # | Internal helpers for applying attributes and signal handlers to GTK+ widgets. | A collected property key/value pair, to be used when settings properties when patching widgets. | A collected map of key/value pairs, where the type-level property names are represented as 'Text' values. This is u...
# LANGUAGE DataKinds # # LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module GI.Gtk.Declarative.Attributes.Collected ( CollectedProperties , Collected(..) , canBeModifiedTo , collectAttributes , constructProperties , updateProperties , ...
35f95212f701b64890235f1c4f406f6e798cfd31b745f6d8b98de801454b7987
typeclasses/haskell-phrasebook
push-to-cache.hs
#! /usr/bin/env nix-shell #! nix-shell --pure ../shell.nix #! nix-shell --keep NIX_PATH #! nix-shell -i runhaskell -- We use this script to upload the Nix shell environment to Cachix. import Control.Monad import Data.Foldable import System.Process main = build >>= push build = fmap (head . lines) $ readProcess "nix...
null
https://raw.githubusercontent.com/typeclasses/haskell-phrasebook/2b0aa44ef6f6e9745c51ed47b4e59ff704346c87/tools/push-to-cache.hs
haskell
pure ../shell.nix keep NIX_PATH We use this script to upload the Nix shell environment to Cachix.
#! /usr/bin/env nix-shell #! nix-shell -i runhaskell import Control.Monad import Data.Foldable import System.Process main = build >>= push build = fmap (head . lines) $ readProcess "nix-build" ["shell.nix", "--attr", "buildInputs", "--no-out-link"] "" push path = callProcess "cachix" ["push", "typeclasses", path]
25283b5e465e2be59c2b2747f428905c9204156da86cb14274070f991c25b7a2
jaked/orpc
gen_aux.ml
* This file is part of orpc , OCaml signature to ONC RPC generator * Copyright ( C ) 2008 - 9 Skydeck , Inc * Copyright ( C ) 2010 * * This program 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 F...
null
https://raw.githubusercontent.com/jaked/orpc/ecb5df8ec928070cd89cf035167fcedf3623ee3c/src/generator/gen_aux.ml
ocaml
XXX not sure why list: doesn't work here refer to a def in scope refer to a previous def at the OCaml level
* This file is part of orpc , OCaml signature to ONC RPC generator * Copyright ( C ) 2008 - 9 Skydeck , Inc * Copyright ( C ) 2010 * * This program 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 F...
de5cb776298957344a5a06028db5b7d1bdb163d7575330fc6909b8d2355deb8b
cryptosense/pkcs11
p11_slot_id.ml
type t = Unsigned.ULong.t [@@deriving ord] let equal a b = compare a b = 0 let show = Unsigned.ULong.to_string let pp fmt n = Format.pp_print_string fmt (show n) let of_yojson = function | `String s -> Ok (Unsigned.ULong.of_string s) | _ -> Error "ulong_of_yojson: not a string" let to_yojson ulong = `String (U...
null
https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/lib/p11_slot_id.ml
ocaml
type t = Unsigned.ULong.t [@@deriving ord] let equal a b = compare a b = 0 let show = Unsigned.ULong.to_string let pp fmt n = Format.pp_print_string fmt (show n) let of_yojson = function | `String s -> Ok (Unsigned.ULong.of_string s) | _ -> Error "ulong_of_yojson: not a string" let to_yojson ulong = `String (U...
f9f0d46ea29c120cbc3c0595f4823be3beaf1288863534887f6651594e7edc6c
pascal-knodel/haskell-craft
E'8''6.hs
-- -- -- ---------------- Exercise 8.6 . ---------------- -- -- -- module E'8''6 where import B'C'8 ( Strategy ) Note : Chapter 4 > cabal install import B'C'4 ( Move ( Rock , Paper , Scissors ) ) -- In the guides on the net they said it could be an advantage to decide -- the move in the very last mome...
null
https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/Chapter%208/E'8''6.hs
haskell
-------------- -------------- In the guides on the net they said it could be an advantage to decide the move in the very last moment. But how would we implement this? Maybe with an additional type, indicating Information about what the next And we would need the output of the device that scans the opponent :P...
Exercise 8.6 . module E'8''6 where import B'C'8 ( Strategy ) Note : Chapter 4 > cabal install import B'C'4 ( Move ( Rock , Paper , Scissors ) ) move of the opponent could be . Example : similarity of Paper and Scissors . react :: Move -> Move react move = case (move) of reactPattern :: Str...