_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 |
|---|---|---|---|---|---|---|---|---|
a5afb89fe55825e003e0ccdf0947a890436abf0726e50e1b4a89d1ff9b1ff02f | TristanCacqueray/haskell-butler | Terminal.hs | module Butler.App.Terminal (termApp) where
import System.Posix.Pty qualified as Pty
import Butler
import Butler.Frame
import XStatic.Xterm qualified as XStatic
import System.Process (cleanupProcess)
import System.Process.Typed qualified
data XtermServer = XtermServer
{ inputChan :: TChan ByteString
, dimens... | null | https://raw.githubusercontent.com/TristanCacqueray/haskell-butler/d3bf40d665264d31a76e2f3ff842658aa41ee720/src/Butler/App/Terminal.hs | haskell | /~watson/scen103/ascii.html
control handler
shell writer thread
shell reader thread | module Butler.App.Terminal (termApp) where
import System.Posix.Pty qualified as Pty
import Butler
import Butler.Frame
import XStatic.Xterm qualified as XStatic
import System.Process (cleanupProcess)
import System.Process.Typed qualified
data XtermServer = XtermServer
{ inputChan :: TChan ByteString
, dimens... |
8d525ce3c1a3d53e1b57cee37a0154369ee142a27c2111d09424f051663351bb | janestreet/typerep | typename.ml | (* this lib should not depend on core *)
module List = struct
include List
let compare cmp a b =
let rec loop a b =
match a, b with
| [], [] -> 0
| [], _ -> -1
| _, [] -> 1
| x :: xs, y :: ys ->
let n = cmp x y in
if n = 0 then loop xs ys else n
in
loop a b... | null | https://raw.githubusercontent.com/janestreet/typerep/75e0b028096e1e7589d1b111d96be4d1d087c057/lib/typename.ml | ocaml | this lib should not depend on core
The argument for Obj.magic here is the same as the one in core/type_equal | module List = struct
include List
let compare cmp a b =
let rec loop a b =
match a, b with
| [], [] -> 0
| [], _ -> -1
| _, [] -> 1
| x :: xs, y :: ys ->
let n = cmp x y in
if n = 0 then loop xs ys else n
in
loop a b
;;
end
module Uid : sig
type t
v... |
a7125ce9c13221231c9f5e9c8836ce6dae776a6676b805a6941c96d4e957729b | ConsumerDataStandardsAustralia/validation-prototype | AdditionalValue.hs | # LANGUAGE FlexibleContexts , TypeFamilies #
module Web.ConsumerData.Au.Api.Types.Banking.ProductAccountComponents.AdditionalValue
( module Web.ConsumerData.Au.Api.Types.Banking.ProductAccountComponents.AdditionalValue
) where
import Data.Text (pack)
import qualified Waargonaut.Decode as D
-- ... | null | https://raw.githubusercontent.com/ConsumerDataStandardsAustralia/validation-prototype/ff63338b77339ee49fa3e0be5bb9d7f74e50c28b/consumer-data-au-api-types/src/Web/ConsumerData/Au/Api/Types/Banking/ProductAccountComponents/AdditionalValue.hs | haskell | Helper decoder function from @additionalValue@ | # LANGUAGE FlexibleContexts , TypeFamilies #
module Web.ConsumerData.Au.Api.Types.Banking.ProductAccountComponents.AdditionalValue
( module Web.ConsumerData.Au.Api.Types.Banking.ProductAccountComponents.AdditionalValue
) where
import Data.Text (pack)
import qualified Waargonaut.Decode as D
add... |
20e77d5c6cb8ea15759a0876582d45b8503b3f6ef2e53e397fd38cd4bead858a | xsc/claro | observe.cljc | (ns claro.middleware.observe
"Generic middlewares to observe resolution results."
(:require [claro.engine.core :as engine]
[claro.runtime.impl :as impl]))
# # Observe Logic
(defn- observe!
[predicate observer-fn result]
(doseq [[resolvable resolved] result
:when (predicate resolvable)]... | null | https://raw.githubusercontent.com/xsc/claro/16db75b7a775a14f3b656362e8ee4f65dd8b0d49/src/claro/middleware/observe.cljc | clojure | ## Middlewares | (ns claro.middleware.observe
"Generic middlewares to observe resolution results."
(:require [claro.engine.core :as engine]
[claro.runtime.impl :as impl]))
# # Observe Logic
(defn- observe!
[predicate observer-fn result]
(doseq [[resolvable resolved] result
:when (predicate resolvable)]... |
61278c4e935ec12868183870dff29d9d3a5c0bb69c9304782aaaa48839490e6f | coq/coq | find_subterm.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/110921a449fcb830ec2a1cd07e3acc32319feae6/pretyping/find_subterm.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
8aada75c6e2c99fbc359ae5762ea89f8f37b0762033bda33b89f3ca975f551b3 | janegca/htdp2e | Exercise-399-food-create.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-399-food-create) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t con... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/05-GenerativeRecursion/Exercise-399-food-create.rkt | racket | about the language level of this file in a form that our tools can easily process.
produces a randomly chosen, guaranteed distinct Posn. The exercise defers
to this part of the book for an explanation of the design of the function.
single definition; use local.
Posn -> Posn
generates a random position for the p... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-399-food-create) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
Exercise 399 .
Exercise 198 defines... |
58405b43272566ef25272f9c0b22de21059a775e586ad005d658a4786ce64761 | kupl/FixML | sub57.ml |
type aexp =
| Const of int
| Var of string
| Power of string * int
| Times of aexp list
| Sum of aexp list
let rec diff : aexp * string -> aexp
= fun (exp, var) ->
match exp with
|Const a -> Const a
|Var x -> Var x
|Power (x, n) ->
if x=var then Times[Const n; Power(x, n-1)]
... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/differentiate/diff1/submissions/sub57.ml | ocaml |
type aexp =
| Const of int
| Var of string
| Power of string * int
| Times of aexp list
| Sum of aexp list
let rec diff : aexp * string -> aexp
= fun (exp, var) ->
match exp with
|Const a -> Const a
|Var x -> Var x
|Power (x, n) ->
if x=var then Times[Const n; Power(x, n-1)]
... | |
37b763c43203a910c7b3c0a71ca26fb6831e8bd00c46dfb668aa2e14b9f02ede | ndmitchell/shake | TypeMap.hs | # LANGUAGE ExistentialQuantification , ConstraintKinds , KindSignatures , GADTs , ScopedTypeVariables , Rank2Types #
module General.TypeMap(
Map, empty, singleton, insert, map, lookup, unionWith, toList, size
) where
import qualified Data.HashMap.Strict as Map
import Data.Typeable
import Unsafe.Coerce
import ... | null | https://raw.githubusercontent.com/ndmitchell/shake/99c5a7a4dc1d5a069b13ed5c1bc8e4bc7f13f4a6/src/General/TypeMap.hs | haskell | # LANGUAGE ExistentialQuantification , ConstraintKinds , KindSignatures , GADTs , ScopedTypeVariables , Rank2Types #
module General.TypeMap(
Map, empty, singleton, insert, map, lookup, unionWith, toList, size
) where
import qualified Data.HashMap.Strict as Map
import Data.Typeable
import Unsafe.Coerce
import ... | |
114075bef30043d0c78a8be4894cfe69902ab6fe84629cc5d6880a8c30560673 | keigoi/ocaml-mpst | contextF.ml | module type Type = sig
type 'a value
end
module type S = sig
type t
type 'a key
type 'a value
val make : unit -> t
val new_key : unit -> 'a key
val add_binding : t -> 'a key -> 'a value -> unit
val lookup : t -> 'a key -> 'a value option
val union_keys : 'a key -> 'a key -> 'a key
val union_keys_g... | null | https://raw.githubusercontent.com/keigoi/ocaml-mpst/aa6c5fa2b08c4596f41f70dee8601da6a9c80b8f/lib/contextF.ml | ocaml | module type Type = sig
type 'a value
end
module type S = sig
type t
type 'a key
type 'a value
val make : unit -> t
val new_key : unit -> 'a key
val add_binding : t -> 'a key -> 'a value -> unit
val lookup : t -> 'a key -> 'a value option
val union_keys : 'a key -> 'a key -> 'a key
val union_keys_g... | |
3f6cc7afce941be33dd79587491aa4b3afcc6229f446c678d26a6ee476d80e54 | egonSchiele/dominion | Base.hs | module Dominion.Cards.Base where
import Dominion.Types
copper = Card "Copper" 0 [Treasure] [CoinValue 1]
silver = Card "Silver" 3 [Treasure] [CoinValue 2]
gold = Card "Gold" 6 [Treasure] [CoinValue 3]
estate = Card "Estate" 2 [Victory] [VPValue 1]
duchy = Card "Duchy" 5 [Victory] [VPValue 3]
province = Ca... | null | https://raw.githubusercontent.com/egonSchiele/dominion/a4b7300f2e445da5e7cfcc1cf9029243a3561ed6/src/Dominion/Cards/Base.hs | haskell | module Dominion.Cards.Base where
import Dominion.Types
copper = Card "Copper" 0 [Treasure] [CoinValue 1]
silver = Card "Silver" 3 [Treasure] [CoinValue 2]
gold = Card "Gold" 6 [Treasure] [CoinValue 3]
estate = Card "Estate" 2 [Victory] [VPValue 1]
duchy = Card "Duchy" 5 [Victory] [VPValue 3]
province = Ca... | |
8611b3c5d0551e7044816b1db74eaf5f74ae57e66cdb187b4b1bb92dfcb4c316 | sharplispers/montezuma | tc-tables.lisp | (in-package #:montezuma)
(defun do-test-table (table)
(atest table-1 (length (table-values table)) 0)
(atest table-2 (length (table-keys table)) 0)
(atest table-3 (table-value table :foo 7) 7)
(setf (table-value table :foo) 8)
(atest table-4 (table-value table :foo 7) 8)
(atest table-5 (table-keys table) ... | null | https://raw.githubusercontent.com/sharplispers/montezuma/ee2129eece7065760de4ebbaeffaadcb27644738/tests/unit/util/tc-tables.lisp | lisp | hash tables
Association lists | (in-package #:montezuma)
(defun do-test-table (table)
(atest table-1 (length (table-values table)) 0)
(atest table-2 (length (table-keys table)) 0)
(atest table-3 (table-value table :foo 7) 7)
(setf (table-value table :foo) 8)
(atest table-4 (table-value table :foo 7) 8)
(atest table-5 (table-keys table) ... |
376c88af932dfbd8c861ae589f9aadbdc9a20b1275119f68f27b98c0e8f401da | mitsuji/mssql-simple | RpcResponseSet.hs | {-# OPTIONS_HADDOCK hide #-}
{-# LANGUAGE BangPatterns #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
# LANGUAGE CPP #
module Database.MSSQLServer.Query.RpcResponseSet ( RpcResponseSet (..)
, RpcResponse (..)
... | null | https://raw.githubusercontent.com/mitsuji/mssql-simple/3426b972a756b295b2a729571cb67b28bd9842d7/src/Database/MSSQLServer/Query/RpcResponseSet.hs | haskell | # OPTIONS_HADDOCK hide #
# LANGUAGE BangPatterns #
[MEMO] skip Order
[MEMO] necesarry ?
rpcResultSetParser = do
where
!d1 = fromRawBytes (rvTypeInfo r1) (rvRawBytes r1)
!d2 = fromRawBytes (rvTypeInfo r2) (rvRawBytes r2)
(RpcOutputSet a, RpcResultSet b) =>
[MEMO] necesarry ?
[MEMO] necesarry ?
... | # LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
# LANGUAGE CPP #
module Database.MSSQLServer.Query.RpcResponseSet ( RpcResponseSet (..)
, RpcResponse (..)
, RpcResultSet (..)
... |
f39d90d1b282d3a2e5f96dd13576c2ddcbe4eb07b95633690b7a6c8159cee89d | ocaml-flambda/ocaml-jst | test9_main.ml | TEST
include dynlink
readonly_files = " test9_plugin.ml test9_second_plugin.ml test9_second_plugin.mli "
libraries = " "
* shared - libraries
* * setup - ocamlc.byte - build - env
* * * ocamlc.byte
module = " test9_second_plugin.mli "
* * * ocamlc.byte
module = " test9_main.ml "
* * * ocamlc.b... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/5bf2820278c58f6715dcfaf6fa61e09a9b0d8db3/testsuite/tests/lib-dynlink-initializers/test9_main.ml | ocaml | Check that a shared library can depend on an interface-only module
that is implemented by another shared library that is loaded
later. | TEST
include dynlink
readonly_files = " test9_plugin.ml test9_second_plugin.ml test9_second_plugin.mli "
libraries = " "
* shared - libraries
* * setup - ocamlc.byte - build - env
* * * ocamlc.byte
module = " test9_second_plugin.mli "
* * * ocamlc.byte
module = " test9_main.ml "
* * * ocamlc.b... |
395b370b86b4449e7f63297581069dc117efd200f3b1b0ef603252921a02c34c | rems-project/lem | coq_backend_utils.ml | (**************************************************************************)
(* Lem *)
(* *)
, University of Cambridge
, INRIA Paris -... | null | https://raw.githubusercontent.com/rems-project/lem/a839114e468119d9ac0868d7dc53eae7f3cc3a6c/src/coq_backend_utils.ml | ocaml | ************************************************************************
Lem
... | , University of Cambridge
, INRIA Paris - Rocquencourt
, University of Cambridge
, University of Cambridge
, University of Cambridge ( while working on Lem )
... |
ccb4020177a589669b56bc57ef6f5d35afeb57d1c5bd9f4d6fda271cb621c63e | calyau/maxima | grobner.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
$ I d : grobner.lisp , v 1.6 2009 - 06 - 02 07:49:49 andrejv Exp $
... | null | https://raw.githubusercontent.com/calyau/maxima/9352a3f5c22b9b5d0b367fddeb0185c53d7f4d02/share/contrib/Grobner/grobner.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*-
This program is free software; you can redistribute it and/or modify
either version 2 of the License , or
(at your option) any later version.
... | $ I d : grobner.lisp , v 1.6 2009 - 06 - 02 07:49:49 andrejv Exp $
Copyright ( C ) 1999 , 2002 Marek Rychlik < >
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Sui... |
925503b31925cfc59eff9690f8d49fb7eed294b2c5ce3552295af54942dabdca | ninjudd/cake | release.clj | (ns cake.tasks.release
(:use cake cake.core cake.file
[bake.core :only [verbose? debug? log]]
[cake.tasks.jar :only [jarfile uberjarfile warfile]]
[clojure.java.io :only [reader copy]]
[useful.utils :only [verify]]
[cake.utils :only [prompt-read yes-or-no]])
(:import [com.jcr... | null | https://raw.githubusercontent.com/ninjudd/cake/3a1627120b74e425ab21aa4d1b263be09e945cfd/src/cake/tasks/release.clj | clojure | (ns cake.tasks.release
(:use cake cake.core cake.file
[bake.core :only [verbose? debug? log]]
[cake.tasks.jar :only [jarfile uberjarfile warfile]]
[clojure.java.io :only [reader copy]]
[useful.utils :only [verify]]
[cake.utils :only [prompt-read yes-or-no]])
(:import [com.jcr... | |
bcbb0eb30aa846e1edf0450ecafe773b878b80ca1d278422901fa3c7d203f2d7 | ocheron/cryptostore | RC2.hs | -- |
-- Module : Crypto.Store.Cipher.RC2
-- License : BSD-style
Maintainer : < >
-- Stability : stable
-- Portability : good
--
-- Implementation of RC2 block cipher, a legacy algorithm providing weak
-- security. Use only for compatibility with software requiring this cipher and
-- data which is not... | null | https://raw.githubusercontent.com/ocheron/cryptostore/22026908fc836521d68a47e8414538884ebe175b/src/Crypto/Store/Cipher/RC2.hs | haskell | |
Module : Crypto.Store.Cipher.RC2
License : BSD-style
Stability : stable
Portability : good
Implementation of RC2 block cipher, a legacy algorithm providing weak
security. Use only for compatibility with software requiring this cipher and
data which is not sensitive.
| Build a RC2 cipher with the... | Maintainer : < >
module Crypto.Store.Cipher.RC2
( RC2
, rc2WithEffectiveKeyLength
) where
import Data.ByteArray (ByteArrayAccess)
import qualified Data.ByteArray as B
import Data.Maybe (fromMaybe)
import Crypto.Error
import Crypto.Cipher.Types
import Crypto.Store.Cipher.RC2.... |
222acaa96bfd56535751242eef6b39391513d8cd29a253701f03df6c3183a376 | Kraks/MyPLZoo | stlc+sum+prod.rkt | #lang racket
Simply Typed Lamdba Calculus with Sum Types and Product Types
< >
(require rackunit)
(require "share.rkt")
;; Expressions
(struct NumE (n) #:transparent)
(struct BoolE (b) #:transparent)
(struct IdE (id) #:transparent)
(struct PlusE (l r) #:transparent)
(struct MultE (l r) #:transparent)
(struct... | null | https://raw.githubusercontent.com/Kraks/MyPLZoo/60203b7be9dafde04065eadf5a17200fc360cf26/stlc%2Bsum%2Bprod.rkt | racket | Expressions
Product
Sum
Types
Values
Environment & Type Environment
Type Checker
Interpreter
Tests | #lang racket
Simply Typed Lamdba Calculus with Sum Types and Product Types
< >
(require rackunit)
(require "share.rkt")
(struct NumE (n) #:transparent)
(struct BoolE (b) #:transparent)
(struct IdE (id) #:transparent)
(struct PlusE (l r) #:transparent)
(struct MultE (l r) #:transparent)
(struct AppE (fun arg)... |
3a85e465d0b1f4d67cdc7a6780ef20c6e044921aac0d264251b79217054f5967 | Liqwid-Labs/agora | Credential.hs | {- |
Module : Agora.Stake.Scripts
Maintainer :
Description: Functions for dealing with generalized credentials.
Functions for dealing with generalized credentials.
-}
module Agora.Credential (
pauthorizedBy,
authorizationContext,
) where
import GHC.Records (HasField)
import Plutarch.Api.V1 (PCredential (PPub... | null | https://raw.githubusercontent.com/Liqwid-Labs/agora/d0420782e29842566a62e1bba2d08989b47ef90c/agora/Agora/Credential.hs | haskell | |
Module : Agora.Stake.Scripts
Maintainer :
Description: Functions for dealing with generalized credentials.
Functions for dealing with generalized credentials.
| @since 1.0.0
| @since 1.0.0
| @since 1.0.0
| @since 1.0.0
| Build up 'PAuthorizationContext' from fields.
@since 1.0.0
| Check for autho... | module Agora.Credential (
pauthorizedBy,
authorizationContext,
) where
import GHC.Records (HasField)
import Plutarch.Api.V1 (PCredential (PPubKeyCredential, PScriptCredential), PPubKeyHash)
import Plutarch.Api.V2 (PTxInInfo)
import Plutarch.Extra.ScriptContext (ptxSignedBy)
import "liqwid-plutarch-extra" Plutarch.... |
61192d43a56365f98b6b8b1942acb6c85e0d7e15620ead3e9ba4dbd88fefefb4 | hidaris/thinking-dumps | ast.rkt | #lang typed/racket
(provide (all-defined-out))
Expression
(define-type Expression
(U Const Op IsZero If Var Let Minus Proc App LetProc))
(struct Const
([n : Real])
#:transparent)
(struct Op
([op : Symbol]
[n1 : Expression]
[n2 : Expression])
#:transparent)
(struct IsZero
([n : Expression])
#:... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/eopl-solutions/chap3/3-23/ast.rkt | racket | Value | #lang typed/racket
(provide (all-defined-out))
Expression
(define-type Expression
(U Const Op IsZero If Var Let Minus Proc App LetProc))
(struct Const
([n : Real])
#:transparent)
(struct Op
([op : Symbol]
[n1 : Expression]
[n2 : Expression])
#:transparent)
(struct IsZero
([n : Expression])
#:... |
f2870d926fc5cf4bd00519c4a84040e579fba2bc5eb4e4814a38027564f06d57 | brendanhay/gogol | List.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/77394c4e0f5bd729e6fe27119701c45f9d5e1e9a/lib/services/gogol-monitoring/gen/Gogol/Monitoring/Projects/Groups/Members/List.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Lists the monitored resources that are members of a group.
/See:/ </ Cloud Monitoring API Reference> for @monitoring.projects.groups.members.list@.
* Resource
** Constructing a Request
| A resource alias for @monitoring.proje... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
ba047ab6287a8feb5c79caf966036d4a9588e9518c3ad952208cea2c6885c34d | dongcarl/guix | mono.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2016 Jan Nieuwenhuizen < >
Copyright © 2020 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU 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... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/mono.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2016 Jan Nieuwenhuizen < >
Copyright © 2020 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages mono)
#:use-module ((guix licenses) #:pre... |
9bb18bb7c52ca73ac0daf25efc249df92951be44dd3d976564b56f752c096f43 | lambdabot/IOSpec | Fork.hs | # LANGUAGE ExistentialQuantification , FlexibleContexts , TypeOperators #
-- | A pure specification of 'forkIO'.
module Test.IOSpec.Fork
(
ForkS
, forkIO
)
where
import Test.IOSpec.VirtualMachine
import Test.IOSpec.Types
-- The 'ForkS' data type and its instances.
--
| An expression of type @IOSpec... | null | https://raw.githubusercontent.com/lambdabot/IOSpec/76235f77942ab7672f70fca4b9e133ef667606a4/src/Test/IOSpec/Fork.hs | haskell | | A pure specification of 'forkIO'.
The 'ForkS' data type and its instances.
computation that uses 'forkIO' and returns a value of
type 'a'.
By itself, 'ForkS' is not terribly useful. You will probably want
| The 'forkIO' function forks off a new thread. | # LANGUAGE ExistentialQuantification , FlexibleContexts , TypeOperators #
module Test.IOSpec.Fork
(
ForkS
, forkIO
)
where
import Test.IOSpec.VirtualMachine
import Test.IOSpec.Types
| An expression of type @IOSpec ForkS a@ corresponds to an ' IO '
to use @IOSpec ( ForkS : + : MVarS)@ or @IOSpec (... |
aff3508fe0e2f526b36c02635a7562b97089cb042ee2d1099d78aa3621fd4c1d | reuk/rayverb | Microphone.hs | module Microphone where
import Numerical
import Vec3
import Positionable
import Ray
import System.Random
data Microphone = Mic Vec
instance Positionable Microphone where
position (Mic x) = x
constructRaysFromMic :: Microphone -> IO [Ray]
constructRaysFromMic (Mic pos) = do
gen1 <- newStdGen
gen2 <- new... | null | https://raw.githubusercontent.com/reuk/rayverb/e9aa02a422446728625d5c4f88ac6b11ce393005/src/Microphone.hs | haskell | module Microphone where
import Numerical
import Vec3
import Positionable
import Ray
import System.Random
data Microphone = Mic Vec
instance Positionable Microphone where
position (Mic x) = x
constructRaysFromMic :: Microphone -> IO [Ray]
constructRaysFromMic (Mic pos) = do
gen1 <- newStdGen
gen2 <- new... | |
0713e96639c896af0b76af8744c0d1dc991809690cb152302748ec65b1ae692b | fpco/stackage-server | Cron.hs | # LANGUAGE CPP #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
module Stackage.Database.Cron
( stackageServerCron
, newHoogleLocker
, singleRun
, StackageCronOptions(..)
, ha... | null | https://raw.githubusercontent.com/fpco/stackage-server/b707b5a0d72c44a3134a305b628c3f0b28db2697/src/Stackage/Database/Cron.hs | haskell | Hacky approach instead of PID files
| This will look at 'global-hints.yaml' and will create core package getters that are reused
later for adding those package to individual snapshot.
| Core package info rarely changes between the snapshots, therefore it would be wasteful to
a memoized version that will do it once... | # LANGUAGE CPP #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
module Stackage.Database.Cron
( stackageServerCron
, newHoogleLocker
, singleRun
, StackageCronOptions(..)
, ha... |
66861312ede8e2b205631785eb5deabd208d202f4b19423a0ff22142a37b5b67 | mhuebert/chia | bidi.cljc | (ns chia.routing.bidi
(:require [bidi.bidi :as bidi]))
(defn- flat-map-seq
[map-args]
(into []
(comp (remove (comp nil? second))
(mapcat identity))
map-args))
(defn path-for [routes handler params]
(apply bidi/path-for routes handler (flat-map-seq params))) | null | https://raw.githubusercontent.com/mhuebert/chia/74ee3ee9f86efbdf81d8829ab4f0a44d619c73d3/routing/src/chia/routing/bidi.cljc | clojure | (ns chia.routing.bidi
(:require [bidi.bidi :as bidi]))
(defn- flat-map-seq
[map-args]
(into []
(comp (remove (comp nil? second))
(mapcat identity))
map-args))
(defn path-for [routes handler params]
(apply bidi/path-for routes handler (flat-map-seq params))) | |
9ffa84fe823e6a3851e9debe106c9dcbac389b11910d34a36e3221a25a52d05b | esl/usec | usec_tests.erl | -module(usec_tests).
-include_lib("proper_eunit/include/pt_proper_eunit.hrl").
from_sec0_test() ->
?assertEqual(0, usec:from_sec(0)).
from_sec1_test() ->
?assertEqual(1000*1000, usec:from_sec(1)).
to_sec0_test() ->
?assertEqual(0, usec:to_sec(0)).
to_sec1_test() ->
?assertEqual(1, usec:to_sec(1000*100... | null | https://raw.githubusercontent.com/esl/usec/f85ffd8350d7000c26392c18bdfcdbb30f3b5ee8/test/usec_tests.erl | erlang | Is one of these redundant? | -module(usec_tests).
-include_lib("proper_eunit/include/pt_proper_eunit.hrl").
from_sec0_test() ->
?assertEqual(0, usec:from_sec(0)).
from_sec1_test() ->
?assertEqual(1000*1000, usec:from_sec(1)).
to_sec0_test() ->
?assertEqual(0, usec:to_sec(0)).
to_sec1_test() ->
?assertEqual(1, usec:to_sec(1000*100... |
ad5b56a1ee1f5ecf12326392a57620d93d275a6aecb2e83b0adbe0ed62dfe1fa | aslatter/xhb | Internal.hs |
-- | This module contains functioanlity only for use
by other XHB modules , while still trying to hide some
-- of the implementation details of the 'Connection'
-- data type.
module Graphics.XHB.Connection.Internal
(sendRequest
,sendRequestWithReply
,lookupExtension
,cacheExtension
,Connection
... | null | https://raw.githubusercontent.com/aslatter/xhb/c244fb6536fed1c6591e556d42aa3bdf0f86f7c2/Graphics/XHB/Connection/Internal.hs | haskell | | This module contains functioanlity only for use
of the implementation details of the 'Connection'
data type.
Assumes that the input bytestring is a properly formatted
and padded request.
send bytes onto connection
increment sequence
Returns the next sequence ID
Locks the handle for use by the passed in funct... |
by other XHB modules , while still trying to hide some
module Graphics.XHB.Connection.Internal
(sendRequest
,sendRequestWithReply
,lookupExtension
,cacheExtension
,Connection
) where
import Data.Word(Word16)
import Control.Exception(bracket)
import Control.Concurrent.STM
import Control.Con... |
e5915b24fbc4bc1bfabb71d10a23ad4cb477dfe4ba12f4d8c3e36e6849164a5d | google/ormolu | unidirectional-out.hs | # LANGUAGE PatternSynonyms #
pattern Head x <- x : xs
pattern Head' x <-
x : xs
pattern Head'' {x} <-
x : xs
pattern FirstTwo {x, y} <-
x : (y : xs)
pattern FirstTwo'
{ x
, y
} <-
x : (y : xs)
pattern Simple <- "Simple"
pattern WithTypeSig :: String
pattern WithTypeSig <- "WithTypeSig"
| null | https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/declaration/value/pattern-synonyms/unidirectional-out.hs | haskell | # LANGUAGE PatternSynonyms #
pattern Head x <- x : xs
pattern Head' x <-
x : xs
pattern Head'' {x} <-
x : xs
pattern FirstTwo {x, y} <-
x : (y : xs)
pattern FirstTwo'
{ x
, y
} <-
x : (y : xs)
pattern Simple <- "Simple"
pattern WithTypeSig :: String
pattern WithTypeSig <- "WithTypeSig"
| |
4ed512cd64ced2dfffc1d359949b85dab69fca4cfd94344efdcbb8e9d8258724 | ragkousism/Guix-on-Hurd | profiles.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 , 2014 , 2015 , 2016 < >
Copyright © 2014 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU 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 Sof... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/tests/profiles.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 , 2014 , 2015 , 2016 < >
Copyright © 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (test-profiles)
#:use-module (guix tests)
#:use-... |
ed663676b495fa0e474b52a33fb245ed733593fb4dc64fdaaf7595d15f19ecbd | gas2serra/cldk | mirrored-sheet.lisp | (in-package :cldk-backend)
(defclass cldk-mirrored-sheet-mixin (mirrored-sheet-mixin)
())
| null | https://raw.githubusercontent.com/gas2serra/cldk/63c8322aedac44249ff8f28cd4f5f59a48ab1441/mcclim/Backends/Standard/mirrored-sheet.lisp | lisp | (in-package :cldk-backend)
(defclass cldk-mirrored-sheet-mixin (mirrored-sheet-mixin)
())
| |
f3a912884b5a755f6cb8afb06d2603be0ac0d629ef60dc62642374664eed3f03 | joelkuiper/aplomb | home.clj | (ns aplomb.routes.home
(:require [compojure.core :refer [defroutes GET]]
[ring.util.http-response :refer [ok]]
[clojure.java.io :as io]))
(defn home-page []
"we're alive")
(defroutes home-routes
(GET "/" [] (home-page)))
| null | https://raw.githubusercontent.com/joelkuiper/aplomb/b4b603d06598a6a7c1e06bb831ca658586063e37/src/aplomb/routes/home.clj | clojure | (ns aplomb.routes.home
(:require [compojure.core :refer [defroutes GET]]
[ring.util.http-response :refer [ok]]
[clojure.java.io :as io]))
(defn home-page []
"we're alive")
(defroutes home-routes
(GET "/" [] (home-page)))
| |
e5abc79a93a713524296120f095107dea1899bfa48b3d4698aebf9417529a6d8 | gebi/jungerl | snmp_smux_server.erl | %%%-------------------------------------------------------------------
%%% File : snmp_smux_server.erl
Author : < >
%%% Description : Acts as a subagent towards the snmp master agent, and
%%% as a SMUX master towards the real SMUX subagent.
There is one such process per SMUX conn... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/snmp_ext/src/snmp_smux_server.erl | erlang | -------------------------------------------------------------------
File : snmp_smux_server.erl
Description : Acts as a subagent towards the snmp master agent, and
as a SMUX master towards the real SMUX subagent.
-------------------------------------------------------------------
gen_server callbac... | Author : < >
There is one such process per SMUX connection .
Created : 1 Nov 2003 by < >
-module(snmp_smux_server).
-behaviour(gen_server).
-export([start_link/3]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2,
code_change/3]).
-define(VMODULE, "SMUX").
-... |
fb31842a35e8999cf9373fc00f1dbc1f42b2d81156a49a636035d969b82a246e | janestreet/bonsai | transform.mli | open! Core
open! Import
module Var_from_parent : sig
type t =
| None
(** The common case, in which the parent node does not introduce any variables. *)
| One of Type_equal.Id.Uid.t
* The case in which the parent node introduces one new variable ; most of
the time this is for [ Subst ] or [ Sub... | null | https://raw.githubusercontent.com/janestreet/bonsai/4baeedc75bf73a0915e04dc02d8a49b78779e9b0/src/transform.mli | ocaml | * The common case, in which the parent node does not introduce any variables. | open! Core
open! Import
module Var_from_parent : sig
type t =
| None
| One of Type_equal.Id.Uid.t
* The case in which the parent node introduces one new variable ; most of
the time this is for [ Subst ] or [ Subst_stateless ]
the time this is for [Subst] or [Subst_stateless] *)
| Two o... |
f16e850f89b7731b7e796fde547449a9e6a18e3295bf0f1cc32d6e130999c7fc | APTE/APTE | recipe.mli | (** Operations on recipes *)
* This module regroups all the functions that manipulate recipes . In { % ~\thesis % } , the terms
are splitted into first ( resp . second ) order terms called messages ( resp . recipe ) .
In this module , we focus on the recipes . The message are handled in a different module ... | null | https://raw.githubusercontent.com/APTE/APTE/d5f1bbd29c2fc324a6015ac50173a0cc8ad66623/Source/standard_library/recipe.mli | ocaml | * Operations on recipes
* {2 Recipe}
* [fresh_variable n] creates a fresh variable with support [n].
* [fresh_variable_from_id s n] creates a fresh variable with support [n] and display identifier [s].
* [fresh_variable_list nb n] creates a list of [nb] fresh variables all with support [n].
* [fresh_variable_list2 nb... |
* This module regroups all the functions that manipulate recipes . In { % ~\thesis % } , the terms
are splitted into first ( resp . second ) order terms called messages ( resp . recipe ) .
In this module , we focus on the recipes . The message are handled in a different module .
In theory a recipe an... |
af8864cff293a988b2a2ec9a935bb7ad1261b91cfaf76840f3441c83f7a0d62d | utkarshkukreti/reaml | Portal.ml | module R = Reaml
module Portal = struct
let[@reaml.component "Portal"] make () =
let[@reaml] isOpen, setIsOpen = R.useState false in
let portal =
match isOpen, R.find "body" with
| true, Some body ->
R.Portal.make
(R.div
[ R.Style.position "fixed"; R.Style.top "1rem... | null | https://raw.githubusercontent.com/utkarshkukreti/reaml/5640a36293ba2a765171225deddb644f4d6c5d26/examples/Portal.ml | ocaml | module R = Reaml
module Portal = struct
let[@reaml.component "Portal"] make () =
let[@reaml] isOpen, setIsOpen = R.useState false in
let portal =
match isOpen, R.find "body" with
| true, Some body ->
R.Portal.make
(R.div
[ R.Style.position "fixed"; R.Style.top "1rem... | |
64fc7432c781e71677e0beddc295f032bf484a64be4857c9c08a03439c77e889 | kuberlog/daemon-clj | core.clj | (ns daemon.face.core
(require
[daemon.face.repl :as repl]
[daemon.face.emotion-animation :as animation]
[daemon.settings :as settings]
[daemon.smart-atom :as smart-atom]
[quil.core :as q]
[quil.middleware :as m]
[clojure.core.async :as async :refer [go chan <! >!]]
[clojure.java.shell :as shel... | null | https://raw.githubusercontent.com/kuberlog/daemon-clj/904699d005ea2df3d86426d8aa1d3b030178e683/src/daemon/face/core.clj | clojure | all folders and files
transition
or just get the next state
finally assoc in the cur-frame-no
uncomment to clear repl for debugging
(assoc :repl-text "")
increment the copy counter so the mat doesn't get released mid display
decrement the copy counter so the mat can get released if the smart-mat-to-draw has been update... | (ns daemon.face.core
(require
[daemon.face.repl :as repl]
[daemon.face.emotion-animation :as animation]
[daemon.settings :as settings]
[daemon.smart-atom :as smart-atom]
[quil.core :as q]
[quil.middleware :as m]
[clojure.core.async :as async :refer [go chan <! >!]]
[clojure.java.shell :as shel... |
1f0efd853b37ae92984e21d9291951a26cc11613154aabe451f69eea9f0f123c | argp/bap | djgraph.mli |
TODO ( ed ) Add djgraph.mli file
TODO ( ed ) Add dot printer ? Would be a good test of API , but would
require a slightly more complex signature . ( label_to_string , etc . )
Maybe we can create a separate functor for this .
require a slightly more complex signature. (label_to_string, etc.)
Maybe w... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/djgraph.mli | ocaml | The underlying vertex in the graph.
The level in the djgraph.
TODO(awreece) Accept a builder parameter? |
TODO ( ed ) Add djgraph.mli file
TODO ( ed ) Add dot printer ? Would be a good test of API , but would
require a slightly more complex signature . ( label_to_string , etc . )
Maybe we can create a separate functor for this .
require a slightly more complex signature. (label_to_string, etc.)
Maybe w... |
aea829e9f16b46ded35a21b2a790ccf21926d920caa12135a5d59bfb38bbf132 | UU-ComputerScience/uhc | mod3.hs | -- failed import single export: not imported
module Main
where
import Imp1.Exp1()
i2 = i1
main = i2
| null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/20/mod3.hs | haskell | failed import single export: not imported |
module Main
where
import Imp1.Exp1()
i2 = i1
main = i2
|
31c40aa3ba3476397a9ab3648ed961cd0f70fe48838e5ee11eca10def1100adc | jazzytomato/hnlookup | repl.clj | (use 'figwheel-sidecar.repl-api)
(start-figwheel! "dev") ;; <-- fetches configuration
(cljs-repl) | null | https://raw.githubusercontent.com/jazzytomato/hnlookup/c29c5a417bdf8756a2a747d89dbc41ab4b012c75/scripts/repl.clj | clojure | <-- fetches configuration | (use 'figwheel-sidecar.repl-api)
(cljs-repl) |
f43de5a460a8d7133aef12e038b92e42e282dd7997caf0687078c15e5ed7b104 | haskell-openal/ALUT | Version.hs | --------------------------------------------------------------------------------
-- |
-- Module : Sound.ALUT.Version
Copyright : ( c ) 2005 - 2016
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
---------------------------------------------------... | null | https://raw.githubusercontent.com/haskell-openal/ALUT/98ba9a7f431fd7572b920ba1fbdd0122d3cb84a3/src/Sound/ALUT/Version.hs | haskell | ------------------------------------------------------------------------------
|
Module : Sound.ALUT.Version
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
-----------------------------------------------------... | Copyright : ( c ) 2005 - 2016
Maintainer : < >
module Sound.ALUT.Version (
alutAPIVersion, alutVersion
) where
import Control.Monad ( liftM2 )
import Data.StateVar ( GettableStateVar, makeGettableStateVar )
import Sound.OpenAL.AL.BasicTypes ( ALint )
import Sound.ALUT.Config
import Sound.ALUT.C... |
890af6351433fea8808ad2684b930a640c2273b0fb94b980636c432235d431d9 | bmourad01/ocamlchess | book.mli | (** This module implements support for Polyglot opening books. *)
(** A database of games that can be used as an opening book for the
computer player. *)
type t
* [ create filename ] reads the book from the file [ filename ] . The
file is expected to implement the Polyglot format . May raise if
the fi... | null | https://raw.githubusercontent.com/bmourad01/ocamlchess/6c7214f5b709d9b1327b384a057fbdb2b5a9c3db/chess/src/book.mli | ocaml | * This module implements support for Polyglot opening books.
* A database of games that can be used as an opening book for the
computer player.
* [filename book] returns the filename of the book.
* Errors that may be raised during lookup.
* Pretty-prints the error to a formatter.
* Returns the error as a human... |
type t
* [ create filename ] reads the book from the file [ filename ] . The
file is expected to implement the Polyglot format . May raise if
the file does not exist or the file is incorrectly formatted .
file is expected to implement the Polyglot format. May raise if
the file does not exist or th... |
c0f15fa9c35718b350f12277fafc488b1078379612cebd22ca007178123d0281 | donaldsonjw/bigloo | iarith.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / comptime / Expand / iarith.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Expand/iarith.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
*=====================================================================*/
*---------------------------... | * serrano / prgm / project / bigloo / comptime / Expand / iarith.scm * /
* Author : * /
* Creation : Fri Aug 26 09:16:56 1994 * /
* Last change : Sat Feb 23 14:42:35 2013 ( serrano ) * /
* Copy... |
1705584e5753940e66e8847a4ddb8fd79fc46fc54801e0882ad0168c5c9756a0 | erlang-ls/erlang_ls | els_code_lens_provider.erl | -module(els_code_lens_provider).
-behaviour(els_provider).
-export([
options/0,
handle_request/1
]).
-include("els_lsp.hrl").
-include_lib("kernel/include/logger.hrl").
%%==============================================================================
%% els_provider functions
%%===============================... | null | https://raw.githubusercontent.com/erlang-ls/erlang_ls/9f70a427d8f18085918f9a3775eca671d11fbadc/apps/els_lsp/src/els_code_lens_provider.erl | erlang | ==============================================================================
els_provider functions
==============================================================================
==============================================================================
Internal Functions
=======================================... | -module(els_code_lens_provider).
-behaviour(els_provider).
-export([
options/0,
handle_request/1
]).
-include("els_lsp.hrl").
-include_lib("kernel/include/logger.hrl").
-spec options() -> map().
options() ->
#{resolveProvider => false}.
-spec handle_request(any()) -> {async, uri(), pid()}.
handle_reques... |
2e31548af0d0ecc231aeced1c7e7f83c0c209b2b40580e40f29929f8c46cfa29 | conal/functor-combo | ZipperFix.hs | { - # LANGUAGE # - }
# OPTIONS_GHC -Wall #
----------------------------------------------------------------------
-- |
Module : FunctorCombo .
Copyright : ( c ) Conal Elliott 2010
-- License : BSD3
--
-- Maintainer :
-- Stability : experimental
--
-- Zippers for functor fixpoints
------... | null | https://raw.githubusercontent.com/conal/functor-combo/e83af37cc2cc3b9a88dae032e19c731cf7b7b63d/src/FunctorCombo/ZipperFix.hs | haskell | --------------------------------------------------------------------
|
License : BSD3
Maintainer :
Stability : experimental
Zippers for functor fixpoints
--------------------------------------------------------------------
Fix f =~ f (Fix f)
| Context for functor fixpoints
data Context f = Co... | { - # LANGUAGE # - }
# OPTIONS_GHC -Wall #
Module : FunctorCombo .
Copyright : ( c ) Conal Elliott 2010
module FunctorCombo.ZipperFix (Context,Zipper, up,up',down) where
import Control.Arrow (first)
import FunctorCombo . Derivative
import FunctorCombo .
import FunctorCombo.DHoley
newtype ... |
483f4b901b92c3b759e32456b03d2674110904ecd6f87140ee0d441de4a3c618 | alanz/ghc-exactprint | TH_repPatSigTVar.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Main
where
import Language.Haskell.TH
$([d| f = \(_ :: Either a b) -> $(sigE (varE 'undefined) (varT ''c)) |])
main :: IO ()
main = return ()
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc86/TH_repPatSigTVar.hs | haskell | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Main
where
import Language.Haskell.TH
$([d| f = \(_ :: Either a b) -> $(sigE (varE 'undefined) (varT ''c)) |])
main :: IO ()
main = return ()
| |
3ffd5f3cde02d35352bada18c6457fa297eb714473eaf9af77003a6aef16a598 | knutin/elli | elli_tests.erl | -module(elli_tests).
-include_lib("eunit/include/eunit.hrl").
-include("elli.hrl").
-include("elli_util.hrl").
-define(i2b(I), list_to_binary(integer_to_list(I))).
elli_test_() ->
{setup,
fun setup/0, fun teardown/1,
[
?_test(hello_world()),
?_test(not_found()),
?_test(crash()),
... | null | https://raw.githubusercontent.com/knutin/elli/35eb9e8af459f48698bae7c6096d128e2f34fd6a/test/elli_tests.erl | erlang |
INTEGRATION TESTS
does not send any for chunked transfers
Send Result of the body
Slow client, sending only the specified byte size every millisecond
UNIT TESTS
Otherwise it should return everything to the right hand side of `?`.
HELPERS
| -module(elli_tests).
-include_lib("eunit/include/eunit.hrl").
-include("elli.hrl").
-include("elli_util.hrl").
-define(i2b(I), list_to_binary(integer_to_list(I))).
elli_test_() ->
{setup,
fun setup/0, fun teardown/1,
[
?_test(hello_world()),
?_test(not_found()),
?_test(crash()),
... |
67ecc74bd85cc635c68df1c6667bc42ab9731dd885d9f3269a745541583538c2 | RichiH/git-annex | TransferScanner.hs | git - annex assistant thread to scan remotes to find needed transfers
-
- Copyright 2012 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2012 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Assistant.Threads.TransferScanner where
import Assist... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Assistant/Threads/TransferScanner.hs | haskell | This thread waits until a remote needs to be scanned, to find transfers
- that need to be made, to keep data in sync.
This is a cheap scan for failed transfers involving a remote.
Check if the remote still has the key.
- If not, relies on the expensiveScan to
- get it queued from some other remote.
Del... | git - annex assistant thread to scan remotes to find needed transfers
-
- Copyright 2012 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2012 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Assistant.Threads.TransferScanner where
import Assist... |
2107b5854b76942acaf020b004a79632d4d815c667ea89a493a960581bc96c7a | emina/rosette | itunes100_16.rkt | #lang rosette
(require (only-in racket/runtime-path define-runtime-path))
(require "../dom.rkt")
(require "../websynth.rkt")
(require "../websynthlib.rkt")
(define-runtime-path html (build-path ".." "html/itunes_top100_v2.html"))
(define dom (read-DOMNode html))
(define-tags (tags dom))
(define max_zpath_depth (depth... | null | https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/sdsl/websynth/test/itunes100_16.rkt | racket | Record 0 fields
Record 1 fields
Record 2 fields
Record 3 fields
Record 4 fields
Record 5 fields
Record 6 fields
Record 7 fields
Record 8 fields
Record 9 fields
Record 10 fields
Record 11 fields
Record 12 fields
Record 13 fields
Record 14 fields
Record 15 fields
Cross-record Mask
Record 0 zpath asserts... | #lang rosette
(require (only-in racket/runtime-path define-runtime-path))
(require "../dom.rkt")
(require "../websynth.rkt")
(require "../websynthlib.rkt")
(define-runtime-path html (build-path ".." "html/itunes_top100_v2.html"))
(define dom (read-DOMNode html))
(define-tags (tags dom))
(define max_zpath_depth (depth... |
b3c088ff65a34dada5a8168fec5f4e1ed8913fdbbfedbd92f33bf6aa61a9fee1 | brite-code/brite | Unify.hs | # LANGUAGE ViewPatterns #
module Brite.Semantics.Unify
( unify
) where
import Brite.Diagnostic
import Brite.Semantics.CheckMonad
import Brite.Semantics.Prefix (Prefix)
import qualified Brite.Semantics.Prefix as Prefix
import Brite.Semantics.TypeNames
import Brite.Semantics.Type (Monotype, MonotypeDescription(..),... | null | https://raw.githubusercontent.com/brite-code/brite/154d7fc93be050626af48051f71a446ec329f612/old/src/Brite/Semantics/Unify.hs | haskell | IMPORTANT: It is expected that all free type variables are bound in the prefix! If this is not
true we will report internal error diagnostics.
equivalent under the prefix. However, what makes unification extra special is that at the same
time if we encounter flexible bounds in the prefix then we update our prefix ... | # LANGUAGE ViewPatterns #
module Brite.Semantics.Unify
( unify
) where
import Brite.Diagnostic
import Brite.Semantics.CheckMonad
import Brite.Semantics.Prefix (Prefix)
import qualified Brite.Semantics.Prefix as Prefix
import Brite.Semantics.TypeNames
import Brite.Semantics.Type (Monotype, MonotypeDescription(..),... |
7d0ec3e31a6af418783edbc9043a7f6b2849e4d87783717aca6a5f2b31aaab44 | FundingCircle/jackdaw | consumer.clj | ;; jackdaw.data.consumer
;;
;; jackdaw.data extensions for the consumer API types
(in-ns 'jackdaw.data)
(import '[org.apache.kafka.clients.consumer
ConsumerRecord OffsetAndTimestamp]
'org.apache.kafka.common.header.Headers
'org.apache.kafka.common.record.TimestampType)
(set! *warn-on-reflec... | null | https://raw.githubusercontent.com/FundingCircle/jackdaw/e0c66d386277282219e070cfbd0fe2ffa3c9dca5/src/jackdaw/data/consumer.clj | clojure | jackdaw.data.consumer
jackdaw.data extensions for the consumer API types
Deprecated checksum
Deprecated field
:checksum (.checksum r)
OffsetAndTimestamp tuples |
(in-ns 'jackdaw.data)
(import '[org.apache.kafka.clients.consumer
ConsumerRecord OffsetAndTimestamp]
'org.apache.kafka.common.header.Headers
'org.apache.kafka.common.record.TimestampType)
(set! *warn-on-reflection* true)
(defn ->ConsumerRecord
"Given unrolled ctor-style arguments create ... |
c847fa370f325b91498ae01c42ea54569cc731722778b0db1a05813541f704ab | lispbuilder/lispbuilder | package.lisp | ;;; -*- lisp -*-
(in-package #:cl-user)
(defpackage #:lispbuilder-sdl-mixer-cffi
(:use #:cl #:cffi)
(:nicknames #:sdl-mixer-cffi)
(:documentation "The main package of `lispbuilder-sdl-mixer-cffi'.")
(:export))
| null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-sdl-mixer/cffi/package.lisp | lisp | -*- lisp -*- |
(in-package #:cl-user)
(defpackage #:lispbuilder-sdl-mixer-cffi
(:use #:cl #:cffi)
(:nicknames #:sdl-mixer-cffi)
(:documentation "The main package of `lispbuilder-sdl-mixer-cffi'.")
(:export))
|
260e286b80629a8b5c8fd70a7e417cd5836513dbebd2b7557cbe50ed1c4fd09f | simoncourtenage/quanthas | CalendarImpl.hs |
Copyright ( C ) 2017 , ( )
This file is part of QuantHas , an open - source Haskell implementation
of the QuantLib library for quantitative finance .
is free software : you can redistribute it and/or modify it
under the terms of the QuantHas license . You should have receiv... | null | https://raw.githubusercontent.com/simoncourtenage/quanthas/6e0b2cc9a60bb7d1709f98ed10d09aa6c071c8dd/src/QuantHas/Time/Calendar/CalendarImpl.hs | haskell | | returns day of the year Easter Monday falls on |
Copyright ( C ) 2017 , ( )
This file is part of QuantHas , an open - source Haskell implementation
of the QuantLib library for quantitative finance .
is free software : you can redistribute it and/or modify it
under the terms of the QuantHas license . You should have receiv... |
2eb0188ebaf23aa4c2ae35246110510f88026b3014a7a55f561bf4683e0fb7f6 | rabbitmq/rabbitmq-common | rabbit_binary_parser.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 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_binary_parser).
-include("rabbit.... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-common/67c4397ffa9f51d87f994aa4db4a68e8e95326ab/src/rabbit_binary_parser.erl | erlang |
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Note that we try to put these in approximately the order we expect
-0-9-1-errata.html, and section
Only clear when we can rebuild the properties later in
accord... | 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 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_binary_parser).
-include("rabbit.hrl").... |
8b0b807bfe5a42d826739eec6a0c5f8984306859b3efccfba63da0d630ddfbff | haskell-opengl/OpenGLRaw | Multitexture.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.Multitexture
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
-------------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/ARB/Multitexture.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.ARB.Multitexture
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums
* Functions | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.ARB.Multitexture (
glGetARBMultitexture,
gl_ARB_multitexture,
pattern GL_ACTIVE_TEXTURE_ARB,
pattern GL_CLIENT_ACTIVE_TEXTURE_ARB,
pattern GL_MAX_TEXTURE_UNITS_ARB,
pattern GL_TEXTURE0_ARB,
pattern G... |
3f633257793c45e702461ea446a5f816b45df039aae053f838a4fd1f6c6bf508 | ideas-edu/ideas | Constraint.hs | -----------------------------------------------------------------------------
Copyright 2019 , Ideas project team . This file is distributed under the
terms of the Apache License 2.0 . For more information , see the files
" LICENSE.txt " and " NOTICE.txt " , which are included in the distribution .
-------... | null | https://raw.githubusercontent.com/ideas-edu/ideas/f84907f92a8c407b7313f99e65a08d2646dc1565/src/Ideas/Common/Constraint.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
|
Maintainer :
Stability : provisional
Constraints for constraint-based tutors
---------------------------------------------------------------------... | Copyright 2019 , Ideas project team . This file is distributed under the
terms of the Apache License 2.0 . For more information , see the files
" LICENSE.txt " and " NOTICE.txt " , which are included in the distribution .
Portability : portable ( depends on ghc )
module Ideas.Common.Constraint
( ... |
8e7fd6afb08680b7c40e5409b9f0ed807f18f12e4dac2176982056dbc351c81a | Incubaid/arakoon | myocamlbuild.ml | Findlib dependencies
let dependencies = [ "lwt";
"oUnit";
"camltc";
"snappy";
"ssl";
"bz2";
"quickcheck";
"nocrypto";
"zarith";
"... | null | https://raw.githubusercontent.com/Incubaid/arakoon/43a8d0b26e4876ef91d9657149f105c7e57e0cb0/myocamlbuild.ml | ocaml | Enabled compiler warnings, argument for '-w', see `man ocamlc`
Enabled compiler errors, argument for '-warn-error'
how to compile C stuff
Optionally add something like -march=core2 -mtune=corei7-avx for
* a minor extra performance gain in CRC32 calculations | Findlib dependencies
let dependencies = [ "lwt";
"oUnit";
"camltc";
"snappy";
"ssl";
"bz2";
"quickcheck";
"nocrypto";
"zarith";
"... |
be5f6a28c14423b831f9f84641eac780942c6fb80c8d87ad17dc57c89dc4a47a | gethop-dev/pubsub | mqtt_test.clj | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
;; file, You can obtain one at /
(ns dev.gethop.pubsub.mqtt-test
(:require [clojure.spec.test.alpha :as stest]
[clojure.test :refer :all]
[dev.gethop.p... | null | https://raw.githubusercontent.com/gethop-dev/pubsub/bee5811d4d374b24e515aab8080b2ed15a1204ca/test/dev/gethop/pubsub/mqtt_test.clj | clojure | file, You can obtain one at /
It means try once and then retry once.
Let the broker route the messages to the consumers and receive the messages locally | 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
(ns dev.gethop.pubsub.mqtt-test
(:require [clojure.spec.test.alpha :as stest]
[clojure.test :refer :all]
[dev.gethop.pubsub.core :as core]
... |
56d6b10d690563ba24ec035a20be1abc0e4e9c7164bacd680addd1f10503ec74 | tsloughter/grpcbox | grpcbox_client_stream.erl | -module(grpcbox_client_stream).
-export([new_stream/5,
send_request/6,
send_msg/2,
recv_msg/2,
init/3,
on_receive_headers/2,
on_receive_data/2,
on_end_stream/1,
handle_info/2]).
-include("grpcbox.hrl").
-define(headers(Scheme, Host, Path, Encod... | null | https://raw.githubusercontent.com/tsloughter/grpcbox/5ea123f2009b26acc6e730801f2b2de17bdfdda2/src/grpcbox_client_stream.erl | erlang | headers are sent in the same request as creating a new stream to ensure
concurrent calls can't end up interleaving the sending of headers in such
a way that a lower stream id's headers are sent after another's, which results
in the server closing the connection when it gets them out of order
callbacks
trailers
h... | -module(grpcbox_client_stream).
-export([new_stream/5,
send_request/6,
send_msg/2,
recv_msg/2,
init/3,
on_receive_headers/2,
on_receive_data/2,
on_end_stream/1,
handle_info/2]).
-include("grpcbox.hrl").
-define(headers(Scheme, Host, Path, Encod... |
aec0ae47f9e3cb75bb63bab15b3446d11c3db60989ada19844594946cd35ac95 | OrgPad-com/volcano | config.cljs | (ns volcano.example.config
(:require [bidi.bidi :as b]
[shadow.resource :as resource]))
(def routes
["" [["/index.html" :page/index]
["/contact.html" :page/contact]]])
(defn index []
(list
[:h1.colored "Index"]
[:img {:width 747
:height 454
:src "/img/volcano... | null | https://raw.githubusercontent.com/OrgPad-com/volcano/fb1529e9ef07dd2883b4fe17f39da77970d4f687/src/volcano/example/config.cljs | clojure | (ns volcano.example.config
(:require [bidi.bidi :as b]
[shadow.resource :as resource]))
(def routes
["" [["/index.html" :page/index]
["/contact.html" :page/contact]]])
(defn index []
(list
[:h1.colored "Index"]
[:img {:width 747
:height 454
:src "/img/volcano... | |
c9e55f242a063a4747ada2a8e0f87ce918412f29d056d94e3aaeae4bbd50dc92 | aigarashi/copl-tools | pp.ml | open Format
open Core
let g = "Nat"
let pr = fprintf
let rec print_nat ppf = function
Z -> pr ppf "Z"
| S n -> pr ppf "S(%a)" print_nat n
let print_judgment ppf = function
PlusIs (n1, n2, n3) ->
pr ppf "%a plus %a is %a" print_nat n1 print_nat n2 print_nat n3
| MultIs (n1, n2, n3) ->
pr ppf... | null | https://raw.githubusercontent.com/aigarashi/copl-tools/3c4da117083a0870334c8eef270206b11060514e/checker/Nat/pp.ml | ocaml | open Format
open Core
let g = "Nat"
let pr = fprintf
let rec print_nat ppf = function
Z -> pr ppf "Z"
| S n -> pr ppf "S(%a)" print_nat n
let print_judgment ppf = function
PlusIs (n1, n2, n3) ->
pr ppf "%a plus %a is %a" print_nat n1 print_nat n2 print_nat n3
| MultIs (n1, n2, n3) ->
pr ppf... | |
a25d8cdd11bf4e01f74e7f609f50f36c17b7791e77645b9ee43c7e4c5a786849 | exercism/erlang | example.erl | -module(example).
-export([count_words/1]).
count_words("'" ++ S) ->
case lists:reverse(S) of
"'" ++ S2 -> count_words(lists:reverse(S2));
_ -> count_words("'"++S)
end;
count_words(S) ->
lists:foldl(
fun
(W, Acc) -> maps:update_with(W, fun (Cnt) -> Cnt+1 end, 1, Acc)
... | null | https://raw.githubusercontent.com/exercism/erlang/9b3d3c14ef826e7efbc4fcd024fd20ed09332562/exercises/practice/word-count/.meta/example.erl | erlang | end of sentence with nothing in word accumulator
end of sentence with a word left in the word accumulator
uppercase letter -> transform to lowercase
lowercase letter, digit, or apostrophe
separator (or junk) on empty word accumulator -> just skip
separator (or junk) with non-empty word accumulator -> end of word | -module(example).
-export([count_words/1]).
count_words("'" ++ S) ->
case lists:reverse(S) of
"'" ++ S2 -> count_words(lists:reverse(S2));
_ -> count_words("'"++S)
end;
count_words(S) ->
lists:foldl(
fun
(W, Acc) -> maps:update_with(W, fun (Cnt) -> Cnt+1 end, 1, Acc)
... |
194d15c2d443681f3c00067bc563178ff4952c2c99d958f687d4708c6fddadab | morpheusgraphql/morpheus-graphql | CategoryCollisionFail.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
-- fail if type was used as input and output type without prefixes
module Feature.Collision.CategoryCollisionFail
( api,
)
where
import Data.Kind (Type)
import... | null | https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/0d7ec120df4ea3b1e030f64ed9820a8a66de7d6a/morpheus-graphql-server/test/Feature/Collision/CategoryCollisionFail.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
fail if type was used as input and output type without prefixes | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE TypeFamilies #
module Feature.Collision.CategoryCollisionFail
( api,
)
where
import Data.Kind (Type)
import Data.Morpheus.Server (interpreter)
import Data.Morpheus.Server.Types
( GQLRequest,
GQLResponse,
GQLType (..),
RootResol... |
aff5e5d14f8dbe979432dd54fe69f2adb06e0907963d565a4182f517ceba8708 | schemeorg-community/index.scheme.org | srfi.14.scm | (((name . "char-set?")
(signature lambda (obj) boolean?)
(tags pure predicate)
(desc . "Is the object obj a character set?"))
((name . "char-set=")
(signature lambda ((char-set? cs1) ...) boolean?)
(tags pure)
(desc . "Are the character sets equal?
Boundary cases:
(char-set=) => true
(char-set=... | null | https://raw.githubusercontent.com/schemeorg-community/index.scheme.org/32e1afcfe423a158ac8ce014f5c0b8399d12a1ea/types/srfi.14.scm | scheme | we provide the fully general extension.
in this way, code can step through every character in a char set. Stepping a cursor \"past the end\" of a char set produces a cursor that answers true to end-of-char-set?. It is an error to pass such a cursor to char-set-ref or to char-set-cursor-next.
if it is passed to char-... | (((name . "char-set?")
(signature lambda (obj) boolean?)
(tags pure predicate)
(desc . "Is the object obj a character set?"))
((name . "char-set=")
(signature lambda ((char-set? cs1) ...) boolean?)
(tags pure)
(desc . "Are the character sets equal?
Boundary cases:
(char-set=) => true
(char-set=... |
bd666daec8488c64ce05a8a02842c028fe32e2b359236eafa40aba919fcc141a | Herzult/vindinium-starter-haskell | Main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Options.Applicative
import Vindinium
import Bot
import Data.String (fromString)
import Data.Text (pack, unpack)
data Cmd = Training Settings (Maybe Int) (Maybe Board)
| Arena Settings
deriving (Show, Eq)
cmdSettings :: Cmd -> Sett... | null | https://raw.githubusercontent.com/Herzult/vindinium-starter-haskell/48b108f6913133794ab5bfcdc52eba6a48ed537f/src/Main.hs | haskell | # LANGUAGE OverloadedStrings # | module Main (main) where
import Options.Applicative
import Vindinium
import Bot
import Data.String (fromString)
import Data.Text (pack, unpack)
data Cmd = Training Settings (Maybe Int) (Maybe Board)
| Arena Settings
deriving (Show, Eq)
cmdSettings :: Cmd -> Settings
cmdSettings (Training s _ _) =... |
226793e9bc56bcfdb0ffef04d7f19dc563170a72d3052702dfec51284a000694 | ocaml-doc/odoc-parser | lexer.mli | Internal module , not exposed
type input = {
file : string;
offset_to_location : int -> Loc.point;
warnings : Warning.t list ref;
lexbuf : Lexing.lexbuf;
}
val token : input -> Lexing.lexbuf -> Token.t Loc.with_location
| null | https://raw.githubusercontent.com/ocaml-doc/odoc-parser/db12c9e002967f7c4185942a1478366bd7349721/src/lexer.mli | ocaml | Internal module , not exposed
type input = {
file : string;
offset_to_location : int -> Loc.point;
warnings : Warning.t list ref;
lexbuf : Lexing.lexbuf;
}
val token : input -> Lexing.lexbuf -> Token.t Loc.with_location
| |
36b6a5d81d2b27a8437afe3c0cb776ba023fbcf633b817545769ff9d8ebc2728 | markostanimirovic/re-action | core.cljs | (ns todo-routing-app.core
(:require [re-action.router :as router]
[re-action.session :as session]
[reagent.core :as r]
[re-streamer.core :refer [subscribe unsubscribe]]))
;; === Pages ===
(defn todo-home []
[:div
[:h3 "Home"]
[:p "Welcome to TODO home page!"]])
(defn tod... | null | https://raw.githubusercontent.com/markostanimirovic/re-action/d6cb33d9ac73bedeac4f09996c2c741d21bda7ba/examples/todo-routing-app/src/todo_routing_app/core.cljs | clojure | === Pages ===
=== Example: Get current route with segments and params from session ===
=== Routes ===
=== App Container === | (ns todo-routing-app.core
(:require [re-action.router :as router]
[re-action.session :as session]
[reagent.core :as r]
[re-streamer.core :refer [subscribe unsubscribe]]))
(defn todo-home []
[:div
[:h3 "Home"]
[:p "Welcome to TODO home page!"]])
(defn todo-list []
[:div... |
70be9ffde04b59fe63e1c3469044dd8b875c227d42313bb4e371349220f1d987 | wingo/fibers | guix.scm | ;; Fibers: cooperative, event-driven user-space threads.
Copyright ( C ) 2017 < >
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the License , or... | null | https://raw.githubusercontent.com/wingo/fibers/36a6cc707921f4ab503965fefd096d80afee72f0/guix.scm | scheme | Fibers: cooperative, event-driven user-space threads.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
ME... |
Copyright ( C ) 2017 < >
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public License
(use-modules (ice-9 popen)
(ice-9 match)
(ice-9 rdelim)
(srfi srfi-1)
(srfi srfi-26)
... |
f96cfeb090bac04ce14424981f6f298ee1e1e8a50ba96c097037e0e4e0829dc0 | 0x0f0f0f/yasih | Numerical.hs | # LANGUAGE FlexibleContexts #
module Yasih.Evaluator.Numerical where
import Yasih.LispTypes
import Yasih.Environment
import Yasih.Evaluator.Operators
import Data.Complex
import Data.Ratio
import Data.Foldable
import Data.Fixed
import Numeric
import Control.Monad.Except
numericalPrimitives :: [(String, [LispVal] ->... | null | https://raw.githubusercontent.com/0x0f0f0f/yasih/d7cedc4e5b4ea5c6c59d2799bbd37524969f2467/src/Yasih/Evaluator/Numerical.hs | haskell | Binary Numerical operations
Conversion
Numerical Boolean operators
Scientific functions
Complex numbers operations
("angle", cAngle),
Type testing functions
|Type testing functions
|Absolute value
Calculates the magnitude
|Ceiling, floor, round and truncate
|foldl1M is like foldlM but has no base case
... | # LANGUAGE FlexibleContexts #
module Yasih.Evaluator.Numerical where
import Yasih.LispTypes
import Yasih.Environment
import Yasih.Evaluator.Operators
import Data.Complex
import Data.Ratio
import Data.Foldable
import Data.Fixed
import Numeric
import Control.Monad.Except
numericalPrimitives :: [(String, [LispVal] ->... |
bfacde67d44cad9e0cb5fd80b1fec0d8a205d59066e033144525fe9c131f728d | clojure/tools.build | test_project_root.clj | (ns clojure.tools.build.test-project-root
(:require
[clojure.java.io :as jio]
[clojure.test :refer :all]
[clojure.tools.build.api :as api])
(:import
[java.nio.file Files]
[java.nio.file.attribute FileAttribute]))
(deftest test-with-project-root
(let [path (Files/createTempDirectory "p" (make-array... | null | https://raw.githubusercontent.com/clojure/tools.build/3e640c42a1879037e6957537022afb62daa4f783/src/test/clojure/clojure/tools/build/test_project_root.clj | clojure | (ns clojure.tools.build.test-project-root
(:require
[clojure.java.io :as jio]
[clojure.test :refer :all]
[clojure.tools.build.api :as api])
(:import
[java.nio.file Files]
[java.nio.file.attribute FileAttribute]))
(deftest test-with-project-root
(let [path (Files/createTempDirectory "p" (make-array... | |
047c323fb59a459e75c2c80dfe17ce09aca491bccd8e0c2d5d8a751daa777a5a | bnoordhuis/chicken-core | chicken.scm | ;;;; chicken.scm - The CHICKEN Scheme compiler (loader/main-module)
;
Copyright ( c ) 2008 - 2013 , The Chicken Team
Copyright ( c ) 2000 - 2007 ,
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
; conditions are... | null | https://raw.githubusercontent.com/bnoordhuis/chicken-core/56d30e3be095b6abe1bddcfe10505fa726a43bb5/chicken.scm | scheme | chicken.scm - The CHICKEN Scheme compiler (loader/main-module)
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... | Copyright ( c ) 2008 - 2013 , The Chicken Team
Copyright ( c ) 2000 - 2007 ,
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIM... |
5829980913f37b16be4a0636a3d9a910a2446735114084a40f0f8d80a37c2443 | tisnik/clojure-examples | core_test.clj | (ns carmineA.core-test
(:require [clojure.test :refer :all]
[carmine1.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/tisnik/clojure-examples/303b7784f9238309af9b9853b426a88accf042e4/carmineA/test/carmineA/core_test.clj | clojure | (ns carmineA.core-test
(:require [clojure.test :refer :all]
[carmine1.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
1d66e9da38b5c5206a9c0951006d3cfd657cb4125e037e30a36d8fa01ef1c69d | GaloisInc/semmc | InternalT32.hs | | This module is necessary to get around the TH staging restriction , since we
need to refer to ' allOpcodes ' from another TH call .
# LANGUAGE TemplateHaskell #
module SemMC.Architecture.ARM.Opcodes.InternalT32
( t32Opcodes
, t32OpcodeInfo
)
where
import Data.Parameterized.Some ( Some... | null | https://raw.githubusercontent.com/GaloisInc/semmc/4dc4439720b3b0de8812a68f8156dc89da76da57/semmc-aarch32/src/SemMC/Architecture/ARM/Opcodes/InternalT32.hs | haskell | | All opcodes known for the architecture | | This module is necessary to get around the TH staging restriction , since we
need to refer to ' allOpcodes ' from another TH call .
# LANGUAGE TemplateHaskell #
module SemMC.Architecture.ARM.Opcodes.InternalT32
( t32Opcodes
, t32OpcodeInfo
)
where
import Data.Parameterized.Some ( Some... |
0694fd7cc5eb1ac8b990a35da723963b8518c4e4d9efab93ccb982b70818270e | Lysxia/twentyseven | Moves.hs | # LANGUAGE RecordWildCards , ScopedTypeVariables , ViewPatterns #
module Rubik.Tables.Moves where
import Rubik.Cube
import Rubik.Misc
import Rubik.Solver
import Rubik.Symmetry
import Rubik.Tables.Internal
import Data.Bifunctor
import Data.Bits
import Data.Maybe
import Data.Monoid
import qualified Data.Vector as V
imp... | null | https://raw.githubusercontent.com/Lysxia/twentyseven/bfcd3ddcf938bc6db933a364d331877b0fd1257e/src/Rubik/Tables/Moves.hs | haskell | = (savedSymMoveTables
"move10symFlipUDSlicePermu"
move18
rawFlipUDSlicePermu
actionFlipUDSlicePermu
conjugateFlipUDSlicePermu)
# INLINE symToRawCornerPermu #
# INLINE conjugateFlipUDSlicePermu_ #
x :: UDSlicePermu -> [ s^(-1) <> x <> s | s <- symUDFix ] | # LANGUAGE RecordWildCards , ScopedTypeVariables , ViewPatterns #
module Rubik.Tables.Moves where
import Rubik.Cube
import Rubik.Misc
import Rubik.Solver
import Rubik.Symmetry
import Rubik.Tables.Internal
import Data.Bifunctor
import Data.Bits
import Data.Maybe
import Data.Monoid
import qualified Data.Vector as V
imp... |
cac60e6dd788e20e474f59d78a8113392cbd770831ec8ab56c4e8181b45dd307 | nasa/ogma | FRETReqsDB2Copilot.hs | Copyright 2020 United States Government as represented by the Administrator
of the National Aeronautics and Space Administration . All Rights Reserved .
--
-- Disclaimers
--
No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY
OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTORY , IN... | null | https://raw.githubusercontent.com/nasa/ogma/04802dbe570d03e426a8bfa5682088d8a54c78c5/ogma-core/src/Language/Trans/FRETReqsDB2Copilot.hs | haskell |
Disclaimers
SPECIFICATIONS, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, OR FREEDOM FROM INFRINGEMENT, ANY WARRANTY THAT THE
SUBJECT SOFTWARE WILL BE ERROR FREE, OR ANY WARRANTY THAT DOCUMENTATION, IF
ANY MANNER, CONSTITUTE AN ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR
GOVERNM... | Copyright 2020 United States Government as represented by the Administrator
of the National Aeronautics and Space Administration . All Rights Reserved .
No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY
OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTORY , INCLUDING , BUT NOT
L... |
b8172dcf02b6a8be79ec5deb28206b7d1368349a418d99e2c819fe5803d8ec36 | Clojure2D/clojure2d-examples | scene.clj | (ns rt4.the-rest-of-your-life.ch06b.scene
(:require [fastmath.vector :as v]
[fastmath.core :as m]
[rt4.the-rest-of-your-life.ch06b.hittable :as hittable]
[rt4.the-rest-of-your-life.ch06b.interval :as interval]
[rt4.the-rest-of-your-life.ch06b.material :as material]
... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/f47e1655902cc6bf1590aaecc144ac274ed3af66/src/rt4/the_rest_of_your_life/ch06b/scene.clj | clojure | (ns rt4.the-rest-of-your-life.ch06b.scene
(:require [fastmath.vector :as v]
[fastmath.core :as m]
[rt4.the-rest-of-your-life.ch06b.hittable :as hittable]
[rt4.the-rest-of-your-life.ch06b.interval :as interval]
[rt4.the-rest-of-your-life.ch06b.material :as material]
... | |
759de5da5668bb8178ac661f9a165060dcacf86686beff19c160a12f68ea3e62 | the-dr-lazy/cascade | UserProjectTable.hs | |
Module : Cascade . Api . Database . UserProjectTable
Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! !
Copyright : ( c ) 2020 - 2021 Cascade
License : MPL 2.0
Maintainer : < > ( the-dr-lazy.github.io )
Stability : Stable
Portability : POSIX
! ! ! INSERT MODULE LONG DESCR... | null | https://raw.githubusercontent.com/the-dr-lazy/cascade/014a5589a2763ce373e8c84a211cddc479872b44/cascade-api/src/Cascade/Api/Database/UserProjectTable.hs | haskell | |
Module : Cascade . Api . Database . UserProjectTable
Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! !
Copyright : ( c ) 2020 - 2021 Cascade
License : MPL 2.0
Maintainer : < > ( the-dr-lazy.github.io )
Stability : Stable
Portability : POSIX
! ! ! INSERT MODULE LONG DESCR... | |
f1f5255b6ae604bac082283edd0a5efab57015d7acb1420ac160f6f56fbffddd | sky-big/RabbitMQ | rabbit_auth_mechanism_amqplain.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/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/src/rabbit_auth_mechanism_amqplain.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.
referring gener... | 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 .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved .
-module... |
c06547a179f940b4d360ece5bc46db9f7ab0cbd287253e237fbda5975a1a26de | apache/couchdb-couch | couch_totp_tests.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/apache/couchdb-couch/21c8d37ac6ee1a7fed1de1f54f95a4d3cd9f5248/test/couch_totp_tests.erl | erlang | use this file except in compliance with the License. You may obtain a copy of
the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(couch_totp_tests).
-include_lib("eunit/include/eunit.hrl").
totp_sha_test() ->
Key = <<"12345678901234567890">>,
?assertEqual(94287082, co... |
f4bed1b3201540eef92c5a72c340c461fe9452411ce11d5055c6c69d6a773e77 | clojure-interop/aws-api | AmazonElasticMapReduceAsyncClient.clj | (ns com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduceAsyncClient
"Client for accessing Amazon EMR asynchronously. Each asynchronous method will return a Java Future object
overloads which accept an AsyncHandler can be used to receive
notification when an asynchronous operation completes.
Amazon E... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.elasticmapreduce/src/com/amazonaws/services/elasticmapreduce/AmazonElasticMapReduceAsyncClient.clj | clojure | (ns com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduceAsyncClient
"Client for accessing Amazon EMR asynchronously. Each asynchronous method will return a Java Future object
overloads which accept an AsyncHandler can be used to receive
notification when an asynchronous operation completes.
Amazon E... | |
144dc7f8be97e49944b12d6fe375ccf572c9a5a3eae00e20b6cf49d47620d47b | thheller/shadow-grove | runtime.cljs | (ns shadow.grove.runtime
(:require
[goog.async.nextTick]
[shadow.grove.protocols :as gp]))
(defonce known-runtimes-ref (atom {}))
(defn ref? [x]
(and (atom x)
(::rt @x)))
(defonce id-seq (atom 0))
(defn next-id []
(swap! id-seq inc))
(defn next-tick [callback]
;; FIXME: should be smarter abo... | null | https://raw.githubusercontent.com/thheller/shadow-grove/408cc88664eedcaeb580031f050d4e58a08a803f/src/main/shadow/grove/runtime.cljs | clojure | FIXME: should be smarter about when/where to schedule | (ns shadow.grove.runtime
(:require
[goog.async.nextTick]
[shadow.grove.protocols :as gp]))
(defonce known-runtimes-ref (atom {}))
(defn ref? [x]
(and (atom x)
(::rt @x)))
(defonce id-seq (atom 0))
(defn next-id []
(swap! id-seq inc))
(defn next-tick [callback]
(js/goog.async.nextTick callbac... |
ca42b3f66849af6b1dcc82307b40b0eba8beaccf048ba457a63b245dd4952d02 | esl/MongooseIM | ejabberd_sm_redis.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2011 , Erlang Solutions Ltd.
%%% @doc Implementation of Redis-based session manager
%%%
%%% @end
Created : 17 Nov 2011 by < >
%%%-------------------------------------------------------------------
-module(ejabberd_sm_r... | null | https://raw.githubusercontent.com/esl/MongooseIM/997ce8cc01dacf8bf1f1f4e3a984ee10f0ce5dd6/src/ejabberd_sm_redis.erl | erlang | -------------------------------------------------------------------
@doc Implementation of Redis-based session manager
@end
-------------------------------------------------------------------
Clean current node's sessions from previous life | @author < >
( C ) 2011 , Erlang Solutions Ltd.
Created : 17 Nov 2011 by < >
-module(ejabberd_sm_redis).
-include("mongoose.hrl").
-include("session.hrl").
-behavior(ejabberd_sm_backend).
-export([init/1,
get_sessions/0,
get_sessions/1,
get_sessions/2,
get_sessions/3,
... |
d2c89e21e6f6f19b27e4cb809ce8c5616f681707d8385a8e8d23fc269d9765b9 | KULeuven-CS/CPL | examples.rkt | #lang eopl
(require "syntax.rkt")
(require "LETREC.rkt")
;;; Example programs
2
(define p1 (a-program (const-exp 2)))
2 - 4
(define p2 (a-program (diff-exp (const-exp 2) (const-exp 4))))
10 - ( 2 - 4 )
(define p3
(a-program (diff-exp (const-exp 10)
(diff-exp (const-exp 2) (const-exp... | null | https://raw.githubusercontent.com/KULeuven-CS/CPL/0c62cca832edc43218ac63c4e8233e3c3f05d20a/chapter3/LETREC/examples.rkt | racket | Example programs
x
x - 4
let x = 0 in x - 4
let f = proc(x) (x - 11) in (f (f 7))
( proc (f) (f (f 77))
proc (x) (x - 11) )
in let f = proc(z) (z - x)
in let g = proc (z) (z - x)
letrec double(x) =
in (f 3) | #lang eopl
(require "syntax.rkt")
(require "LETREC.rkt")
2
(define p1 (a-program (const-exp 2)))
2 - 4
(define p2 (a-program (diff-exp (const-exp 2) (const-exp 4))))
10 - ( 2 - 4 )
(define p3
(a-program (diff-exp (const-exp 10)
(diff-exp (const-exp 2) (const-exp 4)))))
(define p4
... |
b0bacf20bff3255f57cfec3491c04218642dd58169683e0cb5653cd66b6d8f3e | brawnski/git-annex | PreCommit.hs | git - annex command
-
- Copyright 2010 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.PreCommit where
import Command
import qualified Command.Add
import qualified Command.Fix
comma... | null | https://raw.githubusercontent.com/brawnski/git-annex/8b847517a810d384a79178124b9766141b89bc17/Command/PreCommit.hs | haskell | The pre-commit hook needs to fix symlinks to all files being committed.
- And, it needs to inject unlocked files into the annex. | git - annex command
-
- Copyright 2010 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.PreCommit where
import Command
import qualified Command.Add
import qualified Command.Fix
comma... |
f37aca07e24df3d346d61686686c1784584dd893c10f67170086d497b24ccd98 | district0x/district-ui-router | effects.cljs | (ns district.ui.router.effects
(:require
[bide.core :as bide]
[cljs.spec.alpha :as s]
[re-frame.core :as re :refer [reg-fx dispatch]]))
(reg-fx
::navigate
(fn [[& args]]
(apply bide/navigate! args)))
(reg-fx
::replace
(fn [[& args]]
(apply bide/replace! args)))
(defn- post-event-callb... | null | https://raw.githubusercontent.com/district0x/district-ui-router/11f4c604200f144e528b204b174e00ef1783e63b/src/district/ui/router/effects.cljs | clojure | (ns district.ui.router.effects
(:require
[bide.core :as bide]
[cljs.spec.alpha :as s]
[re-frame.core :as re :refer [reg-fx dispatch]]))
(reg-fx
::navigate
(fn [[& args]]
(apply bide/navigate! args)))
(reg-fx
::replace
(fn [[& args]]
(apply bide/replace! args)))
(defn- post-event-callb... | |
917048a8be62ff7e8cdf6f950e01ffa76a84e40393dadef156a807b8c96cbd8f | erlang-ls/erlang_ls | my_parse_transform.erl | -module(my_parse_transform).
-export([ parse_transform/2 ]).
-export([ format_error/1 ]).
parse_transform(_Forms, _Options) ->
[{error, {42, ?MODULE, custom_description}}].
format_error(Desc) ->
lists:flatten(io_lib:format("~p", [Desc])).
| null | https://raw.githubusercontent.com/erlang-ls/erlang_ls/4f403753c197f9ff90867123de6ea3ecaae380b3/apps/els_lsp/priv/code_navigation/src/my_parse_transform.erl | erlang | -module(my_parse_transform).
-export([ parse_transform/2 ]).
-export([ format_error/1 ]).
parse_transform(_Forms, _Options) ->
[{error, {42, ?MODULE, custom_description}}].
format_error(Desc) ->
lists:flatten(io_lib:format("~p", [Desc])).
| |
e2526d76c35d9fc250fd45a6b53286908b94a4f439dcc33f08fe926722ec2d06 | Feldspar/feldspar-language | Expand.hs | --
Copyright ( c ) 2019 , ERICSSON AB
-- 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... | null | https://raw.githubusercontent.com/Feldspar/feldspar-language/499e4e42d462f436a5267ddf0c2f73d5741a8248/src/Feldspar/Core/Middleend/Expand.hs | haskell |
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 ) 2019 , ERICSSON AB
* Neither the name of the ERICSSON AB nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED . IN NO EVENT SHALL THE COPYRIG... |
e199c3738afc17c5107a09028bf3c4d2f0222ed9599aeddfa58de485342c5afb | mmontone/erudite | chunk2.lisp | ;; This is a good chunk
;; @chunk chunk2
(+ 1 1)
;; @end chunk
;; This is the chunk:
;; @insert-chunk chunk2
| null | https://raw.githubusercontent.com/mmontone/erudite/d421f4ed27faa636d5d4d768c4b64274023d63b2/test/chunk2.lisp | lisp | This is a good chunk
@chunk chunk2
@end chunk
This is the chunk:
@insert-chunk chunk2 | (+ 1 1)
|
e8f47277d59017cd9860feba1f6c263f8adba1add5692d24d1ff822aa460dc43 | futurice/haskell-mega-repo | Internal.hs | {-# LANGUAGE DeriveLift #-}
{-# LANGUAGE OverloadedStrings #-}
module Futurice.Office.Internal (module Futurice.Office.Internal) where
import Data.Aeson.Compat
(FromJSON (..), withObject, (.!=), (.:), (.:?))
import Futurice.Prelude
import Futurice.Company
import Prelude ()
data OfficeInfo = OfficeInfo
... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/95fe8e33ad6426eb6e52a9c23db4aeffd443b3e5/futurice-tribes/src/Futurice/Office/Internal.hs | haskell | # LANGUAGE DeriveLift #
# LANGUAGE OverloadedStrings # | module Futurice.Office.Internal (module Futurice.Office.Internal) where
import Data.Aeson.Compat
(FromJSON (..), withObject, (.!=), (.:), (.:?))
import Futurice.Prelude
import Futurice.Company
import Prelude ()
data OfficeInfo = OfficeInfo
{ offName :: !Text
, offShortName :: !Text
, offCo... |
723f4b6450f72c1b9a095858d2d34c5bb4426142dd37bac8a370ca82e8347d28 | erlang/otp | bs_init_writable.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law ... | null | https://raw.githubusercontent.com/erlang/otp/83634b9a1aba4e95fce957fe88d40d25d9524845/lib/compiler/test/compile_SUITE_data/bs_init_writable.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(bs_init_writable).
-export([do/0]).
do() ->
Val = ex:foo(),
X = << <<B:1>> || B <- Val >>,
should_not... |
66f8b1d2167bc9f68304cf7960d1d9c795297918c15be79c88472b7ff89ee850 | dwayne/eopl3 | nenv.test.rkt | #lang racket
(require "./nenv.rkt")
(require rackunit)
(let ([nenv (extend-nenv
6
(extend-nenv
8
(extend-nenv
7
(extend-nenv
14
(empty-nenv)))))])
(check-eq? (apply-nenv nenv 0) 6)
(check-eq? (app... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/03-ch3/interpreters/racket/NAMELESS-PROC-3.39/nenv.test.rkt | racket | #lang racket
(require "./nenv.rkt")
(require rackunit)
(let ([nenv (extend-nenv
6
(extend-nenv
8
(extend-nenv
7
(extend-nenv
14
(empty-nenv)))))])
(check-eq? (apply-nenv nenv 0) 6)
(check-eq? (app... | |
cc16af86ebafdcd1737c719ea962b36b328acaf120ddaefc44319d65ad6cfd1c | lemmaandrew/CodingBatHaskell | stringX.hs | From
Given a string , return a version where all the \"x\ " have been removed . Except an
\"x\ " at the very start or end should not be removed .
Given a string, return a version where all the \"x\" have been removed. Except an
\"x\" at the very start or end should not be removed.
-}
import Test.Hspec ( hspec... | null | https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Warmup-2/stringX.hs | haskell | From
Given a string , return a version where all the \"x\ " have been removed . Except an
\"x\ " at the very start or end should not be removed .
Given a string, return a version where all the \"x\" have been removed. Except an
\"x\" at the very start or end should not be removed.
-}
import Test.Hspec ( hspec... | |
e3d5afe50e352399390e8ca01b8f1041d34501bf1c38f46c77170b4d6efee850 | chaw/r7rs-libs | sha-256-test.sps | Copyright © 2009 , 2010 < >
;; 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, modify, merge, publish, dist... | null | https://raw.githubusercontent.com/chaw/r7rs-libs/b8b625c36b040ff3d4b723e4346629a8a0e8d6c2/weinholt-tests/sha-256-test.sps | scheme | Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, merge, publish, distribute, sublicense,
Software is furnished to do so, subject to the following conditions:
The above copyright notice... | Copyright © 2009 , 2010 < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS O... |
f9dcf263a51a718b9d619057a71d64f8b9797de1d90e1edfd244f904ad183e1c | DKurilo/hackerrank | Main.hs | import Control.Monad
import Control.Monad.ST (runST)
import Data.List (foldl')
import Data.Map (Map (..))
import qualified Data.Map as M
import Data.Vector (Vector (..))
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as MV
import Debug.Trace (trace)
import System.IO
data Morse = Dot | Dash deri... | null | https://raw.githubusercontent.com/DKurilo/hackerrank/726c8de6c6e24388a5e09b0262450265cc21e7ed/codingame/the-resistance/src/Main.hs | haskell | import Control.Monad
import Control.Monad.ST (runST)
import Data.List (foldl')
import Data.Map (Map (..))
import qualified Data.Map as M
import Data.Vector (Vector (..))
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as MV
import Debug.Trace (trace)
import System.IO
data Morse = Dot | Dash deri... | |
fc5fb7b85e7c179952fb0a97508d1387cf33df02a30a635f771afb979d31938a | Holmusk/elm-street | Common.hs | {- | This module contains some commonly used function for working
with 'Doc's and pretty printing.
-}
module Elm.Print.Common
( showDoc
, wrapParens
, arrow
, mkQualified
, typeWithVarsDoc
, qualifiedTypeWithVarsDoc
) where
import Data.Text (Text)
import Internal.Prett... | null | https://raw.githubusercontent.com/Holmusk/elm-street/dfe0e4125591e93a297c1771918307dc93784710/src/Elm/Print/Common.hs | haskell | | This module contains some commonly used function for working
with 'Doc's and pretty printing.
| Shows pretty-printed document.
| Wraps given document in parens if it contains more than single word.
| Pretty printed arrow (@->@).
| Creates a 'Doc' of the type with its type variables (if any).
^ Is qualified
... |
module Elm.Print.Common
( showDoc
, wrapParens
, arrow
, mkQualified
, typeWithVarsDoc
, qualifiedTypeWithVarsDoc
) where
import Data.Text (Text)
import Internal.Prettyprinter.Compat (Doc, concatWith, parens, pretty, surround, (<+>))
import qualified Data.Text as T
... |
20ad5038d275b1b4d028d00e67ec100ebc820c6aa69f1eb7eff865342f116322 | bmeurer/ocaml-experimental | support.mli | (***********************************************************************)
(* *)
MLTk , Tcl / Tk interface of Objective Caml
(* *)
, , and ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-experimental/fe5c10cdb0499e43af4b08f35a3248e5c1a8b541/otherlibs/labltk/support/support.mli | ocaml | *********************************************************************
described in file LICENSE found in the... | MLTk , Tcl / Tk interface of Objective Caml
, , and
projet Cristal , INRIA Rocquencourt
, Kyoto University RIMS
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique and... |
f97291bebc0d851d4e403a80afdd5a2be23152967a18d1cde2a01f01990f4b22 | unclebob/AdventOfCode2020 | core_spec.clj | (ns day7.core-spec
(:require [speclj.core :refer :all]
[day7.core :refer :all]))
(def test-input "light red bags contain 1 bright white bag, 2 muted yellow bags.\ndark orange bags contain 3 bright white bags, 4 muted yellow bags.\nbright white bags contain 1 shiny gold bag.\nmuted yellow bags contain 2 s... | null | https://raw.githubusercontent.com/unclebob/AdventOfCode2020/fc4ba9ad042cbcc48dfa5947373ab46b750d89e5/day7/spec/day7/core_spec.clj | clojure | (ns day7.core-spec
(:require [speclj.core :refer :all]
[day7.core :refer :all]))
(def test-input "light red bags contain 1 bright white bag, 2 muted yellow bags.\ndark orange bags contain 3 bright white bags, 4 muted yellow bags.\nbright white bags contain 1 shiny gold bag.\nmuted yellow bags contain 2 s... | |
d47fdbcbe2a5dbefe10c7cc0cbf2027923a6b8afbc0ea11020d0055c18ef11ca | haskell-repa/repa | Indexed.hs |
module Data.Array.Repa.Vector.Operators.Indexed
(Indexed (..))
where
import Data.Array.Repa.Repr.Chain
import Data.Array.Repa.Vector.Base
import Data.Array.Repa.Chain.Indexed as C
import Data.Array.Repa as R
import qualified Data.Vector.Unboxed as U
-- | Tag each element of a vector wit... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/icebox/abandoned/repa-vector-old/chains/Data/Array/Repa/Vector/Operators/Indexed.hs | haskell | | Tag each element of a vector with its index in that vector.
`vindexed` doesn't have a stream-consuming version because we won't
know how many elements will be produced by each thread.
@
@
|
module Data.Array.Repa.Vector.Operators.Indexed
(Indexed (..))
where
import Data.Array.Repa.Repr.Chain
import Data.Array.Repa.Vector.Base
import Data.Array.Repa.Chain.Indexed as C
import Data.Array.Repa as R
import qualified Data.Vector.Unboxed as U
vindexed [ 42,93,13 ]
= [ ( 0,42... |
2d248dd66d27bd9a02b946e3154ae6f9506341156f77b6dba4283eb481cafef1 | flipstone/orville | ReservedWords.hs | module Test.ReservedWords
( reservedWordsTests,
)
where
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Pool as Pool
import qualified Data.String as String
import qualified Hedgehog as HH
import qualified Orville.PostgreSQL as Orville
import qualified Orville.PostgreSQL.Connection as Conn
im... | null | https://raw.githubusercontent.com/flipstone/orville/1e46190fba715cb0e7bfe7f2beb7081fb8979dc9/orville-postgresql-libpq/test/Test/ReservedWords.hs | haskell | module Test.ReservedWords
( reservedWordsTests,
)
where
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Pool as Pool
import qualified Data.String as String
import qualified Hedgehog as HH
import qualified Orville.PostgreSQL as Orville
import qualified Orville.PostgreSQL.Connection as Conn
im... | |
36c814b13a601d160a50474076a295418510fa7a470e993dc5439392ea9cf4af | aryx/yacfe | visitor_c.mli | open Ast_c
type visitor_c = {
kexpr : (expression -> unit) * visitor_c -> expression -> unit;
kstatement : (statement -> unit) * visitor_c -> statement -> unit;
ktype : (fullType -> unit) * visitor_c -> fullType -> unit;
kdecl : (declaration -> unit) * visitor_c -> declaration -... | null | https://raw.githubusercontent.com/aryx/yacfe/86a4994822abca03ec9e03f1a7e60eca66db0a08/parsing_c/visitor_c.mli | ocaml | ------------------------------------------------------------------------ | open Ast_c
type visitor_c = {
kexpr : (expression -> unit) * visitor_c -> expression -> unit;
kstatement : (statement -> unit) * visitor_c -> statement -> unit;
ktype : (fullType -> unit) * visitor_c -> fullType -> unit;
kdecl : (declaration -> unit) * visitor_c -> declaration -... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.