_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 |
|---|---|---|---|---|---|---|---|---|
ba162dd5c219790b009278beb6d91e956f1eb4528d7176b397c076e567e943a9 | jfeser/castor | project.mli | open Core
open Ast
val project_once :
params:Set.M(Name).t -> < refs : bool Map.M(Name).t ; .. > annot -> < > annot
val project :
params:Set.M(Name).t -> ?max_iters:int -> < .. > annot -> < > annot
| null | https://raw.githubusercontent.com/jfeser/castor/39005df41a094fee816e85c4c673bfdb223139f7/lib/project.mli | ocaml | open Core
open Ast
val project_once :
params:Set.M(Name).t -> < refs : bool Map.M(Name).t ; .. > annot -> < > annot
val project :
params:Set.M(Name).t -> ?max_iters:int -> < .. > annot -> < > annot
| |
3d3c1641edc22bf54f2f6190453d50205495d0f6eb7837087cebfc95a00de946 | NorfairKing/intray | OptParse.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
module Intray.Web.Server.OptParse
( getSettings,
Settings (..),
)
where
import Autodocodec.Yaml
import Control.Arrow
import Control.Monad.Logger
import qualified Data.Text as T
import qualified Env
import Import
impo... | null | https://raw.githubusercontent.com/NorfairKing/intray/2e6864fba2a21947a4da560b7186a4889f7db773/intray-web-server/src/Intray/Web/Server/OptParse.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
module Intray.Web.Server.OptParse
( getSettings,
Settings (..),
)
where
import Autodocodec.Yaml
import Control.Arrow
import Control.Monad.Logger
import qualified Data.Text as T
import qualified Env
import Import
import Intray.Web.Server.OptParse.Types... |
30bc38e6caaa9419c0a224f370c8eff63de4b5c7490305e6a00222ff2e5b4af9 | mattmundell/nightshade | char.lisp | ;;; The x86 VM definition of character operations.
(in-package "X86")
;;;; Moves and coercions.
;;; Move a tagged char to an untagged representation.
;;;
(define-vop (move-to-base-char)
(:args (x :scs (any-reg control-stack) :target al))
(:temporary (:sc byte-reg :offset al-offset
:from (:argument 0) :to ... | null | https://raw.githubusercontent.com/mattmundell/nightshade/d8abd7bd3424b95b70bed599e0cfe033e15299e0/src/compiler/x86/char.lisp | lisp | The x86 VM definition of character operations.
Moves and coercions.
Move a tagged char to an untagged representation.
Move an untagged char to a tagged representation.
maybe move char byte
#x86 to type bits
remove any junk bits
Move untagged base-char values.
Move untagged base-char arguments/return-valu... |
(in-package "X86")
(define-vop (move-to-base-char)
(:args (x :scs (any-reg control-stack) :target al))
(:temporary (:sc byte-reg :offset al-offset
:from (:argument 0) :to (:eval 0)) al)
(:ignore al)
(:temporary (:sc byte-reg :offset ah-offset :target y
:from (:argument 0) :to (:result 0)) ah)
(... |
8be81d3b49f7746cb5d2b5fefb3effb671ae10cb7dc7818ade4a042178f35948 | florence/cover | main.rkt | #lang racket/base
(require "cover.rkt" "format.rkt" "private/contracts.rkt" "private/format-utils.rkt"
"private/raw.rkt" racket/contract)
(define (not-impersonated/c c)
(and/c (lambda (v) (not (impersonator? v)))
c))
(provide
(contract-out
[coverage/c contract?]
[test-files! (->* () (#:submo... | null | https://raw.githubusercontent.com/florence/cover/bc17e4e22d47b1da91ddaa5eafefe28f4675e85c/cover-lib/cover/main.rkt | racket | #lang racket/base
(require "cover.rkt" "format.rkt" "private/contracts.rkt" "private/format-utils.rkt"
"private/raw.rkt" racket/contract)
(define (not-impersonated/c c)
(and/c (lambda (v) (not (impersonator? v)))
c))
(provide
(contract-out
[coverage/c contract?]
[test-files! (->* () (#:submo... | |
dd19912eca96518b1322fa261e67d0b8eaa71745891cb2beb220a16f9acda9ab | ih/ikarus.dev | nbody.scm | This benchmark was obtained from .
970215 / wdc Changed { box , unbox , set - box ! } to { list , car , set - car ! } ,
flushed # % prefixes , defined void ,
; and added nbody-benchmark.
; 981116 / wdc Replaced nbody-benchmark by main, added apply:+.
(define void
(let ((invisible (s... | null | https://raw.githubusercontent.com/ih/ikarus.dev/8bb0c8e4d1122cf0f9aeb675cb51bc7df178959b/benchmarks.larceny/src/nbody.scm | scheme | and added nbody-benchmark.
981116 / wdc Replaced nbody-benchmark by main, added apply:+.
code is slightly broken...
minimal standard random number generator
return a random number in the interval [0,n)
change this to desired precision
measured in order of expansions calculated
======================... | This benchmark was obtained from .
970215 / wdc Changed { box , unbox , set - box ! } to { list , car , set - car ! } ,
flushed # % prefixes , defined void ,
(define void
(let ((invisible (string->symbol "")))
(lambda () invisible)))
(define (apply:+ xs)
(do ((result 0.0 (FLOAT+ result (c... |
caa62a568fab25cd749182904cb7db57c004323283021f8877e87a49f215004a | commsor/titanoboa | cache.clj | Copyright ( c ) Commsor Inc. All rights reserved .
; The use and distribution terms for this software are covered by the
; GNU Affero General Public License v3.0 (/#AGPL)
; which can be found in the LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; th... | null | https://raw.githubusercontent.com/commsor/titanoboa/ffe3e1e58f89169092d7b6a3a45e1707a0ecc9ee/src/clj/titanoboa/cache.clj | clojure | The use and distribution terms for this software are covered by the
GNU Affero General Public License v3.0 (/#AGPL)
which can be found in the LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice,... | Copyright ( c ) Commsor Inc. All rights reserved .
(ns titanoboa.cache
(:require [com.stuartsierra.component :as component]
[clojure.tools.logging :as log]))
TODO do nt use separate eviction - agent - just use metadata to mark jobs for eviction in the job - cache - agent - > this will eliminate the race conditi... |
b410f65fba7c10535bdc4400f62c021c70e8bf8ffbdc94e2a3f5bb529cb71585 | mishadoff/project-euler | problem013.clj | (ns project-euler.problem013)
Elapsed time : 24.427424 msecs
(defn euler-013 []
(read-string
(apply str (take 10 (str (reduce + (map bigint (re-seq #"\w+" (slurp "res/problem013.txt"))))))))) | null | https://raw.githubusercontent.com/mishadoff/project-euler/45642adf29626d3752227c5a342886b33c70b337/src/project_euler/problem013.clj | clojure | (ns project-euler.problem013)
Elapsed time : 24.427424 msecs
(defn euler-013 []
(read-string
(apply str (take 10 (str (reduce + (map bigint (re-seq #"\w+" (slurp "res/problem013.txt"))))))))) | |
3ca23ad37f0c46e6e08cc876d7de33c4210fa44b538fab06a8f886fdf96e2adf | complyue/hadui | HaduiMonad.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE BlockArguments #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleContexts #
# LANGUAGE ExistentialQuantification #
# LANGUAGE MultiParam... | null | https://raw.githubusercontent.com/complyue/hadui/de221a453f32e02c50de52daf936b694267282c2/hadui/src/HaduiMonad.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE BangPatterns #
| Hadui runtime
This very explicitly hints the expected monad type in the dynamic
compilation of such statements.
force it to be evaluated
| root directory of the stack project of matter
| configuration loaded from `hadui.yaml` at p... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE BlockArguments #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleContexts #
# LANGUAGE ExistentialQuantification #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeFam... |
39c71fef0ba8dedbe70ecf9a844d6b2e51a5c1d069cc85e374d676ee54c9b686 | ghc/packages-Cabal | App.hs | module App where
import Database.MySQL
import Database.PostgreSQL
import qualified Mine.MySQL
import qualified Mine.PostgreSQL
app = Mine.MySQL.mine ++ " " ++ Mine.PostgreSQL.mine
| null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/Backpack/Includes2/src/App.hs | haskell | module App where
import Database.MySQL
import Database.PostgreSQL
import qualified Mine.MySQL
import qualified Mine.PostgreSQL
app = Mine.MySQL.mine ++ " " ++ Mine.PostgreSQL.mine
| |
cacc9655b517818b480fd5e5bbb3d71c90c9e815bd56b97881c2299e3a25d999 | vlstill/hsExprTest | simple-1.nok.hs | f = False
| null | https://raw.githubusercontent.com/vlstill/hsExprTest/391fc823c1684ec248ac8f76412fefeffb791865/test/simple-1.nok.hs | haskell | f = False
| |
d410affa330d3e9ed9c8ec3f8a9bb332b92fe26c2d1e858a97c40d0c3816194c | ocaml-flambda/flambda-backend | parseflambda.ml | open Import
let get_global_info = Flambda2.get_global_info
let check_invariants program =
try () (* Flambda_unit.invariant program *)
with exn ->
Format.eprintf "Program which failed invariant check:@ %a\n%!"
Flambda_unit.print program;
raise exn
let parse_flambda filename =
match Parse_flambda.p... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/3bdcccae8391bb86e54d8116521e5fbe28e97d48/middle_end/flambda2/tests/tools/parseflambda.ml | ocaml | Flambda_unit.invariant program | open Import
let get_global_info = Flambda2.get_global_info
let check_invariants program =
with exn ->
Format.eprintf "Program which failed invariant check:@ %a\n%!"
Flambda_unit.print program;
raise exn
let parse_flambda filename =
match Parse_flambda.parse_fexpr filename with
| Ok unit ->
le... |
7bdfc328037e38cc5dabe8c3ce9effa8f1b9eb699149eb9e75f1b2a3c6a6f169 | c4-project/c4f | input.ml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/plumbing/src/input.ml | ocaml | overrides to lift options into optional arguments | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
3b4121c59ca8a82f065f31d5335f50b13a4d8ea6586646fb05166b2d7194d1bb | hyperfiddle/electric | analyzer.clj | (ns hyperfiddle.electric.impl.analyzer
"Utilities to analyze and transform Clojure/Script code (not Electric code).
Use case: support `clojure.core/fn` in an Electric program.
Long term goal is to build a unified Clojure/Script code walker and get rid of tools.analyzer deps."
(:require [clojure.tools.analyzer.p... | null | https://raw.githubusercontent.com/hyperfiddle/electric/398158cb49ec1c459927e9d6719b9ea16685b21f/src/hyperfiddle/electric/impl/analyzer.clj | clojure | Adapted from leonoel/injure
:binding ; Handled in let and fn
:case-node ; Handled in :case
:case-test
:case-then
:fn-method ; Handled in fn
:no-op ; Unknown use case
Wo n’t be supported
:ns
:ns* | (ns hyperfiddle.electric.impl.analyzer
"Utilities to analyze and transform Clojure/Script code (not Electric code).
Use case: support `clojure.core/fn` in an Electric program.
Long term goal is to build a unified Clojure/Script code walker and get rid of tools.analyzer deps."
(:require [clojure.tools.analyzer.p... |
ec056e7e3130d345b6c1d2b43503ef827df344f06c42ecc5457afd275b789ba1 | sneeuwballen/zipperposition | testMultiset.ml |
open Logtk
module Q = QCheck
module M = Multiset.Make(struct
type t = int
let compare i j=Pervasives.compare i j
end)
(* for testing *)
let m_test = Alcotest.testable (M.pp Fmt.int) M.equal
let z_test = Alcotest.testable Z.pp_print Z.equal
let f x y =
if x = y then Comparison.Eq
else if x < y then Lt
else... | null | https://raw.githubusercontent.com/sneeuwballen/zipperposition/4a3290cbc9a9ca0d8bd46f5db709a9e866920312/tests/testMultiset.ml | ocaml | for testing
"naive" comparison function (using the general ordering on multisets)
partial order for tests
ignore |
open Logtk
module Q = QCheck
module M = Multiset.Make(struct
type t = int
let compare i j=Pervasives.compare i j
end)
let m_test = Alcotest.testable (M.pp Fmt.int) M.equal
let z_test = Alcotest.testable Z.pp_print Z.equal
let f x y =
if x = y then Comparison.Eq
else if x < y then Lt
else Gt
let test_max ... |
c6bef44debc0e35b41462f8bc9646b12a379dfb7df8b83c73aa159ef1cc46d56 | alanz/ghc-exactprint | Undefined10.hs |
Copyright 2013 - 2015
License : BSD3 ( see BSD3-LICENSE.txt file )
Copyright 2013-2015 Mario Blazevic
License: BSD3 (see BSD3-LICENSE.txt file)
-}
| This module defines the ' FactorialMonoid ' class and some of its instances .
--
{-# LANGUAGE Haskell2010, Trustworthy #-}
module Data.Monoi... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc710/Undefined10.hs | haskell |
# LANGUAGE Haskell2010, Trustworthy #
* Classes
* Monad function equivalents
| Class of monoids that can be split into irreducible (/i.e./, atomic or prime) 'factors' in a unique way. Factors of
a 'Product' are literally its prime factors:
The methods of this class satisfy the following laws:
> mconcat . fa... |
Copyright 2013 - 2015
License : BSD3 ( see BSD3-LICENSE.txt file )
Copyright 2013-2015 Mario Blazevic
License: BSD3 (see BSD3-LICENSE.txt file)
-}
| This module defines the ' FactorialMonoid ' class and some of its instances .
module Data.Monoid.Factorial (
FactorialMonoid(..), StableF... |
5d5c765d7cab7e8d589b8f75446a3629a1f6b880531d0d14fb0773d2a13fb9a8 | foreverbell/project-euler-solutions | 216.hs | import Common.Numbers.Primes (primesTo)
import Common.Numbers.Numbers (tonelliShanks)
import Common.Utils (isqrt)
import Control.Monad (forM_)
import Data.Maybe (fromJust)
import qualified Data.Vector.Unboxed as V
import qualified Data.Vector.Unboxed.Mutable as MV
solve :: Int -> Int
solve n = length $ filter id vs
... | null | https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/216.hs | haskell | import Common.Numbers.Primes (primesTo)
import Common.Numbers.Numbers (tonelliShanks)
import Common.Utils (isqrt)
import Control.Monad (forM_)
import Data.Maybe (fromJust)
import qualified Data.Vector.Unboxed as V
import qualified Data.Vector.Unboxed.Mutable as MV
solve :: Int -> Int
solve n = length $ filter id vs
... | |
fb3dbe956ab6bfaac87579d5547352813fcebee4c16181891eb1ca9e2a97b2bd | BillHallahan/G2 | TestZeno.hs | {-# LANGUAGE BangPatterns #-}
module Zeno where
import Prelude
( Eq
, Ord
, Show
, iterate
, (!!)
, fmap
, Bool(..)
, div
, return
, (.)
, (||)
, (==)
, ($)
)
-- code here adapted from HipSpec.hs
infix 1 =:=
infixr 0 ==>
-- simplification to remove Prop type
given :: Bool -> Bool -> B... | null | https://raw.githubusercontent.com/BillHallahan/G2/8b2a2be28ec9b8ccbce9a0da137d4da99001eeab/tests/RewriteVerify/Correct/TestZeno.hs | haskell | # LANGUAGE BangPatterns #
code here adapted from HipSpec.hs
simplification to remove Prop type
everything here mainly copied from HipSpec, with some simplifications
Boolean functions
Natural numbers
List functions
prop_46 xs
= (zip [] xs =:= [])
ys
prop_46 :: Eq b => [b] -> Bool
the theorems that don't fit... |
module Zeno where
import Prelude
( Eq
, Ord
, Show
, iterate
, (!!)
, fmap
, Bool(..)
, div
, return
, (.)
, (||)
, (==)
, ($)
)
infix 1 =:=
infixr 0 ==>
given :: Bool -> Bool -> Bool
given pb pa = (not pb) || pa
givenBool :: Bool -> Bool -> Bool
givenBool = given
(==>) :: Bool -> B... |
d6091c06d3bde7031b0058e369532c87d77ede536d970c9db0bc7608bad2af71 | jsthomas/tidy_email | tidy_email_sendgrid.mli | type config = {
* An alphanumeric string found on the console .
base_url : string; (** e.g. *)
}
type http_post =
?body:Cohttp_lwt.Body.t ->
?headers:Cohttp.Header.t ->
Uri.t ->
(Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t
val backend :
?client:http_post -> config -> Tidy_email.Email.t -> (unit, string... | null | https://raw.githubusercontent.com/jsthomas/tidy_email/7ead0e446c2f22808332964870fc2356deb9c8bb/sendgrid/src/tidy_email_sendgrid.mli | ocaml | * e.g. | type config = {
* An alphanumeric string found on the console .
}
type http_post =
?body:Cohttp_lwt.Body.t ->
?headers:Cohttp.Header.t ->
Uri.t ->
(Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t
val backend :
?client:http_post -> config -> Tidy_email.Email.t -> (unit, string) Lwt_result.t
* If the underlying... |
2ff955107a75d651665f112e5f23fdee0f63aa4d76c5354596690330650eedbc | janestreet/universe | msgpack.ml | open Base
module Message = Message
module Internal = struct
module Parser = Parser
module Serializer = Serializer
end
module Custom = struct
type t = Message.custom =
{ type_id : int
; data : Bytes.t
}
[@@deriving sexp, equal]
end
type t = Message.t =
| Nil
| Integer of int
| Int64 of Int64... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/vcaml/msgpack/src/msgpack.ml | ocaml | open Base
module Message = Message
module Internal = struct
module Parser = Parser
module Serializer = Serializer
end
module Custom = struct
type t = Message.custom =
{ type_id : int
; data : Bytes.t
}
[@@deriving sexp, equal]
end
type t = Message.t =
| Nil
| Integer of int
| Int64 of Int64... | |
c77337dd8356a0a926132114739ae11f9605eb3a8107f108b81150dd7262c8e9 | philnguyen/soft-contract | quick-sample.rkt | #lang racket/base
(provide quick-sample)
;; -----------------------------------------------------------------------------
(require
require-typed-check
racket/file
)
(require (only-in "quads.rkt"
( - > * ( QuadAttrs ) # : rest USQ Quad ) )
block-break ;(-> QuadAttrs Quad))
( - > * ( QuadAttrs ) # : rest USQ Qua... | null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/gradual-typing-benchmarks/quadBG/quick-sample.rkt | racket | -----------------------------------------------------------------------------
(-> QuadAttrs Quad))
(-> Quad))
(-> Quad))
(-> QuadAttrs String Quad))
============================================================================= | #lang racket/base
(provide quick-sample)
(require
require-typed-check
racket/file
)
(require (only-in "quads.rkt"
( - > * ( QuadAttrs ) # : rest USQ Quad ) )
( - > * ( QuadAttrs ) # : rest USQ Quad ) )
))
(define (quick-sample)
(block '((measure . 240.0) (font . "Times New Roman") (leading . 16.0) (vmeasure ... |
8cbb2dda4b686e68a4a919986566aa8164707afa17de03b673db7dcc73f4e6f2 | mpickering/apply-refact | Import6.hs | import A; import A hiding (C) | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Import6.hs | haskell | import A; import A hiding (C) | |
125937f857c5bed0abd195c8fe812945c51bf0f46e22bb8284359901bbab4357 | cs340ppp/lectures | Lect05Spec.hs | module Lect05Spec (spec) where
import Test.Hspec
import Test.HUnit
import Test.HUnit.Approx
import Test.QuickCheck
import Control.Exception
import Lect05 (c2k, c2f, f2c, mySum, quadRoots)
import Test.Hspec.QuickCheck (prop)
spec :: Spec
spec = describe "Lect05" $ do
describe "Celsius conversions" $ do
describe... | null | https://raw.githubusercontent.com/cs340ppp/lectures/acdf855cea9b0344b07919803eadf82c9a2964de/test/Lect05Spec.hs | haskell | module Lect05Spec (spec) where
import Test.Hspec
import Test.HUnit
import Test.HUnit.Approx
import Test.QuickCheck
import Control.Exception
import Lect05 (c2k, c2f, f2c, mySum, quadRoots)
import Test.Hspec.QuickCheck (prop)
spec :: Spec
spec = describe "Lect05" $ do
describe "Celsius conversions" $ do
describe... | |
7ecd83df5eda0ff9621a0645e844e2da95335cd655a9aed1d41fb2e5b0950a07 | atlas-engineer/cl-readability | package.lisp | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(defpackage #:readability
(:use #:cl)
(:import-from #:serapeum #:export-always))
| null | https://raw.githubusercontent.com/atlas-engineer/cl-readability/6a5ff00618aea0ea0ae29aacfbbb1ed8202c20ed/package.lisp | lisp | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(defpackage #:readability
(:use #:cl)
(:import-from #:serapeum #:export-always))
| |
a3e556433125572786d69610feb2292fecc83aefb3cffa02302c0752d3d4d7de | finkel-lang/finkel | sige.hs | (42 :: Int) -- Haskell
| null | https://raw.githubusercontent.com/finkel-lang/finkel/c3c7729d5228bd7e0cf76e8ff05fe2f79a0ec0a2/doc/include/language-syntax/expr/sige.hs | haskell | Haskell | |
c5fd3b74d1fc91069c4d2db4cfff6d44a9421ffe2871d2c77c16c34c8d1dd7af | facebook/duckling | Tests.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
module Duckling.Numeral.AR.Tests
( tests ) where
import Prelude
import Data.String
import Test.Tasty
imp... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/tests/Duckling/Numeral/AR/Tests.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Numeral.AR.Tests
( tests ) where
import Prelude
import Data.String
import Test.Tasty
import Duckling.Dimensions.Types
import Duckling.Locale
import Duckling.Numeral.AR.Corpus
import Duckling.Testing.Asserts
import Duckling.Testing.Types hiding (ex... |
8532ef3857f40195792255c24d5f4a3621432e6d1a1cd514412b7a8821f63087 | lambdacube3d/lambdacube-edsl | ParseTrifecta.hs | # LANGUAGE GeneralizedNewtypeDeriving #
import Data.ByteString.Char8 (unpack,pack)
import qualified Data.ByteString.Char8 as BS
import Text.PrettyPrint.ANSI.Leijen (pretty)
import Data.Monoid
import Control.Applicative
import Text.Trifecta
import Text.Trifecta.Indentation as I
import Text.Trifecta.Delta
import Text.Pa... | null | https://raw.githubusercontent.com/lambdacube3d/lambdacube-edsl/4347bb0ed344e71c0333136cf2e162aec5941df7/typesystem/ParseTrifecta.hs | haskell | WORKS
let r = render s
print $ pretty r | # LANGUAGE GeneralizedNewtypeDeriving #
import Data.ByteString.Char8 (unpack,pack)
import qualified Data.ByteString.Char8 as BS
import Text.PrettyPrint.ANSI.Leijen (pretty)
import Data.Monoid
import Control.Applicative
import Text.Trifecta
import Text.Trifecta.Indentation as I
import Text.Trifecta.Delta
import Text.Pa... |
6f09e82716020b70c2fd1ce16c821f367aa175aa7477e47a61c1664da8574412 | KeepSafe/measure | ring_test.clj | Copyright 2014 KeepSafe Software , Inc
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software
dis... | null | https://raw.githubusercontent.com/KeepSafe/measure/88fa7dfd572493034c6bc5bdb3a4ede1ad33e2aa/test/measure/ring_test.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2014 KeepSafe Software , Inc
distributed under the License is distributed on an " AS IS " BASIS ,
(ns measure.ring-test
(:require [clojure.test :refer :all]
[measure.core :as m]
[measure.ring :refer :all]))
(deftest status-meters
(testing "Creating a handler registers status ... |
bd5f735b3af455ed8d049cc9b23f2fc62d40afe820f926bbd13a559a5efac42a | MastodonC/kixi.hecuba | test_runner.cljs | (ns test-runner
(:require [cljs.test :refer-macros [run-tests]]
[kixi.hecuba.profiles.form-test]
[kixi.hecuba.tabs.hierarchy.profiles-test]))
(enable-console-print!)
(defn runner []
(println "Runner starts")
(if (cljs.test/successful?
(run-tests
'kixi.hecuba.profiles.for... | null | https://raw.githubusercontent.com/MastodonC/kixi.hecuba/467400bbe670e74420a2711f7d49e869ab2b3e21/test/cljs/test_runner.cljs | clojure | (ns test-runner
(:require [cljs.test :refer-macros [run-tests]]
[kixi.hecuba.profiles.form-test]
[kixi.hecuba.tabs.hierarchy.profiles-test]))
(enable-console-print!)
(defn runner []
(println "Runner starts")
(if (cljs.test/successful?
(run-tests
'kixi.hecuba.profiles.for... | |
b5854d21e576756c20e5510a3faa9592ad5a8c672c14ad3c575b5be0eed8d22e | bellkev/dacom | db.clj | Copyright ( c ) 2014 . All rights reserved .
See the file license.txt for copying permission .
(ns dacom.db
"-of-datomic/blob/master/src/datomic/samples/io.clj
and
-of-datomic/blob/master/src/datomic/samples/schema.clj"
(:require [datomic.api :as d :refer [db q]]
[clojure.java.io :as io... | null | https://raw.githubusercontent.com/bellkev/dacom/f4bc93b0b9899a8db3475ef7c2d2ff628f6b8818/utils/src/dacom/db.clj | clojure | ===============================================================================
io utils
===============================================================================
===============================================================================
schema utils
========================================================... | Copyright ( c ) 2014 . All rights reserved .
See the file license.txt for copying permission .
(ns dacom.db
"-of-datomic/blob/master/src/datomic/samples/io.clj
and
-of-datomic/blob/master/src/datomic/samples/schema.clj"
(:require [datomic.api :as d :refer [db q]]
[clojure.java.io :as io... |
f634ef32610c18bd8338dd3ad400d1a0a3bbc754d20bd550d1f3248681e2c172 | coot/ghc-tags-plugin | Main.hs | {-# LANGUAGE RankNTypes #-}
{-# OPTIONS -Wno-orphans #-}
module Main (main) where
import Control.Exception
import Control.DeepSeq
import Control.Monad.State.Strict
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import qualified Data.ByteStri... | null | https://raw.githubusercontent.com/coot/ghc-tags-plugin/9e3005b676e03c6102c29fd6e8539d4053571e53/ghc-tags-test/bench/Main.hs | haskell | # LANGUAGE RankNTypes #
# OPTIONS -Wno-orphans #
gags pipe |
module Main (main) where
import Control.Exception
import Control.DeepSeq
import Control.Monad.State.Strict
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BSL
import qualified Data.ByteString.Builder... |
157fbe5a42974f44969cbf1e58a0bc01b33a635cfcb513741f17e6057505e7de | dmvianna/haskellbook | Ch24-ini.hs | # LANGUAGE OverloadedStrings , QuasiQuotes #
module Data.Ini where
import Control.Applicative
import Data.ByteString hiding (foldr)
import Data.Char (isAlpha)
import Data.Map (Map)
import qualified Data.Map as M
import Data.Text (Text)
import qualified Data.Text.IO as TIO
import Test.Hspec
import Text.RawString.QQ
im... | null | https://raw.githubusercontent.com/dmvianna/haskellbook/b1fdce66283ccf3e740db0bb1ad9730a7669d1fc/src/Ch24-ini.hs | haskell | "[blah]" -> Section "blah"
these operators mean the brackets will be
parsed and then discarded
important!
/ Skip end of line and whitespace beyond.
/ Skip comments starting at the beginning of the line. | # LANGUAGE OverloadedStrings , QuasiQuotes #
module Data.Ini where
import Control.Applicative
import Data.ByteString hiding (foldr)
import Data.Char (isAlpha)
import Data.Map (Map)
import qualified Data.Map as M
import Data.Text (Text)
import qualified Data.Text.IO as TIO
import Test.Hspec
import Text.RawString.QQ
im... |
de79885ba92741156ea036b05ade600590dce08239c8656ec0880f921a544333 | leanprover/tc | Name.hs | |
Module : . Name
Description : Hierarchical names
Copyright : ( c ) , 2016
License : GPL-3
Maintainer :
API for hierarchical names
Module : Kernel.Name
Description : Hierarchical names
Copyright : (c) Daniel Selsam, 2016
License : GPL-3
Maintainer :
API for hierarchical... | null | https://raw.githubusercontent.com/leanprover/tc/250a568346f29ae27190fccee169ba10002c7399/src/Kernel/Name.hs | haskell | |
Module : . Name
Description : Hierarchical names
Copyright : ( c ) , 2016
License : GPL-3
Maintainer :
API for hierarchical names
Module : Kernel.Name
Description : Hierarchical names
Copyright : (c) Daniel Selsam, 2016
License : GPL-3
Maintainer :
API for hierarchical... | |
b97cc2572b040416173fc2ebb32b00cee0f669fa70964c9193a6d394152318d1 | Verites/verigraph | TypedGraph.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
| Basic building blocks for writing graphs with the Dot syntax .
This contains only the basic building blocks of to Dot syntax ,
and it does _ _ not _ _ provide conventions to print particular
kinds of graphs .
This contains only the basic bui... | null | https://raw.githubusercontent.com/Verites/verigraph/754ec08bf4a55ea7402d8cd0705e58b1d2c9cd67/src/library/Image/Dot/TypedGraph.hs | haskell | # LANGUAGE OverloadedStrings #
TODO: move this to XML parsing module
| Create a dotfile representation of the given typed graph, labeling nodes with their types
| Create a dotfile representation of the given typed graph morphism
| Create a dotfile representation of the given graph rule | # LANGUAGE FlexibleContexts #
| Basic building blocks for writing graphs with the Dot syntax .
This contains only the basic building blocks of to Dot syntax ,
and it does _ _ not _ _ provide conventions to print particular
kinds of graphs .
This contains only the basic building blocks of to Dot syntax,
and ... |
23f265fc4e4c0f299e2d36681988fbe4be6bfa0427aad0848efdb79d0663efb1 | backtracking/functory | test.ml | (**************************************************************************)
(* *)
(* Functory: a distributed computing library for OCaml *)
Copyright ( C ) 2010- and
(* ... | null | https://raw.githubusercontent.com/backtracking/functory/75368305a853a90ebea9e306d82e4ef32649d1ce/test.ml | ocaml | ************************************************************************
Functory: a distributed computing library for OCaml
This software is free soft... | Copyright ( C ) 2010- and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
open Format
let () =
Arg.parse
["-d", Arg.Unit (fun () -> Functory.Control.set_debug true),
"sets the debug flag";]
(... |
aed95942261db22d839a1f7abf797364f390693cf58077316d3c21b2272d1ee6 | schell/editor | Shape.hs | # LANGUAGE OverloadedStrings , TemplateHaskell #
module Graphics.Rendering.Shader.Shape (
module T,
makeShapeShaderProgram,
bindAndBufferVertsUVs,
bindAndBufferVertsColors
) where
import Graphics.Utils
import Graphics.Rendering.Shader.Utils
import Graphics.Rendering.Shader... | null | https://raw.githubusercontent.com/schell/editor/0f0d2eb67df19e8285c6aaeeeca96bff3110f68d/src/Graphics/Rendering/Shader/Shape.hs | haskell | | Compiles, validates and returns a shader for rendering text with.
| Updates the shader to accept either uv coords if textured or color
values if not. Assumes a shape shader program is set as the current
program.
| GLSL Source code for a shape vertex shader.
| GLSL Source code for a shape fragment shader.
| Ver... | # LANGUAGE OverloadedStrings , TemplateHaskell #
module Graphics.Rendering.Shader.Shape (
module T,
makeShapeShaderProgram,
bindAndBufferVertsUVs,
bindAndBufferVertsColors
) where
import Graphics.Utils
import Graphics.Rendering.Shader.Utils
import Graphics.Rendering.Shader... |
262efe743680e201c8de7d822aeb75acd68d59358ebd54e6c5288bc22234d833 | mflatt/profj | parsers.scm | (module parsers scheme/base
(require "parser-units.scm"
scheme/unit
(only-in (lib "combinator-unit.ss" "combinator-parser") err^))
(provide parse-beginner parse-intermediate parse-intermediate+access parse-advanced
parse-beginner-interact parse-intermediate-interact parse-advance... | null | https://raw.githubusercontent.com/mflatt/profj/cf2a5bd0c3243b4dd3a72093ae5eee8e8291a41d/profj/comb-parsers/parsers.scm | scheme | (module parsers scheme/base
(require "parser-units.scm"
scheme/unit
(only-in (lib "combinator-unit.ss" "combinator-parser") err^))
(provide parse-beginner parse-intermediate parse-intermediate+access parse-advanced
parse-beginner-interact parse-intermediate-interact parse-advance... | |
caa2ebba0376aa56d48a2b73db5201dd06d031b892802f6333f54b7ef4548508 | amperity/envoy | core.clj | (ns envoy.core
"Core environment handling namespace."
(:require
[clojure.tools.logging :as log]
[environ.core :as environ]
[envoy.check :as check :refer [behave!]]
[envoy.types :as types]))
(def known-vars
"Map of environment keywords to a definition map which may contain a
`:description` and ... | null | https://raw.githubusercontent.com/amperity/envoy/898ff9262b7a7bff9d666041974b97986faee471/src/envoy/core.clj | clojure | Check existing variables.
Update schema map.
Check for previous declarations.
Check property schemas.
Update known variables map.
Update access counter.
Look up variable definition.
Parse the string value with custom parser or for known types.
Check if the var has missing behavior.
No definition found for key... | (ns envoy.core
"Core environment handling namespace."
(:require
[clojure.tools.logging :as log]
[environ.core :as environ]
[envoy.check :as check :refer [behave!]]
[envoy.types :as types]))
(def known-vars
"Map of environment keywords to a definition map which may contain a
`:description` and ... |
fe10f09cd524e743986231cd2ad897eee05d6bddda5b31e8fa19bcad3eeb5c7b | acowley/Frames | UncurryFoldNoHeader.hs | # LANGUAGE DataKinds , FlexibleContexts , QuasiQuotes , TemplateHaskell , TypeApplications #
module UncurryFoldNoHeader where
import qualified Control.Foldl as L
import Data.Vinyl.Curry ( runcurryX )
import Frames
import Frames.TH ( rowGen... | null | https://raw.githubusercontent.com/acowley/Frames/aeca953fe608de38d827b8a078ebf2d329edae04/test/UncurryFoldNoHeader.hs | haskell | | Compute the ratio of money to respect for a record containing
only those fields. | # LANGUAGE DataKinds , FlexibleContexts , QuasiQuotes , TemplateHaskell , TypeApplications #
module UncurryFoldNoHeader where
import qualified Control.Foldl as L
import Data.Vinyl.Curry ( runcurryX )
import Frames
import Frames.TH ( rowGen... |
8f7d58ead2ffa786bc7d6872a01d8d5c5f16bba3a60a236b5acb20b13f9e5e2a | SimulaVR/godot-haskell | LightOccluder2D.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.LightOccluder2D
(Godot.Core.LightOccluder2D._poly_ch... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/LightOccluder2D.hs | haskell | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.LightOccluder2D
(Godot.Core.LightOccluder2D._poly_ch... | |
9b7ed3c485cd7c8369945e63f33a5d750b9b30e5f54f7ca016f1a5894ddbd809 | bdeket/rktsicm | matcher.rkt | #lang racket/base
(require rackunit
"../../simplify/matcher.rkt"
"../helper.rkt")
(define the-tests
(test-suite
"simplify/matcher"
(check-equal? ((match:->combinators '(a ((? b) 2 3) 1 c))
'((a (1 2 3) 1 c))
'()
(lambda (x y) `(succeed ,x... | null | https://raw.githubusercontent.com/bdeket/rktsicm/9a6177d98040f058214add392bd791f5259b83b5/rktsicm/sicm/tests/simplify/matcher.rkt | racket | ; the same as above but testing intermediate stages | #lang racket/base
(require rackunit
"../../simplify/matcher.rkt"
"../helper.rkt")
(define the-tests
(test-suite
"simplify/matcher"
(check-equal? ((match:->combinators '(a ((? b) 2 3) 1 c))
'((a (1 2 3) 1 c))
'()
(lambda (x y) `(succeed ,x... |
0bdbda97c98c4e401fc6ea4d1c84e584bf9aa72920a9ee011bae8a258773b7ba | google/codeworld | Types.hs | {-# LANGUAGE OverloadedStrings #-}
Copyright 2020 The CodeWorld Authors . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless requ... | null | https://raw.githubusercontent.com/google/codeworld/77b0863075be12e3bc5f182a53fcc38b038c3e16/funblocks-client/src/Blocks/Types.hs | haskell | # LANGUAGE OverloadedStrings #
PICTURE ----------------------------------------------
Transformations -----------------------------------------------
NUMBERS ---------------------------------------------
TEXT ------------------------------------------------
COLORS ----------------------------------------------
LO... |
Copyright 2020 The CodeWorld Authors . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to... |
cf008f360284bdc94d8481a7f03707613f9497f47370cdc2460bd705ea920234 | mario-goulart/fu | command-line.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Command line argument handling for R7RS Scheme.
;;;
See README and for more information .
;;;
This software is written by < > and
;;; placed in the Public Domain. All warranties are disclaimed.
;;;
;;
;; `match-option` mat... | null | https://raw.githubusercontent.com/mario-goulart/fu/a04e716a9753642fee67c55738876db8858d7b61/command-line.scm | scheme |
Command line argument handling for R7RS Scheme.
placed in the Public Domain. All warranties are disclaimed.
`match-option` matches a single option specification against a list
of command line arguments.
If the given `arguments` don't match the `specification`, an error is
signaled. Otherwise, the matching ... | See README and for more information .
This software is written by < > and
(define (match-option specification arguments continue)
(let lp ((spec (cdr specification))
(args (cdr arguments))
(cont (lambda (args vals)
(continue args (cons (car specification) vals)))))
... |
aab2f576538c4a6672188843537a288da145fb6a055ec24d690c92dca9cf93d5 | david-vanderson/warp | server.rkt | #lang racket/base
(require racket/tcp
racket/async-channel)
(require "defs.rkt"
"utils.rkt"
"change.rkt"
"physics.rkt"
"quadtree.rkt"
"ships.rkt"
"pilot.rkt"
"warp.rkt"
"plasma.rkt"
"explosion.rkt"
"pbolt.rkt"
... | null | https://raw.githubusercontent.com/david-vanderson/warp/cdc1d0bd942780fb5360dc6a34a2a06cf9518408/server.rkt | racket | client connected, we are waiting for their player name
client needs whole ownspace, don't send any updates until then
- changing the scenario puts everybody here
normal operation, send updates
debugging
called once on every object
return a list of changes
stop warp for any ships that hit the edge of space
retu... | #lang racket/base
(require racket/tcp
racket/async-channel)
(require "defs.rkt"
"utils.rkt"
"change.rkt"
"physics.rkt"
"quadtree.rkt"
"ships.rkt"
"pilot.rkt"
"warp.rkt"
"plasma.rkt"
"explosion.rkt"
"pbolt.rkt"
... |
0ae1b28212ca36a2120b800b00264c1e04f0bafefbca5e2e8c55dd9d36c0925f | mishun/tangles | Test.hs | module Math.Topology.KnotTh.ChordDiagram.Test
( test
) where
import Control.Monad (forM_)
import Text.Printf
import Test.Framework (Test, testGroup)
import Test.Framework.Providers.HUnit (testCase)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.HUnit hiding (Test, test)
import Math.Topo... | null | https://raw.githubusercontent.com/mishun/tangles/9af39dd48e3dcc5e3944f8d060c8769ff3d81d02/test/Math/Topology/KnotTh/ChordDiagram/Test.hs | haskell | module Math.Topology.KnotTh.ChordDiagram.Test
( test
) where
import Control.Monad (forM_)
import Text.Printf
import Test.Framework (Test, testGroup)
import Test.Framework.Providers.HUnit (testCase)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.HUnit hiding (Test, test)
import Math.Topo... | |
f040a3aeebed8c419bbb843b0ee5ef9e96cae085fc155eaed3957e745560d54a | lambe-lang/compiler | entry.mli | module type API = sig
type t
type 'a p
val keywords : string list
val main : t p
end
| null | https://raw.githubusercontent.com/lambe-lang/compiler/79d7937c06ca30e231855ec4ce99012ca0395cd5/attic/lib/syntax/entry.mli | ocaml | module type API = sig
type t
type 'a p
val keywords : string list
val main : t p
end
| |
63a079335aa11129deb09dd0e2f64ba9cb9d5fe2520baf19b40bb192e397d319 | alanz/ghc-exactprint | GADTContext.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE ImplicitParams #
# LANGUAGE QuasiQuotes #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
data StackItem a where
Snum :: forall a. Fractional a ... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/pre-ghc90/GADTContext.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs # | # LANGUAGE ImplicitParams #
# LANGUAGE QuasiQuotes #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
data StackItem a where
Snum :: forall a. Fractional a => a -> StackItem a
Sop :: OpDesc -> StackItem a
deri... |
21a178c4cc05bc849fd2e41aeef95fa98053d6df44c053a7117c2b33d6c38782 | jgdavey/kevin | home.clj | (ns kevin.routes.home
(:require [compojure.core :refer :all]
[datomic.api :as d]
[noir.util.cache :refer [cache!]]
[kevin.core :as s]
[kevin.views :as views]))
10 minutes
(noir.util.cache/set-size! 1000)
(defn home []
(cache! :home
(views/main-template
:... | null | https://raw.githubusercontent.com/jgdavey/kevin/b4263c932b733c4e0b7729573cdc4550e69ddfa2/src/kevin/routes/home.clj | clojure | heartbeat response | (ns kevin.routes.home
(:require [compojure.core :refer :all]
[datomic.api :as d]
[noir.util.cache :refer [cache!]]
[kevin.core :as s]
[kevin.views :as views]))
10 minutes
(noir.util.cache/set-size! 1000)
(defn home []
(cache! :home
(views/main-template
:... |
e3e1573e76a412fd7d2e00e221a1d96786dcfbe207b526b96f940fe70bd76800 | input-output-hk/project-icarus-importer | Resolved.hs | -- | Resolved blocks and transactions
module Cardano.Wallet.Kernel.DB.Resolved (
-- * Resolved blocks and transactions
ResolvedInput
, ResolvedTx(..)
, ResolvedBlock(..)
-- ** Lenses
, rtxInputs
, rtxOutputs
, rbTxs
) where
import Universum
import Control.Lens.TH (makeLense... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet-new/src/Cardano/Wallet/Kernel/DB/Resolved.hs | haskell | | Resolved blocks and transactions
* Resolved blocks and transactions
** Lenses
------------------------------------------------------------------------------
Resolved blocks and transactions
------------------------------------------------------------------------------
| Resolved input
'ResolvedInput' is obtai... | module Cardano.Wallet.Kernel.DB.Resolved (
ResolvedInput
, ResolvedTx(..)
, ResolvedBlock(..)
, rtxInputs
, rtxOutputs
, rbTxs
) where
import Universum
import Control.Lens.TH (makeLenses)
import qualified Data.Map as Map
import Data.SafeCopy (base, deriveSafeCopy)
import ... |
4f0b2322210af1e6ddc449c999b1df4031fa3f196cbcbc393aca05b7fd3b0b24 | YoshikuniJujo/test_haskell | Vertex.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE GeneralizedNewtypeDeriving , DeriveGeneric #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Vertex where
import GHC.Generics
import Foreign.Storable
import Foreign.Storable.SizeAlignment
import qualified Gpu.Vulkan.Enum as Vk
import qualified Gpu.Vulkan.Pipeline.VertexI... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/b2f0c0c97b8a549c0bfb59578f7669aa54f1f7d5/themes/gui/vulkan/try-my-vulkan-snd/src/Vertex.hs | haskell | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE GeneralizedNewtypeDeriving , DeriveGeneric #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Vertex where
import GHC.Generics
import Foreign.Storable
import Foreign.Storable.SizeAlignment
import qualified Gpu.Vulkan.Enum as Vk
import qualified Gpu.Vulkan.Pipeline.VertexI... | |
cce2cfced769c42d10f87983919d493e0a25947e65bf2102f274f9c366d53b47 | liquidz/antq | github_action.clj | (ns antq.upgrade.github-action
(:require
[antq.dep.github-action :as dep.gh-action]
[antq.log :as log]
[antq.upgrade :as upgrade]
[clojure.string :as str]
[rewrite-indented.zip :as ri.zip]))
(defn- update-action-version
[new-version]
(fn [using-line]
(str/replace using-line #"@[^\s]+" (str "@"... | null | https://raw.githubusercontent.com/liquidz/antq/71563266d314cffb69862684de5af75182ee1daf/src/antq/upgrade/github_action.clj | clojure | (ns antq.upgrade.github-action
(:require
[antq.dep.github-action :as dep.gh-action]
[antq.log :as log]
[antq.upgrade :as upgrade]
[clojure.string :as str]
[rewrite-indented.zip :as ri.zip]))
(defn- update-action-version
[new-version]
(fn [using-line]
(str/replace using-line #"@[^\s]+" (str "@"... | |
f838e6e5464aa01efa1aa62b5be1e332d8f3c251583663c3ecbab5cecc38c134 | ocramz/taco-hs | Shape.hs | module Data.Tensor.Internal.Shape
-- (
Sh ( .. ) , mkSh , mkShD , , shDiff ,
Shape ( .. ) , rank , dim , Z , (: # ) , (: . )
-- )
(module X)
where
import Data.Tensor.Internal.Shape.Types as X
| null | https://raw.githubusercontent.com/ocramz/taco-hs/19d208e2ddc628835a816568cd32029fb0b85048/src/Data/Tensor/Internal/Shape.hs | haskell | (
) | module Data.Tensor.Internal.Shape
Sh ( .. ) , mkSh , mkShD , , shDiff ,
Shape ( .. ) , rank , dim , Z , (: # ) , (: . )
(module X)
where
import Data.Tensor.Internal.Shape.Types as X
|
aa91c59a976315a2d26ba2a3d23e2ea5f4db2dc2ba57106f1a893d6eb378e9e0 | eggzilla/Genbank | SequenceExtractor.hs | # LANGUAGE RecordWildCards #
{-# LANGUAGE DeriveDataTypeable #-}
-- | Extract sequence from genbank file
module Main where
import System.Console.CmdArgs
import Biobase.Genbank.Tools
import Biobase.Genbank.Import
import Data.Either.Unwrap
import Biobase.Fasta.Strict
import qualified Biobase.Types.BioSequence as BS... | null | https://raw.githubusercontent.com/eggzilla/Genbank/cb4aa68357cae4905c4199447492602d5858d3dd/Biobase/Genbank/SequenceExtractor.hs | haskell | # LANGUAGE DeriveDataTypeable #
| Extract sequence from genbank file | # LANGUAGE RecordWildCards #
module Main where
import System.Console.CmdArgs
import Biobase.Genbank.Tools
import Biobase.Genbank.Import
import Data.Either.Unwrap
import Biobase.Fasta.Strict
import qualified Biobase.Types.BioSequence as BS
import qualified Data.ByteString.Lazy.Char8 as L
import qualified Data.Byte... |
9c10aa6735d9928adacb2c3c3d35792cd9dca8e5623533474c7d05a59b8306fe | cbaggers/tamei | functions.impure.lisp | (uiop:define-package #:tamei.functions.impure (:use :cl)
(:export
;;
;; Arrays
:adjust-array
:vector-pop
:vector-push
:vector-push-extend
;;
System Construction
:compile-file-pathname
:load
:require
:provide
;;
;; Evaluation and Compilation
:compile
:compile-file
:e... | null | https://raw.githubusercontent.com/cbaggers/tamei/e3c6500bd01a4c8af86e85839c31272b38f4f89b/functions.impure.lisp | lisp |
Arrays
Evaluation and Compilation
Reader
Streams
Symbols
Printer
Strings
Numbers
Sequences
Files
Packages
Filenames
Conditions
Objects
Environment
Hash Table | (uiop:define-package #:tamei.functions.impure (:use :cl)
(:export
:adjust-array
:vector-pop
:vector-push
:vector-push-extend
System Construction
:compile-file-pathname
:load
:require
:provide
:compile
:compile-file
:eval
:macroexpand
:macroexpand-1
:proclaim
:make-dis... |
7507b84ad0bdbc9cb5a4ffff36ab06b4d912189b99e74a9ee23e6468c7a675dd | marigold-dev/deku | named_pipe.ml | module String_map = Map.Make (String)
let file_descriptor_map = ref String_map.empty
let get_pipe_pair_file_descriptors ~is_chain path =
match String_map.find_opt path !file_descriptor_map with
| Some file_descriptors -> file_descriptors
| None ->
let vm_to_chain_path = path ^ "_read" in
let chain_t... | null | https://raw.githubusercontent.com/marigold-dev/deku/21ec2bf05ce688c5b6012be16545175e75403f06/deku-p/src/core/external_vm/named_pipe.ml | ocaml | module String_map = Map.Make (String)
let file_descriptor_map = ref String_map.empty
let get_pipe_pair_file_descriptors ~is_chain path =
match String_map.find_opt path !file_descriptor_map with
| Some file_descriptors -> file_descriptors
| None ->
let vm_to_chain_path = path ^ "_read" in
let chain_t... | |
6d3aebd0507b99d65638d9afd9e8bf4d7f5c1feaf6aa77e1cb87870896a58a00 | mtolly/onyxite-customs | BandKeys.hs | {- |
BAND KEYS
-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DerivingVia #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Onyx.Harmonix.GH2.BandKeys where
import Control.Monad.Codec
import qualified Data.EventList.Relative.TimeBody as RTB
... | null | https://raw.githubusercontent.com/mtolly/onyxite-customs/0c8acd6248fe92ea0d994b18b551973816adf85b/haskell/packages/onyx-lib/src/Onyx/Harmonix/GH2/BandKeys.hs | haskell | |
BAND KEYS
# LANGUAGE OverloadedStrings #
didn't actually see double tempo on keys | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DerivingVia #
# LANGUAGE RecordWildCards #
module Onyx.Harmonix.GH2.BandKeys where
import Control.Monad.Codec
import qualified Data.EventList.Relative.TimeBody as RTB
import GHC.Generics (Gen... |
d553186ff9776a9144a9dd68806a46b4e4e668656c4a7f1ee4b3c00bda0581fe | cosmos72/hyperluminal-mem | struct.lisp | ;; -*- lisp -*-
;; This file is part of Hyperluminal-mem.
Copyright ( c ) 2013 - 2015
;;
;; This library is free software: you can redistribute it and/or
modify it under the terms of the Lisp Lesser General Public License
;; (), known as the LLGPL.
;;
;; This library is distributed in the hope that it will be us... | null | https://raw.githubusercontent.com/cosmos72/hyperluminal-mem/29c23361260e3a94fb1e09f3fdeab469b035504d/ffi/struct.lisp | lisp | -*- lisp -*-
This file is part of Hyperluminal-mem.
This library is free software: you can redistribute it and/or
(), known as the LLGPL.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PU... |
Copyright ( c ) 2013 - 2015
modify it under the terms of the Lisp Lesser General Public License
(in-package :hyperluminal-mem-ffi)
#-abcl
(defmacro ffi-defstruct (name-and-options &body fields)
`(cffi:defcstruct ,name-and-options ,@fields))
|
cc4693a02a807bce7c6da7f719f04c4e090501a7736e28ffcbf003bd437b67dd | vasilisp/inez | solver.ml | open Core.Std
open Terminology
open Core . Int_replace_polymorphic_compare
let dbg = false
module Make
(S : Imt_intf.S_access)
(I : Id.S) =
struct
open Logic
module Matching = Flat.Matching(M)
module Conv = Flat.Conv(I)(M)
module Linear = Flat.Linear(I)
module P = Pre.Make(I)
type c = I.c
... | null | https://raw.githubusercontent.com/vasilisp/inez/3bbbbb82a12918c1557f5fb0b49a8c73ab8d6da1/frontend/solver.ml | ocaml |
Types come with boilerplate for comparison and sexp conversion.
Type_conv can generate these automatically, but it breaks module
definitions and recursive modules.
optional var, possibly negated (S_Pos None means true)
axiom-related datatypes
context
linearizing terms and formulas: utilities b... | open Core.Std
open Terminology
open Core . Int_replace_polymorphic_compare
let dbg = false
module Make
(S : Imt_intf.S_access)
(I : Id.S) =
struct
open Logic
module Matching = Flat.Matching(M)
module Conv = Flat.Conv(I)(M)
module Linear = Flat.Linear(I)
module P = Pre.Make(I)
type c = I.c
... |
7f5041f55d42b62c8cfacda0687a5040f26f4330c32d57c9070b19dfb4528663 | melhadad/fuf | quicklisp.lisp | ;;;;
This is quicklisp.lisp , the quickstart file for Quicklisp . To use
;;;; it, start Lisp, then (load "quicklisp.lisp")
;;;;
Quicklisp is beta software and comes with no warranty of any kind .
;;;;
For more information about the Quicklisp beta , see :
;;;;
/
;;;;
If you have any questions or comments ab... | null | https://raw.githubusercontent.com/melhadad/fuf/57bd0e31afc6aaa03b85f45f4c7195af701508b8/quicklisp.lisp | lisp |
it, start Lisp, then (load "quicklisp.lisp")
contact:
Defining implementation-specific packages and functionality
Clozure CL
Utility function
Low-level networking implementations
A text progress bar
A simple HTTP client
Octet data
ASCII characters as integers
Pattern matching (for finding he... | This is quicklisp.lisp , the quickstart file for Quicklisp . To use
Quicklisp is beta software and comes with no warranty of any kind .
For more information about the Quicklisp beta , see :
/
If you have any questions or comments about Quicklisp , please
< >
(cl:in-package #:cl-user)
(cl:defpackag... |
f5ef2b1c841548870cd9b9bd0dfdf48ed8db852d6593f0f18c5baf6edcf05fad | purescript/purescript | Comments.hs | # LANGUAGE TemplateHaskell #
-- |
-- Defines the types of source code comments
--
module Language.PureScript.Comments where
import Prelude
import Codec.Serialise (Serialise)
import Control.DeepSeq (NFData)
import Data.Text (Text)
import GHC.Generics (Generic)
import Data.Aeson.TH
data Comment
= LineComment Text
... | null | https://raw.githubusercontent.com/purescript/purescript/02bd6ae60bcd18cbfa892f268ef6359d84ed7c9b/src/Language/PureScript/Comments.hs | haskell | |
Defines the types of source code comments
| # LANGUAGE TemplateHaskell #
module Language.PureScript.Comments where
import Prelude
import Codec.Serialise (Serialise)
import Control.DeepSeq (NFData)
import Data.Text (Text)
import GHC.Generics (Generic)
import Data.Aeson.TH
data Comment
= LineComment Text
| BlockComment Text
deriving (Show, Eq, Ord, Gener... |
67f6ffa8e934a05af352347ba12247b393b9a828f66147fcbd76e67fe042bddf | wilbowma/cur | totality.rkt | #lang s-exp "../main.rkt"
(provide (for-syntax (all-defined-out)))
(require "pattern-tree.rkt"
(for-syntax racket/base
racket/bool
racket/list
racket/pretty
cur/curnel/reflection))
TODO : Lower to relative phase 1 and chang... | null | https://raw.githubusercontent.com/wilbowma/cur/e039c98941b3d272c6e462387df22846e10b0128/cur-lib/cur/stdlib/totality.rkt | racket | A pattern match is total if and only if each match variable in the tree contains a match case for each
of the corresponding type constructors
handle implicit constructors
if the current match pattern is marked as a pattern variable, then
we actually don't need to worry about failures at this level; subsequent
nes... | #lang s-exp "../main.rkt"
(provide (for-syntax (all-defined-out)))
(require "pattern-tree.rkt"
(for-syntax racket/base
racket/bool
racket/list
racket/pretty
cur/curnel/reflection))
TODO : Lower to relative phase 1 and chang... |
accfa99740c7e68b90e35e157313e799b521116789ebc059e03bb9ffb0803578 | fossas/fossa-cli | Poetry.hs | module Strategy.Python.Poetry (
discover,
-- * for testing only
graphFromLockFile,
setGraphDirectsFromPyproject,
PoetryProject (..),
) where
import App.Fossa.Analyze.Types (AnalyzeProject (analyzeProject'), analyzeProject)
import Control.Algebra (Has)
import Control.Applicative ((<|>))
import Control.Effect... | null | https://raw.githubusercontent.com/fossas/fossa-cli/187f19afec2133466d1998c89fc7f1c77107c2b0/src/Strategy/Python/Poetry.hs | haskell | * for testing only
| Poetry build backend identifier required in [pyproject.toml](-poetry.org/docs/pyproject/#poetry-and-pep-517).
Refer to -poetry/poetry/pull/2212
| Reference message text for poetry build backend setting value required in pyproject.toml.
Users should configure poetry build backend in pyproject.t... | module Strategy.Python.Poetry (
discover,
graphFromLockFile,
setGraphDirectsFromPyproject,
PoetryProject (..),
) where
import App.Fossa.Analyze.Types (AnalyzeProject (analyzeProject'), analyzeProject)
import Control.Algebra (Has)
import Control.Applicative ((<|>))
import Control.Effect.Diagnostics (Diagnostic... |
fa4fad440c7d308f65bf6cfc89f090dfaa2ec15cf87692b5daae877dec975650 | 2600hz/kazoo | knm_vitelity_cnam.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
%%% @doc
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%%
%%% @end... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_numbers/src/providers/knm_vitelity_cnam.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------------------
------------------------------------------------------------------------------
@doc This function is called each time a number is saved, and will
@en... | ( C ) 2010 - 2020 , 2600Hz
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(knm_vitelity_cnam).
-behaviour(knm_gen_provider).
-export([save/1]).
-export([delete/1]).
-i... |
58158d2e89da4844bfe08035b1ef4127302a9c64f3f3399bbb15ab00ae6c7316 | creichert/bencode | Parser.hs | # LANGUAGE CPP #
-----------------------------------------------------------------------------
-- |
-- Module : BParser
Copyright : ( c ) 2005 Lemmih < >
-- License : BSD3
-- Maintainer :
-- Stability : stable
-- Portability : portable
--
A parsec style parser for BEncoded data
-------------... | null | https://raw.githubusercontent.com/creichert/bencode/ee1606cec92d8c2e142c8673c8e176c2151f8a70/src/Data/BEncode/Parser.hs | haskell | ---------------------------------------------------------------------------
|
Module : BParser
License : BSD3
Maintainer :
Stability : stable
Portability : portable
--------------------------------------------------------------------------- | # LANGUAGE CPP #
Copyright : ( c ) 2005 Lemmih < >
A parsec style parser for BEncoded data
#
DEPRECATED " Use \"Data . . Reader\ " instead " #
DEPRECATED "Use \"Data.BEncode.Reader\" instead" #-}
( BParser
, runParser
, token
, dict
, list
, optional
, bstring
, bbyt... |
f62e5e2daa755189822589ec91d001e548e5d5537eec8a7e007162fcec63650d | threatgrid/clj-momo | query.clj | (ns clj-momo.lib.es.query
(:require [clojure.string :as str]
[schema.core :as s]
[clj-momo.lib.es.schemas :refer [IdsQuery BoolQuery BoolQueryParams]]))
(s/defn ids :- IdsQuery
"Ids Query"
[ids :- [s/Str]]
{:ids {:values ids}})
(s/defn bool :- BoolQuery
"Boolean Query"
[opts :- Boo... | null | https://raw.githubusercontent.com/threatgrid/clj-momo/7bc0a411593eee4a939b6a3d0f628413518e09e2/src/clj_momo/lib/es/query.clj | clojure | (ns clj-momo.lib.es.query
(:require [clojure.string :as str]
[schema.core :as s]
[clj-momo.lib.es.schemas :refer [IdsQuery BoolQuery BoolQueryParams]]))
(s/defn ids :- IdsQuery
"Ids Query"
[ids :- [s/Str]]
{:ids {:values ids}})
(s/defn bool :- BoolQuery
"Boolean Query"
[opts :- Boo... | |
c56f804ced13549ba4ae98c9d266b121543cd49f205944ea51b185f471cfb3c2 | pkel/cpr | QueueSim.ml | module OrderedQueue = Cpr_lib.OrderedQueue
type time = T of float
type timedelta = D of float
type 'outcome step_outcome =
| Stop of 'outcome
| Continue
type ('event, 'outcome) model =
{ handler : (timedelta -> 'event -> unit) -> time -> 'event -> 'outcome step_outcome
; init : (time * 'event) list
}
type... | null | https://raw.githubusercontent.com/pkel/cpr/854db775bdeb2e95ec94dc9f815314157e74dd81/experiments/safety-bounds/ml/QueueSim.ml | ocaml | module OrderedQueue = Cpr_lib.OrderedQueue
type time = T of float
type timedelta = D of float
type 'outcome step_outcome =
| Stop of 'outcome
| Continue
type ('event, 'outcome) model =
{ handler : (timedelta -> 'event -> unit) -> time -> 'event -> 'outcome step_outcome
; init : (time * 'event) list
}
type... | |
19b4cae1058338ec885de6922c7e14ed87bb49ce8cba9550011d0853002a24f1 | simplex-chat/simplexmq | M20230110_users.hs | # LANGUAGE QuasiQuotes #
module Simplex.Messaging.Agent.Store.SQLite.Migrations.M20230110_users where
import Database.SQLite.Simple (Query)
import Database.SQLite.Simple.QQ (sql)
m20230110_users :: Query
m20230110_users =
[sql|
PRAGMA ignore_check_constraints=ON;
CREATE TABLE users (
user_id INTEGER PRIMARY KEY... | null | https://raw.githubusercontent.com/simplex-chat/simplexmq/e4aad7583f425765c605cd8042e3136e048bdbec/src/Simplex/Messaging/Agent/Store/SQLite/Migrations/M20230110_users.hs | haskell | # LANGUAGE QuasiQuotes #
module Simplex.Messaging.Agent.Store.SQLite.Migrations.M20230110_users where
import Database.SQLite.Simple (Query)
import Database.SQLite.Simple.QQ (sql)
m20230110_users :: Query
m20230110_users =
[sql|
PRAGMA ignore_check_constraints=ON;
CREATE TABLE users (
user_id INTEGER PRIMARY KEY... | |
ceba4caad42bf279c1ac009dec0cb0be3ad1ab8d36cefe1036648bc28b27846f | rudymatela/express | Canon.hs | -- |
-- Module : Data.Express.Canon
Copyright : ( c ) 2019 - 2021
License : 3 - Clause BSD ( see the file LICENSE )
Maintainer : < >
--
Utilities for canonicalizing ' 's with variables .
module Data.Express.Canon
( canonicalize
, canonicalizeWith
, canonicalization
, canonicalizat... | null | https://raw.githubusercontent.com/rudymatela/express/ac28404b82a3b282f538279c0e8796491122dd7b/src/Data/Express/Canon.hs | haskell | |
Module : Data.Express.Canon
|
Like 'canonicalize' but allows customization
of the list of variable names.
(cf. 'lookupNames', 'variableNamesFromTemplate')
> i + j :: Int
to provide a different list of names for different types:
> > let namesFor e
> > | typ e == typeOf (undefined::Int) = variable... | Copyright : ( c ) 2019 - 2021
License : 3 - Clause BSD ( see the file LICENSE )
Maintainer : < >
Utilities for canonicalizing ' 's with variables .
module Data.Express.Canon
( canonicalize
, canonicalizeWith
, canonicalization
, canonicalizationWith
, isCanonical
, isCanonicalWith
... |
5d6df9ab81faa907da4b3416ea007f33f5029ade8750794775719053be1fbbd7 | erlang/otp | ct_test_support.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/82d134f1b4132209337a5c58d3b8115816b725d0/lib/common_test/test/ct_test_support.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2008 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
This is a support module for testing the Common Test Framework .
-module(ct_test_support).
-include_lib("common_t... |
1d98849e69966ada6f5512a9248d8a392d0597d217d0989b9a882b1fe9caa67b | fpco/wai-middleware-auth | Internal.hs | {-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - orphans #
module Spec.Network.Wai.Auth.Internal (tests) where
import Data.Binary (encode, decodeOrFail)
import qualified Data.ByteString.Lazy.Char8 as BSL8
import qualified Data.Text as T
import ... | null | https://raw.githubusercontent.com/fpco/wai-middleware-auth/77b83b91240916e74a8a61c74cd63aa3905c6a9f/test/Spec/Network/Wai/Auth/Internal.hs | haskell | # LANGUAGE OverloadedStrings #
instance, and it's constituent parts don't have a `Generic` instance. Hence
this orphan instance here. | # OPTIONS_GHC -fno - warn - orphans #
module Spec.Network.Wai.Auth.Internal (tests) where
import Data.Binary (encode, decodeOrFail)
import qualified Data.ByteString.Lazy.Char8 as BSL8
import qualified Data.Text as T
import Test.Tasty (Test... |
59f1e0bbe9c7b650ee053ad7736b151aad2f7953bb8a5eb2f1b4c55c0389fd91 | spacegangster/space-ui | btn.cljc | (ns space-ui.tiny.btn
(:require [space-ui.bem :as bem]
[space-ui.style.main-mixins :as mm]
[space-ui.style.constants :as sc]
[space-ui.primitives :as prim]
[space-ui.svgs :as svgs]))
(def on-click-prop #?(:cljs :on-click :clj :onclick))
(def color:border-blue-skeuo "... | null | https://raw.githubusercontent.com/spacegangster/space-ui/a83fa857ec60daa59572eb9313244f189cc0798c/src/space_ui/tiny/btn.cljc | clojure | (ns space-ui.tiny.btn
(:require [space-ui.bem :as bem]
[space-ui.style.main-mixins :as mm]
[space-ui.style.constants :as sc]
[space-ui.primitives :as prim]
[space-ui.svgs :as svgs]))
(def on-click-prop #?(:cljs :on-click :clj :onclick))
(def color:border-blue-skeuo "... | |
6ec9cf5762806925badb5c77e69c97fc3357dec5da5e8ae0fb40581e9a17305a | 8c6794b6/haskell-sc-scratch | HelloAcid.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
|
Module : $ Header$
CopyRight : ( c ) 8c6794b6
License : :
Stability : unstable
Portability : portable
Example acid - state with HelloIxSet .
Module : $Header$
CopyRight : (c) 8c67... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/DB/HelloAcid.hs | haskell | # LANGUAGE DeriveDataTypeable # | # LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
|
Module : $ Header$
CopyRight : ( c ) 8c6794b6
License : :
Stability : unstable
Portability : portable
Example acid - state with HelloIxSet .
Module : $Header$
CopyRight : (c) 8c6794b6
License : BSD3
Maintainer ... |
49084aafad151643d8eeff0e13c94174418ddcf2395503ba27a94037e455859d | yaxu/remake | Types.hs | module Sound.Tidal2.Types where
import Data.List (intersectBy, nub, (\\), intercalate)
import Data.Maybe (isJust)
import Sound.Tidal2.Pattern
-- ************************************************************ --
-- Types of types
data Type =
T_F Type Type
| T_String
| T_Float
| T_Int
| T_Rational
| T_Bool
... | null | https://raw.githubusercontent.com/yaxu/remake/bc158cafcb2af3d0e639f25443e7b8ef4b98dbdc/src/Sound/Tidal2/Types.hs | haskell | ************************************************************ --
Types of types
Type signature
$ T_F ( T_Pattern $ T_Constraint 0 ) $ T_F ( T_Pattern $ T_Constraint 0 ) ( T_Pattern $ T_Constraint 0 )
$ T_F (T_Pattern $ T_Constraint 0) $ T_F (T_Pattern $ T_Constraint 0) (T_Pattern $ T_Constraint 0)
floatOp... | module Sound.Tidal2.Types where
import Data.List (intersectBy, nub, (\\), intercalate)
import Data.Maybe (isJust)
import Sound.Tidal2.Pattern
data Type =
T_F Type Type
| T_String
| T_Float
| T_Int
| T_Rational
| T_Bool
| T_Map
| T_Pattern Type
| T_Constraint Int
| T_List Type
| T_SimpleList Typ... |
9e3fbf198ca646fe6f0f017c78087428a49dbb2ddf7cfa8ee7fb1f35f2a10d52 | jberryman/directory-tree | Test.hs | module Main
where
do a quick test for :
import System.Directory.Tree
import Control.Applicative
import qualified Data.Foldable as F
import System.Directory
import System.Process
import System.IO.Error(ioeGetErrorType,isPermissionErrorType)
import Control.Monad(void)
testDir :: FilePath
testDir = "/tmp/TEST... | null | https://raw.githubusercontent.com/jberryman/directory-tree/bfd31a37ba4af34ed25b2e55865db8c30b175510/Test.hs | haskell | write our testing directory structure to disk. We include Failed
constructors which should be discarded:
make file farthest to the right unreadable:
read with lazy and standard functions, compare for equality. Also test that our crazy
operator works correctly inline with <$>:
make sure the unreadable file left t... | module Main
where
do a quick test for :
import System.Directory.Tree
import Control.Applicative
import qualified Data.Foldable as F
import System.Directory
import System.Process
import System.IO.Error(ioeGetErrorType,isPermissionErrorType)
import Control.Monad(void)
testDir :: FilePath
testDir = "/tmp/TEST... |
1cb8246d0314764827b2c6ce11f7c1cc2b77194591111303bb987cf18133e436 | brendanzab/language-garden | Cpu.mli | (** {0 CPU based shader language} *)
* This implements a shader language natively in OCaml . This is useful for
testing the shader language and SDFs without needing to interface with
graphics APIs . It could also be useful for implementing constant folding
optimisations in the future .
testing th... | null | https://raw.githubusercontent.com/brendanzab/language-garden/d73b3e95dc7206f02c2a8ecc96c7aac10db4cc9e/lang-shader-graphics/lib/Cpu.mli | ocaml | * {0 CPU based shader language}
* An image shader to be run on the CPU. The function takes a pixel (fragment)
coordinate as an argument and returns the color that should be rendered at
that pixel. |
* This implements a shader language natively in OCaml . This is useful for
testing the shader language and SDFs without needing to interface with
graphics APIs . It could also be useful for implementing constant folding
optimisations in the future .
testing the shader language and SDFs without ne... |
721ff6a78f217a5a8d939a4868b274f0ef5655df3320826bfcd1428e82a0f128 | brendanhay/amazonka | CreateAssistant.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused -... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-wisdom/gen/Amazonka/Wisdom/CreateAssistant.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Module : Amazonka.Wisdom.CreateAssistant
Stability : auto-generated
* Creating a Request
* Request Lenses
* Destructuring the Response
* Response Lenses
| /See:/ 'newCreateAssistant' smart constructor.
| A unique, case-sensitive identifier that y... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
De... |
d007d4629e91bfaa543cab8e0b36c20dadd8321e56aed1bad3bd90c7c7050586 | HunterYIboHu/htdp2-solution | ex454-create-matrix.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex454-create-matrix) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t construc... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter5/Section27-variations-on-the-theme/ex454-create-matrix.rkt | racket | about the language level of this file in a form that our tools can easily process.
constants
functions
N [List-of Number] -> [List-of [List-of Number]]
prodcues a n x n matrix which is represented as list of list.
N [List-of Number] -> [List-of [List-of Number]]
help create matrix by unregularly create lol.
aux... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex454-create-matrix) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define lon-1 '(1 2 3 4))
(define lon-2 '... |
8ca23cc40b7cb1c0a6b022be5b784798f4a0f737e53e8a77fba65830bc824213 | tip-org/tools | Translate.hs | # LANGUAGE DeriveFunctor , , DeriveTraversable #
# LANGUAGE RecordWildCards #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE GADTs #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE CPP #
# LANGUAGE PatternGuards #
module Tip.Haskell.Translate where
#include "errors.h"
import Tip.Haskell.Repr as H
import Tip.Core as T hiding ... | null | https://raw.githubusercontent.com/tip-org/tools/34350072587bd29157d18331eb895a1b2819555f/tip-lib/src/Tip/Haskell/Translate.hs | haskell | # LANGUAGE GADTs #
^ A qualified import
^ The current module defines something with this very important name
^ From the theory
^ For various purposes...
f :: (?f_imp :: f_NT) => T
f = f_get ?f_imp
arbitrary = do
Capture x <- capture
return (f_Mk (x arbitrary))
gen :: Gen (Dict (?f_imp :: f_NT))
g... | # LANGUAGE DeriveFunctor , , DeriveTraversable #
# LANGUAGE RecordWildCards #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE CPP #
# LANGUAGE PatternGuards #
module Tip.Haskell.Translate where
#include "errors.h"
import Tip.Haskell.Repr as H
import Tip.Core as T hiding (Formula(..),globals,Ty... |
3ed8ac00eebbb8872e87030ec0227246d44f81d64fbc0fdc041ba00dab10c822 | stassats/lisp-bots | misc.lisp | (defpackage :webutils.misc (:use :cl :araneida :webutils.application)
(:export :with-body-params :define-configuration-variable :reload-configuration-variables
:with-query-params
:expire-authorization-tokens :make-authorization-token :is-authorized
... | null | https://raw.githubusercontent.com/stassats/lisp-bots/09bfce724afd20c91a08acde8816be6faf5f54b2/webutils/misc.lisp | lisp | it's actually a single handler definition | (defpackage :webutils.misc (:use :cl :araneida :webutils.application)
(:export :with-body-params :define-configuration-variable :reload-configuration-variables
:with-query-params
:expire-authorization-tokens :make-authorization-token :is-authorized
... |
68d789a5fa2c236c2527ec39df591c3984b9bb1cfd7a9e67a6deaf115aca1c2c | bract/bract.core | dev.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the ... | null | https://raw.githubusercontent.com/bract/bract.core/625b8738554b1e1b61bd8522397fb698fb12d3d3/src/bract/core/dev.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this ... | Copyright ( c ) . All rights reserved .
(ns bract.core.dev
"Development and test support."
(:require
[clojure.java.javadoc :refer [javadoc]]
[clojure.pprint :refer [pprint]]
[clojure.repl :refer :all]
[clojure.string :as string]
[bract.core.keydef :as kdef]
[bract.... |
6e991f2e0118db5d9724474d72a0f9a61d64ce19bbe4eaf4540aa9d74f5999c5 | cloudkj/lambda-ml | neural_network.clj | (ns lambda-ml.neural-network
"Multilayer perceptron neural network learning using backpropagation.
Example usage:
```
(def data [[0 0 [0]] [0 1 [1]] [1 0 [1]] [1 1 [0]]])
(def fit
(let [alpha 0.5
lambda 0.001
model (-> (make-neural-network alpha lambda)
(add-neural... | null | https://raw.githubusercontent.com/cloudkj/lambda-ml/a470a375d2b94f5e5e623a5e198ac312b018ffb3/src/lambda_ml/neural_network.clj | clojure | input layer
hidden layer
output layer
Numeric gradient checking
number of nodes at layer i (+ bias node)
number of nodes at layer i+1
initialize random values as parameters
Cost functions
Cross entropy error is independent of the derivative of output activation
API | (ns lambda-ml.neural-network
"Multilayer perceptron neural network learning using backpropagation.
Example usage:
```
(def data [[0 0 [0]] [0 1 [1]] [1 0 [1]] [1 1 [0]]])
(def fit
(let [alpha 0.5
lambda 0.001
model (-> (make-neural-network alpha lambda)
(-> (iterate #(neural-net... |
6bd518095fc2252cf0cd59c9a732b7fdc44a94e9aeb4ecc14766eafcc0ef2568 | c4-project/c4f | table.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fuzz_actions/src/table.mli | ocaml | * The fuzzer action tables.
* [actions] is a listing of all actions with their default weights.
* [action_map] lazily evaluates to a map from action IDs to their actions.
It is, effectively, a rearrangement of the data available in [actions]. | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
156cbb76f8636e74a68fa50c915062d332cbfec553b86a63ca955695ae3749b1 | Opetushallitus/aipal | opintoala.clj | Copyright ( c ) 2014 The Finnish National Board of Education - Opetushallitus
;;
This program is free software : Licensed under the EUPL , Version 1.1 or - as
soon as they will be approved by the European Commission - subsequent versions
of the EUPL ( the " Licence " ) ;
;;
;; You may not use this work except... | null | https://raw.githubusercontent.com/Opetushallitus/aipal/767bd14ec7153dc97fdf688443b9687cdb70082f/aipal/src/clj/aipal/arkisto/opintoala.clj | clojure |
You may not use this work except in compliance with the Licence.
You may obtain a copy of the Licence at: /
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | Copyright ( c ) 2014 The Finnish National Board of Education - Opetushallitus
This program is free software : Licensed under the EUPL , Version 1.1 or - as
soon as they will be approved by the European Commission - subsequent versions
European Union Public Licence for more details .
(ns aipal.arkisto.opintoa... |
fb183a989888bc3586fbaa1a6e2def3b3966fe9bd29e18a6a1827698c75d55ac | Flamefork/fleet | runtime.clj | (ns fleet.runtime
(:import
[clojure.lang Sequential IObj]
fleet.util.CljString))
(defn- escaped-with
[s]
(:escaped-with (meta s) {}))
(defn raw
"Prevent escaping of string by escaping-fn."
[escaping-fn s]
(let [obj (-> s .toString CljString.)
new-escw (assoc (escaped-with s) escaping-fn tr... | null | https://raw.githubusercontent.com/Flamefork/fleet/dc4adcd84b2f92d40797789c98e71746181f1a04/src/fleet/runtime.clj | clojure | (ns fleet.runtime
(:import
[clojure.lang Sequential IObj]
fleet.util.CljString))
(defn- escaped-with
[s]
(:escaped-with (meta s) {}))
(defn raw
"Prevent escaping of string by escaping-fn."
[escaping-fn s]
(let [obj (-> s .toString CljString.)
new-escw (assoc (escaped-with s) escaping-fn tr... | |
3ed7ae33b9aa588dc005c88ca4f470e131b6e9a6d620071eed7efd443cd44ac6 | rtoy/cmucl | gray-compat.lisp | ;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*-
;;;
;;; **********************************************************************
This code was written by and has been placed in the public
;;; domain.
;;;
(ext:file-comment
"$Header: src/pcl/gray-compat.lisp $")
;;;
;;; ******************************... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/pcl/gray-compat.lisp | lisp | -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*-
**********************************************************************
domain.
**********************************************************************
Gray streams compatibility functions for simple-streams | This code was written by and has been placed in the public
(ext:file-comment
"$Header: src/pcl/gray-compat.lisp $")
(in-package "STREAM")
(intl:textdomain "cmucl")
(defvar *enable-gray-compat-warnings* nil)
(defmacro define-gray-stream-method (name lambda-list &body body)
`(defmethod ,name ,lambda-list
(... |
7c68b433598e6d0caea265294b3f1a5cc33d78c7b1a0dfd2007fbb5ee247db1d | haskell-lisp/blaise | StandardFunctions.hs |
module StandardFunctions where
import Expression
import Eval
import qualified Data.Map as Map
import Control.Monad.State
-- Standard functions we expose
blaiseArithmetic f = do (BlaiseList args) <- getSymbol "..."
blaiseBinary f args
blaiseBinary :: (Integer->Integer->Integer) ... | null | https://raw.githubusercontent.com/haskell-lisp/blaise/17c75be05b6f6d2b2fff4774229ca733b2c5f0e3/src/StandardFunctions.hs | haskell | Standard functions we expose
Equality
A function to modify the context
Conditionals
Functions
Our symbol table
Helper
|
module StandardFunctions where
import Expression
import Eval
import qualified Data.Map as Map
import Control.Monad.State
blaiseArithmetic f = do (BlaiseList args) <- getSymbol "..."
blaiseBinary f args
blaiseBinary :: (Integer->Integer->Integer) -> [Expr] -> BlaiseResult
blaise... |
f338f041d273bc86429c07de1d3eeecc9af985640b58aa657b330ac8c131c5f6 | green-coder/diffuse | helper_test.cljc | (ns diffuse.helper-test
(:require #?(:clj [clojure.test :refer [deftest testing is are]]
:cljs [cljs.test :refer [deftest testing is are] :include-macros true])
[diffuse.core :as d]
[diffuse.helper :as h]))
(deftest no-op-test
(is (= (h/value :foo) (d/comp (h/value :foo) h/n... | null | https://raw.githubusercontent.com/green-coder/diffuse/22675d1c586dcb6204f01836ce6fe63b1db2a5aa/test/diffuse/helper_test.cljc | clojure | {:type :map
:key-op {:a [:assoc a]
:b [:assoc b]
:c [:update {:type :set
:conj #{c}}]
:d [:dissoc]}})
c 103]
(d/comp (h/map-assoc :a a, :b b)
... | (ns diffuse.helper-test
(:require #?(:clj [clojure.test :refer [deftest testing is are]]
:cljs [cljs.test :refer [deftest testing is are] :include-macros true])
[diffuse.core :as d]
[diffuse.helper :as h]))
(deftest no-op-test
(is (= (h/value :foo) (d/comp (h/value :foo) h/n... |
b44bf03e5fd37e4ccb67666e3129e66355bb8a85dfc1cb149638a5807644b15f | Kalimehtar/gtk-cffi | drag-drop.lisp | (in-package :gdk-cffi)
(defbitfield drag-action :default :copy :move :link :private :ask) | null | https://raw.githubusercontent.com/Kalimehtar/gtk-cffi/fbd8a40a2bbda29f81b1a95ed2530debfe2afe9b/gdk/drag-drop.lisp | lisp | (in-package :gdk-cffi)
(defbitfield drag-action :default :copy :move :link :private :ask) | |
8636e298332bc26a46d310e70b931b5f5b854009fa1baec57b5992dc75e9c8c6 | fyquah/hardcaml_zprize | multiplier.mli | open! Base
open Hardcaml
val latency : int
val create : clock:Signal.t -> Signal.t -> Signal.t -> Signal.t
| null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/hardcaml_ntt/src/multiplier.mli | ocaml | open! Base
open Hardcaml
val latency : int
val create : clock:Signal.t -> Signal.t -> Signal.t -> Signal.t
| |
90d18e824995960d9bc5b3ab567df557c64ef906d5b0c590b0939b3404f5b7f0 | LdBeth/star-lisp | type-system-basics.lisp | (in-package :*sim-i)
;;;> *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
;;;>
;;;> The Thinking Machines *Lisp Simulator is in the public domain.
;;;> You are free to do whatever you like with it, including but
;;;> not limited to distributing, modifying, and copying.
;;;>
;;... | null | https://raw.githubusercontent.com/LdBeth/star-lisp/034fb97fe8780d6e9fbff7c1d8c4a6b8c331797b/source/type-system-basics.lisp | lisp | > *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
>
> The Thinking Machines *Lisp Simulator is in the public domain.
> You are free to do whatever you like with it, including but
> not limited to distributing, modifying, and copying.
>
> *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+... | (in-package :*sim-i)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defconstant short-float-mantissa 15)
(defconstant short-float-exponent 8)
(defconstant single-float-mantissa 23)
(defconstant single-float-exponent 8)
(defconstant double-float-mantissa 52)
(defconstant double-float-exponent 11... |
2ff43e604a7747f594b18f6bdb692721a46299556590d4882a2dc945618688b7 | Frechmatz/cl-threadpool | example-1.lisp | (defpackage :cl-threadpool-example-1
(:documentation "Synchronously execute a batch of jobs")
(:use :cl))
(in-package :cl-threadpool-example-1)
(defun example()
(let ((threadpool (cl-threadpool:make-threadpool 5 :name "Example thread pool")))
(let ((results
(cl-threadpool:run-jobs
thre... | null | https://raw.githubusercontent.com/Frechmatz/cl-threadpool/86ef8a6b3d6a28ce41f25362c1c2db804d3ca605/examples/example-1.lisp | lisp | => "Batch-Job 1"
=> "Batch-Job 2"
=> "Batch-Job 3"
(example) | (defpackage :cl-threadpool-example-1
(:documentation "Synchronously execute a batch of jobs")
(:use :cl))
(in-package :cl-threadpool-example-1)
(defun example()
(let ((threadpool (cl-threadpool:make-threadpool 5 :name "Example thread pool")))
(let ((results
(cl-threadpool:run-jobs
thre... |
d2b8eaf8afbfe7e4d5179cd265129f6bf9e8ecdd9d4d414b57f1270c321a26b3 | isovector/cccc | Utils.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
{-# OPTIONS_GHC -Wall #-}
module Utils where
import Control.Lens ((<&>), makeLenses)
import Control.Monad.State
import Control.Monad.Trans.Except
import ... | null | https://raw.githubusercontent.com/isovector/cccc/57497046e7bf6170dfdb4964da6840001d46c91f/src/Utils.hs | haskell | # LANGUAGE OverloadedStrings #
# OPTIONS_GHC -Wall #
TODO(sandy): there is a bug here if there is a constraint on the method
TODO(sandy): also buggy. we should just run the type checker on this | # LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
module Utils where
import Control.Lens ((<&>), makeLenses)
import Control.Monad.State
import Control.Monad.Trans.Except
import Data.Bifunctor (first, second)
import Data.Li... |
97b3279bb1330537549a560498f5fef55ce5c6da5ba2b60245d867a86d36b655 | lehins/RockAnts | Common.hs | module Common
( module X
) where
import Test.Hspec as X
import Test.QuickCheck as X
| null | https://raw.githubusercontent.com/lehins/RockAnts/6b8cfcc476bb1230396ac18359cee578e5012154/tests/Common.hs | haskell | module Common
( module X
) where
import Test.Hspec as X
import Test.QuickCheck as X
| |
6e7d3fd342eb1aaae56850acb869d2b3f7dfc7a6a4c53e0468a661b8eaeb38e1 | ktakashi/sagittarius-scheme | keystores.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
sagittarius / crypto / keystores.scm - Keystores
;;;
Copyright ( c ) 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redi... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/4581c9f88c1ca7044cca987a973d5b76b7258189/ext/crypto/sagittarius/crypto/keystores.scm | scheme | coding : utf-8 ; -*-
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 of conditions and the following disclaimer.
2... | sagittarius / crypto / keystores.scm - Keystores
Copyright ( c ) 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
... |
01c23ad057770ed2a67693a2ea797443c6b5febda863d80f4282ffcd0b34ee8c | archaelus/erlirc | tcp_server.erl | %%%-------------------------------------------------------------------
Geoff Ca nt
@author nt < >
%% @version {@vsn}, {@date} {@time}
@doc A wrapper library to give gen_tcp a more Erlangy interface for
%% listen/accept.
%% @end
%%%-------------------------------------------------------------------
-module(tcp... | null | https://raw.githubusercontent.com/archaelus/erlirc/b922b2004f0f9f58a6ccf8fe71313190dee081c6/src/tcp_server.erl | erlang | -------------------------------------------------------------------
@version {@vsn}, {@date} {@time}
listen/accept.
@end
-------------------------------------------------------------------
API
gen_server callbacks
====================================================================
API
===========================... | Geoff Ca nt
@author nt < >
@doc A wrapper library to give gen_tcp a more Erlangy interface for
-module(tcp_server).
-behaviour(gen_server).
-include_lib("logging.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([listen/2
,listen/3
,controlling_process/2
,close/1
,... |
41b81ac60d3081447dc34390de69c6cf0b011ca68b3d5f73255179ea38f9104c | wireapp/wire-server | LoginCode_user.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/c428355b7683b7b7722ea544eba314fc843ad8fa/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LoginCode_user.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Test.Wire.API.Golden.Gene... |
1ef4aa20daa108dc8e9a2eab06e15f85d42ecbb4f105fd94295ab85591ba2e57 | BinaryAnalysisPlatform/bap | dwarf_types.ml | (** Basic type declarations for DWARF format. *)
open Core_kernel[@@warning "-D"]
open Bap.Std
type leb128 = Dwarf_leb128.t [@@deriving bin_io, compare, sexp]
(** File sections *)
module Section = struct
type t =
| Info
| Abbrev
| Str
[@@deriving sexp, bin_io, compare, variants]
end
(** Debug Entry... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/bap_dwarf/dwarf_types.ml | ocaml | * Basic type declarations for DWARF format.
* File sections
* Debug Entry Tag
* Attribute
* Attribute form | open Core_kernel[@@warning "-D"]
open Bap.Std
type leb128 = Dwarf_leb128.t [@@deriving bin_io, compare, sexp]
module Section = struct
type t =
| Info
| Abbrev
| Str
[@@deriving sexp, bin_io, compare, variants]
end
module Tag = struct
type t =
| Compile_unit
| Partial_unit
| Subprogram
... |
571bbc8a6b30ae881d0e059393cb3e0fbad105d08d5d913e816503e21f7403f8 | Motiva-AI/stepwise | client.clj | (ns stepwise.client
(:require [stepwise.model :as mdl]
[clojure.core.async :as async])
(:import (com.amazonaws.services.stepfunctions AWSStepFunctionsClient
AWSStepFunctionsClientBuilder)
(com.amazonaws ClientConfiguration)
(com.amaz... | null | https://raw.githubusercontent.com/Motiva-AI/stepwise/3986bc9e50e89390bb6459757901317ab505e756/src/stepwise/client.clj | clojure | (ns stepwise.client
(:require [stepwise.model :as mdl]
[clojure.core.async :as async])
(:import (com.amazonaws.services.stepfunctions AWSStepFunctionsClient
AWSStepFunctionsClientBuilder)
(com.amazonaws ClientConfiguration)
(com.amaz... | |
28945efe74d14f2d541268b127e05219be68b501936f9cda2f98bfe930755d46 | mransan/ocaml-protoc | pb_codegen_ocaml_type.ml |
The MIT License ( MIT )
Copyright ( c ) 2016 < >
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... | null | https://raw.githubusercontent.com/mransan/ocaml-protoc/e43b509b9c4a06e419edba92a0d3f8e26b0a89ba/src/compilerlib/pb_codegen_ocaml_type.ml | ocaml | * OCaml type representation
* zigzag
OCaml type name ie not the type name in proto file
Need to keep track of this since encoding logic in binary
format is quite different
basic type being wrapped
encoding used for the basic type
New wrapper type which indicates that the corresponding ocaml
Type sh... |
The MIT License ( MIT )
Copyright ( c ) 2016 < >
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... |
1ae0e3e07a872f0639b3a0fd5b2d3b4fe60e183eccb3bb85037f8fd85aa3d351 | input-output-hk/plutus-apps | DatumRedeemerGuess.hs | # LANGUAGE DataKinds #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
{-# LANGUAGE TypeFamilies #-}
module PlutusExample.PlutusVersion1.DatumRedeemerGuess
( guessScript
, guessScriptStake
, datumRedeemerGuessScriptShortBs
) where
import Prelude hid... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/c1269a7ab8806957cda93448a4637c485352cda5/plutus-example/src/PlutusExample/PlutusVersion1/DatumRedeemerGuess.hs | haskell | # LANGUAGE TypeFamilies #
# INLINEABLE mkValidatorStake # | # LANGUAGE DataKinds #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
module PlutusExample.PlutusVersion1.DatumRedeemerGuess
( guessScript
, guessScriptStake
, datumRedeemerGuessScriptShortBs
) where
import Prelude hiding (($), (&&), (==))
import Carda... |
d0be8693907f1d199fff695cf3f88d842620330e0dfab718cb818bf7e195dcae | thehandsomepanther/system-f | check.mli | (*
* Type checking
*)
open Syntax
(* Thrown on type errors. *)
exception Type_error of string
(* Returns the type of an expression or throws Type_error. *)
val tc_infer : int * typ Env.t -> exp -> typ
val tc_check : int * typ Env.t -> exp -> typ -> unit
| null | https://raw.githubusercontent.com/thehandsomepanther/system-f/90bb8ac121a7f731c198134b326cb1dd6a61b233/check.mli | ocaml |
* Type checking
Thrown on type errors.
Returns the type of an expression or throws Type_error. |
open Syntax
exception Type_error of string
val tc_infer : int * typ Env.t -> exp -> typ
val tc_check : int * typ Env.t -> exp -> typ -> unit
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.