_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
df5e3e6b30d1118728ef1333975def2d5aa079271267047b0a065e7d7faa34d9
adomokos/haskell-katas
Ex41_FaApplicativesSpec.hs
module Ex41_FaApplicativesSpec ( spec ) where import Test.Hspec main :: IO () main = hspec spec {- functor definition class (Functor f) => Applicative f where pure :: a -> f a (<*>) :: f (a -> b) -> f a -> f b Applicative instance implementation for Maybe instance Applicative May...
null
https://raw.githubusercontent.com/adomokos/haskell-katas/be06d23192e6aca4297814455247fc74814ccbf1/test/Ex41_FaApplicativesSpec.hs
haskell
functor definition class (Functor f) => Applicative f where pure :: a -> f a (<*>) :: f (a -> b) -> f a -> f b Applicative instance implementation for Maybe instance Applicative Maybe where pure = Just Nothing <*> _ = Nothing (Just f) <*> something = fmap f some...
module Ex41_FaApplicativesSpec ( spec ) where import Test.Hspec main :: IO () main = hspec spec spec :: Spec spec = describe "Applicative" $ do it "applies function inside the Just" $ do pending ` shouldBe ` ( Just 6 ) _ _ _ < $ > _ _ _ < * > Just 3 ` shouldBe ` Just 6 it "applies function in list...
f46fdcc20e46b49f5a968a18951966c337319a5945aaefd73df7de2b77bb71fc
bendyworks/api-server
UserSpec.hs
# LANGUAGE QuasiQuotes # module Api.Controllers.UserSpec (main, spec) where import Control.Applicative ((<$>)) import Data.Functor.Identity (Identity (..)) import Data.Maybe (fromJust) import Data.Monoid ((<>)) import Hasql (q, single) import Api.Mappers.Resource as Resource import Api.Mappers.User as User import Ap...
null
https://raw.githubusercontent.com/bendyworks/api-server/9dd6d7c2599bd1c5a7e898a417a7aeb319415dd2/test/Api/Controllers/UserSpec.hs
haskell
# LANGUAGE QuasiQuotes # module Api.Controllers.UserSpec (main, spec) where import Control.Applicative ((<$>)) import Data.Functor.Identity (Identity (..)) import Data.Maybe (fromJust) import Data.Monoid ((<>)) import Hasql (q, single) import Api.Mappers.Resource as Resource import Api.Mappers.User as User import Ap...
2b87149b8d3e1437159b3270646326e623fd1ad40e7530d1fc281ae18af5f757
mpelleau/AbSolute
apron_domain.ml
open Csp open Tools open Apron open Apronext let scalar_mul_sqrt2 = let sqrt2_mpqf = Scalarext.of_float 0.707106781186548 in fun s -> Scalarext.mul s sqrt2_mpqf type point = float array Compute the square of the euclidian distance between two points . let sq_dist p1 p2 = let sum = ref 0. in Array.iter2 (fu...
null
https://raw.githubusercontent.com/mpelleau/AbSolute/9cad027f71b245618bbb566183d165c1c87e79e8/lib/domains/numeric/apron_domain.ml
ocaml
compute the most distant pair of points of an array of points, and the corresponding distance Translation functor for csp.prog to apron values *************************************************************** Some types and values that all the domains of apron can share These are generic and can be redefined in t...
open Csp open Tools open Apron open Apronext let scalar_mul_sqrt2 = let sqrt2_mpqf = Scalarext.of_float 0.707106781186548 in fun s -> Scalarext.mul s sqrt2_mpqf type point = float array Compute the square of the euclidian distance between two points . let sq_dist p1 p2 = let sum = ref 0. in Array.iter2 (fu...
0e151f62f3d405cb9a98f744f5fe317a035ea3feffab2f8c9bb2b35725f7c7f4
nuvla/api-server
resource_metadata_value_scope_enumeration_test.cljc
(ns sixsq.nuvla.server.resources.spec.resource-metadata-value-scope-enumeration-test (:require [clojure.test :refer [deftest]] [sixsq.nuvla.server.resources.spec.resource-metadata-value-scope-enumeration :as spec] [sixsq.nuvla.server.resources.spec.spec-test-utils :as stu])) (def valid {:values ["68000...
null
https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/test/sixsq/nuvla/server/resources/spec/resource_metadata_value_scope_enumeration_test.cljc
clojure
(ns sixsq.nuvla.server.resources.spec.resource-metadata-value-scope-enumeration-test (:require [clojure.test :refer [deftest]] [sixsq.nuvla.server.resources.spec.resource-metadata-value-scope-enumeration :as spec] [sixsq.nuvla.server.resources.spec.spec-test-utils :as stu])) (def valid {:values ["68000...
3cc75ba879fd42c7337d86493fd270ce8175c3b7398404871929993b941a9959
nikita-volkov/hasql
PTI.hs
module Hasql.Private.PTI where import qualified Database.PostgreSQL.LibPQ as LibPQ import Hasql.Private.Prelude hiding (bool) -- | A Postgresql type info data PTI = PTI {ptiOID :: !OID, ptiArrayOID :: !(Maybe OID)} -- | A Word32 and a LibPQ representation of an OID data OID = OID {oidWord32 :: !Word32, oidPQ :: !Lib...
null
https://raw.githubusercontent.com/nikita-volkov/hasql/fa707dd7931390538cc1f67f86e49ef90a758ec4/library/Hasql/Private/PTI.hs
haskell
| A Postgresql type info | A Word32 and a LibPQ representation of an OID * Constants
module Hasql.Private.PTI where import qualified Database.PostgreSQL.LibPQ as LibPQ import Hasql.Private.Prelude hiding (bool) data PTI = PTI {ptiOID :: !OID, ptiArrayOID :: !(Maybe OID)} data OID = OID {oidWord32 :: !Word32, oidPQ :: !LibPQ.Oid, oidFormat :: !LibPQ.Format} mkOID :: LibPQ.Format -> Word32 -> OID mkO...
f4f6e85c488b6a69ea99886e42e88b55d88ef3ce4d85b5ddcbe0c1a58e3f282b
teropa/nlp
score_tests.clj
(ns teropa.nlp.metrics.score-tests (:use teropa.nlp.metrics.score) (:use clojure.test)) (deftest accuracy-tests (is (= 2 (accuracy [1 2 3 4 5] [1 2 6 7 8]))) (is (= 0 (accuracy [5 4 3 2 1] [1 2 6 7 8])))) (deftest measure-tests (let [r #{1 2 3 4 5 9 10} ...
null
https://raw.githubusercontent.com/teropa/nlp/f89bc5a15b516208de1cfe2abe9692b7ed9a43e2/test/teropa/nlp/metrics/score_tests.clj
clojure
(ns teropa.nlp.metrics.score-tests (:use teropa.nlp.metrics.score) (:use clojure.test)) (deftest accuracy-tests (is (= 2 (accuracy [1 2 3 4 5] [1 2 6 7 8]))) (is (= 0 (accuracy [5 4 3 2 1] [1 2 6 7 8])))) (deftest measure-tests (let [r #{1 2 3 4 5 9 10} ...
4019379b4751a096b89c8725bcdf3ec435b71f2ce33310c25ba0a1eb6f6b4334
ucsd-progsys/nate
editor.ml
(*************************************************************************) (* *) (* Objective Caml LablTk library *) (* *) ,...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/labltk/browser/editor.ml
ocaml
*********************************************************************** Objective Caml LablTk library ...
, Kyoto University RIMS Copyright 1999 Institut National de Recherche en Informatique et en Automatique and Kyoto University . All rights reserved . This file is distributed under the terms of the GNU Library $ I d : editor.ml , v 1.41 2006/01/0...
b7aa93d41a6f1e61fec69b9f1ccbc68f05b85e5db1fa146a6c1f7dadcf6c82eb
ekmett/hask
Tensor.hs
# LANGUAGE KindSignatures , PolyKinds , MultiParamTypeClasses , FunctionalDependencies , ConstraintKinds , NoImplicitPrelude , TypeFamilies , TypeOperators , FlexibleContexts , FlexibleInstances , UndecidableInstances , UndecidableSuperClasses , RankNTypes , GADTs , ScopedTypeVariables , DataKinds , AllowAmbiguousTypes...
null
https://raw.githubusercontent.com/ekmett/hask/54ea964af8e0c1673ac2699492f4c07d977cb3c8/src/Hask/Tensor.hs
haskell
* Tensors * Monoids ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ * (&) ------------------------------------------------------...
# LANGUAGE KindSignatures , PolyKinds , MultiParamTypeClasses , FunctionalDependencies , ConstraintKinds , NoImplicitPrelude , TypeFamilies , TypeOperators , FlexibleContexts , FlexibleInstances , UndecidableInstances , UndecidableSuperClasses , RankNTypes , GADTs , ScopedTypeVariables , DataKinds , AllowAmbiguousTypes...
94115d3641b92aa064c6a5b262901f4d4968a3d18e41d3f4d91dee9b4e5d4e1f
monadbobo/ocaml-core
table_new.ml
pp camlp4o -I ` ocamlfind query sexplib ` -I ` ocamlfind query type_conv ` -I ` ocamlfind query bin_prot ` pa_type_conv.cmo pa_sexp_conv.cmo pa_bin_prot.cmo open Core.Std module Avltree = struct type ('k, 'v) t = | Empty | Node of ('k, 'v) t * 'k * 'v * int * ('k, 'v) t | Leaf of 'k * 'v We do this ' crazy...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib_test/hashtbl/table_new.ml
ocaml
see above for an explanation of why right cannot be a leaf see above for an explanation of why this cannot be a leaf going to be the new root node This must be the root estokes: for a real tree implementation we probably want fold_right, that way the elements come in order, but this is a hashtbl, so ...
pp camlp4o -I ` ocamlfind query sexplib ` -I ` ocamlfind query type_conv ` -I ` ocamlfind query bin_prot ` pa_type_conv.cmo pa_sexp_conv.cmo pa_bin_prot.cmo open Core.Std module Avltree = struct type ('k, 'v) t = | Empty | Node of ('k, 'v) t * 'k * 'v * int * ('k, 'v) t | Leaf of 'k * 'v We do this ' crazy...
75d76ca71fc4f2574e31c860eb588cb59a4b2a8c3b1d9698c4302afdc97c2d68
metabase/metabase
util_test.clj
(ns metabase-enterprise.util-test (:require [metabase.public-settings.premium-features :refer [defenterprise defenterprise-schema]] [schema.core :as s])) ;;; +----------------------------------------------------------------------------------------------------------------+ ;;; | ...
null
https://raw.githubusercontent.com/metabase/metabase/1f809593c2298ccf9c4070df3fa39d718eddb5d6/enterprise/backend/test/metabase_enterprise/util_test.clj
clojure
+----------------------------------------------------------------------------------------------------------------+ | Defenterprise Macro | +---------------------------------------------------------------------------------------...
(ns metabase-enterprise.util-test (:require [metabase.public-settings.premium-features :refer [defenterprise defenterprise-schema]] [schema.core :as s])) (defenterprise greeting "Returns an special greeting for anyone running the Enterprise Edition, regardless of token." :feature :none [username] (fo...
269852afd38ef2082952f42773fc66b272e876f6b779ff9d0a804a7608098b35
mattmundell/nightshade
edload.lisp
;;; Function load-editor, which loads the editor. (defun load-editor () (load "ed:exports") (load "ed:struct") ; (load "ed:struct-ed") (load "ed:charmacs") (load "ed:key-event") (ext::re-initialize-key-events) (load "ed:keysym-defs") (load "ed:input") (load "ed:line") (load "ed:ring") (load "ed:va...
null
https://raw.githubusercontent.com/mattmundell/nightshade/68e960eff95e007462f2613beabc6cac11e0dfa1/src/tools/edload.lisp
lisp
Function load-editor, which loads the editor. (load "ed:struct-ed") (load "ed:bit-stream") (load "ed:tty-stream")
(defun load-editor () (load "ed:exports") (load "ed:struct") (load "ed:charmacs") (load "ed:key-event") (ext::re-initialize-key-events) (load "ed:keysym-defs") (load "ed:input") (load "ed:line") (load "ed:ring") (load "ed:vars") (load "ed:buffer") (load "ed:macros") (load "ed:interp") (load...
252ddc2ba6f57ff63941ed60e3241389ef57bacf36f3f3343b8d1561ecb4fa80
grin-compiler/grin
CSE.hs
# LANGUAGE LambdaCase , TupleSections , ViewPatterns # module Transformations.ExtendedSyntax.Optimising.CSE where -- HINT: common sub-expression elimination import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import Data.Functor.Foldable as Foldable import Text.Printf import Lens.Micro ((^.)) impor...
null
https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/src/Transformations/ExtendedSyntax/Optimising/CSE.hs
haskell
HINT: common sub-expression elimination HINT: also save fetch (the inverse operation) for store and update TODO: AsPat HINT: location parameters might be updated in the called function, so forget their content TODO: Investigate this. Will the fetched variable, and the variable to be updated with always have the s...
# LANGUAGE LambdaCase , TupleSections , ViewPatterns # module Transformations.ExtendedSyntax.Optimising.CSE where import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import Data.Functor.Foldable as Foldable import Text.Printf import Lens.Micro ((^.)) import Lens.Micro.Extra (isn't) import Grin.Ext...
bd7b44f9018aa5832a70583623ad3274b866a0f998beffb9f02647b215935ae5
auser/beehive
bee_store_tests.erl
-module (bee_store_tests). -include_lib("eunit/include/eunit.hrl"). setup() -> ok. teardown(_X) -> ok. starting_test_() -> {spawn, {setup, fun setup/0, fun teardown/1, [ fun test_startup/0 ] } }. test_startup() -> passed.
null
https://raw.githubusercontent.com/auser/beehive/dfe257701b21c56a50af73c8203ecac60ed21991/lib/erlang/apps/beehive_router/test/bee_store_tests.erl
erlang
-module (bee_store_tests). -include_lib("eunit/include/eunit.hrl"). setup() -> ok. teardown(_X) -> ok. starting_test_() -> {spawn, {setup, fun setup/0, fun teardown/1, [ fun test_startup/0 ] } }. test_startup() -> passed.
beb267b786db04bf9b00a4a3a3166f392d706c6f47f7eaf4b0338a7a443162bc
mfoemmel/erlang-otp
wxGenericDirCtrl.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxGenericDirCtrl.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(wxGenericDirCtrl). -include("wxe....
0fc4495011a8a8a8a3c41f68eb31b1569d003a68fdb4f7cd01a3e4de57edc28b
justinethier/cyclone
when.scm
(import (scheme base) (scheme write)) ;(define-syntax my-when ; (syntax-rules () ( ( my - when test result1 result2 ... ) ; (if test ( begin result1 result2 ... ) ) ) ) ) (define-syntax my-when2 (syntax-rules () ((my-when test result1 result2 ...) (list result2 ...)))) (write (my-when...
null
https://raw.githubusercontent.com/justinethier/cyclone/a1c2a8f282f37ce180a5921ae26a5deb04768269/tests/when.scm
scheme
(define-syntax my-when (syntax-rules () (if test (define my-when2* (lambda (expr$28 rename$29 compare$30) (car ((lambda (tmp$42) (if tmp$42 tmp$42 (cons (error "no expansion for" expr$28) #f))) ((lambda (v.1$36) (if (pair? v.1$36) ...
(import (scheme base) (scheme write)) ( ( my - when test result1 result2 ... ) ( begin result1 result2 ... ) ) ) ) ) (define-syntax my-when2 (syntax-rules () ((my-when test result1 result2 ...) (list result2 ...)))) (write (my-when2 #t 1)) ( ( lambda ( ) ...
161ab7e2427bd9d7e7d78871c7253296668bcc0fcc67f843c562340dc84e3f7c
dundalek/closh
scripting_test.cljc
(ns closh.scripting-test (:require [clojure.test :refer [deftest are]] [closh.zero.core :refer [shx]] [closh.zero.pipeline :refer [process-output process-value pipe]])) (def sci? #?(:clj (System/getenv "__CLOSH_USE_SCI_EVAL__") :cljs false)) (def sci-complete? #?(:clj (System/ge...
null
https://raw.githubusercontent.com/dundalek/closh/b1a7fd310b6511048fbacb8e496f574c8ccfa291/test/closh/scripting_test.cljc
clojure
(if (System/getenv "__CLOSH_USE_SCI_EVAL__") #"Syntax error reading source at \(REPL:(\d+:\d+)\)" #"Syntax error \(ExceptionInfo\) compiling at \(REPL:(\d+:\d+)\)") #"Execution error at .* \(REPL:(\d+)\)"
(ns closh.scripting-test (:require [clojure.test :refer [deftest are]] [closh.zero.core :refer [shx]] [closh.zero.pipeline :refer [process-output process-value pipe]])) (def sci? #?(:clj (System/getenv "__CLOSH_USE_SCI_EVAL__") :cljs false)) (def sci-complete? #?(:clj (System/ge...
867264ae796c23ab6b092cf640d7b377559b75d2d9ad598a77f8f926b1c17645
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.AmountOfMoney.KA.Tests ( tests ) where import Prelude import Data.String import Test.Tast...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/tests/Duckling/AmountOfMoney/KA/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.AmountOfMoney.KA.Tests ( tests ) where import Prelude import Data.String import Test.Tasty import Duckling.Dimensions.Types import Duckling.Testing.Asserts import Duckling.AmountOfMoney.KA.Corpus tests :: TestTree tests = testGroup "KA Tests" [...
bdb49dcdde2b23b611501bb745f1a215b79e8aaf1e82220d2fe778c4f18e45bc
input-output-hk/cardano-ledger
Hash.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE StandaloneDeriving # module Cardano.Chain.Genesis.Hash ( GenesisHash (..), ) where import Cardano.Crypto.Hashing (Hash) import Cardano.Crypto.Raw (Raw) import Cardano.Ledger.Binary (DecCBOR, EncCBOR) import...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/49a84725c4c2ecabc80f6dac215881bc23920962/eras/byron/ledger/impl/src/Cardano/Chain/Genesis/Hash.hs
haskell
Used for debugging purposes only
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE StandaloneDeriving # module Cardano.Chain.Genesis.Hash ( GenesisHash (..), ) where import Cardano.Crypto.Hashing (Hash) import Cardano.Crypto.Raw (Raw) import Cardano.Ledger.Binary (DecCBOR, EncCBOR) import...
1e5b34f6c5de3d288338065a9325c30c9e9b75a948a76d3b124bca82588fec63
Ptival/chick
List.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} module Diff.List ( Diff (..), nKeeps, nRemoves, patch, ) where import Data.Aeson (ToJSON) import Data.Bifunctor (Bifunctor, bimap) import Diff.Utils (permute) import GH...
null
https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/lib/Diff/List.hs
haskell
# LANGUAGE OverloadedStrings # (prettyStr δa) ) >>
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # module Diff.List ( Diff (..), nKeeps, nRemoves, patch, ) where import Data.Aeson (ToJSON) import Data.Bifunctor (Bifunctor, bimap) import Diff.Utils (permute) import GHC.Generics (Generic) import Polysem...
f148bce7586eb40e9202d8a81f94068afaa0b8965f9ef0dc934983533ad425f3
thheller/shadow-experiments
db_test.clj
(ns shadow.experiments.grove.db-test (:require [shadow.experiments.grove.db :as db] [clojure.pprint :refer (pprint)] [clojure.test :as t :refer (deftest is)])) (def schema (db/configure {:a {:type :entity :attrs {:a-id [:primary-key number?] :many [:many :b] :...
null
https://raw.githubusercontent.com/thheller/shadow-experiments/a2170c2214778b6b9a9253166383396d64d395a4/src/test/shadow/experiments/grove/db_test.clj
clojure
(ns shadow.experiments.grove.db-test (:require [shadow.experiments.grove.db :as db] [clojure.pprint :refer (pprint)] [clojure.test :as t :refer (deftest is)])) (def schema (db/configure {:a {:type :entity :attrs {:a-id [:primary-key number?] :many [:many :b] :...
e28206db0e371e845f1537c8efeaafb59ff11c24361ad9de677c4acef8f0a3fc
isovector/cornelis
InfoWin.hs
{-# LANGUAGE OverloadedStrings #-} module Cornelis.InfoWin (closeInfoWindows, showInfoWindow, buildInfoBuffer) where import Prelude hiding (Left, Right) import Control.Monad (unless) import Control.Monad.State.Class import Cornelis.Pretty import Cornelis.Types import ...
null
https://raw.githubusercontent.com/isovector/cornelis/fa235e44630f749fb82ff420e0fe7213d943ae7f/src/Cornelis/InfoWin.hs
haskell
# LANGUAGE OverloadedStrings # Check if the info win still exists, and if so, just modify it Otherwise we need to rebuild it not listed in the buffer list, is throwaway Setup things in the buffer Setup things in the window TODO(sandy): Bad choice for a window, but good enough?
module Cornelis.InfoWin (closeInfoWindows, showInfoWindow, buildInfoBuffer) where import Prelude hiding (Left, Right) import Control.Monad (unless) import Control.Monad.State.Class import Cornelis.Pretty import Cornelis.Types import Cornelis.Utils (withBuffe...
d4169a6de64b0ae3e3c4c4e7156433faaf59a60a3a19298838e2c1fe5974cff2
input-output-hk/plutus
Common.hs
-- editorconfig-checker-disable-file # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module DeBruijn.Common where import Data.Semigroup import PlutusCore.MkPlc import UntypedPlutusCore as UPLC timesT :: Index -> (a -> a) -> a -> a timesT n = appEndo . stimes n . Endo -- a big debruijn index for testing...
null
https://raw.githubusercontent.com/input-output-hk/plutus/c8d4364d0e639fef4d5b93f7d6c0912d992b54f9/plutus-core/untyped-plutus-core/test/DeBruijn/Common.hs
haskell
editorconfig-checker-disable-file a big debruijn index for testing. the actual number does not matter, as long as it is sufficiently large to not interfere with the rest of the test code. An out-of-scope variable in these tests. A helper that just places index 0 to the binder (the only "reasonable" index for the b...
# LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module DeBruijn.Common where import Data.Semigroup import PlutusCore.MkPlc import UntypedPlutusCore as UPLC timesT :: Index -> (a -> a) -> a -> a timesT n = appEndo . stimes n . Endo ix99 :: DeBruijn ix99 = DeBruijn 999999 outVar :: UPLC.Term DeBruijn De...
ed9e06ad313c8a167bc44efc9223c6fc2fb952c1fbd0b11f75858539ca3d0af9
silky/quipper
Clifford.hs
This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the -- file COPYRIGHT for a list of authors, copyright holders, licensing, -- and other details. All rights reserved. -- -- ====================================================================== {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE ...
null
https://raw.githubusercontent.com/silky/quipper/1ef6d031984923d8b7ded1c14f05db0995791633/Libraries/Stabilizers/Clifford.hs
haskell
file COPYRIGHT for a list of authors, copyright holders, licensing, and other details. All rights reserved. ====================================================================== # LANGUAGE TypeSynonymInstances # # LANGUAGE BangPatterns # | This module contains an implementation of a quantum simulator that to p...
This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the # LANGUAGE FlexibleInstances # uses the stabilizer states of the group ( i.e. the group ) , elements of the group . The module provides an implementation of the group operators { x , y , z , h , s , controlled - x } which form a ...
0648e104a19f5912533cf9042456840e6fe0d77543deed09dd291a26630ec21f
WorksHub/client
verticals.cljc
(ns wh.components.verticals (:require #?(:cljs [wh.components.forms.views :as views]) [re-frame.core :refer [dispatch]] [wh.components.branding :as branding] [wh.components.icons :refer [icon]] [wh.util :as util])) (defn vertical-line [status vertical toggle-event] (when toggle-event #?(:c...
null
https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/common/src/wh/components/verticals.cljc
clojure
(ns wh.components.verticals (:require #?(:cljs [wh.components.forms.views :as views]) [re-frame.core :refer [dispatch]] [wh.components.branding :as branding] [wh.components.icons :refer [icon]] [wh.util :as util])) (defn vertical-line [status vertical toggle-event] (when toggle-event #?(:c...
9e6591a46f4df7bd79d9661f870a9acde367c5ba59180b098afbe3e26be22835
theodormoroianu/SecondYearCourses
LambdaChurch_20210415170921.hs
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415170921.hs
haskell
alpha-equivalence subst u x t defines [u/x]t, i.e., substituting u for x in t This substitution avoids variable captures so it is safe to be used when reducing terms with free variables (e.g., if evaluating inside lambda abstractions) ^ substitution term ^ variable to be substitutes ^ term in which the substit...
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
24c5165d9e83c7e43f3f9bb138d1fa3fb0e5a999729ccf243c649b2eb5b0450c
arachne-framework/arachne-docs
config.clj
(ns ^:config myproj.config (:require [arachne.core.dsl :as a] [arachne.http.dsl :as h] [arachne.pedestal.dsl :as p])) (a/id :myproj/widget-1 (a/component 'myproj.core/make-widget)) (a/id :myproj/runtime (a/runtime [:myproj/server :myproj/widget-1])) (a/id :myproj/hello (h/handler 'myproj.co...
null
https://raw.githubusercontent.com/arachne-framework/arachne-docs/5288932ea266639e41b139b19aaa109b1bf8b341/tutorial-code/http-requests/config/myproj/config.clj
clojure
(ns ^:config myproj.config (:require [arachne.core.dsl :as a] [arachne.http.dsl :as h] [arachne.pedestal.dsl :as p])) (a/id :myproj/widget-1 (a/component 'myproj.core/make-widget)) (a/id :myproj/runtime (a/runtime [:myproj/server :myproj/widget-1])) (a/id :myproj/hello (h/handler 'myproj.co...
2eee5137c1473403b97755c0e99486291aca45df01e0284cedea0624ab7df666
mirage/irmin-server
command_tree.ml
open Lwt.Syntax module Make (IO : Conn.IO) (Codec : Conn.Codec.S) (Store : Irmin.Generic_key.S) (Tree : Tree.S with type concrete = Store.Tree.concrete and type kinded_key = Store.Tree.kinded_key) (Commit : Commit.S with type hash = Store.hash and type tree = Tree.t) = ...
null
https://raw.githubusercontent.com/mirage/irmin-server/41a0c6189614b12cf571e78bd0f4f31373b19ad2/src/irmin-server-internal/command_tree.ml
ocaml
open Lwt.Syntax module Make (IO : Conn.IO) (Codec : Conn.Codec.S) (Store : Irmin.Generic_key.S) (Tree : Tree.S with type concrete = Store.Tree.concrete and type kinded_key = Store.Tree.kinded_key) (Commit : Commit.S with type hash = Store.hash and type tree = Tree.t) = ...
5b63361aacaf393b9fcd8a4c10bce84d1dfad865e1dd046ee2dcb6176c19bb6c
spechub/Hets
ParseTHF.hs
| Module : ./THF / ParseTHF.hs Description : A Parser for the TPTP - THF Syntax Copyright : ( c ) , DFKI Bremen 2012 ( c ) , DFKI Bremen 2011 License : GPLv2 or higher , see LICENSE.txt Maintainer : < > Stability : provisional Portability : por...
null
https://raw.githubusercontent.com/spechub/Hets/f582640a174df08d4c965d7c0a1ab24d1a31000d/THF/ParseTHF.hs
haskell
--------------------------------------------------------------------------- --------------------------------------------------------------------------- --------------------------------------------------------------------------- -} different position for unitary formula to prefer thf0 parse different position for bin...
| Module : ./THF / ParseTHF.hs Description : A Parser for the TPTP - THF Syntax Copyright : ( c ) , DFKI Bremen 2012 ( c ) , DFKI Bremen 2011 License : GPLv2 or higher , see LICENSE.txt Maintainer : < > Stability : provisional Portability : por...
0acb7192cf0f0554683b90f17cba5037a7411f0d27c63467e938f7b9b7e9b418
frizensami/singlang
ParserSpec.hs
module ParserSpec (spec) where import Test.Hspec import Test.QuickCheck import Control.Exception (evaluate) import Lexer import Parser spec :: Spec spec = do describe "Parser" $ do it "should parse simple let stmts" $ let stmts = parseTokens [TLet, TVar "x", TEq, TInt 5] ...
null
https://raw.githubusercontent.com/frizensami/singlang/cecc7f34083d9ae4f748093285dd4b7463fe15a0/test/ParserSpec.hs
haskell
module ParserSpec (spec) where import Test.Hspec import Test.QuickCheck import Control.Exception (evaluate) import Lexer import Parser spec :: Spec spec = do describe "Parser" $ do it "should parse simple let stmts" $ let stmts = parseTokens [TLet, TVar "x", TEq, TInt 5] ...
2778cd6657f851a5840346c7743f654ae9739fc996541bd8971ea0f4bf6bc9d3
ivankelly/gambit
m4.scm
(define (f1 x) (* 2 (f2 x))) (display "hello from m4") (newline) (c-declare #<<c-declare-end #include "x.h" c-declare-end ) (define x-initialize (c-lambda (char-string) bool "x_initialize")) (define x-display-name (c-lambda () char-string "x_display_name")) (define x-bell (c-lambda (int) void "x_bell"))
null
https://raw.githubusercontent.com/ivankelly/gambit/7377246988d0982ceeb10f4249e96badf3ff9a8f/doc/m4.scm
scheme
(define (f1 x) (* 2 (f2 x))) (display "hello from m4") (newline) (c-declare #<<c-declare-end #include "x.h" c-declare-end ) (define x-initialize (c-lambda (char-string) bool "x_initialize")) (define x-display-name (c-lambda () char-string "x_display_name")) (define x-bell (c-lambda (int) void "x_bell"))
1cd349acb253b74a53f7d65a17221c6ec329fa993e5dff6001744796923068cd
diagrams/geometry
Points.hs
----------------------------------------------------------------------------- -- | -- Module : Geometry.TwoD.Points Copyright : ( c ) 2014 - 2017 diagrams team ( see LICENSE ) -- License : BSD-style (see LICENSE) -- Maintainer : -- Special functions for points in R2 . -- -------------------------...
null
https://raw.githubusercontent.com/diagrams/geometry/945c8c36b22e71d0c0e4427f23de6614f4e7594a/src/Geometry/TwoD/Points.hs
haskell
--------------------------------------------------------------------------- | Module : Geometry.TwoD.Points License : BSD-style (see LICENSE) Maintainer : --------------------------------------------------------------------------- algorithm O(n log n). Returns clockwise list of points startin...
Copyright : ( c ) 2014 - 2017 diagrams team ( see LICENSE ) Special functions for points in R2 . # LANGUAGE TypeFamilies # module Geometry.TwoD.Points where import Data.List import Linear.Affine import Geometry.Space import Geometry.TwoD.Types (P2) import ...
25455ace23dc0d314089537db23699f72eecc74b2e438cf8b6dfaa288c3d6c9b
cyclone-scheme/winds
test.scm
(import (scheme base) (cyclone test) (libs semantic)) (define (run-tests) (test-begin "Winds testing") (test-group "Semantic versioning" (test-group "Sanitizing improper dots" (test "*.*.*" (sanitize-version ".")) (test "*.*.*" (sanitize-version ".1")) (test "1.*.*" (saniti...
null
https://raw.githubusercontent.com/cyclone-scheme/winds/6921b2f444d9469c5cbd497c7b018de8c2a57d89/tests/test.scm
scheme
(import (scheme base) (cyclone test) (libs semantic)) (define (run-tests) (test-begin "Winds testing") (test-group "Semantic versioning" (test-group "Sanitizing improper dots" (test "*.*.*" (sanitize-version ".")) (test "*.*.*" (sanitize-version ".1")) (test "1.*.*" (saniti...
b33aa9f3dde56a1224c3700b40c2656450856edd1e1c196f967173cd58281ae6
fhur/presto
core_test.clj
(ns presto.core-test (:require [clojure.test :refer :all] [presto.core :refer :all])) (expected-when "test-inc" inc :when [0] = 1 :when [1] = 2 :when [2] = 3 :when [3] = 4 :when [4] = 5 :when [5] = 6) (expected-when "test-*" * :when [1] = 1 :when [2123] = 2123 :when [7 2] = 14 :when [10 ...
null
https://raw.githubusercontent.com/fhur/presto/c03071c63412fe9ae689ba1ec7a9abeb13a91bfd/test/presto/core_test.clj
clojure
You can also change the :when for a fail message
(ns presto.core-test (:require [clojure.test :refer :all] [presto.core :refer :all])) (expected-when "test-inc" inc :when [0] = 1 :when [1] = 2 :when [2] = 3 :when [3] = 4 :when [4] = 5 :when [5] = 6) (expected-when "test-*" * :when [1] = 1 :when [2123] = 2123 :when [7 2] = 14 :when [10 ...
e3fe1995f333e01dde89763681438df920e0f93ead1577810c11c88813da280a
rmloveland/scheme48-0.53
graph.scm
Copyright ( c ) 1993 - 1999 by and . See file COPYING . ; Code to print out module dependencies in a format readable by the graph layout program AT&T DOT Release 1.0 . ( for information on DOT call the AT&T Software Technology Center Common Support Hotline ( 908 ) 582 - 7009 ) ; Follow link script up to the...
null
https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/debug/graph.scm
scheme
Code to print out module dependencies in a format readable by the Follow link script up to the actual linking (load-configuration "scheme/interfaces.scm") (load-configuration "scheme/packages.scm") (flatload initial-structures) (load "build/initial.scm") Load this and run it (load "scheme/debug/graph.scm") (depe...
Copyright ( c ) 1993 - 1999 by and . See file COPYING . graph layout program AT&T DOT Release 1.0 . ( for information on DOT call the AT&T Software Technology Center Common Support Hotline ( 908 ) 582 - 7009 ) setenv SDE_LICENSE_FILE /pls / local / lib / DOT / LICENSE.dot /pls / local / lib / DOT / dot ...
bb5000c26e0349f0592ac7866490b6482756befe58688fe583519297db6d9415
LaurentRDC/pandoc-pyplot
Pyplot.hs
{-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} | Module : $ header$ Description : Pandoc filter to create / Plotly figures from code blocks Copyright : ( c ) , 2019 License : GNU GPL , version 2 or above Maintainer : Stability : stable Portability : portab...
null
https://raw.githubusercontent.com/LaurentRDC/pandoc-pyplot/c709ec46fc4977a5f6eb223375c15889214465fd/src/Text/Pandoc/Filter/Pyplot.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # * For configuration purposes * For testing and internal purposes only | Main routine to include plots. Python plotting scripts. All other possible blocks are ignored. All code blocks that have the @.pyplot@ / @.plotly@ class will be considered figures....
| Module : $ header$ Description : Pandoc filter to create / Plotly figures from code blocks Copyright : ( c ) , 2019 License : GNU GPL , version 2 or above Maintainer : Stability : stable Portability : portable This module defines a Pandoc filter @makePlot@ and related funct...
db808f2d591315ef1efdbbe078949f6e8911285f16347dce62666f70a0cb66fa
tek/ribosome
BootError.hs
-- |The fatal error type module Ribosome.Host.Data.BootError where |This type represents the singular fatal error used by Ribosome . -- -- Contrary to all other errors, this one is used with 'Error' instead of 'Stop'. -- It is only thrown from intialization code of interpreters when operation of the plugin is imposs...
null
https://raw.githubusercontent.com/tek/ribosome/a676b4f0085916777bfdacdcc761f82d933edb80/packages/host/lib/Ribosome/Host/Data/BootError.hs
haskell
|The fatal error type Contrary to all other errors, this one is used with 'Error' instead of 'Stop'. It is only thrown from intialization code of interpreters when operation of the plugin is impossible due to the error condition.
module Ribosome.Host.Data.BootError where |This type represents the singular fatal error used by Ribosome . newtype BootError = BootError { unBootError :: Text } deriving stock (Eq, Show) deriving newtype (IsString, Ord)
2ee92bb14c37c2bf8648d7c209ee3a2fc2a4d71ed16bd3b6c8958082af0ca96c
rowangithub/DOrder
057_a-cppr.ml
let make_array n i = assert (0 <= i && i < n); 5 let update (i:int) (n:int) des (x:int) = let a (j:int) = if i=j then x else des j in a let print_int (n:int) = () let f (m:int) src des = let rec bcopy (m:int) i (src: int->int) (des:int->int) = if i >= m then des else let des = update i m des...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/mochi2/benchs/057_a-cppr.ml
ocaml
let make_array n i = assert (0 <= i && i < n); 5 let update (i:int) (n:int) des (x:int) = let a (j:int) = if i=j then x else des j in a let print_int (n:int) = () let f (m:int) src des = let rec bcopy (m:int) i (src: int->int) (des:int->int) = if i >= m then des else let des = update i m des...
6aa5f1bc688894a1891e271a969b8634c3f100670fac93c977be957b70d6a8d4
VisionsGlobalEmpowerment/webchange
icon_images.cljs
(ns webchange.ui.components.icon.system.icon-images) (def data [:svg {:xmlns "" :width "14" :height "14" :viewBox "0 0 14 14" :class-name "stroke-colored" :fill "none" :stroke "#3453A1" :stroke-width "1" :stroke-miterlimit "10"} [:path {:d "M10.1857 3.5H3.82209C3.64636 3...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/acef27b5ce23ba1d34346eb07989ef639500b9b5/src/cljs/webchange/ui/components/icon/system/icon_images.cljs
clojure
(ns webchange.ui.components.icon.system.icon-images) (def data [:svg {:xmlns "" :width "14" :height "14" :viewBox "0 0 14 14" :class-name "stroke-colored" :fill "none" :stroke "#3453A1" :stroke-width "1" :stroke-miterlimit "10"} [:path {:d "M10.1857 3.5H3.82209C3.64636 3...
0107c0197a2b2956e6744c27d409b543d189c74ec668abd165e07a5331664f80
easyuc/EasyUC
ecHiGoal.ml
(* -------------------------------------------------------------------- *) open EcUtils open EcLocation open EcSymbols open EcParsetree open EcTypes open EcFol open EcEnv open EcMatching open EcBaseLogic open EcProofTerm open EcCoreGoal open EcCoreGoal.FApi open EcLowGoal module Sid = EcIdent.Sid module Mid = EcId...
null
https://raw.githubusercontent.com/easyuc/EasyUC/67a983a7263ee8234452b9c157c4cb4f3d5f7b26/uc-dsl/ucdsl-proj/src/ECsrc/ecHiGoal.ml
ocaml
-------------------------------------------------------------------- -------------------------------------------------------------------- -------------------------------------------------------------------- -------------------------------------------------------------------- -----------------------------------...
open EcUtils open EcLocation open EcSymbols open EcParsetree open EcTypes open EcFol open EcEnv open EcMatching open EcBaseLogic open EcProofTerm open EcCoreGoal open EcCoreGoal.FApi open EcLowGoal module Sid = EcIdent.Sid module Mid = EcIdent.Mid module Sp = EcPath.Sp module ER = EcReduction module PT = EcPr...
57b0a7ff1e99abecd9945eea11e0be0059f2217e1d3da63200fbe69b397e4261
FranklinChen/hugs98-plus-Sep2006
Types.hs
----------------------------------------------------------------------------- -- | -- Module : System.Win32.Types Copyright : ( c ) , 1997 - 2003 -- License : BSD-style (see the file libraries/base/LICENSE) -- Maintainer : Vuokko < > -- Stability : provisional -- Portability : portable ...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/Win32/System/Win32/Types.hs
haskell
--------------------------------------------------------------------------- | Module : System.Win32.Types License : BSD-style (see the file libraries/base/LICENSE) Stability : provisional Portability : portable --------------------------------------------------------------------------- ----------...
Copyright : ( c ) , 1997 - 2003 Maintainer : Vuokko < > A collection of FFI declarations for interfacing with Win32 . module System.Win32.Types ( module System.Win32.Types , nullPtr ) where import Data.Maybe import Foreign import Foreign.C import Numeric (showHex) get things working on Win64...
9ea06aa040cd806f09d20ceeb064d816bcdd09652bd94d570fbb4522e25806dd
RedBrainLabs/system-graph
utils.clj
(ns com.redbrainlabs.system-graph.utils "Utillity fns for working with Prismatic's Graph and fnk" (:require [plumbing.graph :as graph] [schema.core :as s])) (defn topo-sort "Returns the topological sort of a Prismatic graph" [g] (-> g graph/->graph keys vec)) TODO : see if plumbing already has...
null
https://raw.githubusercontent.com/RedBrainLabs/system-graph/928d5d7de34047e54b0f05d33cf5104d0d9be53a/src/com/redbrainlabs/system_graph/utils.clj
clojure
[[#schema.core.One{:schema {Keyword Any, :funk Any, :x Any}, :optional? false, :name arg0}]] TODO: handle other fnks (verifying input/output schemas) and the variadic case compose the positional function as well if present
(ns com.redbrainlabs.system-graph.utils "Utillity fns for working with Prismatic's Graph and fnk" (:require [plumbing.graph :as graph] [schema.core :as s])) (defn topo-sort "Returns the topological sort of a Prismatic graph" [g] (-> g graph/->graph keys vec)) TODO : see if plumbing already has...
7c7ddc753370f3957207ddcba34105fa114a745c9beef05a150ab8ef9994a471
srid/ka
Listing.hs
# LANGUAGE RecursiveDo # module Ka.Sidebar.Listing (render) where import Control.Monad.Fix (MonadFix) import Data.Tagged import qualified Data.Text as T import Ka.Graph (ThingName (..)) import qualified Ka.Plugin.Calendar as Calendar import Ka.Route import Reflex.Dom.Core type SearchQuery = Tagged "SearchQuery" Text...
null
https://raw.githubusercontent.com/srid/ka/9d020738215a752d30674063384cdc6bf10c4067/src/Ka/Sidebar/Listing.hs
haskell
| Clear the input field when this event fires | Include the given thing in the listing? If the user is not searching, we apply the default filters. If they are currently searching, however, we don't apply them (allowing them to search through the otherwise filtered out things.)
# LANGUAGE RecursiveDo # module Ka.Sidebar.Listing (render) where import Control.Monad.Fix (MonadFix) import Data.Tagged import qualified Data.Text as T import Ka.Graph (ThingName (..)) import qualified Ka.Plugin.Calendar as Calendar import Ka.Route import Reflex.Dom.Core type SearchQuery = Tagged "SearchQuery" Text...
9b346fb383da8b75d171716a2dc2cefcba81aa3dac7d75f941d0a6346f651287
W-Net-AI/LISP-CV
main.lisp
(defpackage "LISP-EXECUTABLE.EXAMPLE" (:use "COMMON-LISP" "LISP-EXECUTABLE")) (in-package "LISP-EXECUTABLE.EXAMPLE") ;;See <lisp-cv-src-dir>/macros.lisp for instructions (define-program example-program (&options help) (cv:with-captured-camera (cap 0 :width 640 :height 480) help (let* ((window-name "EXA...
null
https://raw.githubusercontent.com/W-Net-AI/LISP-CV/10d5c7c1a6fa026de488ca89a28e8a5c519ff8f2/extras/main.lisp
lisp
See <lisp-cv-src-dir>/macros.lisp for instructions
(defpackage "LISP-EXECUTABLE.EXAMPLE" (:use "COMMON-LISP" "LISP-EXECUTABLE")) (in-package "LISP-EXECUTABLE.EXAMPLE") (define-program example-program (&options help) (cv:with-captured-camera (cap 0 :width 640 :height 480) help (let* ((window-name "EXAMPLE-PROGRAM")) (cv:with-named-window (window-n...
98945d2918d8dcb42b84f492609c9442e8d9598a3be6a58e62866604625616f1
sheyll/b9-vm-image-builder
Actions.hs
| Convenient Shake ' Action 's for ' B9 ' rules . module B9.Shake.Actions ( b9InvocationAction, buildB9File, ) where import B9 import Control.Lens ((?~)) import Development.Shake import GHC.Stack -- | Convert a 'B9ConfigAction' action into a Shake 'Action'. This is just -- an alias for 'runB9ConfigActionWit...
null
https://raw.githubusercontent.com/sheyll/b9-vm-image-builder/4d2af80d3be4decfce6c137ee284c961e3f4a396/src/lib/B9/Shake/Actions.hs
haskell
| Convert a 'B9ConfigAction' action into a Shake 'Action'. This is just an alias for 'runB9ConfigActionWithOverrides' since 'Action' is an instance of 'MonadIO' and 'runB9ConfigActionWithOverrides' work on any . | An action that does the equivalent of ( args ! ! 0 ) ( args ! ! 1 ) ... ( args ! ! ( length args - 1)...
| Convenient Shake ' Action 's for ' B9 ' rules . module B9.Shake.Actions ( b9InvocationAction, buildB9File, ) where import B9 import Control.Lens ((?~)) import Development.Shake import GHC.Stack b9InvocationAction :: HasCallStack => B9ConfigAction a -> B9ConfigOverride -> Action a b9InvocationAction x y = ...
e3cbf2b572c0584da5e20857cdc04c2fe875a66e51d2929c7e056e5481a942d3
skeuchel/needle
WeakenRelation.hs
{-# LANGUAGE GADTs #-} module KnotCore.Elaboration.Lemma.WeakenRelation where import Coq.StdLib import Coq.Syntax import KnotCore.Syntax import KnotCore.Elaboration.Core import KnotCore.Elaboration.Eq import Control.Applicative import Control.Arrow import Control.Monad ((>=>)) import Data.Maybe (catMaybes) import D...
null
https://raw.githubusercontent.com/skeuchel/needle/25f46005d37571c1585805487a47950dcd588269/src/KnotCore/Elaboration/Lemma/WeakenRelation.hs
haskell
# LANGUAGE GADTs #
module KnotCore.Elaboration.Lemma.WeakenRelation where import Coq.StdLib import Coq.Syntax import KnotCore.Syntax import KnotCore.Elaboration.Core import KnotCore.Elaboration.Eq import Control.Applicative import Control.Arrow import Control.Monad ((>=>)) import Data.Maybe (catMaybes) import Data.Traversable (for, t...
805bcb0a5d39c93c5eec5aedf2326820630511fc02579d2ae2c723f39c8f27e2
froggey/Mezzano
dispatch.lisp
;;;; libdispatch inspired concurrency API. (defpackage :mezzano.sync.dispatch (:use :cl) (:local-nicknames (:sup :mezzano.supervisor) (:pool :mezzano.sync.thread-pool) (:sync :mezzano.sync) (:clos :mezzano.clos)) (:export #:context #:local-co...
null
https://raw.githubusercontent.com/froggey/Mezzano/e9c4e426ae9732daa45cd7fd0f812a627b79dea6/system/dispatch.lisp
lisp
libdispatch inspired concurrency API. Sources A context owns a set of queues, sources, threads, etc. Process pending functions. There is work pending but no active runner. (Re)start it. There's pending work, this should be a barrier function. Otherwise, dispatch all pending work units until a barrier or end-of-...
(defpackage :mezzano.sync.dispatch (:use :cl) (:local-nicknames (:sup :mezzano.supervisor) (:pool :mezzano.sync.thread-pool) (:sync :mezzano.sync) (:clos :mezzano.clos)) (:export #:context #:local-context #:make-dispatch-context ...
4be63037823c3435a24388c56cf098f758257d5474640731930febc02fd97e22
polyfy/polylith
tap.clj
(ns polylith.clj.core.help.tap (:require [polylith.clj.core.help.shared :as s])) (defn help [cm] (str " Opens (or closes/cleans) a portal window ()\n" " where " (s/key "tap>" cm) " statements are sent to. This command is used from the shell and\n" " is mainly used internally when developing the po...
null
https://raw.githubusercontent.com/polyfy/polylith/36b75565032dea88ee20cdc0bc5af18f6f4d4cf4/components/help/src/polylith/clj/core/help/tap.clj
clojure
(ns polylith.clj.core.help.tap (:require [polylith.clj.core.help.shared :as s])) (defn help [cm] (str " Opens (or closes/cleans) a portal window ()\n" " where " (s/key "tap>" cm) " statements are sent to. This command is used from the shell and\n" " is mainly used internally when developing the po...
bd30d26fc30095a6d348382549a8671c6e05016bef1a1e02d07131b0aed9cfbf
vehicle-lang/vehicle
Normalised.hs
module Vehicle.Expr.Normalised where import Data.Serialize (Serialize) import GHC.Generics (Generic) import Vehicle.Compile.Prelude.Contexts (BoundCtx) import Vehicle.Expr.DeBruijn import Vehicle.Expr.Normalisable import Vehicle.Syntax.AST ----------------------------------------------------------------------------- ...
null
https://raw.githubusercontent.com/vehicle-lang/vehicle/3a3548f9b48c3969212ccb51e954d4d4556ea815/vehicle/src/Vehicle/Expr/Normalised.hs
haskell
--------------------------------------------------------------------------- Normalised expressions | A normalised expression. Internal invariant is that it should always be well-typed. | A normalised type --------------------------------------------------------------------------- Spines and environments | A list ...
module Vehicle.Expr.Normalised where import Data.Serialize (Serialize) import GHC.Generics (Generic) import Vehicle.Compile.Prelude.Contexts (BoundCtx) import Vehicle.Expr.DeBruijn import Vehicle.Expr.Normalisable import Vehicle.Syntax.AST data NormExpr types = VUniverse UniverseLevel | VLam (NormBinder types) (...
ed52bed42623bf23f4a32cb57fc3df5f91bee82e965483eae4be4cdacba4de71
zalky/reflet
workflow.cljs
(ns reflet.client.ui.workflow (:require [goog.string :as gstr] [goog.string.format] [reflet.client.ui.workflow.impl :as impl] [reflet.core :as f] [reflet.debug.glyphs :as g])) ;;;; Utility (def option-labels ["A" "B" "C" "D"]) (defn- stroke [props] (-> {:stroke...
null
https://raw.githubusercontent.com/zalky/reflet/fe88f7fd7d761dfa40af0e8f83d7f390e5a914b6/client/clojure/reflet/client/ui/workflow.cljs
clojure
Utility Workflows
(ns reflet.client.ui.workflow (:require [goog.string :as gstr] [goog.string.format] [reflet.client.ui.workflow.impl :as impl] [reflet.core :as f] [reflet.debug.glyphs :as g])) (def option-labels ["A" "B" "C" "D"]) (defn- stroke [props] (-> {:stroke-width "2px"}...
9ed1378bbc710783cd89b88613698e29cfa1174c9af2dba7a818d9678f1fe825
tokenmill/timewords
fuzzy.clj
(ns timewords.fuzzy.fuzzy (:require [clj-time.core :refer [date-time]] [timewords.fuzzy.en.en :as en] [timewords.fuzzy.lt.lt :as lt]) (:import (org.joda.time DateTime))) (defn to-date "Parses string dates into components represented by numeric values: 1-12 for months 1-31 for days...
null
https://raw.githubusercontent.com/tokenmill/timewords/431ef3aa9eb899f2abd47cebc20a232f8c226b4a/src/timewords/fuzzy/fuzzy.clj
clojure
(ns timewords.fuzzy.fuzzy (:require [clj-time.core :refer [date-time]] [timewords.fuzzy.en.en :as en] [timewords.fuzzy.lt.lt :as lt]) (:import (org.joda.time DateTime))) (defn to-date "Parses string dates into components represented by numeric values: 1-12 for months 1-31 for days...
37370f70365b5621bedf2200faed970a4049c452a3c6ab6127f3e1d5e75fd025
msp-strath/feet
Parser.hs
# LANGUAGE TupleSections # # LANGUAGE GeneralizedNewtypeDeriving # module Feet.Parser where import Control.Applicative import Control.Monad hiding (fail) import Control.Arrow ((***)) import Data.List import Data.Char import Text.Read (readMaybe) import Feet.Syntax import Feet.Frontend newtype DBP x = DBP {dbp :: [St...
null
https://raw.githubusercontent.com/msp-strath/feet/ff503e4122a5cbaf433fcffe9582ba7c8408e852/src/Feet/Parser.hs
haskell
TODO: [ _P' | (v : _X') <- xs ]" We avoid ambiguity between telescopes and radicals by disallowing radical variables (for there is never need to annotate a variable).
# LANGUAGE TupleSections # # LANGUAGE GeneralizedNewtypeDeriving # module Feet.Parser where import Control.Applicative import Control.Monad hiding (fail) import Control.Arrow ((***)) import Data.List import Data.Char import Text.Read (readMaybe) import Feet.Syntax import Feet.Frontend newtype DBP x = DBP {dbp :: [St...
a00b2d3eb55dde92a69f0f96ab8b469873bd96bda5d1fedac2a248dc552912c4
mflatt/sirmail
info.rkt
#lang setup/infotab (define collection 'multi) (define deps '("base" "compatibility-lib" "drracket" ; for browser/htmltext "gui-lib" "net-lib" "parser-tools-lib" "scheme-lib" "syntax-color-lib" "san...
null
https://raw.githubusercontent.com/mflatt/sirmail/5a08636d126ea04b5c903ab42a6e7eb2b143d864/info.rkt
racket
for browser/htmltext
#lang setup/infotab (define collection 'multi) (define deps '("base" "compatibility-lib" "gui-lib" "net-lib" "parser-tools-lib" "scheme-lib" "syntax-color-lib" "sandbox-lib" "pict-lib" ...
9d45bac9ad845142afd0f4bbbcf81b1b15cb011963e4299c2fb1978dc356cb85
drjdn/p5scm
pr_o.cppo.ml
#include "pr_o.orig.ml" value pr_o e = Eprinter.apply pr_str_item Pprintf.empty_pc e;
null
https://raw.githubusercontent.com/drjdn/p5scm/b12ccf2b5d34ae338c91ecd0ecc0d3ebd22009b3/src/lib/camlp5/pr_o.cppo.ml
ocaml
#include "pr_o.orig.ml" value pr_o e = Eprinter.apply pr_str_item Pprintf.empty_pc e;
5e6b34408ce5c071689e2dfd918c134b2dff6b078802cae9e410eee637415a27
phoe/protest
variable.lisp
;;;; src/protocol/elements/variable.lisp (in-package #:protest/protocol) (defclass protocol-variable (protocol-data-type) ((%name :reader name :initarg :name :initform (error "Must provide NAME.")) (%value-type :accessor value-type :initarg :value-type :initfor...
null
https://raw.githubusercontent.com/phoe/protest/be885130044d9950758a2d1726246c4c114692c1/src/protocol/elements/variable.lisp
lisp
src/protocol/elements/variable.lisp
(in-package #:protest/protocol) (defclass protocol-variable (protocol-data-type) ((%name :reader name :initarg :name :initform (error "Must provide NAME.")) (%value-type :accessor value-type :initarg :value-type :initform t) (%initial-value :accessor initial...
59c37379f89c8923b3d8c875986dfb4c293483fe8dfa47f863e787bfc91c079d
FranklinChen/hugs98-plus-Sep2006
PixelTransfer.hs
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelTransfer Copyright : ( c ) 2002 - 2005 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : -- Stability : provision...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/OpenGL/Graphics/Rendering/OpenGL/GL/PixelRectangles/PixelTransfer.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelTransfer License : BSD-style (see the file libraries/OpenGL/LICENSE) Maintainer : Stability : provisional Portability : portable -----------------------...
Copyright : ( c ) 2002 - 2005 This module corresponds to a part of section 3.6.1 ( Pixel Storage Modes ) of the OpenGL 1.5 specs . module Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelTransfer ( PixelTransferStage(..), mapColor, mapStencil, indexShift, indexOffset, depthScale, depthBias, rgba...
914381394c975264ff57cf3a90b23ebeb494740936781009ad5a54b14b318c8b
ArulselvanMadhavan/haskell-first-principles
Mem.hs
module Mem where import Data.Monoid import Test.QuickCheck newtype Mem s a = Mem { runMem :: s -> (a, s) } instance (Eq a, Monoid a) => Monoid (Mem s a) where mempty = Mem (\s -> (mempty, s)) mappend f g = ( \s - > runMem f . snd . ) mappend f g = Mem (\s -> ...
null
https://raw.githubusercontent.com/ArulselvanMadhavan/haskell-first-principles/06e0c71c502848c8e75c8109dd49c0954d815bba/chapter15/test/Mem.hs
haskell
module Mem where import Data.Monoid import Test.QuickCheck newtype Mem s a = Mem { runMem :: s -> (a, s) } instance (Eq a, Monoid a) => Monoid (Mem s a) where mempty = Mem (\s -> (mempty, s)) mappend f g = ( \s - > runMem f . snd . ) mappend f g = Mem (\s -> ...
a2f6a6de299a36599fd05c47ced14f3c3d808aaea4691c5db6bbe43bd9c67ab5
minio/minio-hs
RemoveBucket.hs
#!/usr/bin/env stack -- stack --resolver lts-14.11 runghc --package minio-hs -- MinIO Haskell SDK , ( C ) 2017 , 2018 MinIO , 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 ...
null
https://raw.githubusercontent.com/minio/minio-hs/c52f2811fe8eb2a657f1467d0798067a15deb395/examples/RemoveBucket.hs
haskell
stack --resolver lts-14.11 runghc --package minio-hs 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. S...
#!/usr/bin/env stack MinIO Haskell SDK , ( C ) 2017 , 2018 MinIO , Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , import Network.Minio import Prelude | The following example uses 's play server at . The end...
52fe5151ff10419518ba1a57efacf852c66e40ee3d9efb733a16803508492f18
oscoin/oscoin
Ledger.hs
# LANGUAGE UndecidableInstances # -- | Core ledger data types. -- module Oscoin.Data.Ledger where -- Since the handler functions implemented in this module may -- eventually be turned into smart contracts, we keep track of -- all imports and try to keep them to a minimum. import Oscoin.Prelude ...
null
https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/src/Oscoin/Data/Ledger.hs
haskell
| Core ledger data types. Since the handler functions implemented in this module may eventually be turned into smart contracts, we keep track of all imports and try to keep them to a minimum. ----------------------------------------------------------------------------- ---------------------------------------------...
# LANGUAGE UndecidableInstances # module Oscoin.Data.Ledger where import Oscoin.Prelude ( Either(..) , Eq(..) , Generic , Int , IsString , Map , Maybe(..) , Monoid(..) ...
2576801bae82bed9082aa0871911ad6325600cc66168c5d9162b21c390ab3e7b
Hexstream/definitions-systems
checking.lisp
(in-package #:definitions-systems) (defclass defsys:check-definition-mixin (defsys:system) ()) (defgeneric defsys:base-definition-class (system)) (defclass defsys:base-definition-class-mixin (defsys:check-definition-mixin) ((%base-definition-class :initarg :base-definition-class :reader ...
null
https://raw.githubusercontent.com/Hexstream/definitions-systems/03ef8090479f65f96017319a65fb2d7afe031de5/checking.lisp
lisp
(in-package #:definitions-systems) (defclass defsys:check-definition-mixin (defsys:system) ()) (defgeneric defsys:base-definition-class (system)) (defclass defsys:base-definition-class-mixin (defsys:check-definition-mixin) ((%base-definition-class :initarg :base-definition-class :reader ...
e4b5977ea7f020992419b06b246fa0dc32a502f0e19693b695514f06d4414953
Jell/euroclojure-2016
kioo_meta.cljs
(ns euroclojure.kioo-meta (:require-macros [euroclojure.utils :refer [code-snippet]]) (:require [kioo.reagent :as kioo :refer-macros [deftemplate]])) (deftemplate slide "templates/kioo_meta.html" [] {[:#kioo-says] (kioo/content "hello!") [:#code-snippet] (kioo/substitute [:div (code-snippet "html...
null
https://raw.githubusercontent.com/Jell/euroclojure-2016/a8ca883e8480a4616ede19995aaacd4a495608af/src/euroclojure/kioo_meta.cljs
clojure
(ns euroclojure.kioo-meta (:require-macros [euroclojure.utils :refer [code-snippet]]) (:require [kioo.reagent :as kioo :refer-macros [deftemplate]])) (deftemplate slide "templates/kioo_meta.html" [] {[:#kioo-says] (kioo/content "hello!") [:#code-snippet] (kioo/substitute [:div (code-snippet "html...
26141ced0ab8f0ff4fb728ff796c3a95223a593e3a6916e7cadafe44d9d54dcb
kunstmusik/pink
dynamics.clj
(ns pink.dynamics "Functions for dealing with dynamics/amplitude of audio" (:require [pink.util :refer [create-buffer getd generator gen-recur]] [pink.config :refer [*buffer-size* *sr*]])) ;; Ensure unchecked math used for this namespace (set! *unchecked-math* :warn-on-boxed) (def ^:const ^:private ^{...
null
https://raw.githubusercontent.com/kunstmusik/pink/7d37764b6a036a68a4619c93546fa3887f9951a7/src/main/pink/dynamics.clj
clojure
Ensure unchecked math used for this namespace this one needs some thought... (generator [ain asig (yield out) )
(ns pink.dynamics "Functions for dealing with dynamics/amplitude of audio" (:require [pink.util :refer [create-buffer getd generator gen-recur]] [pink.config :refer [*buffer-size* *sr*]])) (set! *unchecked-math* :warn-on-boxed) (def ^:const ^:private ^{:tag 'double} LOG10D20 (/ (Math/log 10) 20)) ...
f372dbefd238851ff3392d71e1ff2f906df7d7210fda19a1c7b44d9c7377475c
fgalassi/cs61a-sp11
3.4.scm
(define (make-account balance secret-password) (let ((unauthorized 0)) (define (reset-unauthorized) (set! unauthorized 0)) (define (incorrect-password . args) (set! unauthorized (+ unauthorized 1)) (if (> unauthorized 7) (begin (reset-unauthorized) (call-the-cops))) "Incorrect passw...
null
https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/homework/3.4.scm
scheme
(define (make-account balance secret-password) (let ((unauthorized 0)) (define (reset-unauthorized) (set! unauthorized 0)) (define (incorrect-password . args) (set! unauthorized (+ unauthorized 1)) (if (> unauthorized 7) (begin (reset-unauthorized) (call-the-cops))) "Incorrect passw...
21eeabb07c0f1831203a83e1094e6bc0220b4915a33950e26ed59253d98ede8f
schemeorg-community/index.scheme.org
chibi.scm
( ;; r7rs small ((scheme base) . #t) ((scheme case-lambda) . #t) ((scheme complex) . #t) ((scheme char) . #t) ((scheme cxr) . #t) ((scheme eval) . #t) ((scheme file) . #t) ((scheme inexact) . #t) ((scheme lazy) . #t) ((scheme load) . #t) ((scheme process-context) . #t) ((scheme r5rs) . #t) (...
null
https://raw.githubusercontent.com/schemeorg-community/index.scheme.org/32e1afcfe423a158ac8ce014f5c0b8399d12a1ea/filters/chibi.scm
scheme
r7rs small r7rs large red r7rs large tangerine
( ((scheme base) . #t) ((scheme case-lambda) . #t) ((scheme complex) . #t) ((scheme char) . #t) ((scheme cxr) . #t) ((scheme eval) . #t) ((scheme file) . #t) ((scheme inexact) . #t) ((scheme lazy) . #t) ((scheme load) . #t) ((scheme process-context) . #t) ((scheme r5rs) . #t) ((scheme read) . ...
3de95ab05951006e29d5420a421616f29cdb219eb2a2a7d5bf8f990373b23021
tweag/ormolu
conlike-out.hs
foo :: Int foo = 5 {-# INLINE CONLIKE foo #-} bar :: Int bar = 6 {-# INLINE CONLIKE bar #-}
null
https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/signature/inline/conlike-out.hs
haskell
# INLINE CONLIKE foo # # INLINE CONLIKE bar #
foo :: Int foo = 5 bar :: Int bar = 6
ed5dedfdb41916f778a13dc254f694d56ae94d4571121aa1bc35c6695f892e1d
OlivierSohn/hamazed
Interleave.hs
# LANGUAGE NoImplicitPrelude # module Test.Imj.Interleave ( testInterleaveHalves ) where import Imj.Prelude import Data.List(elem,splitAt) import Imj.Geo.Discrete.Interleave import . Graphics . Text . Render shouldBe :: (Show a, Eq a) => a -> a -> IO () sh...
null
https://raw.githubusercontent.com/OlivierSohn/hamazed/c0df1bb60a8538ac75e413d2f5bf0bf050e5bc37/imj-base/test/Test/Imj/Interleave.hs
haskell
------------------------------------------------------------------------ verify formula for countUsefulInterleavedVariations: print values ------------------------------------------------------------------------
# LANGUAGE NoImplicitPrelude # module Test.Imj.Interleave ( testInterleaveHalves ) where import Imj.Prelude import Data.List(elem,splitAt) import Imj.Geo.Discrete.Interleave import . Graphics . Text . Render shouldBe :: (Show a, Eq a) => a -> a -> IO () sh...
c48ac47c849eb821c0c5ee4d7c6c16589ca0397a76711ea005dcd5678f7269c3
typedclojure/typedclojure
load_test.clj
(ns ^:typed/skip-from-repo-root clojure.core.typed.test.load-test (:require [clojure.core.typed.load :as load] [clojure.test :refer :all])) ;; ensures evaluation occurs (deftest evaluation-test (is (try (some-> (find-ns 'clojure.core.typed.test.typed-load.eval) ns-name ...
null
https://raw.githubusercontent.com/typedclojure/typedclojure/a959d97f0e7e3d17c4f62fd8fc16e10bcc322c2d/typed/clj.checker/test/clojure/core/typed/test/load_test.clj
clojure
ensures evaluation occurs
(ns ^:typed/skip-from-repo-root clojure.core.typed.test.load-test (:require [clojure.core.typed.load :as load] [clojure.test :refer :all])) (deftest evaluation-test (is (try (some-> (find-ns 'clojure.core.typed.test.typed-load.eval) ns-name remove-ns) (l...
a1754c46a7e62dbd0e0644897a1e64594f15e7359eb3756955feff33a23162e0
jayunit100/RudolF
vennnmr.clj
(ns BioClojure.test.vennnmr (:use [BioClojure.vennnmr]) (:use [clojure.test])) (def mseq (slurp "resources/venn_nmr/sequence.txt")) (def mshift (slurp "resources/venn_nmr/assigned-shifts.prot")) (def mstat (slurp "resources/venn_nmr/bmrbstats.txt")) (deftest test-parse-bmrb-stats (is (parse-sequence mseq))...
null
https://raw.githubusercontent.com/jayunit100/RudolF/8936bafbb30c65c78b820062dec550ceeea4b3a4/bioclojure/old/vennnmr.clj
clojure
does this test actually do anything? is this an effective test? what follows is for informal testing
(ns BioClojure.test.vennnmr (:use [BioClojure.vennnmr]) (:use [clojure.test])) (def mseq (slurp "resources/venn_nmr/sequence.txt")) (def mshift (slurp "resources/venn_nmr/assigned-shifts.prot")) (def mstat (slurp "resources/venn_nmr/bmrbstats.txt")) (deftest test-parse-bmrb-stats (deftest test-parse-assign...
8a24b2d72871dfc3c59fa0e4e6e723147dea52147fdb5d68d2ea6a308c507c09
AshleyYakeley/Truth
DynamicSupertype.hs
module Pinafore.Language.Type.DynamicSupertype where import Data.Shim import Language.Expression.Dolan import Shapes type PolyGreatestDynamicSupertype :: GroundTypeKind -> forall (dv :: DolanVariance) -> DolanVarianceKind dv -> Type data PolyGreatestDynamicSupertype ground dv gt where GeneralPolyGreatestDynamicSu...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/ac72ad5903f4ad329aad18733a5ea16e00efc0a8/Pinafore/pinafore-language/lib/Pinafore/Language/Type/DynamicSupertype.hs
haskell
module Pinafore.Language.Type.DynamicSupertype where import Data.Shim import Language.Expression.Dolan import Shapes type PolyGreatestDynamicSupertype :: GroundTypeKind -> forall (dv :: DolanVariance) -> DolanVarianceKind dv -> Type data PolyGreatestDynamicSupertype ground dv gt where GeneralPolyGreatestDynamicSu...
5e84ac241a52abb6bf965743199f55c2e777e3bc736d5af743ba7e5a0087fa78
tallaproject/talla
talla_dir_cowboy.erl
%%% Copyright ( c ) 2016 The Talla Authors . All rights reserved . %%% Use of this source code is governed by a BSD-style %%% license that can be found in the LICENSE file. %%% %%% ----------------------------------------------------------- @author < > %%% @doc Cowboy Middleware. %%% @end %%% -------------------...
null
https://raw.githubusercontent.com/tallaproject/talla/72cfbd8f48705a7a390cac2b8310ab7550c21c15/apps/talla_dir/src/talla_dir_cowboy.erl
erlang
Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. ----------------------------------------------------------- @doc Cowboy Middleware. @end ----------------------------------------------------------- API.
Copyright ( c ) 2016 The Talla Authors . All rights reserved . @author < > -module(talla_dir_cowboy). -export([on_request/1, on_response/4]). on_request(Request) -> {Method, _} = cowboy_req:method(Request), {Path, _} = cowboy_req:path(Request), {Version, _} = cowboy_req:version(Request), ...
f0486348fa1b206a5340ff2ccf415bb225406c995f28d983f7a631ac8e3d5c47
Ericson2314/lighthouse
Fixed.hs
{-# OPTIONS -Wall -fno-warn-unused-binds #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Fixed Copyright : ( c ) 2005 , 2006 -- License : BSD-style (see the file libraries/base/LICENSE) -- Maintainer : < > -- Stability : experimen...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/base/Data/Fixed.hs
haskell
# OPTIONS -Wall -fno-warn-unused-binds # --------------------------------------------------------------------------- | Module : Data.Fixed License : BSD-style (see the file libraries/base/LICENSE) Stability : experimental Portability : portable This module defines a \"Fixed\" type for fixed-prec...
Copyright : ( c ) 2005 , 2006 Maintainer : < > The parameter to Fixed is any type that 's an instance of HasResolution . HasResolution has a single method that gives the resolution of the Fixed type . Parameter types E6 and E12 ( for 10 ^ 6 and 10 ^ 12 ) are defined , as well as type synonyms...
728de86dbeb8230c9f6ca7516b6e44a434fd29618806664f3751d574ea5a7a9d
stevenproctor/lumberjack
core.clj
(ns lumberjack.core (require [clj-time.core :as ttime] [clj-time.coerce :as coerce] [clj-time.format :as tformat])) (def ^:dynamic *timestamp-format* "dd/MMM/yyy:HH:mm:ss Z") (defn parse-datetime [timestamp] (tformat/parse (tformat/formatter *timestamp-format*) timestamp)) (defn timestamp-...
null
https://raw.githubusercontent.com/stevenproctor/lumberjack/0d43bef62e645c74b3d44bf88d3bc2f224a449d1/src/lumberjack/core.clj
clojure
(ns lumberjack.core (require [clj-time.core :as ttime] [clj-time.coerce :as coerce] [clj-time.format :as tformat])) (def ^:dynamic *timestamp-format* "dd/MMM/yyy:HH:mm:ss Z") (defn parse-datetime [timestamp] (tformat/parse (tformat/formatter *timestamp-format*) timestamp)) (defn timestamp-...
0a1f775d89e25d131aeb8ea3689e1878e7661239202cbc82432f92874e92a23f
emqx/emqx-stomp
emqx_stomp_connection.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the L...
null
https://raw.githubusercontent.com/emqx/emqx-stomp/07167183f3288abe555c4f73dafd1488216c1f11/src/emqx_stomp_connection.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_stomp_connection). -behaviour(gen_server). -include("emqx_stomp.hrl"). -export([ start_...
6a69cc01ef76f920b70ffd9ec0a8a3025e60d5251b8354622255851e21193132
brendanhay/gogol
UpdateOrganizationSettings.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/77394c4e0f5bd729e6fe27119701c45f9d5e1e9a/lib/services/gogol-securitycenter/gen/Gogol/SecurityCenter/Organizations/UpdateOrganizationSettings.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Updates an organization\'s settings. /See:/ < Security Command Center API Reference> for @securitycenter.organizations.updateOrganizationSettings@. * Resource ** Constructing a Request 'SecurityCenterOrganizationsUpdateOrgani...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
d4812dd4cbd4ee26dc94958f5e4a8ec6a6cc08a9ee0a9717d42d96efb8460e5f
fpco/unliftio
Memoize.hs
# LANGUAGE GeneralizedNewtypeDeriving # -- | Memoize the results of actions. In other words: actions -- will be run once, on demand, and their results saved. -- -- Exceptions semantics: if a synchronous exception is thrown while performing -- the computation, that result will be saved and rethrown each time ' runMemo...
null
https://raw.githubusercontent.com/fpco/unliftio/d7ac43b9ae69efea0ca911aa556852e9f95af128/unliftio/src/UnliftIO/Memoize.hs
haskell
| Memoize the results of actions. In other words: actions will be run once, on demand, and their results saved. Exceptions semantics: if a synchronous exception is thrown while performing the computation, that result will be saved and rethrown each time @since 0.2.8.0 | A \"run once\" value, with results saved....
# LANGUAGE GeneralizedNewtypeDeriving # ' runMemoized ' is called subsequently . ' module UnliftIO.Memoize ( Memoized , runMemoized , memoizeRef , memoizeMVar ) where import Control.Applicative as A import Control.Monad (join) import Control.Monad.IO.Unlift import UnliftIO.Exception import UnliftIO.IORef i...
c7316a6b31d47560a37697673a76a0fe554a81d7847e404c41c4b16e71a21617
jaspervdj/firefly
Internal.hs
-------------------------------------------------------------------------------- # LANGUAGE ForeignFunctionInterface # module Firefly.Video.Texture.Internal ( CTexture , Texture (..) , textureFromImage , textureFromPng , textureSize , textureSlice ) where -------------------------------...
null
https://raw.githubusercontent.com/jaspervdj/firefly/71e1f5f11293272bedc26444446553a24ee318ad/src/Firefly/Video/Texture/Internal.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----...
# LANGUAGE ForeignFunctionInterface # module Firefly.Video.Texture.Internal ( CTexture , Texture (..) , textureFromImage , textureFromPng , textureSize , textureSlice ) where import Control.Applicative ((<$>)) import Foreign.C.String import Foreign.C.Typ...
cdd1ad55be148b4b5ebfc552d3e893da7a856bd2ee54b79d1f3982e1d1443e7d
clojure-emacs/enrich-classpath
version.clj
(ns cider.enrich-classpath.version) (def data-version 1) (defn long-not= [^long x, ^long y] ;; coerces to primitive long at the edges (not= x y)) (defn outdated-data-version? [m] (-> m :enrich-classpath/version ;; can be nil (handling maps before versioning was introduced) (or 0) (long-not= dat...
null
https://raw.githubusercontent.com/clojure-emacs/enrich-classpath/9ca0daeeffab8f90445715227792394ccd6cb9ec/src/cider/enrich_classpath/version.clj
clojure
coerces to primitive long at the edges can be nil (handling maps before versioning was introduced)
(ns cider.enrich-classpath.version) (def data-version 1) (not= x y)) (defn outdated-data-version? [m] (-> m (or 0) (long-not= data-version)))
4e028975febe5a985ff4c192fccfe1d1c370e5c9aad50f71dfd1f188b6b4e8bb
patrickt/bracer
Expressions.hs
module Language.Bracer.Backends.C.Parser.Expressions where import Prelude () import Overture hiding (try) import Language.Bracer import Language.Bracer.Backends.C.Syntax as C import Language.Bracer.Backends.C.Parser.Internal import Language.Bracer.Backends.C.Parser.Types () import qualified Text....
null
https://raw.githubusercontent.com/patrickt/bracer/ebad062d421f7678ddafc442245e361c0423cb1b/Language/Bracer/Backends/C/Parser/Expressions.hs
haskell
module Language.Bracer.Backends.C.Parser.Expressions where import Prelude () import Overture hiding (try) import Language.Bracer import Language.Bracer.Backends.C.Syntax as C import Language.Bracer.Backends.C.Parser.Internal import Language.Bracer.Backends.C.Parser.Types () import qualified Text....
995febb7e658ccfca74518e2869737f9f82e68a53be0e5b823018a9f7b0fa124
fulcro-legacy/semantic-ui-wrapper
ui_container.cljs
(ns fulcrologic.semantic-ui.elements.container.ui-container (:require [fulcrologic.semantic-ui.factory-helpers :as h] ["semantic-ui-react/dist/commonjs/elements/Container/Container" :default Container])) (def ui-container "A container limits content to a maximum width. Props: - as (custom): An ele...
null
https://raw.githubusercontent.com/fulcro-legacy/semantic-ui-wrapper/b0473480ddfff18496df086bf506099ac897f18f/semantic-ui-wrappers-shadow/src/main/fulcrologic/semantic_ui/elements/container/ui_container.cljs
clojure
(ns fulcrologic.semantic-ui.elements.container.ui-container (:require [fulcrologic.semantic-ui.factory-helpers :as h] ["semantic-ui-react/dist/commonjs/elements/Container/Container" :default Container])) (def ui-container "A container limits content to a maximum width. Props: - as (custom): An ele...
2cb0f4892a2e59d7520e637059aa63171698b5c655605eb5ece0e81ec080f66a
fishcakez/acceptor_pool
acceptor_pool_test.erl
-module(acceptor_pool_test). -behaviour(acceptor_pool). -behaviour(acceptor). -export([start_link/1]). -export([init/1]). -export([acceptor_init/3, acceptor_continue/3, acceptor_terminate/2]). start_link(Spec) -> acceptor_pool:start_link(?MODULE, Spec). init(Spec) when is_map(Spec) -> {o...
null
https://raw.githubusercontent.com/fishcakez/acceptor_pool/3cbc455c103b8885401f161fd765a9b2f18203f2/test/acceptor_pool_test.erl
erlang
-module(acceptor_pool_test). -behaviour(acceptor_pool). -behaviour(acceptor). -export([start_link/1]). -export([init/1]). -export([acceptor_init/3, acceptor_continue/3, acceptor_terminate/2]). start_link(Spec) -> acceptor_pool:start_link(?MODULE, Spec). init(Spec) when is_map(Spec) -> {o...
3a00da49fcba79fba54b5ec91c08702aa5b20e261e9c75901314884ed5a2d0f6
GaloisInc/semmc
Formula.hs
# LANGUAGE TypeApplications # module Formula ( tests ) where import qualified Data.Set as Set import qualified Test.Tasty as T import qualified Test.Tasty.HUnit as T import qualified SemMC.Formula as F import SemMC.Toy ( Toy ) tests :: T.TestTree tests = T.testGroup "Formula" [ sanityChecks ] sanityChecks...
null
https://raw.githubusercontent.com/GaloisInc/semmc/4dc4439720b3b0de8812a68f8156dc89da76da57/semmc-toy/tests/Formula.hs
haskell
# LANGUAGE TypeApplications # module Formula ( tests ) where import qualified Data.Set as Set import qualified Test.Tasty as T import qualified Test.Tasty.HUnit as T import qualified SemMC.Formula as F import SemMC.Toy ( Toy ) tests :: T.TestTree tests = T.testGroup "Formula" [ sanityChecks ] sanityChecks...
ebfcc9083d3454b25065e28e370daee2d3c47f5cb041a5590eba515bad50443b
jolby/arrayspace
multiarray_test.clj
(ns arrayspace.multiarray-test (:require [clojure.test :refer :all] [arrayspace.multiarray :refer :all] [arrayspace.core :refer [mget mset! make-distribution make-multi-array]] [arrayspace.domain :refer [element-count-of-shape]] [arrayspace.distributions.partitioned-buffer])) ;; ;; Utility functions ;...
null
https://raw.githubusercontent.com/jolby/arrayspace/400d32d486c544b6cc9a1b1e84be7062af7d7f97/test/arrayspace/multiarray_test.clj
clojure
Utility functions Fixtures
(ns arrayspace.multiarray-test (:require [clojure.test :refer :all] [arrayspace.multiarray :refer :all] [arrayspace.core :refer [mget mset! make-distribution make-multi-array]] [arrayspace.domain :refer [element-count-of-shape]] [arrayspace.distributions.partitioned-buffer])) (defn n-dim-progression ...
7de68314f9cd1f37bd9b0c1266afcebeb6320ccf57d57ca6edd8dd436922910b
dbuenzli/hyperbib
hyperbib_front.ml
--------------------------------------------------------------------------- Copyright ( c ) 2019 University of Bern . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
null
https://raw.githubusercontent.com/dbuenzli/hyperbib/a1def764f7f58b29bd732dacaa167e73497f6175/src/front/hyperbib_front.ml
ocaml
Removable [true] iff [r]'s top-left or bottom-left or is within [o]'s vertical bounds [true] iff top-left or bottom-left of [r] is in [o]. [true iff top-left or bottom-left within [o] height and not too far. We need that to unregister the on_mousedown closure Remove a potential previous listener Entit...
--------------------------------------------------------------------------- Copyright ( c ) 2019 University of Bern . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
efb9b5dc60f310dbbeaa9038d40afdef767bcc3e6102e54a38080fe230bb3a65
oakes/Lightmod
dynadoc.cljs
(ns lightmod.dynadoc (:require [play-cljs.core] [dynadoc.core]))
null
https://raw.githubusercontent.com/oakes/Lightmod/141d1671d485326ef1f37b057c4116a2618dd948/src/cljs/lightmod/dynadoc.cljs
clojure
(ns lightmod.dynadoc (:require [play-cljs.core] [dynadoc.core]))
7f1e6dbfedf45aa159a0d1e39218599e24075fffeb227d0b44cf720133149478
argp/bap
test.ml
Copyright 2009 , 2010 , 2011 , 2012 , 2013 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...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/libtracewrap/libtrace/piqi/piqi/piqirun-ocaml/test.ml
ocaml
superposition operator * Testing packed tests for integer fields tests for packed integers
Copyright 2009 , 2010 , 2011 , 2012 , 2013 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...
70f7fdf7803210a30ec61ff383f892c187e1a38085bd9ad7a99f7a9b65ad15d4
input-output-hk/cardano-sl
GetTransactions.hs
# LANGUAGE TypeApplications # # OPTIONS_GHC -fno - warn - orphans # module Test.Spec.GetTransactions (spec) where import Universum import Control.Lens (to) import Control.Monad.Except (runExceptT) import Data.Acid (update) import qualified Data.ByteString as B import qualifie...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/wallet/test/unit/Test/Spec/GetTransactions.hs
haskell
| Prepare some fixtures using the 'PropertyM' context to prepare the data, scope (after the bracket initialisation). i.e. with 'Address'(es) generated in a principled way, and not random. | Returns the address that is automatically created with the wallet. the defaut account of the wallet should have a unique addr...
# LANGUAGE TypeApplications # # OPTIONS_GHC -fno - warn - orphans # module Test.Spec.GetTransactions (spec) where import Universum import Control.Lens (to) import Control.Monad.Except (runExceptT) import Data.Acid (update) import qualified Data.ByteString as B import qualifie...
2b6437c33e5440f9ff985053af49cf74607f7b5758943029434062577838d494
avsm/mirage-duniverse
type_abstract.mli
(** Abstract types helpers. An abstract type in the sense of the typerep library is a type whose representation is unknown. Such a type has only a name that can be used to provide and register custom implementation of generics. This is typically a type obtained with the following syntax extension: {...
null
https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/typerep/lib/type_abstract.mli
ocaml
* Abstract types helpers. An abstract type in the sense of the typerep library is a type whose representation is unknown. Such a type has only a name that can be used to provide and register custom implementation of generics. This is typically a type obtained with the following syntax extension: {[ ...
module Make0 (X : Named_intf.S0) : Typerepable.S0 with type t := X.t module Make1 (X : Named_intf.S1) : Typerepable.S1 with type 'a t := 'a X.t module Make2 (X : Named_intf.S2) : Typerepable.S2 with type ('a, 'b) t := ('a, 'b) X.t module Make3 (X : Named_intf.S3) : Typerepable.S3 with type ('a, 'b, 'c) t :=...
bc7e9557d492bc25310002e2a2b069cf8507bad44761659e71a238b7cbad384a
eeng/shevek
repository_test.clj
(ns shevek.dashboards.repository-test (:require [clojure.test :refer [deftest use-fixtures is]] [shevek.test-helper :refer [it wrap-unit-tests]] [shevek.asserts :refer [submaps? submap? without?]] [shevek.dashboards.repository :as r] [shevek.db :refer [db]] ...
null
https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/test/clj/shevek/dashboards/repository_test.clj
clojure
Here we have only the report-id So the dashboards reports don't appear independently in the reports page
(ns shevek.dashboards.repository-test (:require [clojure.test :refer [deftest use-fixtures is]] [shevek.test-helper :refer [it wrap-unit-tests]] [shevek.asserts :refer [submaps? submap? without?]] [shevek.dashboards.repository :as r] [shevek.db :refer [db]] ...
0b303dba3e33f49ad073600b6e3d78a45b3a0232e0f0a31ca42a1921805ed2ce
funcatron/tron
tron_mode.clj
(ns funcatron.tron.modes.tron-mode (:gen-class) (:require [funcatron.tron.util :as fu] [clojure.java.io :as cio] [taoensso.timbre :refer [log trace debug info warn error fatal report logf tracef debugf infof warnf errorf fatalf reportf s...
null
https://raw.githubusercontent.com/funcatron/tron/cfe0c227f9c3ad88b3d072b0319954786afb5f15/src/clojure/funcatron/tron/modes/tron_mode.clj
clojure
no more messages to the instances we're removing write the file load the file and make sure it's a valid func bundle failed find the Func bundle and enable it couldn't find the bundle failed find the Func bundle and enable it couldn't find the bundle do this twice load the bundles load a bunch of the namesp...
(ns funcatron.tron.modes.tron-mode (:gen-class) (:require [funcatron.tron.util :as fu] [clojure.java.io :as cio] [taoensso.timbre :refer [log trace debug info warn error fatal report logf tracef debugf infof warnf errorf fatalf reportf s...
5eec963c8f1d53fe580ce319cffb950312938a3f55bb2a0476aee5df1b815d9e
arcadia-unity/catcon
pprint_base.clj
pprint_base.clj -- part of the pretty printer for Clojure Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By us...
null
https://raw.githubusercontent.com/arcadia-unity/catcon/6c69f424d3c14639ff11a3ea7d9da6aa81328f8a/Arcadia/Internal/clojure/pprint/pprint_base.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not re...
pprint_base.clj -- part of the pretty printer for Clojure Copyright ( c ) . All rights reserved . Author : April 3 , 2009 (in-ns 'clojure.pprint) (def ^:dynamic ^{:doc "Bind to true if you want write to use pretty printing", :added "1.2"} *print-pretty* true) ^{:doc "Th...
8851d78e54564982051abf82aea728b47e4cb14335068a4976e928d6b39729c0
mbj/stratosphere
Group.hs
module Stratosphere.Synthetics.Group ( Group(..), mkGroup ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Tag import Stratosphere.Value data Group = Group {name :: (Value Pr...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/synthetics/gen/Stratosphere/Synthetics/Group.hs
haskell
module Stratosphere.Synthetics.Group ( Group(..), mkGroup ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Tag import Stratosphere.Value data Group = Group {name :: (Value Pr...
852e9fbaf006afea11d262ee80cff0459b1322d0713a58e6265af9ade1014b13
zadean/xqerl
prod_UnaryLookup_SUITE.erl
-module('prod_UnaryLookup_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['UnaryLookup-001'/1]). -export(['UnaryLookup-002'/1]). -export(['UnaryLookup-0...
null
https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/prod/prod_UnaryLookup_SUITE.erl
erlang
-module('prod_UnaryLookup_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['UnaryLookup-001'/1]). -export(['UnaryLookup-002'/1]). -export(['UnaryLookup-0...
74c11fdc2383fe693a79b8850c5cd8b3528db90bae16de7f1715799f7b22a12d
janestreet/merlin-jst
parser_raw.mli
(* The type of tokens. *) type token = | WITH | WHILE_LWT | WHILE | WHEN | VIRTUAL | VAL | UNDERSCORE | UIDENT of (string) | TYPE | TRY_LWT | TRY | TRUE | TO | TILDE | THEN | STRUCT | STRING of (string * Location.t * string option) | STAR | SIG | SEMISEMI | SEMI | RPAREN ...
null
https://raw.githubusercontent.com/janestreet/merlin-jst/9c3b60c98d80b56af18ea95c27a0902f0244659a/src/ocaml/preprocess/parser_raw.mli
ocaml
The type of tokens. This exception is raised by the monolithic API functions. The monolithic API. The incremental API. The indexed type of terminal symbols. The indexed type of nonterminal symbols. The inspection API. The entry point(s) to the incremental API.
type token = | WITH | WHILE_LWT | WHILE | WHEN | VIRTUAL | VAL | UNDERSCORE | UIDENT of (string) | TYPE | TRY_LWT | TRY | TRUE | TO | TILDE | THEN | STRUCT | STRING of (string * Location.t * string option) | STAR | SIG | SEMISEMI | SEMI | RPAREN | REC | RBRACKET | RB...
e61b2962c68547dc2b3a45e319043495dcdfaf591b6fa29c610949f1d28992b4
korya/efuns
manyargs.ml
let manyargs a b c d e f g h i j k = print_string "a = "; print_int a; print_newline(); print_string "b = "; print_int b; print_newline(); print_string "c = "; print_int c; print_newline(); print_string "d = "; print_int d; print_newline(); print_string "e = "; print_int e; print_newline(); print_string "f ...
null
https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/inliner/perf/Moretest/manyargs.ml
ocaml
let manyargs a b c d e f g h i j k = print_string "a = "; print_int a; print_newline(); print_string "b = "; print_int b; print_newline(); print_string "c = "; print_int c; print_newline(); print_string "d = "; print_int d; print_newline(); print_string "e = "; print_int e; print_newline(); print_string "f ...
ed6fd30f7bf46b29ad7ef0c327f49be2eeb3983891f89f376cdb466e829319ed
carld/compiler-tutorial
compiler.scm
Scheme compiler for x86_64 (load "tests-driver.scm") (load "tests-1.1-req.scm") (load "tests-1.2-req.scm") (load "tests-1.3-req.scm") (load "tests-1.4-req.scm") (load "tests-1.5-req.scm") (load "tests-1.6-req.scm") (load "tests-1.7-req.scm") (load "tests-1.8-req.scm") (load "tests-1.9-req.scm") The lower bits of ...
null
https://raw.githubusercontent.com/carld/compiler-tutorial/4b5d275336cadcccd8e4d4752c0646d655402b1f/compiler.scm
scheme
#b00101111 Encode an immediate value in a machine word with a type tag Declare a global symbol with properties describing it as a code generator for a primitive operation. The *emitter* has no (lambda (si env arg* ...) ) to allow a case-lambda *emitter* enabling variadic emitters Defines procedures that check fo...
Scheme compiler for x86_64 (load "tests-driver.scm") (load "tests-1.1-req.scm") (load "tests-1.2-req.scm") (load "tests-1.3-req.scm") (load "tests-1.4-req.scm") (load "tests-1.5-req.scm") (load "tests-1.6-req.scm") (load "tests-1.7-req.scm") (load "tests-1.8-req.scm") (load "tests-1.9-req.scm") The lower bits of ...
878e3f5e3173e902c075ae2defd2938621ffc855db7f2d51379f6eefdfd40f97
Simre1/yampa-sdl2
Colour.hs
Copyright ( c ) 2008 , 2009 is hereby granted , free of charge , to any person obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , including without limitation the rights to use , copy , modify , merge , publish , distri...
null
https://raw.githubusercontent.com/Simre1/yampa-sdl2/c0ad94b9ba50d545f842eaf0916c1acf093514c3/src/Data/Colour.hs
haskell
|Datatypes for representing the human perception of colour. Includes common operations for blending and compositing colours. The most common way of creating colours is either by name Methods of specifying Colours can be found in by using other libraries. interfacing with libraries wanting 'Data.Word.Wor...
Copyright ( c ) 2008 , 2009 is hereby granted , free of charge , to any person obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , including without limitation the rights to use , copy , modify , merge , publish , distri...
f4ff1a1f908bf69036befcc7cd26f15b7f0c09e07d6618677b7dd2966cadd675
unisonweb/unison
Pretty.hs
module Unison.Test.Util.Pretty ( test, ) where import Control.Monad import Data.String (fromString) import EasyTest import qualified Unison.Util.Pretty as Pretty test :: Test () test = scope "util.pretty" . tests $ [ scope "Delta.Semigroup.<>.associative" $ do replicateM_ 100 $ do d1 <- ra...
null
https://raw.githubusercontent.com/unisonweb/unison/54e96e1e898e7e25f5b0e75e24fd35f9365f6c99/lib/unison-pretty-printer/tests/Unison/Test/Util/Pretty.hs
haskell
module Unison.Test.Util.Pretty ( test, ) where import Control.Monad import Data.String (fromString) import EasyTest import qualified Unison.Util.Pretty as Pretty test :: Test () test = scope "util.pretty" . tests $ [ scope "Delta.Semigroup.<>.associative" $ do replicateM_ 100 $ do d1 <- ra...
c0b86717bcbd24bf9bb7dc86bb0998cd7e00c3391208ba0de5e3baa8faee526d
tek/ribosome
WindowTest.hs
module Ribosome.Test.WindowTest where import Polysemy.Test (UnitTest, assertEq, unitTest, (===)) import Test.Tasty (TestTree, testGroup) import Ribosome.Api.Window (ensureMainWindow) import Ribosome.Host.Api.Data (Window) import Ribosome.Host.Api.Data (bufferSetOption, nvimCommand, vimGetCurrentBuffer, vimGetCurrentW...
null
https://raw.githubusercontent.com/tek/ribosome/800642404ee8bf6e1d563ad3440d3e191e5be62d/packages/ribosome/test/Ribosome/Test/WindowTest.hs
haskell
module Ribosome.Test.WindowTest where import Polysemy.Test (UnitTest, assertEq, unitTest, (===)) import Test.Tasty (TestTree, testGroup) import Ribosome.Api.Window (ensureMainWindow) import Ribosome.Host.Api.Data (Window) import Ribosome.Host.Api.Data (bufferSetOption, nvimCommand, vimGetCurrentBuffer, vimGetCurrentW...
efa5f546c588e85e63f11046c69c6e26364423b348488306c172229ae1947ad0
discus-lang/ddc
PrimStore.hs
-- | Construct applications of primitive store operators. module DDC.Core.Salt.Compounds.PrimStore ( rTop , ukTop , xStoreSize, xStoreSize2 , xRead, xWrite , xPeek, xPoke , xPeekBounded, xPokeBounded , xPlusPtr , xCastPtr , xGlobal, xGlobali ...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core-salt/DDC/Core/Salt/Compounds/PrimStore.hs
haskell
| Construct applications of primitive store operators. Regions -------------------------------------------------------------------- | The top-level region. This region lives for the whole program, and is used to store objects whose types don't have region annotations (like function closures and Unit values). ...
module DDC.Core.Salt.Compounds.PrimStore ( rTop , ukTop , xStoreSize, xStoreSize2 , xRead, xWrite , xPeek, xPoke , xPeekBounded, xPokeBounded , xPlusPtr , xCastPtr , xGlobal, xGlobali , typeOfPrimStore) where import DDC.Core.Salt.Compoun...
61112103205f8b8daf9d497f6e0fb87695d31cce1e1ae75c0c51c4a9992eb76b
haskell-numerics/hmatrix
TestGSL.hs
import Numeric.GSL.Tests main :: IO () main = runTests 20
null
https://raw.githubusercontent.com/haskell-numerics/hmatrix/2694f776c7b5034d239acb5d984c489417739225/packages/tests/src/TestGSL.hs
haskell
import Numeric.GSL.Tests main :: IO () main = runTests 20
f1a8702c1396d6792b9f67dfd49fd8209482bf68de024f19453d2c5a8f1b72d5
Helium4Haskell/helium
Ex8.hs
module Ex8 where f y (h:t) = t y
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeerrors/Edinburgh/Ex8.hs
haskell
module Ex8 where f y (h:t) = t y