_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 |
|---|---|---|---|---|---|---|---|---|
208e94f797359289ea64d7dc3e04921ad826b79606c095d884256fd20af08b0c | fumieval/liszt | Internal.hs | # LANGUAGE LambdaCase , DeriveTraversable , DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE RecordWildCards #
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE RankNTypes #-}
module Database.Liszt.Internal (
Key(..)
, Tag
, LisztHandle(..)
, openLiszt
, closeLiszt
, withLiszt
-- * Writing
, ... | null | https://raw.githubusercontent.com/fumieval/liszt/44195372034b397a5a109899330995fba0152e1b/src/Database/Liszt/Internal.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE RankNTypes #
* Writing
* Reading
* Node
* Fetching
* Footer
* Node
* Spine
| Tag is an extra value attached to a payload. This can be used to perform
a binary search.
------------------------------------------------------------------------------
Transaction
| Replace the ... | # LANGUAGE LambdaCase , DeriveTraversable , DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE RecordWildCards #
module Database.Liszt.Internal (
Key(..)
, Tag
, LisztHandle(..)
, openLiszt
, closeLiszt
, withLiszt
, clear
, insertRaw
, commit
, Transaction
, TransactionState
, a... |
fa08ab781c96e7978dc9da1540e776e0fb5a497b2d276ef7af808f2cde661db0 | geophf/1HaskellADay | Solution.hs | module Y2017.M09.D13.Solution where
import Data.Time
import Data.Time.Clock
import Network.HTTP.Conduit
below imports available via 1HaskellADay git repository
import Y2017.M09.D08.Solution
-
There 's something funny about the article titles of the Y2017.M09.D08.Exercise
Check out the title names .
Ring a... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2017/M09/D13/Solution.hs | haskell | }
hint , you may need to do a bit of research here , as it may require more
than the functions provided for by Data . Time . Calendar . Julian
hint, you may need to do a bit of research here, as it may require more
than the functions provided for by Data.Time.Calendar.Julian
}
}
----------------------------------... | module Y2017.M09.D13.Solution where
import Data.Time
import Data.Time.Clock
import Network.HTTP.Conduit
below imports available via 1HaskellADay git repository
import Y2017.M09.D08.Solution
-
There 's something funny about the article titles of the Y2017.M09.D08.Exercise
Check out the title names .
Ring a... |
80d939a887702ce45d208dbb6187309a3d7a78375bd0eb55e764cde972a8890e | diagrams/diagrams-lib | Offset.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
# LANGUAGE UndecidableInstances #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC -fno - warn - un... | null | https://raw.githubusercontent.com/diagrams/diagrams-lib/b7357d6d9d56f80f6c06a185514600c31d53c944/src/Diagrams/TwoD/Offset.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
---------------------------------------------------------------------------
|
Module : Diagrams.TwoD.Offset
License : BSD-style (see LICENSE)... | # LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC -fno - warn - unused - imports #
for Data . Semigroup
Copyright : ( c ) 2013 diagrams - lib team ( see LICENSE )
Compute offsets to segments in two dimensions . More details can be
module... |
701db83779b3c0224436a117235e75f13726a5c3db0346a48f5bbeec33528358 | CyberCat-Institute/open-game-engine | RuntimeAST.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE DeriveFunctor #
module OpenGames.Preprocessor.RuntimeAST where
import Data.List (intercalate)
import Language.Haskell.TH
newtype Variables p = Variables {vars :: [p]} deriving (Eq)
newtype Expressions e = Expressions {exps :: [e]} deriving (Eq, Functor)
tuple :: [String] -... | null | https://raw.githubusercontent.com/CyberCat-Institute/open-game-engine/86031c42bf13178554c21cd7ab9e9d18f1ca6963/src/OpenGames/Preprocessor/RuntimeAST.hs | haskell | newtype AtomExpression = AtomExpression String
\((x1, ..., xm), (y1, ..., yn)) -> (x1, ..., xm, y1, ..., yn)
curry f
The main abstract datatype targeted by the compiler | # LANGUAGE FlexibleInstances #
# LANGUAGE DeriveFunctor #
module OpenGames.Preprocessor.RuntimeAST where
import Data.List (intercalate)
import Language.Haskell.TH
newtype Variables p = Variables {vars :: [p]} deriving (Eq)
newtype Expressions e = Expressions {exps :: [e]} deriving (Eq, Functor)
tuple :: [String] -... |
8bb7ea3acc62a88ea155ae7b72703f1f23fde02511401467e4c7b94ea32f4cdf | CompSciCabal/SMRTYPRTY | greg-3.rkt | #lang racket
(require racket/pretty)
(print-as-expression #f)
(pretty-print-abbreviate-read-macros #f)
3.1
(let* ((x 6)
(y (* x x)))
(+ x y))
((lambda (x)
((lambda (y)
(+ x y))
(* x x)))
6)
3.2
(cons 1 2)
(list* 1 2)
3.3
(define (print-dotted d)
(cond ((pair? d) (display "(")
... | null | https://raw.githubusercontent.com/CompSciCabal/SMRTYPRTY/4a5550789c997c20fb7256b81469de1f1fce3514/paip/gregr/greg-3.rkt | racket | #lang racket
(require racket/pretty)
(print-as-expression #f)
(pretty-print-abbreviate-read-macros #f)
3.1
(let* ((x 6)
(y (* x x)))
(+ x y))
((lambda (x)
((lambda (y)
(+ x y))
(* x x)))
6)
3.2
(cons 1 2)
(list* 1 2)
3.3
(define (print-dotted d)
(cond ((pair? d) (display "(")
... | |
0defefaf42694865144be328d56267b15b9cf0d3d87438ec67632328ec1e9d1a | binghe/PCL | kcl-patches.lisp | -*-Mode : LISP ; Package:(PCL LISP 1000 ) ; ; Syntax : Common - lisp -*-
;;;
;;; *************************************************************************
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
;;; All rights reserved.
;;;
;;; Use and copying of this software and preparation of d... | null | https://raw.githubusercontent.com/binghe/PCL/7021c061c5eef1466e563c4abb664ab468ee0d80/impl/kcl/kcl-patches.lisp | lisp | Package:(PCL LISP 1000 ) ; ; Syntax : Common - lisp -*-
*************************************************************************
All rights reserved.
Use and copying of this software and preparation of derivative works
based upon this software are permitted. Any distribution of this
States export control law... | Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
software or derivative works must comply with all applicable United
This software is made available AS IS , and Xerox Corporation makes no
CommonLoops Coordinator
Xerox PARC
3333 Coyote Hill Rd .
Palo Alto , CA 94304
( o... |
885a635e5fd3d979f67e7ff076924bff9fc3040c847bb6bf6a4ded53a26a9985 | the-dr-lazy/cascade | Options.hs | |
Module : Cascade . CLI.Data . Contract . Shell . Options
Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! !
Copyright : ( c ) 2020 - 2021 Cascade
License : MPL 2.0
Maintainer : < > ( the-dr-lazy.github.io )
Stability : Stable
Portability : POSIX
! ! ! INSERT MODULE LONG D... | null | https://raw.githubusercontent.com/the-dr-lazy/cascade/014a5589a2763ce373e8c84a211cddc479872b44/cascade-cli/src/Cascade/CLI/Data/Contract/Shell/Options.hs | haskell | |
Module : Cascade . CLI.Data . Contract . Shell . Options
Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! !
Copyright : ( c ) 2020 - 2021 Cascade
License : MPL 2.0
Maintainer : < > ( the-dr-lazy.github.io )
Stability : Stable
Portability : POSIX
! ! ! INSERT MODULE LONG D... | |
3d2870d79c6841a124ec54a02756ea743325a38a24e4fccb89b3e9904479aca9 | azimut/shiny | cc.lisp | (in-package :shiny)
(bbuffer-load "/home/sendai/clips/arvo1.wav")
(bbplay "arvo1.wav" :amp .2)
(put-phrase "sound" "arvo1.wav" 3 4.4)
(put-phrase "kill" "arvo1.wav" 25 3.5)
(put-phrase "free" "arvo1.wav" 53 3.5)
(put-phrase "art" "arvo1.wav" 57 3)
(put-phrase "but" "arvo1.wav" 61 3)
(put-phrase "necessary" "arvo1.wa... | null | https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/compositions/cc.lisp | lisp | (in-package :shiny)
(bbuffer-load "/home/sendai/clips/arvo1.wav")
(bbplay "arvo1.wav" :amp .2)
(put-phrase "sound" "arvo1.wav" 3 4.4)
(put-phrase "kill" "arvo1.wav" 25 3.5)
(put-phrase "free" "arvo1.wav" 53 3.5)
(put-phrase "art" "arvo1.wav" 57 3)
(put-phrase "but" "arvo1.wav" 61 3)
(put-phrase "necessary" "arvo1.wa... | |
ac049687b14876e48845e152366f29fd72d082026ef1fa65349c850e7391578d | kronkltd/jiksnu | sentry.clj | (ns jiksnu.sentry
(:require [ciste.config :refer [config config* describe-config]]
[taoensso.timbre :as timbre])
(:import com.getsentry.raven.Raven
com.getsentry.raven.RavenFactory
com.getsentry.raven.event.Event$Level
com.getsentry.raven.event.EventBuilder
co... | null | https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/src/jiksnu/sentry.clj | clojure | Use DSN if provided
Otherwise, build from parts | (ns jiksnu.sentry
(:require [ciste.config :refer [config config* describe-config]]
[taoensso.timbre :as timbre])
(:import com.getsentry.raven.Raven
com.getsentry.raven.RavenFactory
com.getsentry.raven.event.Event$Level
com.getsentry.raven.event.EventBuilder
co... |
3784e3d182de3dac7c069b94fced346e2c36ca3b1c314cb669a4bee2f0ad31b4 | input-output-hk/cardano-wallet-legacy | Hspec.hs | | Wrappers around hspec functionality that uses ' Buildable ' instead of
' Show ' to better fit in with the rest of the Cardano codebase
--
Intended as a drop - in replacement for " Test . HSpec " .
module Util.Buildable.Hspec (
* Wrappers around Test . HSpec . Expectations
shouldSatisfy
, shouldBe
, sh... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/test/unit/Util/Buildable/Hspec.hs | haskell |
* Working with Validated
* Re-exports
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------------------------------------------------------------------------}
---------------------------------------------... | | Wrappers around hspec functionality that uses ' Buildable ' instead of
' Show ' to better fit in with the rest of the Cardano codebase
Intended as a drop - in replacement for " Test . HSpec " .
module Util.Buildable.Hspec (
* Wrappers around Test . HSpec . Expectations
shouldSatisfy
, shouldBe
, shoul... |
8d357bddd4270e41055a35b68ed793c7a9325adcd9ad7ed53f734ec5f51a7e9a | e-bigmoon/haskell-blog | Connection_Manager2.hs | #!/usr/bin/env stack
-- stack script --resolver lts-17.3
{-# LANGUAGE OverloadedStrings #-}
import qualified Data.ByteString.Lazy.Char8 as L8
import Network.HTTP.Client
import Network.HTTP.Client.TLS
import Network.HTTP.Simple
main :: IO ()
main = do
manager <- newManager $ managerSet... | null | https://raw.githubusercontent.com/e-bigmoon/haskell-blog/5c9e7c25f31ea6856c5d333e8e991dbceab21c56/sample-code/yesod/appendix/ap4/Connection_Manager2.hs | haskell | stack script --resolver lts-17.3
# LANGUAGE OverloadedStrings # | #!/usr/bin/env stack
import qualified Data.ByteString.Lazy.Char8 as L8
import Network.HTTP.Client
import Network.HTTP.Client.TLS
import Network.HTTP.Simple
main :: IO ()
main = do
manager <- newManager $ managerSetProxy noProxy tlsManagerSettings
setGlobalManager manager
let ... |
30d417025fa7adc57deef7a6c8f27d108d8ca68ca7cd1f2ee97fb66cd1d645c4 | dainiusjocas/lucene-grep | parser.clj | (ns lmgrep.cli.parser
(:require [clojure.string :as str]
[jsonista.core :as json]))
(def format-options #{:edn :json :string})
(def tokenizers #{:keyword :letter :standard :unicode-whitespace :whitespace})
(def stemmers #{:kp
:portuguese
:lithuanian
:germ... | null | https://raw.githubusercontent.com/dainiusjocas/lucene-grep/26c5a8043265678877ccb1151bbe89f760e74abe/src/lmgrep/cli/parser.clj | clojure | (ns lmgrep.cli.parser
(:require [clojure.string :as str]
[jsonista.core :as json]))
(def format-options #{:edn :json :string})
(def tokenizers #{:keyword :letter :standard :unicode-whitespace :whitespace})
(def stemmers #{:kp
:portuguese
:lithuanian
:germ... | |
b43737a6eee8d71968a70e273061ab6dd486179cdb66356730e3f12edcb6bbc8 | autolwe/autolwe | nondet.mli | * Nondeterministic computations ( aka lazy lists )
(* ** Imports *)
open Util
* * Nondeterminism -----------------------------------------------------------------------
* ----------------------------------------------------------------------- *)
type 'a stream
type 'a nondet
val ret : 'a -> 'a nondet
val ... | null | https://raw.githubusercontent.com/autolwe/autolwe/3452c3dae06fc8e9815d94133fdeb8f3b8315f32/src/Util/nondet.mli | ocaml | ** Imports
* Combine results returned by [a] with results returned by [b].
[mplus] preserves order, i.e., results from [a] occur before
results from [b].
** Useful functions
* -----------------------------------------------------------------------
* Return the $n$-fold cartesian product of $ms$. | * Nondeterministic computations ( aka lazy lists )
open Util
* * Nondeterminism -----------------------------------------------------------------------
* ----------------------------------------------------------------------- *)
type 'a stream
type 'a nondet
val ret : 'a -> 'a nondet
val mempty : 'a nonde... |
22e5788fd6e3c8f678fe5a068f3871a0936557ea232fb24618ee853198bb2447 | quil-lang/quilc | clozure.lisp | ;;;; clozure.lisp
(in-package #:quilc)
(defun disable-debugger ()
(setf ccl::*batch-flag* t))
(defun enable-debugger ()
(setf ccl::*batch-flag* nil))
(deftype interactive-interrupt ()
'ccl:interrupt-signal-condition)
| null | https://raw.githubusercontent.com/quil-lang/quilc/3f3260aaa65cdde25a4f9c0027959e37ceef9d64/app/src/impl/clozure.lisp | lisp | clozure.lisp |
(in-package #:quilc)
(defun disable-debugger ()
(setf ccl::*batch-flag* t))
(defun enable-debugger ()
(setf ccl::*batch-flag* nil))
(deftype interactive-interrupt ()
'ccl:interrupt-signal-condition)
|
aaec720baa2f6487cb54912a4c3d59973cf72e62dd8efd95f8ba5ef21c9a1d46 | alavrik/piqi | piqi_pp.ml |
Copyright 2009 , 2010 , 2011 , 2012 , 2013 , 2014 , 2015 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 writin... | null | https://raw.githubusercontent.com/alavrik/piqi/bcea4d44997966198dc295df0609591fa787b1d2/piqilib/piqi_pp.ml | ocaml | map typedef.x -> x
del .../mode.required
map extend/.piqi-any x -> x
TODO: this method of specifying extensions will be eventually deprecated
map extend/.what x -> x
map ../record.x -> x
map ../name.x -> x
strip :<type> from a field's default value
functions |
Copyright 2009 , 2010 , 2011 , 2012 , 2013 , 2014 , 2015 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 writin... |
b72dc30e60ddf11ad169ba36769056175fa9f0dc19cb2283f871e30da46a35df | typeclasses/dsv | NumberViews.hs | # LANGUAGE DerivingStrategies , DeriveAnyClass #
# LANGUAGE NoImplicitPrelude , ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
module DSV.NumberViews
( InvalidNat (..), byteStringNatView, textNatView
, byteStringNatView_, textNatView_
, InvalidRational (..), byteStringRationalView, tex... | null | https://raw.githubusercontent.com/typeclasses/dsv/ae4eb823e27e4c569c4f9b097441985cf865fbab/dsv/library/DSV/NumberViews.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DerivingStrategies , DeriveAnyClass #
# LANGUAGE NoImplicitPrelude , ScopedTypeVariables #
module DSV.NumberViews
( InvalidNat (..), byteStringNatView, textNatView
, byteStringNatView_, textNatView_
, InvalidRational (..), byteStringRationalView, textRationalView
... |
8afa0b6974f994c38f0ecf1d3f3e4c20563987a6b40988a1f8271ea4958d7d2c | disteph/cdsat | master.mli | (*********************************************************************)
Main plugin , implementing the combination of decision procedures
with concurrency , as provided by Async library .
This is a master - slaves architecture .
Each slave thread runs the code written in worker.ml , controlling
... | null | https://raw.githubusercontent.com/disteph/cdsat/1b569f3eae59802148f4274186746a9ed3e667ed/src/portfolio/plugins.mld/concur.mld/master.mli | ocaml | *******************************************************************
******************************************************************* | Main plugin , implementing the combination of decision procedures
with concurrency , as provided by Async library .
This is a master - slaves architecture .
Each slave thread runs the code written in worker.ml , controlling
the ( purely sequential ) execution of a decision procedure , and
e... |
3872b3e71e5755de17d2829e8177f64f669828f00031f406174b1b1997385eac | awslabs/s2n-bignum | bignum_amontifier.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/arm/proofs/bignum_amontifier.ml | ocaml | =========================================================================
Almost-Montgomerifier computation.
=========================================================================
*** print_literal_from_elf "arm/generic/bignum_amontifier.o";;
***
arm_CSEL X9 X9 X7 Condi... |
* 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_amontifier_mc =
define_assert_from_elf "bignum_amonti... |
579b024827e5d8750e91c9d2baaa18fcdaf4f87ad6e29421da72ac22ee02de6a | p-swift/projure | zebra_benchmark.clj | (ns clojure-prolog.zebra_benchmark
(:require [criterium.core :refer :all]
[clojure-prolog.core :refer :all]))
(<-- (nextto ?x ?y ?list) (iright ?x ?y ?list))
(<- (nextto ?x ?y ?list) (iright ?y ?x ?list))
(<-- (iright ?left ?right (?left ?right . ?rest)))
(<- (iright ?left ?right (?x . ?rest)) (iright ?... | null | https://raw.githubusercontent.com/p-swift/projure/88e0e82714014b372dfcb8cc305298bf8fe4818a/src/test/clojure_prolog/zebra_benchmark.clj | clojure | Each house is of the form:
(house nationality pet cigarette drink house-color)
Q1 | (ns clojure-prolog.zebra_benchmark
(:require [criterium.core :refer :all]
[clojure-prolog.core :refer :all]))
(<-- (nextto ?x ?y ?list) (iright ?x ?y ?list))
(<- (nextto ?x ?y ?list) (iright ?y ?x ?list))
(<-- (iright ?left ?right (?left ?right . ?rest)))
(<- (iright ?left ?right (?x . ?rest)) (iright ?... |
c51e31d22a5c139b9ea4ffb2286c5920b09efb5ed1d5868c837f17d40a072938 | FranklinChen/learn-you-some-erlang | regis.erl | %%% Application wrapper module for regis,
%%% a process registration application.
%%%
%%% This was added because the standard process registry has a precise
%%% meaning of representing VM-global, non-dynamic processes.
%%% However, for this, we needed dynamic names and so we had to write
one ourselves . Of course we ... | null | https://raw.githubusercontent.com/FranklinChen/learn-you-some-erlang/878c8bc2011a12862fe72dd7fdc6c921348c79d6/processquest/apps/regis-1.0.0/src/regis.erl | erlang | Application wrapper module for regis,
a process registration application.
This was added because the standard process registry has a precise
meaning of representing VM-global, non-dynamic processes.
However, for this, we needed dynamic names and so we had to write
if you're writing your own app. | one ourselves . Of course we could have used ' global ' ( but we
did n't see distributed Erlang yet ) or ' gproc ' ( I do n't want to
depend on external libs for this guide ) , so checkthem out
-module(regis).
-behaviour(application).
-export([start/2, stop/1]).
-export([register/2, unregister/1, whereis/1, get_n... |
e1172ae4662b331ff65dd85c9ec35941891d1bb1766193c1345ff710e69e1720 | emina/rosette | ex-2.rkt | #lang rosette
(define-symbolic xs integer? #:length 4)
(define (sum xs)
(cond
[(null? xs) 0]
[(null? (cdr xs)) (car xs)]
[(andmap (curry = (car xs)) (cdr xs))
(* (length xs) (cdr xs))] ; bug: cdr should be car
[else (apply + xs)]))
(verify
(begin
(assume (positive? (sum xs)))
(assert (or... | null | https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/test/trace/code/ex-2.rkt | racket | bug: cdr should be car | #lang rosette
(define-symbolic xs integer? #:length 4)
(define (sum xs)
(cond
[(null? xs) 0]
[(null? (cdr xs)) (car xs)]
[(andmap (curry = (car xs)) (cdr xs))
[else (apply + xs)]))
(verify
(begin
(assume (positive? (sum xs)))
(assert (ormap positive? xs))))
|
f381a8adf9c95ccd5b8feb07f3c152af4c174c320305f237f7d06e63271b1097 | vmchale/kempe | TyAssign.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TupleSections #
| Constraint - based typing from the presentation in 's book .
module Kempe.TyAssign ( TypeM
, runTypeM
, checkModule
, assignModule
) where
import Co... | null | https://raw.githubusercontent.com/vmchale/kempe/23d59cb9343902aae33140e2b68ac0e4ab0a60a0/src/Kempe/TyAssign.hs | haskell | # LANGUAGE OverloadedStrings #
^ For renamer
Just need equality between simple types? (do have tyapp but yeah)
prevent cyclic lookups
| Perform substitutions before handing off to 'unifyMatch'
a type variable is always equal to itself, don't bother inserting this!
# SCC "unify" #
TODO: take constructor types as a... | # LANGUAGE TupleSections #
| Constraint - based typing from the presentation in 's book .
module Kempe.TyAssign ( TypeM
, runTypeM
, checkModule
, assignModule
) where
import Control.Composition (thread, (... |
45faafd93f034cd0ce0432bb71e2d5673ec037738faba64f7c9f8fd1f13404b9 | MedeaMelana/Magic | Combat.hs | {-# LANGUAGE GADTs #-}
module Magic.Combat
( -- * Types
Attack(..), Block(..)
-- * Attacking restrictions
-- | Restrictions that check whether a set of attacks is legal according to the current object. Use these values for a creature's 'allowAttacks' field or for further restricting such a predicate using '... | null | https://raw.githubusercontent.com/MedeaMelana/Magic/7bd87e4e1d54a7c5e5f81661196cafb87682c62a/Magic/src/Magic/Combat.hs | haskell | # LANGUAGE GADTs #
* Types
* Attacking restrictions
| Restrictions that check whether a set of attacks is legal according to the current object. Use these values for a creature's 'allowAttacks' field or for further restricting such a predicate using 'RestrictAllowAttacks' in a 'LayeredEffect'.
* Blocking restrictio... |
module Magic.Combat
Attack(..), Block(..)
, selfCantAttack, selfCantAttackAlone
, selfCantBlock, selfCantBlockAlone
, selfCantBeBlocked
) where
import Magic.Some
import Magic.Types
import Data.Boolean (true)
import Data.List (notElem, nub)
selfCantAttack :: [Attack] -> Contextual (View Bool)
selfCan... |
fa575f956575ad6e1ec7dfafb286a1988769f897253b79d53ef44a41557fc4d9 | slipstream/SlipStreamServer | filter.clj | (ns com.sixsq.slipstream.db.es-rest.filter
(:refer-clojure :exclude [filter])
(:require
[clojure.string :as str]
[clojure.walk :as w]
[com.sixsq.slipstream.db.es-rest.query :as query]
[com.sixsq.slipstream.db.utils.time-utils :as time]))
(defn- strip-quotes
[s]
(subs s 1 (dec (count s))))
(d... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/db-binding/src/com/sixsq/slipstream/db/es_rest/filter.clj | clojure | (a=1 and b=2) case | (ns com.sixsq.slipstream.db.es-rest.filter
(:refer-clojure :exclude [filter])
(:require
[clojure.string :as str]
[clojure.walk :as w]
[com.sixsq.slipstream.db.es-rest.query :as query]
[com.sixsq.slipstream.db.utils.time-utils :as time]))
(defn- strip-quotes
[s]
(subs s 1 (dec (count s))))
(d... |
7d5ec76b025c2767ab2d1ab1ab88fe541f2749b6e220903b83d57a7059883d4c | webcrank/webcrank.hs | Types.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FunctionalDependencies #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Webcrank.Internal.Types where
import Control.Applicative
import Control.Lens
impo... | null | https://raw.githubusercontent.com/webcrank/webcrank.hs/c611a12ea129383823cc627405819537c31730e4/src/Webcrank/Internal/Types.hs | haskell | # LANGUAGE OverloadedStrings #
^ Get the request method of the current request.
^ The full URI of the request.
^ Get the request header of the current request.
^ Get the time the request was received.
| Response body type.
| Indicates whether client is authorized to perform the requested
operation on the resourc... | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FunctionalDependencies #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TemplateHaskell #
module Webcrank.Internal.Types where
import Control.Applicative
import Control.Lens
import Control.Monad.Catch
import Contr... |
cd41987b0bb0d720d441f4787d32e7c1bae5e151c6493ee34f34e9d4534d1936 | wedesoft/sfsim25 | cloudmap.clj | (require '[clojure.core.matrix :refer (matrix eseq mmul)]
'[clojure.math :refer (to-radians)]
'[sfsim25.matrix :refer :all]
'[sfsim25.render :refer :all]
'[sfsim25.shaders :refer :all])
(import '[org.lwjgl.opengl Display DisplayMode GL11 GL12 GL13 GL20 GL30]
'[mikera.matrixx ... | null | https://raw.githubusercontent.com/wedesoft/sfsim25/5810e261c775b21abe7b8c7d6a07de2a7398e099/etc/cloudmap.clj | clojure | (require '[clojure.core.matrix :refer (matrix eseq mmul)]
'[clojure.math :refer (to-radians)]
'[sfsim25.matrix :refer :all]
'[sfsim25.render :refer :all]
'[sfsim25.shaders :refer :all])
(import '[org.lwjgl.opengl Display DisplayMode GL11 GL12 GL13 GL20 GL30]
'[mikera.matrixx ... | |
0f5a1bf1bdcb2acc853d561c0344fe14c9c983ef88d3067ecc570c4551acf52a | jordanthayer/ocaml-search | wrstrm.ml | $ I d : wrstream.ml , v 1.1 2003/11/18 14:15:11 ruml Exp $
stream utility code
streams are heavier than channels - they allow peeking .
they can be made from channels , strings , or arbitrary generating functions .
stream utility code
streams are heavier than channels - they allow peeking.
... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/wrutils/wrstrm.ml | ocaml | odd implementation, but shouldn't need to allocate memory
****************** a generic lexer ****************
* like Genlex.make_lexer but doesn't have any hang-ups about
so-called special characters. Keywords and identifiers are any
sequence of whitespace-delimited non-whitespace characters that aren't
string... | $ I d : wrstream.ml , v 1.1 2003/11/18 14:15:11 ruml Exp $
stream utility code
streams are heavier than channels - they allow peeking .
they can be made from channels , strings , or arbitrary generating functions .
stream utility code
streams are heavier than channels - they allow peeking.
... |
3a9ac4d9cf3edd3360dc66050af2dc08a5fac72d0d5f7f86fa4e8003a9bf3ffd | clash-lang/clash-prelude | XException.hs | |
Copyright : ( C ) 2016 , University of Twente ,
2017 , Myrtle Software Ltd , QBayLogic , Google Inc.
License : BSD2 ( see the file LICENSE )
Maintainer : < >
' X ' : An exception for uninitialized values
> > > show ( errorX " undefined " : : Integer , 4 : : Int )
" ( *... | null | https://raw.githubusercontent.com/clash-lang/clash-prelude/5645d8417ab495696cf4e0293796133c7fe2a9a7/src/Clash/XException.hs | haskell | # LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeOperators #
* 'X': An exception for uninitialized values
* Strict evaluation
* Structured undefined
| An exception representing an \"uninitialised\" value.
The 'ShowX' methods print these error-... | |
Copyright : ( C ) 2016 , University of Twente ,
2017 , Myrtle Software Ltd , QBayLogic , Google Inc.
License : BSD2 ( see the file LICENSE )
Maintainer : < >
' X ' : An exception for uninitialized values
> > > show ( errorX " undefined " : : Integer , 4 : : Int )
" ( *... |
9c3d97488bfdcb15e34b0ef02c8413aa60718fb0564f2ece57ddf970e9e6e1ae | Liqwid-Labs/liqwid-plutarch-extra | Orphans.hs | # LANGUAGE PolyKinds #
# LANGUAGE QuantifiedConstraints #
-- The whole point of this module
# OPTIONS_GHC -Wno - orphans #
| Module : . Orphans
Description : Orphan instances for Plutarch and types , including
JSON serialization .
Description: Orphan instances for Plutarch and Plutus types, including
J... | null | https://raw.githubusercontent.com/Liqwid-Labs/liqwid-plutarch-extra/f9fa149db0b640c87268ee8865d4dd4175470937/src/Plutarch/Orphans.hs | haskell | The whole point of this module
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
| @since 3.0.3
| @since 3.0.3
| @since 3.0.3
---... | # LANGUAGE PolyKinds #
# LANGUAGE QuantifiedConstraints #
# OPTIONS_GHC -Wno - orphans #
| Module : . Orphans
Description : Orphan instances for Plutarch and types , including
JSON serialization .
Description: Orphan instances for Plutarch and Plutus types, including
JSON serialization.
-}
module Pluta... |
c7209d08fbf27755efc6ca577b2176ad5779407f72c853bacaa51edcc2639077 | yetibot/core | irc.clj | (ns yetibot.core.adapters.irc
(:require
[clojure.set :refer [difference union intersection]]
[clojure.spec.alpha :as s]
[yetibot.core.adapters.adapter :as a]
[taoensso.timbre :as log :refer [info debug]]
[throttler.core :refer [throttle-fn]]
[irclj
[core :as irc]
[connection :as irc-... | null | https://raw.githubusercontent.com/yetibot/core/e35cc772622e91aec3ad7f411a99fff09acbd3f9/src/yetibot/core/adapters/irc.clj | clojure | it must have disconnect, try reconnecting again
rfc1459:
Each client is distinguished from other clients by a unique
the hack. gross 😭
config
Holds the immutable configuration for a single IRC Adapter instance.
channel-config
channel-config is updated and persisted to the database.
current-channels
is necess... | (ns yetibot.core.adapters.irc
(:require
[clojure.set :refer [difference union intersection]]
[clojure.spec.alpha :as s]
[yetibot.core.adapters.adapter :as a]
[taoensso.timbre :as log :refer [info debug]]
[throttler.core :refer [throttle-fn]]
[irclj
[core :as irc]
[connection :as irc-... |
ebc6fb797c09f7f1138c6bc482edc02cc21f96d4864ff789c4462c0bfffaf26a | Javran/unicode-general-category | GeneralCategory.hs | | This module simply re - exports predicate functions from latest Unicode version
-- (as of package release).
module Data.Char.GeneralCategory
( module Data.Char.GeneralCategory.V13_0_0
)
where
import Data.Char.GeneralCategory.V13_0_0 hiding (genCatDb)
| null | https://raw.githubusercontent.com/Javran/unicode-general-category/754d53dfda54cdf8b1159e30d6949ffd623c8900/src/Data/Char/GeneralCategory.hs | haskell | (as of package release). | | This module simply re - exports predicate functions from latest Unicode version
module Data.Char.GeneralCategory
( module Data.Char.GeneralCategory.V13_0_0
)
where
import Data.Char.GeneralCategory.V13_0_0 hiding (genCatDb)
|
a8813a9b0c081e761d2825fccfbc5c760d248e4d8976a954a6150fdb9a50a0a1 | willghatch/racket-rash | rc17-demo-modbeg.rkt | #lang racket/base
(provide
(all-from-out rash/demo/setup)
(except-out (all-from-out racket/base) #%module-begin #%top-interaction)
(rename-out [basic-rash-module-begin #%module-begin]
[basic-rash-top-interaction #%top-interaction])
(all-from-out rash)
app
def
)
(require
rash/demo/setup
rash
... | null | https://raw.githubusercontent.com/willghatch/racket-rash/c40c5adfedf632bc1fdbad3e0e2763b134ee3ff5/rash-demos/rash/demo/rc17-demo-modbeg.rkt | racket | (define-syntax basic-rash-module-begin
#:default-line-macro #'pipeline-line-macro
additional demo definitions | #lang racket/base
(provide
(all-from-out rash/demo/setup)
(except-out (all-from-out racket/base) #%module-begin #%top-interaction)
(rename-out [basic-rash-module-begin #%module-begin]
[basic-rash-top-interaction #%top-interaction])
(all-from-out rash)
app
def
)
(require
rash/demo/setup
rash
... |
dedd3cabf94eb9734ec837c2999f37e5836f7f856ccdeafee7d1f59e7d2db78f | Frama-C/Frama-C-snapshot | Why3Provers.ml | (**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/wp/Why3Provers.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Software
Foundation ,... |
68a80a7e4501f66eb1e5aa4eeb8e97eb48fc823faf4607c8e9d1346cd3eb7cf3 | metaocaml/ber-metaocaml | finaliser.ml | (* TEST
*)
let m = 1000
let m' = 100
let k = m*10
* the printing are not stable between ocamlc and ocamlopt
let debug = false
let gc_print where _ =
if debug then
let stat = Gc.quick_stat () in
Printf.printf "minor: %i major: %i %s\n%!"
stat.Gc.minor_collections
stat.Gc.major_collections
... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/misc/finaliser.ml | ocaml | TEST
* finalise last major
* finalise last minor |
let m = 1000
let m' = 100
let k = m*10
* the printing are not stable between ocamlc and ocamlopt
let debug = false
let gc_print where _ =
if debug then
let stat = Gc.quick_stat () in
Printf.printf "minor: %i major: %i %s\n%!"
stat.Gc.minor_collections
stat.Gc.major_collections
where
let ... |
2fecc85ebc3609cf3b150238ec3d53dd2e4492bcbed49321ab04332974227a81 | wjrforcyber/SystemT | Double.hs | {-# LANGUAGE OverloadedStrings #-}
-- | Predecessor
module Lang.L6.Examples.Double where
import Lang.L6.Eval.EEval
import Lang.L6.Examples.Add (addHs)
import Lang.L6.Examples.Base
import Test.QuickCheck ((===))
import qualified Test.QuickCheck as QC
| Double in Haskell
doubleHs :: Nat -> Nat
doubleHs Zero = Zero
d... | null | https://raw.githubusercontent.com/wjrforcyber/SystemT/6e3248a2f734ac86c7fc3b7d407ce1a7e3c66048/src/Lang/L6/Examples/Double.hs | haskell | # LANGUAGE OverloadedStrings #
| Predecessor
| check that both versions agree |
module Lang.L6.Examples.Double where
import Lang.L6.Eval.EEval
import Lang.L6.Examples.Add (addHs)
import Lang.L6.Examples.Base
import Test.QuickCheck ((===))
import qualified Test.QuickCheck as QC
| Double in Haskell
doubleHs :: Nat -> Nat
doubleHs Zero = Zero
doubleHs n = addHs n n
| type of Double in L6
doub... |
e9b1bcdb5ed2816e531a4b026f056d5f6728f748227d6e7af45a4ed6ab308c8c | Frama-C/Frama-C-snapshot | numerors_float.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/value/values/numerors/numerors_float.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
347f32512b2c41acf72f0247a19e9a7dea9671665fbebfd3e8812559fc99a5b6 | footprintanalytics/footprint-web | streaming_response.clj | (ns metabase.async.streaming-response
(:require [cheshire.core :as json]
[clojure.core.async :as a]
[clojure.tools.logging :as log]
compojure.response
[metabase.async.streaming-response.thread-pool :as thread-pool]
[metabase.async.util :as async.u]
... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/async/streaming_response.clj | clojure | if the request is canceled, `.read`
was completed) then close `canceled-status-chan` which will kill the underlying thread
sync responses only (in some cases?)
async responses only | (ns metabase.async.streaming-response
(:require [cheshire.core :as json]
[clojure.core.async :as a]
[clojure.tools.logging :as log]
compojure.response
[metabase.async.streaming-response.thread-pool :as thread-pool]
[metabase.async.util :as async.u]
... |
525fc14f28cfa81402509bebcf1b6a9daf812dad89385cdd921649d59ad82728 | xvw/preface | functor.ml | open QCheck2
module Suite
(R : Model.COVARIANT_1)
(F : Preface_specs.FUNCTOR with type 'a t = 'a R.t)
(A : Model.T0)
(B : Model.T0)
(C : Model.T0) =
struct
module Laws = Preface_laws.Functor.For (F)
let print pp = Format.asprintf "%a" (R.pp pp)
let functor_1 count =
let generator = R.ge... | null | https://raw.githubusercontent.com/xvw/preface/84a297e1ee2967ad4341dca875da8d2dc6d7638c/lib/preface_qcheck/functor.ml | ocaml | open QCheck2
module Suite
(R : Model.COVARIANT_1)
(F : Preface_specs.FUNCTOR with type 'a t = 'a R.t)
(A : Model.T0)
(B : Model.T0)
(C : Model.T0) =
struct
module Laws = Preface_laws.Functor.For (F)
let print pp = Format.asprintf "%a" (R.pp pp)
let functor_1 count =
let generator = R.ge... | |
1776a82e197a34011342f4ea1540ab13125a8ae36d22d4335e1f9f584de00355 | namin/biohacker | biotransformation.lisp |
(setq *substrate-atom-bond-graph* (adj-list 'etoh))
( ( O ( 2 1 ) ( 3 1 ) )
( H ( 1 1 ) )
( C ( 1 1 ) ( 4 1 ) )
( C ( 3 1 ) ) )
(setq *substrate-pattern* (adj-list '|Alcohols|))
( ( O ( 2 1 ) )
( R ( 1 1 ) ) )
(setq *product-template* (adj-list '|an aldehyde|))
( ( H ( 4 1 ) )
( O ( 4 2 ) )
( R ( 4 1 ) )
... | null | https://raw.githubusercontent.com/namin/biohacker/6b5da4c51c9caa6b5e1a68b046af171708d1af64/metabolizer/biotransformation.lisp | lisp | (O R H))
For efficiency and error avoidance, match-kb without match-h should followed with match-single with match-h on query results.
To effectively substitute the rule pattern with the template, it is only necessary to keep track of the
R groups, and rest can be recomputed. |
(setq *substrate-atom-bond-graph* (adj-list 'etoh))
( ( O ( 2 1 ) ( 3 1 ) )
( H ( 1 1 ) )
( C ( 1 1 ) ( 4 1 ) )
( C ( 3 1 ) ) )
(setq *substrate-pattern* (adj-list '|Alcohols|))
( ( O ( 2 1 ) )
( R ( 1 1 ) ) )
(setq *product-template* (adj-list '|an aldehyde|))
( ( H ( 4 1 ) )
( O ( 4 2 ) )
( R ( 4 1 ) )
... |
910c9c1ffe9b49ed570098ed99eae47ddf38f24987523af72c10041e910dccf4 | TrustInSoft/tis-interpreter | clabels.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/clabels.mli | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Soft... |
dea3e9cf4861150f20fd93f5ad6abba5bf6546d26707fd7433223540b2b0e130 | rlepigre/ocaml-imagelib | aflrunner.ml | let perform () =
let chunk_reader = ImageUtil_unix.chunk_reader_of_path Sys.argv.(2) in
let extension filename =
let ri =
try 1 (* the . itself *) + String.rindex filename '.'
with Not_found -> invalid_arg "filename without extension"
in
String.(sub filename ri @@ (length filename) - ri)
... | null | https://raw.githubusercontent.com/rlepigre/ocaml-imagelib/7adfb768533b03ad188097cb2ec92301ca35e5ad/tests/aflrunner.ml | ocaml | the . itself | let perform () =
let chunk_reader = ImageUtil_unix.chunk_reader_of_path Sys.argv.(2) in
let extension filename =
let ri =
with Not_found -> invalid_arg "filename without extension"
in
String.(sub filename ri @@ (length filename) - ri)
in
let f ~extension chunk_reader = match Sys.argv.(1) with... |
85675e31db95d506ff105432a66c57fb12bad49f0a9764f866a1f99b03864a55 | slipstream/SlipStreamServer | credential_cloud.cljc | (ns com.sixsq.slipstream.ssclj.resources.spec.credential-cloud
(:require
[clojure.spec.alpha :as s]
[com.sixsq.slipstream.ssclj.resources.spec.credential :as cred]
[com.sixsq.slipstream.ssclj.resources.spec.credential-template]
[com.sixsq.slipstream.ssclj.util.spec :as su]))
(s/def ::disabledMonitor... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/src/com/sixsq/slipstream/ssclj/resources/spec/credential_cloud.cljc | clojure | (ns com.sixsq.slipstream.ssclj.resources.spec.credential-cloud
(:require
[clojure.spec.alpha :as s]
[com.sixsq.slipstream.ssclj.resources.spec.credential :as cred]
[com.sixsq.slipstream.ssclj.resources.spec.credential-template]
[com.sixsq.slipstream.ssclj.util.spec :as su]))
(s/def ::disabledMonitor... | |
60fd8c17a48da1361a10e69fb2b0e924e597b73e3574e10f560702e94f994ee4 | zkat/sheeple | utils.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;;
;;;; This file is part of Sheeple
;;;; utils.lisp
;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package :sheeple)
(def-suite utils :in sheeple)
(in-suite sheeple)
(test ensure-list
(is (null (ensure-... | null | https://raw.githubusercontent.com/zkat/sheeple/5393c74737ccf22c3fd5f390076b75c38453cb04/tests/utils.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
This file is part of Sheeple
utils.lisp
|
(in-package :sheeple)
(def-suite utils :in sheeple)
(in-suite sheeple)
(test ensure-list
(is (null (ensure-list nil)))
(is (equal '(1) (ensure-list 1)))
(is (equal '(1) (ensure-list '(1)))))
(test fun
(is (functionp (fun (* 2 _))))
(is (= 5 (funcall (fun (+ 3 _)) 2))))
(test collect)
(test memq)
(test ma... |
07e696080e2e42df53a57ec58a008ab8f55c4ad41b20c49165631104ce715981 | hercules-ci/hercules-ci-agent | EffectInfo.hs | {-# LANGUAGE DeriveAnyClass #-}
module Hercules.API.Effects.EffectInfo where
import Hercules.API.Build.DerivationInfo.DerivationInput (DerivationInput)
import Hercules.API.Effects.EffectEvent (EffectEvent)
import Hercules.API.Effects.EffectReference (EffectReference)
import Hercules.API.Prelude
import Hercules.API.Pr... | null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/9a04295f6c63d2389fb5eb1bf472b9f385e9f706/hercules-ci-api/src/Hercules/API/Effects/EffectInfo.hs | haskell | # LANGUAGE DeriveAnyClass # |
module Hercules.API.Effects.EffectInfo where
import Hercules.API.Build.DerivationInfo.DerivationInput (DerivationInput)
import Hercules.API.Effects.EffectEvent (EffectEvent)
import Hercules.API.Effects.EffectReference (EffectReference)
import Hercules.API.Prelude
import Hercules.API.Projects.Job (Job)
import Hercules... |
d66ecf092bb7eedd1e873792e175fcfd74a9aa88bb66332ffed014bf13cda259 | marigold-dev/deku | operation.ml | open Deku_stdlib
open Deku_crypto
open Deku_concepts
open Deku_ledger
exception Invalid_signature
exception Invalid_source
type operation =
| Operation_ticket_transfer of {
sender : Address.t;
receiver : Address.t;
ticket_id : Ticket_id.t;
amount : Amount.t;
}
| Operation_vm_transactio... | null | https://raw.githubusercontent.com/marigold-dev/deku/58fb5377816401fcd6457519ebde6cae9332fed9/deku-p/src/core/protocol/operation.ml | ocaml | TODO: this one is a big ugly with nested "operation" keys. We should fix it.
TODO: triple-nested `operation` tags is pretty ugly. We should make it prettier.
TODO: This seems like a weird place to put this function
limits for how many blocks we need to hold the operations | open Deku_stdlib
open Deku_crypto
open Deku_concepts
open Deku_ledger
exception Invalid_signature
exception Invalid_source
type operation =
| Operation_ticket_transfer of {
sender : Address.t;
receiver : Address.t;
ticket_id : Ticket_id.t;
amount : Amount.t;
}
| Operation_vm_transactio... |
2691cf9e8685bed37b04b7267014bc0a7cf552fa63b2a9d6ed142bd45a134289 | fossas/fossa-cli | VSI.hs | module Control.Carrier.FossaApiClient.Internal.VSI (
addFilesToVsiScan,
assertRevisionBinaries,
assertUserDefinedBinaries,
completeVsiScan,
createVsiScan,
getVsiInferences,
getVsiScanAnalysisStatus,
resolveProjectDependencies,
resolveUserDefinedBinary,
) where
import App.Fossa.VSI.Fingerprint (Finger... | null | https://raw.githubusercontent.com/fossas/fossa-cli/c8367f402a6d403fb55a3925cdb27354b5c5b190/src/Control/Carrier/FossaApiClient/Internal/VSI.hs | haskell | module Control.Carrier.FossaApiClient.Internal.VSI (
addFilesToVsiScan,
assertRevisionBinaries,
assertUserDefinedBinaries,
completeVsiScan,
createVsiScan,
getVsiInferences,
getVsiScanAnalysisStatus,
resolveProjectDependencies,
resolveUserDefinedBinary,
) where
import App.Fossa.VSI.Fingerprint (Finger... | |
5491039bf37563f72592f884b492402e30b71b1dc60ac2c7f7a32433d26331cc | mbutterick/aoc-racket | test.rkt | #lang reader "lang.rkt"
eedadn
drvtee
eandsr
raavrd
atevrs
tsrnev
sdttsa
rasrtv
nssdts
ntnada
svetve
tesnvt
vntsnd
vrdear
dvrsen
enarar | null | https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/2016/day06/test.rkt | racket | #lang reader "lang.rkt"
eedadn
drvtee
eandsr
raavrd
atevrs
tsrnev
sdttsa
rasrtv
nssdts
ntnada
svetve
tesnvt
vntsnd
vrdear
dvrsen
enarar | |
309713f0654c3ec3792d92edabc09c5643e0236ea01f78648a20ac293b3be6af | csm/s4 | core.clj | (ns s4.core
(:require [cemerick.uri :as uri]
[clojure.core.async :as async]
[clojure.data.xml :as xml]
[clojure.set :as set]
[clojure.string :as string]
[clojure.tools.logging :as log]
[clojure.walk :refer [keywordize-keys]]
[konserve... | null | https://raw.githubusercontent.com/csm/s4/a09662bbd1696ee2159545523d5def34802fcc16/src/s4/core.clj | clojure | todo cors - too lazy to parse out the damn xml right now
todo maybe support this?
todo maybe support this?
memory store returns the callback's value
that channel, and returns that value on a new channel
leveldb returns what the callback returns, but *within*
a go block (so it's a channel in a channel).
(log/debu... | (ns s4.core
(:require [cemerick.uri :as uri]
[clojure.core.async :as async]
[clojure.data.xml :as xml]
[clojure.set :as set]
[clojure.string :as string]
[clojure.tools.logging :as log]
[clojure.walk :refer [keywordize-keys]]
[konserve... |
9cc869a3a712f7095a594d01f56d10bba3b3a83b9e7ad95c16528bec21fe83c5 | cunger/pythia | Effects.clj | (ns core.definitions.Effects
(:require [core.nlu.context.short_term_memory :as stm]
[core.nlu.reasoning.oracle :as oracle]
[core.data.LambdaRDF :refer :all])
(:import [core.data.LambdaRDF Term Triple Path Not And Or Quant Ask Select]))
;; Functions without effects
(defn bind [v e] (S... | null | https://raw.githubusercontent.com/cunger/pythia/f58e35395968d4c46aef495fd363c26b1102003c/src/core/definitions/Effects.clj | clojure | Functions without effects
Functions with effects
oracle/... context/...
return x | (ns core.definitions.Effects
(:require [core.nlu.context.short_term_memory :as stm]
[core.nlu.reasoning.oracle :as oracle]
[core.data.LambdaRDF :refer :all])
(:import [core.data.LambdaRDF Term Triple Path Not And Or Quant Ask Select]))
(defn bind [v e] (Select. v e))
(defn check [e] ... |
68f080cec3d303235dfea9396cdced83bb117aa5d05de6ab6952b57658bce46d | RolfRolles/PandemicML | BinaryFileUtil.ml | (* Belongs in a BinaryFileUtil module *)
let transformed_int_array_of_filename f fname =
let fh = open_in_bin fname in
let rl_i32 = ref [] in
let add i32 = rl_i32 := i32::(!rl_i32) in
let rec aux () =
let _ = add (f (input_byte fh)) in
aux ()
in
try
aux ()
with End_of_file ->
let... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/Util/BinaryFileUtil.ml | ocaml | Belongs in a BinaryFileUtil module | let transformed_int_array_of_filename f fname =
let fh = open_in_bin fname in
let rl_i32 = ref [] in
let add i32 = rl_i32 := i32::(!rl_i32) in
let rec aux () =
let _ = add (f (input_byte fh)) in
aux ()
in
try
aux ()
with End_of_file ->
let _ = close_in fh in
Array.of_list (... |
d06877d4184ae477901a6d76f869c9f55b7dcbb4f8aa6949b5aaa98d4e31ced7 | esl/tracerl | tracerl.erl | %%%-------------------------------------------------------------------
@author
( C ) 2013 , Erlang Solutions Ltd.
%%% @doc Main tracerl API
%%%
%%% @end
Created : 21 Aug 2013 by
%%%-------------------------------------------------------------------
-module(tracerl).
-export([start_trace/3, start_trace/4, sto... | null | https://raw.githubusercontent.com/esl/tracerl/8ebc649ccd7a3013aa310e4f71d35ef65fb3286b/src/tracerl.erl | erlang | -------------------------------------------------------------------
@doc Main tracerl API
@end
------------------------------------------------------------------- | @author
( C ) 2013 , Erlang Solutions Ltd.
Created : 21 Aug 2013 by
-module(tracerl).
-export([start_trace/3, start_trace/4, stop_trace/1]).
start_trace(ScriptSrc, Node, PidOrHandler) ->
start_trace(ScriptSrc, Node, PidOrHandler, []).
start_trace(ScriptSrc, Node, PidOrHandler, Options) ->
tracerl_s... |
75b1f4ec3ff84a1a6c93b5ef4f34fdc75804d153c22e02f27cc964b1c096b0fb | metosin/compojure-api | resource_test.clj | (ns compojure.api.resource-test
(:require [compojure.api.sweet :refer :all]
[compojure.api.test-utils :refer :all]
[plumbing.core :refer [fnk]]
[midje.sweet :refer :all]
[ring.util.http-response :refer :all]
[clojure.core.async :as a]
[schema.cor... | null | https://raw.githubusercontent.com/metosin/compojure-api/5c88f32fe56cdb6fcdb3cc506bb956943fcd8c17/test/compojure/api/resource_test.clj | clojure | the ring headers
compojure routing
works & api-docs
works, but no api-docs | (ns compojure.api.resource-test
(:require [compojure.api.sweet :refer :all]
[compojure.api.test-utils :refer :all]
[plumbing.core :refer [fnk]]
[midje.sweet :refer :all]
[ring.util.http-response :refer :all]
[clojure.core.async :as a]
[schema.cor... |
8a603d754c429f4f4ff414874a9a909e5df2c78374e59ed4c8cfab02443757eb | sonyxperiadev/dataflow | Validation.hs | module DataFlow.Validation (
ValidationError(..),
validate
) where
import Data.Set (Set, member, insert, empty)
import Text.Printf
import DataFlow.Core
data ValidationError = UnknownID ID
| DuplicateDeclaration ID
deriving (Eq)
instance Show ValidationError where
... | null | https://raw.githubusercontent.com/sonyxperiadev/dataflow/8bef5bd6bf96a918197e66ad9d675ff8cd2a4e33/src/DataFlow/Validation.hs | haskell | module DataFlow.Validation (
ValidationError(..),
validate
) where
import Data.Set (Set, member, insert, empty)
import Text.Printf
import DataFlow.Core
data ValidationError = UnknownID ID
| DuplicateDeclaration ID
deriving (Eq)
instance Show ValidationError where
... | |
ed85c45c67a77aa09e87dc4621d7ab47ef60dda23a0b1051870c2f9bbe01dbc8 | BrunoBonacci/1config | project.clj | (defn ver [] (-> "../ver/1config.version" slurp .trim))
(defn java-version
"It returns the current Java major version as a number"
[]
(as-> (System/getProperty "java.version") $
(str/split $ #"\.")
(if (= "1" (first $)) (second $) (first $))
(Integer/parseInt $)))
(defproject com.brunobonacci/oneconf... | null | https://raw.githubusercontent.com/BrunoBonacci/1config/571fadb65067ac2812183632ae1d3fd07ab511a8/1config-cli/project.clj | clojure | run the application to infer the build configuration | (defn ver [] (-> "../ver/1config.version" slurp .trim))
(defn java-version
"It returns the current Java major version as a number"
[]
(as-> (System/getProperty "java.version") $
(str/split $ #"\.")
(if (= "1" (first $)) (second $) (first $))
(Integer/parseInt $)))
(defproject com.brunobonacci/oneconf... |
bb5ef96d03b2c82bba86ed263dce1814ad60ba3ab85c3094984fc66d38e87402 | jaspervdj/websockets | Types.hs | --------------------------------------------------------------------------------
-- | Primary types
{-# LANGUAGE DeriveDataTypeable #-}
module Network.WebSockets.Types
( Message (..)
, ControlMessage (..)
, DataMessage (..)
, WebSocketsData (..)
, HandshakeException (..)
, ConnectionException (... | null | https://raw.githubusercontent.com/jaspervdj/websockets/95dc7159322c8a60cbbbf0911571aef83673ec88/src/Network/WebSockets/Types.hs | haskell | ------------------------------------------------------------------------------
| Primary types
# LANGUAGE DeriveDataTypeable #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
----------------------------------... | module Network.WebSockets.Types
( Message (..)
, ControlMessage (..)
, DataMessage (..)
, WebSocketsData (..)
, HandshakeException (..)
, ConnectionException (..)
, ConnectionType (..)
, decodeUtf8Lenient
, decodeUtf8Strict
) where
import Control.Exception (... |
dec1d6807b0e49f61b192b5f4a584b69cb88415105ae0b562a74c673beaee607 | cartazio/tlaps | module.mli |
* Copyright ( C ) 2011 INRIA and Microsoft Corporation
* Copyright (C) 2011 INRIA and Microsoft Corporation
*)
module T : sig
open Property;;
open Util;;
open Expr.T;;
open Proof.T;;
type mule = mule_ wrapped
and mule_ = {
name : hint ;
extendees : hint list ;
in... | null | https://raw.githubusercontent.com/cartazio/tlaps/562a34c066b636da7b921ae30fc5eacf83608280/src/module.mli | ocaml |
* Copyright ( C ) 2011 INRIA and Microsoft Corporation
* Copyright (C) 2011 INRIA and Microsoft Corporation
*)
module T : sig
open Property;;
open Util;;
open Expr.T;;
open Proof.T;;
type mule = mule_ wrapped
and mule_ = {
name : hint ;
extendees : hint list ;
in... | |
a9bd32dacea42878a5fe836b4d78912a6a874002bec0015ff0f9cdf3e2a54316 | yoshiquest/forge-clj | ui.clj | (ns forge-clj.client.ui
"Contains the client side ui macros."
(:require
[forge-clj.core :refer [defclass]])
(:import
[net.minecraft.client.gui.inventory GuiContainer]))
(defmacro defguicontainer
"DEFCLASS: Given a class name and classdata, creates a class extending GuiContainer.
Remember to create imp... | null | https://raw.githubusercontent.com/yoshiquest/forge-clj/9ead6fcf9efc30ec0f0685562526ff7400c5cd3a/src/main/clojure/forge_clj/client/ui.clj | clojure | (ns forge-clj.client.ui
"Contains the client side ui macros."
(:require
[forge-clj.core :refer [defclass]])
(:import
[net.minecraft.client.gui.inventory GuiContainer]))
(defmacro defguicontainer
"DEFCLASS: Given a class name and classdata, creates a class extending GuiContainer.
Remember to create imp... | |
80202b5f0bc44efe8bbcf5aca12207b34dd73251b1e577d7f0405a53839fa082 | expipiplus1/vulkan | VK_NV_ray_tracing_motion_blur.hs | {-# language CPP #-}
-- | = Name
--
-- VK_NV_ray_tracing_motion_blur - device extension
--
-- == VK_NV_ray_tracing_motion_blur
--
-- [__Name String__]
@VK_NV_ray_tracing_motion_blur@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
328
--
-- [__Revision__]
1
-... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/70d8cca16893f8de76c0eb89e79e73f5a455db76/src/Vulkan/Extensions/VK_NV_ray_tracing_motion_blur.hs | haskell | # language CPP #
| = Name
VK_NV_ray_tracing_motion_blur - device extension
== VK_NV_ray_tracing_motion_blur
[__Name String__]
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependencies__]
- Requires @VK_KHR_ray_tracing_pipeli... | @VK_NV_ray_tracing_motion_blur@
328
1
- Requires support for Vulkan 1.0
-
2021 - 06 - 16
< >
- , NVIDIA
- , NVIDIA
tracing support in the API provides an efficient mechanism to
timestep between 0.0 and 1.0 . A motion trace using @OpTrace... |
43539484a6a5051334e63f0d5dd5e2e4abafa7c8be1f8d08ba0eefae5c9852d7 | aryx/xix | draw_marshal.ml | open Common
open Point
open Rectangle
open Color
(* todo: sanity check range *)
let bp_byte x =
String.make 1 (Char.chr x)
let bp_short x =
(* less: sanity check range? *)
let x1 = Char.chr (x land 0xFF) in
let x2 = Char.chr ((x asr 8) land 0xFF) in
let str = String.make 2 ' ' in
str.[0] <- x1;
str.[1] ... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/lib_graphics/draw/draw_marshal.ml | ocaml | todo: sanity check range
less: sanity check range?
less: use commons/byte_order.ml?
alt:
* marshall full AST if kernel was written in OCaml:
*
type msg =
| AllocImage of int
| Draw of int
| Line of int
| Ellipse of int
| Arc of int
| open Common
open Point
open Rectangle
open Color
let bp_byte x =
String.make 1 (Char.chr x)
let bp_short x =
let x1 = Char.chr (x land 0xFF) in
let x2 = Char.chr ((x asr 8) land 0xFF) in
let str = String.make 2 ' ' in
str.[0] <- x1;
str.[1] <- x2;
str
let bp_long x =
let x1 = Char.chr (x land 0xFF) i... |
517851788b0b6765d78a0d1c0cbba30c83f7a16f493881ee6607582cbb4d1721 | ivanjovanovic/sicp | e-3.15.scm | Exercise 3.15 . Draw box - and - pointer diagrams to explain the effect of
; set-to-wow! on the structures z1 and z2 above.
; ------------------------------------------------------------
; I will not draw them here, but I did them on paper. Could have scanned
; them if my handwriting is not destroyed by typing :)
... | null | https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/3.3/e-3.15.scm | scheme | set-to-wow! on the structures z1 and z2 above.
------------------------------------------------------------
I will not draw them here, but I did them on paper. Could have scanned
them if my handwriting is not destroyed by typing :)
when rendering output of z2 we wil see
((wow b) wow b)
soon as we change one, th... | Exercise 3.15 . Draw box - and - pointer diagrams to explain the effect of
In case of z1 , both car and cdr point to the same x and therefor
In case of z2 both car and cdr values point to the same symbo , but as
|
da7b5db709925fcc7214c67f57f512ba0e1673139cd5376693d65f9894bf385c | naryl/cl-tui | 7chat.lisp |
(defpackage cl-tui.examples
(:use :cl :cl-tui))
(in-package cl-tui.examples)
(define-frame log (log-frame) :on :root)
edit - frame implements a single - line text editor . It will misbehave if its height is not 1
(define-frame input (edit-frame :prompt "> ") :on :root :h 1)
(defun finish-input ()
;; Get text ... | null | https://raw.githubusercontent.com/naryl/cl-tui/4e8a06f50c682fba48884e5a35a6d16101298c08/examples/7chat.lisp | lisp | Get text from edit-frame
Append it to the log-frame
And clear the text in edit-frame
Esc and Newline are handled here
Everything else is sent to the edit-frame. |
(defpackage cl-tui.examples
(:use :cl :cl-tui))
(in-package cl-tui.examples)
(define-frame log (log-frame) :on :root)
edit - frame implements a single - line text editor . It will misbehave if its height is not 1
(define-frame input (edit-frame :prompt "> ") :on :root :h 1)
(defun finish-input ()
(let ((text ... |
91fe073cb104be883fa6ac39bf0737e3ca1db9fecb059be14dd963fbbff3b39f | xapi-project/xen-api | data_channel.mli |
* Copyright ( c ) 2012 Citrix Inc
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND TH... | null | https://raw.githubusercontent.com/xapi-project/xen-api/5c2fb7b8de6b511cf17f141f3d03895c6d767b55/ocaml/xen-api-client/lwt/data_channel.mli | ocaml | * a bidirectional channel which allows reading into and writing from
Cstruct.t buffers
* [really_read buffer] reads a whole [buffer] of data from the channel
* the current file write offset
* [skip bytes] seeks past the next [bytes] bytes in the output
* [close ()] closes the channel
* [of_fd fd seekable] crea... |
* Copyright ( c ) 2012 Citrix Inc
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND TH... |
64a8d35af9233fcd52d42999d40ddee03a5337ebe95eaa0437746dcfbf9ed78f | clojure-interop/aws-api | AbstractAmazonMachineLearningAsync.clj | (ns com.amazonaws.services.machinelearning.AbstractAmazonMachineLearningAsync
"Abstract implementation of AmazonMachineLearningAsync. Convenient method forms pass through to the
corresponding overload that takes a request object and an AsyncHandler, which throws an
UnsupportedOperationException."
(:refer-clojur... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.machinelearning/src/com/amazonaws/services/machinelearning/AbstractAmazonMachineLearningAsync.clj | clojure | (ns com.amazonaws.services.machinelearning.AbstractAmazonMachineLearningAsync
"Abstract implementation of AmazonMachineLearningAsync. Convenient method forms pass through to the
corresponding overload that takes a request object and an AsyncHandler, which throws an
UnsupportedOperationException."
(:refer-clojur... | |
cd5513a5007508a4e6dab31173223952ef921698ec26b0c1c5266ec53b544f03 | bos/rwh | SimpleJSON.hs | {-- snippet module --}
module SimpleJSON
(
JValue(..)
, getString
, getInt
, getDouble
, getBool
, getObject
, getArray
, isNull
) where
{-- /snippet module --}
- snippet -
-- file: SimpleJSON.hs
data JValue = JString String
| JNumber Double
| JBool B... | null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch06/SimpleJSON.hs | haskell | - snippet module -
- /snippet module -
file: SimpleJSON.hs
- /snippet JValue -
- /snippet getString -
- snippet getters -
- /snippet getters - | module SimpleJSON
(
JValue(..)
, getString
, getInt
, getDouble
, getBool
, getObject
, getArray
, isNull
) where
- snippet -
data JValue = JString String
| JNumber Double
| JBool Bool
| JNull
| JObject [(String, JValue)]
... |
d42d3ecd71af45ecb9a7ec810edb31380f93e6ec77b0f626941101980c43a4f5 | google-research/dex-lang | Imp.hs | Copyright 2022 Google LLC
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file or at
-- -source/licenses/bsd
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE StrictData #-}
# LANGUAGE DeriveFunctor #
# LANGUAGE V... | null | https://raw.githubusercontent.com/google-research/dex-lang/2e7bcda20a853e0764dc53991d495ae94e9a24b2/src/lib/Types/Imp.hs | haskell |
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file or at
-source/licenses/bsd
# LANGUAGE StrictData #
has to be a vector type
args, results
in a number-of-results-length buffer supplied by the caller)
returns the number of available concurrent threads
dest, val
TO... | Copyright 2022 Google LLC
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE DeriveFunctor #
# LANGUAGE ViewPatterns #
# LANGUAGE TypeFamilies #
# LANGUAGE InstanceSigs #
# LANGUAGE UndecidableInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE DerivingStrategies #
... |
40373aaaedc11aec1b6acb4400fc74c16e028f48f41cb6c449460eb0ecdf9e21 | bsaleil/lc | chars.scm | ;;---------------------------------------------------------------------------
;;
Copyright ( c ) 2015 , . All rights reserved .
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions are
;; met:
;; 1. Redistributions of so... | null | https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/unit-tests/chars.scm | scheme | ---------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list ... | Copyright ( c ) 2015 , . All rights reserved .
THIS SOFTWARE IS PROVIDED ` ` AS IS '' AND ANY EXPRESS OR
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT
THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT
(pp (char=? #\A #\B))
(pp (char=? #\A #\A))
(pp (c... |
a463e886446daea581d23c0071a8564441f01b9fd44a440a4ab4039f7b170c04 | soulomoon/haskell-katas | AdditionAssoc.hs | # LANGUAGE TypeOperators , TypeFamilies , GADTs #
module Kyu4.AdditionAssoc where
-- | The natural numbers, encoded in types.
data Z
data S n
-- | Predicate describing natural numbers.
-- | This allows us to reason with `Nat`s.
data Natural :: * -> * where
NumZ :: Natural Z
NumS :: Natural n -> Natural (S n)
... | null | https://raw.githubusercontent.com/soulomoon/haskell-katas/0861338e945e5cbaadf98138cf8f5f24a6ca8bb3/src/Kyu4/AdditionAssoc.hs | haskell | | The natural numbers, encoded in types.
| Predicate describing natural numbers.
| This allows us to reason with `Nat`s.
| Predicate describing equality of natural numbers.
| Peano definition of addition.
Helpers
| For any n, n = n.
| if a = b, then b = a.
This is the proof that the kata requires.
| a + (b + ... | # LANGUAGE TypeOperators , TypeFamilies , GADTs #
module Kyu4.AdditionAssoc where
data Z
data S n
data Natural :: * -> * where
NumZ :: Natural Z
NumS :: Natural n -> Natural (S n)
data Equal :: * -> * -> * where
EqlZ :: Equal Z Z
EqlS :: Equal n m -> Equal (S n) (S m)
type family (:+:) (n :: *) (m :: *) ... |
2210da206131098d5d42211e418efd132e20bc654fd77a79ad4ba20a2e804bda | mzp/coq-ide-for-ios | type_errors.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/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/checker/type_errors.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Type errors.
Fixpoints
CoFixpoi... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ I d : type_errors.ml 8845... |
ecf726d833485b1e57f244e3d181ed62f2c2ca9a930a807fda2880869a9cf23d | rowangithub/DOrder | delaunay.mli | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
(* ... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/external/ocamlgraph/src/delaunay.mli | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
modify it under the terms of the GNU Library General Public
License version 2 , with the special exception on linking
$ I d :... |
8f814ef66023c810a2defdbb52fd81af00b47cd550de35226903d82d28b177d3 | LexiFi/dead_code_analyzer | fooFn.ml | let f x = 12
let g x = 0
| null | https://raw.githubusercontent.com/LexiFi/dead_code_analyzer/c44dc2ea5ccb13df2145e9316e21c39f09dad506/examples/fooFn.ml | ocaml | let f x = 12
let g x = 0
| |
0f98a727c0326aa4c142b036e6e001d2817a1e71fbe9e3ddda1bb71d1918d492 | softwarelanguageslab/maf | R5RS_sigscheme_takr-3.scm | ; Changes:
* removed : 0
* added : 2
* swaps : 0
* negated predicates : 8
* swapped branches : 8
* calls to i d fun : 7
(letrec ((tak0 (lambda (x y z)
(<change>
(if (not (< y x))
z
(tak1 (tak37 (- x 1) y z) (tak11 (- y 1) z x... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_sigscheme_takr-3.scm | scheme | Changes: | * removed : 0
* added : 2
* swaps : 0
* negated predicates : 8
* swapped branches : 8
* calls to i d fun : 7
(letrec ((tak0 (lambda (x y z)
(<change>
(if (not (< y x))
z
(tak1 (tak37 (- x 1) y z) (tak11 (- y 1) z x) (tak17 (-... |
faf5bca59bce6f79ad2260197669d9c0344465ff28866470342bef88881348e9 | hedgehogqa/haskell-hedgehog-classes | Category.hs | # LANGUAGE ScopedTypeVariables #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE QuantifiedConstraints #
module Hedgehog.Classes.Category (categoryLaws, commutativeCategoryLaws) where
import Hedgehog
import Hedgehog.Classes.Common
import Control.Category(Category(..))
import Prelude hiding (id, (.))
-- | Tests the following... | null | https://raw.githubusercontent.com/hedgehogqa/haskell-hedgehog-classes/4d97b000e915de8ba590818f551bce7bd862e7d4/src/Hedgehog/Classes/Category.hs | haskell | # LANGUAGE RankNTypes #
| Tests the following 'Category' laws:
[__Left Identity__]: @'id' '.' f@ ≡ @f@
[__Associativity__]: @f '.' (g '.' h)@ ≡ @(f '.' g) '.' h@
| Tests the following 'Category' laws:
[__Commutativity__]: @f '.' g@ ≡ @g '.' f@ | # LANGUAGE ScopedTypeVariables #
# LANGUAGE QuantifiedConstraints #
module Hedgehog.Classes.Category (categoryLaws, commutativeCategoryLaws) where
import Hedgehog
import Hedgehog.Classes.Common
import Control.Category(Category(..))
import Prelude hiding (id, (.))
[ _ _ Right Identity _ _ ] : @f ' . ' ' id'@ ≡
ca... |
bca9638471d7621116d09c3763d1604cdae0ecf473809445618519f179c2935b | tel/oak | higher_order.cljs | (ns oak.component.higher-order
"Functions for constructing Components from sub-Components."
(:require
[oak.internal.utils :as util]
[oak.component :as oak]
[oak.dom :as d]
[schema.core :as s]
[oak.schema :as os]))
; -----------------------------------------------------------------------------
;... | null | https://raw.githubusercontent.com/tel/oak/12227273ba5fbc27bc0c5379017ee8902992670d/src/oak/component/higher_order.cljs | clojure | -----------------------------------------------------------------------------
Higher-order components
Let the remaining options override | (ns oak.component.higher-order
"Functions for constructing Components from sub-Components."
(:require
[oak.internal.utils :as util]
[oak.component :as oak]
[oak.dom :as d]
[schema.core :as s]
[oak.schema :as os]))
(defn parallel
"Construct a *static* component by gluing several subcomponents... |
32f617205144f969fb395da4441c27f8a1acf112694f8b6e314c2a32f1caa4bd | circleci/circleci.test | cider.clj | (ns circleci.test.report.cider
"CIDER-compatible test reporter."
(:require [circleci.test.report :refer [TestReporter]]
[cider.nrepl.middleware.test :as cider]))
(deftype CIDERTestReporter []
TestReporter
(default [this m]
(cider/report m))
(pass [this m]
(cider/report m))
(fail [this... | null | https://raw.githubusercontent.com/circleci/circleci.test/eb2e44fe94e430648c852f7f736419dc70a4e5a1/src/circleci/test/report/cider.clj | clojure | (ns circleci.test.report.cider
"CIDER-compatible test reporter."
(:require [circleci.test.report :refer [TestReporter]]
[cider.nrepl.middleware.test :as cider]))
(deftype CIDERTestReporter []
TestReporter
(default [this m]
(cider/report m))
(pass [this m]
(cider/report m))
(fail [this... | |
586e0581acf95cec1ce6e174eba407308ebb9b39433a38a118e9a845bcfffeaa | ryukzak/nitta | ProcessIntegrity.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE TypeFamilies #
|
Module : NITTA.Model . ProcessIntegrity
Description : Checking the target process integrity
Copyright : ( c ) , , 2022
License : :
Stability : experimental
Module : NITTA.Model.... | null | https://raw.githubusercontent.com/ryukzak/nitta/6d5cab0465ff5bcccfe419b8d8553266c530f7b7/src/NITTA/Model/ProcessIntegrity.hs | haskell | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE TypeFamilies #
|
Module : NITTA.Model . ProcessIntegrity
Description : Checking the target process integrity
Copyright : ( c ) , , 2022
License : :
Stability : experimental
Module : NITTA.Model.... | |
540e892460a8b58977a025f9a93e4935a209ea4afc0629941d3f39bb83d91af5 | alesaccoia/festival_flinger | cmu_us_slt_phoneset.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Carnegie Mellon University ; ; ;
and and ; ; ;
Copyright ( c ) 1998 - 2000 ... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices/us/cmu_us_slt_cg/festvox/cmu_us_slt_phoneset.scm | scheme |
;;;
; ;
; ;
; ;
; ;
;;;
Permission is hereby granted, free of charge, to use and distribute ;;;
this software and its documentation without restriction, including ;;;
withou... | Phonset for US English
(require 'radio_phones)
(define (cmu_us_slt::select_phoneset)
"(cmu_us_slt::select_phoneset)
Set up phone set for US English."
(Parameter.set 'PhoneSet 'radio)
(PhoneSet.select 'radio)
)
(define (cmu_us_slt::reset_phoneset)
"(cmu_us_slt::reset_phoneset)
Reset phone set for US English... |
bd6bd4230c7e7754c86003543970739cdbe764f96c80c441eeb2cc41065342a6 | hakaru-dev/hakaru | Pretty.hs | # LANGUAGE OverloadedStrings
, , GADTs
, CPP
, RecordWildCards
#
, DataKinds
, GADTs
, CPP
, RecordWildCards
#-}
module Main where
import Language.Hakaru.Pretty.Concrete
import Language.Hak... | null | https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/commands/Pretty.hs | haskell | # LANGUAGE OverloadedStrings
, , GADTs
, CPP
, RecordWildCards
#
, DataKinds
, GADTs
, CPP
, RecordWildCards
#-}
module Main where
import Language.Hakaru.Pretty.Concrete
import Language.Hak... | |
7596a41c7a6b215cb8faa291f143738a9f7c8b0b1f90c925ba66226e88ca134f | w3ntao/sicp-solution | 3-30.rkt | #lang racket
(require (combine-in (only-in "../ToolBox/IntegratedCircuit/wire.rkt"
make-wire
set-signal!
get-signal
add-action!)
(only-in "../ToolBox/IntegratedCircuit/gate.rkt"
... | null | https://raw.githubusercontent.com/w3ntao/sicp-solution/00be3a7b4da50bb266f8a2db521a24e9f8c156be/chap-3/3-30.rkt | racket | num stands for bit length
display n bits circuit | #lang racket
(require (combine-in (only-in "../ToolBox/IntegratedCircuit/wire.rkt"
make-wire
set-signal!
get-signal
add-action!)
(only-in "../ToolBox/IntegratedCircuit/gate.rkt"
... |
a45a179bbf62f9cff5cff9c50729fd8339f5eac7a505d85b10da823045bd6d41 | Toxaris/pts | Properties.hs | module PTS.Syntax.Substitution.Properties where
import Data.Set
import Test.Property
import PTS.Syntax
import PTS.Syntax.Arbitrary
substAvoidsCapture t x t' =
x `member` freevars t ==>
delete x (freevars t) `union` freevars t' == freevars (subst t x t')
| null | https://raw.githubusercontent.com/Toxaris/pts/1700024f47bc9d28528b68fc815d2421f5d25b84/src-test/PTS/Syntax/Substitution/Properties.hs | haskell | module PTS.Syntax.Substitution.Properties where
import Data.Set
import Test.Property
import PTS.Syntax
import PTS.Syntax.Arbitrary
substAvoidsCapture t x t' =
x `member` freevars t ==>
delete x (freevars t) `union` freevars t' == freevars (subst t x t')
| |
2dd73336212f8c7c0a927b25ceeb2b622c14f8ef519074c20f61fcd98995c796 | may-liu/qtalk | http_create_muc.erl | %% Feel free to use, reuse and abuse the code in this file.
-module(http_create_muc).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-export([create_muc/1]).
-include("ejabberd.hrl").
-include("logger.hrl").
-include("http_req.hrl").
-include("jlib.hrl").
init(_Transport, Req, []) ->
{ok, Req, unde... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/http_create_muc.erl | erlang | Feel free to use, reuse and abuse the code in this file.
Packet = http_muc_session:make_muc_presence(),
Resources =
case ejabberd_sm:get_user_resources(Muc_owner, Server) of
[] ->
[<<"">>];
Rs ->
Rs
end,
R = lists:nth(1,Resources),
IQ_Packet = http_muc_session:make_invite_iq(U)... | -module(http_create_muc).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-export([create_muc/1]).
-include("ejabberd.hrl").
-include("logger.hrl").
-include("http_req.hrl").
-include("jlib.hrl").
init(_Transport, Req, []) ->
{ok, Req, undefined}.
handle(Req, State) ->
{Method, _ } = cowboy_req:me... |
aa6446b03d6538f916a16c0d2c26cd3b2d198d9e8f4eb4b3506b6bf75f036d79 | haskell-suite/haskell-names | Infix.hs | module Infix where
infixr 3 $$$
($$$) x y = x y
| null | https://raw.githubusercontent.com/haskell-suite/haskell-names/795d717541484dbe456342a510ac8e712e1f16e4/tests/annotations/Infix.hs | haskell | module Infix where
infixr 3 $$$
($$$) x y = x y
| |
02771076d8a13aa7cd29136b68f80e89e0db624c28f613584c862f252254bdb9 | zcaudate/hara | diff_test.clj | (ns hara.data.base.seq.diff-test
(:use hara.test)
(:require [hara.data.base.seq.diff :refer :all]))
^{:refer hara.data.base.seq.diff/diff :added "3.0"}
(fact "creates a diff of two sequences"
(diff [1 2 3 4 5]
[1 2 :a 4 5])
=> [2 [[:- 2 1] [:+ 2 [:a]]]]
(diff [1 2 3 4 5]
[1 :a 3 2 5])
=... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/data/base/seq/diff_test.clj | clojure | (ns hara.data.base.seq.diff-test
(:use hara.test)
(:require [hara.data.base.seq.diff :refer :all]))
^{:refer hara.data.base.seq.diff/diff :added "3.0"}
(fact "creates a diff of two sequences"
(diff [1 2 3 4 5]
[1 2 :a 4 5])
=> [2 [[:- 2 1] [:+ 2 [:a]]]]
(diff [1 2 3 4 5]
[1 :a 3 2 5])
=... | |
2df8e53a7faa02d65f457e0f017eb3fa7447d26a1602aa1ea37f187c32fae693 | luminus-framework/guestbook | layout.clj | (ns guestbook.layout
(:require [selmer.parser :as parser]
[selmer.filters :as filters]
[markdown.core :refer [md-to-html-string]]
[ring.util.http-response :refer [content-type ok]]
[ring.util.anti-forgery :refer [anti-forgery-field]]
[ring.middleware.anti-fo... | null | https://raw.githubusercontent.com/luminus-framework/guestbook/c0e4c05cd6b1a59602c7699266d11f56adbec197/src/clj/guestbook/layout.clj | clojure | (ns guestbook.layout
(:require [selmer.parser :as parser]
[selmer.filters :as filters]
[markdown.core :refer [md-to-html-string]]
[ring.util.http-response :refer [content-type ok]]
[ring.util.anti-forgery :refer [anti-forgery-field]]
[ring.middleware.anti-fo... | |
bb652d4c0892210bc50494ea4c588bbfa2df2b8dccd42dd1189edd185b97aa7f | blajzer/dib | Copy.hs | Copyright ( c ) 2010 - 2018
-- See LICENSE for license information.
| A trivial builder that copies a directory tree from one location to another .
module Dib.Builders.Copy (
makeCopyTarget
) where
import Dib.Gatherers
import Dib.Types
import qualified Data.Text as T
import qualified System.Console.ANSI as... | null | https://raw.githubusercontent.com/blajzer/dib/750253c972668bb0d849239f94b96050bae74f2a/src/Dib/Builders/Copy.hs | haskell | See LICENSE for license information.
| The 'makeCopyTarget' function makes a target that copies a directory tree.
It takes a name, a source directory, destination directory, and gather filter. | Copyright ( c ) 2010 - 2018
| A trivial builder that copies a directory tree from one location to another .
module Dib.Builders.Copy (
makeCopyTarget
) where
import Dib.Gatherers
import Dib.Types
import qualified Data.Text as T
import qualified System.Console.ANSI as ANSI
import qualified System.Directory ... |
c6cf9848e3a5959542de8eabc6e4157dd9777c929837320f17aea5b34c1f6ddf | lispnik/iup | teapot.lisp | (in-package #:iup-examples.teapot)
(defun teapot ()
(iup:with-iup ()
(iup-gl:open)
(let* ((canvas (iup-gl:canvas))
(dialog (iup:dialog
canvas
:title "IupGLCanvas"
:rastersize "800x600"
:margin "5x5"
:gap "5")))
(iup-gl:make-current canvas)
(gl:load-identity)
... | null | https://raw.githubusercontent.com/lispnik/iup/f8e5f090bae47bf8f91ac6fed41ec3bc01061186/examples/incomplete/teapot.lisp | lisp | (in-package #:iup-examples.teapot)
(defun teapot ()
(iup:with-iup ()
(iup-gl:open)
(let* ((canvas (iup-gl:canvas))
(dialog (iup:dialog
canvas
:title "IupGLCanvas"
:rastersize "800x600"
:margin "5x5"
:gap "5")))
(iup-gl:make-current canvas)
(gl:load-identity)
... | |
35f817fe22ada5e07d34ff8e8474d52752ad62e200b2c5043dd1fba31ca7c536 | jepsen-io/knossos | core.clj | (ns knossos.core
(:require [knossos.op :as op]
[knossos.competition :as competition]))
; For backwards compatibility
(def op op/op)
(def invoke-op op/invoke)
(def ok-op op/ok)
(def fail-op op/fail)
(def invoke? op/invoke?)
(def ok? op/ok?)
(def fail? op/fail?)
(defn analysis
"Alias f... | null | https://raw.githubusercontent.com/jepsen-io/knossos/1cb706f979c1712add47f0519d9e1dcb85635635/src/knossos/core.clj | clojure | For backwards compatibility | (ns knossos.core
(:require [knossos.op :as op]
[knossos.competition :as competition]))
(def op op/op)
(def invoke-op op/invoke)
(def ok-op op/ok)
(def fail-op op/fail)
(def invoke? op/invoke?)
(def ok? op/ok?)
(def fail? op/fail?)
(defn analysis
"Alias for competition/analysis"
([m... |
e25cc82013917e4338c1c87151eb7adc5be324d1cf95525c6e0b94a8b6addaef | emqx/mria | mria_rlog_tests.erl | -module(mria_rlog_tests).
-include_lib("proper/include/proper.hrl").
-include_lib("eunit/include/eunit.hrl").
shuffle_test() ->
?FORALL(L, list(),
?assertEqual(lists:sort(L), list:sort(mria_lib:shuffle(L)))).
| null | https://raw.githubusercontent.com/emqx/mria/de47b8177306c42d89d6a1cd89192cee72a50bfd/test/mria_rlog_tests.erl | erlang | -module(mria_rlog_tests).
-include_lib("proper/include/proper.hrl").
-include_lib("eunit/include/eunit.hrl").
shuffle_test() ->
?FORALL(L, list(),
?assertEqual(lists:sort(L), list:sort(mria_lib:shuffle(L)))).
| |
91698a33c7c025bbf7aba79991321d4fd854479345954f3918e96daaf8521d93 | rd--/hsc3 | s_get.help.hs | Sound.Sc3.Lang.Help.viewServerHelp "/s_get"
| null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Server/s_get.help.hs | haskell | Sound.Sc3.Lang.Help.viewServerHelp "/s_get"
| |
5481d2ae2f4b721df5bc54dd99c07e20f578ab046e85c5046e08352c2ee66ea6 | ghcjs/ghcjs | Main.hs |
From : < >
To : partain
Subject : A puzzle for you
Date : Mon , 28 Oct 91 17:02:19 GMT
I 'm struggling with the following code fragment at the moment :
From: Paul Sanders <>
To: partain
Subject: A puzzle for you
Date: Mon, 28 Oct 91 17:02:19 GMT
I'm struggling with the following code fragment at the mo... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/programs/sanders_array/Main.hs | haskell |
From : < >
To : partain
Subject : A puzzle for you
Date : Mon , 28 Oct 91 17:02:19 GMT
I 'm struggling with the following code fragment at the moment :
From: Paul Sanders <>
To: partain
Subject: A puzzle for you
Date: Mon, 28 Oct 91 17:02:19 GMT
I'm struggling with the following code fragment at the mo... | |
257915a98904631e8a9a3615a6c7e57e83c036c2bae13f0326b87a8cb2919690 | Eduap-com/WordMat | dprepji.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/odepack/src/dprepji.lisp | lisp | Compiled by f2cl version:
Using Lisp CMU Common Lisp snapshot-2013-11 (20E Unicode)
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 single-float)) | ( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl6.l , v 1d5cbacbb9... |
638b241d1a93f038319506838e91715ae44a3374c7e5c5f71eb569e5551a818b | ar-nelson/schemepunk | nieper-rbtree.scm | Copyright ( C ) ( 2016 ) . All Rights Reserved .
;; Permission is hereby granted, free of charge, to any person
;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
;; restriction, including without limitation the rights to use, copy,
... | null | https://raw.githubusercontent.com/ar-nelson/schemepunk/e2840d3c445933528aaf0a36ec72b053ec5016ce/tests/old-mapping/nieper-rbtree.scm | scheme | Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
furnished to do so, subject to the following conditions:
... | Copyright ( C ) ( 2016 ) . All Rights Reserved .
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY K... |
2fc2164a8b260c8207dcf426565182ea42bb96fa44102cb930f7eee4dd4fcb4b | bvaugon/ocapic | string.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/lib/string.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* String operations .
A string is an immutable data structure that contains a
fixed - length seq... |
cb21f8c2a89d9b96d2db4051f5a518df3a2ccb3633d09388ed300229c4519b37 | picnic/RelationExtraction | reltacs.ml | (****************************************************************************)
RelationExtraction - Extraction of inductive relations for Coq
(* *)
(* This program is free software: you can redistribute it and/or modify *)
it u... | null | https://raw.githubusercontent.com/picnic/RelationExtraction/a4cee37d0a8e5f0eff2e010e6305e037aa0d2564/reltacs.ml | ocaml | **************************************************************************
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
... | RelationExtraction - Extraction of inductive relations for Coq
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
Copyright 2... |
2526deb46b95936165bbc7e5b0cba0a98e107d8fa0f2466e53628238a92c5cb5 | alonsodomin/groot | Types.hs | {-# LANGUAGE OverloadedStrings #-}
module Test.Groot.Types
( describeTypes
) where
import Data.Attoparsec.Text
import Data.Either
import qualified Data.Text as T
import Data.Text.Arbitrary
import Network.AWS.Types
import Test.Hspec
import ... | null | https://raw.githubusercontent.com/alonsodomin/groot/040215db2797bef27b1c336ea826a58ddd45f8de/test/Test/Groot/Types.hs | haskell | # LANGUAGE OverloadedStrings #
Arbitrary instances |
module Test.Groot.Types
( describeTypes
) where
import Data.Attoparsec.Text
import Data.Either
import qualified Data.Text as T
import Data.Text.Arbitrary
import Network.AWS.Types
import Test.Hspec
import Test.QuickCheck
import ... |
c78daef1f6d0cc64027a518afb972a70a37965e74b56e8195c639b68329e643d | maitria/avi | t_install.clj | (ns avi.t-install
(:require [midje.sweet :refer :all]
[avi.install :refer :all]))
(def test-prefix "/foo")
(defn build-command
[os-name]
(last (install-commands test-prefix {"os.name" os-name,
"java.home" "/java-home/jre"})))
(facts "about installing avi"
(f... | null | https://raw.githubusercontent.com/maitria/avi/c641e9e32af4300ea7273a41e86b4f47d0f2c092/test/avi/t_install.clj | clojure | (ns avi.t-install
(:require [midje.sweet :refer :all]
[avi.install :refer :all]))
(def test-prefix "/foo")
(defn build-command
[os-name]
(last (install-commands test-prefix {"os.name" os-name,
"java.home" "/java-home/jre"})))
(facts "about installing avi"
(f... | |
92660cc7b9931f17d5498b4ff987c01e34a5ae4202d3c37602330609e0d44516 | craff/simple_httpd | echo.ml |
module S = Simple_httpd
module H = S.Headers
let now_ = Unix.gettimeofday
(* util: a little middleware collecting statistics *)
let filter_stat () : S.filter * (unit -> string) =
let n_req = ref 0 in
let total_time_ = ref 0. in
let parse_time_ = ref 0. in
let build_time_ = ref 0. in
let m req =
incr n... | null | https://raw.githubusercontent.com/craff/simple_httpd/d00b635120ae787c31b221f5c6a7a74b9204d924/examples/echo.ml | ocaml | util: a little middleware collecting statistics
say hello
compressed file access
echo request
file upload
stats
main page |
module S = Simple_httpd
module H = S.Headers
let now_ = Unix.gettimeofday
let filter_stat () : S.filter * (unit -> string) =
let n_req = ref 0 in
let total_time_ = ref 0. in
let parse_time_ = ref 0. in
let build_time_ = ref 0. in
let m req =
incr n_req;
let t1 = S.Request.start_time req in
let... |
bd8ad49a8c27c4c57745d5a5e9cf3867bce6e6ca5a89459d5350088ccbd32ddf | heidihoward/ocaml-raft | raftMonitorWrapper.ml | open Core_kernel.Std
exception SPLMonitorFailure of string
type s = RaftMonitor.s
type t = RaftMonitor.t * (s list)
let s_to_string = function
|`RestartElection -> "restart election"
|`Startup -> "startup"
|`StepDown_from_Candidate -> "stepdown candidate"
|`StepDown_from_Leader -> "stepdown leader"
|`Start... | null | https://raw.githubusercontent.com/heidihoward/ocaml-raft/b1502ebf8c19be28270d11994abac68e5a6418be/spl/raftMonitorWrapper.ml | ocaml | printf "%s \n" (s_to_string statecall); | open Core_kernel.Std
exception SPLMonitorFailure of string
type s = RaftMonitor.s
type t = RaftMonitor.t * (s list)
let s_to_string = function
|`RestartElection -> "restart election"
|`Startup -> "startup"
|`StepDown_from_Candidate -> "stepdown candidate"
|`StepDown_from_Leader -> "stepdown leader"
|`Start... |
e46cf8174f5ec33bc5e836fb38c907167d52dc5995060b39b29095e86669be45 | benoitc/sieve | sieve_example.erl | -module(sieve_example).
-export([start/0, proxy/1]).
proxy(_Data) ->
{remote, {"openbsd.org", 80}}.
start() ->
barrel:start(),
barrel:start_listener(http, 100, barrel_tcp,
[{port, 8080}], sieve_revproxy, [{proxy, {?MODULE, proxy}}]).
| null | https://raw.githubusercontent.com/benoitc/sieve/b64fdb44b336681e645cc0f73428c5ecfdb5e271/src/sieve_example.erl | erlang | -module(sieve_example).
-export([start/0, proxy/1]).
proxy(_Data) ->
{remote, {"openbsd.org", 80}}.
start() ->
barrel:start(),
barrel:start_listener(http, 100, barrel_tcp,
[{port, 8080}], sieve_revproxy, [{proxy, {?MODULE, proxy}}]).
| |
510e7275c3a4395ded33d7b143ecc30718639fb7ebe0399206e2ed9e491b5bd6 | saltysystems/overworld | ow_ecs.erl | -module(ow_ecs).
-behaviour(gen_server).
-define(SERVER(World),
{via, gproc, {n, l, {?MODULE, World}}}
).
%% API
-export([start/1, start_link/1, stop/1]).
-export([
new_entity/2,
rm_entity/2,
entity/2,
entities/1,
add_component/4,
add_components/3,
del_component/3,
del_components/... | null | https://raw.githubusercontent.com/saltysystems/overworld/c4f658f08f0a4e63a8d87ddff337a39fc8d0fcfe/src/ow_ecs.erl | erlang | API
gen_server callbacks
API
This can potentially create an unbounded number of atoms! Careful!
Create the component map
Add the ID
Multi-match. Try to match several components and return the common
TODO: ok -> true?
TODO: ok -> true?
gen_server callbacks
/%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... | -module(ow_ecs).
-behaviour(gen_server).
-define(SERVER(World),
{via, gproc, {n, l, {?MODULE, World}}}
).
-export([start/1, start_link/1, stop/1]).
-export([
new_entity/2,
rm_entity/2,
entity/2,
entities/1,
add_component/4,
add_components/3,
del_component/3,
del_components/3,
... |
bed060a9ff239a80875507109c181db54fc629374e2dc9d4f6c84c65a8e7360d | maybevoid/casimir | Lift.hs |
module Casimir.Base.Lift
( IdLift (..)
, Lift (..)
, LiftMonoid (..)
, MaybeLift (..)
, FreeLift (..)
, HigherLift (..)
, LiftFunctor (..)
)
where
import Data.Kind
import Data.Functor.Identity
import Casimir.Base.Effect
import Casimir.Base.ContraLift
class LiftFunctor
(lift1 :: (Type -> Type) -> (... | null | https://raw.githubusercontent.com/maybevoid/casimir/ebbfa403739d6f258e6ac6793549006a0e8bff42/casimir/src/lib/Casimir/Base/Lift.hs | haskell | # OVERLAPPABLE # |
module Casimir.Base.Lift
( IdLift (..)
, Lift (..)
, LiftMonoid (..)
, MaybeLift (..)
, FreeLift (..)
, HigherLift (..)
, LiftFunctor (..)
)
where
import Data.Kind
import Data.Functor.Identity
import Casimir.Base.Effect
import Casimir.Base.ContraLift
class LiftFunctor
(lift1 :: (Type -> Type) -> (... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.