_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 |
|---|---|---|---|---|---|---|---|---|
25a5ec23d769cf6e53c9424bf22d6bc2e4e1de22187d8c4472ea337fdc9f8764 | stamourv/synth | synth.rkt | #lang racket
(require math/array)
TODO does not accept arrays directly
TODO try to get deforestation for arrays . does that require
;; non-strict arrays? lazy arrays?
(array-strictness #f)
TODO this slows down a bit , it seems , but improves memory use
(provide fs seconds->samples)
(define fs 44100)
(defi... | null | https://raw.githubusercontent.com/stamourv/synth/fecdc2d209d558dc1f203938eafdc6719e8b379a/synth.rkt | racket | non-strict arrays? lazy arrays?
Oscillators
array functions receive a vector of indices
These all need to return floats.
(i.e. no off-by-an-octave errors)
and take example from old synth
assumes array of floats in [-1.0,1.0]
clamp
- the original signal
- the "digitized" signal, with series for the bound... | #lang racket
(require math/array)
TODO does not accept arrays directly
TODO try to get deforestation for arrays . does that require
(array-strictness #f)
TODO this slows down a bit , it seems , but improves memory use
(provide fs seconds->samples)
(define fs 44100)
(define bits-per-sample 16)
(define (freq... |
7e384a330fa258fe8975cce6b016f4e979d7d2dd3c9bf66721fd86596241ad93 | incoherentsoftware/defect-process | PlayerEnemies.hs | module Collision.PlayerEnemies
( checkPlayerEnemyCollisions
) where
import Collision
import Constants
import Enemy as E
import Msg
import Player
import Util
groundPushbackVelMultiplier = 40.0 :: Float
airRisingPushbackAirVelMultiplier = 20.0 :: Float
airFallingPushbackAirVelMultiplier = 0.0 :: Float
... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Collision/PlayerEnemies.hs | haskell | module Collision.PlayerEnemies
( checkPlayerEnemyCollisions
) where
import Collision
import Constants
import Enemy as E
import Msg
import Player
import Util
groundPushbackVelMultiplier = 40.0 :: Float
airRisingPushbackAirVelMultiplier = 20.0 :: Float
airFallingPushbackAirVelMultiplier = 0.0 :: Float
... | |
d29b7a695361ba999aaed7d24b6d5e4131897aa8c3a28a1d00e66cdbc251b1e6 | erlangonrails/devdb | exmpp_server_privacy.erl | Copyright ProcessOne 2006 - 2010 . 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 Public License along with this s... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/exmpp-0.9.5/src/server/exmpp_server_privacy.erl | erlang |
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 limitations
under the Licens... | Copyright ProcessOne 2006 - 2010 . 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 "
@author < >
-module(exmpp_server_p... |
7b3a762f684612b1d72b05115881b6f408d3f25283ac5e5f6dc97bff1bd25755 | Ptival/chick | Unit.hs | # LANGUAGE DeriveFoldable #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
module PrettyPrinting.Chick.Unit where
import Language (Language (Chick))
import PrettyPrinting.Chick.GlobalDeclarati... | null | https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/lib/PrettyPrinting/Chick/Unit.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DeriveFoldable #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
module PrettyPrinting.Chick.Unit where
import Language (Language (Chick))
import PrettyPrinting.Chick.GlobalDeclaration ()
import PrettyPrinting.Chick.I... |
a40b3b42ac6191b393d8111edcb6f6caa14798b7a9dc2a683557d5d67359827b | xh4/web-toolkit | utility.lisp | (in-package :uri)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defvar no-break-space
#-(or abcl lispworks) #\No-break_space
#+(or abcl lispworks) (code-char 160)))
(eval-when (:compile-toplevel :load-toplevel :execute)
(defvar whitespace
#.(remove-duplicates
(coerce (list #\Space #\T... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/uri/utility.lisp | lisp | Vertical tab. | (in-package :uri)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defvar no-break-space
#-(or abcl lispworks) #\No-break_space
#+(or abcl lispworks) (code-char 160)))
(eval-when (:compile-toplevel :load-toplevel :execute)
(defvar whitespace
#.(remove-duplicates
(coerce (list #\Space #\T... |
3fba191d66451c06c1b59056d618726563f697b1da06ac590790d28539b2e04c | parapluu/Concuerror | bad_attribute_3.erl | -module(bad_attribute_3).
-export([test/0]).
-concuerror_options([symbolic_names, keep_going, keep_going]).
test() ->
ok.
| null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests-real/suites/options/src/bad_attribute_3.erl | erlang | -module(bad_attribute_3).
-export([test/0]).
-concuerror_options([symbolic_names, keep_going, keep_going]).
test() ->
ok.
| |
54279d1699c09a8f5f0dbeb7d3691083b1cbec81be09d1fb1ff7e9d3b403c8b5 | itchyny/vim-haskell-sort-import | import_only.out.hs | import A (aa, ab, ac)
import B (ba, bb, bc)
import C (ca, cb, cc)
| null | https://raw.githubusercontent.com/itchyny/vim-haskell-sort-import/bfe4b6a5e212828ef14e611fa8c358b3960d4f9f/test/only/import_only.out.hs | haskell | import A (aa, ab, ac)
import B (ba, bb, bc)
import C (ca, cb, cc)
| |
a545cd214ecdf993c53651e11d3966186153a481beef298c9fcd5a998df5f0d4 | igorhvr/bedlam | shopping.scm | The contents of this file are subject to the Mozilla Public License Version
1.1 ( the " License " ) ; you may not use this file except in compliance with
;;; the License. You may obtain a copy of the License at
;;; /
;;;
Software distributed under the License is distributed on an " AS IS " basis ,
;;; WITHOUT WAR... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/siscweb/siscweb-src-0.5/examples/scm/examples/shopping.scm | scheme | you may not use this file except in compliance with
the License. You may obtain a copy of the License at
/
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
Contributor(s):
Alternatively, the contents of th... | The contents of this file are subject to the Mozilla Public License Version
Software distributed under the License is distributed on an " AS IS " basis ,
The Original Code is SISCweb .
The Initial Developer of the Original Code is .
Portions created by the Initial Developer are Copyright ( C ) 2005 - 2006
... |
5de4d989ffd1668f5eb8359563060928312bd72dda2ddead1d103016ec8e4c2f | nasa/Common-Metadata-Repository | granule_bulk_update.clj | (ns cmr.ingest.data.granule-bulk-update
"Stores and retrieves granule bulk update status and task information."
(:require
[cmr.common.time-keeper :as time-keeper]
[clj-time.coerce :as time-coerce]
[cheshire.core :as json]
[clojure.java.jdbc :as jdbc]
[cmr.common.log :refer (debug info warn error)]
... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/7a217ca3758f9f7b2d894f31d0e23c42819cc3e0/ingest-app/src/cmr/ingest/data/granule_bulk_update.clj | clojure | create a granule status row for each granule-ur
set :transaction? false since we are already inside a transaction
Extends the GranBulkUpdateStore to the oracle store so it will work with oracle.
Returns a list of bulk update tasks for the provider
Get statuses for all granules by task id
Get the status for a part... | (ns cmr.ingest.data.granule-bulk-update
"Stores and retrieves granule bulk update status and task information."
(:require
[cmr.common.time-keeper :as time-keeper]
[clj-time.coerce :as time-coerce]
[cheshire.core :as json]
[clojure.java.jdbc :as jdbc]
[cmr.common.log :refer (debug info warn error)]
... |
6a490bad057ad2dfc7c246810debb016fff044605a2252443a3c80ede3f99054 | slyrus/clem | bench-matrix-2.lisp |
(in-package :clem-test)
(defstruct %matrix-rep
(matrix nil :type matrix)
(array nil :type array))
(handler-bind ((simple-error #'continue))
(sb-c:defknown mref4 (t t &rest sb-c::index) t
(sb-c:flushable sb-c:movable)))
(sb-c::defoptimizer (mref4 sb-c::derive-type) ((matrix array &rest indices... | null | https://raw.githubusercontent.com/slyrus/clem/5eb055bb3f45840b24fd44825b975aa36bd6d97c/test/bench-matrix-2.lisp | lisp |
(in-package :clem-test)
(defstruct %matrix-rep
(matrix nil :type matrix)
(array nil :type array))
(handler-bind ((simple-error #'continue))
(sb-c:defknown mref4 (t t &rest sb-c::index) t
(sb-c:flushable sb-c:movable)))
(sb-c::defoptimizer (mref4 sb-c::derive-type) ((matrix array &rest indices... | |
70a4a20b600f1998b28ce06effeb0343e6e969d5f91852c28939a21397a17d8d | morpheusgraphql/morpheus-graphql | AST.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE TemplateHaskellQuotes #-}
# LANGUAGE NoImplicitPrelude #
module Data.Morpheus.CodeGen.Server.Internal.AST
( CodeGenConfig (..),
ServerDeclaration (..),
GQLTypeDefinition (..),
CONST,
TypeKind (..),
TypeName,
TypeRef ... | null | https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/1d422eb1c2c40fee1148d236fc848144a0b08e11/morpheus-graphql-code-gen/src/Data/Morpheus/CodeGen/Server/Internal/AST.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskellQuotes # | # LANGUAGE RecordWildCards #
# LANGUAGE NoImplicitPrelude #
module Data.Morpheus.CodeGen.Server.Internal.AST
( CodeGenConfig (..),
ServerDeclaration (..),
GQLTypeDefinition (..),
CONST,
TypeKind (..),
TypeName,
TypeRef (..),
TypeWrapper (..),
unpackName,
DerivingClass (..),
FI... |
4a7a172937956fe7be18e88adf5b51a9144b6187011455979348c4571fc8bf64 | racket/eopl | data-structures.rkt | #lang eopl
;; data structures for proc-lang/ds-rep
(require "lang.rkt") ; for expression?
(provide (all-defined-out)) ; too many things to list
;;;;;;;;;;;;;;;; expressed values ;;;;;;;;;;;;;;;;
;;; an expressed value is either a number, a boolean or a procval.
(define-datatype expval e... | null | https://raw.githubusercontent.com/racket/eopl/43575d6e95dc34ca6e49b305180f696565e16e0f/tests/chapter3/proc-lang/ds-rep/data-structures.rkt | racket | data structures for proc-lang/ds-rep
for expression?
too many things to list
expressed values ;;;;;;;;;;;;;;;;
an expressed value is either a number, a boolean or a procval.
extractors:
expval->num : ExpVal -> Int
expval->bool : ExpVal -> Bool
expval->proc : ExpVal -> Proc
procedures ;;;;;;;;;;;;;;;;
proc? :... | #lang eopl
(define-datatype expval expval?
(num-val
(value number?))
(bool-val
(boolean boolean?))
(proc-val
(proc proc?)))
(define expval->num
(lambda (v)
(cases expval v
(num-val (num) num)
(else (expval-extractor-error 'num v)))))
(define expval->bool
(lambda (v)
(cas... |
c362441700d3e5aa4aa1b11b47396d54e3888d588c770014169738e4ea7d9a3b | kowainik/prolens | Prolens.hs | {-# OPTIONS_GHC -Wno-redundant-constraints #-}
# LANGUAGE QuantifiedConstraints #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
|
Module : Prolens
Copyright : ( c ) 2020 - 2021 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer ... | null | https://raw.githubusercontent.com/kowainik/prolens/5d0f9311c87f59b851f932e1e37b70d519f5c39e/src/Prolens.hs | haskell | # OPTIONS_GHC -Wno-redundant-constraints #
# LANGUAGE RankNTypes #
-----------+------------------------------+
-----------+------------------------------+
-----------+------------------------------+
-----------+------------------------------+
-----------+------------------+--------------+----------------... |
# LANGUAGE QuantifiedConstraints #
# LANGUAGE TypeFamilies #
|
Module : Prolens
Copyright : ( c ) 2020 - 2021 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Stability : Stable
Portability : Portable
... |
d814e760f8394830d6df33f52e0718fd6072735286db4e97834ee1be661832a6 | marick/fp-oo | modules-4.clj | Exercise 4
;; This version just adds a flag so it's easy to tell that
;; the stub is a stub.
(install
(method-holder 'Module
:left 'MetaModule
:up 'Anything
{
:include
(fn [this module]
(let [module-name (:__own_sym... | null | https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/solutions/pieces/modules-4.clj | clojure | This version just adds a flag so it's easy to tell that
the stub is a stub.
<<== New | Exercise 4
(install
(method-holder 'Module
:left 'MetaModule
:up 'Anything
{
:include
(fn [this module]
(let [module-name (:__own_symbol__ module)
stub-name (gensym module-name)
... |
3959de8422d29a7b6173c4553f6c160795e7bd57f202d9f221d5361f444be68c | hyperfiddle/electric | input1.cljc | (ns dustin.y2022.input1
(:require #?(:cljs goog.events)
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom :as dom :refer [node]]
[hyperfiddle.photon-ui2 :refer [Focused?]]
[hyperfiddle.rcf :refer [tests tap % with]])
(:import [hyperfiddle.photon Pending])
#?(:cljs ... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2022/controls/input1.cljc | clojure | recur
<- initial value
<- on focus turn to true
<- on blur turn to false | (ns dustin.y2022.input1
(:require #?(:cljs goog.events)
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom :as dom :refer [node]]
[hyperfiddle.photon-ui2 :refer [Focused?]]
[hyperfiddle.rcf :refer [tests tap % with]])
(:import [hyperfiddle.photon Pending])
#?(:cljs ... |
e00ef0a9e4faeda906db4803f368417c045fad050516d0a3387d82b2323da6ca | boxer-project/boxer-sunrise | load.lisp | -*- Mode : Lisp ; rcs - header : " $ Header : /hope / lwhope1 - cam / hope.0 / / LISPopengl - examples / RCS / load.lisp , v 1.7.14.2 2017/11/10 13:00:26 " -*-
Copyright ( c ) 1987 - -2017 LispWorks Ltd. All rights reserved .
(in-package "CL-USER")
(load (current-pathname "../load"))
(load (current-pathname... | null | https://raw.githubusercontent.com/boxer-project/boxer-sunrise/1ef5d5a65d00298b0d7a01890b3cd15d78adc1af/src/opengl/examples/load.lisp | lisp | rcs - header : " $ Header : /hope / lwhope1 - cam / hope.0 / / LISPopengl - examples / RCS / load.lisp , v 1.7.14.2 2017/11/10 13:00:26 " -*- |
Copyright ( c ) 1987 - -2017 LispWorks Ltd. All rights reserved .
(in-package "CL-USER")
(load (current-pathname "../load"))
(load (current-pathname "defsys"))
(compile-system "OPENGL-EXAMPLES" :load t :target-directory (get-temp-directory))
|
e6f283f416050398c70c925ae4ce8e8e299106ee4ec8023e5da5e026f78f0715 | imdea-software/leap | TrsInterface.mli |
(***********************************************************************)
(* *)
LEAP
(* *)
, IMDEA ... | null | https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/trs/TrsInterface.mli | ocaml | *********************************************************************
... |
LEAP
, IMDEA Software Institute
Copyright 2011 IMDEA Software Institute
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compl... |
7970b00163525534354b0e5811925be3aa239de685b7e23238b7f259cadfce6e | zkincaid/duet | transitionFormula.mli | (** Transition formulas *)
open Syntax
* A transition formula is a logical formula that describes a binary
relation on a set of states . Transition formulas are assumed to be
quantifier - free , and are over four sets of symbols : pre - state
symbols , post - state symbols , symbolic constants , and ... | null | https://raw.githubusercontent.com/zkincaid/duet/eb3dbfe6c51d5e1a11cb39ab8f70584aaaa309f9/srk/src/transitionFormula.mli | ocaml | * Transition formulas
* Identity relation
* Sequential composition
* Union
* Retrieve the underlying formula
* Retrieve the pre-state/post-state symbols of a transition formula
* Retrieve the predicate that identifies skolem constants
* Retrieve a predicate that identifies symbolic constants
* Retrieve the set ... |
open Syntax
* A transition formula is a logical formula that describes a binary
relation on a set of states . Transition formulas are assumed to be
quantifier - free , and are over four sets of symbols : pre - state
symbols , post - state symbols , symbolic constants , and Skolem
constants . P... |
2b4ab769cafab211f7f7d6dce312d80f5d3bda01b0bf1aff7e579fa6d7d55de4 | Kappa-Dev/KappaTools | expr_interpreter.ml | (******************************************************************************)
(* _ __ * The Kappa Language *)
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
(* | ' / ********************************************************************... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/simulation/expr_interpreter.ml | ocaml | ****************************************************************************
_ __ * The Kappa Language
| ' / ********************************************************************
| . \ * This file is distributed under the terms of the
|_|\_\ * GN... | | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
let value_state_alg_op counter ?(time=Counter.current_time counter) = function
| Operator.CPUTIME -> Nbr.F (Sys.time ())
| Operator.TIME_VAR -> Nbr.F time
| Operator.EVENT_VAR -> Nbr.I (Counter.current_event counter)
| Operator.NUL... |
bf245db64718606c07a51995b1ed8e3e746a51cc599e7f1f37680d4d2f1c3073 | ollef/sixty | Postponement.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
module Postponement where
import Data.Persist
import Orphans ()
import Prettyprinter
import Protolude hiding (IntMap)
newtype Index = Index Int
deriv... | null | https://raw.githubusercontent.com/ollef/sixty/e27f9e3944d2049290bfae3af871fac9b4f74b3a/src/Postponement.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings # | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
module Postponement where
import Data.Persist
import Orphans ()
import Prettyprinter
import Protolude hiding (IntMap)
newtype Index = Index Int
deriving (Eq, Ord, Show)
deriving newtype (Enum, Persist, Hashable, Nu... |
4d06c70f43b7553870eace855db7f3f7d317ba9abb918f5dd31b67bc1167a8d8 | tek/chiasma | TmuxTestConfig.hs | module Chiasma.Test.Data.TmuxTestConfig where
import Log (Severity (Info))
import qualified Polysemy.Process.Effect.Pty as Pty
data TmuxTestConfig =
TmuxTestConfig {
width :: Pty.Rows,
height :: Pty.Cols,
fontSize :: Int,
gui :: Bool,
conf :: [Text],
logLevel :: Severity,
waitForPrompt :... | null | https://raw.githubusercontent.com/tek/chiasma/2ae89af5ce782ef13ef936a041fb48cdfb448f75/packages/test/lib/Chiasma/Test/Data/TmuxTestConfig.hs | haskell | module Chiasma.Test.Data.TmuxTestConfig where
import Log (Severity (Info))
import qualified Polysemy.Process.Effect.Pty as Pty
data TmuxTestConfig =
TmuxTestConfig {
width :: Pty.Rows,
height :: Pty.Cols,
fontSize :: Int,
gui :: Bool,
conf :: [Text],
logLevel :: Severity,
waitForPrompt :... | |
f6de8bfc6d2879d079f3bc953973a50bcbc068bd7c03823da43e5e7c8ccc7fed | frenetic-lang/netcore-1.0 | Compiler.hs | module Frenetic.NetCore.Compiler
( compile
, compilePolicy
, toFlowTable
, compilePredicate
, Bone (..) -- TODO(arjun): do not export
, Classifier
, classify
, minimizeClassifier
, classifierActions
) where
import Nettle.OpenFlow.Packet
import Nettle.OpenFlow.Match
import qualified Nettle.OpenFlow ... | null | https://raw.githubusercontent.com/frenetic-lang/netcore-1.0/976b08b740027e8ed19f2d55b1e77f663bee6f02/src/Frenetic/NetCore/Compiler.hs | haskell | TODO(arjun): do not export
| Classifiers are the target of compilation.
| Each rule of the intermediate form is called a Bone.
| Skeletons are the intermediate form.
| Map the actions. |
if ptrn12 == ptrn2 then Nothing else
| Compile a predicate to intermediate form.
| Compile a policy to intermediate form
... | module Frenetic.NetCore.Compiler
( compile
, compilePolicy
, toFlowTable
, compilePredicate
, Classifier
, classify
, minimizeClassifier
, classifierActions
) where
import Nettle.OpenFlow.Packet
import Nettle.OpenFlow.Match
import qualified Nettle.OpenFlow as OF
import Frenetic.Switches.OpenFlow
impo... |
3c49e6ddd80031316877e29cc9feeb78f035bd22642f02f7cc0a33a06eb91793 | haskell/time | Lift.hs | # LANGUAGE TemplateHaskell #
module Test.Clock.Lift (
testLift,
) where
import Data.Time.Clock
import qualified Language.Haskell.TH.Syntax as TH
import Test.Tasty
import Test.Tasty.HUnit
testLift :: TestTree
testLift =
testGroup
"Lift instances"
[ testCase "DiffTime" $ $$(TH.liftTyped (second... | null | https://raw.githubusercontent.com/haskell/time/857d8fd808548b2bf652236443adcbeae9188745/test/main/Test/Clock/Lift.hs | haskell | # LANGUAGE TemplateHaskell #
module Test.Clock.Lift (
testLift,
) where
import Data.Time.Clock
import qualified Language.Haskell.TH.Syntax as TH
import Test.Tasty
import Test.Tasty.HUnit
testLift :: TestTree
testLift =
testGroup
"Lift instances"
[ testCase "DiffTime" $ $$(TH.liftTyped (second... | |
06e0c038e6e007b1276b91abc3a6cc3245e2a8ef31d23ceeca6b84a05d44656e | lisp-mirror/airship-scheme | scheme-types.lisp | ;;;; -*- mode: common-lisp; -*-
(in-package #:airship-scheme)
;;;; Helper functions useful for SATISFIES types or standalone tests
(define-function (mathematical-integer-p :inline t) ((number number))
(zerop (nth-value 1 (round number))))
(define-function (%nanp :inline t) ((number number))
(and (floatp number)... | null | https://raw.githubusercontent.com/lisp-mirror/airship-scheme/b908333f4c5a20cd80d141fe52f67ef817f9ac9b/scheme-types.lisp | lisp | -*- mode: common-lisp; -*-
Helper functions useful for SATISFIES types or standalone tests
Type definition macros
TODO: The define-scheme-predicate could go here, too
For types with no built-in predicate
Numeric types
Note: (complex (float 0 0)) might also work instead of (complex
(real 0 0))
Other types
Type... |
(in-package #:airship-scheme)
(define-function (mathematical-integer-p :inline t) ((number number))
(zerop (nth-value 1 (round number))))
(define-function (%nanp :inline t) ((number number))
(and (floatp number) (f:float-nan-p number)))
(defun nanp (number)
"Tests if a number is NaN"
(or (%nanp number)
... |
b757f3a436518137ba8233459357f6f0624aeb6ad928e91d363cf9206485429d | dpiponi/Stellarator | TIAColors.hs | module TIAColors where
import Data.Array.Unboxed
import Data.Word
import Data.Bits
{-
- Extracted from
- NTSC only
-}
lutList :: [Word32]
lutList = [
0x000000, 0x404040, 0x6C6C6C, 0x909090, 0xB0B0B0, 0xC8C8C8, 0xDCDCDC, 0xECECEC,
0x444400, 0x646410, 0x848424, 0xA0A034, 0xB8B840, 0x... | null | https://raw.githubusercontent.com/dpiponi/Stellarator/77f86a6d3e513e5662d9dab625c19a1202a24776/src/TIAColors.hs | haskell |
- Extracted from
- NTSC only
Remember to `shift` (-1) before lookup | module TIAColors where
import Data.Array.Unboxed
import Data.Word
import Data.Bits
lutList :: [Word32]
lutList = [
0x000000, 0x404040, 0x6C6C6C, 0x909090, 0xB0B0B0, 0xC8C8C8, 0xDCDCDC, 0xECECEC,
0x444400, 0x646410, 0x848424, 0xA0A034, 0xB8B840, 0xD0D050, 0xE8E85C, 0xFCFC68,
... |
90a675f051e9b82d49cb88a76b25e955752422edc353d1dd225b0b82f65d0783 | spurious/sagittarius-scheme-mirror | %3a139.scm | (import (rnrs)
(srfi :139)
(srfi :64))
(test-begin "SRFI-139: Syntax parameters")
(let ()
(define-syntax-parameter abort
(syntax-rules ()
((_ . _)
(syntax-error "abort used outside of a loop"))))
(define-syntax forever
(syntax-rules ()
((forever body1 body2 ...)
(call-with-curr... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/tests/srfi/%253a139.scm | scheme | (import (rnrs)
(srfi :139)
(srfi :64))
(test-begin "SRFI-139: Syntax parameters")
(let ()
(define-syntax-parameter abort
(syntax-rules ()
((_ . _)
(syntax-error "abort used outside of a loop"))))
(define-syntax forever
(syntax-rules ()
((forever body1 body2 ...)
(call-with-curr... | |
87c4aa9496a5c9fa1a781bbcd86f1856aa08409324270af7f60c4dd46de023b2 | chaoxu/mgccl-haskell | spark.hs | Generate a sparkline , version of < / >
-- Usage: after compile, try '$ spark -10 0 15.24 42'
Author : , < >
import System (getArgs)
main :: IO ()
main = do input <- getArgs
putStrLn $ spark (map read input :: [Double])
spark :: [Double] -> String
spark list = map ("▁▂▃▄▅▆▇" !!) xs
where ... | null | https://raw.githubusercontent.com/chaoxu/mgccl-haskell/bb03e39ae43f410bd2a673ac2b438929ab8ef7a1/random/spark.hs | haskell | Usage: after compile, try '$ spark -10 0 15.24 42' | Generate a sparkline , version of < / >
Author : , < >
import System (getArgs)
main :: IO ()
main = do input <- getArgs
putStrLn $ spark (map read input :: [Double])
spark :: [Double] -> String
spark list = map ("▁▂▃▄▅▆▇" !!) xs
where zs = map (flip (-) (minimum list)) list
... |
5b66b8ffaea21c4afbd96285b80619aa04e07bd2ddfeb60597b2ee455c73bdf6 | helium/erlang-libp2p | libp2p_stream_proxy_test.erl | -module(libp2p_stream_proxy_test).
-behavior(libp2p_framed_stream).
%% ------------------------------------------------------------------
%% API Function Exports
%% ------------------------------------------------------------------
-export([
client/2
,server/4
]).
%% ----------------------------------------... | null | https://raw.githubusercontent.com/helium/erlang-libp2p/d587854c8a1f093576bbd05ab4616bcc2693e600/test/libp2p_stream_proxy_test.erl | erlang | ------------------------------------------------------------------
API Function Exports
------------------------------------------------------------------
------------------------------------------------------------------
libp2p_framed_stream Function Exports
------------------------------------------------------... | -module(libp2p_stream_proxy_test).
-behavior(libp2p_framed_stream).
-export([
client/2
,server/4
]).
-export([
init/3
,handle_data/3
,handle_info/3
]).
-record(state, {
echo :: pid()
}).
client(Connection, Args) ->
libp2p_framed_stream:client(?MODULE, Connection, Args).
server(Connec... |
76ed94b768b83c7f15e7ef6d8a605f7f1c195e39d495c94b2eafc57952fe9280 | sanette/bogue | b_empty.ml | An empty widget . Does not draw anything , but can be used to get mouse focus .
This file is part of BOGUE
This file is part of BOGUE *)
type t = {
mutable size: int * int
}
let size e = e.size
let create size =
{ size }
let resize size t =
t.size <- size
let free _ = ()
let unload _ = ()
let dis... | null | https://raw.githubusercontent.com/sanette/bogue/9d911f8e8a03c5d344f38b9e1219deb97cb7f4d7/lib/b_empty.ml | ocaml | An empty widget . Does not draw anything , but can be used to get mouse focus .
This file is part of BOGUE
This file is part of BOGUE *)
type t = {
mutable size: int * int
}
let size e = e.size
let create size =
{ size }
let resize size t =
t.size <- size
let free _ = ()
let unload _ = ()
let dis... | |
2d93d63e616a0c570321cd0add1a692fdcd9cd08cdee0b15e5c099a71c9234bf | digital-asset/ghc | HsPat.hs |
( c ) The University of Glasgow 2006
( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998
\section[PatSyntax]{Abstract Haskell syntax --- patterns }
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[PatSyntax]{Abstract Haskell syntax---patterns}... | null | https://raw.githubusercontent.com/digital-asset/ghc/b20bf6924c8dac0dc59f12c921579029b8ee514e/compiler/hsSyn/HsPat.hs | haskell | - patterns }
-patterns}
# LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveTraversable #
in module PlaceHolder
# LANGUAGE ConstraintKinds #
# LANGUAGE ViewPatterns #
# SOURCE #
friends:
others:
collect ev vars from pats
libraries:
No 'Out' constructors
No 'In' constructors
| Pattern
For details on above s... |
( c ) The University of Glasgow 2006
( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveFoldable #
# LANGUAGE StandaloneDeriving #
# LANGUAGE FlexibleContex... |
51457d6bb652913413af09c6009693fa373d2a56ead9569bba5d733e10f13d91 | pedestal/pedestal | service_test.clj | (ns pedestallambda.service-test
(:require [clojure.test :refer :all]
[io.pedestal.test :refer [response-for]]
[io.pedestal.http :as bootstrap]
[pedestallambda.service :as service]))
(def service
(::bootstrap/service-fn (bootstrap/create-servlet service/service)))
(deftest home-... | null | https://raw.githubusercontent.com/pedestal/pedestal/d20065013abf5d3793ae5301e18a2398707fa2a9/samples/aws-codestar-lambda/test/pedestallambda/service_test.clj | clojure | (ns pedestallambda.service-test
(:require [clojure.test :refer :all]
[io.pedestal.test :refer [response-for]]
[io.pedestal.http :as bootstrap]
[pedestallambda.service :as service]))
(def service
(::bootstrap/service-fn (bootstrap/create-servlet service/service)))
(deftest home-... | |
1dd876566ae4fe2b9836bdaa0ea42460caa30b7ba1c0336419261b0e7be23d9f | rzezeski/try-try-try | rts_entry_vnode.erl | %% @doc A vnode to crunch incoming log entries. Attempt to match each
log entry against a registry of regexps . If a regexp matches then
%% execute its corresponding trigger function passing it the {Client,
%% Entry, Regexp} as well as the resulting match. The trigger
%% function can then choose to take an action... | null | https://raw.githubusercontent.com/rzezeski/try-try-try/c5d99f29fb3380f8653efdd1aa6a8f52143a9717/2011/riak-core-the-coordinator/rts/src/rts_entry_vnode.erl | erlang | @doc A vnode to crunch incoming log entries. Attempt to match each
execute its corresponding trigger function passing it the {Client,
Entry, Regexp} as well as the resulting match. The trigger
function can then choose to take an action such as update a
statistic via the `rts_stat_vnode'.
Since this vnode is pu... | log entry against a registry of regexps . If a regexp matches then
-module(rts_entry_vnode).
-behaviour(riak_core_vnode).
-include("rts.hrl").
-export([start_vnode/1,
init/1,
terminate/2,
handle_command/3,
is_empty/1,
delete/1,
handle_handoff_command/3,
... |
1d14f52e74436eca1bf457c14d2d84ba13fd72d6ae50b9697ae3d650c6ee254d | UBTECH-Walker/WalkerSimulationFor2020WAIC | _package_rgbdApproach.lisp | (cl:in-package cruiser_msgs-msg)
(cl:export '(APPROACHSTATUS-VAL
APPROACHSTATUS
DISTANCE-VAL
DISTANCE
)) | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_18.04_v1.2_20200616/walker_install/share/common-lisp/ros/cruiser_msgs/msg/_package_rgbdApproach.lisp | lisp | (cl:in-package cruiser_msgs-msg)
(cl:export '(APPROACHSTATUS-VAL
APPROACHSTATUS
DISTANCE-VAL
DISTANCE
)) | |
eababb305ee6ff4612f27751d6fbae8f01cbb84bb97d9a1845a921416171c8c7 | melange-re/melange | ounit_bsb_pkg_tests.ml | open Mellib
module Bsb_db_decode = Bsb_helper.Bsb_db_decode
let ( >:: ), ( >::: ) = OUnit.(( >:: ), ( >::: ))
let printer_string x = x
let ( =~ ) = OUnit.assert_equal ~printer:printer_string
let scope_test s (a, b, c) =
match Bsb_pkg_types.extract_pkg_name_and_file s with
| Scope (a0, b0), c0 ->
a =~ a0;
... | null | https://raw.githubusercontent.com/melange-re/melange/bcaf468572532f255262999d78af80585f25ecc0/mel_test/ounit_bsb_pkg_tests.ml | ocaml | open Mellib
module Bsb_db_decode = Bsb_helper.Bsb_db_decode
let ( >:: ), ( >::: ) = OUnit.(( >:: ), ( >::: ))
let printer_string x = x
let ( =~ ) = OUnit.assert_equal ~printer:printer_string
let scope_test s (a, b, c) =
match Bsb_pkg_types.extract_pkg_name_and_file s with
| Scope (a0, b0), c0 ->
a =~ a0;
... | |
435957c54e14e1c1d73cac5c75ffa24ad51715336f577d1c2fe79c7978cdd4f8 | ocaml-sf/learn-ocaml-corpus | prelude.ml | type exp =
| EInt of int
| EAdd of exp * exp
| EMul of exp * exp
let example =
EAdd (EInt 1, EMul (EInt 2, EInt 3))
| null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/mooc/week3/seq2/ex1/prelude.ml | ocaml | type exp =
| EInt of int
| EAdd of exp * exp
| EMul of exp * exp
let example =
EAdd (EInt 1, EMul (EInt 2, EInt 3))
| |
2695f17a073aaad2ec9f0cd832701a8abb416e03ad749f3bb1ec39c05664858e | metametadata/carry | api.cljs | (ns app.api
(:require))
(defprotocol ShopAPIProtocol
(get-products [this on-success on-error])
(buy-products [this payload on-success on-error]))
(def -products-tx-data [{:db/id -1 :product/title "iPad 4 Mini" :product/price 1 :product/inventory 5}
{:db/id -2 :product/title "H&M T-Shirt ... | null | https://raw.githubusercontent.com/metametadata/carry/fa5c7cd0d8f1b71edca70330acc97c6245638efb/examples/shopping-cart/src/app/api.cljs | clojure | (ns app.api
(:require))
(defprotocol ShopAPIProtocol
(get-products [this on-success on-error])
(buy-products [this payload on-success on-error]))
(def -products-tx-data [{:db/id -1 :product/title "iPad 4 Mini" :product/price 1 :product/inventory 5}
{:db/id -2 :product/title "H&M T-Shirt ... | |
f1ff00c375d9b7069938b11d1196772f2239d307d9da327ff7c621f61b5ba451 | samirose/sicp-compiler-project | counted-set.scm | (define-library (counted-set)
(export make-counted-set
counted-set-add
counted-set-count
counted-set-unique-keys)
(import (scheme base)
(lists))
(begin
(define (make-counted-set) '())
(define (counted-set-add s key amount)
(let* ((existing (assq key s))
(count (if existi... | null | https://raw.githubusercontent.com/samirose/sicp-compiler-project/d822e18bfd8088a3e9381c778511601ec0460b00/counted-set.scm | scheme | (define-library (counted-set)
(export make-counted-set
counted-set-add
counted-set-count
counted-set-unique-keys)
(import (scheme base)
(lists))
(begin
(define (make-counted-set) '())
(define (counted-set-add s key amount)
(let* ((existing (assq key s))
(count (if existi... | |
3a6327a7e35deb545de952483802fb1b119d99ccec031530dad9b7f308cbee64 | RyanMcG/fixturex | core.clj | (ns fixturex.core
"Some helpful macros for using fixtures. These are particularly helpful when
defining tests. Often times a fixture should only be used for a subset of
tests in a namespace or even just a couple of contexts in a few tests.
clojure.test/use-fixtures does not operate at this level of granularity.... | null | https://raw.githubusercontent.com/RyanMcG/fixturex/7ac2331f23565453f18d3af1c6542d8aa6da0173/src/fixturex/core.clj | clojure | (ns fixturex.core
"Some helpful macros for using fixtures. These are particularly helpful when
defining tests. Often times a fixture should only be used for a subset of
tests in a namespace or even just a couple of contexts in a few tests.
clojure.test/use-fixtures does not operate at this level of granularity.... | |
a039bb1f7191b3b598bd84893cb65f99d01607a4949e5d9023712c4ee15108d8 | rescript-lang/bucklescript-addons | http_types.ml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/rescript-lang/bucklescript-addons/c544020712b9507b8b4900444320c2448f9c7ae5/examples/node-http-server/src/http_types.ml | ocaml | * A simple binding to node [http] module | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... |
cfd137bdf8b1368143607b551c733617c6bb4a731c70d8a1975e10802a4787cc | ml4tp/tcoq | pputils.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/printing/pputils.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Side-effect: order matters | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
let pr_located pr (l... |
158dacbe164ef645980d8baa7aad53db3014ec58cb7e6846d5aca321ceb741db | bufferswap/ViralityEngine | texture.lisp | (in-package #:virality.texture)
;;;; Implementation of datatype TEXTURE-TABLE
(defun make-textures-table (&rest init-args)
(apply #'make-instance 'textures-table init-args))
;; TODO: Candidate for public API
(defun add-texture-profile (profile core)
(setf (u:href (profiles (v::textures core)) (name profile)) pro... | null | https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/texture/texture.lisp | lisp | Implementation of datatype TEXTURE-TABLE
TODO: Candidate for public API
TODO: Candidate for public API
TODO: Candidate for public API
TODO: Candidate for public API
TODO: Candidate for public API
TODO: Candidate for public API
TODO: Candidate for public API
TODO: Candidate for public API.
TODO: Candidate for ... | (in-package #:virality.texture)
(defun make-textures-table (&rest init-args)
(apply #'make-instance 'textures-table init-args))
(defun add-texture-profile (profile core)
(setf (u:href (profiles (v::textures core)) (name profile)) profile))
(defun remove-texture-profile (profile-name core)
(remhash profile-nam... |
7c753ee680bcbeb81f1a1ea799f9eb2b74e43b60dc427a73e97fcd994af3116d | dbuenzli/mu | mu.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2021 The mu programmers . 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/mu/5dc8643db924c1cb7c191fdbbedc4add33808b55/src/mu.mli | ocaml | * Rational numbers (ℚ).
* [v num den] is the normalized rational [num / den].
* [int n] is [v n 1].
* [n #/ d] is [v num den].
* [num r] is the numerator of [r].
* [den r] is the denominator of [r].
* [minus_one] is [-1/1].
* [neg_infinity] is [-1/0].
*
* The type for kinds of rational numbers.
* [kind r] is... | ---------------------------------------------------------------------------
Copyright ( c ) 2021 The mu programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... |
c0be705516565bd68be71ccd3119cf4b19d731d1b407a1a43f5eeb7f66ddba8b | IBM/wcs-ocaml | wcs_call.ml |
* This file is part of the Watson Conversation Service OCaml API project .
*
* Copyright 2016 - 2017 IBM Corporation
*
* 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... | null | https://raw.githubusercontent.com/IBM/wcs-ocaml/b237b7057f44caa09d36e466be015e2bc3173dd5/wcs-lib/wcs_call.ml | ocaml |
* This file is part of the Watson Conversation Service OCaml API project .
*
* Copyright 2016 - 2017 IBM Corporation
*
* 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... | |
9c7f17669c6f44eb5bb675c79dd3157e9f36bdb06956dddf74a3a03e042ced86 | trentmaetzold/cs61as | hw4.rkt | #lang racket
(require berkeley)
(provide (all-defined-out))
Exercise 1
SICP 2.7 - Define upper - bound and lower - bound
(define (add-interval x y)
(make-interval (+ (lower-bound x) (lower-bound y))
(+ (upper-bound x) (upper-bound y))))
(define (mul-interval x y)
(let ((p1 (* (lower-bound ... | null | https://raw.githubusercontent.com/trentmaetzold/cs61as/6e4830786e2c28a26203a4f2046776405af2c10e/homework/templates/hw4.rkt | racket |
Your explanation here
Exercise 2 - Define my-substitute | #lang racket
(require berkeley)
(provide (all-defined-out))
Exercise 1
SICP 2.7 - Define upper - bound and lower - bound
(define (add-interval x y)
(make-interval (+ (lower-bound x) (lower-bound y))
(+ (upper-bound x) (upper-bound y))))
(define (mul-interval x y)
(let ((p1 (* (lower-bound ... |
c7cad75576098eead12806e346a12a7f8ca247fcb7281c08c033e765c791e8bd | ndmitchell/catch | Show.hs |
module Reqs.Show where
import Reqs.Type
import Reqs.Path
import General.General
import RegExp.Parse -- why? i don't know why this is needed...
import List
import Maybe
import Char
import Pred.Predicate
instance Show Req where
show (Req expr regs opts _) = "<" ++ inline (show expr) ++ "," ++ pathPretty regs ... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/src/Reqs/Show.hs | haskell | why? i don't know why this is needed... |
module Reqs.Show where
import Reqs.Type
import Reqs.Path
import General.General
import List
import Maybe
import Char
import Pred.Predicate
instance Show Req where
show (Req expr regs opts _) = "<" ++ inline (show expr) ++ "," ++ pathPretty regs ++ "," ++ strSet opts ++ ">"
where
inline x... |
285cc2daf3f0994f199aadb4678dba0949790371fb2f951e32ff6c739705281b | RDTK/generator | job-builder.lisp | ;;;; job-builder.lisp --- Model classes for builder implementations.
;;;;
Copyright ( C ) 2012 - 2019 Jan Moringen
;;;;
Author : < >
(cl:in-package #:jenkins.api)
(macrolet
((define-maven-settings-type (name default-provider file-path-provider)
`(progn
(deftype ,name ()
'(or (e... | null | https://raw.githubusercontent.com/RDTK/generator/8d9e6e47776f2ccb7b5ed934337d2db50ecbe2f5/lib/jenkins.api/src/api/model/job-builder.lisp | lisp | job-builder.lisp --- Model classes for builder implementations.
TODO(jmoringe, 2012-12-13): temp | Copyright ( C ) 2012 - 2019 Jan Moringen
Author : < >
(cl:in-package #:jenkins.api)
(macrolet
((define-maven-settings-type (name default-provider file-path-provider)
`(progn
(deftype ,name ()
'(or (eql :default) string))
(defmethod xloc:xml-> ((value stp:element)
... |
0af9212c18d2a548bafb4574d64f65a9c65171e82583c12741e21bc2f7e3728e | softwarelanguageslab/maf | slip-0-to-1.scm | ;
Slip : Lisp in 100 lines - Theo D'Hondt : SOFT : - 2010
;
; Simple recursive version in Scheme
;
; Version 0 - basic facilities
;
; <expression> ::= <computation>|<lambda>|<variable>|
; <literal>|<null>
; <computation> ::= <definition>|<assignment>|<sequence>|
; <co... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/1a5d54a7b772250f666c90f152058a837064ccf5/test/changes/scheme/slip-0-to-1.scm | scheme |
Simple recursive version in Scheme
Version 0 - basic facilities
<expression> ::= <computation>|<lambda>|<variable>|
<literal>|<null>
<computation> ::= <definition>|<assignment>|<sequence>|
<conditional>|<application>
<definition> ::= (define <variable> <expre... | Slip : Lisp in 100 lines - Theo D'Hondt : SOFT : - 2010
Changes : from Slip version 0 to Slip version 1 .
Also added input + changed evaluate - variable to work in maf .
(begin
(define environment '())
(define (loop output)
(define rollback environment)
(define (error message qualifier)
(dis... |
6dc8732466c64e5615096ab3fb017e8269b4f791493b1bb72762c850a8fcf3f8 | jeromesimeon/Galax | namespace_symbols_util.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/namespace/namespace_symbols_util.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : namespace_symbols_util.ml , v 1.2 2007/02/01 22:08:51 simeon Exp $
Module : Namespace_symbols_util
Description :
This module implements some basic utilities over name symbols .
Description:
This module implemen... |
4d329f46c0bfb71d5663ee71c9a2bda6315a261000d190b82876f0f9de055196 | hasktorch/hasktorch | Indexing.hs | # LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE St... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/cf0ed1aba9c41123ba46f7c0788a4df10fbfe1ef/experimental/gradually-typed/src/Torch/GraduallyTyped/Tensor/Indexing.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
| Calculate the size of the dimension with step.
When you take the odd-numberPed element of tensor with `tensor[1::2]` in python, | # LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneKindSignatures #
# LANGUAGE TemplateHaskell... |
9cfa7406850053c8f60b8ae44147a276a006bfbfc1d93c23e278f2db9b6f8229 | KestrelInstitute/Specware | ProvideSpecwareRuntime.lisp | (warn "THIS VERSION OF ProvideSpecwareRuntime.lisp IS DEPRECATED -- real version now in Specware4/Library/Base/Handwritten/Lisp/")
(provide "SpecwareRuntime") | null | https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/Applications/Specware/Handwritten/Lisp/ProvideSpecwareRuntime.lisp | lisp | (warn "THIS VERSION OF ProvideSpecwareRuntime.lisp IS DEPRECATED -- real version now in Specware4/Library/Base/Handwritten/Lisp/")
(provide "SpecwareRuntime") | |
fba550d3c2f02196213a50dedc8898a699455c8faa05a3a9512dd1b55e21c3d2 | ehird/mchost | Main.hs | module Main
( main
) where
import MC.Protocol
import MC.Host
import MC.Utils
import Data.Serialize (Get)
import qualified Data.Serialize as SE
import Data.IterIO
import qualified Data.IterIO.Iter as Iter
import System.IO
import System.Environment
import System.Exit
import Network
analyse :: (Packet a, Show a) =>... | null | https://raw.githubusercontent.com/ehird/mchost/49b1e3d29b60de78b9000ec6d78cf232d9a36b21/Main.hs | haskell | module Main
( main
) where
import MC.Protocol
import MC.Host
import MC.Utils
import Data.Serialize (Get)
import qualified Data.Serialize as SE
import Data.IterIO
import qualified Data.IterIO.Iter as Iter
import System.IO
import System.Environment
import System.Exit
import Network
analyse :: (Packet a, Show a) =>... | |
7917cb90ec5e3eae0bb09ae4f4ce3bbef29afbfe86e58fd2c8b8670e59de044a | yallop/ocaml-ctypes | complexL.ml | type t
external make : LDouble.t -> LDouble.t -> t = "ctypes_ldouble_complex_make"
external re : t -> LDouble.t = "ctypes_ldouble_complex_real"
external im : t -> LDouble.t = "ctypes_ldouble_complex_imag"
let of_complex x = make (LDouble.of_float x.Complex.re) (LDouble.of_float x.Complex.im)
let to_complex x = { Com... | null | https://raw.githubusercontent.com/yallop/ocaml-ctypes/52ff621f47dbc1ee5a90c30af0ae0474549946b4/src/ctypes/complexL.ml | ocaml | type t
external make : LDouble.t -> LDouble.t -> t = "ctypes_ldouble_complex_make"
external re : t -> LDouble.t = "ctypes_ldouble_complex_real"
external im : t -> LDouble.t = "ctypes_ldouble_complex_imag"
let of_complex x = make (LDouble.of_float x.Complex.re) (LDouble.of_float x.Complex.im)
let to_complex x = { Com... | |
30d9e28ad0a4f847dc95514b2aa593638d9cc47dca1aba11a97e022aceeb3da8 | ocaml/ocaml-lsp | bin.ml | open Import
module Bin = Stdune.Bin
let _PATH =
lazy
(Bin.parse_path
(Option.value ~default:"" (Unix_env.get Unix_env.initial "PATH")))
let which = Bin.which ~path:(Lazy.force _PATH)
| null | https://raw.githubusercontent.com/ocaml/ocaml-lsp/0b1390b78c0e4f72deb76f04b8a0e83fa2f03b6c/ocaml-lsp-server/src/bin.ml | ocaml | open Import
module Bin = Stdune.Bin
let _PATH =
lazy
(Bin.parse_path
(Option.value ~default:"" (Unix_env.get Unix_env.initial "PATH")))
let which = Bin.which ~path:(Lazy.force _PATH)
| |
49a7cb632d436ed09244135632290e49fe94e726d5e011013dbfc761736677b0 | modular-macros/ocaml-macros | unrolling_flambda2.ml |
type t = { fn : t -> t -> int -> unit -> unit }
let rec foo f b n x =
if n < 0 then ()
else begin
foo f b (n - 1) x;
b.fn f b (n - 1) x
end
[@@specialise always]
let rec bar f b n x =
if n < 0 then ()
else begin
bar f b (n - 1) x;
f.fn f b (n - 1) x
end
[@@specialise always]
let () = foo... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/asmcomp/unrolling_flambda2.ml | ocaml |
type t = { fn : t -> t -> int -> unit -> unit }
let rec foo f b n x =
if n < 0 then ()
else begin
foo f b (n - 1) x;
b.fn f b (n - 1) x
end
[@@specialise always]
let rec bar f b n x =
if n < 0 then ()
else begin
bar f b (n - 1) x;
f.fn f b (n - 1) x
end
[@@specialise always]
let () = foo... | |
636fd178e8bf677a612485712eef7092a2002de993fbdf6de25126de905b4789 | mauny/the-functional-approach-to-programming | ml_type.ml | #open "prelude";;
#open "lexer";;
#open "termes";;
#infix "o";;
(* +ml_type+ *)
type ml_type =
Int_type | Bool_type
| Pair_type of ml_type * ml_type
| Arrow_type of ml_type * ml_type
| Var_type of string;;
(* +ml_type+ *)
(* +ml_type_of_term+ *)
let rec ml_type_of_term = function
Var s -> Var_type s
| Ter... | null | https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/Typage/ml_type.ml | ocaml | +ml_type+
+ml_type+
+ml_type_of_term+
+ml_type_of_term+
+parse_ml_type+
+parse_ml_type+
+ml_type_printer+
+ml_type_printer+ | #open "prelude";;
#open "lexer";;
#open "termes";;
#infix "o";;
type ml_type =
Int_type | Bool_type
| Pair_type of ml_type * ml_type
| Arrow_type of ml_type * ml_type
| Var_type of string;;
let rec ml_type_of_term = function
Var s -> Var_type s
| Term("int",[]) -> Int_type
| Term("bool",[]) -> Bool_type
|... |
329e4f26c73c60c60a1efedd9242d42f8cd5d0bce3f7276e688154e9fb301720 | lisp-korea/sicp2014 | ex-2-66.scm | ex 2.66
(define (entry tree) (car tree))
(define (left-branch tree) (cadr tree))
(define (right-branch tree) (caddr tree))
;; assume: entry is a cons of key and data.
(define (key entry) (car entry))
; binary tree version
(define (lookup given-key set-of-records)
(cond ((null? set-of-records) #f)
((equ... | null | https://raw.githubusercontent.com/lisp-korea/sicp2014/9e60f70cb84ad2ad5987a71aebe1069db288b680/vvalkyrie/2.3/ex-2-66.scm | scheme | assume: entry is a cons of key and data.
binary tree version | ex 2.66
(define (entry tree) (car tree))
(define (left-branch tree) (cadr tree))
(define (right-branch tree) (caddr tree))
(define (key entry) (car entry))
(define (lookup given-key set-of-records)
(cond ((null? set-of-records) #f)
((equal? given-key (key (entry set-of-records)) (entry set-of-records))... |
6ebf79e157669c42c503187b6ce2fc9828615551bac6e4828cfe2013990599bd | theodormoroianu/SecondYearCourses | LambdaChurch_20210415171426.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_20210415171426.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 ... |
3a506e26b7eab9b55aa79ba8bc7204cdb558dded385347c62ffec572aa344332 | codinuum/cca | region.ml |
Copyright 2012 - 2020 Codinuum Software Lab < >
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 wri... | null | https://raw.githubusercontent.com/codinuum/cca/88ea07f3fe3671b78518769d804fdebabcd28e90/src/ast/analyzing/common/region.ml | ocaml |
Copyright 2012 - 2020 Codinuum Software Lab < >
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 wri... | |
60a3e51c6a4c2bb1286ed5a5c002c6c8c1ffc0fef609469672b2c620d0ec85c5 | nubank/vessel | pusher_test.clj | (ns vessel.jib.pusher-test
(:require [clojure.core.async :as async]
[clojure.java.io :as io]
[clojure.test :refer :all]
[mockfn.macros :refer [calling providing verifying]]
[mockfn.matchers :refer [a any exactly pred]]
[vessel.jib.credentials :as credentials... | null | https://raw.githubusercontent.com/nubank/vessel/40036928d20cfd07b31b99bb2389d5421c49d26d/test/unit/vessel/jib/pusher_test.clj | clojure | Called from push-container-config | (ns vessel.jib.pusher-test
(:require [clojure.core.async :as async]
[clojure.java.io :as io]
[clojure.test :refer :all]
[mockfn.macros :refer [calling providing verifying]]
[mockfn.matchers :refer [a any exactly pred]]
[vessel.jib.credentials :as credentials... |
83cf2b35a51a310144b8df33ba3af56aa084756ca9a131521c378e522e8aa6f2 | ssadler/zeno | Remote.hs | # LANGUAGE UndecidableInstances #
{-# LANGUAGE Strict #-}
module Zeno.Process.Remote where
import Control.Concurrent.STM (stateTVar, throwSTM)
import Control.DeepSeq
import Control.Monad.Catch (MonadThrow, MonadCatch)
import Control.Monad.Reader
import Control.Monad.State
import qualified Data.ByteString as BS
impor... | null | https://raw.githubusercontent.com/ssadler/zeno/9f715d7104a7b7b00dee9fe35275fb217532fdb6/src/Zeno/Process/Remote.hs | haskell | # LANGUAGE Strict #
register destruct handlers before it has
a chance to quit
Given that this is the only location that deletes a forwarder... | # LANGUAGE UndecidableInstances #
module Zeno.Process.Remote where
import Control.Concurrent.STM (stateTVar, throwSTM)
import Control.DeepSeq
import Control.Monad.Catch (MonadThrow, MonadCatch)
import Control.Monad.Reader
import Control.Monad.State
import qualified Data.ByteString as BS
import qualified Data.ByteStr... |
ad4a3566409017d16b1a7d76a514fb11d188a30751901bb3a87661a23fbbdc48 | rudymatela/speculate | order.hs |
import Test
import Test.Speculate.Utils
import Test.Speculate.Expr
import Test.Speculate.Reason (emptyThy)
import Test.Speculate.Reason.Order
import Data.Monoid ((<>))
for :
deriving instance Typeable Thyght
deriving instance Typeable Equation
main :: IO ()
main = mainTest tests 10000
tests :: Int -> [Bool]
... | null | https://raw.githubusercontent.com/rudymatela/speculate/d85703ae3de952484d0e9d963ba9bb53371245d7/test/order.hs | haskell | fails for funny exprs
TODO: make this pass (holds)
reason for the above, I believe this is an actual bug in >|
> (id _ :: Int) (id 0 :: Int) (0 :: Int)
> False
since the creation of (>|).
compareLexicographically is compatible (almost as if by coincidence)
isn't this subexprsV? I don't think so
The formal def... |
import Test
import Test.Speculate.Utils
import Test.Speculate.Expr
import Test.Speculate.Reason (emptyThy)
import Test.Speculate.Reason.Order
import Data.Monoid ((<>))
for :
deriving instance Typeable Thyght
deriving instance Typeable Equation
main :: IO ()
main = mainTest tests 10000
tests :: Int -> [Bool]
... |
1b722517f4e40c7057246d0976056d622395eac7424107319a91705bfa0cad38 | kazzmir/master-of-magic | base64.mli |
* Base64 - Base64 codec
* Copyright ( C ) 2003
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option ... | null | https://raw.githubusercontent.com/kazzmir/master-of-magic/830bfd1c549a5ac7370fa6a72bb06be5d3435fa0/lib/extlib-1.5/base64.mli | ocaml | * This exception is raised when reading an invalid character
from a base64 input.
* This exception is raised if the encoding or decoding table
size is not correct.
* Encode a string into Base64.
* Decode a string encoded into Base64, raise [Invalid_char] if a
character in the input string is not a valid one.
... |
* Base64 - Base64 codec
* Copyright ( C ) 2003
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option ... |
e868c2cd1dda108903abaf951ebc798c9a29b2cf4c773d603b501d511ef33e97 | inhabitedtype/ocaml-aws | rejectVpcPeeringConnection.mli | open Types
type input = RejectVpcPeeringConnectionRequest.t
type output = RejectVpcPeeringConnectionResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/ec2/lib/rejectVpcPeeringConnection.mli | ocaml | open Types
type input = RejectVpcPeeringConnectionRequest.t
type output = RejectVpcPeeringConnectionResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
f39e36b6d75c78cb454e40412a41b5887176848d4b731613b4eeb4bb3eb1bc41 | cpsc411/cpsc411-book | a8-skeleton.rkt | #lang racket
(require
racket/set
racket/format
"share/a8-graph-lib.rkt"
"share/a8-compiler-lib.rkt")
(provide
uniquify
implement-safe-primops
specify-representation
a-normalize
select-instructions
expose-allocation-pointer
uncover-locals
undead-analysis
conflict-analysis
pre-assign-frame-variables
assi... | null | https://raw.githubusercontent.com/cpsc411/cpsc411-book/f2199857fe0b894ac5216775c5e6036f5fb0a8f2/build/share/a8-skeleton.rkt | racket | #lang racket
(require
racket/set
racket/format
"share/a8-graph-lib.rkt"
"share/a8-compiler-lib.rkt")
(provide
uniquify
implement-safe-primops
specify-representation
a-normalize
select-instructions
expose-allocation-pointer
uncover-locals
undead-analysis
conflict-analysis
pre-assign-frame-variables
assi... | |
6b357abb4a549b378dd87022299456e39c126ed8357dafcd07a6e68b03ab8a68 | MLstate/opalang | pass_DbEngineImportation.ml |
Copyright © 2011 - 2013 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/opa/pass_DbEngineImportation.ml | ocaml | depends
shorthands
*****************************************************************
Separated compilation *******************************************
*****************************************************************
Original ident * stub ident, stub type, expanded stub
if stdlib then
Case if default datab... |
Copyright © 2011 - 2013 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... |
f11cece739ccd792610246fc6287f2e746cb79949a6048dd45c7bbbcab9a7970 | nathanmarz/cascalog | util_test.clj | (ns cascalog.cascading.util-test
(:use midje.sweet
cascalog.cascading.util)
(:import [cascading.tuple Fields]
[cascading.pipe Pipe]
[cascalog.aggregator ClojureAggregator]
[cascalog ClojureFilter ClojureMap ClojureMapcat]))
(defn plus-one [in]
[(+ in 1)])
(defn inc-wrapp... | null | https://raw.githubusercontent.com/nathanmarz/cascalog/deaad977aa98985f68f3d1cc3e081d345184c0c8/cascalog-core/test/cascalog/cascading/util_test.clj | clojure | (ns cascalog.cascading.util-test
(:use midje.sweet
cascalog.cascading.util)
(:import [cascading.tuple Fields]
[cascading.pipe Pipe]
[cascalog.aggregator ClojureAggregator]
[cascalog ClojureFilter ClojureMap ClojureMapcat]))
(defn plus-one [in]
[(+ in 1)])
(defn inc-wrapp... | |
33f1a400526fc363105bf1cf6d8fe6de44d5f2569c1a7c94cd4eb0e65847c6be | finkel-lang/finkel | HType.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ViewPatterns #-}
-- | Syntax for type.
module Language.Finkel.Syntax.HType where
#include "Syntax.h"
#include "ghc_modules.h"
-- base
import Data.List ... | null | https://raw.githubusercontent.com/finkel-lang/finkel/eacc51459a212c968c9d29c2f73de7b8d25fd6ab/finkel-kernel/src/Language/Finkel/Syntax/HType.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
| Syntax for type.
base
---------------------------------------------------------------------
Promotion
---------------------------------------------------------------------
---------------------------------------------... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
module Language.Finkel.Syntax.HType where
#include "Syntax.h"
#include "ghc_modules.h"
import Data.List (foldl')
ghc
import GHC_Builtin_Types (consDataCon, listTyCon_RDR, tupleTyCon)
import GHC_Data_FastString ... |
0984d32b16358be4b19fe0969627b8b7d1dd47c707214a22e526efc539603abb | armedbear/abcl | jvm-instructions.lisp | ;;; jvm-instructions.lisp
;;;
Copyright ( C ) 2003 - 2006
Copyright ( C ) 2010
$ Id$
;;;
;;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at ... | null | https://raw.githubusercontent.com/armedbear/abcl/6724ea950bb9d88a44394117e35ab2494647e49f/src/org/armedbear/lisp/jvm-instructions.lisp | lisp | jvm-instructions.lisp
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public L... | Copyright ( C ) 2003 - 2006
Copyright ( C ) 2010
$ Id$
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA ... |
04f830a26766d871b4d8b184dc1c956abc7639e1d003e4ea86b1e62f58e275a3 | vaibhavsagar/experiments | Simple.hs | # OPTIONS_GHC -cpp #
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple
Copyright : 2003 - 2005
--
Maintainer : < >
-- Stability : alpha
-- Portability : portable
--
-- Explanation: Simple build system; basically the interface ... | null | https://raw.githubusercontent.com/vaibhavsagar/experiments/378d7ba97eabfc7bbeaa4116380369ea6612bfeb/hugs/packages/Cabal/Distribution/Simple.hs | haskell | ---------------------------------------------------------------------------
|
Module : Distribution.Simple
Stability : alpha
Portability : portable
Explanation: Simple build system; basically the interface for
Distribution.Simple.\* modules. When given the parsed command-line
args and package infor... | # OPTIONS_GHC -cpp #
Copyright : 2003 - 2005
Maintainer : < >
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are
met :
* Redistributions of source code must retain the above ... |
403e6caefb2ae43548423eab59c1cc1f585dfb66d16644ad0c10fa9b1bce7fdd | JacobGabrielson/cl-rogue | daemon.lisp | ;;;; Contains functions for dealing with things that happen in the
;;;; future.
@(#)daemon.c 3.3 ( Berkeley ) 6/15/81
(in-package :cl-rogue)
(defparameter EMPTY 0)
(defparameter DAEMON -1)
(defparameter MAXDAEMONS 20)
(defstruct delayed-action
(d-type EMPTY :type fixnum)
(d-func nil :type symbol)
(d-arg ni... | null | https://raw.githubusercontent.com/JacobGabrielson/cl-rogue/ecc0eba9224313cbc7f8003c15e35dbb0d2b57eb/daemon.lisp | lisp | Contains functions for dealing with things that happen in the
future.
Take it out of the list
to remove the fuse from the list once it has gone off. | @(#)daemon.c 3.3 ( Berkeley ) 6/15/81
(in-package :cl-rogue)
(defparameter EMPTY 0)
(defparameter DAEMON -1)
(defparameter MAXDAEMONS 20)
(defstruct delayed-action
(d-type EMPTY :type fixnum)
(d-func nil :type symbol)
(d-arg nil)
(d-time 0 :type fixnum))
(define-resettable d-list (let ((new-dlist (make-... |
e5e12791b9d600e9018ca89924405dbffcc7539c30b61ee3d273400c45a2060e | mpickering/apply-refact | Default55.hs | yes = case concat (map f x) of [] -> [] | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Default55.hs | haskell | yes = case concat (map f x) of [] -> [] | |
91c045da487194f5187f02c9cbb7f18f631655d668af87816a6d351da002875c | xvw/preface | equivalence.ml | type 'a t = 'a -> 'a -> bool
module Contravariant = Preface_make.Contravariant.Via_contramap (struct
type nonrec 'a t = 'a t
let contramap f g x y = g (f x) (f y)
end)
module Invariant = Preface_make.Invariant.From_contravariant (Contravariant)
module Divisible =
Preface_make.Divisible.Over_contravariant
... | null | https://raw.githubusercontent.com/xvw/preface/84a297e1ee2967ad4341dca875da8d2dc6d7638c/lib/preface_stdlib/equivalence.ml | ocaml | type 'a t = 'a -> 'a -> bool
module Contravariant = Preface_make.Contravariant.Via_contramap (struct
type nonrec 'a t = 'a t
let contramap f g x y = g (f x) (f y)
end)
module Invariant = Preface_make.Invariant.From_contravariant (Contravariant)
module Divisible =
Preface_make.Divisible.Over_contravariant
... | |
16a91436de8706431d113c75ca82d990d128a5d3e023a1cafe46f1f31fbb48f3 | dada-lang/dada-model | test-store.rkt | #lang racket
(require redex/reduction-semantics)
(require "lease.rkt"
"heap.rkt"
"lang.rkt"
"stack.rkt")
(provide test-store)
(define-metafunction Dada
test-store : (Stack-mapping ...) (Heap-mapping ...) (Lease-mapping ...) -> Store
[(test-store (Stack-mapping ...) (Heap-mapping ...) (L... | null | https://raw.githubusercontent.com/dada-lang/dada-model/307b4833bd4aa25b43a0d7659d989a564a91b9b3/racket/opsem/test-store.rkt | racket | #lang racket
(require redex/reduction-semantics)
(require "lease.rkt"
"heap.rkt"
"lang.rkt"
"stack.rkt")
(provide test-store)
(define-metafunction Dada
test-store : (Stack-mapping ...) (Heap-mapping ...) (Lease-mapping ...) -> Store
[(test-store (Stack-mapping ...) (Heap-mapping ...) (L... | |
6c696a7c1a5fa882bff472ac8d17d39fd67bdc11e3ac6ca07e18612519e8c59b | janestreet/core | unique_id_intf.ml | (** Signature for use by {{!module:Core.Unique_id}[Unique_id]}. *)
open! Import
open Std_internal
module type Id = sig
(** The sexps and strings look like integers. *)
type t [@@deriving bin_io, hash, sexp, typerep]
(** {b Caveat}: values created with [of_float], [of_sexp], or [of_string] may be equal
to... | null | https://raw.githubusercontent.com/janestreet/core/b0be1daa71b662bd38ef2bb406f7b3e70d63d05f/core/src/unique_id_intf.ml | ocaml | * Signature for use by {{!module:Core.Unique_id}[Unique_id]}.
* The sexps and strings look like integers.
* {b Caveat}: values created with [of_float], [of_sexp], or [of_string] may be equal
to previously created values.
* Always returns a value that is not equal to any other value created with
[create].... |
open! Import
open Std_internal
module type Id = sig
type t [@@deriving bin_io, hash, sexp, typerep]
include Comparable.S_binable with type t := t
include Hashable.S_binable with type t := t
include Intable with type t := t
include Stringable with type t := t
val create : unit -> t
end
|
1608b320a55514340e576b5b65dce865124a872339ecccba39821e340429c23f | oxheadalpha/TZComet | async_work.ml | open! Import
type log_item = Html_types.div_content_fun Meta_html.H5.elt
type status = Empty | Work_in_progress | Done
type 'a content = ('a, log_item) Result.t list
type 'a t =
{ logs: log_item Reactive.Table.t
; status: status Reactive.var
; id: int
; content: 'a content Reactive.var }
let _id = ref 0
let... | null | https://raw.githubusercontent.com/oxheadalpha/TZComet/5169a2bdd95508f7e89054f4379c725d4f09a09c/src/client/async_work.ml | ocaml | open! Import
type log_item = Html_types.div_content_fun Meta_html.H5.elt
type status = Empty | Work_in_progress | Done
type 'a content = ('a, log_item) Result.t list
type 'a t =
{ logs: log_item Reactive.Table.t
; status: status Reactive.var
; id: int
; content: 'a content Reactive.var }
let _id = ref 0
let... | |
6a67cc540219293cad6b1ee0e7f3283b731f1e8c6be74e4245f888bb8ffc9188 | thosmos/riverdb | util.cljc | (ns theta.util
(:require
[theta.log :refer [debug info warn error]]
#?(:clj [dotenv]))
#?(:cljs (:require-macros [theta.util]))
#?(:clj (:import [java.util Date]
[java.math RoundingMode BigDecimal])))
#?(:clj (defmacro app-env [] dotenv/app-env))
(println "APP_ENV" (theta.util/app-env)... | null | https://raw.githubusercontent.com/thosmos/riverdb/db4567b7eb957d9ee668525c8f48133421dd53e2/src/main/theta/util.cljc | clojure | (ns theta.util
(:require
[theta.log :refer [debug info warn error]]
#?(:clj [dotenv]))
#?(:cljs (:require-macros [theta.util]))
#?(:clj (:import [java.util Date]
[java.math RoundingMode BigDecimal])))
#?(:clj (defmacro app-env [] dotenv/app-env))
(println "APP_ENV" (theta.util/app-env)... | |
4c05e45740031cf233e7b20140593caebdcdfb7bb82d9e0aa98f2a21d975d46d | ocsigen/js_of_ocaml | b.ml | let f x = x - 1
| null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/3b2b311d767bf4542aefe09fc865b28b5cd0ee00/compiler/tests-sourcemap/b.ml | ocaml | let f x = x - 1
| |
ba534b3cec920e21fda959d5d6d1d1a7b785bd9118956886907cec60b21f647c | MichaelDrogalis/voluble | project.clj | (defproject io.mdrogalis/voluble "0.3.1"
:description "Intelligent data generator for Apache Kafka. Generates streams of realistic data with support for cross-topic relationships, tombstoning, configurable rates, and more."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:source-p... | null | https://raw.githubusercontent.com/MichaelDrogalis/voluble/e3e46f739271de955b50b1e7d9972e5fd593b870/project.clj | clojure | (defproject io.mdrogalis/voluble "0.3.1"
:description "Intelligent data generator for Apache Kafka. Generates streams of realistic data with support for cross-topic relationships, tombstoning, configurable rates, and more."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:source-p... | |
b28b2ee06790e20dab5784bbcd2ad5a1ecf7a247251eacd104b4866f204d0ea6 | Deaf-Clojurian/sudoku-solver | verifier_test.clj | (ns sudoku-solver.logic.verifier-test
(:require
[clojure.test :refer [deftest is testing]]
[sudoku-solver.fixture.input :as fixture.input]
[sudoku-solver.logic.verifier :refer [correct-solution? invalid-values?]]))
(deftest invalid-values?-test
(testing "Valid values"
(is (= false (invalid-values? fix... | null | https://raw.githubusercontent.com/Deaf-Clojurian/sudoku-solver/223ef9fd178f96f13747fc99a32d76c94d890729/test/sudoku_solver/logic/verifier_test.clj | clojure | (ns sudoku-solver.logic.verifier-test
(:require
[clojure.test :refer [deftest is testing]]
[sudoku-solver.fixture.input :as fixture.input]
[sudoku-solver.logic.verifier :refer [correct-solution? invalid-values?]]))
(deftest invalid-values?-test
(testing "Valid values"
(is (= false (invalid-values? fix... | |
f6266fd6ee8dd3fae7a194522b9d3eb98aea7f3ee41c6c7920afcf7d7b4e8a7d | Fresheyeball/Shpadoinkle | Home.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
{-# LANGUAGE OverloadedLabels #-}
# LANGUAGE RankNTypes #
{-# LANGUAGE TemplateHaskell #-}
module Shpadoinkle.Website.Types.Home where
import Control.Lens (Lens', (^... | null | https://raw.githubusercontent.com/Fresheyeball/Shpadoinkle/5e5fb636fb0b0e99f04bae0d75cff722a10463ae/website/Shpadoinkle/Website/Types/Home.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedLabels #
# LANGUAGE TemplateHaskell # | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE RankNTypes #
module Shpadoinkle.Website.Types.Home where
import Control.Lens (Lens', (^.))
import Data.Aeson (FromJSON, ToJSON)
import Data.ByteStr... |
c5b90a5ade8a0055818e42339b45da99ffb56580c1a46c1e04efb43789370b09 | matsen/pplacer | decor_bark.ml | bark for trees that have newick + a list of Decor decorations .
*)
open Ppatteries
class decor_bark arg =
let (bl, node_label, edge_label, decor) =
match arg with
| `Empty -> (None, None, None, [])
| `Of_newick_bark nb ->
(nb#get_bl_opt, nb#get_node_label_opt, nb#get_edge_label_opt, [])
... | null | https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/pplacer_src/decor_bark.ml | ocaml | (self) | bark for trees that have newick + a list of Decor decorations .
*)
open Ppatteries
class decor_bark arg =
let (bl, node_label, edge_label, decor) =
match arg with
| `Empty -> (None, None, None, [])
| `Of_newick_bark nb ->
(nb#get_bl_opt, nb#get_node_label_opt, nb#get_edge_label_opt, [])
... |
ef67f785fb979005ac4fa66eb09a15e0eee2954547fd37c0349a44897e5691b1 | jeapostrophe/exp | racket-with-pkgs.rkt | #lang racket/base
(require (for-syntax racket/base
syntax/strip-context))
(define-syntax (module-begin stx)
(syntax-case stx ()
[(_ e ...)
(quasisyntax/loc stx
(#%module-begin
#,(replace-context stx #'(require racket/require (path-up "pkg-in.rkt")))
e ...))]))
(p... | null | https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/pkgs/core/racket-with-pkgs.rkt | racket | #lang racket/base
(require (for-syntax racket/base
syntax/strip-context))
(define-syntax (module-begin stx)
(syntax-case stx ()
[(_ e ...)
(quasisyntax/loc stx
(#%module-begin
#,(replace-context stx #'(require racket/require (path-up "pkg-in.rkt")))
e ...))]))
(p... | |
d209234ffcb702cf3d8f527ea9b6e854971afd7032e82a247b32432d25ba3bfe | penpot/penpot | export.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.main.ui.dashboard.export
(:require
[app.common.data :as d]
[app.main.data.modal :as modal]
... | null | https://raw.githubusercontent.com/penpot/penpot/5463671db13441ba3f730a34118547d34a5a36f1/frontend/src/app/main/ui/dashboard/export.cljs | clojure |
Copyright (c) KALEIDOS INC
Start download automatically
Execution time translation strings:
dashboard.export.options.all.message
dashboard.export.options.all.title
dashboard.export.options.detach.message
dashboard.export.options.detach.title
dashboard.export.options.merge.message
dashboard.export.... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.main.ui.dashboard.export
(:require
[app.common.data :as d]
[app.main.data.modal :as modal]
[app.main.features :as features]
... |
d344e2f224fc63699e18b2c444097d9ab31c69485efc9fced3de683d3c181b84 | AdRoll/rebar3_format | sort_arity_qualifiers_multiple_export_lists.erl | -module(sort_arity_qualifiers_multiple_export_lists).
-format #{sort_arity_qualifiers => true}.
-export([x/1, x/5, x/10]).
-export([a_is_first_function/0, z_definitively_second_function/0]).
x(_) ->
ok.
x(A, B, C, D, E) ->
x(A, B, C, D, E, 1, 2, 3, 4, 5).
x(_, _, _, _, _, _, _, _, _, _) ->
ok.
z_defin... | null | https://raw.githubusercontent.com/AdRoll/rebar3_format/7292c4e309491a19294ec5b2ff0b86a98b01d72c/test_app/after/src/sort_arity_qualifiers/sort_arity_qualifiers_multiple_export_lists.erl | erlang | -module(sort_arity_qualifiers_multiple_export_lists).
-format #{sort_arity_qualifiers => true}.
-export([x/1, x/5, x/10]).
-export([a_is_first_function/0, z_definitively_second_function/0]).
x(_) ->
ok.
x(A, B, C, D, E) ->
x(A, B, C, D, E, 1, 2, 3, 4, 5).
x(_, _, _, _, _, _, _, _, _, _) ->
ok.
z_defin... | |
3d680e0f722092a5654606988cf486c2d72c58a5582eba6ed67f60a0bc179a8c | input-output-hk/cardano-ledger | Query.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Cardano.Ledger.State.Query where
import Cardano.Ledger.Alonzo.TxBody as Alonzo
im... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/1c2f8aab38d7e22166209aba232e39b6aa5a55b2/libs/ledger-state/src/Cardano/Ledger/State/Query.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
Populate database
Query database
Into vector
# INLINEABLE getSnapShotNoSharingM #
# INLINEABLE getSnapShotsWithSharingM #
Into a Map structure
# INLINEABLE getSnapShotWithSharing #
| Folding function
sourceUTxOr ::
MonadResourc... | # LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Cardano.Ledger.State.Query where
import Cardano.Ledger.Alonzo.TxBody as Alonzo
import Cardano.Ledger.Binary
import Cardano.Ledger.Core (emptyPParams)
import qualified Cardano... |
2dea44612d48f696cf46d8db790cc770bc963fea685c36941c4eac0d5cbf43df | Tim-ats-d/Postem-markup | builtins.mli | (** {1 API} *)
(** The null numbering. *)
class null :
object
method get : string
method next : unit
(** Returns always an empty string. *)
end
class numeric_arab :
object
method get : string
method next : unit
end
class lower_case_numeric_roman :
object
method get : string
met... | null | https://raw.githubusercontent.com/Tim-ats-d/Postem-markup/4e53b5a58d67e8f0a1d4e5d1867dede6974a7d27/src/common/enumerate/builtins.mli | ocaml | * {1 API}
* The null numbering.
* Returns always an empty string. |
class null :
object
method get : string
method next : unit
end
class numeric_arab :
object
method get : string
method next : unit
end
class lower_case_numeric_roman :
object
method get : string
method next : unit
end
class upper_case_numeric_roman :
object
method get : str... |
b6cc1a2d4798ff8bf5aa18397d5d28ebc4bb2edbe079a42aeed373627451dca8 | swamp-agr/lambdabot-telegram-plugins | Modules.hs | # LANGUAGE TemplateHaskell #
module Modules (modulesInfo) where
import Lambdabot.Main
to add a new plugin , one must first add a qualified import here , and also
-- add a string in the list below
import Lambdabot.Plugin.Haskell
import Lambdabot.Plugin.Telegram
modulesInfo :: Modules
modulesInfo = $(modules $ core... | null | https://raw.githubusercontent.com/swamp-agr/lambdabot-telegram-plugins/1204238b5f59e7aa6446831c24b14ee083a00f11/app/Modules.hs | haskell | add a string in the list below | # LANGUAGE TemplateHaskell #
module Modules (modulesInfo) where
import Lambdabot.Main
to add a new plugin , one must first add a qualified import here , and also
import Lambdabot.Plugin.Haskell
import Lambdabot.Plugin.Telegram
modulesInfo :: Modules
modulesInfo = $(modules $ corePlugins ++ customHaskellPlugins ++... |
5b7a7767e58e8f45ca66ceea9cd6839e0ac437162068e6623fe3ec44424cc8c6 | awkward-squad/hasql-listen-notify | ListenNotify.hs | -- | @LISTEN@/@NOTIFY@ with @hasql@.
module Hasql.ListenNotify
( -- * Listen
Identifier (..),
listen,
unlisten,
unlistenAll,
escapeIdentifier,
Notification (..),
await,
poll,
backendPid,
-- * Notify
Notify (..),
notify,
)
where
import Control.Exception (throwIO, try... | null | https://raw.githubusercontent.com/awkward-squad/hasql-listen-notify/97eb508a74a11c6f4dfb60fbae0afcf3cb0d7994/src/Hasql/ListenNotify.hs | haskell | | @LISTEN@/@NOTIFY@ with @hasql@.
* Listen
* Notify
| Listen to a channel.
-listen.html
| Stop listening to a channel.
-unlisten.html
| Stop listening to all channels.
-unlisten.html
| A Postgres identifier.
-exec.html
| An incoming notification.
| Get the next notification received from the server.
... | module Hasql.ListenNotify
Identifier (..),
listen,
unlisten,
unlistenAll,
escapeIdentifier,
Notification (..),
await,
poll,
backendPid,
Notify (..),
notify,
)
where
import Control.Exception (throwIO, try)
import Control.Monad.Except (throwError)
import Control.Monad.IO.Cl... |
e366ed9bf55f79b6bbf13593fd4d9ac8ef50ca874214acb95284436a782a70ed | Ledest/otpbp | otpbp_ct.erl | -module(otpbp_ct).
-ifndef(HAVE_ct__get_progname_0).
OTP 21.0
-export([get_progname/0]).
-endif.
-ifndef(HAVE_ct__get_progname_0).
get_progname() ->
case init:get_argument(progname) of
{ok, [[Prog]]} -> Prog;
_ -> "no_prog_name"
end.
-endif.
| null | https://raw.githubusercontent.com/Ledest/otpbp/f93923239b33cc05500733027e6e775090ac80ad/src/otpbp_ct.erl | erlang | -module(otpbp_ct).
-ifndef(HAVE_ct__get_progname_0).
OTP 21.0
-export([get_progname/0]).
-endif.
-ifndef(HAVE_ct__get_progname_0).
get_progname() ->
case init:get_argument(progname) of
{ok, [[Prog]]} -> Prog;
_ -> "no_prog_name"
end.
-endif.
| |
21f4b78386e463c57e621765e63dcb62868d898177aec8924ee89d78a83cd022 | danehuang/augurv2 | PllBlk.hs |
- Copyright 2017 under the Apache License , Version 2.0 ( the " License " ) ;
- you may not use this file except in compliance with the License .
- You may obtain a copy of the License at
-
- -2.0
-
- Unless required by applicable law or agreed to in writing , software
- distributed... | null | https://raw.githubusercontent.com/danehuang/augurv2/480459bcc2eff898370a4e1b4f92b08ea3ab3f7b/compiler/augur/src/CudaC/PllBlk.hs | haskell | --------------------------------------------------------------------
= PllBlk Description
| [Note]
---------------------------------
== TODO: MOVEME
TODO?? check that sk is the right kind??
---------------------------------
== TODO: MOVEME
interpGenExp env (LibCall "sizeBVec" [ Var x ]) = Map.lookup x env
appen... |
- Copyright 2017 under the Apache License , Version 2.0 ( the " License " ) ;
- you may not use this file except in compliance with the License .
- You may obtain a copy of the License at
-
- -2.0
-
- Unless required by applicable law or agreed to in writing , software
- distributed... |
9cecfa1dec7fc49fb3ef8ec7818101085bc9d60776cc4d49d57f4a91e4442069 | zcaudate-me/lein-repack | prepare.clj | (ns lama.food.prepare)
(defn foo
"I don't do a whole lot."
[x]
(println x "Hello, World!"))
| null | https://raw.githubusercontent.com/zcaudate-me/lein-repack/1eb542d66a77f55c4b5625783027c31fd2dddfe5/example/repack.simple/src/lama/food/prepare.clj | clojure | (ns lama.food.prepare)
(defn foo
"I don't do a whole lot."
[x]
(println x "Hello, World!"))
| |
10e17c03970eb983ac73a06b5fa255c276b6e2949ca3c88fc1a71fb0c55e8eea | oscoin/oscoin | Internal.hs | module Oscoin.Telemetry.Metrics.Internal
( MetricsStore(..)
, MonotonicCounter(..)
, Metric(..)
, Label(..)
, Labels(..)
, Gauge(..)
, Histogram(..)
, Buckets(..)
, UpperInclusiveBound
, HistogramSample(..)
, Action(..)
) where
import Oscoin.Prelude
import ... | null | https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/src/Oscoin/Telemetry/Metrics/Internal.hs | haskell | -----------------------------------------------------------------------------
Main (internal) types
-----------------------------------------------------------------------------
| A metric identifies a time serie. When embellished with some 'Labels',
it enables a dimensional data model where each combination of lab... | module Oscoin.Telemetry.Metrics.Internal
( MetricsStore(..)
, MonotonicCounter(..)
, Metric(..)
, Label(..)
, Labels(..)
, Gauge(..)
, Histogram(..)
, Buckets(..)
, UpperInclusiveBound
, HistogramSample(..)
, Action(..)
) where
import Oscoin.Prelude
import ... |
bc870dbc7925802502b9c4a04861a16b250fe1564129d4b1590f4dd88931c1f5 | arrdem/toothpick | batbridge_test.clj | (ns toothpick.isa.batbridge-test
(:require [toothpick.isa [batbridge :as bb]
[batbridge-util :refer :all]]
[toothpick.assembler :as a]
[clojure.test :refer :all]))
(deftest big-assembler-regression-test
;; This test attempts to round trip data through toothpick.a... | null | https://raw.githubusercontent.com/arrdem/toothpick/0fc465b697fb98840f7e4281e12ed551f03d6263/test/toothpick/isa/batbridge_test.clj | clojure | This test attempts to round trip data through toothpick.assembler using the
encoding, which requires additional assembler support. | (ns toothpick.isa.batbridge-test
(:require [toothpick.isa [batbridge :as bb]
[batbridge-util :refer :all]]
[toothpick.assembler :as a]
[clojure.test :refer :all]))
(deftest big-assembler-regression-test
Batbridge ISA var . Note that this tests both positive and n... |
8f4ad48e1e190deed8a1f30ce68c48fd44df3eb7e24a89ac07efd22dd7ed74cc | fujita-y/digamma | destructuring.scm | #!core
Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
;;; See LICENSE file for terms and conditions of use.
(library (core destructuring)
(export destructuring-match
destructuring-bind)
(import (core primitives)
(core lists)
(core syntax-case))
(de... | null | https://raw.githubusercontent.com/fujita-y/digamma/58cccd77bd2c208ec58d3cd634cbe65e32b3c7ec/stdlib/core/destructuring.scm | scheme | See LICENSE file for terms and conditions of use.
[end] | #!core
Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
(library (core destructuring)
(export destructuring-match
destructuring-bind)
(import (core primitives)
(core lists)
(core syntax-case))
(define ca---r (make-core-hashtable))
(define cd---r (... |
aa8d4cd1e1f2714ac68d3032bb0c7ffdbaef549597884a6ce4833393c6eeca94 | rd--/hsc3 | pv_BinScramble.help.hs | -- pv_BinScramble
let b = control kr "buf" 0
a = playBuf 1 ar b (bufRateScale kr b) 1 0 Loop DoNothing
f = fft' (localBufId 'α' 2048 1) a
x = mouseX kr 0.0 1.0 Linear 0.1
y = mouseY kr 0.0 1.0 Linear 0.1
g = pv_BinScrambleId 'β' f x y (impulse kr 4 0)
in pan2 (ifft' g) 0 0.5
-- pv_BinScramble ; war... | null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/pv_BinScramble.help.hs | haskell | pv_BinScramble
pv_BinScramble ; warning=feedback
-- ; load sndfile | let b = control kr "buf" 0
a = playBuf 1 ar b (bufRateScale kr b) 1 0 Loop DoNothing
f = fft' (localBufId 'α' 2048 1) a
x = mouseX kr 0.0 1.0 Linear 0.1
y = mouseY kr 0.0 1.0 Linear 0.1
g = pv_BinScrambleId 'β' f x y (impulse kr 4 0)
in pan2 (ifft' g) 0 0.5
let a = soundIn 0
f = fft' (localBufI... |
9be7953b8a1bb779ddd042e29e325dd164cd1e15b3d6bfab078a06ffd6fb9075 | kmi/irs | lisp.lisp | Copyright © 2008 , 2009 The Open University
(in-package #:ocml)
(in-ontology rfc2616)
I 'd prefer this were all in OCML , but I do n't have time .
(defun %http-date (&optional (time (get-universal-time)))
"Make a HTTP-suitable string showing the universal time TIME.
If TIME is not supplied, then 'now' is ass... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/rfc2616/lisp.lisp | lisp | Encode strings for embeddeding in a URL.
XXX Would be nice if this were bidirectional. | Copyright © 2008 , 2009 The Open University
(in-package #:ocml)
(in-ontology rfc2616)
I 'd prefer this were all in OCML , but I do n't have time .
(defun %http-date (&optional (time (get-universal-time)))
"Make a HTTP-suitable string showing the universal time TIME.
If TIME is not supplied, then 'now' is ass... |
7791cde047f1ff9e029254655448f0359a841eb48b1c86ac856c2a32a60f0e8e | haskus/packages | Enum.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE DefaultSignatures #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeApplications #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MagicHash #
| Store an Enum in the given backing word type
module Haskus.Binary.Enum
( EnumField
, CEnum (..)
, fromEnumField
, toEnum... | null | https://raw.githubusercontent.com/haskus/packages/40ea6101cea84e2c1466bc55cdb22bed92f642a2/haskus-binary/src/lib/Haskus/Binary/Enum.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
| Store enum `a` as a `b`
| Read an enum field
| Create an enum field
---------------------------------------------------------------------------
-------------------... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE DefaultSignatures #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeApplications #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MagicHash #
| Store an Enum in the given backing word type
module Haskus.Binary.Enum
( EnumField
, CEnum (..)
, fromEnumField
, toEnum... |
e15151c81feea97b12b49a638d3b63e5835cb909fd1ddb7847458e73c2de6aa6 | zenhack/haskell-capnp | Rpc.hs | # LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedLabels #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -... | null | https://raw.githubusercontent.com/zenhack/haskell-capnp/97a893f57b8494d8d06f892d292bba9384c032a6/tests/Module/Capnp/Rpc.hs | haskell | # LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
Tests using echo.capnp.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Tests using aircraft.capnp.
... | # LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedLabels #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wno - error = missing - methods #
... |
553bbc3503db13e3d5048817799947348df65a2df4fc5db8b2bfb938fb0267ab | ocaml-multicore/tezos | commands.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2022 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/bin_sc_rollup_client/commands.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2022 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
6b88c345dddff1c8f7a55920bc50ad3c19b04f733fb741dd1ad251f09346d51d | con-kitty/categorifier-c | NonFinite.hs | {-# LANGUAGE OverloadedStrings #-}
module Categorifier.C.CTypes.Codegen.NonFinite
( containsFloatingPointArgs,
makeNonFiniteParams,
nonFiniteStatsParam,
NonFiniteField (..),
whenNonFiniteParamExpr,
whenNonFiniteParamIdent,
nonFiniteStatsParamExpr,
needsNonFiniteParams,
fpPrimFunctionB... | null | https://raw.githubusercontent.com/con-kitty/categorifier-c/167ff5cfdeb60b6fa00b10ec74033c32132d45a0/Categorifier/C/CTypes/Codegen/NonFinite.hs | haskell | # LANGUAGE OverloadedStrings #
| No non-finite handling for this parameter
| Pull out and dereference a struct member from the non-finite parameter
to the value parameter
| The given `Identifier` is an argument to the outer function; no struct manipulation is
necessary. |
module Categorifier.C.CTypes.Codegen.NonFinite
( containsFloatingPointArgs,
makeNonFiniteParams,
nonFiniteStatsParam,
NonFiniteField (..),
whenNonFiniteParamExpr,
whenNonFiniteParamIdent,
nonFiniteStatsParamExpr,
needsNonFiniteParams,
fpPrimFunctionBody,
safeNonFiniteAccess,
)
w... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.