_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
efce644039d4e8bcedb49a75ab51bb2d7c271575eead0305a85062cffcd817f8
returntocorp/semgrep
Apply_equivalences.mli
val apply : Equivalence.t list -> Lang.t -> Pattern.t -> Pattern.t
null
https://raw.githubusercontent.com/returntocorp/semgrep/70af5900482dd15fcce9b8508bd387f7355a531d/src/matching/Apply_equivalences.mli
ocaml
val apply : Equivalence.t list -> Lang.t -> Pattern.t -> Pattern.t
ed6387b708cb5033e9fb994a58b236d69b876588f0f26dc7395d18653ed5ba18
jablo/cablesim
mac_generator.erl
%%%------------------------------------------------------------------- @author 08 March 2013 by < > @doc Unique MAC address generator %%% @end %%%------------------------------------------------------------------- -module(mac_generator). -behaviour(gen_server). -include("debug.hrl"). %% Public API -export...
null
https://raw.githubusercontent.com/jablo/cablesim/da6628190f9ec5c426df73e921ff575470d1a078/src/mac_generator.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- Public API gen_server callbacks ==================================================================== API ==================================================================== ...
@author 08 March 2013 by < > @doc Unique MAC address generator -module(mac_generator). -behaviour(gen_server). -include("debug.hrl"). -export([start_link/0, nextmac/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -record(state, {prefixdict}). ...
5897a4d5d5ddebd13eb55f7c724068f380b31463e6f3b75a438871d3a159c8ce
bscarlet/llvm-general
Threading.hs
| functionality necessary when running in multiple threads at the same time . module LLVM.General.Threading ( setMultithreaded, isMultithreaded ) where import LLVM.General.Prelude import LLVM.General.Internal.Threading # DEPRECATED setMultithreaded " LLVM no longer features runtime control of multithreading...
null
https://raw.githubusercontent.com/bscarlet/llvm-general/61fd03639063283e7dc617698265cc883baf0eec/llvm-general/src/LLVM/General/Threading.hs
haskell
controlled only at runtime with the configure flag --enable-threads (default is YES). This function will now check that the the compiled-in multithreading support (returned by 'isMultithreaded') is sufficient to support the requested access, and fail if not, so as to prevent uncontrolled use of a multithreading sup...
| functionality necessary when running in multiple threads at the same time . module LLVM.General.Threading ( setMultithreaded, isMultithreaded ) where import LLVM.General.Prelude import LLVM.General.Internal.Threading # DEPRECATED setMultithreaded " LLVM no longer features runtime control of multithreading...
4d6253325e294e44d9672152aac84d3ad42cb2f86de8741d63622c49d17792d3
soegaard/remacs
region.rkt
#lang racket/base (provide (all-defined-out)) (require racket/list "representation.rkt" "parameters.rkt" "text.rkt" "mark.rkt" "point.rkt") ;;; ;;; REGIONS ;;; The region is the text between point and the first mark . The representation of the region is therefore impli...
null
https://raw.githubusercontent.com/soegaard/remacs/8681b3acfe93335e2bc2133c6f144af9e0a1289e/region.rkt
racket
REGIONS set-mark-command sets a mark, and then a region exists (transient-mode-on? b)
#lang racket/base (provide (all-defined-out)) (require racket/list "representation.rkt" "parameters.rkt" "text.rkt" "mark.rkt" "point.rkt") The region is the text between point and the first mark . The representation of the region is therefore implicitly given by the p...
4e02163b9a96a7cf4c3c9b7b34920cbb941bed7b3c7cf39519b96fbd419e49c5
mattmundell/nightshade
new-assem.lisp
;;; Efficient retargetable scheduling assembler. ;;; FIX rename assembler.lisp (in-package "NEW-ASSEM") (in-package :c) (import '(branch flushable) :new-assem) (import '(sset-element sset make-sset do-elements sset-adjoin sset-delete sset-empty) :new-assem) (in-package :new-assem) (export '(emit-byte emit-skip...
null
https://raw.githubusercontent.com/mattmundell/nightshade/d8abd7bd3424b95b70bed599e0cfe033e15299e0/src/compiler/new-assem.lisp
lisp
Efficient retargetable scheduling assembler. DEF-ASSEMBLER-PARAMS -- Interface. Constants. (also refered to as a ``byte''). Hopefully, different instruction sets won't require chainging this. OUTPUT-BLOCK-SIZE -- The size (in bytes) to use per output block. Each output block is a chunk of raw memory, poi...
FIX rename assembler.lisp (in-package "NEW-ASSEM") (in-package :c) (import '(branch flushable) :new-assem) (import '(sset-element sset make-sset do-elements sset-adjoin sset-delete sset-empty) :new-assem) (in-package :new-assem) (export '(emit-byte emit-skip emit-back-patch emit-chooser emit-postit define-e...
8664754ff23849fa008156e553d87a2829912c23edb3184d28ea2072eb8936c1
jafingerhut/clojure-benchmarks
nbody.clj-10.clj
Author : ( ) Date : Aug 10 , 2009 (ns nbody (:gen-class)) (set! *warn-on-reflection* true) (defmacro mass [p] `(double (aget ~p 0))) (defmacro posx [p] `(double (aget ~p 1))) (defmacro posy [p] `(double (aget ~p 2))) (defmacro posz [p] `(double (aget ~p 3))) (defmacro velx [p] `(double (aget ~p 4))) (defma...
null
https://raw.githubusercontent.com/jafingerhut/clojure-benchmarks/474a8a4823727dd371f1baa9809517f9e0b508d4/nbody/nbody.clj-10.clj
clojure
Don't bother keeping the name around recall that this function is only called twice during the whole program. advance! and what it calls are the real hot spot.
Author : ( ) Date : Aug 10 , 2009 (ns nbody (:gen-class)) (set! *warn-on-reflection* true) (defmacro mass [p] `(double (aget ~p 0))) (defmacro posx [p] `(double (aget ~p 1))) (defmacro posy [p] `(double (aget ~p 2))) (defmacro posz [p] `(double (aget ~p 3))) (defmacro velx [p] `(double (aget ~p 4))) (defma...
28c8e5265a18d27727006bfae5bceb0b19c84994c75b6ccd13bb5cdff2c3725a
wadehennessey/wcl
bufmac.lisp
-*- Mode : LISP ; Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*- This file contains macro definitions for the BUFFER object for Common - Lisp X windows version 11 ;;; TEXAS INSTRUMENTS INCORPORATED ;;; P.O. BOX 2909 AUSTIN , TEXAS 78769 ;;; Copyright ( C ) 1987 ...
null
https://raw.githubusercontent.com/wadehennessey/wcl/841316ffe06743d4c14b4ed70819bdb39158df6a/src/clx/bufmac.lisp
lisp
Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*- P.O. BOX 2909 Permission is granted to any individual or institution to use, copy, modify, and distribute this software, provided that this complete copyright and permission notice is maintained, intact, in all copies and supporting ...
This file contains macro definitions for the BUFFER object for Common - Lisp X windows version 11 TEXAS INSTRUMENTS INCORPORATED AUSTIN , TEXAS 78769 Copyright ( C ) 1987 Texas Instruments Incorporated . Texas Instruments Incorporated provides this software " as is " without (in-package :xlib...
8d93a9ce42f83c8d6655c48e71f26f3bb569ce360efc08cde78bce7661cf6437
facebook/flow
propertyFindRefs.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/5f4b8172d0d14ac5e4b3bb69b3c879d0fffe6886/src/services/references/propertyFindRefs.ml
ocaml
Returns a map from object_literal_loc to prop_loc, for all object literals which contain the * given property name. Replace previous bindings of `loc`. We should always use the result of the last call to the hook for a given location (this may no longer be relevant with the removal of ge...
* 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...
9f4e16dac2a3331dad08935a9f9fe6a99fdee795d400b8f30e3aaf3ea3bc75de
okeuday/erlbench
uuid.erl
-*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*- ex : set utf-8 sts=4 ts=4 sw=4 et nomod : %%% %%%------------------------------------------------------------------------ %%% @doc %%% ==Erlang UUID Generation== [ ] is the reference for official UUIDs . %%% This imp...
null
https://raw.githubusercontent.com/okeuday/erlbench/9fc02a2e748b287b85f6e9641db6b2ca68791fa4/src/uuid.erl
erlang
------------------------------------------------------------------------ @doc ==Erlang UUID Generation== This implementation provides a version 1 UUID that includes both the methods are provided as specified within the RFC. @end Permission is hereby granted, free of charge, to any person obtaining a copy of ...
-*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*- ex : set utf-8 sts=4 ts=4 sw=4 et nomod : [ ] is the reference for official UUIDs . Erlang pid identifier ( ID , Serial , Creation ) and the distributed Erlang node name within the 48 bit node ID . To make room...
24967e0518573384bdf758223b30f436380180625a7662a1ccd275819ce75e6c
rescript-lang/rescript-compiler
matching_polyfill.ml
Copyright ( C ) 2020- , Authors of ReScript * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later vers...
null
https://raw.githubusercontent.com/rescript-lang/rescript-compiler/e60482c6f6a69994907b9bd56e58ce87052e3659/jscomp/core/matching_polyfill.ml
ocaml
Exceptions
Copyright ( C ) 2020- , Authors of ReScript * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later vers...
2fe645109fe22dbaa5cd490cfce718f11eb6760352e01b879468657c433296aa
racket/htdp
guess1.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname guess1) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f...
null
https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-test/htdp/tests/guess1.rkt
racket
about the language level of this file in a form that our tools can easily process. check-guess : number number -> symbol to determine how guess and target relate to each other Tests: Test with GUI lib: set lib to guess-lib.ss (guess-with-gui list) (define (foo x) x) (guess-with-gui foo)
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname guess1) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) (require htdp/guess) (define (check-guess guess target) (cond ...
77159ea967577661add07062282e6f50fac65d0768525a91711b3e36ab56c8c9
code-iai/ros_emacs_utils
swank-sprof.lisp
;;; swank-sprof.lisp ;; Authors : ;; License : MIT ;; (in-package :swank) #+sbcl (eval-when (:compile-toplevel :load-toplevel :execute) (require :sb-sprof)) #+sbcl(progn (defvar *call-graph* nil) (defvar *node-numbers* nil) (defvar *number-nodes* nil) (defun frame-name (name) (if (consp name) (case...
null
https://raw.githubusercontent.com/code-iai/ros_emacs_utils/67aafa699ff0d8c6476ec577a8587bac3d498028/slime_wrapper/slime/contrib/swank-sprof.lisp
lisp
swank-sprof.lisp :key #'sb-sprof::node-count)))
Authors : License : MIT (in-package :swank) #+sbcl (eval-when (:compile-toplevel :load-toplevel :execute) (require :sb-sprof)) #+sbcl(progn (defvar *call-graph* nil) (defvar *node-numbers* nil) (defvar *number-nodes* nil) (defun frame-name (name) (if (consp name) (case (first name) ((sb-c::...
9d9a1b7c380b2c1dc2345ac75b858c6730ee652bb2f5c0508c53a7fb9975a7cc
sibylfs/sibylfs_src
dump.mli
(****************************************************************************) Copyright ( c ) 2013 , 2014 , 2015 , , , , ( as part of the SibylFS project ) (* *) (* Permission to use, copy, modify, and/or d...
null
https://raw.githubusercontent.com/sibylfs/sibylfs_src/30675bc3b91e73f7133d0c30f18857bb1f4df8fa/fs_test/lib/dump.mli
ocaml
************************************************************************** Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright no...
Copyright ( c ) 2013 , 2014 , 2015 , , , , ( as part of the SibylFS project ) THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL PROFITS , WHETHER IN AN ACTION OF CONTRACT , NEGLIGENCE OR OTHER TORTIOUS ACTION , ARISING OUT OF OR IN CONNE...
92ef7c750307c79f97bd92ee074184ee2d0599fb312ca5a1732488dd65b7ee9b
pkhuong/bitap-regexp
generate-epsilon.lisp
(defun %make-simd-pack-ub128 (x) (%make-simd-pack-ub64 (ldb (byte 64 0) x) (ldb (byte 64 64) x))) (defun %simd-pack-ub128 (x) (multiple-value-bind (low high) (%simd-pack-ub64s x) (logior low (ash high 64)))) (defconstant +state-size+ 128) (defconstant +chunk-size+ 64) (deftype i...
null
https://raw.githubusercontent.com/pkhuong/bitap-regexp/b24beb2dd74e4f79263f3f8f5d09199f16dc9c34/generate-epsilon.lisp
lisp
which chunk . mod-chunk shift start with rows: they can never be coalesced choose a representative arbitrarily avoid constant propagation
(defun %make-simd-pack-ub128 (x) (%make-simd-pack-ub64 (ldb (byte 64 0) x) (ldb (byte 64 64) x))) (defun %simd-pack-ub128 (x) (multiple-value-bind (low high) (%simd-pack-ub64s x) (logior low (ash high 64)))) (defconstant +state-size+ 128) (defconstant +chunk-size+ 64) (deftype i...
65de439cb1853453b60d3eea386c71ccca082dfd8616ef7676742926d4c19402
rescript-lang/rescript-compiler
ext_position.ml
Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P. * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later...
null
https://raw.githubusercontent.com/rescript-lang/rescript-compiler/e60482c6f6a69994907b9bd56e58ce87052e3659/jscomp/ext/ext_position.ml
ocaml
Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P. * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later...
8b6e4da8569bfda550395320287d5b7b3071c13f5792a193a1fe18cd4aa0a5ec
flipstone/haskell-for-beginners
5_type_synonyms.hs
-- Implement your complex number solution yet again, but -- this time use a type synonym and represent complex -- numbers using a tuple. -- -- Create a Result type based on Either that assumes the -- left side is a String containing an error message. If you're -- cool, partially apply the type constructor to get new ...
null
https://raw.githubusercontent.com/flipstone/haskell-for-beginners/e586a1f3ef08f21d5181171fe7a7b27057391f0b/problems/chapter_08/5_type_synonyms.hs
haskell
Implement your complex number solution yet again, but this time use a type synonym and represent complex numbers using a tuple. Create a Result type based on Either that assumes the left side is a String containing an error message. If you're cool, partially apply the type constructor to get new type. Define ...
29a1905cff8d23b0799e2024fb429372a9c64c1de3a19a57f5d00427eee9591d
DavidAlphaFox/RabbitMQ
rabbit_binary_generator.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/src/rabbit_binary_generator.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. ----------------...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is GoPivotal , Inc. Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved . -module...
f8251507e768fb7abaf5bf7b3a968a2ee824fae93b7a93fc582da0b7916dcafe
clj-kondo/clj-kondo
try_plus.clj
(ns macroexpand.try-plus (:require [clj-kondo.hooks-api :as api])) (defn expand-catch [catch-node] (let [[catch catchee & exprs] (:children catch-node) catchee-sexpr (api/sexpr catchee)] (cond (vector? catchee-sexpr) (let [[selector & exprs] exprs] (api/list-node [cat...
null
https://raw.githubusercontent.com/clj-kondo/clj-kondo/626978461cbf113c376634cdf034d7262deb429f/corpus/.clj-kondo/macroexpand/try_plus.clj
clojure
use throw-context to avoid warning (prn (api/sexpr new-node))
(ns macroexpand.try-plus (:require [clj-kondo.hooks-api :as api])) (defn expand-catch [catch-node] (let [[catch catchee & exprs] (:children catch-node) catchee-sexpr (api/sexpr catchee)] (cond (vector? catchee-sexpr) (let [[selector & exprs] exprs] (api/list-node [cat...
08d0a140a58a8a8de720ca2f13a2d6c4fa3c7a19793f76495ea012102686d3ed
ghc/nofib
Interval.hs
- ( The Solid Modeller , written in Haskell ) - - Copyright 1990,1991,1992,1993 Duncan Sinclair - - Permissiom to use , copy , modify , and distribute this software for any - purpose and without fee is hereby granted , provided that the above - copyright notice and this permission notice appea...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/real/fulsom/Interval.hs
haskell
was:Text Not correct - but it will do. Error functions - un-used. Ord class functions Num class functions Should use foldl rather than foldr Fractional class functions Floating class functions ivPi () = fromRational pi Extra math functions not part of classes Other Functions specific to interval type
- ( The Solid Modeller , written in Haskell ) - - Copyright 1990,1991,1992,1993 Duncan Sinclair - - Permissiom to use , copy , modify , and distribute this software for any - purpose and without fee is hereby granted , provided that the above - copyright notice and this permission notice appea...
77e386d7cda530a490f3e82f7678a997d71c65d82e5b68eecca38697d3386a7b
AmpersandTarski/Ampersand
MetaModels.hs
# LANGUAGE ScopedTypeVariables # module Ampersand.FSpec.MetaModels ( MetaModel (..), pCtx2Fspec, ) where import Ampersand.ADL1 import Ampersand.ADL1.P2A_Converters import Ampersand.Basics import Ampersand.FSpec.FSpec import Ampersand.FSpec.ShowMeatGrinder import Ampersand.FSpec.ToFSpec.ADL2FSpec import Ampers...
null
https://raw.githubusercontent.com/AmpersandTarski/Ampersand/cb2306a09ce79d5609ccf8d3e28c0a1eb45feafe/src/Ampersand/FSpec/MetaModels.hs
haskell
# LANGUAGE ScopedTypeVariables # module Ampersand.FSpec.MetaModels ( MetaModel (..), pCtx2Fspec, ) where import Ampersand.ADL1 import Ampersand.ADL1.P2A_Converters import Ampersand.Basics import Ampersand.FSpec.FSpec import Ampersand.FSpec.ShowMeatGrinder import Ampersand.FSpec.ToFSpec.ADL2FSpec import Ampers...
c835f4d0a20e1823213d82e46303d0503075f0a26e307268a1a5b38f7f2f0e2b
parsonsmatt/ghc-cache-buster
Explicit.hs
# LANGUAGE QuasiQuotes , TemplateHaskell # module GCB.Explicit where import GCB.Types.Foo (mkFoo) import GCB.Types.FooExplicit (mkFooExplicit) import GCB.Types.Quuz (compileQuuz, blargh) app :: IO () app = do putStrLn "Hello, World!" let x = [compileQuuz|asdf|] let foo = mkFoo "asdf" putStrLn "Goodby...
null
https://raw.githubusercontent.com/parsonsmatt/ghc-cache-buster/c58976e937d42b68b3592bf4b8e4e194601dda00/src/GCB/Explicit.hs
haskell
# LANGUAGE QuasiQuotes , TemplateHaskell # module GCB.Explicit where import GCB.Types.Foo (mkFoo) import GCB.Types.FooExplicit (mkFooExplicit) import GCB.Types.Quuz (compileQuuz, blargh) app :: IO () app = do putStrLn "Hello, World!" let x = [compileQuuz|asdf|] let foo = mkFoo "asdf" putStrLn "Goodby...
8133903851ea5360a2bfd6fe27af8307856399a89157c06e139b89c2befb254c
lucasvreis/org-mode-hs
Syntect.hs
# LANGUAGE ForeignFunctionInterface # module Org.Exporters.Highlighting.Syntect where import Data.Text qualified as T import Foreign.C.String import Ondim.HTML import Text.XmlHtml (docContent, parseHTML) import Text.XmlHtml qualified as X import Control.Exception (bracket) import Org.Parser.Definitions (Affiliated) ...
null
https://raw.githubusercontent.com/lucasvreis/org-mode-hs/ad25bebd5de3671dc8363ce83de419a788a6b1a9/org-exporters/src/Org/Exporters/Highlighting/Syntect.hs
haskell
# LANGUAGE ForeignFunctionInterface # module Org.Exporters.Highlighting.Syntect where import Data.Text qualified as T import Foreign.C.String import Ondim.HTML import Text.XmlHtml (docContent, parseHTML) import Text.XmlHtml qualified as X import Control.Exception (bracket) import Org.Parser.Definitions (Affiliated) ...
1eadcfb2414939659b3d67e5896d5e14300f11f272cc321391fc37777f122c33
ledger/cl-ledger
types.lisp
;; types.lisp (declaim (optimize (safety 3) (debug 3) (speed 1) (space 0))) (in-package :ledger) (defstruct (item-position) begin-line end-line source) (deftype item-status () '(member :uncleared :pending :cleared)) (defstruct (transaction (:conc-name get-xact-) (:print-function print-transacti...
null
https://raw.githubusercontent.com/ledger/cl-ledger/e25d5f9f721bcf3b30d6569363e723f22d19a3a0/core/types.lisp
lisp
types.lisp (basis-cost nil :type (or value value-expr null)) types.lisp ends here
(declaim (optimize (safety 3) (debug 3) (speed 1) (space 0))) (in-package :ledger) (defstruct (item-position) begin-line end-line source) (deftype item-status () '(member :uncleared :pending :cleared)) (defstruct (transaction (:conc-name get-xact-) (:print-function print-transaction)) entry ...
16657a9e7bafee9760e449c9cd88b460163d16aad24667fae8dc6605db2a7c45
shayan-najd/NativeMetaprogramming
tcfail201.hs
{-# LANGUAGE RankNTypes #-} -- Claus reported by email that GHCi , version 6.9.20080217 loops on this program -- -ghc/2008-June/043173.html -- So I'm adding it to the test suite so that we'll see it if it happens again module Foo where data HsDoc id = DocEmpty | DocParagraph (HsDoc id) gfoldl' :: (forall a ...
null
https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_fail/tcfail201.hs
haskell
# LANGUAGE RankNTypes # Claus reported by email that -ghc/2008-June/043173.html So I'm adding it to the test suite so that we'll see it if it happens again
GHCi , version 6.9.20080217 loops on this program module Foo where data HsDoc id = DocEmpty | DocParagraph (HsDoc id) gfoldl' :: (forall a b . c (a -> b) -> a -> c b) -> (forall g . g -> c g) -> a -> c a gfoldl' k z hsDoc = case hsDoc of DocEmpty -> z DocEmpty ( DocParagraph hsDoc...
3a76d7c89fba6a9bbbb64a375fd63c29721a9f7324f7b4eb1266227a8a1f7f49
zkat/chanl
conditions.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 ; indent - tabs - mode : nil -*- ;;;; Copyright © 2009 , ;;;; ;;;; Condition handling through channels ;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package :chanl.examples) (export '(with...
null
https://raw.githubusercontent.com/zkat/chanl/3a0ad5b9ae31b3874ac91c541fd997123c2e03db/examples/conditions.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 ; indent - tabs - mode : nil -*- Condition handling through channels Common util Some sample code using the above: CHANL> (defvar *chan* (make-channel)) *CHAN* CHANL> (defvar a (make-channel)) A CHANL> (pexec () (chanl.examples::with-condition-dumper *cha...
Copyright © 2009 , (in-package :chanl.examples) (export '(with-condition-dumper)) (defstruct (wrapped-condition (:conc-name wrapped-) (:type vector) (:constructor wrap-condition (condition &aux (restarts (compute-restarts condition))))) (thread...
3910fc12cebd38d5b1bcef8c0f3188348c7eb284f75a44cefb7ba3be08c3c7fd
keithfancher/kept
Args.hs
module Args ( CLIOpts (..), cliOptParser, ) where import Kept (KeptOptions (..)) import Markdown (MarkdownOpts (..)) import Options.Applicative import Path (PathOptions (..)) data CLIOpts = CLIOpts { keptOptions :: KeptOptions, inFiles :: [FilePath] } cliOptParser :: ParserInfo CLIOpts cliOptParser =...
null
https://raw.githubusercontent.com/keithfancher/kept/21ca2b1f1ac87bb01364962f330562998ae5697a/app/Args.hs
haskell
This is a bit confusing because of the negation. These `switch` options are False by default, so that needs to map to our default desired behavior: yes front matter, yes include title in front matter any remaining option results in default front matter
module Args ( CLIOpts (..), cliOptParser, ) where import Kept (KeptOptions (..)) import Markdown (MarkdownOpts (..)) import Options.Applicative import Path (PathOptions (..)) data CLIOpts = CLIOpts { keptOptions :: KeptOptions, inFiles :: [FilePath] } cliOptParser :: ParserInfo CLIOpts cliOptParser =...
8d6faaa3709d06647fd52100817efad5c71bcde6287359655bc6ce36dd17d2a0
glebec/haskell-programming-allen-moronuki
Ex26_08.hs
module Ex26_08 where import Control.Monad.Trans.Except import Control.Monad.Trans.Maybe import Control.Monad.Trans.Reader -- lexically outer = semantically inner embedded :: MaybeT -- m (Maybe a) (ExceptT -- m String (ReaderT () IO)) Int -- a emb...
null
https://raw.githubusercontent.com/glebec/haskell-programming-allen-moronuki/99bd232f523e426d18a5e096f1cf771228c55f52/26-monad-transformers/Ex26_08.hs
haskell
lexically outer = semantically inner m (Maybe a) m a m (Either e a) e m a r -> m a a r m a Right (Just 1) Exercise: Wrap It Up re-wrap `readerUnwrap`, but also provides the following snippet: matches written problem description matches provided code snippet
module Ex26_08 where import Control.Monad.Trans.Except import Control.Monad.Trans.Maybe import Control.Monad.Trans.Reader String (ReaderT () IO)) embedded = pure 1 maybeUnwrap = runMaybeT embedded String (Maybe Int)) eitherUnwrap = runE...
55acd29225de52c865c790b028aa38413f1230dacd51714fe8e2e40cd5da1512
jaspervdj/hakyll
Configuration.hs
-------------------------------------------------------------------------------- -- | Exports a datastructure for the top-level hakyll configuration module Hakyll.Core.Configuration ( Configuration (..) , shouldIgnoreFile , shouldWatchIgnore , defaultConfiguration ) where -------------------------...
null
https://raw.githubusercontent.com/jaspervdj/hakyll/a7e7e52302fd38130ac5ceb677d81bff82af45d6/lib/Hakyll/Core/Configuration.hs
haskell
------------------------------------------------------------------------------ | Exports a datastructure for the top-level hakyll configuration ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ | Directory in w...
module Hakyll.Core.Configuration ( Configuration (..) , shouldIgnoreFile , shouldWatchIgnore , defaultConfiguration ) where import Data.Default (Default (..)) import Data.List (isPrefixOf, isSuffixOf) import qualified Network.Wai.Application.Static as Static import ...
ac4d9fef854997a943a312387e175cb60fbadd763d8f8f6d2c30fc040b02fd44
karamellpelle/grid
File.hs
grid is a game written in Haskell Copyright ( C ) 2018 -- -- This file is part of grid. -- -- grid is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or -- (at your optio...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/LevelTools/File.hs
haskell
This file is part of grid. grid is free software: you can redistribute it and/or modify (at your option) any later version. grid 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 GN...
grid is a game written in Haskell Copyright ( C ) 2018 it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License module LevelTools.File ( wLevel, wWorldHe...
e176b4a4d2b9e21db19885f8f1a41c185a9057f5be8d90a8ed48752635f6dea3
naoto-ogawa/h-xproto-mysql
Example04.hs
# LANGUAGE DeriveGeneric , ScopedTypeVariables , TemplateHaskell , TypeInType , TypeFamilies , KindSignatures , DataKinds , TypeOperators , GADTs , TypeSynonymInstances , FlexibleInstances # module Example.Example04 where import Language.Haskell.TH import Language.Haskell.TH.Syntax import Control.Exception.Safe (E...
null
https://raw.githubusercontent.com/naoto-ogawa/h-xproto-mysql/1eacd6486c99b849016bf088788cb8d8b166f964/src/Example/Example04.hs
haskell
protocol buffer library my library JSON Sample : find JSON Sample : insert
# LANGUAGE DeriveGeneric , ScopedTypeVariables , TemplateHaskell , TypeInType , TypeFamilies , KindSignatures , DataKinds , TypeOperators , GADTs , TypeSynonymInstances , FlexibleInstances # module Example.Example04 where import Language.Haskell.TH import Language.Haskell.TH.Syntax import Control.Exception.Safe (E...
84cef0459c5b0f9c1a3a87382e949d3e4689fd5c3a3ea840807dc083f1d0cf2e
wangzhe3224/cs3110
sorts.ml
(****************************************************************** * INSERTION SORT ******************************************************************) (* [insert x lst] is a list containing all the elements of [lst] as * well as [x], sorted according to the built-in operator [>=]. * requires: [lst] is already s...
null
https://raw.githubusercontent.com/wangzhe3224/cs3110/33c1b9662ee5ba4bd13d7ec5a116b539bf086605/labs/lab10/sorts/sorts.ml
ocaml
***************************************************************** * INSERTION SORT ***************************************************************** [insert x lst] is a list containing all the elements of [lst] as * well as [x], sorted according to the built-in operator [>=]. * requires: [lst] is already sorted a...
let rec insert x = function | [] -> [x] | h::t -> if h >= x then x::h::t else h::(insert x t) [ ins_sort lst ] is [ lst ] sorted according to the built - in operator [ < =] . * performance : O(n^2 ) time , where n is the number of elements in [ lst ] . * Not tail recursive . * perfor...
3515c56010f540a5c0cae514386a948e83f0c372b90994a4cb0974a362edf4ed
callum-oakley/advent-of-code
15.clj
(ns aoc.2022.15 (:require [aoc.vector :refer [manhattan-distance]] [clojure.math.combinatorics :as comb] [clojure.test :refer [deftest is]])) (defn parse [s] (let [readings (->> s (re-seq #"-?\d+") (map read-string) (partition 2) (map #(vec (reverse %))) (partition 2))] {:sensors...
null
https://raw.githubusercontent.com/callum-oakley/advent-of-code/4f9c3f54779cc6e2d7ff66e0d3d5495b36c15350/src/aoc/2022/15.clj
clojure
Cheating a little by assuming there are no gaps. This turns out to be true. filter those that fall within the boundary.
(ns aoc.2022.15 (:require [aoc.vector :refer [manhattan-distance]] [clojure.math.combinatorics :as comb] [clojure.test :refer [deftest is]])) (defn parse [s] (let [readings (->> s (re-seq #"-?\d+") (map read-string) (partition 2) (map #(vec (reverse %))) (partition 2))] {:sensors...
80bdebb40883da002caec179076fe9c4ff5b58df565533d4204c3657901e8ae8
CorticalComputer/Book_NeuroevolutionThroughErlang
actuator.erl
This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM %% Copyright ( C ) 2012 by , DXNN Research Group , %All rights reserved. % This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for th...
null
https://raw.githubusercontent.com/CorticalComputer/Book_NeuroevolutionThroughErlang/81b96e3d7985624a6183cb313a7f9bff0a7e14c5/Ch_15/actuator.erl
erlang
All rights reserved. ACTUATORS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% The pts/2 actuation function simply prints to screen the vector passed to it.
This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM Copyright ( C ) 2012 by , DXNN Research Group , This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for the terms of use . -module(a...
30b14dc94823ad3d28577aac30965f94ee9fa899e0fd6db1df03d7cc5b0affc6
anwarmamat/cmsc330fall17public
data.mli
type int_tree = IntLeaf | IntNode of int * int_tree * int_tree val empty_int_tree : int_tree val count : 'a -> 'a list -> int val divisible_by : int -> int list -> bool list val divisible_by_first : int list -> bool list val pairup : 'a list -> 'b list -> ('a * 'b) list val concat_lists : 'a list list -> 'a lis...
null
https://raw.githubusercontent.com/anwarmamat/cmsc330fall17public/9a23ec1fc0cc4324e8c316f8d630c4e53af80f04/p2b/data.mli
ocaml
type int_tree = IntLeaf | IntNode of int * int_tree * int_tree val empty_int_tree : int_tree val count : 'a -> 'a list -> int val divisible_by : int -> int list -> bool list val divisible_by_first : int list -> bool list val pairup : 'a list -> 'b list -> ('a * 'b) list val concat_lists : 'a list list -> 'a lis...
1e33efd7b265d3b63a349785076332ee2d9608879d6cae76a582b84602866c28
ocaml/dune
visibility.mli
type t = | Public | Private include Dune_lang.Conv.S with type t := t val is_public : t -> bool val is_private : t -> bool val to_dyn : t -> Dyn.t module Map : sig type visibility := t type 'a t = { public : 'a ; private_ : 'a } val make_both : 'a -> 'a t val find : 'a t -> visibility ->...
null
https://raw.githubusercontent.com/ocaml/dune/991f9b77e2ced07f5906941814cc640b49d710ea/src/dune_rules/visibility.mli
ocaml
type t = | Public | Private include Dune_lang.Conv.S with type t := t val is_public : t -> bool val is_private : t -> bool val to_dyn : t -> Dyn.t module Map : sig type visibility := t type 'a t = { public : 'a ; private_ : 'a } val make_both : 'a -> 'a t val find : 'a t -> visibility ->...
ebacd861f735cdd3de3faff3635642ae174a1f8d86abb54833bfa271c0364134
cljdoc/cljdoc
scm.clj
(ns cljdoc.util.scm "Utilities to extract information from SCM urls (GitHub et al)" (:require [clojure.string :as string] [clojure.java.io :as io] [lambdaisland.uri :as uri])) (defn owner [scm-url] (get (string/split (:path (uri/uri scm-url)) #"/") 1)) (defn repo [scm-url] (get (string...
null
https://raw.githubusercontent.com/cljdoc/cljdoc/8787f2a0d01c5cc6ccea8b2f4fd69d96e01379cb/src/cljdoc/util/scm.clj
clojure
(ns cljdoc.util.scm "Utilities to extract information from SCM urls (GitHub et al)" (:require [clojure.string :as string] [clojure.java.io :as io] [lambdaisland.uri :as uri])) (defn owner [scm-url] (get (string/split (:path (uri/uri scm-url)) #"/") 1)) (defn repo [scm-url] (get (string...
bc15719ddb048f57c54a4bed93ba493aa09c8ece25755eb6dbe7db7703bd818b
oscarh/gen_httpd
ghtp_utils.erl
%%% ---------------------------------------------------------------------------- Copyright 2008 , , %%% %%% All rights reserved %%% Redistribution and use in source and binary forms, with or without %%% modification, are permitted provided that the following conditions are %%% met: %%% %%% * Redistribut...
null
https://raw.githubusercontent.com/oscarh/gen_httpd/5b48e33d8fac30c70e2d89d74c56e057d570064e/src/ghtp_utils.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: * Redistributions of source code must retain the above copyright ...
Copyright 2008 , , THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ` ` AS IS '' AND IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREM...
46415cb8710b65e94f2482f71c9d0828348b85d5b652a6948e666744c12b041e
ocaml/oasis
foo.ml
(******************************************************************************) OASIS : architecture for building OCaml libraries and applications (* *) Copyright ( C ) 2011 - 2016 , Copyrig...
null
https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/test/data/TestFull/dynrun_for_release/foo.ml
ocaml
**************************************************************************** This library is free software; you can redistribute it and/or modify it under the t...
OASIS : architecture for building OCaml libraries and applications Copyright ( C ) 2011 - 2016 , Copyright ( C ) 2008 - 2011 , OCamlCore SARL the Free Software Foundation ; either version 2.1 of the License , or ( at You s...
4bd825e315a3021c6c735c3106d8ec7e2eaa458708ad86d588731ced01f1ee22
quchen/prettyprinter
GenerateReadme.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} module Main (main) where import Prelude hiding (words) import qualified Data.List as L import Data.Text (Text) import qualified Data.Text as T import q...
null
https://raw.githubusercontent.com/quchen/prettyprinter/880f41eac31edfac71d2d66d338e6cfdae4f3715/prettyprinter/app/GenerateReadme.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE QuasiQuotes #
module Main (main) where import Prelude hiding (words) import qualified Data.List as L import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.IO as T import P...
1b16b3169cb0d4c61c279782f541110c1c4cbc2145b7988f0563e31d5f9620cc
Ptival/language-ocaml
ModuleExpr.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # OPTIONS_GHC -fno - warn - orphans # module Language.OCaml.PrettyPrinter.ModuleExpr ( moduleExprPP, ) where import Language.OCaml.Definitions.Parsing.ParseTree ( ModuleExpr (pmodDesc), ) import Language.OCaml.PrettyPrinter.ModuleExprDesc () import Pr...
null
https://raw.githubusercontent.com/Ptival/language-ocaml/7b07fd3cc466bb2ad2cac4bfe3099505cb63a4f4/lib/Language/OCaml/PrettyPrinter/ModuleExpr.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE LambdaCase # # OPTIONS_GHC -fno - warn - orphans # module Language.OCaml.PrettyPrinter.ModuleExpr ( moduleExprPP, ) where import Language.OCaml.Definitions.Parsing.ParseTree ( ModuleExpr (pmodDesc), ) import Language.OCaml.PrettyPrinter.ModuleExprDesc () import Prettyprinter (Doc, Pretty (pretty)) ...
0244b2398e1f833f1ee40147b60813fb57c8cb2d2415b7c6d431cbbc1489194f
rumblesan/improviz
Runtime.hs
# LANGUAGE TemplateHaskell # module Improviz.Runtime ( ImprovizRuntime , makeRuntimeState , initialInterpreter , currentAst , updateProgram , resetProgram , saveProgram , resizeRuntime , programHasChanged , materialsToLoad ) where import Configuration.Shaders ( ShaderData ) im...
null
https://raw.githubusercontent.com/rumblesan/improviz/e9f797de18c949853fc3bf6037b5e58b3f2494e1/src/Improviz/Runtime.hs
haskell
# LANGUAGE TemplateHaskell # module Improviz.Runtime ( ImprovizRuntime , makeRuntimeState , initialInterpreter , currentAst , updateProgram , resetProgram , saveProgram , resizeRuntime , programHasChanged , materialsToLoad ) where import Configuration.Shaders ( ShaderData ) im...
64042b8a6ecc5e99c2eb0d8009d8adea711cf1b5a8b9236d22c093168e4521c9
fetburner/compelib
pUnionFind.mli
module F (Elt : sig type t val compare : t -> t -> int end) (Map : sig type key = Elt.t type size type 'a t (* make n : 定義域 n で全要素が未定義の Map を作る *) val make : size -> 'a t (* 未定義の添字について呼び出した場合 Not_found を投げる *) val find : key -> 'a t -> 'a val add : key -> 'a -> 'a t -> 'a t...
null
https://raw.githubusercontent.com/fetburner/compelib/d8fc5d9acd04e676c4d4d2ca9c6a7140f1b85670/lib/container/pUnionFind.mli
ocaml
make n : 定義域 n で全要素が未定義の Map を作る 未定義の添字について呼び出した場合 Not_found を投げる 集合の識別子 要素がどの集合に属するか調べる 与えられた集合同士を合併する 与えられた集合に属する要素の数を求める
module F (Elt : sig type t val compare : t -> t -> int end) (Map : sig type key = Elt.t type size type 'a t val make : size -> 'a t val find : key -> 'a t -> 'a val add : key -> 'a -> 'a t -> 'a t end) : sig type t type elt = Elt.t type dom = Map.size module Class : sig ...
6e73e136bceb1879200da63a582e75e913c3c74bbdc5b9ec86d638a70b3db4a4
oakes/cross-parinfer
project.clj
(defproject cross-parinfer "1.5.1-SNAPSHOT" :description "A library that wraps Parinfer for Clojure and ClojureScript" :url "-parinfer" :license {:name "Public Domain" :url ""} :repositories [["clojars" {:url "" :sign-releases false}]] :profiles {:dev {:main cross-pari...
null
https://raw.githubusercontent.com/oakes/cross-parinfer/ea7349959296fd2348a1f62de7b21ead7bb88566/project.clj
clojure
(defproject cross-parinfer "1.5.1-SNAPSHOT" :description "A library that wraps Parinfer for Clojure and ClojureScript" :url "-parinfer" :license {:name "Public Domain" :url ""} :repositories [["clojars" {:url "" :sign-releases false}]] :profiles {:dev {:main cross-pari...
090c1dcc03eeeb1f647cd7296bc0ac946dd6644f821d8af913a04aaaa17c351a
abarbu/haskell-torch
DefaultType.hs
# LANGUAGE MultiParamTypeClasses , KindSignatures , FlexibleInstances , DataKinds , PatternSynonyms , StandaloneDeriving , GeneralizedNewtypeDeriving , PolyKinds # module Plugin.DefaultType(DefaultType,plugin) where import GhcPlugins import TcRnTypes import Constraint import TcPluginM import qualified Inst import InstE...
null
https://raw.githubusercontent.com/abarbu/haskell-torch/03b2c10bf8ca3d4508d52c2123e753d93b3c4236/default-type-plugin/src/Plugin/DefaultType.hs
haskell
^ Name of the module | Find a 'Name' in a 'Module' given an 'OccName'
# LANGUAGE MultiParamTypeClasses , KindSignatures , FlexibleInstances , DataKinds , PatternSynonyms , StandaloneDeriving , GeneralizedNewtypeDeriving , PolyKinds # module Plugin.DefaultType(DefaultType,plugin) where import GhcPlugins import TcRnTypes import Constraint import TcPluginM import qualified Inst import InstE...
6a00d849199509ef8ec38ffea2b49042f6778ce30568152f233981c5685269bb
irastypain/sicp-on-language-racket
exercise_2_11.rkt
#lang racket (require "../lib/interval-arithmetic.rkt") Умножение интервалов , ; знаки концов интервалов Версия " в лоб " (define (mul-interval-v1 x y) (define (cross-compare pred1 pred2) (or (and pred1 (not pred2)) (and (not pred1) pred2))) (let ((lx (lower-bound x)) (ly (lower-bound y)...
null
https://raw.githubusercontent.com/irastypain/sicp-on-language-racket/0052f91d3c2432a00e7e15310f416cb77eeb4c9c/src/chapter02/exercise_2_11.rkt
racket
знаки концов интервалов Версия "определение положения
#lang racket (require "../lib/interval-arithmetic.rkt") Умножение интервалов , Версия " в лоб " (define (mul-interval-v1 x y) (define (cross-compare pred1 pred2) (or (and pred1 (not pred2)) (and (not pred1) pred2))) (let ((lx (lower-bound x)) (ly (lower-bound y)) (ux (upper-bound...
e6a02ca8bfb218d73700ffd6460073d46076854ce0710603a5a429be7e9bf569
chiroptical/optics-by-example
Lib.hs
# LANGUAGE InstanceSigs # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # module Lib where import Control.Lens import qualified Data.ByteString as BS import Data.Char (toLower, toUpper) import qualified Data.Map as M import qualified Data.Set as S ...
null
https://raw.githubusercontent.com/chiroptical/optics-by-example/3ee33546ee18c3a6f5510eec17a69d34e750198e/chapter8/src/Lib.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # ix :: Int -> Traversal' (Cycled a) a which makes indexing case insensitive ix :: Applicative f => String -> (a -> f a) -> CIMap a -> f (CIMap a) Exercises otherwise "default" False "Unscheduled
# LANGUAGE InstanceSigs # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # module Lib where import Control.Lens import qualified Data.ByteString as BS import Data.Char (toLower, toUpper) import qualified Data.Map as M import qualified Data.Set as S import qualified Data.Text as T import Data.Tree (Tree (Node)) ...
cce662aa150a44a18187bb54ad8779c8eba54f6791261deca3ef7315e9d943fc
namin/staged-miniKanren
regexp-tests.scm
(load "staged-mk.scm") (load "staged-regexp.scm") (run 6 (q) (regexp-matcho '(seq foo (rep bar)) q regexp-BLANK)) ;; we get some spurious cases
null
https://raw.githubusercontent.com/namin/staged-miniKanren/f5b665170000720f5d499ab03f31b5c55871ec4f/regexp-tests.scm
scheme
we get some spurious cases
(load "staged-mk.scm") (load "staged-regexp.scm") (run 6 (q) (regexp-matcho '(seq foo (rep bar)) q regexp-BLANK))
028a230ae230436080718d24601e3a3543fda1909f452c58168889a774d48c73
michiakig/sicp
ex-4.04-and-or.scm
;;;; Structure and Interpretation of Computer Programs Chapter 4 Section 1 The Metacircular Evaluator Exercise 4.4 (define (eval-and exp env) (define (r ops env) (if (null? (cdr ops)) ; last one (eval (car ops) env) (if (eval (car ops) env) (r (cdr ops) env) false))) (r (cdr exp) env)) (defin...
null
https://raw.githubusercontent.com/michiakig/sicp/1aa445f00b7895dbfaa29cf6984b825b4e5af492/ch4/ex-4.04-and-or.scm
scheme
Structure and Interpretation of Computer Programs last one
Chapter 4 Section 1 The Metacircular Evaluator Exercise 4.4 (define (eval-and exp env) (define (r ops env) (eval (car ops) env) (if (eval (car ops) env) (r (cdr ops) env) false))) (r (cdr exp) env)) (define (eval-or exp env) (define (r ops env) (if (null? (cdr ops)) (eval (car ops) env) (...
3fbf47aed798120a2c096fe94fb001858cf5939264fcaf58a2c844746a34ca68
jayrbolton/coursework
Exam2_bolton.hs
-- J Bolton Haskell exam 2 -- Test cases are at the bottom module Exam2 where import Data.List (foldl', foldl1') import Control.Applicative data GTree a = Node a [GTree a] deriving (Show) ( a ) . GTree instance Functor GTree where fmap g (Node x []) = Node (g x) [] fmap g (Node x ts) = Node (g x) ...
null
https://raw.githubusercontent.com/jayrbolton/coursework/f0da276527d42a6751fb8d29c76de35ce358fe65/computability_and_formal_languages/Haskell/exams/Exam2_bolton.hs
haskell
J Bolton Test cases are at the bottom (b). Preorder flatten (c). Preorder foldr (d). Flatten with fold. (e). (b). --------------------- -------------------------- --------------------- -------------------------- --------------------- --------------...
Haskell exam 2 module Exam2 where import Data.List (foldl', foldl1') import Control.Applicative data GTree a = Node a [GTree a] deriving (Show) ( a ) . GTree instance Functor GTree where fmap g (Node x []) = Node (g x) [] fmap g (Node x ts) = Node (g x) (map (fmap g) ts) flattenGT (Node x []) = ...
d8cbe07060ea3845c2d94690fbc574f2e5888c8fb3b6c2eb4295c58408d5b9b4
tweag/asterius
T11172.hs
# LANGUAGE UnboxedTuples # # OPTIONS_GHC -fno - warn - incomplete - patterns # module Main where data JSONState = JSONState [()] () () deriving Show weta_s6yD :: Either a (b, c) -> (# (Either a b, JSONState) #) weta_s6yD ww_s6ys = case ww_s6ys of Left l -> (# (Left l, JSONState [] () ()) #) Right (x, _) -> (#...
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/simplCore/T11172.hs
haskell
# LANGUAGE UnboxedTuples # # OPTIONS_GHC -fno - warn - incomplete - patterns # module Main where data JSONState = JSONState [()] () () deriving Show weta_s6yD :: Either a (b, c) -> (# (Either a b, JSONState) #) weta_s6yD ww_s6ys = case ww_s6ys of Left l -> (# (Left l, JSONState [] () ()) #) Right (x, _) -> (#...
bf6e2ac76b877517766740f48d66f8a1f7ec10c69a7368fe0772e506f1017552
JeffreyBenjaminBrown/digraphs-with-text
Insert.hs
-- | Sample use: Dwt.prettyPrint $ fr $ parse expr " " " a # b # # z # ( d # e ) # e # # f # # g # h " let Right ( _ , ) = runStateT ( mapM ( addExpr . fr . parse expr " " ) [ " a # b " , " # c " , " # # d # " ] ) empty module Dwt.Hash.Insert (prettyPrint, addExpr) where import Data.Graph.Inductive hiding (empty...
null
https://raw.githubusercontent.com/JeffreyBenjaminBrown/digraphs-with-text/34e47a52aa9abb6fd42028deba1623a92e278aae/src/Dwt/Hash/Insert.hs
haskell
| Sample use: | (At n) represents something already extant in the graph. Leaf and QRel represent something that *might* already exist; it will be searched for. If found, it becomes an At; if not, it is created, and becomes an At. ns is shorter or equal, so the case reshuffle _ [] is unnecessary
Dwt.prettyPrint $ fr $ parse expr " " " a # b # # z # ( d # e ) # e # # f # # g # h " let Right ( _ , ) = runStateT ( mapM ( addExpr . fr . parse expr " " ) [ " a # b " , " # c " , " # # d # " ] ) empty module Dwt.Hash.Insert (prettyPrint, addExpr) where import Data.Graph.Inductive hiding (empty, prettyPrint) im...
a7080064a06cd398c7a6fee64384d40f538fc358b95cff4100976b224418bc24
derekchiang/Erlang-Web-Crawler
mochiweb_html.erl
@author < > 2007 Mochi Media , Inc. @doc Loosely tokenizes and generates parse trees for HTML 4 . -module(mochiweb_html). -export([tokens/1, parse/1, parse_tokens/1, to_tokens/1, escape/1, escape_attr/1, to_html/1]). %% This is a macro to placate syntax highlighters.. -define(QUOTE, $\"). -define(S...
null
https://raw.githubusercontent.com/derekchiang/Erlang-Web-Crawler/0ff3b8dec1976b4e82f7177f951158a5a87c86f6/mochiweb_html.erl
erlang
This is a macro to placate syntax highlighters.. @type html_node() = {string(), [html_attr()], [html_node() | string()]} @type html_attr() = {string(), string()} @type html_token() = html_data() | start_tag() | end_tag() | inline_html() | html_comment() | html_doctype() @type html_data() = {data, string(), Whitesp...
@author < > 2007 Mochi Media , Inc. @doc Loosely tokenizes and generates parse trees for HTML 4 . -module(mochiweb_html). -export([tokens/1, parse/1, parse_tokens/1, to_tokens/1, escape/1, escape_attr/1, to_html/1]). -define(QUOTE, $\"). -define(SQUOTE, $\'). -define(ADV_COL(S, N), S#decode...
616a181916dbb94ae00ee5e8a6201878828b41d3524134a0495bddd6ea322233
camllight/camllight
asynt.mli
value analyse_phrase: alex__lexème stream -> langage__phrase_logo and analyse_programme: alex__lexème stream -> langage__programme_logo;;
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/examples/minilogo/asynt.mli
ocaml
value analyse_phrase: alex__lexème stream -> langage__phrase_logo and analyse_programme: alex__lexème stream -> langage__programme_logo;;
e41332557f51bf026f7f43d06ef69577e163ac6fcf4bc802e2e2fd4e74f9bf0e
reanimate/reanimate
doc_bellS.hs
#!/usr/bin/env stack -- stack runghc --package reanimate module Main(main) where import Reanimate import Reanimate.Builtin.Documentation main :: IO () main = reanimate $ docEnv $ signalA (bellS 2) drawProgress
null
https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/doc_bellS.hs
haskell
stack runghc --package reanimate
#!/usr/bin/env stack module Main(main) where import Reanimate import Reanimate.Builtin.Documentation main :: IO () main = reanimate $ docEnv $ signalA (bellS 2) drawProgress
48892f9727c041420902e80aa1b2cf631e290ed54d43cfe06ed83504375726f5
ghollisjr/cl-ana
array-utils.lisp
cl - ana is a Common Lisp data analysis library . Copyright 2021 ;;;; This file is part of cl - ana . ;;;; ;;;; cl-ana is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License ,...
null
https://raw.githubusercontent.com/ghollisjr/cl-ana/8e8abc17e3d2f8e597f336d7b0f5df39ef2406ee/array-utils/array-utils.lisp
lisp
cl-ana is free software: you can redistribute it and/or modify it (at your option) any later version. cl-ana 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 Public License...
cl - ana is a Common Lisp data analysis library . Copyright 2021 This file is part of cl - ana . under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License You may...
660ac67026e132325083c75d4cdb31e0d826bb7bb418811ca1cd05cad2300d6c
input-output-hk/plutus
Machines.hs
-- editorconfig-checker-disable-file # LANGUAGE TypeFamilies # module Evaluation.Machines ( test_machines ) where import GHC.Exts (fromString) import PlutusCore import PlutusCore.Evaluation.Machine.Ck import PlutusCore.Evaluation.Machine.ExBudgetingDefaults import PlutusCore.Evaluation.Machine.Exception impor...
null
https://raw.githubusercontent.com/input-output-hk/plutus/78402fb44148ce97a0a30efe406ba431fc49006c/plutus-core/plutus-core/test/Evaluation/Machines.hs
haskell
editorconfig-checker-disable-file
# LANGUAGE TypeFamilies # module Evaluation.Machines ( test_machines ) where import GHC.Exts (fromString) import PlutusCore import PlutusCore.Evaluation.Machine.Ck import PlutusCore.Evaluation.Machine.ExBudgetingDefaults import PlutusCore.Evaluation.Machine.Exception import PlutusCore.Generators.Hedgehog.Inte...
5346dca9e79daf6893c02dc2fc3ed57b81f81f99375357ae9dcaaea10c036699
ghc/packages-Cabal
FilePath.hs
# LANGUAGE CPP # # OPTIONS_GHC -fno - warn - unused - imports # module Distribution.Compat.FilePath ( isExtensionOf , stripExtension ) where import Data.List ( isSuffixOf, stripPrefix ) import System.FilePath #if !MIN_VERSION_filepath(1,4,2) isExtensionOf :: String -> FilePath -> Bool isExtensionOf ext@('.':_) = is...
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/Cabal/Distribution/Compat/FilePath.hs
haskell
# LANGUAGE CPP # # OPTIONS_GHC -fno - warn - unused - imports # module Distribution.Compat.FilePath ( isExtensionOf , stripExtension ) where import Data.List ( isSuffixOf, stripPrefix ) import System.FilePath #if !MIN_VERSION_filepath(1,4,2) isExtensionOf :: String -> FilePath -> Bool isExtensionOf ext@('.':_) = is...
f5337ea57ec6633329497fd17c7c551cffbfe2f1ec4ef8e985f16778452071e3
con-kitty/categorifier-c
KBits.hs
-- | Higher-kinded version of 'Data.Bits.Bits'. module Categorifier.C.KTypes.KBits ( KBits (..), ) where import Data.Proxy (Proxy (..)) class KBits f a where testBit :: f a -> Int -> f Bool setBitTo :: f a -> Int -> f Bool -> f a zeroBits :: f a instance KBits Proxy a where testBit Proxy _ = Proxy setB...
null
https://raw.githubusercontent.com/con-kitty/categorifier-c/a34ff2603529b4da7ad6ffe681dad095f102d1b9/Categorifier/C/KTypes/KBits.hs
haskell
| Higher-kinded version of 'Data.Bits.Bits'.
module Categorifier.C.KTypes.KBits ( KBits (..), ) where import Data.Proxy (Proxy (..)) class KBits f a where testBit :: f a -> Int -> f Bool setBitTo :: f a -> Int -> f Bool -> f a zeroBits :: f a instance KBits Proxy a where testBit Proxy _ = Proxy setBitTo Proxy _ Proxy = Proxy zeroBits = Proxy
7fea4344d3d3dfacdb2b3802cbacadcea656dc8ab2626732245fead244357909
atgreen/lisp-openshift
tests.lisp
(in-package #:trivial-backtrace-test) (deftestsuite generates-backtrace (trivial-backtrace-test) ()) (addtest (generates-backtrace) test-1 (let ((output nil)) (handler-case (let ((x 1)) (let ((y (- x (expt 1024 0)))) (/ 2 y))) (error (c) (setf output (print-backtrace c :output nil)))) (...
null
https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/trivial-backtrace-20101006-git/test/tests.lisp
lisp
(in-package #:trivial-backtrace-test) (deftestsuite generates-backtrace (trivial-backtrace-test) ()) (addtest (generates-backtrace) test-1 (let ((output nil)) (handler-case (let ((x 1)) (let ((y (- x (expt 1024 0)))) (/ 2 y))) (error (c) (setf output (print-backtrace c :output nil)))) (...
ad7a4c63bcda806a2cc10e1cf2e2da704e1c67e034a4dd0a83c2c1a1c473556a
darrenldl/ProVerif-ATP
reduction_helper.mli
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
null
https://raw.githubusercontent.com/darrenldl/ProVerif-ATP/7af6cfb9e0550ecdb072c471e15b8f22b07408bd/proverif2.00/src/reduction_helper.mli
ocaml
Returns whether the considered term should be added in the arguments of names. This function uses [Param.cur_state]. [check_delayed_names q] translates the fresh names in query [q] that could not be translated in [Pitsyntax.transl_query] because we need information on the arity/type of name function sym...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
7e1ce08303e91f4d215dad477ae1c01d1f87d0d939bfeeccdc609ba226e51412
appleshan/cl-http
tcp-stream.lisp
;;; Scieneer Common Lisp stream support for the FTP client . ;;; Copyright ( C ) 2006 , . Copyright ( C ) 2006 , Scieneer Pty Ltd. ;;; All rights reserved. ;;; ;;;------------------------------------------------------------------- ;;; ;;; FTP SOCKETS AND STREAMS ;;; (in-package :www-utils) (defclass socket ...
null
https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/scl/client/tcp-stream.lisp
lisp
All rights reserved. ------------------------------------------------------------------- FTP SOCKETS AND STREAMS Wait until ready for input.
Scieneer Common Lisp stream support for the FTP client . Copyright ( C ) 2006 , . Copyright ( C ) 2006 , Scieneer Pty Ltd. (in-package :www-utils) (defclass socket () ((socket-handle :type fixnum :initarg :socket :reader socket-handle) (port :initarg :port :reader socket-local-port :type fixnum) (ele...
67a5c8526c86c8a1f8ba4ffba96cf766208d2cb00c0d7d45543ccbd8a131e404
Gbury/dolmen
misc.ml
(* Option helpers *) (* ************************************************************************ *) module Options = struct let map f = function | None -> None | Some x -> Some (f x) end (* List helpers *) (* ************************************************************************ *) module Lists = stru...
null
https://raw.githubusercontent.com/Gbury/dolmen/0ef0a8a09fb1122e45d66c931ab7b1706bd74495/src/typecheck/misc.ml
ocaml
Option helpers ************************************************************************ List helpers ************************************************************************ String manipulation ************************************************************************ Bitvector manipulation ***************...
module Options = struct let map f = function | None -> None | Some x -> Some (f x) end module Lists = struct let init n f = let rec aux acc i = if i > n then List.rev acc else aux (f i :: acc) (i + 1) in aux [] 1 let replicate n x = let rec aux x acc n = if n <= 0...
86da5201a8ce208e2dfd263b2afebaabe6d7e03d4fb3811f0aa4f0659c42675c
ocamllabs/ocaml-modular-implicits
t172-pushenvacc1.ml
open Lib;; let x = 5 in let f _ = x + x in if f 0 <> 10 then raise Not_found ;; * 0 CONSTINT 42 2 PUSHACC0 3 MAKEBLOCK1 0 5 POP 1 7 9 BRANCH 16 11 ENVACC1 12 PUSHENVACC1 13 ADDINT 14 RETURN 1 16 CONSTINT 5 18 ...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t172-pushenvacc1.ml
ocaml
open Lib;; let x = 5 in let f _ = x + x in if f 0 <> 10 then raise Not_found ;; * 0 CONSTINT 42 2 PUSHACC0 3 MAKEBLOCK1 0 5 POP 1 7 9 BRANCH 16 11 ENVACC1 12 PUSHENVACC1 13 ADDINT 14 RETURN 1 16 CONSTINT 5 18 ...
ce9337a1eb3191431fed9d16db2ef80802ee510d48cb271455009602f0a0dc59
craigl64/clim-ccl
depdefs.lisp
-*- Mode : LISP ; Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*- This file contains some of the system dependent code for CLX ;;; TEXAS INSTRUMENTS INCORPORATED ;;; P.O. BOX 2909 AUSTIN , TEXAS 78769 ;;; Copyright ( C ) 1987 Texas Instruments Incorporated . ;;; ;;...
null
https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/xlib/depdefs.lisp
lisp
Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*- P.O. BOX 2909 Permission is granted to any individual or institution to use, copy, modify, and distribute this software, provided that this complete copyright and permission notice is maintained, intact, in all copies and supporting ...
This file contains some of the system dependent code for CLX TEXAS INSTRUMENTS INCORPORATED AUSTIN , TEXAS 78769 Copyright ( C ) 1987 Texas Instruments Incorporated . Texas Instruments Incorporated provides this software " as is " without (in-package :xlib) #-clx-ansi-common-lisp (defmacro d...
0e99351f1552ede094cd8e1516121a4b44815b628e2f09ee4e404ffbb078ba6d
erlang/corba
icstruct.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1997 - 2020 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applic...
null
https://raw.githubusercontent.com/erlang/corba/396df81473a386d0315bbba830db6f9d4b12a04f/lib/ic/src/icstruct.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific l...
Copyright Ericsson AB 1997 - 2020 . 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(icstruct). -export([struct_gen/4, except_gen/4, create_c_array_coding_file/5]). -import(ic_codegen, [emit/...
e89178e43fa159d816cb6bd5b395ec3adaef16821a1217fedcbdffadcf093b56
mfelleisen/Acquire
auxiliaries.rkt
#lang racket (require math) (provide (contract-out (randomly-pick (-> cons? any)) (distinct ;; for small lists O(n^2) (-> list? boolean?)) (sorted ;; is the given list sorted according to the given comparison wrt to the key (->i ((cmp (-> any/c any/c any))) (#:key (key (-> any/c any))) (...
null
https://raw.githubusercontent.com/mfelleisen/Acquire/5b39df6c757c7c1cafd7ff198641c99d30072b91/Lib/auxiliaries.rkt
racket
for small lists O(n^2) is the given list sorted according to the given comparison wrt to the key find the prefix that has the same value according to the [optional] key selector create equal-valued partitions (sorted), assuming the list is sorted create combinations of size at most k for list l w/o regard to ord...
#lang racket (require math) (provide (contract-out (randomly-pick (-> cons? any)) (distinct (-> list? boolean?)) (sorted (->i ((cmp (-> any/c any/c any))) (#:key (key (-> any/c any))) (ok? (-> list? any)))) (winners (->i ([l (key) (and/c cons? (sorted >= #:key (if (unsupplied-arg? key) ...
ee02c3d72e981843c23e2ea2d7c1d306b62a1152395a21554f9e8ecdc70f250b
fetburner/Coq2SML
mutils.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/plugins/micromega/mutils.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * : A reflexive tactic using ...
cb45438155e3a9eca075cd7b87d2290d076ba4262c03ccac193d0b5c604b9b69
ConsenSys/constellation
Network.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StrictData #-} module Constellation.Util.Network where import ClassyPrelude import Network.Socket ( Family(AF_INET), SocketType(Stream) , SockAddr(SockAddrInet) , aNY_PORT, iNADDR_ANY ...
null
https://raw.githubusercontent.com/ConsenSys/constellation/8fcd2d38b097da5242f511d2fb2149a9764f2f7b/Constellation/Util/Network.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData #
# LANGUAGE NoImplicitPrelude # module Constellation.Util.Network where import ClassyPrelude import Network.Socket ( Family(AF_INET), SocketType(Stream) , SockAddr(SockAddrInet) , aNY_PORT, iNADDR_ANY , socket, socketPort, bind, close ...
eb5bd4377050c57649e5891fcfc65579cdccb7d3fd941473bb17a6eb6892b130
racket/typed-racket
contract-conversion-error.rkt
#lang racket/load two cases of arity 1 , ok for shallow (module a typed/racket/shallow (define v values) (provide v)) (require 'a) v
null
https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/shallow/contract-conversion-error.rkt
racket
#lang racket/load two cases of arity 1 , ok for shallow (module a typed/racket/shallow (define v values) (provide v)) (require 'a) v
c2d9a956a3904a0e6c997d17a36522448812931a2aa56e5b5cd3a62ecb16928b
w3ntao/sicp-solution
logicPuzzle.rkt
#lang racket (require (only-in "../AbstractionOfData/list.rkt" nil flatmap list-ref)) (provide (all-defined-out)) (define (apply-constrains combination constrains) (if (null? constrains) combination (apply-constrains (filter (car constrains) ...
null
https://raw.githubusercontent.com/w3ntao/sicp-solution/00be3a7b4da50bb266f8a2db521a24e9f8c156be/ToolBox/LogicProgramming/logicPuzzle.rkt
racket
#lang racket (require (only-in "../AbstractionOfData/list.rkt" nil flatmap list-ref)) (provide (all-defined-out)) (define (apply-constrains combination constrains) (if (null? constrains) combination (apply-constrains (filter (car constrains) ...
886e0703a52857a6213ea321d31293a1f48adb188b96550ac93c7a11cdcb22b2
ruhler/smten
MiniSat.hs
# LANGUAGE MultiParamTypeClasses # {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE PatternGuards # {-# OPTIONS_HADDOCK hide #-} -- | Implementation of the MiniSat backend for smten. module Smten.Compiled.Smten.Search.Solver.MiniSat (minisat) where import qualified Data.HashTable.IO as H import Data.Functor import ...
null
https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-minisat/Smten/Compiled/Smten/Search/Solver/MiniSat.hs
haskell
# LANGUAGE TypeSynonymInstances # # OPTIONS_HADDOCK hide # | Implementation of the MiniSat backend for smten.
# LANGUAGE MultiParamTypeClasses # # LANGUAGE PatternGuards # module Smten.Compiled.Smten.Search.Solver.MiniSat (minisat) where import qualified Data.HashTable.IO as H import Data.Functor import Data.Maybe import Smten.Runtime.Build import Smten.Runtime.Formula.Type import Smten.Runtime.Formula.Finite import Smten....
660a7c4281c2d196dc5836dd4d3a67d485a436ed89419a92964760b0a490f95c
fragnix/fragnix
Data.Sequence.hs
# LANGUAGE Haskell98 # {-# LINE 1 "Data/Sequence.hs" #-} # LANGUAGE CPP # ...
null
https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/application/Data.Sequence.hs
haskell
# LINE 1 "Data/Sequence.hs" # --------------------------------------------------------------------------- | Module : Data.Sequence License : BSD-style Maintainer : Portability : portable General purpose finite sequences. Apart from being finite and having strict operations, sequences also differ...
# LANGUAGE Haskell98 # # LANGUAGE CPP # ...
6f23de5a29dab450c6d6ea03ade2d008644b94644e7123f2697f2cccea1197a0
bobatkey/foveran
Text.hs
-- | Module : Language . Foveran . Lexing . Text Copyright : 2012 -- License : BSD3 -- -- Maintainer : -- Stability : experimental -- Portability : unknown -- -- Functions for turning `Data.Text.Text` into a stream of lexemes, -- according to some lexical specification. module ...
null
https://raw.githubusercontent.com/bobatkey/foveran/e57463e3f6923becdf1249cd2fd0ccfcd566f7c5/src/Language/Foveran/Lexing/Text.hs
haskell
| License : BSD3 Maintainer : Stability : experimental Portability : unknown Functions for turning `Data.Text.Text` into a stream of lexemes, according to some lexical specification. ---------------------------------------------------------------------------- -------------------------------...
Module : Language . Foveran . Lexing . Text Copyright : 2012 module Language.Foveran.Lexing.Text ( lex , ErrorHandler (..) ) where import Prelude hiding (lex) import Data.ByteString (ByteString) import qualified Data.Text as T import Data.MonadicStream (S...
e02251c0a0185c1841c98ac78db9062b7142206e8ded49ab6f338f5ff57aac1c
geneweb/geneweb
translate.mli
$ I d : translate.mli , v 5.7 2007 - 09 - 12 09:58:44 ddr Exp $ Copyright ( c ) 1998 - 2007 INRIA val inline : string -> char -> (char -> string) -> string -> string * bool [ Translate.inline ] return the translation and a boolean telling True if it is actually the English version and a boolean telli...
null
https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/lib/translate.mli
ocaml
[Translate.language_name lang lang_def]
$ I d : translate.mli , v 5.7 2007 - 09 - 12 09:58:44 ddr Exp $ Copyright ( c ) 1998 - 2007 INRIA val inline : string -> char -> (char -> string) -> string -> string * bool [ Translate.inline ] return the translation and a boolean telling True if it is actually the English version and a boolean telli...
ec4954891cd1ea59e21d1e8e2a0ea1f3be340059e430c29dcf64f1e6becb2a73
minoki/haskell-floating-point
FastFFI.hs
| Module : Numeric . Rounded . Hardware . Backend . FastFFI The types in this module implements interval addition and subtraction in assembly . Currently , the only platform supported is x86_64 . One of the following technology will be used to control rounding mode : * SSE2 MXCSR * AVX512 EVEX e...
null
https://raw.githubusercontent.com/minoki/haskell-floating-point/c141bc8435c556e94d51254479a8213698679261/rounded-hw/src/Numeric/Rounded/Hardware/Backend/FastFFI.hs
haskell
# LANGUAGE UnliftedFFITypes # Double # INLINE roundedSqrt # # INLINE roundedSum # lower 2, %xmm3 lower, %xmm1 upper, %xmm2 lower 2, %xmm3 lower, %xmm1 upper, %xmm2 lower, %xmm1 upper, %xmm2 lower, %xmm1 upper, %xmm2 value lower, %xmm1 upper, %xmm2 foreign import prim "rounded_hw_interval_from_word64"...
| Module : Numeric . Rounded . Hardware . Backend . FastFFI The types in this module implements interval addition and subtraction in assembly . Currently , the only platform supported is x86_64 . One of the following technology will be used to control rounding mode : * SSE2 MXCSR * AVX512 EVEX e...
66e67d0d755c8d04195fc81fd3bcbcde75545ccbadaf180aa9d8a5c8e1571ed1
bytekid/mkbtt
processIsomorphism.ml
Copyright 2010 * GNU Lesser General Public License * * This file is part of MKBtt . * * is free software : you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the * Free Software Foundation , either version 3 of the License , or (...
null
https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mkbtt/isomorphisms/processIsomorphism.ml
ocaml
** OPENS ************************************************************** ** SUBMODULES ********************************************************* ** OPENS ************************************************************** ** FUNCTIONS ********************************************************** (if not (List.is_empty subsumed)...
Copyright 2010 * GNU Lesser General Public License * * This file is part of MKBtt . * * is free software : you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the * Free Software Foundation , either version 3 of the License , or (...
f3074a931383e2d2b94943b2ed67f2a5671c49fbcca33d6c79b0f58fe6ffee62
nikodemus/SBCL
utils.lisp
;;;; utility functions and macros needed by the back end to generate ;;;; code This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain....
null
https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/compiler/generic/utils.lisp
lisp
utility functions and macros needed by the back end to generate code more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. Determining whether a constant offset fits in an addressing mode. routi...
This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB!VM") Make a fixnum out of NUM . ( I.e. shift by two bits if it will fit . ) (defun fixnumize (num) (if ...
69e6ba1b51a93a07a6a29d4ef5de68512544238f337f12b0a47eb1294b4bff0d
janestreet/memtrace_viewer_with_deps
kind.mli
* A module internal to Incremental . Users should see { ! Incremental_intf } . [ Kind.t ] is a variant type with one constructor for each kind of node ( const , var , map , bind , etc . ) . [Kind.t] is a variant type with one constructor for each kind of node (const, var, map, bind, etc.). *) o...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/incremental/src/kind.mli
ocaml
* [slow_get_child t ~index] raises unless [0 <= index < max_num_children t]. It will also raise if the [index]'th child is currently undefined (e.g. a bind node with no current rhs).
* A module internal to Incremental . Users should see { ! Incremental_intf } . [ Kind.t ] is a variant type with one constructor for each kind of node ( const , var , map , bind , etc . ) . [Kind.t] is a variant type with one constructor for each kind of node (const, var, map, bind, etc.). *) o...
08b525a88962b175ae3e4007c68e02dbc8a6c7190dbc952ed745de5364e6a601
rohitjha/DiMPL
Relation.hs
| Module : Relation Description : Relation module for the MPL DSL Copyright : ( c ) , 2015 License : : Stability : Stable Functionality for * Generating element set * Obtaining list of first element values * Obtaining list of second element values ...
null
https://raw.githubusercontent.com/rohitjha/DiMPL/087c499ba104dec897fe325f86580e6d623c86ee/src/Relation.hs
haskell
| The 'relationToList' function converts a 'Relation' to a list representation. For example: >>> r2 {(1,1),(2,2),(3,3)} >>> relationToList r2 [(1,1),(2,2),(3,3)] | The 'listToRelation' function converts a list to a relation. For example: >>> let l = [(1,2),(2,3),...
| Module : Relation Description : Relation module for the MPL DSL Copyright : ( c ) , 2015 License : : Stability : Stable Functionality for * Generating element set * Obtaining list of first element values * Obtaining list of second element values ...
8227d0bf49c05f29776b4e5ac16ec8d2ad01e154c98c6159ddc3a2236ee853db
scrintal/heroicons-reagent
arrow_right.cljs
(ns com.scrintal.heroicons.mini.arrow-right) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M3 10a.75.75 0 01.75-.75h10.638L10.23 5.29a.75.75 0 111.04-1.08l5.5 5.25a.75.75...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/arrow_right.cljs
clojure
(ns com.scrintal.heroicons.mini.arrow-right) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M3 10a.75.75 0 01.75-.75h10.638L10.23 5.29a.75.75 0 111.04-1.08l5.5 5.25a.75.75...
76d618cca199de2c95bb2f7322456485766cb76e8d25b5b1bfe98074235ad912
fluent/fluent-logger-ocaml
stream_sender.ml
module U = Unix type dst_info = INET of string * int | UNIX of string type t = { dst_info:dst_info; conn_timeout:int; (* TODO: change these ones to immutable *) mutable socket:U.file_descr option; mutable last_conn_err_time:int option; mutable conn_err_count:int; dummy_one_byte:string; } let create dst...
null
https://raw.githubusercontent.com/fluent/fluent-logger-ocaml/3905bec43e5bdd40871bf994f0b98c23fa06d5cd/lib/stream_sender.ml
ocaml
TODO: change these ones to immutable TODO: extract this and conn_err_count to a module
module U = Unix type dst_info = INET of string * int | UNIX of string type t = { dst_info:dst_info; conn_timeout:int; mutable socket:U.file_descr option; mutable last_conn_err_time:int option; mutable conn_err_count:int; dummy_one_byte:string; } let create dst_info conn_timeout = { dst_info=dst_inf...
681dd700e0050367af61383eb07c6a867f36d018bf6d540c98d7e28863856865
hstreamdb/hstream
Compression.hs
module HStream.Utils.Compression ( decompress , compress ) where import qualified Codec.Compression.GZip as GZ import qualified Codec.Compression.Zstd as Z import Control.Exception (throw) import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BSL i...
null
https://raw.githubusercontent.com/hstreamdb/hstream/125d9982d47874aee5e33324b55689d64bd664c2/common/hstream/HStream/Utils/Compression.hs
haskell
module HStream.Utils.Compression ( decompress , compress ) where import qualified Codec.Compression.GZip as GZ import qualified Codec.Compression.Zstd as Z import Control.Exception (throw) import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BSL i...
f4fcfbfe196842dd1f486ff077dddf150630f2676b4f83bea017e95a91beb089
EveryTian/Haskell-Codewars
beginner-lost-without-a-map.hs
-- -lost-without-a-map module Codewars.Kata.LostWithout where maps :: [Int] -> [Int] maps = map (* 2)
null
https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/8kyu/beginner-lost-without-a-map.hs
haskell
-lost-without-a-map
module Codewars.Kata.LostWithout where maps :: [Int] -> [Int] maps = map (* 2)
7f2e668d4599ec1b825cfe6fd330fcdd57540b0e884429b919fd6b5d57ef8ca2
Quid2/zm
Flat.hs
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE StandaloneDeriving # module Test.E.Flat() where import Flat import Flat.Decoder() import Flat.Encoder() import Test.E t = putStrLn $ gen 4 -- Test only, incorrect instances -- Not faster than ge...
null
https://raw.githubusercontent.com/Quid2/zm/02c0514777a75ac054bfd6251edd884372faddea/test/Test/E/Flat.hs
haskell
# LANGUAGE CPP # # LANGUAGE DeriveAnyClass # Test only, incorrect instances Not faster than generated ones (at least up to E16) fs = , flat E32_1 , flat E256_254 , flat E256_253 ]
# LANGUAGE StandaloneDeriving # module Test.E.Flat() where import Flat import Flat.Decoder() import Flat.Encoder() import Test.E t = putStrLn $ gen 4 gen :: Int -> String gen numBits = let dt = "E"++show n n = 2 ^ numBits cs = zip [1..] $ map ((\n -> dt ++ ...
dc5d5438d327cd3d0f81a81996fa69f5aac84be95143e7a9db26442787cfcefe
stackbuilders/cis194-templates
AParser.hs
# LANGUAGE InstanceSigs # ---------------------------------------------------------------------- -- | -- CIS 194 Spring 2013 : Homework 10 -- ---------------------------------------------------------------------- module Homework10.AParser where -- base import Control.Applicative import Data.Char newtype Parser a...
null
https://raw.githubusercontent.com/stackbuilders/cis194-templates/f41b9f0b9945afd387f433ff40fa8988b6a9fe8b/src/Homework10/AParser.hs
haskell
-------------------------------------------------------------------- | -------------------------------------------------------------------- base | Just ('A',"BC") Nothing | >>> runParser (char 'x') "xyz" Just ('x',"yz") -------------------------------------------------------------------- -------------------...
# LANGUAGE InstanceSigs # CIS 194 Spring 2013 : Homework 10 module Homework10.AParser where import Control.Applicative import Data.Char newtype Parser a = Parser { runParser :: String -> Maybe (a, String) } > > > runParser ( satisfy isUpper ) " ABC " > > > runParser ( satisfy isUpper ) " abc " satisfy :...
64aaf4258cbb567c7a9d1e16df570dff3355a919d0ef92023e9a3b5b9919cdb2
silkapp/rest
Util.hs
module Rest.StringMap.Util ( pickleStringMap , pickleMap , mapSchema ) where import Data.JSON.Schema (JSONSchema, Schema (Map), schema) import Data.Proxy (Proxy) import Data.String (IsString (..)) import Data.String.ToString (ToString (..)) import Text.XML.HXT.Arrow.Pickle (PU, XmlPickler, xpElem, xpList, xpPa...
null
https://raw.githubusercontent.com/silkapp/rest/f0462fc36709407f236f57064d8e37c77bdf8a79/rest-stringmap/src/Rest/StringMap/Util.hs
haskell
module Rest.StringMap.Util ( pickleStringMap , pickleMap , mapSchema ) where import Data.JSON.Schema (JSONSchema, Schema (Map), schema) import Data.Proxy (Proxy) import Data.String (IsString (..)) import Data.String.ToString (ToString (..)) import Text.XML.HXT.Arrow.Pickle (PU, XmlPickler, xpElem, xpList, xpPa...
6ea4f12e1fe550d869578e4e269d9721b5cff6402ca629269847cbda6c24b8e6
fakedata-haskell/fakedata
Adjective.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Faker.Provider.Adjective where import Config import Control.Monad.Catch import Data.Text (Text) import Data.Vector (Vector) import Data.Monoid ((<>)) import Data.Yaml import Faker import Faker.Internal import Faker.Provider.TH import Language.Hask...
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/7b0875067386e9bb844c8b985c901c91a58842ff/src/Faker/Provider/Adjective.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Faker.Provider.Adjective where import Config import Control.Monad.Catch import Data.Text (Text) import Data.Vector (Vector) import Data.Monoid ((<>)) import Data.Yaml import Faker import Faker.Internal import Faker.Provider.TH import Language.Haskell.TH parseAdjective :: FromJSON...
eb6ccfe37060efc6c187d95ae609699e092f742b3140fdf3fe1a8b7c8404c05e
DevExpress/gimp-dx-screenshot
dx-screenshot.scm
(define (script-fu-dx-screenshotv2 image drawable drop-shadow shadow-distance shadow-angle shadow-blur shadow-color ...
null
https://raw.githubusercontent.com/DevExpress/gimp-dx-screenshot/a691687e24b18ce8d0c6d0ec78933bcd56ae3492/dx-screenshot.scm
scheme
wave cropper prepare code begin amount of points for points array moving from top-left to top-right x y y moving from top-right to bottom-right x x y moving from bottom-right to bottom-left x y moving from bottom-left to top-right (gimp-pencil drawable point points) wave cropper prepare code end era...
(define (script-fu-dx-screenshotv2 image drawable drop-shadow shadow-distance shadow-angle shadow-blur shadow-color ...
25f28f9a5a3bcd999b1f3088a732c22cfcbe0c07998a3b90c3c49221b5bda5e8
ammarhakim/gkylcas
basisTensor1x3v.lisp
;;; -*- Mode: LISP; package:maxima; syntax:common-lisp; -*- (in-package :maxima) (DSKSETQ |$varsC| '((MLIST SIMP) $X)) (ADD2LNC '|$varsC| $VALUES) (DSKSETQ |$varsP| '((MLIST SIMP) $X $VX $VY $VZ)) (ADD2LNC '|$varsP| $VALUES) (DSKSETQ |$basisC| '((MLIST SIMP (10. "/Users/JunoRavin/...
null
https://raw.githubusercontent.com/ammarhakim/gkylcas/1f8adad4f344ce8e3663451e16fdf1c32107ceed/maxima/g2/basis-precalc/basisTensor1x3v.lisp
lisp
-*- Mode: LISP; package:maxima; syntax:common-lisp; -*-
(in-package :maxima) (DSKSETQ |$varsC| '((MLIST SIMP) $X)) (ADD2LNC '|$varsC| $VALUES) (DSKSETQ |$varsP| '((MLIST SIMP) $X $VX $VY $VZ)) (ADD2LNC '|$varsP| $VALUES) (DSKSETQ |$basisC| '((MLIST SIMP (10. "/Users/JunoRavin/gkyl/cas-scripts/basis-precalc/basis-pre-calc.mac" ...
a93ac9d908a7817c5fe55474e0136263ce01d6f999eb841540d53d61377ccd59
sgbj/MaximaSharp
fdump.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ " " f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " ;;; "f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/numerical/slatec/fdump.lisp
lisp
Compiled by f2cl version: "f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $" Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':simple-array) (:array-slicing nil) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ " " f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl6.l , v 1d5cbacbb977 2008/08/24 00:56:27 rtoy $ " " macros.l , v fceac53...
36686e62518822dad69e3d9904c46f5d1214f0e4cd1d2ea8bcd1cf7bb17f032c
mikera/orculje
materials.clj
(ns mikera.orculje.materials) ;; ======================================================== ;; material lists and attributes (def wood-names ["alder" "applewood" "ash" "balsawood" "beech" "birch" "bloodwood" "cedar" "cherrywood" "corkwood" "cypress" "elm" "eucalyptus" "gumtree" "hickor...
null
https://raw.githubusercontent.com/mikera/orculje/4c7f9af78f9a8744e1ab3aef3ded151306883083/src/main/clojure/mikera/orculje/materials.clj
clojure
======================================================== material lists and attributes
(ns mikera.orculje.materials) (def wood-names ["alder" "applewood" "ash" "balsawood" "beech" "birch" "bloodwood" "cedar" "cherrywood" "corkwood" "cypress" "elm" "eucalyptus" "gumtree" "hickory" "hornbeam" "ironwood" "larch" "laurel" "mahogany" "maple" "oak" "pine" ...
d5aafdabfb42243640a8e9c50af732f07e1de57ab75791e1c627c424fee97e70
aimyskk/competitive-haskell
BellmanFord.hs
module Graph.BellmanFord ( bellmanFord ) where import WeightedGraph import qualified Data.Set as S import qualified Data.IntMap.Strict as M type Memo = M.IntMap Weight bellmanFord :: Graph -> Vertex -> Memo bellmanFord g s = _bellmanFord g n m0 where n = size g m0 = M.singleton s 0 _bellmanFord :: Graph -> ...
null
https://raw.githubusercontent.com/aimyskk/competitive-haskell/703f78e29060459d8d857d785e473e9696e2d67f/Graph/BellmanFord.hs
haskell
module Graph.BellmanFord ( bellmanFord ) where import WeightedGraph import qualified Data.Set as S import qualified Data.IntMap.Strict as M type Memo = M.IntMap Weight bellmanFord :: Graph -> Vertex -> Memo bellmanFord g s = _bellmanFord g n m0 where n = size g m0 = M.singleton s 0 _bellmanFord :: Graph -> ...
3ae65be5d6124a92dc9e196777bb4b71cb690380706116f2cfe61e4837c3ccd0
tsloughter/kuberl
kuberl_v1beta1_volume_attachment_source.erl
-module(kuberl_v1beta1_volume_attachment_source). -export([encode/1]). -export_type([kuberl_v1beta1_volume_attachment_source/0]). -type kuberl_v1beta1_volume_attachment_source() :: #{ 'inlineVolumeSpec' => kuberl_v1_persistent_volume_spec:kuberl_v1_persistent_volume_spec(), 'persistentVolumeName' => binar...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1beta1_volume_attachment_source.erl
erlang
-module(kuberl_v1beta1_volume_attachment_source). -export([encode/1]). -export_type([kuberl_v1beta1_volume_attachment_source/0]). -type kuberl_v1beta1_volume_attachment_source() :: #{ 'inlineVolumeSpec' => kuberl_v1_persistent_volume_spec:kuberl_v1_persistent_volume_spec(), 'persistentVolumeName' => binar...
add6274b2261216e39399d6bbc892c108336f77a9c73c889aab7a6c6cabd1813
hslua/hslua
test-hslua-packaging.hs
| Module : Main Copyright : © 2020 - 2023 : MIT Maintainer : < tarleb+ > Tests for hslua - packaging . Module : Main Copyright : © 2020-2023 Albert Krewinkel License : MIT Maintainer : Albert Krewinkel <tarleb+> Tests for hslua-packaging. -} import Test.Tasty (TestTree, def...
null
https://raw.githubusercontent.com/hslua/hslua/178c225f3da193f09fc27877a5a30e66eef069fb/hslua-packaging/test/test-hslua-packaging.hs
haskell
| Lua module packaging tests.
| Module : Main Copyright : © 2020 - 2023 : MIT Maintainer : < tarleb+ > Tests for hslua - packaging . Module : Main Copyright : © 2020-2023 Albert Krewinkel License : MIT Maintainer : Albert Krewinkel <tarleb+> Tests for hslua-packaging. -} import Test.Tasty (TestTree, def...
b139daf9758b020199e906ec0ee2350184c42b424ae268eb0200c3a0d6edb0a1
yapsterapp/er-cassandra
mock.clj
(ns er-cassandra.session.mock (:require [plumbing.core :refer :all] [taoensso.timbre :refer [trace debug info warn error]] [clojure.pprint :refer [pprint]] [manifold.deferred :as d] [er-cassandra.session :as s]) (:import [er_cassandra.session Session])) (defn deferred-value [v] (let [d (d/def...
null
https://raw.githubusercontent.com/yapsterapp/er-cassandra/1d059f47bdf8654c7a4dd6f0759f1a114fdeba81/src/er_cassandra/session/mock.clj
clojure
need a statement-matcher, not just a literal statement... maybe there should be a bunch of "query matchers" and for the test to pass
(ns er-cassandra.session.mock (:require [plumbing.core :refer :all] [taoensso.timbre :refer [trace debug info warn error]] [clojure.pprint :refer [pprint]] [manifold.deferred :as d] [er-cassandra.session :as s]) (:import [er_cassandra.session Session])) (defn deferred-value [v] (let [d (d/def...
9fb2d1e6fec9db8afd94b8524c134c59cb66f0e69e28b1321f8652891acf6830
clojure/core.typed
core.clj
(ns clojure.core.typed.test.CTYP-234.core (:require [clojure.core.typed :as t] [clojure.core.typed.test.CTYP-234.dep :as other])) (t/ann foo [other/MyType -> t/AnyInteger]) (defn foo [x] (:bar x))
null
https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/test/clojure/core/typed/test/CTYP_234/core.clj
clojure
(ns clojure.core.typed.test.CTYP-234.core (:require [clojure.core.typed :as t] [clojure.core.typed.test.CTYP-234.dep :as other])) (t/ann foo [other/MyType -> t/AnyInteger]) (defn foo [x] (:bar x))
56b394c5c169376cbc03023274c65e25740babf8cbf21c03fb1909bfc635a9aa
b0-system/brzo
dhash.ml
let md5 = Digestif.MD5.digest_string
null
https://raw.githubusercontent.com/b0-system/brzo/79d316a5024025a0112a8569a6335241b4620da8/examples/ocaml-amb/dhash.ml
ocaml
let md5 = Digestif.MD5.digest_string
b5ee8da829592d2ccae5132f26166d3e9da9475ec9f8491f2596b6bb25b2c8d6
monadfix/ormolu-live
VarSet.hs
( c ) The University of Glasgow 2006 ( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998 (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} # LANGUAGE CPP # module VarSet ( * , I d and TyVar set types VarSet, IdSet, TyVarSet, CoVarSet, TyCoVa...
null
https://raw.githubusercontent.com/monadfix/ormolu-live/d8ae72ef168b98a8d179d642f70352c88b3ac226/ghc-lib-parser-8.10.1.20200412/compiler/basicTypes/VarSet.hs
haskell
** Manipulating these sets ** Manipulating these sets | A non-deterministic Variable Set A non-deterministic set of variables. See Note [Deterministic UniqFM] in UniqDFM for explanation why it's not deterministic and why it matters. Use DVarSet if the set eventually gets converted into a list or folded over in ...
( c ) The University of Glasgow 2006 ( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998 (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} # LANGUAGE CPP # module VarSet ( * , I d and TyVar set types VarSet, IdSet, TyVarSet, CoVarSet, TyCoVa...
daaa807e3f6c025fd3b2102a59d4cb46352564c3a9f7f63edee5ed47634b65dd
pyr/cyanite
utils.clj
(ns io.cyanite.utils "These didn't fit anywhere else" (:import org.cliffc.high_scale_lib.NonBlockingHashMap)) (defprotocol MutableMap "Mutable map functionality" (entries [this] "Return a set of entries") (keyset [this] "Return the keyset") (remove! [this k] "Atomically remove and return an element") (co...
null
https://raw.githubusercontent.com/pyr/cyanite/2b9a1f26df808abdad3465dd1946036749b93000/src/io/cyanite/utils.clj
clojure
(ns io.cyanite.utils "These didn't fit anywhere else" (:import org.cliffc.high_scale_lib.NonBlockingHashMap)) (defprotocol MutableMap "Mutable map functionality" (entries [this] "Return a set of entries") (keyset [this] "Return the keyset") (remove! [this k] "Atomically remove and return an element") (co...
183a8b85cbece994d73cdcc830d816a2ee26d7cf1b606e0edc85309a1261f4da
ocurrent/bun
files.ml
afl - fuzz needs for there to be at least one file in its input directory . if the input directory does n't exist , or it 's empty , fix that for the user by creating it and making an empty file . if the input directory doesn't exist, or it's empty, fix that for the user by creating it and making an e...
null
https://raw.githubusercontent.com/ocurrent/bun/ded6358225b03b29e2604a528299328060bdc0a7/src/files.ml
ocaml
Ok anything will do any file will do! did someone say shotgun parsers? afl-gotcpu sometimes tells us that some CPUs *might* be overcommitted. it's usually too conservative; we want to try to use the CPUs that it's not sure about.
afl - fuzz needs for there to be at least one file in its input directory . if the input directory does n't exist , or it 's empty , fix that for the user by creating it and making an empty file . if the input directory doesn't exist, or it's empty, fix that for the user by creating it and making an e...