_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 |
|---|---|---|---|---|---|---|---|---|
32d4bc019d5f6834a4e7ad7c606a2720fa7bb5887ec888083db4b835a8f0c35e | sjl/cl-nrepl | core.lisp | (in-package :nrepl)
(defvar *middleware* (fset:empty-map))
(defmacro handle-op (message op fallback &rest body)
`(if (equal ,op (fset:lookup ,message "op"))
(progn ,@body)
(funcall ,fallback ,message)))
(defmacro define-middleware (name op message-binding &body body)
"Define a middleware at the symbol `... | null | https://raw.githubusercontent.com/sjl/cl-nrepl/20a71458344a721d605c349b92268879bdfc98a1/src/middleware/core.lisp | lisp | (in-package :nrepl)
(defvar *middleware* (fset:empty-map))
(defmacro handle-op (message op fallback &rest body)
`(if (equal ,op (fset:lookup ,message "op"))
(progn ,@body)
(funcall ,fallback ,message)))
(defmacro define-middleware (name op message-binding &body body)
"Define a middleware at the symbol `... | |
e833f32e598a59e9074a45f4c755b273107feabd0e9afe6e04491729f216d726 | bendlas/davstore | xml.clj | (ns davstore.dav.xml
(:require [clojure.data.xml :as xml]
[clojure.core.match :refer [match]]
[clojure.tools.logging :as log]))
# Namespaced xml parsing
# # Set up runtime - global keyword prefixes
;; They can be used to denote namespaced xml names in as regular clojure keywords
(xml/de... | null | https://raw.githubusercontent.com/bendlas/davstore/f8af4849c04c0404ebd0d6b000ef3b2bcd641d0b/src/davstore/dav/xml.clj | clojure | They can be used to denote namespaced xml names in as regular clojure keywords
e.g. ::props -> :davstore.dav.xml/props -> {DAV:}props
e.g. ::bendlas:regular-file
FIXME: The parser should be able to parse in a namespace-local mode
But maybe not, because then equal parses from different ns
wouldn't be = anymore
# ... | (ns davstore.dav.xml
(:require [clojure.data.xml :as xml]
[clojure.core.match :refer [match]]
[clojure.tools.logging :as log]))
# Namespaced xml parsing
# # Set up runtime - global keyword prefixes
(defn multi? [v]
(or (list? v) (vector? v)))
(defn to-multi [v]
(if (multi? v) v [v... |
81b6a6b8b8f0f0ab406d6d04f899f13ed5196032f4bafc3c5736e7ae6407cd70 | yetanalytics/project-persephone | fsm.cljc | (ns com.yetanalytics.persephone.pattern.fsm
(:require [clojure.spec.alpha :as s]
[clojure.set :as cset]
[com.yetanalytics.persephone.pattern.fsm-spec :as fs]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Finite State Machine Library
;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/yetanalytics/project-persephone/75e62d5153156fa6d1fe67db76ca6eced527e0b5/src/main/com/yetanalytics/persephone/pattern/fsm.cljc | clojure |
the current state changes when the FSM reads an input ,
depending on the transitions available.
- Sigma: The input alphabet, a finite and non-empty set of symbols
- S: A finite, non-empty set of states
- F: The set of finite states, where F \subset S
FSMs can also be depicted as graphs, which is w... | (ns com.yetanalytics.persephone.pattern.fsm
(:require [clojure.spec.alpha :as s]
[clojure.set :as cset]
[com.yetanalytics.persephone.pattern.fsm-spec :as fs]))
Finite State Machine Library
A finite state machine ( FSM ) is a construction consisting of " states " and
An FSM is mat... |
59548952b02a0a4016c2bd3a9512b84668290acd2c85c44c51af966a2628845a | SamB/coq | profile.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/lib/profile.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
If you are unlucky, a minor collect... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ Id$
open Gc
let word_... |
9954c24cab0e9915adf623ef61ea69b1551092dcce55b0a04ea0567a219ace56 | froggey/Mezzano | compiler.lisp | ;;;; Top-level compiler driver
(in-package :mezzano.compiler)
(defvar *should-inline-functions* t)
(defparameter *perform-tce* nil
"When true, attempt to eliminate tail calls.")
(defparameter *trace-asm* nil)
(defvar *jump-table-size-min* 4)
(defvar *jump-table-size-max* 64)
(defvar *load-time-value-hook*)
(de... | null | https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/compiler/compiler.lisp | lisp | Top-level compiler driver
Lower complex lambda lists.
Lower closed-over variables.
Run a final simplify pass to kill off any useless bindings.
Make the dynamic environment explicit.
Inlining must be run before lifting.
Key arg conversion must be performed after lambda-lifting, so as not to
complicate the lift c... |
(in-package :mezzano.compiler)
(defvar *should-inline-functions* t)
(defparameter *perform-tce* nil
"When true, attempt to eliminate tail calls.")
(defparameter *trace-asm* nil)
(defvar *jump-table-size-min* 4)
(defvar *jump-table-size-max* 64)
(defvar *load-time-value-hook*)
(defvar *optimize-restrictions* '(... |
98eae6473c5fafce434efa9a378b40008bfa3572ffebf428355acbce15d778b6 | input-output-hk/cardano-rest | AddressBalance.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
module Explorer.Web.Api.HttpBridge.AddressBalance
( addressBalance
) where
import Cardano.Db
( DbLovelace (..), EntityField (..), queryNetworkName, txOutUnspentP )
import Control.Monad.IO.Class
( MonadIO )
import Data.ByteString.Char8
( ByteStr... | null | https://raw.githubusercontent.com/input-output-hk/cardano-rest/040b123b45af06060aae04479d92fada68820f12/explorer-api/src/Explorer/Web/Api/HttpBridge/AddressBalance.hs | haskell | # LANGUAGE OverloadedStrings #
GET: /:network/utxos/:address
, "txid": "89eb0d6a8a691dae2cd15ed0369931ce0a949ecafa5c3f93f8121833646e15c3"
}
]
This endpoint always returns a list (which may be empty).
Currently ignore the 'CNetwork' parameter (eg mainnet, testnet etc) as the explorer only
supports a si... | # LANGUAGE DataKinds #
module Explorer.Web.Api.HttpBridge.AddressBalance
( addressBalance
) where
import Cardano.Db
( DbLovelace (..), EntityField (..), queryNetworkName, txOutUnspentP )
import Control.Monad.IO.Class
( MonadIO )
import Data.ByteString.Char8
( ByteString )
import Data.Text
( Text )... |
53d2a9499170b8e293cc4d3d698b0ac8ee86b56e305a1bcd88cb14ee8156563b | mfikes/fifth-postulate | ns60.cljs | (ns fifth-postulate.ns60)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (xs... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns60.cljs | clojure | (ns fifth-postulate.ns60)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (xs... | |
b5353d1f0d5c5be0981bd712c5bc75bdc5b49869e5a2cba4085f58dcb61f68c4 | input-output-hk/cardano-ledger-byron | TxProof.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
{-# LANGUAGE OverloadedStrings #-}
module Cardano.Chain.UTxO.TxProof
( TxProof(..)
, mkTxProof
, recoverTxProof
)
where
import Cardano.Prelude
import Data.Aeson (ToJSON)
import Formatting (bprint, build)
imp... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger-byron/d309449e6c303a9f0dcc8dcf172df6f0b3195ed5/cardano-ledger/src/Cardano/Chain/UTxO/TxProof.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
Used for debugging purposes only
| Construct 'TxProof' which proves given 'TxPayload'
care. | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
module Cardano.Chain.UTxO.TxProof
( TxProof(..)
, mkTxProof
, recoverTxProof
)
where
import Cardano.Prelude
import Data.Aeson (ToJSON)
import Formatting (bprint, build)
import qualified Formatting.Buildable as B
import Cardano.Binary (FromCBOR... |
3e89be426de1bf502f48c196b7746d82b386e954f737b1c90095c5df88d464a4 | michaelt/streaming | Internal.hs | # LANGUAGE RankNTypes , StandaloneDeriving , DeriveDataTypeable , BangPatterns #
# LANGUAGE UndecidableInstances , CPP , FlexibleInstances , MultiParamTypeClasses #
{-#LANGUAGE Trustworthy, ScopedTypeVariables, GADTs #-}
module Streaming.Internal (
-- * The free monad transformer
-- $stream
Stream (..)
... | null | https://raw.githubusercontent.com/michaelt/streaming/ccf0b9b08785cdb97c086893866ae6a746a4dba4/src/Streaming/Internal.hs | haskell | #LANGUAGE Trustworthy, ScopedTypeVariables, GADTs #
* The free monad transformer
$stream
* Introducing a stream
* Eliminating a stream
* Inspecting a stream wrap by wrap
* Transforming streams
* Splitting streams
, period
, periods
* Zipping and unzipping streams
* For use in implementation
(>>=) = _bind
... | # LANGUAGE RankNTypes , StandaloneDeriving , DeriveDataTypeable , BangPatterns #
# LANGUAGE UndecidableInstances , CPP , FlexibleInstances , MultiParamTypeClasses #
module Streaming.Internal (
Stream (..)
, unfold
, replicates
, repeats
, repeatsM
, effect
, wrap
, yields
, stre... |
9f41d701035ff3f58e9f89b515d5759035fed1f6f96161b785b1fc1f2d545419 | DanielSchuessler/th-expand-syns | Util.hs | {-# LANGUAGE CPP #-}
# LANGUAGE TemplateHaskell #
module Util where
import Language.Haskell.TH
import Language.Haskell.TH.Datatype.TyVarBndr
import Language.Haskell.TH.ExpandSyns
mkTest :: Q Type -> Q Type -> Q Exp
mkTest input expected =
do
input' <- input
ru... | null | https://raw.githubusercontent.com/DanielSchuessler/th-expand-syns/ace23afbeff3d142ee2febcded6360ae0a5f642a/testing/Util.hs | haskell | # LANGUAGE CPP #
>) :: Q Type -> Q Type -> Q Type
> y = (arrowT `appT` x) `appT` y
> | # LANGUAGE TemplateHaskell #
module Util where
import Language.Haskell.TH
import Language.Haskell.TH.Datatype.TyVarBndr
import Language.Haskell.TH.ExpandSyns
mkTest :: Q Type -> Q Type -> Q Exp
mkTest input expected =
do
input' <- input
runIO . putStrLn $ ("info: input = ... |
d65c078d60c02160d598e17e08db31bc302f640a3cce32ff160039c877f12afc | greglook/solanum | user.clj | (ns user
"Custom repl customization for local development."
(:require
[clojure.java.io :as io]
[clojure.java.shell :as shell]
[clojure.repl :refer :all]
[clojure.set :as set]
[clojure.stacktrace :refer [print-cause-trace]]
[clojure.string :as str]
[clojure.tools.logging :as log]
[clo... | null | https://raw.githubusercontent.com/greglook/solanum/dd90a38ebc1f8fb201f555430044268d4f60752d/dev/user.clj | clojure | (ns user
"Custom repl customization for local development."
(:require
[clojure.java.io :as io]
[clojure.java.shell :as shell]
[clojure.repl :refer :all]
[clojure.set :as set]
[clojure.stacktrace :refer [print-cause-trace]]
[clojure.string :as str]
[clojure.tools.logging :as log]
[clo... | |
7a5189eebc430d8955410aaf52df8b5cc35ae8822c8f46e8e6214b6fb3d5635e | dbuenzli/otfm | B0.ml | open B0_kit.V000
open Result.Syntax
(* OCaml library names *)
let cmdliner = B0_ocaml.libname "cmdliner"
let uutf = B0_ocaml.libname "uutf"
let otfm = B0_ocaml.libname "otfm"
(* Libraries *)
let otfm_lib =
let srcs = Fpath.[ `Dir (v "src") ] in
let requires = [uutf] in
B0_ocaml.lib otfm ~doc:"Otfm library" ~s... | null | https://raw.githubusercontent.com/dbuenzli/otfm/b61821751f807663818034b883e500ccaa856088/B0.ml | ocaml | OCaml library names
Libraries
Tests
Packs | open B0_kit.V000
open Result.Syntax
let cmdliner = B0_ocaml.libname "cmdliner"
let uutf = B0_ocaml.libname "uutf"
let otfm = B0_ocaml.libname "otfm"
let otfm_lib =
let srcs = Fpath.[ `Dir (v "src") ] in
let requires = [uutf] in
B0_ocaml.lib otfm ~doc:"Otfm library" ~srcs ~requires
let test_src f = `File (Fp... |
54a52b42b40129dae728185761226926671e74a728f799ec159f482fbf9648ae | bigmlcom/sketchy | bits.clj | Copyright 2013 BigML
Licensed under the Apache License , Version 2.0
;; -2.0
(ns bigml.sketchy.bits
"Functions for an immutable bitset backed by a vector of longs."
(:refer-clojure :exclude [set or and test])
(:import (java.lang Math)))
(defn create
"Creates a bitset supporting the desired number of bits.... | null | https://raw.githubusercontent.com/bigmlcom/sketchy/f06c6f29035f19bbbdaf86c582fed2722032d283/src/clj/bigml/sketchy/bits.clj | clojure | -2.0 | Copyright 2013 BigML
Licensed under the Apache License , Version 2.0
(ns bigml.sketchy.bits
"Functions for an immutable bitset backed by a vector of longs."
(:refer-clojure :exclude [set or and test])
(:import (java.lang Math)))
(defn create
"Creates a bitset supporting the desired number of bits."
[num... |
8ee1c7029c481bce3b2f2f06be2ffb3a96ee067065c5aa70478cad8f3de42aab | Javran/advent-of-code | Day24.hs | module Javran.AdventOfCode.Y2015.Day24 (
) where
import Data.List
import Javran.AdventOfCode.Prelude
data Day24 deriving (Generic)
{-
Picks from a sorted list to form a subsequence that sums up to a specific number.
-}
collectExact :: Int -> [Int] -> [] ([Int], [Int])
collectExact tgt inp = do
ys <- aux tgt i... | null | https://raw.githubusercontent.com/Javran/advent-of-code/676ef13c2f9d341cf7de0f383335a1cf577bd73d/src/Javran/AdventOfCode/Y2015/Day24.hs | haskell |
Picks from a sorted list to form a subsequence that sums up to a specific number.
no matter how it's partitioned, the partition should always be in this set.
order by len then QE. | module Javran.AdventOfCode.Y2015.Day24 (
) where
import Data.List
import Javran.AdventOfCode.Prelude
data Day24 deriving (Generic)
collectExact :: Int -> [Int] -> [] ([Int], [Int])
collectExact tgt inp = do
ys <- aux tgt inp
pure (ys, inp \\ ys)
where
aux target xs =
if target == 0
then pur... |
1f43b8ac70bc3109b3e5a3367569f1b6c3031e875db7d6169c5b5203c6aca010 | informatimago/lisp | priority-queue-test.lisp | -*- mode : lisp;coding : utf-8 -*-
;;;;**************************************************************************
FILE : priority-queue-test.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; Tests priority-queue.lisp.
;;;;... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/common-lisp/cesarum/priority-queue-test.lisp | lisp | coding : utf-8 -*-
**************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
Tests priority-queue.lisp.
LEGAL
This program is free software: you can redistribute it and/or modify
(at your option) any later versi... | FILE : priority-queue-test.lisp
USER - INTERFACE :
< PJB > < >
MODIFICATIONS
2015 - 02 - 25 < PJB > Extracted from priority-queue.lisp .
AGPL3
Copyright 2015 - 2016
it under the terms of the GNU Affero General Public License as published by
the Free Software F... |
a79f1462b6e98180775dc56f5a909eae6e224e266de910c44f6382995690d970 | jasonjckn/llvm-clojure-bindings | parser.clj | (ns parser
(:use [eu.dnetlib.clojure clarsec monad]))
(def p-exp (<|> natural stringLiteral))
(def p-return (let-bind [_ (symb "return")
n p-exp]
(result `(:return ~n))))
(def p-call (let-bind [name identifier
args (parens (sep-by p-exp comma)... | null | https://raw.githubusercontent.com/jasonjckn/llvm-clojure-bindings/c338788b373dbd02d4cb22acac462ade261de681/src/parser.clj | clojure | (ns parser
(:use [eu.dnetlib.clojure clarsec monad]))
(def p-exp (<|> natural stringLiteral))
(def p-return (let-bind [_ (symb "return")
n p-exp]
(result `(:return ~n))))
(def p-call (let-bind [name identifier
args (parens (sep-by p-exp comma)... | |
740097691a16d0dfe2368c066696944ffba740521e583a2be6fa760204247860 | GalaxyGorilla/exometer_prometheus | exometer_prometheus_test.erl | -module(exometer_prometheus_test).
-include_lib("eunit/include/eunit.hrl").
-define(REPORTER, exometer_report_prometheus).
-define(OPTS, [enable_httpd, {host, {127,0,0,1}}, {port, 8081}, {path, "/metrics"}]).
basic_test() ->
error_logger:tty(false),
Subscribers = [{reporters, [{?REPORTER, ?OPTS}]}],
ap... | null | https://raw.githubusercontent.com/GalaxyGorilla/exometer_prometheus/5c37df514fa04f8fed4359ff5e5561fe5a0fb97d/test/exometer_prometheus_test.erl | erlang | -module(exometer_prometheus_test).
-include_lib("eunit/include/eunit.hrl").
-define(REPORTER, exometer_report_prometheus).
-define(OPTS, [enable_httpd, {host, {127,0,0,1}}, {port, 8081}, {path, "/metrics"}]).
basic_test() ->
error_logger:tty(false),
Subscribers = [{reporters, [{?REPORTER, ?OPTS}]}],
ap... | |
289667e940db7a7b9583f4d62392d293fef9f18d4ffb8d1e6c16f4577a81042c | blamario/grampa | Measured.hs | # LANGUAGE BangPatterns , CPP , FlexibleContexts , InstanceSigs , RankNTypes , ScopedTypeVariables , TypeFamilies , UndecidableInstances #
| Continuation - passing parser for Parsing Expression Grammars that keeps track of the parsed prefix length
module Text.Grampa.PEG.Continued.Measured (Parser(..), Result(..), alt... | null | https://raw.githubusercontent.com/blamario/grampa/db776bacfbf3dd463cda6fdaf6f1bb9a6d412b9b/grammatical-parsers/src/Text/Grampa/PEG/Continued/Measured.hs | haskell | ambiguous prefixes.
| A named and unconstrained version of the '<|>' operator
| Every PEG parser is deterministic all the time.
| Continuation-passing PEG parser that keeps track of the parsed prefix length
@
g (Continued.'Parser' g s) -> s -> g ('ParseResults' s)
@
| Returns an input prefix p... | # LANGUAGE BangPatterns , CPP , FlexibleContexts , InstanceSigs , RankNTypes , ScopedTypeVariables , TypeFamilies , UndecidableInstances #
| Continuation - passing parser for Parsing Expression Grammars that keeps track of the parsed prefix length
module Text.Grampa.PEG.Continued.Measured (Parser(..), Result(..), alt... |
2065eeecd92aa0fb0646a4fa1379f4b64e6f0546e02d8c85f0ab8697b99e3cd9 | yav/presburger | qc.hs | # LANGUAGE TemplateHaskell #
import Data.Integer.SAT
import Test.QuickCheck
import System.Exit
instance Arbitrary BoundType where
arbitrary = elements [Lower, Upper]
withBounds :: Testable prop =>
BoundType -> [(Positive Integer, Integer)] -> (Integer -> prop) -> Property
withBounds kind bs prop =
counterexamp... | null | https://raw.githubusercontent.com/yav/presburger/e38e61ccd1004d03ab28a1a3691d8a3c451d0164/tests/qc.hs | haskell | This is so that the Template Haskell below can see the above properties. | # LANGUAGE TemplateHaskell #
import Data.Integer.SAT
import Test.QuickCheck
import System.Exit
instance Arbitrary BoundType where
arbitrary = elements [Lower, Upper]
withBounds :: Testable prop =>
BoundType -> [(Positive Integer, Integer)] -> (Integer -> prop) -> Property
withBounds kind bs prop =
counterexamp... |
915080c3ae2f8cc63ad1d3761677ec60850309cd87522d1b202f3a3cc49be8af | hasktorch/hasktorch | Categorical.hs | module Torch.Distributions.Categorical
( Categorical (..),
fromProbs,
fromLogits,
)
where
import qualified Torch.DType as D
import qualified Torch.Distributions.Constraints as Constraints
import Torch.Distributions.Distribution
import qualified Torch.Functional as F
import qualified Torch.Functional.Intern... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/c34996b0a401a5b1b98b5774e892fde88adaa079/hasktorch/src/Torch/Distributions/Categorical.hs | haskell | | Creates a categorical distribution parameterized by either :attr:`probs` or
| :attr:`logits` (but not both).
| .. note::
| It is equivalent to the distribution that :func:`torch.multinomial`
| samples from.
| Samples are integers from :math:`\{0, \ldots, K-1\}` where `K` is ``probs.size(-1)``.
| If :at... | module Torch.Distributions.Categorical
( Categorical (..),
fromProbs,
fromLogits,
)
where
import qualified Torch.DType as D
import qualified Torch.Distributions.Constraints as Constraints
import Torch.Distributions.Distribution
import qualified Torch.Functional as F
import qualified Torch.Functional.Intern... |
50a3261b20c2fbdf62c23ade6d4d7b0eba8f2b7e9a9e938b2d4f6deb090de993 | expipiplus1/vulkan | Glslang.hs | module Vulkan.Utils.ShaderQQ.Backend.Glslang
( GlslangError
, GlslangWarning
, processGlslangMessages
) where
import qualified Data.ByteString.Lazy.Char8 as BSL
import Data.List.Extra
import System.FilePath
type GlslangError = String
type GlslangWarning = String
processGlslangMessages ... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/utils/src/Vulkan/Utils/ShaderQQ/Backend/Glslang.hs | haskell | module Vulkan.Utils.ShaderQQ.Backend.Glslang
( GlslangError
, GlslangWarning
, processGlslangMessages
) where
import qualified Data.ByteString.Lazy.Char8 as BSL
import Data.List.Extra
import System.FilePath
type GlslangError = String
type GlslangWarning = String
processGlslangMessages ... | |
9c3414b920119118fc768cecfb0ddab6e24b2e710a7a9893de219e432af5e209 | cnuernber/dtype-next | reductions.clj | (ns tech.v3.datatype.reductions
"High performance reductions based on tech.v3.datatype concepts as well
as java stream concepts."
(:require [tech.v3.datatype.base :as dtype-base]
[tech.v3.parallel.for :as parallel-for]
[tech.v3.datatype.casting :as casting]
[tech.v3.datatype.er... | null | https://raw.githubusercontent.com/cnuernber/dtype-next/7f3d85d159c3a74d5fca53c8c50243812e0da4e2/src/tech/v3/datatype/reductions.clj | clojure | unspecified nan-strategy is :remove
Hopefully this returns what we think it should... | (ns tech.v3.datatype.reductions
"High performance reductions based on tech.v3.datatype concepts as well
as java stream concepts."
(:require [tech.v3.datatype.base :as dtype-base]
[tech.v3.parallel.for :as parallel-for]
[tech.v3.datatype.casting :as casting]
[tech.v3.datatype.er... |
1c4d10df1e5cb53f498223784caabb55caaf6280b073269a142b739eb17bfbb4 | spechub/Hets | VSE.hs | # LANGUAGE CPP #
|
Module : ./Proofs / VSE.hs
Description : Interface to send structured theories to the VSE prover
Copyright : ( c ) , DFKI 2009
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : needs POSIX
call an ada... | null | https://raw.githubusercontent.com/spechub/Hets/0dfcaf6a049bd686ee64f0cb245b0d3694a5f8ac/Proofs/VSE.hs | haskell | | applies basic inference to a given node and whole import tree above
node missing in original graph | # LANGUAGE CPP #
|
Module : ./Proofs / VSE.hs
Description : Interface to send structured theories to the VSE prover
Copyright : ( c ) , DFKI 2009
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : needs POSIX
call an ada... |
f13f0800a19e2079b7517d158c072149378d87fb2f185ec87694a548ba671f7b | jimpil/cryptohash-clj | argon2.clj | (ns cryptohash-clj.specs.argon2
(:require [clojure.spec.alpha :as s]))
(s/def ::type
#{:argon2d :argon2i :argon2id})
(s/def ::version
#{:v10 :v13})
(s/def ::iterations
pos-int?)
(s/def ::mem-cost
pos-int?)
parallelisation factor
pos-int?)
(s/def ::key-length ;; in bytes
pos-int?)
(s/def ::salt-le... | null | https://raw.githubusercontent.com/jimpil/cryptohash-clj/5ea9e4abb83065d044ea7471ed7e86b85450e300/src/cryptohash_clj/specs/argon2.clj | clojure | in bytes
in bytes | (ns cryptohash-clj.specs.argon2
(:require [clojure.spec.alpha :as s]))
(s/def ::type
#{:argon2d :argon2i :argon2id})
(s/def ::version
#{:v10 :v13})
(s/def ::iterations
pos-int?)
(s/def ::mem-cost
pos-int?)
parallelisation factor
pos-int?)
pos-int?)
pos-int?)
(s/def ::additional
bytes?)
(s/d... |
c3283abfa9adc0160447cfdb12527fed30242cb39203a9056d48b03f65646b3c | huangjs/cl | demo_mcchef.lsp | (load "mcmops.lsp")
(load "mcchef.lsp")
(clear-memory)
(load "mcmops.mops")
(load "mcchef.mops")
(chef-demo)
| null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/other-code/cs325/www.cs.northwestern.edu/academics/courses/325/programs/icbr/demo_mcchef.lsp | lisp | (load "mcmops.lsp")
(load "mcchef.lsp")
(clear-memory)
(load "mcmops.mops")
(load "mcchef.mops")
(chef-demo)
| |
574e3b987ac67be6d10e14781d6f3920e223ee2a0f72737ce1908a58de9e8485 | rill-event-sourcing/rill | event_store.clj | (ns rill.event-store)
(defprotocol EventStore
"The basic abstraction for storage and retrieval in rill.
A backing store (or client code talking to a backing store, in a multi-process
setup) only has to implement this basic protocol.
Many transformation mechanisms (like message upcasting/migrating) can be
s... | null | https://raw.githubusercontent.com/rill-event-sourcing/rill/711d08e52bd331cdc2255199069b2d0aca69e8b0/src/rill/event_store.clj | clojure | this
if the stream is empty, returns an empty | (ns rill.event-store)
(defprotocol EventStore
"The basic abstraction for storage and retrieval in rill.
A backing store (or client code talking to a backing store, in a multi-process
setup) only has to implement this basic protocol.
Many transformation mechanisms (like message upcasting/migrating) can be
s... |
889b95231c31807a9616371fb4522c21c99b962f2c8121bb65f551b966b4a98d | puppetlabs/puppetdb | test_protocols.clj | (ns puppetlabs.puppetdb.test-protocols
(:require [clojure.test :refer :all]))
A protocol to be reified alongside IFn ; after the function has been
;; called once, called? should return true.
(defprotocol IMockFn
(called? [this]))
| null | https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/test/puppetlabs/puppetdb/test_protocols.clj | clojure | after the function has been
called once, called? should return true. | (ns puppetlabs.puppetdb.test-protocols
(:require [clojure.test :refer :all]))
(defprotocol IMockFn
(called? [this]))
|
bed870817bbccf4abd31c5f5848363e63c8cb5990af3e50eeb823135559bfef5 | commercialhaskell/stack | Dependency.hs | # LANGUAGE NoImplicitPrelude #
module Stack.Types.Dependency
( DepValue (..)
, DepType (..)
) where
import Distribution.Types.VersionRange ( VersionRange )
import Stack.Prelude
import Stack.Types.Version ( intersectVersionRanges )
-- | The value for a map from dependency name. Th... | null | https://raw.githubusercontent.com/commercialhaskell/stack/13d275eaead9762a65c4a40fabb85f4e99a79331/src/Stack/Types/Dependency.hs | haskell | | The value for a map from dependency name. This contains both the version
range and the type of dependency, and provides a semigroup instance.
| Is this package being used as a library, or just as a build tool? If the
former, we need to ensure that a library actually exists. See
<> | # LANGUAGE NoImplicitPrelude #
module Stack.Types.Dependency
( DepValue (..)
, DepType (..)
) where
import Distribution.Types.VersionRange ( VersionRange )
import Stack.Prelude
import Stack.Types.Version ( intersectVersionRanges )
data DepValue = DepValue
{ dvVersionRange :: !V... |
5e8a21a7da7421b89328483ec0c77e60637d84ef30e12a83ba0369f63aab1231 | ml4tp/tcoq | classops.mli | (************************************************************************)
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/pretyping/classops.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Equality over [cl_typ]
* Comparis... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Term
open Evd... |
92368738efbfa4fc52a85acf4f7296e379ec5a8aa0ff7638723bf8e4679fd034 | luc-tielen/llvm-codegen | Setup.hs | NOTE : Copied from the - hs project . Only modification is the LLVM version .
# LANGUAGE CPP , FlexibleInstances #
import Control.Exception (SomeException, try)
import Control.Monad
import Data.Char
import Data.List
import Data.Maybe
import Data.Monoid
import Distribution.PackageDescription hiding (buildInfo, inclu... | null | https://raw.githubusercontent.com/luc-tielen/llvm-codegen/6212516af0bd561f46f06750dd80a4310b97be03/Setup.hs | haskell | without checking they're already defined and so causes warnings.
| These flags are not relevant for us and dropping them allows
| Header directories are added separately to configExtraIncludeDirs | NOTE : Copied from the - hs project . Only modification is the LLVM version .
# LANGUAGE CPP , FlexibleInstances #
import Control.Exception (SomeException, try)
import Control.Monad
import Data.Char
import Data.List
import Data.Maybe
import Data.Monoid
import Distribution.PackageDescription hiding (buildInfo, inclu... |
c9aa91e87a45698ce5772128c8b7716fb46a85c1a486904f65b14b2ce708a6d1 | flatironinstitute/flathub | Static.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Static
( FilePathComponent(..)
, getModificationTime'
, cacheControl
, static
, staticURI
, staticFront
) where
import Control.Exception (h... | null | https://raw.githubusercontent.com/flatironinstitute/flathub/e355bac91c83ed0c278dd3d5f6a20aedc5d7327b/src/Static.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeSynonymInstances # | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
module Static
( FilePathComponent(..)
, getModificationTime'
, cacheControl
, static
, staticURI
, staticFront
) where
import Control.Exception (handleJust)
import Control.Monad (guard)
import Contro... |
e81a4317094cfd5b430e5147a04ead63f0d7e2b728246dbc2ea27295c31df5e8 | b0-system/b0 | b00_os.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2020 The b0 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/b0-system/b0/cbe12b8a55da6b50ab01ed058b339dbed3cfe894/src/b00/kit/b00_os.mli | ocaml | * Operating system and machine information.
| ---------------------------------------------------------------------------
Copyright ( c ) 2020 The b0 programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... |
fd9938a21204fa22592aee054c901c2e7cf3923095639251c039cb7f6cf03e7b | fredlund/McErlang | mce_table_bitHash.erl | Copyright ( c ) 2009 ,
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions are met:
%% %% Redistributions of source code must retain the above copyright
%% notice, this list of conditions a... | null | https://raw.githubusercontent.com/fredlund/McErlang/25b38a38a729fdb3c3d2afb9be016bbb14237792/tables/src/mce_table_bitHash.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
%% Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
%% Redi... | Copyright ( c ) 2009 ,
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
@author
2006 - 2009
@private
-module(mce_table_bitHash).
-export([init/1,permit_state/2,permit_state_alt/2,add_state/2... |
f3b0dd443df5608ff171773b3693bf4e44b6d35977adc3ef11c2df725359e6ed | barracudanetworks/lighthouse | manifest_test.clj | (ns lh.manifest-test
(:require [clojure.java.io :as io]
[clojure.test :refer :all]
[lh.manifest :as sut]
[lh.test-support :refer [lh] :as test]))
(deftest test-join-path
(is (= "a.b.c" (#'sut/join-path [:a :b :c]))))
(deftest test-comment
(is (= ";; foobar" (#'sut/comment lh ... | null | https://raw.githubusercontent.com/barracudanetworks/lighthouse/b66e5e431d407a3e7d5983d71b03806713b91df6/test/lh/manifest_test.clj | clojure | (ns lh.manifest-test
(:require [clojure.java.io :as io]
[clojure.test :refer :all]
[lh.manifest :as sut]
[lh.test-support :refer [lh] :as test]))
(deftest test-join-path
(is (= "a.b.c" (#'sut/join-path [:a :b :c]))))
(deftest test-comment
(is (= ";; foobar" (#'sut/comment lh ... | |
41fd7ab8aca17ca2b7a117b32d16c70cbf54c9564f205ade663fdddf5c02b398 | Ingemark/pbxis | testutil.clj | (ns com.ingemark.testutil
(:require [clojure.test :as t :refer [is]]
[orchestra.spec.test :as stest]))
(defn with-instrumentation [f]
(stest/instrument)
(f))
| null | https://raw.githubusercontent.com/Ingemark/pbxis/9da41ebb717e02f1a3e3e6f553f340c3dd77e619/test/com/ingemark/testutil.clj | clojure | (ns com.ingemark.testutil
(:require [clojure.test :as t :refer [is]]
[orchestra.spec.test :as stest]))
(defn with-instrumentation [f]
(stest/instrument)
(f))
| |
3d96cfea86904f390c4de0b6579febd4416712456f8fc93f6a8062f2e9681bcb | RedPRL/redtt | IxMonad.ml | module type S =
sig
type ('i, 'o, 'a) m
val ret : 'a -> ('i, 'i, 'a) m
val bind : ('i, 'j, 'a) m -> ('a -> ('j, 'k, 'b) m) -> ('i, 'k, 'b) m
end
module type Notation =
sig
type ('i, 'o, 'a) m
val (>>=) : ('i, 'j, 'a) m -> ('a -> ('j, 'k, 'b) m) -> ('i, 'k, 'b) m
val (>>) : ('i, 'j, 'a) m -> ('j, 'k, 'b) m... | null | https://raw.githubusercontent.com/RedPRL/redtt/50689559ff970e33013b8cf8a3bbc8be18ec4e09/src/basis/IxMonad.ml | ocaml | module type S =
sig
type ('i, 'o, 'a) m
val ret : 'a -> ('i, 'i, 'a) m
val bind : ('i, 'j, 'a) m -> ('a -> ('j, 'k, 'b) m) -> ('i, 'k, 'b) m
end
module type Notation =
sig
type ('i, 'o, 'a) m
val (>>=) : ('i, 'j, 'a) m -> ('a -> ('j, 'k, 'b) m) -> ('i, 'k, 'b) m
val (>>) : ('i, 'j, 'a) m -> ('j, 'k, 'b) m... | |
93b116be46ab4ff5742c3c3db99af2ee5da0a5a2bbe21d8ef58f70ad67baadf8 | yawaramin/ocaml-decimal | decimal.ml | module Signal = struct
type id = int
type nonrec array = bool array
let clamped = 0
let invalid_operation = 1
let conversion_syntax = 2
let div_by_zero = 3
let div_impossible = 4
let div_undefined = 5
let inexact = 6
let rounded = 7
let subnormal = 8
let overflow = 9
let underflow = 10
let... | null | https://raw.githubusercontent.com/yawaramin/ocaml-decimal/93b70ef9e4ded77bd5a553c512b3d38689622c76/lib/decimal.ml | ocaml | * [handle flag t] is the result of handling [flag] in the context [t].
* [raise ?msg flag t] sets the [flag], then either handles the signal and
possibly returns a result, or raises an exception (if set to trap the
signal).
No exponent required
Engineering notation, nonzero
* [fix context t] is [t] ro... | module Signal = struct
type id = int
type nonrec array = bool array
let clamped = 0
let invalid_operation = 1
let conversion_syntax = 2
let div_by_zero = 3
let div_impossible = 4
let div_undefined = 5
let inexact = 6
let rounded = 7
let subnormal = 8
let overflow = 9
let underflow = 10
let... |
460ac4fda69ef83dbfcfb2e6084fb57bc4ca10e4ee4b2686216f58ee62d8a957 | locusmath/locus | object.clj | (ns locus.cmon.semimodule.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.sequence.object :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.con.core.setpart :refer :all]
... | null | https://raw.githubusercontent.com/locusmath/locus/12061072ccfe6a28f87eb8bd4489397dcf4b93d8/src/clojure/locus/cmon/semimodule/object.clj | clojure | A semimodule is like a commutative monoid with operators
General conversion routines to convert things into semimodules
Compute the subalgebra lattice of a semimodule | (ns locus.cmon.semimodule.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.sequence.object :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.con.core.setpart :refer :all]
... |
bcbcb218efce066be7085cb87701380b559bd2e6c6b0fdc5a793e0d057cdff20 | AshleyYakeley/Truth | Set.hs | module Changes.Core.Types.Set where
import Changes.Core.Edit
import Changes.Core.Import
import Changes.Core.Lens
import Changes.Core.Read
import Changes.Core.Types.None
import Changes.Core.Types.Partial
import Changes.Core.Types.ReadOnly
import Changes.Core.Types.Tuple.Function
import Changes.Core.Types.Tuple.Pair
imp... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/f7a87bd202e3204bcf185e4979bb4d5e1f3f12c3/Changes/changes-core/lib/Changes/Core/Types/Set.hs | haskell | module Changes.Core.Types.Set where
import Changes.Core.Edit
import Changes.Core.Import
import Changes.Core.Lens
import Changes.Core.Read
import Changes.Core.Types.None
import Changes.Core.Types.Partial
import Changes.Core.Types.ReadOnly
import Changes.Core.Types.Tuple.Function
import Changes.Core.Types.Tuple.Pair
imp... | |
d559261f402b8eaf25bf10fcb93d213a6a0728b1de0ce098af6c4f3a45594b5e | weblocks-framework/weblocks | acache-backend.lisp | ;;;
(in-package #:weblocks)
(defmethod class-store (class-name) :around
(typecase (find-class class-name)
(db.allegrocache::persistent-class
db.allegrocache:*allegrocache*)
(t (call-next-method))))
(defmethod object-id (obj)
(db.allegrocache:db-object-oid obj))
(... | null | https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/contrib/jfremlin/acache-backend.lisp | lisp |
; ;
| (in-package #:weblocks)
(defmethod class-store (class-name) :around
(typecase (find-class class-name)
(db.allegrocache::persistent-class
db.allegrocache:*allegrocache*)
(t (call-next-method))))
(defmethod object-id (obj)
(db.allegrocache:db-object-oid obj))
(defme... |
f0497ae752d64d043e726cdacdcb93982e177da8830cb5dbbcc44279678fb97f | lixiangqi/medic | src5.rkt | #lang racket
(require "f.rkt")
(define t 5)
(define (g x)
(* x (f x t)))
(g 3) | null | https://raw.githubusercontent.com/lixiangqi/medic/0920090d3c77d6873b8481841622a5f2d13a732c/demos/demo5/src5.rkt | racket | #lang racket
(require "f.rkt")
(define t 5)
(define (g x)
(* x (f x t)))
(g 3) | |
34a3bb5df46017e5c21758187dd9562850f549f9c90d002e9924e2392f1e29d5 | bjpop/haskell-mpi | FastAndSimpleTests.hs | module FastAndSimpleTests (fastAndSimpleTests) where
import TestHelpers
import Control.Parallel.MPI.Fast as Fast
import Control.Parallel.MPI.Simple as Simple
import Data.Serialize ()
fastAndSimpleTests :: Rank -> [(String,TestRunnerTest)]
fastAndSimpleTests rank =
[ mpiTestCase rank "mixing Fast and Simple poin... | null | https://raw.githubusercontent.com/bjpop/haskell-mpi/1a4e6f0ed20c7b0760344640f1ba5f2141e61719/test/FastAndSimpleTests.hs | haskell | sending via Fast | module FastAndSimpleTests (fastAndSimpleTests) where
import TestHelpers
import Control.Parallel.MPI.Fast as Fast
import Control.Parallel.MPI.Simple as Simple
import Data.Serialize ()
fastAndSimpleTests :: Rank -> [(String,TestRunnerTest)]
fastAndSimpleTests rank =
[ mpiTestCase rank "mixing Fast and Simple poin... |
ddc0a6affa5830fc884fddf6ac7461e4c8d2fc9d7e379d5e48d409e5ca0958c0 | zenspider/schemers | exercise.4.79.scm | #!/usr/bin/env csi -s
(require rackunit)
Exercise 4.79
;; When we implemented the Lisp evaluator in section
* Note 4 - 1 : : , we saw how to use local environments to avoid name
;; conflicts between the parameters of procedures. For example, in
;; evaluating
;;
;; (define (square x)
;; (* x x))
;;
;... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_4/exercise.4.79.scm | scheme | When we implemented the Lisp evaluator in section
conflicts between the parameters of procedures. For example, in
evaluating
(define (square x)
(* x x))
(define (sum-of-squares x y)
(+ (square x) (square y)))
there is no confusion between the `x' in `square' and the `x' in
`sum-of-... | #!/usr/bin/env csi -s
(require rackunit)
Exercise 4.79
* Note 4 - 1 : : , we saw how to use local environments to avoid name
( sum - of - squares 3 4 )
answer is probably worth a Ph.D. )
|
3ecd7f6ac365c9d7733b7addb52c182d3ca1a45be8a68f2b9954100bf732deb6 | Cnly/clj-latex | core.clj | (ns clj-latex.core
(:require
[clojure.string :as str]
[clojure.walk :as w])
(:gen-class))
(def ^:dynamic indent-width 2)
(def ^:dynamic indent-unit " ")
(defn indented [s]
(str (str/join (repeat indent-width indent-unit)) s))
(defn sym->str [x]
(cond
(keyword? x)
(str \\ (name x))
(instance... | null | https://raw.githubusercontent.com/Cnly/clj-latex/800f11ffcc1861eb4ae64e455ab9a863cb082975/src/clj_latex/core.clj | clojure | LaTeX special chars
Optional args | (ns clj-latex.core
(:require
[clojure.string :as str]
[clojure.walk :as w])
(:gen-class))
(def ^:dynamic indent-width 2)
(def ^:dynamic indent-unit " ")
(defn indented [s]
(str (str/join (repeat indent-width indent-unit)) s))
(defn sym->str [x]
(cond
(keyword? x)
(str \\ (name x))
(instance... |
f34970887375f10fec04e1b4fbbb97b5f390cdee9817945ca6a093e3a524dd8b | lspitzner/exference | Traversable.hs | module Data.Traversable where
class (Data.Functor.Functor t, Data.Foldable.Foldable t) => Traversable t where
traverse :: Control.Applicative.Applicative f => (a -> f b) -> t a -> f (t b)
sequenceA :: Control.Applicative.Applicative f => t (f a) -> f (t a)
mapM : : Control . Monad . Monad m = > ( a - > m b ) -... | null | https://raw.githubusercontent.com/lspitzner/exference/d8a336f8b9df905e54173339f78ba892daa3f688/environment/Traversable.hs | haskell | cause " unused " problems
cause " unused " problems | module Data.Traversable where
class (Data.Functor.Functor t, Data.Foldable.Foldable t) => Traversable t where
traverse :: Control.Applicative.Applicative f => (a -> f b) -> t a -> f (t b)
sequenceA :: Control.Applicative.Applicative f => t (f a) -> f (t a)
mapM : : Control . Monad . Monad m = > ( a - > m b ) -... |
647348743090d5d5bae8a3b33a2301ca065ff3922bc70305547de6ed58379592 | travelping/capwap | capwap_http_api_SUITE.erl | Copyright ( C ) 2013 - 2023 , Travelping GmbH < >
%% 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 your option ) any later version .
-module(cap... | null | https://raw.githubusercontent.com/travelping/capwap/c2e503c5ad7d6b4c0ff3df2a4d5deed73d5f7c51/test/capwap_http_api_SUITE.erl | erlang | This program is free software; you can redistribute it and/or
fake exometer entries
===================================================================
===================================================================
default for ALL WTP's | Copyright ( C ) 2013 - 2023 , Travelping GmbH < >
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 your option ) any later version .
-module(capwap_http_api_SUITE).
-compile(export_all).
-include_lib("common... |
d8fba7bf34be4fac6c96b79ec8dcd0e76a0f7efc9faf782883dad54363f8d8f6 | fission-codes/fission | Private.hs | # OPTIONS_GHC -fno - warn - orphans #
module Web.UCAN.Internal.Orphanage.RSA2048.Private () where
import RIO
import qualified RIO.ByteString.Lazy as Lazy
import Test.QuickCheck
import Data.Binary as Binary
import Data.ByteArray as ByteArray
import qualified Code... | null | https://raw.githubusercontent.com/fission-codes/fission/ae177407dccc20be67948a901956b99f40d37ac8/hs-ucan/library/Web/UCAN/Internal/Orphanage/RSA2048/Private.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Web.UCAN.Internal.Orphanage.RSA2048.Private () where
import RIO
import qualified RIO.ByteString.Lazy as Lazy
import Test.QuickCheck
import Data.Binary as Binary
import Data.ByteArray as ByteArray
import qualified Code... | |
26e4d3b89e0ed102c9a40e518ee66374ea693f2344b6b6c96fe730718997ab24 | QuickChick/TestingNoninterference | Driver.hs | # LANGUAGE ImplicitParams , FlexibleContexts , UndecidableInstances ,
RankNTypes ,
RecordWildCards , TupleSections , ScopedTypeVariables , NamedFieldPuns #
RankNTypes,
RecordWildCards, TupleSections, ScopedTypeVariables, NamedFieldPuns #-}
module Driver where
import Test.QuickCheck
import... | null | https://raw.githubusercontent.com/QuickChick/TestingNoninterference/29cc71ec6aa734e84b4087556ddf8d5555cf8819/stack/Driver.hs | haskell | Import just Arbitrary
We make the context be an implicit parameter to be
able to pick which flags to use per-run, as a value.
This allows us to QC with random configurations too.
convenient.
; let ?dfs = flags
See Note [Harmonic Mean]
Note [Harmonic Mean]
Informally, 1/(1/0 + …) ≈ 1/(∞ + …) ≈ 1/∞ ≈ 0.... | # LANGUAGE ImplicitParams , FlexibleContexts , UndecidableInstances ,
RankNTypes ,
RecordWildCards , TupleSections , ScopedTypeVariables , NamedFieldPuns #
RankNTypes,
RecordWildCards, TupleSections, ScopedTypeVariables, NamedFieldPuns #-}
module Driver where
import Test.QuickCheck
import... |
6edaf6d5d5de82497bc203a048991af9e681e90d4679b6392440f8e575f7bf01 | earl-ducaine/cl-garnet | gesture-compiler.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : COMMON - LISP - USER ; Base : 10 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The Garnet User Interface Development Environment . ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; This c... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/gesture/gesture-compiler.lisp | lisp | Syntax : Common - Lisp ; Package : COMMON - LISP - USER ; Base : 10 -*-
; ;
This code was written as part of the Garnet project at ;;;
; ;
; ;
please contact to be put on the mailing list. ;;;
"features"
"matrix"
"classify"
"gestureinter"
"fileio"
"train"
"agate" |
(in-package :COMMON-LISP-USER)
(defvar *debug-gesture-mode* nil)
(dolist (pair '((:motif-text-buttons "motif-text-buttons-loader")
(:motif-scrolling-labeled-box "motif-scrolling-labeled-box-loader")
(:motif-radio-buttons "motif-radio-buttons-loader")
(:motif-error-gadget "motif-error-gadget-loader")
... |
96cc0aefed805cce30b6307051e3ccacdb4da89eee25f5596545a9ffab6b64ff | YoshikuniJujo/test_haskell | try-vulkan-guide.hs | # LANGUAGE TemplateHaskell , QuasiQuotes #
# , LambdaCase , OverloadedStrings #
# LANGUAGE ScopedTypeVariables , RankNTypes , TypeApplications #
# LANGUAGE GADTs , TypeFamilies #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE MultiParamTypeClasses , AllowAmbiguousTypes #
# LANGUAGE FlexibleContexts , Fl... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/4c964ca2b77707ddb5b78af775c0893d2c4be6ea/themes/gui/vulkan/try-my-vulkan-snd/app/try-vulkan-guide.hs | haskell | # LANGUAGE PatternSynonyms, ViewPatterns #
print vns >>
Vk.Mem.Alignments '[
Vk.Mem.Alignments '[
(ViewProj . Cglm.glmMat4Mul view $ projection sce) | # LANGUAGE TemplateHaskell , QuasiQuotes #
# , LambdaCase , OverloadedStrings #
# LANGUAGE ScopedTypeVariables , RankNTypes , TypeApplications #
# LANGUAGE GADTs , TypeFamilies #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE MultiParamTypeClasses , AllowAmbiguousTypes #
# LANGUAGE FlexibleContexts , Fl... |
60b428f506dd51eff9db58b37dea53ee510f505a4d98d994996528e3221bbcde | CSCfi/rems | applications.cljs | (ns rems.applications
(:require [re-frame.core :as rf]
[rems.application-list :as application-list]
[rems.atoms :refer [document-title]]
[rems.fetcher :as fetcher]
[rems.flash-message :as flash-message]
[rems.common.roles :as roles]
[rems.search ... | null | https://raw.githubusercontent.com/CSCfi/rems/644ef6df4518b8e382cdfeadd7719e29508a26f0/src/cljs/rems/applications.cljs | clojure | UI | (ns rems.applications
(:require [re-frame.core :as rf]
[rems.application-list :as application-list]
[rems.atoms :refer [document-title]]
[rems.fetcher :as fetcher]
[rems.flash-message :as flash-message]
[rems.common.roles :as roles]
[rems.search ... |
1d3a080e8cddcaa81da871ead1b690541af44a98ea03189e3d26a9659c9f402c | janestreet/core | hashtbl.ml | open! Import
open Hashtbl_intf
module Hashable = Hashtbl_intf.Hashable
module Merge_into_action = Hashtbl_intf.Merge_into_action
module List = List0
let failwiths = Error.failwiths
module Creators = Hashtbl.Creators
include (
Hashtbl :
sig
type ('a, 'b) t = ('a, 'b) Hashtbl.t [@@deriving sexp_of]
includ... | null | https://raw.githubusercontent.com/janestreet/core/d0d1b3915c9350d8e9f2b395a817659e539e6155/core/src/hashtbl.ml | ocaml | The binary representation of hashtbl is relied on by stable modules
(e.g. Hashtable.Stable) and is therefore assumed to be stable. So, if the key and
data can provide a stable witnesses, then we can safely the hashtbl is also
stable. | open! Import
open Hashtbl_intf
module Hashable = Hashtbl_intf.Hashable
module Merge_into_action = Hashtbl_intf.Merge_into_action
module List = List0
let failwiths = Error.failwiths
module Creators = Hashtbl.Creators
include (
Hashtbl :
sig
type ('a, 'b) t = ('a, 'b) Hashtbl.t [@@deriving sexp_of]
includ... |
158de7f8cdaf5ccb2bcb6d664e29bbd0d280da5a785ad0b7e09c16322287ed86 | gsdlab/clafer | Clafer.hs | {-# LANGUAGE NamedFieldPuns #-}
Copyright ( C ) 2012 - 2017 , , < >
Permission is hereby granted , free of charge , to any person obtaining a copy of
this software and associated documentation files ( the " Software " ) , to deal in
the Software without restriction , including without limitation... | null | https://raw.githubusercontent.com/gsdlab/clafer/a30a645ae1e4fc793851e53446d220924038873a/src/Language/Clafer.hs | haskell | # LANGUAGE NamedFieldPuns #
mURL = Nothing means compile the top-level module
mURL = Just url means compile an imported module from the given url
use the same args just change the file name
use the same args just change the file name
htmlCatch :: Either ClaferErr CompilerResult -> ClaferArgs -> String -> IO(... |
Copyright ( C ) 2012 - 2017 , , < >
Permission is hereby granted , free of charge , to any person obtaining a copy of
this software and associated documentation files ( the " Software " ) , to deal in
the Software without restriction , including without limitation the rights to
use , copy , modif... |
473d16c793c36148575f7c2d2a86258891e348232191e5e836b5683b77c1208c | nixeagle/nisp | comchar.lisp | (in-package :nisp.i)
(deftype valid-comchar ()
"Usable characters for irc comchars.
Most anything else in the ASCII set can't be used as they occur as part
of normal conversation and an IRC bot that interferes with that is not
a very friendly bot."
'(member #\! #\% #\) #\+ #\, #\- #\. #\<
#\@ #\\ #\] #\_ #\` ... | null | https://raw.githubusercontent.com/nixeagle/nisp/680b40b3b9ea4c33db0455ac73cbe3756afdbb1e/irc-bot/comchar.lisp | lisp | (in-package :nisp.i)
(deftype valid-comchar ()
"Usable characters for irc comchars.
Most anything else in the ASCII set can't be used as they occur as part
of normal conversation and an IRC bot that interferes with that is not
a very friendly bot."
'(member #\! #\% #\) #\+ #\, #\- #\. #\<
#\@ #\\ #\] #\_ #\` ... | |
6cb953003f067f717748cd612bc7b97c525af731f683292f015c25e368e28d3a | cvillecsteele/lein-git-version | plugin.clj | (ns lein-git-version.plugin
(:require
[clojure.java.io :as io]
[clojure.string :as str]
[leiningen.git-version :refer :all])
(:import
(java.io File)
(java.util.regex Pattern)))
(defn- version-file
[{:keys [git-version group name source-paths] :as project} config]
(let [srcpath (first (filter seq... | null | https://raw.githubusercontent.com/cvillecsteele/lein-git-version/442e5edf4d0c8fc7d1e18cbe9523d20ee71c29ac/src/lein_git_version/plugin.clj | clojure | (ns lein-git-version.plugin
(:require
[clojure.java.io :as io]
[clojure.string :as str]
[leiningen.git-version :refer :all])
(:import
(java.io File)
(java.util.regex Pattern)))
(defn- version-file
[{:keys [git-version group name source-paths] :as project} config]
(let [srcpath (first (filter seq... | |
08be3a358f134ff5c2e97e7e39440beb9c66d156e9344ddfcf7c77fa7b6b79fe | ghc/ghc | Utils.hs |
( c ) The GRASP / AQUA Project , Glasgow University , 1993 - 1998
A library for the ` ` worker\/wrapper '' back - end to the strictness analyser
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
A library for the ``worker\/wrapper'' back-end to the strictness analyser
-}
# LANGUAGE ViewPatterns #
mod... | null | https://raw.githubusercontent.com/ghc/ghc/354aa47d313113855aff9e5c5476fcb56f80e3bf/compiler/GHC/Core/Opt/WorkWrap/Utils.hs | haskell | wrapper ( an unfolding )
call the worker ; do n't forget the type args !
worker
note : body of g moved intact
" f " strictness : U(P)U(P )
" g " strictness same as " f "
wrapper (an unfolding)
call the worker; don't forget the type args!
worker
note: body of g moved intact
"f" strictness: U(P)U(P)
"g"... |
( c ) The GRASP / AQUA Project , Glasgow University , 1993 - 1998
A library for the ` ` worker\/wrapper '' back - end to the strictness analyser
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
A library for the ``worker\/wrapper'' back-end to the strictness analyser
-}
# LANGUAGE ViewPatterns #
mod... |
1257e86b1e9c53ef562d50ed588c885a30d2243863f3ce06e1a170d2d6b84d35 | 1HaskellADay/1HAD | Solution.hs | module HAD.Y2014.M03.D26.Solution
( Board
, board
, getList
, Direction (..)
, viewFrom
) where
import Data.List (groupBy, transpose)
import Control.Applicative ((<*>))
import Control.Monad (liftM, replicateM)
import Test.QuickCheck
-- Preamble
-- $setup
-- >>> import Control.Applicative ((<$>), (<*>))
... | null | https://raw.githubusercontent.com/1HaskellADay/1HAD/3b3f9b7448744f9b788034f3aca2d5050d1a5c73/exercises/HAD/Y2014/M03/D26/Solution.hs | haskell | Preamble
$setup
>>> import Control.Applicative ((<$>), (<*>))
>>> import Data.List (sort)
>>> :{
let checkReverse d1 d2 =
(==) <$>
sort . map sort . getList . viewFrom d1 <*>
sort . map (sort . reverse) . getList . viewFrom d2
:}
Exercise
| viewFrom given a direction, produce an involut... | module HAD.Y2014.M03.D26.Solution
( Board
, board
, getList
, Direction (..)
, viewFrom
) where
import Data.List (groupBy, transpose)
import Control.Applicative ((<*>))
import Control.Monad (liftM, replicateM)
import Test.QuickCheck
newtype Board a = Board {getList :: [[a]]}
deriving (Eq, Show)
data... |
612a48ce3e83beeca2eb6cf7f5e9956e7b0e8e8b2cc5650d3b0380b710a9f094 | reborg/clojure-essential-reference | 5.clj | (do
< 1 >
(+ 1 1))
;; hello
2
(if (some even? [1 2 3])
(do
< 2 >
(apply + [1 2 3]))
(println "there was no even number."))
;; found some even number
6 | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/MutationandSideEffects/doseq%2Cdorun%2Crun!%2Cdoall%2Cdo/5.clj | clojure | hello
found some even number | (do
< 1 >
(+ 1 1))
2
(if (some even? [1 2 3])
(do
< 2 >
(apply + [1 2 3]))
(println "there was no even number."))
6 |
9e369f6330a86be9d4bbd66a8f99b48335f530c9f18603e7d6db83527cf1830c | Ericsson/ered | ered_parser.erl | -module(ered_parser).
%% RESP3 (REdis Serialization Protocol) parser.
-export([init/0,
next/1,
continue/2]).
-export_type([parse_return/0,
parse_result/0
]).
%%%===================================================================
%%% Definitions
%%%=======================... | null | https://raw.githubusercontent.com/Ericsson/ered/a2dd2730041dbfc9fd9571214435660aaf804aab/src/ered_parser.erl | erlang | RESP3 (REdis Serialization Protocol) parser.
===================================================================
Definitions
===================================================================
Data left
Next parsing action
===================================================================
API
====================... | -module(ered_parser).
-export([init/0,
next/1,
continue/2]).
-export_type([parse_return/0,
parse_result/0
]).
Bytes required to complete action , 0 is unspecified
}).
-type bytes_needed() :: non_neg_integer().
-type parse_function() :: fun((bin... |
6f33349d8e774fd7e5c1a014e64ad0c9419ca0a89169b49c8a769e7825984859 | metosin/reitit | server.clj | (ns example.server
(:require [reitit.ring :as ring]
[reitit.coercion.spec]
[reitit.swagger :as swagger]
[reitit.swagger-ui :as swagger-ui]
[reitit.ring.coercion :as coercion]
[reitit.dev.pretty :as pretty]
[reitit.ring.middleware.muuntaja :as muu... | null | https://raw.githubusercontent.com/metosin/reitit/a7f3cd15ab56003f030ef6c971bd56e8f6400659/examples/ring-spec-swagger/src/example/server.clj | clojure | Uncomment to use
[reitit.ring.spec :as spec]
[spec-tools.spell :as spell]
Use data-specs to provide extra JSON-Schema properties:
; pretty diffs
:validate spec/validate ;; enable spec validation for route data
; strict top - level validation
swagger feature
query-params & form-params
content-negotiation
encod... | (ns example.server
(:require [reitit.ring :as ring]
[reitit.coercion.spec]
[reitit.swagger :as swagger]
[reitit.swagger-ui :as swagger-ui]
[reitit.ring.coercion :as coercion]
[reitit.dev.pretty :as pretty]
[reitit.ring.middleware.muuntaja :as muu... |
bfd648f3ef02cc00c3a17bb38f8928ccffff6f3e3773ffef9f8e3203e641cbdb | melange-re/melange | jsx_parser.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/js_parser/jsx_parser.ml | ocaml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
6450050909e21a30d6e65067a93afbd18c7a31931103717a2cf94ae256b0ca0b | aiba/lein-count | tags.clj | (ns data.tags)
(def x #js {:a 1
:b 2
:c 3
:d 4})
#another-tag [1
2
3
4
5
(fn [x]
(+ x
1
:foo
:bar
[:baz]
... | null | https://raw.githubusercontent.com/aiba/lein-count/e4ab13e6044ae01141a31b34c7b842fc82950eba/test-data/tags.clj | clojure | (ns data.tags)
(def x #js {:a 1
:b 2
:c 3
:d 4})
#another-tag [1
2
3
4
5
(fn [x]
(+ x
1
:foo
:bar
[:baz]
... | |
1a8cae7544004c3b4dd078a44dd8d9525c0d5eb7781defaa8244a89bb60d1eb9 | learningclojurescript/code-examples | repl.clj | (require 'cljs.repl)
(require 'cljs.build.api)
(require 'cljs.repl.browser)
(cljs.build.api/build "src"
{:main 'cljs-first-project.core
:output-to "out/main.js"
:verbose true})
(cljs.repl/repl (cljs.repl.browser/repl-env)
:watch "src"
:output-dir "out")
| null | https://raw.githubusercontent.com/learningclojurescript/code-examples/fdbd0e35ae5a16d53f1f784a52c25bcd4e5a8097/chapter-1/cljs_first_project/repl.clj | clojure | (require 'cljs.repl)
(require 'cljs.build.api)
(require 'cljs.repl.browser)
(cljs.build.api/build "src"
{:main 'cljs-first-project.core
:output-to "out/main.js"
:verbose true})
(cljs.repl/repl (cljs.repl.browser/repl-env)
:watch "src"
:output-dir "out")
| |
54d4711c3cbe2ba2ae6b5761539ff2339481736e9c2953979def09eee649967f | roddyyaga/ocoi | test.ml | type t = { id: int; name: string; cool: bool; another_id: int }
[@@deriving yojson, ocoi]
| null | https://raw.githubusercontent.com/roddyyaga/ocoi/0a07e9457add9890cb507ac8bb4e55044d86a640/ocoi/test/ppx/test.ml | ocaml | type t = { id: int; name: string; cool: bool; another_id: int }
[@@deriving yojson, ocoi]
| |
5d5a3d5e573f17f9a694658b684e2842fbda07b36c91bf0c9e311d2d54077506 | franks42/clj-ns-browser | inspector.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/franks42/clj-ns-browser/c5fc570f9c8aeb6dd1cc9383fcf32bdaa9b936e3/src/clj_ns_browser/inspector.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
patch for ticket CLJ-783 has been applied to ( so the inspector
(ns ^{:doc "Graphical object inspector for Clojure data structures."
:author "Rich Hickey"}
clj-ns-browser.inspector
(:import
(java.awt BorderLayout)
(java.awt.event ActionEvent Act... |
e104ed49dfb02261d310cdbb028ffe077663761ebe11f78adf2d5ce4e2fbd3e5 | mpickering/ghcide-reflex | FindImports.hs | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
# LANGUAGE CPP #
#include "ghc-api-version.h"
module Development.IDE.Import.FindImports
( locateModule
, Import(..)
, ArtifactsLocation(..)
, isBootLocation
) where
import Development.IDE.GH... | null | https://raw.githubusercontent.com/mpickering/ghcide-reflex/67ddebf0c1d4728e850057b9bd7c6852c0d96350/src/Development/IDE/Import/FindImports.hs | haskell | standard imports
^ True if a module is a source input
| locate a module in either the file system or the package database. Where we go from *daml to
Haskell
"this" means that we should only look in the current package
if a package name is given we only go look for a package
database.
| Don't call this on a foun... | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
# LANGUAGE CPP #
#include "ghc-api-version.h"
module Development.IDE.Import.FindImports
( locateModule
, Import(..)
, ArtifactsLocation(..)
, isBootLocation
) where
import Development.IDE.GH... |
7549766bd45f04dde0c41f016c9050b1c835976736350238cdb5d815ef4efb66 | arclanguage/Clamp | fns-suite.lisp | (in-package :clamp-tests)
(use-syntax :clamp)
(defsuite fns (clamp))
(deftest rfn (fns)
(let f (rfn fib (n)
(if (<= 0 n 1)
n
(+ (fib (- n 1))
(fib (- n 2)))))
(assert-eql 55 (call f 10))
(assert-eql 34 (call f 9))))
(deftest afn (fns)
(let f (a... | null | https://raw.githubusercontent.com/arclanguage/Clamp/9f165b057a109564cd0e836cf611d1e81e43cb12/tests/fns-suite.lisp | lisp | (in-package :clamp-tests)
(use-syntax :clamp)
(defsuite fns (clamp))
(deftest rfn (fns)
(let f (rfn fib (n)
(if (<= 0 n 1)
n
(+ (fib (- n 1))
(fib (- n 2)))))
(assert-eql 55 (call f 10))
(assert-eql 34 (call f 9))))
(deftest afn (fns)
(let f (a... | |
91bedf45c2ae8bd9160058a8083e700e59519501e89d2e335e20a58dbaa257bd | emina/rosette | kernel.rkt | #lang s-exp "../../../lang/main.rkt"
(kernel void (fwtKernel [float* tArray] [int step])
(: int tid group pair match)
(: float t1 t2)
(= tid (get_global_id 0))
(= group (% tid step))
(= pair (+ (* (<< step 1) (/ tid step)) group))
(= match (+ pair step))
(= t1 [tArray pair])
(= t2 [tArray match])
(... | null | https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/sdsl/synthcl/examples/fastWalshTransform/verify/kernel.rkt | racket | #lang s-exp "../../../lang/main.rkt"
(kernel void (fwtKernel [float* tArray] [int step])
(: int tid group pair match)
(: float t1 t2)
(= tid (get_global_id 0))
(= group (% tid step))
(= pair (+ (* (<< step 1) (/ tid step)) group))
(= match (+ pair step))
(= t1 [tArray pair])
(= t2 [tArray match])
(... | |
224dd12b0e06c899f70b6f28bb5a34da2ea588ed611777cf1d5a6ba1c3b81a9b | input-output-hk/cardano-ledger-byron | Validation.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Cardano.Chain.Epoch.Validation
( EpochError(..)
, validateEpochFile
, validateEpochFiles
)
where
import Cardano.Prelude hiding (trace)
import Control.Monad.Trans... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger-byron/d309449e6c303a9f0dcc8dcf172df6f0b3195ed5/cardano-ledger/src/Cardano/Chain/Epoch/Validation.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
| Check that a single epoch's `Block`s are valid by folding over them
tracing is orthogonal to throwing errors; it does not change the program flow.
| Check that a list of epochs 'Block's are valid.
| Fold chain validation over a 'Stream' of 'Block's | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Cardano.Chain.Epoch.Validation
( EpochError(..)
, validateEpochFile
, validateEpochFiles
)
where
import Cardano.Prelude hiding (trace)
import Control.Monad.Trans.Resource (ResIO, runResourceT)
import Control.Tracer
import Streaming (Of... |
b2c42ddc2eae167e5f983c6a8d4fc5e62fd2b3532a4319e595b1943edf263d64 | runeanielsen/typesense-clj | try_plus.clj | (ns clj-kondo.slingshot.try-plus
(:require [clj-kondo.hooks-api :as api]))
(defn expand-catch [catch-node]
(let [[catch catchee & exprs] (:children catch-node)
catchee-sexpr (api/sexpr catchee)]
(cond (vector? catchee-sexpr)
(let [[selector & exprs] exprs]
(api/list-node
... | null | https://raw.githubusercontent.com/runeanielsen/typesense-clj/5c12e48fc763ae41ed1baea218fd5898f7a3f8a9/.clj-kondo/configs/slingshot/clj_kondo/slingshot/try_plus.clj | clojure | use throw-context to avoid warning
(prn (api/sexpr new-node)) | (ns clj-kondo.slingshot.try-plus
(:require [clj-kondo.hooks-api :as api]))
(defn expand-catch [catch-node]
(let [[catch catchee & exprs] (:children catch-node)
catchee-sexpr (api/sexpr catchee)]
(cond (vector? catchee-sexpr)
(let [[selector & exprs] exprs]
(api/list-node
... |
1faec6de6facf10620a9df699971e69f2c00cfe66efdd6713f33bbcf94094308 | uncomplicate/bayadera | impl.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php) or later
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be boun... | null | https://raw.githubusercontent.com/uncomplicate/bayadera/4105fd0e02bbe1cb19b9413f454075d61def6945/src/clojure/uncomplicate/bayadera/internal/impl.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php) or later
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not rem... | Copyright ( c ) . All rights reserved .
(ns ^{:author "Dragan Djuric"}
uncomplicate.bayadera.internal.impl
(:require [uncomplicate.commons
[core :refer [Releaseable release let-release info]]
[utils :refer [dragan-says-ex generate-seed]]]
[uncomplicate.fluokitten.core ... |
ffd495b584714ebac30d4d27d066915cfef994573ce464189fb074166d4b5f23 | grin-compiler/ghc-wpc-sample-programs | Functor.hs | -- | Utilities for functors.
module Agda.Utils.Functor
( (<.>)
, for
, Decoration(traverseF, distributeF)
, dmap
, dget
-- From Data.Functor:
, (<$>)
, ($>)
Defined identically as in Data . Functor .
-- Should be simply re-exported (vs redefined) once
MIN_VERSION_base > = 4.11.0.0
At time of th... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/Agda-2.6.1/src/full/Agda/Utils/Functor.hs | haskell | | Utilities for functors.
From Data.Functor:
Should be simply re-exported (vs redefined) once
| Composition: pure function after functorial (monadic) function.
'Data.Traversable.for' is a misnomer, it should be @forA@.
# INLINE for #
| Infix version of 'for'.
# INLINE (<&>) #
| A decoration is a functor that i... |
module Agda.Utils.Functor
( (<.>)
, for
, Decoration(traverseF, distributeF)
, dmap
, dget
, (<$>)
, ($>)
Defined identically as in Data . Functor .
MIN_VERSION_base > = 4.11.0.0
At time of this writing , we support 4.9.0.0 .
, (<&>)
)
where
import Control.Applicative ( Const(Const), getCons... |
63d4a8dcd1604ce9f7f9a364d5f1b798b73d9eb63f1281e464e1a72eaaeab8cd | input-output-hk/ouroboros-network | Synchronisation.hs | {-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DerivingVia #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE Standalo... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/0ffc4f11e862aa6a82ffa04dedf7fc7f464f3533/monoidal-synchronisation/src/Data/Monoid/Synchronisation.hs | haskell | # LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DerivingVia #
# LANGUAGE DeriveTraversable #
| First-to-finish synchronisation. Like 'Alt' it is a monoid under '<|>'.
[near-semiring](-semiring) for which
| Re... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleContexts #
# LANGUAGE StandaloneDeriving #
module Data.Monoid.Synchronisation
( FirstToFinish (..)
, LastToFinish (..)
, firstToLast
, lastToFirst
, LastToFinishM (..)
, firstToLastM
, lastToFirstM
) where
import ... |
6f8829662d665447c7cc42248d7719e1c1288036b2e022f8f794094c29b00a46 | PLTools/OCanren | test008.ml | ocanren type state = S ;;
module _ = struct
ocanren type u = U of state
end
module Move = struct
ocanren type 'a move =
| Forward of 'a
| Backward of 'a
end
ocanren type hum_moves = GT.int Move.move
| null | https://raw.githubusercontent.com/PLTools/OCanren/e8f3b2e876baa916f30d60a5cecf0f1470a61c24/camlp5/test008.ml | ocaml | ocanren type state = S ;;
module _ = struct
ocanren type u = U of state
end
module Move = struct
ocanren type 'a move =
| Forward of 'a
| Backward of 'a
end
ocanren type hum_moves = GT.int Move.move
| |
e31e9a51a89a23eefa10a595524a9d41221e1557d844f9d5b5b9715e847deb6f | danr/hipspec | Flatten3.hs | {-# LANGUAGE DeriveDataTypeable #-}
module Flatten3 where
import Data.Typeable (Typeable)
import List
import HipSpec
import Prelude hiding ((++))
import Control.Monad
data Tree a = B (Tree a) (Tree a) | Leaf a
deriving (Typeable,Eq,Ord,Show)
instance Arbitrary a => Arbitrary (Tree a) where
arbitrary = sized arbT... | null | https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/examples/Flatten3.hs | haskell | # LANGUAGE DeriveDataTypeable # | module Flatten3 where
import Data.Typeable (Typeable)
import List
import HipSpec
import Prelude hiding ((++))
import Control.Monad
data Tree a = B (Tree a) (Tree a) | Leaf a
deriving (Typeable,Eq,Ord,Show)
instance Arbitrary a => Arbitrary (Tree a) where
arbitrary = sized arbTree
where
arbTree s = freq... |
536abfa03d167071394180d4ef09182095e72d5fa44105686fbec7d365a75690 | chenyukang/eopl | 05.scm | same as 04 , :( a bug of this book
| null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch3/05.scm | scheme | same as 04 , :( a bug of this book
| |
24d055bbc1c8d97e7387fa8e7cca50c5b9ddad27261413b1dcd3b758748f9a19 | stevenfontanella/microlens | Type.hs | # LANGUAGE CPP #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE Safe #-}
|
Module : Lens . Micro . Type
Copyright : ( C ) 2013 - 2016 , 2015 - 2016 Artyom Kazak , 2018 Monadfix
License : BSD - style ( see the file LICENSE )
This module provides just the types ( ' Lens ' , ' Traversal ' , et... | null | https://raw.githubusercontent.com/stevenfontanella/microlens/6592dc2ad0d72fb5bf3fe049f68c04e9831418b5/microlens/src/Lens/Micro/Type.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE Safe #
the actual signature is more permissive :
' Lens.Micro.Extras.view ' : : ' Getting ' a s a - > s - > a
the actual signature is more permissive:
'Lens.Micro.Extras.view' :: 'Getting' a s a -> s -> a
|
@Lens s t a b@ is the lowest common denominator of a setter and a gette... | # LANGUAGE CPP #
|
Module : Lens . Micro . Type
Copyright : ( C ) 2013 - 2016 , 2015 - 2016 Artyom Kazak , 2018 Monadfix
License : BSD - style ( see the file LICENSE )
This module provides just the types ( ' Lens ' , ' Traversal ' , etc ) . It 's needed to break the dependency cycle –... |
2a46be0d6b2a75a7217f96dc6cf56dd573aa03779a199781c47041a09454a5e1 | emina/rosette | main.rkt | #lang racket
(require "safe.rkt")
(provide
(all-from-out racket)
(all-from-out "safe.rkt")) | null | https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/rosette/main.rkt | racket | #lang racket
(require "safe.rkt")
(provide
(all-from-out racket)
(all-from-out "safe.rkt")) | |
bc05ea80be82373d1da50ee5921e8cc7d5e32916c62f51169e17f3715316bff2 | GaloisInc/lustre | Value.hs | {-# Language OverloadedStrings #-}
module Language.Lustre.Semantics.Value where
import Text.PrettyPrint as P
import Language.Lustre.Name
import Language.Lustre.AST
import Language.Lustre.Pretty
-- | The universe of basic values.
-- These are the values used for a specific time instance.
data Value = VInt !Integ... | null | https://raw.githubusercontent.com/GaloisInc/lustre/685a47d9ce5f95da18dbba817672c0fd27f219f8/Language/Lustre/Semantics/Value.hs | haskell | # Language OverloadedStrings #
| The universe of basic values.
These are the values used for a specific time instance.
^ Type, value
^ Type, fields
Type error
Malformed structs
| The evaluation monad.
| Crash evaluation. We'd like to avoid calls to this.
---------------------------------------------------------... | module Language.Lustre.Semantics.Value where
import Text.PrettyPrint as P
import Language.Lustre.Name
import Language.Lustre.AST
import Language.Lustre.Pretty
data Value = VInt !Integer
| VBool !Bool
| VReal !Rational
| VArray ![Value]
deriving Show... |
ea507b4701662f14c7219f8b701140875869e7b84e07cd4dc66ff340d81ca48e | solarbit/pool | btc_script.erl | Copyright 2014 - 2016 < >
See MIT LICENSE
-module(btc_script).
-include("bitcoin.hrl").
-include("bitcoin_script.hrl").
-compile(export_all).
encode(Script) when is_binary(Script) ->
Script;
encode(Script) ->
encode(Script, <<>>).
encode([Opcode|T], Acc) when is_atom(Opcode) ->
{Code, Opcode} = lists:ke... | null | https://raw.githubusercontent.com/solarbit/pool/5576f1b71a469dfa2fcb6b5766667402eacc3860/lib/bitcoin/src/btc_script.erl | erlang | Tests | Copyright 2014 - 2016 < >
See MIT LICENSE
-module(btc_script).
-include("bitcoin.hrl").
-include("bitcoin_script.hrl").
-compile(export_all).
encode(Script) when is_binary(Script) ->
Script;
encode(Script) ->
encode(Script, <<>>).
encode([Opcode|T], Acc) when is_atom(Opcode) ->
{Code, Opcode} = lists:ke... |
ab0d4155d650ea50474cbecfc8df2a87942d9c2f88cc28bb929dc009ee0e0465 | Ericson2314/lighthouse | Posix.hs | -----------------------------------------------------------------------------
-- |
Module : System .
Copyright : ( c ) The University of Glasgow 2002
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- Portability : non-portable (r... | null | https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/unix/System/Posix.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : provisional
Portability : non-portable (requires POSIX)
POSIX support
-------------------------------------------------------------------... | Module : System .
Copyright : ( c ) The University of Glasgow 2002
module System.Posix (
module System.Posix.Types,
module System.Posix.Signals,
module System.Posix.Directory,
module System.Posix.Files,
module System.Posix.Unistd,
module System.Posix.IO,
module System.Posix.Env,
modul... |
d8583219f11ab8164dcea72d8e6d4c55809a1c2f8e43df49ec870b86baaf4c4b | clojure-interop/google-cloud-clients | Translation.clj | (ns com.google.cloud.translate.Translation
"Information about a translation. Objects of this class contain the translated text and the source
language's code. The source language's code can be optionally specified by the user or
automatically detected by the Google Translation service."
(:refer-clojure :only [r... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.translate/src/com/google/cloud/translate/Translation.clj | clojure | (ns com.google.cloud.translate.Translation
"Information about a translation. Objects of this class contain the translated text and the source
language's code. The source language's code can be optionally specified by the user or
automatically detected by the Google Translation service."
(:refer-clojure :only [r... | |
903b31b8f471a90ba09fc7ac0f2a50ed75c3385ba26854f6f9a24b345345fd5f | cloudamqp/rabbitmq-vshovel | rabbit_vshovel_endpoint.erl | 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 WARRANTY OF ... | null | https://raw.githubusercontent.com/cloudamqp/rabbitmq-vshovel/c439a10efdc518eb930dcccdd0a7334f1ca859ce/src/rabbit_vshovel_endpoint.erl | erlang | 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 /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
---------------... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ Variable Shovel .
The Developer of this component is Erlang Solutions , Ltd.
Copyright ( c ) 2016 - 2017 84codes . All rights reserved .
-m... |
9a6c9e0aa3f76c2f2113e86062d85611aea3946c6f68b8be31e4d03b61f47194 | jrm-code-project/LISP-Machine | sm.lisp | -*- Mode : LISP ; Package : STEVE ; : CL ; -*-
;
C - X M
;
modified by an indignant user , 1/4/84
(defconstant send-mail-text-delimiter "--Text follows this line--")
(defconstant send-mail-header
(list "To: " send-mail-text-delimiter ""))
;;; Invoke with a numeric argument to continue or re-edit.
(... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/gjcx/steve/sm.lisp | lisp | Package : STEVE ; : CL ; -*-
Invoke with a numeric argument to continue or re-edit.
Clear the delimiter line | C - X M
modified by an indignant user , 1/4/84
(defconstant send-mail-text-delimiter "--Text follows this line--")
(defconstant send-mail-header
(list "To: " send-mail-text-delimiter ""))
(editor-bind-key '(#\control-x #\M) send-mail)
(defun send-mail (&optional (continue (argument?)))
(unless (si:t... |
102b96fed23c97766e1aaf7dc8c651d42d05d441a83b9e5a9056be45729aa187 | xh4/web-toolkit | sha256.lisp | ;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
sha256.lisp -- implementation of SHA-2/256 from NIST
(in-package :crypto)
(in-ironclad-readtable)
(define-digest-registers (sha224 :endian :big :digest-registers 7)
(a #xc1059ed8)
(b #x367cd507)
(c #x3070dd17)
(d #xf70e5939)
(e #xffc00b31)
(f #x68581511)
... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/ironclad-v0.47/src/digests/sha256.lisp | lisp | -*- mode: lisp; indent-tabs-mode: nil -*-
mid-level
No slots.
copy the data to BLOCK prematurely
fill in the remaining block data | sha256.lisp -- implementation of SHA-2/256 from NIST
(in-package :crypto)
(in-ironclad-readtable)
(define-digest-registers (sha224 :endian :big :digest-registers 7)
(a #xc1059ed8)
(b #x367cd507)
(c #x3070dd17)
(d #xf70e5939)
(e #xffc00b31)
(f #x68581511)
(g #x64f98fa7)
(h #xbefa4fa4))
(defconst +pr... |
670b496a554b6d2b1bfa823ddfe5a9102b9b2f747ca252a27a4a7eaff1301eca | vyorkin/tiger | ex1_1a.ml | open Base
type key = string
type tree =
| Leaf
| Tree of tree * key * tree
let empty = Leaf
let rec insert t k =
let open Base.Poly in
match t with
| Leaf -> Tree (Leaf, k, Leaf)
| Tree (l, k', r) ->
if k < k'
then Tree (insert l k, k', r)
else if k > k'
then Tree (l, k', insert r k)
... | null | https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter1/ex1_1a.ml | ocaml | a | open Base
type key = string
type tree =
| Leaf
| Tree of tree * key * tree
let empty = Leaf
let rec insert t k =
let open Base.Poly in
match t with
| Leaf -> Tree (Leaf, k, Leaf)
| Tree (l, k', r) ->
if k < k'
then Tree (insert l k, k', r)
else if k > k'
then Tree (l, k', insert r k)
... |
db8c416a05373660081cc974024141fc87041dc14851ad54312c10e432079a0a | zotonic/mqtt_packet_map | mqtt_packet_map_SUITE.erl | -module(mqtt_packet_map_SUITE).
-compile([export_all, nowarn_export_all]).
-include_lib("common_test/include/ct.hrl").
%%--------------------------------------------------------------------
%% COMMON TEST CALLBACK FUNCTIONS
%%--------------------------------------------------------------------
init_per_suite(Config)... | null | https://raw.githubusercontent.com/zotonic/mqtt_packet_map/15732f5443a6392d9c81867fd1f7488baa25fbee/test/mqtt_packet_map_SUITE.erl | erlang | --------------------------------------------------------------------
COMMON TEST CALLBACK FUNCTIONS
--------------------------------------------------------------------
--------------------------------------------------------------------
TEST CASES
--------------------------------------------------------------------
... | -module(mqtt_packet_map_SUITE).
-compile([export_all, nowarn_export_all]).
-include_lib("common_test/include/ct.hrl").
init_per_suite(Config) ->
Config.
end_per_suite(_Config) ->
ok.
init_per_testcase(_TestCase, Config) ->
Config.
end_per_testcase(_TestCase, _Config) ->
ok.
all() ->
[
... |
4d84878d259b50edc1c070fc5b22e6b19ca954b148eab33a0fec2bed90559185 | tonyg/racket-reloadable-example | site.rkt | #lang racket/base
(provide request-handler)
(require racket/match)
(require racket/date)
(require web-server/servlet)
(require reloadable)
(require "config.rkt")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Persistent state:
(define counter (make-persistent-state 'counter (lambda ... | null | https://raw.githubusercontent.com/tonyg/racket-reloadable-example/6a341a7c8b3268a1be2933dfc7b7be3706c91fd0/src/site.rkt | racket |
Persistent state:
Transient state:
| #lang racket/base
(provide request-handler)
(require racket/match)
(require racket/date)
(require web-server/servlet)
(require reloadable)
(require "config.rkt")
(define counter (make-persistent-state 'counter (lambda () 0)))
(define reload-date (current-date))
(define-values (request-handler named-url)
(dis... |
332584dec6467ed1c804da17ae12d147a7ba42bf19b6262871fb5ef401e8d308 | blockfrost/blockfrost-haskell | Pools.hs | -- | Pool queries
module Blockfrost.Client.Cardano.Pools
( listPools
, listPools'
, listRetiredPools
, listRetiredPools'
, listRetiringPools
, listRetiringPools'
, getPool
, getPoolHistory
, getPoolHistory'
, getPoolMetadata
, getPoolRelays
, getPoolDelegators
, getPoolDelegators'
, getPool... | null | https://raw.githubusercontent.com/blockfrost/blockfrost-haskell/5ced57686d95e7b14569e96f4244b701f1e321e4/blockfrost-client/src/Blockfrost/Client/Cardano/Pools.hs | haskell | | Pool queries
| List registered stake pools.
| List registered stake pools.
Queries 100 entries. To query all entries use 'Blockfrost.Client.Core.allPages'
with principled variant of this function (suffixed with @'@)
| List retired stake pools.
| List retired stake pools.
Queries 100 entries. To query all en... |
module Blockfrost.Client.Cardano.Pools
( listPools
, listPools'
, listRetiredPools
, listRetiredPools'
, listRetiringPools
, listRetiringPools'
, getPool
, getPoolHistory
, getPoolHistory'
, getPoolMetadata
, getPoolRelays
, getPoolDelegators
, getPoolDelegators'
, getPoolBlocks
, getPool... |
f61e8407ba6d31755ba0b0298bc5fd01a35bfd12be0602251c0fe32226813cb2 | GaloisInc/cryptol | AesonCompat.hs | # LANGUAGE CPP #
-- | A compatibility shim for papering over the differences between
and pre-2.0 . * versions of @aeson@.
--
-- TODO: When the ecosystem widely uses @aeson-2.0.0.0@ or later, remove this
-- module entirely.
module CryptolServer.AesonCompat where
import Data.HashMap.Strict (HashMap)
import Data.Text... | null | https://raw.githubusercontent.com/GaloisInc/cryptol/8cca24568ad499f06032c2e4eaa7dfd4c542efb6/cryptol-remote-api/src/CryptolServer/AesonCompat.hs | haskell | | A compatibility shim for papering over the differences between
TODO: When the ecosystem widely uses @aeson-2.0.0.0@ or later, remove this
module entirely. | # LANGUAGE CPP #
and pre-2.0 . * versions of @aeson@.
module CryptolServer.AesonCompat where
import Data.HashMap.Strict (HashMap)
import Data.Text (Text)
#if MIN_VERSION_aeson(2,0,0)
import Data.Aeson.Key (Key)
import qualified Data.Aeson.Key as K
import Data.Aeson.KeyMap (KeyMap)
import qualified Data.Aeson.KeyM... |
88a44bdbb1a8306e6ccef3eb9db752e8848a14390b6bb5b1e49a1c758999bbcf | c-cube/maki | maki_yojson.ml |
(* This file is free software. See file "license" for more details. *)
* { 1 Simple wrapper for Yojson }
type 'a or_error = 'a Maki.or_error
(** Yojson.Safe *)
type json = Yojson.Safe.json
let (>>=) r f = match r with
| Result.Ok x -> f x
| Result.Error e -> Result.Error e
let decode_json s =
try Result.Ok ... | null | https://raw.githubusercontent.com/c-cube/maki/7067602c3b1206a92abfd221bc8950f30bb75b73/src/json/maki_yojson.ml | ocaml | This file is free software. See file "license" for more details.
* Yojson.Safe |
* { 1 Simple wrapper for Yojson }
type 'a or_error = 'a Maki.or_error
type json = Yojson.Safe.json
let (>>=) r f = match r with
| Result.Ok x -> f x
| Result.Error e -> Result.Error e
let decode_json s =
try Result.Ok (Yojson.Safe.from_string s)
with e ->
Maki.errorf "expected json, got `%s`: %s" s (P... |
113e519daed43eeced011f889a6e2b633971d41b968275c63ca8c0323fc2d7bd | hamler-lang/hamler | Eq.erl | %%---------------------------------------------------------------------------
%% |
%% Module : Eq
Copyright : ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd.
%% License : BSD-style (see the LICENSE file)
%%
Maintainer : ,
,
%% Stability : experimental
%% Portability : po... | null | https://raw.githubusercontent.com/hamler-lang/hamler/3ba89dde3067076e112c60351b019eeed6c97dd7/lib/Data/Eq.erl | erlang | ---------------------------------------------------------------------------
|
Module : Eq
License : BSD-style (see the LICENSE file)
Stability : experimental
Portability : portable
The Eq FFI module.
--------------------------------------------------------------------------- | Copyright : ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd.
Maintainer : ,
,
-module('Eq').
-export([ eqAtomImpl/2
, eqBoolImpl/2
, eqBinImpl/2
, eqCharImpl/2
, eqIntImpl/2
, eqFloatImpl/2
, eqStringImpl/2
, eqListImpl/2
... |
69e051f07ea08cf8f93d0af01ecd5d4edefec770d185079cb9a64451d445cb17 | techascent/tech.ml.dataset | build.clj | (ns build
(:require [clojure.tools.build.api :as b]
[clojure.edn :as edn])
(:refer-clojure :exclude [compile]))
(def deps-data (edn/read-string (slurp "deps.edn")))
(def codox-data (get-in deps-data [:aliases :codox :exec-args]))
(def lib (symbol (codox-data :group-id) (codox-data :artifact-id)))
(def ... | null | https://raw.githubusercontent.com/techascent/tech.ml.dataset/63c302251b9624def3b978955cac032a370da5c7/build.clj | clojure | Assumes scripts/compile has already been run | (ns build
(:require [clojure.tools.build.api :as b]
[clojure.edn :as edn])
(:refer-clojure :exclude [compile]))
(def deps-data (edn/read-string (slurp "deps.edn")))
(def codox-data (get-in deps-data [:aliases :codox :exec-args]))
(def lib (symbol (codox-data :group-id) (codox-data :artifact-id)))
(def ... |
005a8dbdd5a210320beb8f7384c62df1188d1f8e8b2172ee09b402ad9df79cad | rpav/CheckL | test.lisp | (in-package :checkl-tests)
(5am:def-suite :default)
(defvar *x* 1)
(checkl:check-formal (:name :two)
(values
(+ 1 1)
(+ *x* 1)))
| null | https://raw.githubusercontent.com/rpav/CheckL/80328800d047fef9b6e32dfe6bdc98396aee3cc9/t/test.lisp | lisp | (in-package :checkl-tests)
(5am:def-suite :default)
(defvar *x* 1)
(checkl:check-formal (:name :two)
(values
(+ 1 1)
(+ *x* 1)))
| |
d1e326539a999c9cdd21e3214db58346cfb0a3977e569fa5d31290aaba7247b3 | FranklinChen/hugs98-plus-Sep2006 | HuttonMeijer.hs | -----------------------------------------------------------------------------
-- |
-- Module : Text.ParserCombinators.HuttonMeijer
Copyright : ( University of Nottingham ) , ( University of Utrecht )
Licence : BSD
--
Maintainer : < >
-- Stability : Stable
-- Portability : All
--
... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/HaXml/src/Text/ParserCombinators/HuttonMeijer.hs | haskell | ---------------------------------------------------------------------------
|
Module : Text.ParserCombinators.HuttonMeijer
Stability : Stable
Portability : All
Some changes to the library have been made in the move from Gofer
* Do notation is used in place of monad comprehension notation;
... | Copyright : ( University of Nottingham ) , ( University of Utrecht )
Licence : BSD
Maintainer : < >
A LIBRARY OF MONADIC PARSER COMBINATORS
29th July 1996
University of Nottingham Univ... |
69b5964efc39771d0427609fb3a3d94c17348495e4838d33c9235c8917171b85 | jacekschae/learn-reitit-course-files | db.clj | (ns cheffy.conversation.db
(:require [next.jdbc.sql :as sql]
[next.jdbc :as jdbc]))
(defmulti dispatch (fn [[name _db _data]] name))
(defmethod dispatch :find-conversation-by-uid
[[_ db {:keys [uid]}]]
(with-open [conn (jdbc/get-connection db)]
(let [conn-opts (jdbc/with-options conn (:options d... | null | https://raw.githubusercontent.com/jacekschae/learn-reitit-course-files/c13a8eb622a371ad719d3d9023f1b4eff9392e4c/increments/53-create-message/src/cheffy/conversation/db.clj | clojure | (ns cheffy.conversation.db
(:require [next.jdbc.sql :as sql]
[next.jdbc :as jdbc]))
(defmulti dispatch (fn [[name _db _data]] name))
(defmethod dispatch :find-conversation-by-uid
[[_ db {:keys [uid]}]]
(with-open [conn (jdbc/get-connection db)]
(let [conn-opts (jdbc/with-options conn (:options d... | |
479d3bc7230e07d628f0367e89a3e2f774ae4fd968c643226e1a37e340e6257d | takikawa/racket-ppa | info.rkt | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote ("base" "rackunit-lib" "rackunit-gui" "gui-lib" "drracket-plugin-lib"))) (define pkg-desc "RackUnit testing framework DrRacket plugin") (define pkg-authors (quote (ryanc noel))) (define license (quote (Apache-2.0 OR MIT))))... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/rackunit-plugin-lib/info.rkt | racket | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote ("base" "rackunit-lib" "rackunit-gui" "gui-lib" "drracket-plugin-lib"))) (define pkg-desc "RackUnit testing framework DrRacket plugin") (define pkg-authors (quote (ryanc noel))) (define license (quote (Apache-2.0 OR MIT))))... | |
abf0fcb283d3bde0f7fc1f766b441c2eeb108d9822f4a65a8f8fec95d9b810a9 | gedge-platform/gedge-platform | rabbit_trust_store_http_provider.erl | 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 ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_trust_store_http_provider).
-incl... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_trust_store/src/rabbit_trust_store_http_provider.erl | erlang | 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 ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_trust_store_http_provider).
-include_li... | |
7e8581a2fe592f0fef777cdf501245594cb6654f1b388c708e3a31fc5e71c268 | LeventErkok/sbv | Concurrency.hs | -----------------------------------------------------------------------------
-- |
-- Module : BenchSuite.Queries.Concurrency
Copyright : ( c )
-- License : BSD3
-- Maintainer:
-- Stability : experimental
--
Bench suite for Documentation . SBV.Examples . Queries . Concurrency
-----------... | null | https://raw.githubusercontent.com/LeventErkok/sbv/cfaa40b8c8ff8e1b7ff9ab71304654f6f531ba72/SBVBenchSuite/BenchSuite/Queries/Concurrency.hs | haskell | ---------------------------------------------------------------------------
|
Module : BenchSuite.Queries.Concurrency
License : BSD3
Maintainer:
Stability : experimental
---------------------------------------------------------------------------
# OPTIONS_GHC -Wall -Werror #
these benchmarks won't run in m... | Copyright : ( c )
Bench suite for Documentation . SBV.Examples . Queries . Concurrency
module BenchSuite.Queries.Concurrency(benchmarks) where
import Documentation.SBV.Examples.Queries.Concurrency
import BenchSuite.Bench.Bench
benchmarks :: Runner
benchmarks = rGroup [ runIO "Concurrency.... |
672de854b896669e1d33bae6cc3ff18525602f4fd3ea3893dc4171df1ebe5646 | phadej/saison | TestAeson.hs | module Main (main) where
import qualified Data.Aeson as Aeson
import Saison.JSONTestSuite (jsonTestSuite)
main :: IO ()
main = jsonTestSuite Aeson.eitherDecodeStrict
| null | https://raw.githubusercontent.com/phadej/saison/991d1244b97dadb35adabdf217eb3d5fe2d310fc/saison-jsontestsuite/test/TestAeson.hs | haskell | module Main (main) where
import qualified Data.Aeson as Aeson
import Saison.JSONTestSuite (jsonTestSuite)
main :: IO ()
main = jsonTestSuite Aeson.eitherDecodeStrict
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.