_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
b80a44c1f2168e1e53d8604fe539d4a320603256d768922d440aedcd8c66adf6
tschady/advent-of-code
d16_test.clj
(ns aoc.2021.d16-test (:require [aoc.2021.d16 :as sut] [clojure.test :refer :all])) (deftest challenges (is (= 996 (sut/part-1 sut/input))) (is (= 96257984154 (sut/part-2 sut/input))))
null
https://raw.githubusercontent.com/tschady/advent-of-code/2b88834e5decd86e6b1f642b173e178e3d1407cd/test/aoc/2021/d16_test.clj
clojure
(ns aoc.2021.d16-test (:require [aoc.2021.d16 :as sut] [clojure.test :refer :all])) (deftest challenges (is (= 996 (sut/part-1 sut/input))) (is (= 96257984154 (sut/part-2 sut/input))))
4ad4989be2798a2691d468812f5a47a1a1a4d4b7abb82c14553814f11cea8472
ssor/erlangDemos
cowboy_protocol.erl
Copyright ( c ) 2011 - 2012 , < > Copyright ( c ) 2011 , < > %% %% 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 notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVID...
null
https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/cowboy_old/src/cowboy_protocol.erl
erlang
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 notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2011 - 2012 , < > Copyright ( c ) 2011 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN A Cowboy protocol m...
e7769819b0f8e50f595d390670ca2d5312e64b8897a24b56f2b186f02089366b
clojure-interop/java-jdk
SOAPMessageContext.clj
(ns javax.xml.ws.handler.soap.SOAPMessageContext "The interface SOAPMessageContext provides access to the SOAP message for either RPC request or response. The javax.xml.soap.SOAPMessage specifies the standard Java API for the representation of a SOAP 1.1 message with attachments." (:refer-clojure :only ...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/ws/handler/soap/SOAPMessageContext.clj
clojure
returns null if no returns an empty array if no
(ns javax.xml.ws.handler.soap.SOAPMessageContext "The interface SOAPMessageContext provides access to the SOAP message for either RPC request or response. The javax.xml.soap.SOAPMessage specifies the standard Java API for the representation of a SOAP 1.1 message with attachments." (:refer-clojure :only ...
5e8b8838ef2d48c4e45e1962cb4f19ea3002bf14c72bca04fb0ae405f0fcc552
walkie/academic-webpage
Context.hs
{-# LANGUAGE OverloadedStrings, PatternGuards #-} module WebPage.Generate.Context ( TemplateApplication, mainTemplate, simpleTemplate ) where import Data.Monoid ((<>)) import System.FilePath import Hakyll import WebPage.Generate.Base import WebPage.Pubs import Data.List (find) -- * Settings currentNewsLen...
null
https://raw.githubusercontent.com/walkie/academic-webpage/4c86e5d5c1559cde08440427fa39bab7d91e765d/haskell/WebPage/Generate/Context.hs
haskell
# LANGUAGE OverloadedStrings, PatternGuards # * Settings * Applying Templates | Apply a template to a page of a given name. | Apply the main template to a page of a given name. | Apply the simple template to a page of a given name. * Extended Context | The complete context. ** Blurb context | Makes the content...
module WebPage.Generate.Context ( TemplateApplication, mainTemplate, simpleTemplate ) where import Data.Monoid ((<>)) import System.FilePath import Hakyll import WebPage.Generate.Base import WebPage.Pubs import Data.List (find) currentNewsLength = 3 type TemplateApplication = String -> Item String -> C...
3dd224bee1cebc8ec3cecb31a35c94020016f52bd26b46124706f5f58e29df96
pallet/pallet
implementation.clj
(ns pallet.compute.implementation "Implementation details" (:require [chiba.plugin :refer [plugins]] [clojure.tools.logging :as logging])) (defmulti service "Instantiate a compute service. Providers should implement a method for this. See pallet.compute/instantiate-provider." (fn [provider-name & _] (...
null
https://raw.githubusercontent.com/pallet/pallet/30226008d243c1072dcfa1f27150173d6d71c36d/src/pallet/compute/implementation.clj
clojure
(ns pallet.compute.implementation "Implementation details" (:require [chiba.plugin :refer [plugins]] [clojure.tools.logging :as logging])) (defmulti service "Instantiate a compute service. Providers should implement a method for this. See pallet.compute/instantiate-provider." (fn [provider-name & _] (...
5de16ea7211c6d7a541106d81f95ddb68048172f5fd6f0380e2ac416cba1dd0c
clojure-interop/java-jdk
MetalBorders$TextFieldBorder.clj
(ns javax.swing.plaf.metal.MetalBorders$TextFieldBorder (:refer-clojure :only [require comment defn ->]) (:import [javax.swing.plaf.metal MetalBorders$TextFieldBorder])) (defn ->text-field-border "Constructor." (^MetalBorders$TextFieldBorder [] (new MetalBorders$TextFieldBorder ))) (defn paint-border "D...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/metal/MetalBorders%24TextFieldBorder.clj
clojure
(ns javax.swing.plaf.metal.MetalBorders$TextFieldBorder (:refer-clojure :only [require comment defn ->]) (:import [javax.swing.plaf.metal MetalBorders$TextFieldBorder])) (defn ->text-field-border "Constructor." (^MetalBorders$TextFieldBorder [] (new MetalBorders$TextFieldBorder ))) (defn paint-border "D...
145648ee130c85dbc8feb8a13d93fb731199fac5333c0ede1f45b1610f0d0421
ds-wizard/engine-backend
DocumentTemplateDraftList.hs
module Wizard.Database.Mapping.DocumentTemplate.DocumentTemplateDraftList where import Database.PostgreSQL.Simple import Wizard.Model.DocumentTemplate.DocumentTemplateDraftList instance FromRow DocumentTemplateDraftList
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-wizard/src/Wizard/Database/Mapping/DocumentTemplate/DocumentTemplateDraftList.hs
haskell
module Wizard.Database.Mapping.DocumentTemplate.DocumentTemplateDraftList where import Database.PostgreSQL.Simple import Wizard.Model.DocumentTemplate.DocumentTemplateDraftList instance FromRow DocumentTemplateDraftList
902dc5fe07f3ab0dc2732577f7f562c51f1c78a1d1be93c47a89764d77884be9
seckcoder/course-compiler
s3_9.rkt
(define (add [x : Integer] [y : Integer]) : Integer (+ x y)) (add 20 22)
null
https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/s3_9.rkt
racket
(define (add [x : Integer] [y : Integer]) : Integer (+ x y)) (add 20 22)
c04c1818664b54f57dc55071d1b4149632205e056805aa1eeed1ba820d9ea246
Enecuum/Node
Keys.hs
{-# LANGUAGE DeriveGeneric #-} # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} # LANGUAGE StandaloneDeriving # {-# LANGUAGE TypeSynonymInstances #-} # OPTIONS_GHC -fno - warn - orphans # module Enecuum.Core.Cryp...
null
https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/src/Enecuum/Core/Crypto/Keys.hs
haskell
# LANGUAGE DeriveGeneric # # LANGUAGE OverloadedStrings # # LANGUAGE PackageImports # # LANGUAGE TypeSynonymInstances #
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE StandaloneDeriving # # OPTIONS_GHC -fno - warn - orphans # module Enecuum.Core.Crypto.Keys (generateNewRandomAnonymousKeyPair, getPrivateKey, showPublicKey, showPublicKeyB, showPrivateKey, readPublicKey, readPublicKeyB,...
d69965dc4b1e59e967411c0abf9261017c9760587eef433e81274ea65537e8bf
protojure/protoc-plugin
core.clj
Copyright © 2019 State Street Bank and Trust Company . All rights reserved ;; SPDX - License - Identifier : Apache-2.0 (ns protojure.plugin.parse.core "Functions that transform the protoc CodeGeneratorRequest to STG template format" (:require [clojure.pprint :refer :all] [clojure.string :as strin...
null
https://raw.githubusercontent.com/protojure/protoc-plugin/2bfae578b95b2bef242c84188395149b1f54f4ef/src/protojure/plugin/parse/core.clj
clojure
------------------------------------------------------------------- The following deftypes at the top of this ns represent the data grpc clojure source file. After the deftypes, various helpers follow. These functions parse and process the request sent by protoc mapping the data in the marshalled by calls within...
Copyright © 2019 State Street Bank and Trust Company . All rights reserved SPDX - License - Identifier : Apache-2.0 (ns protojure.plugin.parse.core "Functions that transform the protoc CodeGeneratorRequest to STG template format" (:require [clojure.pprint :refer :all] [clojure.string :as string] ...
9780ad1955f73ca6a45fdaaa544672497747ad3878e6b481cef5d25fc4ca8d02
screenshotbot/screenshotbot-oss
test-url.lisp
(defpackage :util.test-url (:use :cl :fiveam :hex) (:import-from :hex :missing-required-arg)) (in-package :util.test-url) (def-suite* :util.test-url) (test simple-make-url (is (equal "/foo/bar" (make-url "/foo/bar")))) (test simple-param (is (equal "/foo/bar?key=val" (make-url...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/d92e420f1d9f928d974273e525ded5724a6f9a8c/src/hunchentoot-extensions/test-url.lisp
lisp
(defpackage :util.test-url (:use :cl :fiveam :hex) (:import-from :hex :missing-required-arg)) (in-package :util.test-url) (def-suite* :util.test-url) (test simple-make-url (is (equal "/foo/bar" (make-url "/foo/bar")))) (test simple-param (is (equal "/foo/bar?key=val" (make-url...
dd08da8c5f79e397ae4be976363119ccc29dc6dc17f5bf9a6cbeaa79a4485b48
Clojure2D/clojure2d-examples
interval.clj
(ns rt4.in-one-weekend.ch10a.interval (:refer-clojure :exclude [empty]) (:require [fastmath.core :as m])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defprotocol IntervalProto (contains [interval x]) ;; a <= x <= b ;; introduced due to the bug in the bo...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/in_one_weekend/ch10a/interval.clj
clojure
a <= x <= b introduced due to the bug in the book (in the time of writing this code), a < x <= b
(ns rt4.in-one-weekend.ch10a.interval (:refer-clojure :exclude [empty]) (:require [fastmath.core :as m])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defprotocol IntervalProto (contains- [interval x]) (clamp [interval x])) (defrecord Interval [^double...
99f9d379bed4c2033f64148536d37a89245df6b6943071cc543d4c18e54011c8
xsc/pandect
signature_generator.clj
(ns ^:no-doc pandect.gen.signature-generator (:require [pandect.gen [core :as gen] [protocol-utils :as protocol] [function-utils :as function]] [pandect.utils.convert :as convert])) # # Generation (defprotocol SignatureGen (base-sym [_ sym]) (bytes->signature...
null
https://raw.githubusercontent.com/xsc/pandect/ffc95e81484045ddbe235a2f4208bd5677f1195b/src/pandect/gen/signature_generator.clj
clojure
sign implementation verification implementation sign function verify function
(ns ^:no-doc pandect.gen.signature-generator (:require [pandect.gen [core :as gen] [protocol-utils :as protocol] [function-utils :as function]] [pandect.utils.convert :as convert])) # # Generation (defprotocol SignatureGen (base-sym [_ sym]) (bytes->signature...
b1d8e11f6b21c5dfb4c9671b992124397c356ac6c0f7f331d02df6055e1fc974
googleson78/fp-lab-2022-23
ParserTasksBeforeStart.hs
-- cover all cases! # OPTIONS_GHC -fwarn - incomplete - patterns # -- warn about incomplete patterns v2 # OPTIONS_GHC -fwarn - incomplete - uni - patterns # -- write all your toplevel signatures! # OPTIONS_GHC -fwarn - missing - signatures # -- use different names! {-# OPTIONS_GHC -fwarn-name-shadowing #-} -- use all y...
null
https://raw.githubusercontent.com/googleson78/fp-lab-2022-23/6974b7b383cbfb517f84913b357bc3480fc486ad/exercises/11/ParserTasksBeforeStart.hs
haskell
cover all cases! warn about incomplete patterns v2 write all your toplevel signatures! use different names! # OPTIONS_GHC -fwarn-name-shadowing # use all your pattern matches! Things we have available: "Constructors"/producers: "Destructors"/consumers: Combinators: do syntax - sequence multiple parsers, allow...
# OPTIONS_GHC -fwarn - incomplete - patterns # # OPTIONS_GHC -fwarn - incomplete - uni - patterns # # OPTIONS_GHC -fwarn - missing - signatures # # OPTIONS_GHC -fwarn - unused - matches # module ParserTasks where import Control.Applicative (many, some, (<|>)) import Data.Char import Parser (Parser, nom, parse, parseF...
9a2c2204253e53bf73ee53912f154481cc2592b564563a5e4024b8d74a0fc196
hamidreza-s/Tecipe
tecipe_acceptor_dynamic.erl
-module(tecipe_acceptor_dynamic). -behaviour(gen_server). -export([start_link/4]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -include("tecipe.hrl"). -record(state, {name, handler, transport, listening_sock, listener_rec}). start_link(Ref, Handler, ListeningSock, ...
null
https://raw.githubusercontent.com/hamidreza-s/Tecipe/bcafcafec4c9c5981e6b89537808f3c9e94ea290/src/tecipe_acceptor_dynamic.erl
erlang
-module(tecipe_acceptor_dynamic). -behaviour(gen_server). -export([start_link/4]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -include("tecipe.hrl"). -record(state, {name, handler, transport, listening_sock, listener_rec}). start_link(Ref, Handler, ListeningSock, ...
7308b90a4e772bcc875265352d65df13c6cf8dea3fddc4a6e90421462628723f
EFanZh/EOPL-Exercises
exercise-2.20.rkt
#lang eopl Exercise 2.20 [ ★ ★ ★ ] In the representation of binary trees in exercise 2.19 it is easy to move from a parent node to ;; one of its sons, but it is impossible to move from a son to its parent without the help of context arguments. Extend the representation of lists in exercise 2.18 to represent nodes ...
null
https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/solutions/exercise-2.20.rkt
racket
one of its sons, but it is impossible to move from a son to its parent without the help of context arguments. Extend Parent := (Int Symbol Bintree)
#lang eopl Exercise 2.20 [ ★ ★ ★ ] In the representation of binary trees in exercise 2.19 it is easy to move from a parent node to the representation of lists in exercise 2.18 to represent nodes in a binary tree . As a hint , consider representing the portion of the tree above the current node by a reversed list...
20c59aec5c59cb7e47217cba54d2874a15ea74733e780748b6989692d7b265e8
haskell/statistics
Transform.hs
# LANGUAGE DeriveDataTypeable , DeriveGeneric , FlexibleContexts , FlexibleInstances , UndecidableInstances # FlexibleInstances, UndecidableInstances #-} -- | -- Module : Statistics.Distribution.Transform Copyright : ( c ) 2013 ; -- License : BSD3 -- -- Maintainer : -- Stability : experimental --...
null
https://raw.githubusercontent.com/haskell/statistics/3c555df2ae8817d0124ff9315a0e78b47e7a924e/Statistics/Distribution/Transform.hs
haskell
| Module : Statistics.Distribution.Transform License : BSD3 Maintainer : Stability : experimental Portability : portable Transformations over distributions | Linear transformation applied to distribution. > x' = μ + σ·x # UNPACK # ^ Location parameter. # UNPACK # ^ Scale parameter. ^ Distributio...
# LANGUAGE DeriveDataTypeable , DeriveGeneric , FlexibleContexts , FlexibleInstances , UndecidableInstances # FlexibleInstances, UndecidableInstances #-} Copyright : ( c ) 2013 ; module Statistics.Distribution.Transform ( LinearTransform (..) , linTransFixedPoint , scaleAround ) wher...
6d418075b143bb28bef381dc82163c9772e9969192670ddfcb97c973b6646d2b
input-output-hk/goblins
Util.hs
-- | Utility functions module Test.Goblin.Util where -- | `<$>` through nested functors. (<$$>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b) (<$$>) = fmap . fmap -- | `<*>` through nested functors. (<**>) :: (Applicative f, Applicative g) => f (g (a -> b)) -> f (g a) -> f (g b) (<**>) f ...
null
https://raw.githubusercontent.com/input-output-hk/goblins/cde90a2b27f79187ca8310b6549331e59595e7ba/src/Test/Goblin/Util.hs
haskell
| Utility functions | `<$>` through nested functors. | `<*>` through nested functors.
module Test.Goblin.Util where (<$$>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b) (<$$>) = fmap . fmap (<**>) :: (Applicative f, Applicative g) => f (g (a -> b)) -> f (g a) -> f (g b) (<**>) f x = (\g y -> g <*> y) <$> f <*> x
6b2d0798787f5c91766e72d415b8d82aed10971293ff8b0e9c0e4a61aad2dea8
haskellfoundation/error-message-index
Main.hs
module Example (answer, Example(..)) where data Example = Example { answer :: Int }
null
https://raw.githubusercontent.com/haskellfoundation/error-message-index/6b80c2fe6d8d2941190bda587bcea6f775ded0a4/message-index/messages/GHC-47854/example2/before/Main.hs
haskell
module Example (answer, Example(..)) where data Example = Example { answer :: Int }
e06c2a35475322e7969b3ea1e38e33472394bf1ac00dd907986a44bdf66c3800
RyanGibb/aeon
aeon_log.mli
TODO is there a way to deduplciate these type signatures ? val log_level_0 : Format.formatter -> [< `Rx | `Tx ] -> [< Eio.Net.Sockaddr.t ] -> Cstruct.t -> unit val log_level_1 : Format.formatter -> [< `Rx | `Tx ] -> [< Eio.Net.Sockaddr.t ] -> Cstruct.t -> unit val log_level_2 : Format.formatter -> [< `Rx | `Tx ] -> ...
null
https://raw.githubusercontent.com/RyanGibb/aeon/179ac817e6a2852496ca2161435cdc310c483897/src/aeon_log.mli
ocaml
TODO is there a way to deduplciate these type signatures ? val log_level_0 : Format.formatter -> [< `Rx | `Tx ] -> [< Eio.Net.Sockaddr.t ] -> Cstruct.t -> unit val log_level_1 : Format.formatter -> [< `Rx | `Tx ] -> [< Eio.Net.Sockaddr.t ] -> Cstruct.t -> unit val log_level_2 : Format.formatter -> [< `Rx | `Tx ] -> ...
fab8dfce980575465b9a32c162f767afce1a31403934d5ce202321a3e5a18f78
imitator-model-checker/imitator
Cache.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * IMITATOR * * Laboratoire Spécification et Vérification ( ENS Cachan & CNRS , France ) * Université Paris 13 , LIPN , CNRS , France * * Module description ...
null
https://raw.githubusercontent.com/imitator-model-checker/imitator/105408ae2bd8c3e3291f286e4d127defd492a58b/src/Cache.ml
ocaml
********************************************************** Internal modules ********************************************************** ********************************************************** * Statistics ********************************************************** statistics mutable hits : int; mutable misses :...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * IMITATOR * * Laboratoire Spécification et Vérification ( ENS Cachan & CNRS , France ) * Université Paris 13 , LIPN , CNRS , France * * Module description ...
bf0c3615a68ba0efbb0ed0bc42d5a58286734b3a92e490ed01e6e831d549b1c2
sweirich/trellys
Layout.hs
# LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses # -- -indentation-based-syntaxes-in-haskells-parsec/3023615#3023615 module Language.SepPP.Layout ( laidout -- repeat a parser in layout, separated by (virtual) semicolons consumes one or more spaces , comments , and onside newlines ...
null
https://raw.githubusercontent.com/sweirich/trellys/63ea89d8fa09929c23504665c55a3d909fe047c5/lib/sepp/Language/SepPP/Layout.hs
haskell
-indentation-based-syntaxes-in-haskells-parsec/3023615#3023615 repeat a parser in layout, separated by (virtual) semicolons (`maybeFollowedBy` space) type needed to describe parsers a fresh layout semicolon or virtual semicolon if true, must run offside calculation TODO: Parse C-style #line pragmas out here we...
# LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses # module Language.SepPP.Layout consumes one or more spaces , comments , and onside newlines in a layout rule , maybeFollowedBy ) where import Control.Applicative ((<$>)) import Control.Monad (guard) import Data.Char (isSpace) import T...
109a60b909d167ae23e08382afa3e0101ba57927150b8aff6c6ff1175b633ecf
ds-wizard/engine-backend
DocumentTemplateDraftDetailJM.hs
module Wizard.Api.Resource.DocumentTemplate.Draft.DocumentTemplateDraftDetailJM where import Data.Aeson import Shared.Api.Resource.Package.PackagePatternJM () import Shared.Model.DocumentTemplate.DocumentTemplateJM () import Shared.Util.Aeson import Wizard.Api.Resource.Questionnaire.QuestionnaireSuggestionJM () impor...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-wizard/src/Wizard/Api/Resource/DocumentTemplate/Draft/DocumentTemplateDraftDetailJM.hs
haskell
module Wizard.Api.Resource.DocumentTemplate.Draft.DocumentTemplateDraftDetailJM where import Data.Aeson import Shared.Api.Resource.Package.PackagePatternJM () import Shared.Model.DocumentTemplate.DocumentTemplateJM () import Shared.Util.Aeson import Wizard.Api.Resource.Questionnaire.QuestionnaireSuggestionJM () impor...
30c20047307b6878c79313433f28fa0a743667321a55dbdd29ffe4f2a1b17e54
iu-parfunc/verified-instances
Generics.hs
{-@ LIQUID "--higherorder" @-} {-@ LIQUID "--exactdc" @-} {-@ LIQUID "--noadt" @-} module GenericProofs.VerifiedSemigroup.Generics where import Language.Haskell.Liquid.ProofCombinators import GenericProofs.VerifiedSemigroup import Generics.Deriving.Newtypeless.Base.Internal {-@ axiomatize sappendU1...
null
https://raw.githubusercontent.com/iu-parfunc/verified-instances/cebfdf1e3357a693360be74c90211be18ce3c045/generic-proofs/src/GenericProofs/VerifiedSemigroup/Generics.hs
haskell
@ LIQUID "--higherorder" @ @ LIQUID "--exactdc" @ @ LIQUID "--noadt" @ @ axiomatize sappendU1 @ @ axiomatize sappendK1 @ @ axiomatize sappendM1 @ @ axiomatize sappendProd @
module GenericProofs.VerifiedSemigroup.Generics where import Language.Haskell.Liquid.ProofCombinators import GenericProofs.VerifiedSemigroup import Generics.Deriving.Newtypeless.Base.Internal sappendU1 :: U1 p -> U1 p -> U1 p sappendU1 _ _ = U1 @ sappendU1Assoc : : x : U1 p - > y : U1 p - > z : U1 p ...
110eaf18761bd16072ff0777989689b5fbcdca7e8e2a98795bb5718f92e51c02
cxphoe/SICP-solutions
environment.rkt
(load "expression.rkt") ;; assertions (define THE-ASSERTIONS the-empty-stream) (define (fetch-assertions pattern frame) ;; fetch assertions with or without index (if (use-index? pattern) (get-indexed-assertions pattern) (get-all-assertions))) (define (get-all-assertions) THE-ASSERTIONS) (define (get...
null
https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%204-Metalinguistic%20Abstraction/4.Logical%20Programing/environment.rkt
racket
assertions fetch assertions with or without index rules operation store it with index store it simply store assertions and rules in the method of stream the assertions with same index will be stored in the same place in operation table (table.rkt).
(load "expression.rkt") (define THE-ASSERTIONS the-empty-stream) (define (fetch-assertions pattern frame) (if (use-index? pattern) (get-indexed-assertions pattern) (get-all-assertions))) (define (get-all-assertions) THE-ASSERTIONS) (define (get-indexed-assertions pattern) (get-stream (index-key-of p...
333e455edb10aa92629473d9ae334f9ba2d04453787db28aa0f5ef2a8c872d82
jgdavey/clj-pgcopy
protocols.clj
(ns clj-pgcopy.protocols) (defprotocol IPGBinaryWrite (write-to [this ^DataOutputStream out]))
null
https://raw.githubusercontent.com/jgdavey/clj-pgcopy/71f86518f69d7ec71ebfae413b2acfee1b88a0c8/src/clj_pgcopy/protocols.clj
clojure
(ns clj-pgcopy.protocols) (defprotocol IPGBinaryWrite (write-to [this ^DataOutputStream out]))
d495fc13011b734e6961b2166aaaeaecd20aba52717e0a126e3c39c040eb5277
aisamanra/config-ini
Raw.hs
-- | -- Module : Data.Ini.Config.Raw Copyright : ( c ) , 2017 -- License : BSD Maintainer : < > -- Stability : experimental -- -- __Warning!__ This module is subject to change in the future, and therefore should -- not be relied upon to have a consistent API. module Data.Ini.Config.Raw ( -- * INI t...
null
https://raw.githubusercontent.com/aisamanra/config-ini/2507968371f108737d7354f23b4f3bf0dff02f61/src/Data/Ini/Config/Raw.hs
haskell
| Module : Data.Ini.Config.Raw License : BSD Stability : experimental __Warning!__ This module is subject to change in the future, and therefore should not be relied upon to have a consistent API. * INI types * serializing and deserializing * inspection which has had leading and trailing whitespace r...
Copyright : ( c ) , 2017 Maintainer : < > module Data.Ini.Config.Raw RawIni (..), IniSection (..), IniValue (..), BlankLine (..), NormalizedText (..), normalize, parseRawIni, printRawIni, lookupInSection, lookupSection, lookupValue, ) where import Control.Mona...
d3b2e9eafdea6410f85b7a3d96d8b99b76458baebec77b6801b5593dcfffec5f
haskell-game/sdl2
OpenGLExample.hs
--port of -OpenGL-examples # LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} module OpenGLExample where import Control.Monad import Foreign.C.Types import SDL.Vect import qualified Data.ByteString as BS import qualified Data.Vector.Storable as V import System.Exit (exitFailure) import System.IO ...
null
https://raw.githubusercontent.com/haskell-game/sdl2/a2646ede53d98aebf8f7c49b01f99236701b7e44/examples/OpenGLExample.hs
haskell
port of -OpenGL-examples # LANGUAGE OverloadedStrings # compile vertex shader Do it again for the fragment shader
# LANGUAGE CPP # module OpenGLExample where import Control.Monad import Foreign.C.Types import SDL.Vect import qualified Data.ByteString as BS import qualified Data.Vector.Storable as V import System.Exit (exitFailure) import System.IO import SDL (($=)) import qualified SDL import qualified Graph...
3d8df4bcfcd56f96491c3955ec7b05208e6ba3bbac5fcb86652bdb7385dbc201
haskell/statistics
Types.hs
# LANGUAGE DeriveFunctor , DeriveDataTypeable , DeriveGeneric # module Statistics.Test.Types ( Test(..) , isSignificant , TestResult(..) , significant , PositionTest(..) ) where import Control.DeepSeq (NFData(..)) import Control.Monad (liftM3) import Data.Aeson (FromJSON, ToJSON) import Data....
null
https://raw.githubusercontent.com/haskell/statistics/a2aa25181e50cd63db4a785c20c973a3c4dd5dac/Statistics/Test/Types.hs
haskell
| Result of hypothesis testing ^ Null hypothesis should be rejected ^ Data is compatible with hypothesis | Result of statistical test. ^ Probability of getting value of test statistics at least as extreme as measured. ^ Statistic used for test. ^ Distribution of test statistics if null hypothesis is correct. ...
# LANGUAGE DeriveFunctor , DeriveDataTypeable , DeriveGeneric # module Statistics.Test.Types ( Test(..) , isSignificant , TestResult(..) , significant , PositionTest(..) ) where import Control.DeepSeq (NFData(..)) import Control.Monad (liftM3) import Data.Aeson (FromJSON, ToJSON) import Data....
e1882fbb357016a7ad807b954a7bec9d2ea631c76ab66595e1f9bc9be4415a9e
joehillen/craft
Helpers.hs
module Craft.Helpers ( module Craft.Helpers , when , unless , void , md5 ) where import Control.Monad (unless, void, when) import Data.Digest.Pure.MD5 (md5) import System.Console.ANSI color :: Color -> IO a -> IO a color c action = do setSGR [SetColor Foreground Vivid c] r <-...
null
https://raw.githubusercontent.com/joehillen/craft/de31caa7f86cceaab23dbef0f05208bb853cf73b/src/Craft/Helpers.hs
haskell
module Craft.Helpers ( module Craft.Helpers , when , unless , void , md5 ) where import Control.Monad (unless, void, when) import Data.Digest.Pure.MD5 (md5) import System.Console.ANSI color :: Color -> IO a -> IO a color c action = do setSGR [SetColor Foreground Vivid c] r <-...
6856b39b81c3d0dd80f87215c7c7f3f5f87b76cb04e1e1025a61b8b7027ae7f3
EveryTian/Haskell-Codewars
Tests.hs
# LANGUAGE RecordWildCards # import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Brackets (arePaired) main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs specs :: Spec specs = descri...
null
https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/exercism/bracket-push/test/Tests.hs
haskell
# LANGUAGE RecordWildCards # import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Brackets (arePaired) main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs specs :: Spec specs = descri...
c2a856e2f76743c503be5c370d8327b16fcfbbac3c54d45de65b1c4d8298b7fc
PJK/haskell-pattern-matching
Redundant.hs
module Redundant where func :: Bool -> Int func False = 1 func False = 2
null
https://raw.githubusercontent.com/PJK/haskell-pattern-matching/7ef4a45731beba92ee01614ae563df65be36e8ba/data/exact/Redundant.hs
haskell
module Redundant where func :: Bool -> Int func False = 1 func False = 2
5ffcfcae4f7a69d1a0f4cc46c585867e413e4dab963b696a90ba2d6167278236
juji-io/datalevin
db.cljc
(ns ^:no-doc datalevin.db (:refer-clojure :exclude [update]) (:require [clojure.walk] [clojure.data] [clojure.set] [datalevin.constants :as c :refer [e0 tx0 emax txmax]] [datalevin.lru :as lru] [datalevin.datom :as d :refer [datom datom-added datom?]] [datalevin.util :as u :refer [case-...
null
https://raw.githubusercontent.com/juji-io/datalevin/9c1e7c6fce94496fbc57e79c9a47b9ee15a68979/src/datalevin/db.cljc
clojure
---------------------------------------------------------------------------- read caches e a v e a _ e _ v e _ _ _ a v _ a _ _ _ v _ _ _ e a v e a _ e _ v e _ _ _ a v _ a _ _ _ v _ _ _ e a v e a _ e _ v e _ _ _ a v _ a _ _ _ v e a v e a _ e _ v e _ _ _ a v _ a _ _ _ v _ _ _ -----------...
(ns ^:no-doc datalevin.db (:refer-clojure :exclude [update]) (:require [clojure.walk] [clojure.data] [clojure.set] [datalevin.constants :as c :refer [e0 tx0 emax txmax]] [datalevin.lru :as lru] [datalevin.datom :as d :refer [datom datom-added datom?]] [datalevin.util :as u :refer [case-...
a48e5d68d0ddc64d7576f3d9397d8895074cfef6612a1b038b7b100ed5b8e672
scrintal/heroicons-reagent
arrows_right_left.cljs
(ns com.scrintal.heroicons.mini.arrows-right-left) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M13.2 2.24a.75.75 0 00.04 1.06l2.1 1.95H6.75a.75.75 0 000 1.5h8.59l-2.1 1...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/arrows_right_left.cljs
clojure
(ns com.scrintal.heroicons.mini.arrows-right-left) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M13.2 2.24a.75.75 0 00.04 1.06l2.1 1.95H6.75a.75.75 0 000 1.5h8.59l-2.1 1...
75951a2726ebd9364ddeaba480e50e5099b0194547a76d1eac0f40bd8190d990
arachne-framework/factui
rules.cljc
(ns factui.impl.rules "A Clara session wrapper which builds in Datalog semantics." (:require [clara.rules :as cr] [factui.impl.session :as session] [factui.impl.store :as store] #?(:clj [factui.facts :as f] :cljs [factui.facts :as f :refer [Datom]])) #?(:clj (:import [factui.facts...
null
https://raw.githubusercontent.com/arachne-framework/factui/818ea79d7f84dfe80ad23ade0b6b2ed5bb1c6287/src/factui/impl/rules.cljc
clojure
(ns factui.impl.rules "A Clara session wrapper which builds in Datalog semantics." (:require [clara.rules :as cr] [factui.impl.session :as session] [factui.impl.store :as store] #?(:clj [factui.facts :as f] :cljs [factui.facts :as f :refer [Datom]])) #?(:clj (:import [factui.facts...
4a2d445299f728a903efae05da15bfbd249de08bb4e8d5b0b9940d5340c2ca24
Kakadu/fp2022
operandsHandler.mli
* Copyright 2021 - 2023 , andreyizrailev and contributors Phantom types * SPDX - License - Identifier : LGPL-3.0 - or - later open Utils open MonadError module OperandsHandler (M : MonadError) : sig open M type byte type word type dword type xmm (* Needed for pretty printing *) val pp_byte : Forma...
null
https://raw.githubusercontent.com/Kakadu/fp2022/7ee82445c0e5245efb05c747e3d5a2e217a65c11/Asm4/lib/operandsHandler.mli
ocaml
Needed for pretty printing Operand types Check integer size Converters Get internal register id by its name Get register id Get integer value of a constant eax register Get list of related registers, e.g. for ah we get [eax, ax, ah, al] Special case of get and set for xmm registers since their v...
* Copyright 2021 - 2023 , andreyizrailev and contributors Phantom types * SPDX - License - Identifier : LGPL-3.0 - or - later open Utils open MonadError module OperandsHandler (M : MonadError) : sig open M type byte type word type dword type xmm val pp_byte : Format.formatter -> byte -> unit val p...
7eb759fbae3175f75f02b3ebf4520a0675e375029c9b79ab4a47dda769baea09
herbelin/coq-hh
cases.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/pretyping/cases.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Pattern-matching errors **********...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Compat open Util open Na...
e09e0e2762cd699632bef654938c97e0c2ea34c3819ce43d70bbc9c969443535
slipstream/SlipStreamServer
utils.clj
(ns com.sixsq.slipstream.ssclj.resources.user.utils (:require [com.sixsq.slipstream.util.response :as r])) (def min-password-length 8) (defn check-password-constraints [{:keys [password passwordRepeat]}] (cond (not (and password passwordRepeat)) (throw (r/ex-bad-request "both password fields must be s...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/src/com/sixsq/slipstream/ssclj/resources/user/utils.clj
clojure
(ns com.sixsq.slipstream.ssclj.resources.user.utils (:require [com.sixsq.slipstream.util.response :as r])) (def min-password-length 8) (defn check-password-constraints [{:keys [password passwordRepeat]}] (cond (not (and password passwordRepeat)) (throw (r/ex-bad-request "both password fields must be s...
9bf6311dc3c9e4722a3a139e1b409a2de9807516a83cc552feb8c549dbb73c4e
cnuernber/dtype-next
nio_buf_mmodel_jdk19.clj
(ns tech.v3.datatype.ffi.nio-buf-mmodel-jdk19 (:require [tech.v3.datatype.protocols :as dtype-proto]) (:import [java.lang.foreign MemoryAddress MemorySegment MemorySession] [java.nio ByteBuffer ByteOrder])) (set! *warn-on-reflection* true) (defn direct-buffer-constructor ^ByteBuffer [nbuf ^long ad...
null
https://raw.githubusercontent.com/cnuernber/dtype-next/71477752fc376fad4b678fa9607ef54a40b2b1ff/src/tech/v3/datatype/ffi/nio_buf_mmodel_jdk19.clj
clojure
(ns tech.v3.datatype.ffi.nio-buf-mmodel-jdk19 (:require [tech.v3.datatype.protocols :as dtype-proto]) (:import [java.lang.foreign MemoryAddress MemorySegment MemorySession] [java.nio ByteBuffer ByteOrder])) (set! *warn-on-reflection* true) (defn direct-buffer-constructor ^ByteBuffer [nbuf ^long ad...
935333724c81205058340c3ec5616792a836af44df117d7b4e14910e1b0ae6c2
tweag/crem
Topology.hs
# LANGUAGE DataKinds # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # -- -warnings.html#ghc-flag--Wredundant-constraints {-# OPTIONS_GHC -Wno-redundant-constraints #-} -- -warnings.html#ghc-flag--Wunused-type-patterns {-# OPTIONS_GHC -Wno-unused-type-patterns #-} -- | A `Topol...
null
https://raw.githubusercontent.com/tweag/crem/9e16ebc1c99ebe28c55a6d56cb66e81250cc75ac/src/Crem/Topology.hs
haskell
-warnings.html#ghc-flag--Wredundant-constraints # OPTIONS_GHC -Wno-redundant-constraints # -warnings.html#ghc-flag--Wunused-type-patterns # OPTIONS_GHC -Wno-unused-type-patterns # | A `Topology` is a list of allowed transition for a state machine. We are using it to enforce that only allowed transitions could be pe...
# LANGUAGE DataKinds # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Crem.Topology ( Topology (..) , TopologySym0 , STopology (..) , AllowTransition (..) , AllowedTransition (..) , trivialTopology , sTrivialTopology , TrivialTopology , allowAllTopolog...
96fcc012a5cb579bf8c13a6f48d276e69a6ac45f75f207930102ad0fa06ca1cb
ijvcms/chuanqi_dev
city_info_db.erl
%%%------------------------------------------------------------------- @author zhengsiying ( C ) 2015 , < COMPANY > %%% @doc %%% %%% @end Created : 21 . 七月 2015 下午5:46 %%%------------------------------------------------------------------- -module(city_info_db). -include("common.hrl"). -include("cache.hrl"). %%...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/city/city_info_db.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API ==================================================================== API functions ==================================================================== ==========...
@author zhengsiying ( C ) 2015 , < COMPANY > Created : 21 . 七月 2015 下午5:46 -module(city_info_db). -include("common.hrl"). -include("cache.hrl"). -export([ select_row/1, insert/1, update/2, delete/1 ]). select_row(SceneId) -> case db:select_row(city_info, record_info(fields, db_city_info), [{scene_id, Sce...
14e386279b357923f1e4cb48aca3162fb4d788aaa482eb1fe8e6b4b997adc4d0
ucsd-progsys/liquidhaskell
Even.hs
{-@ LIQUID "--expect-any-error" @-} module Even () where @ isEven , isOdd : : Bool @ isEven :: Int -> Bool isEven 0 = True isEven n = isOdd $ n isOdd 0 = False isOdd m = isEven $ m - 1
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/terminate/neg/Even.hs
haskell
@ LIQUID "--expect-any-error" @
module Even () where @ isEven , isOdd : : Bool @ isEven :: Int -> Bool isEven 0 = True isEven n = isOdd $ n isOdd 0 = False isOdd m = isEven $ m - 1
770f9aaef730017afec0caf66f32d3e23571948a737613319b9c573eda8f8800
wireless-net/erlang-nommu
wxRegion.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2013 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Publi...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/src/gen/wxRegion.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitatio...
Copyright Ericsson AB 2008 - 2013 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(wxRegion). -include("wxe.hrl"). -...
8c8a6ec96cddfdf73556bae39f4a6cea6ecc734da3e48c4c290ebd09137fe46a
scrintal/heroicons-reagent
check_circle.cljs
(ns com.scrintal.heroicons.mini.check-circle) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4....
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/check_circle.cljs
clojure
(ns com.scrintal.heroicons.mini.check-circle) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4....
96826f87e6fdbfb16175139fe386ab7ed241f5f0863489c0c26b5faa515ddd19
dorchard/computational-semantics
FPH.hs
module FPH where import Data.List import Data.Char square :: Int -> Int square x = x * x hword :: String -> Bool hword [] = False hword (x:xs) = (x == 'h') || (hword xs) gen :: Int -> String gen 0 = "Sentences can go on" gen n = gen (n-1) ++ " and on" genS :: Int -> String genS n = gen n ++ "." story ::...
null
https://raw.githubusercontent.com/dorchard/computational-semantics/e11a80f86140451c9ce7b80a7c263d1482d8565f/FPH.hs
haskell
module FPH where import Data.List import Data.Char square :: Int -> Int square x = x * x hword :: String -> Bool hword [] = False hword (x:xs) = (x == 'h') || (hword xs) gen :: Int -> String gen 0 = "Sentences can go on" gen n = gen (n-1) ++ " and on" genS :: Int -> String genS n = gen n ++ "." story ::...
ae53c3b6bc298249df6bfcdd71de34a79afce811fe5c61d530b3e65964910c5f
mathinstitut/goemaxima
mathml.lisp
(in-package "MAXIMA") MathML - printing Created by ( DMD ) , December 2002 / January 2003 ;; closely based on the original TeX conversion code in mactex.lisp , ;; for which the following credits apply: ( c ) copyright 1987 , small corrections and additions : , 2001 additional additions : ( JM...
null
https://raw.githubusercontent.com/mathinstitut/goemaxima/6077c3c279e69b84e9c225c810e3e0b453b90845/stack/2017121800/maxima/mathml.lisp
lisp
for which the following credits apply: mathml(d10,"/tmp / foo.xml " ) ; .. Method: Producing MathML from a macsyma internal expression is done by a reversal of the parsing process. Fundamentally, a traversal of the expression tree is produced by the program, with appropriate substitutions and recognition of th...
(in-package "MAXIMA") MathML - printing Created by ( DMD ) , December 2002 / January 2003 closely based on the original TeX conversion code in mactex.lisp , ( c ) copyright 1987 , small corrections and additions : , 2001 additional additions : ( JM ) , September 2001 additional correction...
2380eddc167c14a0e1056705980e688be55363154a0f06d10bff6286c2605f64
inaka/beam_olympics
bo_test_client.erl
-module(bo_test_client). -export([start/1, stop/1]). -export([signup/2, task/2, submit/3, skip/2, score/2, stats/1]). -export([gen_call/2]). -type task() :: bo_task:task(). -type player_name() :: term(). -spec start(atom()) -> {ok, node()}. start(NodeName) -> {ok, Node} = slave:start("127.0.0.1", NodeName), {ok,...
null
https://raw.githubusercontent.com/inaka/beam_olympics/9b16afd54f25c0996430139e9646c3cfdfbdf86b/test/bo_test_client.erl
erlang
-module(bo_test_client). -export([start/1, stop/1]). -export([signup/2, task/2, submit/3, skip/2, score/2, stats/1]). -export([gen_call/2]). -type task() :: bo_task:task(). -type player_name() :: term(). -spec start(atom()) -> {ok, node()}. start(NodeName) -> {ok, Node} = slave:start("127.0.0.1", NodeName), {ok,...
91a0fb477f735ab9eb0b7e1ba4000c37c713fb59e18a3b56fda129a46e648000
haskell-mafia/mismi
Environment.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} module Mismi.Environment ( Env , Region (..) , RegionError (..) , Debugging (..) , getRegionFromEnv , getDebugging , setDebugging , renderRegionError , discoverAWSEnv , discoverAWSEnvWithRegion...
null
https://raw.githubusercontent.com/haskell-mafia/mismi/f6df07a52c6c8b1cf195b58d20ef109e390be014/mismi-core/src/Mismi/Environment.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveDataTypeable # MDS sometimes has transient failures. 'False'. FIXME(sio): fix this upstream so we can distinguish between Everything else is unlikely to be transient.
# LANGUAGE NoImplicitPrelude # module Mismi.Environment ( Env , Region (..) , RegionError (..) , Debugging (..) , getRegionFromEnv , getDebugging , setDebugging , renderRegionError , discoverAWSEnv , discoverAWSEnvWithRegion , discoverAWSEnvRetry , discoverAWSEnvWithRegionRetry , catchAuth...
1227bb64758dd23818aafe0d689d7f5cac19980c3f785d776097779b9e4a46a6
Holworth/SICP_Solutions
horner-eval.rkt
#lang sicp (define (reduce op init items) (cond ((null? items) init) (else (op (car items) (reduce op init (cdr items)))))) (define (horner-eval x coefficient-sequence) (reduce (lambda (this-coeff y) (+ this-coeff (* y x))) 0 coefficient-sequence)) (hor...
null
https://raw.githubusercontent.com/Holworth/SICP_Solutions/d64ce997d26c665450c0d9ac39f257a93106d555/solutions/chap2/code/horner-eval.rkt
racket
#lang sicp (define (reduce op init items) (cond ((null? items) init) (else (op (car items) (reduce op init (cdr items)))))) (define (horner-eval x coefficient-sequence) (reduce (lambda (this-coeff y) (+ this-coeff (* y x))) 0 coefficient-sequence)) (hor...
9bf31c8e8eaae45adeb5d7d13a7381288001b4e1a6569695afc36c5ccc643515
pveber/bistro
srst2.ml
open Core open Bistro open Bistro.Shell_dsl let img = [ docker_image ~account:"pveber" ~name:"srst2" ~tag:"0.2.0" () ] let run_gen_cmd ?mlst_db ?mlst_delimiter ?mlst_definitions ?mlst_max_mismatch ?gene_db ?no_gene_details ?gene_max_mismatch ?min_coverage ?max_divergence ?min_depth ?min_edge_depth ?prob_err ...
null
https://raw.githubusercontent.com/pveber/bistro/d363bd2d8257babbcb6db15bd83fd6465df7c268/lib/bio/srst2.ml
ocaml
open Core open Bistro open Bistro.Shell_dsl let img = [ docker_image ~account:"pveber" ~name:"srst2" ~tag:"0.2.0" () ] let run_gen_cmd ?mlst_db ?mlst_delimiter ?mlst_definitions ?mlst_max_mismatch ?gene_db ?no_gene_details ?gene_max_mismatch ?min_coverage ?max_divergence ?min_depth ?min_edge_depth ?prob_err ...
d67e628c5e03d2a34b507a14966e9d61024b32a044459742b43a42b09ef030ff
xsc/peripheral
component_test.clj
(ns peripheral.component-test (:require [midje.sweet :refer :all] [peripheral.component [attach :refer [attach]] [state :refer [running?]]] [peripheral.component :refer [defcomponent]] [peripheral.component.lifecycle :as lifecycle] [com.stuarts...
null
https://raw.githubusercontent.com/xsc/peripheral/5eafb7d8fcb0afda1c81fa103a7467d486862203/test/peripheral/component_test.clj
clojure
## Lifecycle ## Class Check ## This
(ns peripheral.component-test (:require [midje.sweet :refer :all] [peripheral.component [attach :refer [attach]] [state :refer [running?]]] [peripheral.component :refer [defcomponent]] [peripheral.component.lifecycle :as lifecycle] [com.stuarts...
826f6471c8d890bd4046ef6701edf71f5d5c4880b30c3c3bc1d82aa53fbfe155
Kakadu/fp2022
interpreter.mli
* Copyright 2021 - 2022 , Startsev Matvey * SPDX - License - Identifier : LGPL-3.0 - or - later open Ast module type MONAD = sig type 'a t val return : 'a -> 'a t val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t val ( >> ) : 'a t -> 'b t -> 'b t end module type MONADERROR = sig type 'a t val return : 'a -> ...
null
https://raw.githubusercontent.com/Kakadu/fp2022/5c1af410ae16b3bd68dc171412d99ce670f7f127/asm/lib/interpreter.mli
ocaml
* Copyright 2021 - 2022 , Startsev Matvey * SPDX - License - Identifier : LGPL-3.0 - or - later open Ast module type MONAD = sig type 'a t val return : 'a -> 'a t val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t val ( >> ) : 'a t -> 'b t -> 'b t end module type MONADERROR = sig type 'a t val return : 'a -> ...
060e4080b12586200ecac0a4bc036df84f606f6f8f9a871d0e92e84d97b79451
ocaml-multicore/tezos
script_int_repr.mli
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > Copyright ( c...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/script_int_repr.mli
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > Copyright ( c ) 2021 - 2022 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WI...
c0c68289394f606d965355ad6abcff13de5ce788fe55bcd010df11b335705dab
spaceships/circuit-synthesis
CXS.hs
# LANGUAGE ExistentialQuantification # module Main where import Circuit import Circuit.Conversion import Circuit.Optimizer import Circuit.Utils import Circuit.Format.Graphviz (Graphviz) import Circuit.Optimizer (Optimize) import qualified Circuit.Format.Acirc as Acirc import qualified Circuit.Format.Acirc2 as Ac...
null
https://raw.githubusercontent.com/spaceships/circuit-synthesis/3fdb67f814acd16e29064138b38c4fedff27b4d5/apps/cxs/CXS.hs
haskell
boolean formats
# LANGUAGE ExistentialQuantification # module Main where import Circuit import Circuit.Conversion import Circuit.Optimizer import Circuit.Utils import Circuit.Format.Graphviz (Graphviz) import Circuit.Optimizer (Optimize) import qualified Circuit.Format.Acirc as Acirc import qualified Circuit.Format.Acirc2 as Ac...
69be76f64b8fa993ad2f91b701ab887d60286d9526ffce9c8dd341250fe05dfa
yallop/ocaml-integers
install_integer_printers.mli
(* This file is intentionally left almost blank. *)
null
https://raw.githubusercontent.com/yallop/ocaml-integers/a494765d5bdc1f771eea56d552bd6c1d2ba971cd/top/install_integer_printers.mli
ocaml
This file is intentionally left almost blank.
a62b5363e907af637fc9434b5c2aaa24f98be4b90c1c3d0e4131cdfe7bc9bbc8
clj-commons/useful
string.clj
(ns flatland.useful.string (:require [clojure.string :as s])) (defn camelize [string] (s/replace string #"[-_](\w)" (comp s/upper-case second))) (defn classify [string] (apply str (map s/capitalize (s/split string #"[-_]")))) (letfn [(from-camel-fn [separator] ...
null
https://raw.githubusercontent.com/clj-commons/useful/dc5cdebf8983a2e2ea24ec8951fbb4dfb037da45/src/flatland/useful/string.clj
clojure
no match
(ns flatland.useful.string (:require [clojure.string :as s])) (defn camelize [string] (s/replace string #"[-_](\w)" (comp s/upper-case second))) (defn classify [string] (apply str (map s/capitalize (s/split string #"[-_]")))) (letfn [(from-camel-fn [separator] ...
8a8e8878030a5dc40755fb5d7b0e8a54248b42f91af1052b7481a95dba11ec19
aredington/monotony
logic.clj
(ns monotony.test.logic (:use monotony.logic midje.sweet) (:require [clojure.core.logic :as l])) (facts "about `smallest-varianto`" (fact "holds for :month :february true" (first (l/run 1 [q] (smallest-varianto :month :february q))) => true) (fact "holds for :month :march false" ...
null
https://raw.githubusercontent.com/aredington/monotony/2847584d301b3fc6371e1eab13364d6def7942f9/test/monotony/test/logic.clj
clojure
(ns monotony.test.logic (:use monotony.logic midje.sweet) (:require [clojure.core.logic :as l])) (facts "about `smallest-varianto`" (fact "holds for :month :february true" (first (l/run 1 [q] (smallest-varianto :month :february q))) => true) (fact "holds for :month :march false" ...
fef1b734e46866b2d6ce8e18e887a131cf85bfd4ec3ce1d2246d14d05f60b0ec
Frama-C/Frama-C-snapshot
frama-c-journal.ml
Frama - C journal generated at 16:10 the 26/08/2008 (* Running *) let () = Journal.run () let () = Cmdline.ForceValues.set true let () = Cmdline.Files.set ["expands_vars_bad.c"; ] let () = Cmdline.Files.set ["../bind.c"; "expands_vars_bad.c"; ] let () = File.init_from_cmdline () let () = !Db.Syntactic_callgraph.dump...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/tests/verisec/suite/programs/apps/bind/CA-1999-14/rrextract-nxt/frama-c-journal.ml
ocaml
Running Finished
Frama - C journal generated at 16:10 the 26/08/2008 let () = Journal.run () let () = Cmdline.ForceValues.set true let () = Cmdline.Files.set ["expands_vars_bad.c"; ] let () = Cmdline.Files.set ["../bind.c"; "expands_vars_bad.c"; ] let () = File.init_from_cmdline () let () = !Db.Syntactic_callgraph.dump () let () = !...
fc2e80ee407e43d5f725decaf9bfb00a7283fd152dc8f1a5d5479dc35c85d101
SantiMunin/harmony
StaticCheck.hs
# LANGUAGE FlexibleContexts # -- | Static checking of the input file. module TypeCheck.StaticCheck (staticCheck) where import Control.Arrow import Control.Monad import Control.Monad.State as CMS import Data.Char import qualified Data.DiGraph as DG import qualified Data.Fo...
null
https://raw.githubusercontent.com/SantiMunin/harmony/900100bea96763bc9cd6e6c4eae3f031ae5ccd7e/src/TypeCheck/StaticCheck.hs
haskell
| Static checking of the input file. | List of reserved words. | Initial environment (all empty). | Checks the definition for: * Name clashes * Undefined types and returns a better representation of the api spec. | Looks for name clashes in the definitions. Note that it skips resources as those need to hav...
# LANGUAGE FlexibleContexts # module TypeCheck.StaticCheck (staticCheck) where import Control.Arrow import Control.Monad import Control.Monad.State as CMS import Data.Char import qualified Data.DiGraph as DG import qualified Data.Foldable as F import qualified Data....
af4e6877ba3a38cde6b7223ede6ddf88b68bcf2e6f9ff6e7af7b440ba9e72df5
macourtney/Conjure
servlet.clj
(ns conjure.server.servlet (:import [java.io FileNotFoundException]) (:gen-class :extends javax.servlet.http.HttpServlet) (:require [ring.util.servlet :as ring-servlet])) (defn conjure-servlet [req] (let [adaptor-namespace-symbol 'conjure.server.ring-adapter] (try (require adaptor-namespac...
null
https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_server/src/conjure/server/servlet.clj
clojure
(ns conjure.server.servlet (:import [java.io FileNotFoundException]) (:gen-class :extends javax.servlet.http.HttpServlet) (:require [ring.util.servlet :as ring-servlet])) (defn conjure-servlet [req] (let [adaptor-namespace-symbol 'conjure.server.ring-adapter] (try (require adaptor-namespac...
56eda6e35fe9ea4ad7dc04a578dd847743923111dea0df5dd11183e1816421d0
haskell/haskell-ide-engine
HaReGA1.hs
module Main where import Text.ParserCombinators.Parsec parseStr :: CharParser () String parseStr = do char '"' str <- many1 (noneOf "\"") char '"' return str main = putStrLn "hello"
null
https://raw.githubusercontent.com/haskell/haskell-ide-engine/d84b84322ccac81bf4963983d55cc4e6e98ad418/test/testdata/HaReGA1/HaReGA1.hs
haskell
module Main where import Text.ParserCombinators.Parsec parseStr :: CharParser () String parseStr = do char '"' str <- many1 (noneOf "\"") char '"' return str main = putStrLn "hello"
b24ce48631e2b96082e1a299a3d14b4ae81fe507926eca45a256a2a60882ef8a
huangjs/cl
dgeqrf.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ " " f2cl6.l ,...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/lapack/lapack/dgeqrf.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ " " f2cl6.l , v 1.48 2008/08/24 00:56:27 rt...
bb22cdbf19e5c84b55636e14560b207c605c99e5f5a67b1ea340330580b16591
input-output-hk/cardano-sl
KeyStorage.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} # LANGUAGE TypeFamilies # module Pos.Client.KeyStorage ( MonadKeysRead (..) , MonadKeys (..) , AllUserSecrets (..) , getSecretDefault , modifySecretPureDefault , modifySecretDefault , getSecretKeys , ge...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/client/src/Pos/Client/KeyStorage.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # -------------------------------------------------------------------- -------------------------------------------------------------------- -------------------------------------------------------------------- Helpers ----------------------------------------------------...
# LANGUAGE TypeFamilies # module Pos.Client.KeyStorage ( MonadKeysRead (..) , MonadKeys (..) , AllUserSecrets (..) , getSecretDefault , modifySecretPureDefault , modifySecretDefault , getSecretKeys , getSecretKeysPlain , addSecretKey , deleteAllSec...
1324429d5fc514bcb493b4d52f042c614ee4cbdc908fe1853adbe31cb8d034dd
futurice/haskell-futurice-prelude
TypeLits.hs
# LANGUAGE CPP # {-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # {-# LANGUAGE KindSignatures #-} # LANGUAGE MagicHash # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # -- | Extensions to "GHC.TypeLits". module Futurice.Reflection.TypeLits ( ...
null
https://raw.githubusercontent.com/futurice/haskell-futurice-prelude/56192d63bea76d06cb456c5ce4c776cf41a5cd7e/src/Futurice/Reflection/TypeLits.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE RankNTypes # | Extensions to "GHC.TypeLits". This could be for base-4.8.0, but we use it for testing >>> let p = Proxy :: Proxy "foo" in typeRep p "foo" $setup >>> :set -XDataKinds >>> import Data.Proxy (Proxy (..))
# LANGUAGE CPP # # LANGUAGE FlexibleInstances # # LANGUAGE MagicHash # # LANGUAGE ScopedTypeVariables # module Futurice.Reflection.TypeLits ( reifyTypeableSymbol, ) where import Data.Proxy (Proxy) #if !MIN_VERSION_base(4,13,0) import Data.Typeable (Typeable) #endif import GHC....
0cc06776f7fdb530e183b4105abbbaa35b646d05e54017b199cca6447f010259
TerrorJack/ghc-alter
openFile004.hs
-- !!! Open a non-existent file for writing import Control.Monad import Data.Char import System.Directory import System.IO file = "openFile004.out" main = do b <- doesFileExist file when b (removeFile file) h <- openFile file WriteMode hPutStr h "hello world\n" hClose h h <- openFile file ReadMode le...
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/IO/openFile004.hs
haskell
!!! Open a non-existent file for writing
import Control.Monad import Data.Char import System.Directory import System.IO file = "openFile004.out" main = do b <- doesFileExist file when b (removeFile file) h <- openFile file WriteMode hPutStr h "hello world\n" hClose h h <- openFile file ReadMode let loop = do b <- hIsEOF h if...
85986ae90433cad31068b89244cd7271af27a93826015f08196c59579a62152d
softwarelanguageslab/maf
R5RS_scp1_fast-multiply-5.scm
; Changes: * removed : 0 * added : 1 * swaps : 0 ; * negated predicates: 0 * swapped branches : 3 ; * calls to id fun: 0 (letrec ((double (lambda (x) (+ x x))) (halve (lambda (x) (/ x 2))) (rec-fast-multiply (lambda (a b) (if (...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_fast-multiply-5.scm
scheme
Changes: * negated predicates: 0 * calls to id fun: 0
* removed : 0 * added : 1 * swaps : 0 * swapped branches : 3 (letrec ((double (lambda (x) (+ x x))) (halve (lambda (x) (/ x 2))) (rec-fast-multiply (lambda (a b) (if (zero? b) 0 ...
4eab4433188b9878de53d18e80b5c35db02b023937ef8ca69db0a972b209b22c
cyverse-archive/DiscoveryEnvironmentBackend
users.clj
(ns donkey.services.filesystem.users (:use [clojure-commons.error-codes] [clojure-commons.validators] [clj-jargon.init :only [with-jargon]] [clj-jargon.users]) (:require [clj-jargon.permissions :as perm] [donkey.services.filesystem.icat :as icat] [donkey.services.file...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/Donkey/src/donkey/services/filesystem/users.clj
clojure
(ns donkey.services.filesystem.users (:use [clojure-commons.error-codes] [clojure-commons.validators] [clj-jargon.init :only [with-jargon]] [clj-jargon.users]) (:require [clj-jargon.permissions :as perm] [donkey.services.filesystem.icat :as icat] [donkey.services.file...
bc06da7bbe37c2297e1e1af60806c446aa8647f8ec017fb4aed55106b84cf92b
processone/ejabberd
mod_admin_extra.erl
%%%------------------------------------------------------------------- %%% File : mod_admin_extra.erl Author : > %%% Purpose : Contributed administrative functions and commands Created : 10 Aug 2008 by > %%% %%% ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne %%% %%% This program is free software;...
null
https://raw.githubusercontent.com/processone/ejabberd/c103182bc7e5b8a8ab123ce02d1959a54e939480/src/mod_admin_extra.erl
erlang
------------------------------------------------------------------- File : mod_admin_extra.erl Purpose : Contributed administrative functions and commands This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope tha...
Author : > Created : 10 Aug 2008 by > ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License along with...
5fcd5ef38f81fd84744aebfa97c6ebcf82cfd82d32eefaebef9c915c239edb8a
pjotrp/guix
packages.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2012 , 2013 , 2014 , 2015 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either ...
null
https://raw.githubusercontent.com/pjotrp/guix/96250294012c2f1520b67f12ea80bfd6b98075a2/tests/packages.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2012 , 2013 , 2014 , 2015 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (test-packages) #:use-module (guix tests) #:use-module (guix store) #:us...
70b303cc6c172792bfca60c33e84dd59fa781b95febe8eda528ecac33e0fd6f9
ctford/Idris-Elba-Dev
REPLParser.hs
module Idris.REPLParser(parseCmd) where import System.FilePath ((</>)) import System.Console.ANSI (Color(..)) import Idris.Colours import Idris.AbsSyntax import Idris.Core.TT import qualified Idris.Parser as P import Control.Applicative import Control.Monad.State.Strict import Text.Parser.Combinators import Text.Pa...
null
https://raw.githubusercontent.com/ctford/Idris-Elba-Dev/e915e1d6b7a5921ba43d2572a9ad9b980619b8ee/src/Idris/REPLParser.hs
haskell
module Idris.REPLParser(parseCmd) where import System.FilePath ((</>)) import System.Console.ANSI (Color(..)) import Idris.Colours import Idris.AbsSyntax import Idris.Core.TT import qualified Idris.Parser as P import Control.Applicative import Control.Monad.State.Strict import Text.Parser.Combinators import Text.Pa...
5f99fa815cb7a1ca2361ec2d50e0e2763329ea072624519be35dc409f0a2aa74
apache/couchdb-couch
couch_ejson_compare.erl
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not % use this file except in compliance with the License. You may obtain a copy of % the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " A...
null
https://raw.githubusercontent.com/apache/couchdb-couch/21c8d37ac6ee1a7fed1de1f54f95a4d3cd9f5248/src/couch_ejson_compare.erl
erlang
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 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(couch_ejson_compare). -export([less/2, less_json_ids/2, less_json/2]). -on_load(init/0). init() -> NumScheds = erlang:system_info(schedulers...
d3b4ea1b55d0d29917129451a1575ad46c8355cf9e071dc3cd2f486a1376e519
awslabs/s2n-bignum
bignum_cmul_p384.ml
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) (* =================================================================...
null
https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_cmul_p384.ml
ocaml
========================================================================= Multiplication modulo p_384 of a single word and a bignum < p_384. ========================================================================= *** print_literal_from_elf "x86/p384/bignum_cmul_p384.o";; *** PUSH (% r12) ADD (% r8) (...
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) let bignum_cmul_p384_mc = define_assert_from_elf "bignum_cmul_p3...
09a90cdbec472ccbee9f675363f67ee9ab3f892718962fa3e33095550fea39e8
haskell-compat/base-compat
Repl.hs
{-# LANGUAGE PackageImports #-} # OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports # | Reexports " System . IO.Compat " -- from a globally unique namespace. module System.IO.Compat.Repl ( module System.IO.Compat ) where import "this" System.IO.Compat
null
https://raw.githubusercontent.com/haskell-compat/base-compat/847aa35c4142f529525ffc645cd035ddb23ce8ee/base-compat/src/System/IO/Compat/Repl.hs
haskell
# LANGUAGE PackageImports # from a globally unique namespace.
# OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports # | Reexports " System . IO.Compat " module System.IO.Compat.Repl ( module System.IO.Compat ) where import "this" System.IO.Compat
de184dec299fbd06e8b2772f6d5e669e06e52c91649706f1b0059d9372ed2ab1
imrehg/ypsilon
build-debug-boot.scm
Ypsilon Scheme System Copyright ( c ) 2004 - 2008 Y.FUJITA , LittleWing Company Limited . See license.txt for terms and conditions of use . #!core (begin (import (core primitives) (core destructuring) (core optimize) (core parameters) (core io) (core files)) ...
null
https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/heap/build-debug-boot.scm
scheme
[end]
Ypsilon Scheme System Copyright ( c ) 2004 - 2008 Y.FUJITA , LittleWing Company Limited . See license.txt for terms and conditions of use . #!core (begin (import (core primitives) (core destructuring) (core optimize) (core parameters) (core io) (core files)) ...
0a9725a8dbe9865ebedc89456460917612a36511956a3f5029894d653d78ce37
CompSciCabal/SMRTYPRTY
ynasser-2.3.rkt
#lang racket Things to make sicp scheme compatible with racket (define first car) (define rest cdr) (define null '()) (define nil null) (define empty? null?) (define sqr (lambda (x) (* x x))) (define (filter op lst) (cond ((empty? lst) null) ((op (car lst)) (cons (car lst) (filter op (cdr lst)))) (els...
null
https://raw.githubusercontent.com/CompSciCabal/SMRTYPRTY/4a5550789c997c20fb7256b81469de1f1fce3514/sicp/v1/chapter-2.2/ynasser-2.3.rkt
racket
Example functions I think this is correct: Here is a *very* silly version with map, as the exercise wants it done: Q: What property should op satisfy for foldr and foldl to have the same results? A: (op A B) == (op B A) Exercise 2.40 define unique-pairs: Use unique-pairs to simplify the definition of prime-su...
#lang racket Things to make sicp scheme compatible with racket (define first car) (define rest cdr) (define null '()) (define nil null) (define empty? null?) (define sqr (lambda (x) (* x x))) (define (filter op lst) (cond ((empty? lst) null) ((op (car lst)) (cons (car lst) (filter op (cdr lst)))) (els...
f0f5357ca7a12ce4283da8b7f4d99bcdb0db47e21ac79f46e20a52c1eebf09cc
neongreen/haskell-ex
Main.hs
# LANGUAGE TupleSections # import Data.Array import Data.List import qualified Data.Map as M import Data.Map (Map) import Data.Monoid main = solve (mkArray2d test) mkArray2d :: [[a]] -> Array (Int, Int) a mkArray2d xs = listArray ((0,0),(height-1,width-1)) (concat xs) where width = length (last xs) height...
null
https://raw.githubusercontent.com/neongreen/haskell-ex/345115444fdf370a43390fd942e2851b9b1963ad/week4/path/neongreen/Main.hs
haskell
obstacle map cell to find already visited frontier; we pretend that we came to A from itself ^ Obstacle map; 'True' = obstacle ^ Cell we want to find ^ Already visited cells, together with “from what cell did we come to this cell?” ^ Cells at the “frontier” ^ Resulting path (reversed) If the cell is at th...
# LANGUAGE TupleSections # import Data.Array import Data.List import qualified Data.Map as M import Data.Map (Map) import Data.Monoid main = solve (mkArray2d test) mkArray2d :: [[a]] -> Array (Int, Int) a mkArray2d xs = listArray ((0,0),(height-1,width-1)) (concat xs) where width = length (last xs) height...
84c5bc7aec4380031d54ac5cf35eb9a29fa77de614b5e161a1c783f8c2a80a11
broadinstitute/firecloud-ui
notifications.cljs
(ns broadfcui.page.notifications (:require [dmohs.react :as react] [broadfcui.common.icons :as icons] [broadfcui.common.style :as style] [broadfcui.components.buttons :as buttons] [broadfcui.components.foundation-dropdown :as dropdown] [broadfcui.components.foundation-switch :refer [render-foundatio...
null
https://raw.githubusercontent.com/broadinstitute/firecloud-ui/8eb077bc137ead105db5665a8fa47a7523145633/src/cljs/main/broadfcui/page/notifications.cljs
clojure
(ns broadfcui.page.notifications (:require [dmohs.react :as react] [broadfcui.common.icons :as icons] [broadfcui.common.style :as style] [broadfcui.components.buttons :as buttons] [broadfcui.components.foundation-dropdown :as dropdown] [broadfcui.components.foundation-switch :refer [render-foundatio...
a72cdc8c8776881c48add9b26cbf9acc1189591736c3cb1f8b663ef781695641
uwplse/rake
types.rkt
#lang rosette/safe (require (only-in racket/base error) rosette/lib/destruct) (provide (all-defined-out)) ;; Types (struct int8_t (v) #:transparent) (struct int16_t (v) #:transparent) (struct int32_t (v) #:transparent) (struct int64_t (v) #:transparent) (struct uint1_t (v) #:transparent) (struct uint8_t (v) #:t...
null
https://raw.githubusercontent.com/uwplse/rake/0fb9b46ae8ac64f95a4c0e89060ffdb043229a5b/rake/cpp/types.rkt
racket
Types Get bit-vector value of the integer expression Get integer value of the integer expression Type constructor Misc functions
#lang rosette/safe (require (only-in racket/base error) rosette/lib/destruct) (provide (all-defined-out)) (struct int8_t (v) #:transparent) (struct int16_t (v) #:transparent) (struct int32_t (v) #:transparent) (struct int64_t (v) #:transparent) (struct uint1_t (v) #:transparent) (struct uint8_t (v) #:transparen...
7a668be970c52929a944b06414f21565575159649f55297c65380e7b749bdc93
xhtmlboi/yocaml
lexicon.ml
type t = string let target_is_up_to_date = Format.asprintf "Updated: %s" let oh_dear_there_is_an_error x = Format.asprintf "Oh dear, there is an error [%a]" x ;; let crap_there_is_an_error = oh_dear_there_is_an_error Error.pp let crap_there_is_an_exception = oh_dear_there_is_an_error Preface.Exn.pp let target_need...
null
https://raw.githubusercontent.com/xhtmlboi/yocaml/9274e52cb22fd4d1b28ec03960208c6feda1bbcd/lib/yocaml/lexicon.ml
ocaml
type t = string let target_is_up_to_date = Format.asprintf "Updated: %s" let oh_dear_there_is_an_error x = Format.asprintf "Oh dear, there is an error [%a]" x ;; let crap_there_is_an_error = oh_dear_there_is_an_error Error.pp let crap_there_is_an_exception = oh_dear_there_is_an_error Preface.Exn.pp let target_need...
c2488c55946464e2d9024546c790569a5bebcb0989d2c539f9a3b9791a52e67a
EasyCrypt/easycrypt
ecHiTacticals.ml
(* -------------------------------------------------------------------- *) open EcUtils open EcLocation open EcParsetree open EcFol open EcCoreGoal open EcCoreGoal.FApi open EcHiGoal module TTC = EcProofTyping (* -------------------------------------------------------------------- *) type caseoption = { cod_ambien...
null
https://raw.githubusercontent.com/EasyCrypt/easycrypt/2f98c08673b913635203cbb638011165a813f2e3/src/ecHiTacticals.ml
ocaml
-------------------------------------------------------------------- -------------------------------------------------------------------- -------------------------------------------------------------------- -------------------------------------------------------------------- -----------------------------------...
open EcUtils open EcLocation open EcParsetree open EcFol open EcCoreGoal open EcCoreGoal.FApi open EcHiGoal module TTC = EcProofTyping type caseoption = { cod_ambient : bool; } module CaseOptions = struct let default = { cod_ambient = false; } let merged1 opts (b, x) = match x with | `Ambient -> { op...
e2903fa232562ad281a4032cf56b39205490119bd0f9cebfe11359f8c571a152
deepfire/holotype
Constrained.hs
module Data.TypeMap.Constrained ( CTypeMap(..) , empty , singleton , insert , Data.TypeMap.Constrained.lookup ) where import GHC.Exts (Any) import GHC.Types (Constraint, Type) import Data.Proxy (P...
null
https://raw.githubusercontent.com/deepfire/holotype/d33052f588b74616560b81616ffc4a0142f8a617/src/Data/TypeMap/Constrained.hs
haskell
| Map from types @t@ of kind @*@ to values of type @Item x t@.
module Data.TypeMap.Constrained ( CTypeMap(..) , empty , singleton , insert , Data.TypeMap.Constrained.lookup ) where import GHC.Exts (Any) import GHC.Types (Constraint, Type) import Data.Proxy (P...
4c0244dce415cc62cb06fe2818a7603eb44b3e2b69ee649f04cbbd1d89bbae6a
RefactoringTools/wrangler
inspec_lib.erl
Copyright ( c ) 2010 , , %% All rights reserved. %% %% Redistribution and use in source and binary forms, with or without %% modification, are permitted provided that the following conditions are met: %% %% Redistributions of source code must retain the above copyright %% notice, this list of conditions...
null
https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/inspec_lib.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 notice, this list of conditions and the following disclaimer. %% Redi...
Copyright ( c ) 2010 , , IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR Wrangler 's Code Inspector . 2006 - 2011 , @author , [ ] that are currently supported...
e8badabee39e3fbe8712fdaee49bf70e205a3877242008a1d51637034435b8ca
exercism/haskell
Tests.hs
# LANGUAGE RecordWildCards # import Data.Foldable (for_) import Data.List (sort) import Test.Hspec (Spec, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Change (findFewestCoins) main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs sp...
null
https://raw.githubusercontent.com/exercism/haskell/f81ee7dc338294b3dbefb7bd39fc193546fcec26/exercises/practice/change/test/Tests.hs
haskell
# LANGUAGE RecordWildCards # import Data.Foldable (for_) import Data.List (sort) import Test.Hspec (Spec, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Change (findFewestCoins) main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs sp...
63ff6c0cd4594eb4091ebb24eb550fa65e890792239fc5ccf2ff39bdd6f10049
ocaml-multicore/tezos
liquidity_baking_machine.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs < > (* ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/test/helpers/liquidity_baking_machine.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN AN...
2c5171815c4885da03cee3a786c6d8125d83abe1e371a5e53e0e999f8e6a6687
armedbear/abcl
report.lisp
(in-package :abcl/build) FIXME : will not work if DIRECTORY contains subdirectories (defun directory-hashes (directory) "Return the size and sha256 hash of every direct entry of DIRECTORY." (let ((d (if (typep directory 'pathname) directory (pathname (concatenate 'string directory "...
null
https://raw.githubusercontent.com/armedbear/abcl/36a4b5994227d768882ff6458b3df9f79caac664/contrib/abcl-build/build/report.lisp
lisp
(in-package :abcl/build) FIXME : will not work if DIRECTORY contains subdirectories (defun directory-hashes (directory) "Return the size and sha256 hash of every direct entry of DIRECTORY." (let ((d (if (typep directory 'pathname) directory (pathname (concatenate 'string directory "...
0e710af32ff3d72b42a61cf150f4297b316ab9f4c6890681ed90942839389eec
openbadgefactory/salava
linkedin.clj
(ns salava.oauth.linkedin (:require [slingshot.slingshot :refer :all] [clojure.set :refer [rename-keys]] [clojure.string :refer [upper-case]] [salava.oauth.db :as d] [salava.core.countries :refer [all-countries]] [salava.core.util :refer [get-site-url get-ba...
null
https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/clj/salava/oauth/linkedin.clj
clojure
location (or (get-in linkedin-user [:location :country :code]) (get-in ctx [:config :user :default-country])) language (get-in ctx [:config :user :default-language])
(ns salava.oauth.linkedin (:require [slingshot.slingshot :refer :all] [clojure.set :refer [rename-keys]] [clojure.string :refer [upper-case]] [salava.oauth.db :as d] [salava.core.countries :refer [all-countries]] [salava.core.util :refer [get-site-url get-ba...
db72b9c78d0895659f6bffb66d40c267a89ab8c98fff97b47ace7ee73ab0ec64
pveber/bistro
dot_output.ml
open Core open Bistro_internals open Bistro_engine module W = Workflow module V = struct include W.Any let sexp_of_t _ = assert false let t_of_sexp _ = assert false end module E = struct type t = Dependency | GC_link let default = Dependency let compare = Poly.compare end module S = Set.Make(V) module ...
null
https://raw.githubusercontent.com/pveber/bistro/da0ebc969c8c5ca091905366875cbf8366622280/lib/utils/dot_output.ml
ocaml
let successors g u = fold_succ (fun h t -> h :: t) g u []
open Core open Bistro_internals open Bistro_engine module W = Workflow module V = struct include W.Any let sexp_of_t _ = assert false let t_of_sexp _ = assert false end module E = struct type t = Dependency | GC_link let default = Dependency let compare = Poly.compare end module S = Set.Make(V) module ...
e278f42163827f610356b6c4af64b1ee3595ee99ebcc5338b5324e0b49c32cbb
Dasudian/DSDIN
dsdc_metrics_rpt_dest.erl
-module(dsdc_metrics_rpt_dest). -behaviour(gen_server). %% Load rules from config -export([check_config/0]). %% Query api -export([get_destinations/2, get_destinations/3, add_destination/3, del_destination/3]). %% start function -export([start_link/0]). %% gen_server callbacks -export([in...
null
https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/dsdcore/src/dsdc_metrics_rpt_dest.erl
erlang
Load rules from config Query api start function gen_server callbacks TODO: come up with a more efficient handling of default datapoints ====================================================================== Private functions ====================================================================== wrapper functio...
-module(dsdc_metrics_rpt_dest). -behaviour(gen_server). -export([check_config/0]). -export([get_destinations/2, get_destinations/3, add_destination/3, del_destination/3]). -export([start_link/0]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, ...
70d77e622e286b3cf3f1deec66b39205d4ef1f0a762d3b8195adcbb862129895
SKA-ScienceDataProcessor/RC
Message.hs
# LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# OPTIONS_HADDOCK hide #-} -- | -- Handling of message for CH interpreter -- -- Following messages must be handled by actors: -- -- * Terminate - t...
null
https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS4/lib/DNA/Interpreter/Message.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes # # OPTIONS_HADDOCK hide # | Handling of message for CH interpreter Following messages must be handled by actors: * Terminate - terminate immediately * Timeout - child actor timed out * ProcessMonitorNotification - notifications ...
# LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # module DNA.Interpreter.Message ( messageHandlers , terminateActor , MatchS(..) , handleRecieve ) where import Control . Applicative import Control.Monad import Control.Monad.Reader import Control . Monad . State...
6689f3b3a7fcecf4992c402ac4d140e4d7d026d5196f8fe8a482f849302b1375
ocaml/oasis-db
ODBDeps.ml
open OASISVersion open OASISTypes open ODBPkgVer open OASISUtils open Lwt type elem = { optional: bool; version_cmp: comparator option; package_version: ODBPkgVer.t option; } type key = [ `FindlibPackage of findlib_full | `ExternalTool of prog] module Map = Map.Make ...
null
https://raw.githubusercontent.com/ocaml/oasis-db/f8b19d431102b5c5b7dced00a5242a5366ad263f/src/lib/ODBDeps.ml
ocaml
If the build is optional, the dependencies * are optional as well Add findlib packages Add external tools This section is not built at all Running test is not mandatory, so it is always optional Building doc is not mandatory, so it is always optional Solve the build...
open OASISVersion open OASISTypes open ODBPkgVer open OASISUtils open Lwt type elem = { optional: bool; version_cmp: comparator option; package_version: ODBPkgVer.t option; } type key = [ `FindlibPackage of findlib_full | `ExternalTool of prog] module Map = Map.Make ...
a862eccd4ab799af50d5adb2b56fb790fbbef3674d1872507e76f82839ea644f
dongcarl/guix
gem.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2015 < > Copyright © 2016 < > Copyright © 2018 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Fre...
null
https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/tests/gem.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2015 < > Copyright © 2016 < > Copyright © 2018 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (test-gem) #:use-module (guix import gem) #...
24da96ce43cb70fe84b7014d784d7cabf65322cb294f6bc4f01df8a672231c12
ragkousism/Guix-on-Hurd
hash.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 , 2014 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of t...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/tests/hash.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2013 , 2014 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (test-hash) #:use-module (guix hash) #:use-module (guix utils) #:use-module (srfi srfi...
89fa4bb5e65a986ba667da68976965111cf07bd00ac4caafcdc763fe61e5591b
gtk2hs/gtk2hs
ParsersTest.hs
test ` Parsers ' -- module Main where import Common import UNames import Errors import Attributes import Parsers import State for Hugs type = ( ) newAttrs _ _ = ( ) type PreCST e s a = IO a type Name = Int getNameSupply : : IO Int getNameSupply = return 1 names : : Int - > [ Int ] names x = [ x ...
null
https://raw.githubusercontent.com/gtk2hs/gtk2hs/0f90caa1dae319a0f4bbab76ed1a84f17c730adf/tools/c2hs/base/syntax/tests/ParsersTest.hs
haskell
simple expression grammar var = list1 alphaNum `action` Var `action` \(CharTok _ pos) -> newAttrsOnlyPos pos vars = many (const (1+)) 0 (char 'x') testparse cs = let ( tree , errs ) = ( vars . stringToCharToks ) cs testparse cs = let (tree, errs) = (execParser vars . stringToCharToks) cs
test ` Parsers ' module Main where import Common import UNames import Errors import Attributes import Parsers import State for Hugs type = ( ) newAttrs _ _ = ( ) type PreCST e s a = IO a type Name = Int getNameSupply : : IO Int getNameSupply = return 1 names : : Int - > [ Int ] names x = [ x .. ...
12a9229cd9e9325be1c1aec71d8630a3c1be9cda609d8cc13f8e23d33f48a509
vmchale/dickinson
Value.hs
module Control.Exception.Value ( eitherThrow , eitherThrowIO , maybeThrowIO ) where import Control.Exception (Exception, throw, throwIO) eitherThrow :: Exception e => Either e x -> x eitherThrow = either throw id e...
null
https://raw.githubusercontent.com/vmchale/dickinson/5b7d9d48bdb2aa902cddc0161dca3a6e7f3e0aea/src/Control/Exception/Value.hs
haskell
module Control.Exception.Value ( eitherThrow , eitherThrowIO , maybeThrowIO ) where import Control.Exception (Exception, throw, throwIO) eitherThrow :: Exception e => Either e x -> x eitherThrow = either throw id e...
bfc18ea189e7f524020fb22f4dcadd15592a9f00f2bb0f9e32be16dd78753939
yallop/ocaml-asp
json_staged_combinator_parser.ml
* Copyright ( c ) 2018 and * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2018 Neelakantan Krishnaswami and Jeremy Yallop * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *...
null
https://raw.githubusercontent.com/yallop/ocaml-asp/a092f17ea55d427c63414899e39a8fe80b30db14/benchmarks/json/json_staged_combinator_parser.ml
ocaml
TODO: move all the following code to a library TODO: move all the following code to a library
* Copyright ( c ) 2018 and * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2018 Neelakantan Krishnaswami and Jeremy Yallop * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *...
c4374002ec723aea0481d86aa7a9d2b5e12442c613b5a8170536385f49730b1a
fpco/stackage-curator
ServerBundle.hs
| Create a bundle to be uploaded to Stackage Server . # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE FlexibleContexts # module Stackage.ServerBundle ( bpAllPackages , docsListing , createBundleV2 , CreateBundleV2 (..) , SnapshotType (...
null
https://raw.githubusercontent.com/fpco/stackage-curator/c25cf6959a1d1b3129b18855ddbc7974324cc422/src/Stackage/ServerBundle.hs
haskell
# LANGUAGE OverloadedStrings # | All package/versions in a build plan, including core packages. Note that this may include packages not available on Hackage. ^ docs directory handleAny (const $ return mempty) $ do map. ^ snapshot id
| Create a bundle to be uploaded to Stackage Server . # LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE FlexibleContexts # module Stackage.ServerBundle ( bpAllPackages , docsListing , createBundleV2 , CreateBundleV2 (..) , SnapshotType (..) , writeIndexStyle , Doc...
cc62210e909fbdab945d13ca376797f4e882af460f19185e3de2eaef5ad5eca2
AbstractMachinesLab/caramel
test.ml
let x = Dep.some_value + 2
null
https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/tests/test-dirs/file-cache/test.ml
ocaml
let x = Dep.some_value + 2
988d30839993c5830bde677da18f688c2a99d127cbb2a90cbd12e1f397655252
rabbitmq/rabbit-socks
rabbit_socks_socketio.erl
-module(rabbit_socks_socketio). Protocol -export([init/2, open/3, handle_frame/2, terminate/1]). %% Writer -export([send_frame/2, close_transport/1]). %% --------------------------- -export([start_link/1]). -behaviour(gen_server). -export([init/1, terminate/2, code_change/3]). -export([handle_call/3, handle_cast...
null
https://raw.githubusercontent.com/rabbitmq/rabbit-socks/c2f2c894c2537f028c1eb01bccc59b74736c1eee/src/rabbit_socks_socketio.erl
erlang
Writer --------------------------- --------------------------- --------------------------- --------------------------- --------------------------- --------------------------- io:format("send heartbeat ~p~n", [Frame]), --------------------------- Keep it small.
-module(rabbit_socks_socketio). Protocol -export([init/2, open/3, handle_frame/2, terminate/1]). -export([send_frame/2, close_transport/1]). -export([start_link/1]). -behaviour(gen_server). -export([init/1, terminate/2, code_change/3]). -export([handle_call/3, handle_cast/2, handle_info/2]). -export([send_hear...
2eee1d1ba5aed7ea783bdb2ea898993e3e8836e569fab3bb6c39f93d31432d07
janestreet/memtrace_viewer
size_input.ml
open! Core open Bonsai_web type t = Byte_units.t option And_view.t module Unit = struct type t = | Bytes | Kilobytes | Megabytes | Gigabytes | Terabytes [@@deriving equal, enumerate, sexp] let to_string = function | Bytes -> "B" | Kilobytes -> "K" | Megabytes -> "M" | Gigaby...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer/740c2ea2f11a30b856c703032867a7dba4d90b1f/client/src/size_input.ml
ocaml
open! Core open Bonsai_web type t = Byte_units.t option And_view.t module Unit = struct type t = | Bytes | Kilobytes | Megabytes | Gigabytes | Terabytes [@@deriving equal, enumerate, sexp] let to_string = function | Bytes -> "B" | Kilobytes -> "K" | Megabytes -> "M" | Gigaby...
7aa5bee8f6090c9afdf76e0d9000b3638adb9daec97a2dae7185e4b427c6a49f
jeffshrager/biobike
swank-sbcl.lisp
;;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; swank-sbcl.lisp --- SLIME backend for SBCL . ;;; Created 2003 , < > ;;; ;;; This code has been placed in the Public Domain. All warranties are ;;; disclaimed. ;;; Requires the SB-INTROSPECT contrib. Administrivia (in-package :swank-backend) (eval-when (:...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/ThirdParty/slime/swank-sbcl.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- This code has been placed in the Public Domain. All warranties are disclaimed. Requires the SB-INTROSPECT contrib. backwards compability tests Generate a form suitable for testing for stepper support (0.9.17) with #+. Ditto for weak hash-tables swank-mop Declare r...
swank-sbcl.lisp --- SLIME backend for SBCL . Created 2003 , < > Administrivia (in-package :swank-backend) (eval-when (:compile-toplevel :load-toplevel :execute) (require 'sb-bsd-sockets) (require 'sb-introspect) (require 'sb-posix) (require 'sb-cltl2)) (declaim (optimize (debug 2) ...