_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 |
|---|---|---|---|---|---|---|---|---|
1fe3585f7bf36b70da547c80b5c3fb99a19f8bdbdcbdaa24238446b273db9f9a | Alotor/ghoul-reader | rss.cljs | (ns ghoul.parser.rss
(:require [ghoul.parser.utils :as parse]
[tubax.core :refer [xml->clj]]
[clojure.zip :as zip]))
(defn parse-rss2-item
"Parse an RSS 2.0 item inside a channel"
[item]
(let [item-zipper (zip/xml-zip item)
item-elements (-> item-zipper zip/children)
g... | null | https://raw.githubusercontent.com/Alotor/ghoul-reader/ea0f2095e143bfd8a526905761f2cfd87324ad71/src/common/ghoul/parser/rss.cljs | clojure | (ns ghoul.parser.rss
(:require [ghoul.parser.utils :as parse]
[tubax.core :refer [xml->clj]]
[clojure.zip :as zip]))
(defn parse-rss2-item
"Parse an RSS 2.0 item inside a channel"
[item]
(let [item-zipper (zip/xml-zip item)
item-elements (-> item-zipper zip/children)
g... | |
d39a1a32c164683f481ab48e642b31aa080fcf6eb681ec2e472630c48be2cfcc | CompSciCabal/SMRTYPRTY | 2.61.rkt | #lang racket
(require test-engine/racket-tests)
(define (adjoin-set x set)
(cond ((or (empty? set) (< x (car set))) (cons x set))
(else (cons (car set) (adjoin-set x (cdr set))))))
(define (adjoin-set-iter x front set)
(cond ((or (empty? set) (< x (car set))) (append (reverse front) (cons x set)))
... | null | https://raw.githubusercontent.com/CompSciCabal/SMRTYPRTY/4a5550789c997c20fb7256b81469de1f1fce3514/sicp/v3/2.3/2.61.rkt | racket | Tests | #lang racket
(require test-engine/racket-tests)
(define (adjoin-set x set)
(cond ((or (empty? set) (< x (car set))) (cons x set))
(else (cons (car set) (adjoin-set x (cdr set))))))
(define (adjoin-set-iter x front set)
(cond ((or (empty? set) (< x (car set))) (append (reverse front) (cons x set)))
... |
ddf3f3c34dd885d136fee17b68d5557dd3e87a1d52a62aaee0c5f4bd6cddd128 | ocamllabs/ocaml-modular-implicits | t040-makeblock2.ml | type t = {
mutable a : int;
mutable b : int;
};;
{ a = 0; b = 0 };;
*
0 CONST0
1 PUSHCONST0
2 MAKEBLOCK2 0
4 ATOM0
5 SETGLOBAL T040 - makeblock2
7 STOP
*
0 CONST0
1 PUSHCONST0
2 MAKEBLOCK2 0
4 ATOM0
5 SETGLOBAL T040-make... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t040-makeblock2.ml | ocaml | type t = {
mutable a : int;
mutable b : int;
};;
{ a = 0; b = 0 };;
*
0 CONST0
1 PUSHCONST0
2 MAKEBLOCK2 0
4 ATOM0
5 SETGLOBAL T040 - makeblock2
7 STOP
*
0 CONST0
1 PUSHCONST0
2 MAKEBLOCK2 0
4 ATOM0
5 SETGLOBAL T040-make... | |
aac543048d5ed1d0fe0e9e7533e8a222827722e46516c98ad9ff661e659bbbcd | TyOverby/mono | zarith.ml | module Big_int_Z = Big_int_Z
module Q = Q
module Z = Z
| null | https://raw.githubusercontent.com/TyOverby/mono/94225736a93457d5c9aeed399c4ae1a08b239fd5/vendor/janestreet-bignum/bigint/src/zarith.ml | ocaml | module Big_int_Z = Big_int_Z
module Q = Q
module Z = Z
| |
ad1139c7331bba3fa318beb03ff2281df1b17755baaf902b71a556944d45df57 | ocaml-flambda/ocaml-jst | time_travel.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/5bf2820278c58f6715dcfaf6fa61e09a9b0d8db3/debugger/time_travel.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
OCaml port by and
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Int64ops
open Instruct
open Events
open Debugcom
o... |
30dfbb14c5e198e540ce7afb58aa54e48797bd5c2727054f8d85b1b82c5ee634 | REMath/mit_16.399 | program_To_Abstract_Syntax.ml | (* program_To_Abstract_Syntax.ml *)
open Lexing
open Abstract_Syntax
exception Syntax_Error
let abstract_syntax_of_program f =
let input_channel = if f = "" then stdin else open_in f in
try
let lexbuf = Lexing.from_channel input_channel in
(Parser.n_Prog Lexer.token lexbuf)
with... | null | https://raw.githubusercontent.com/REMath/mit_16.399/3f395d6a9dfa1ed232d307c3c542df3dbd5b614a/project/Generic-FW-REL-Abstract-Interpreter/program_To_Abstract_Syntax.ml | ocaml | program_To_Abstract_Syntax.ml | open Lexing
open Abstract_Syntax
exception Syntax_Error
let abstract_syntax_of_program f =
let input_channel = if f = "" then stdin else open_in f in
try
let lexbuf = Lexing.from_channel input_channel in
(Parser.n_Prog Lexer.token lexbuf)
with
| Failure s -> print_stri... |
ab30cf1808d31b56690fc5c1474c89323b9c0f00b67529c35d3b0fe8a6d7811e | Deep-Symmetry/beat-link-trigger | help.clj | (ns beat-link-trigger.help
"Serves the embedded copy of the user guide, and offers network
troubleshooting assistance."
(:require [clojure.string :as str]
[clojure.java.browse]
[compojure.route :as route]
[compojure.core :as compojure]
[ring.util.response :as respon... | null | https://raw.githubusercontent.com/Deep-Symmetry/beat-link-trigger/f25a79b70d7da55b4feeca5690cf2c40e00a2dee/src/beat_link_trigger/help.clj | clojure | Once the server is started, holds a map where :port contains the
port number on which the server is listening, and :stop contains
the function that will shut it down.
We will just retry until we are out of ports. | (ns beat-link-trigger.help
"Serves the embedded copy of the user guide, and offers network
troubleshooting assistance."
(:require [clojure.string :as str]
[clojure.java.browse]
[compojure.route :as route]
[compojure.core :as compojure]
[ring.util.response :as respon... |
4de8636c0c5c44102157a72188c523e491343eba6148820ecafbb89cefe02bb7 | asivitz/Hickory | VAO.hs | # LANGUAGE FlexibleContexts , RecordWildCards #
module Hickory.Graphics.VAO
( VAOCache
, deleteVAOConfigs
, createIndexedVAO
, createDirectVAO
, VAO(..)
, VAOConfig(..)
, glenumForDrawType
, VertexGroup(..)
, Attachment(..)
, drawElements
) where
import qualified Data.HashMap.Strict as Map
impor... | null | https://raw.githubusercontent.com/asivitz/Hickory/3a326591d2c5568a7e0bb6f05fdac6798a2c754e/core/Hickory/Graphics/VAO.hs | haskell | # LANGUAGE FlexibleContexts , RecordWildCards #
module Hickory.Graphics.VAO
( VAOCache
, deleteVAOConfigs
, createIndexedVAO
, createDirectVAO
, VAO(..)
, VAOConfig(..)
, glenumForDrawType
, VertexGroup(..)
, Attachment(..)
, drawElements
) where
import qualified Data.HashMap.Strict as Map
impor... | |
9f57eae73687220d042f9006ec9d0718f68fd3b897b44c0ed1ed768b9afcedd9 | xapi-project/xen-api | plugin.ml | open Rpc
open Idl
open Common
(** Properties of this implementation. *)
type query_result = {
* Plugin name , used in the XenAPI as SR.type .
; name: string [@key "name"] (** Short name. *)
; description: string [@key "description"] (** Description. *)
; vendor: string
(** Entity (e.g. company, project... | null | https://raw.githubusercontent.com/xapi-project/xen-api/1e1165f330c30ee6cb8e8f325af9fdd07474ca24/ocaml/xapi-storage/generator/lib/plugin.ml | ocaml | * Properties of this implementation.
* Short name.
* Description.
* Entity (e.g. company, project, group) which produced this
implementation.
* Copyright.
* Version.
* Minimum required API version.
* Features supported by this plugin.
* Key/description pairs describing required device_config parameters. | open Rpc
open Idl
open Common
type query_result = {
* Plugin name , used in the XenAPI as SR.type .
; vendor: string
; configuration: (string * string) list
; required_cluster_stack: string list
* The plugin requires one of these cluster stacks to be active .
}
[@@deriving rpcty]
type srs = string list [@@deriv... |
cd5cb010711249c20cb7cef96802e8e1d87536371d770b21833da6796c2642c2 | dcy/epush | epush_statistics.erl | -module(epush_statistics).
-behaviour(gen_server).
%% API
-export([start_link/0, update/0]).
%% gen_server callbacks
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
-define(SERVER, ?MODULE).
-record(state, {count=0, start}).
-... | null | https://raw.githubusercontent.com/dcy/epush/cbd59fd769e86d4f600e06ff31926f1e9c2602cf/src/epush_statistics.erl | erlang | API
gen_server callbacks
===================================================================
API
===================================================================
--------------------------------------------------------------------
@doc
Starts the server
@end
---------------------------------------------------... | -module(epush_statistics).
-behaviour(gen_server).
-export([start_link/0, update/0]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
-define(SERVER, ?MODULE).
-record(state, {count=0, start}).
-include_lib("eutil/include/euti... |
5d702c008f084f623cd0d0b68787b795130fe37aea02e8e1ba00f3d0eb2cbdd6 | csabahruska/jhc-components | StandardRules.hs | module DerivingDrift.StandardRules (standardRules,driftResolvedNames) where
import DerivingDrift.RuleUtils
import Name.Prim
import Name.Name hiding (isOpLike)
import qualified Data.Map as Map
standardRules :: Map.Map Name.Name.Name (Data -> Doc)
standardRules = Map.fromList [
(class_Eq,eqfn),
(class_Ord,ordfn... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-frontend/src/DerivingDrift/StandardRules.hs | haskell | this list is to be feeded to the renamer in the
renaming phase of the derived instances
short for qualified and unqualified
----------------------------------------------------------------------------
Eq
--------------------------------------------------------------------
Ord
--------------------------------------... | module DerivingDrift.StandardRules (standardRules,driftResolvedNames) where
import DerivingDrift.RuleUtils
import Name.Prim
import Name.Name hiding (isOpLike)
import qualified Data.Map as Map
standardRules :: Map.Map Name.Name.Name (Data -> Doc)
standardRules = Map.fromList [
(class_Eq,eqfn),
(class_Ord,ordfn... |
90c3ed5b4087abb3c7fc358cfdae75498571b855625e6d22b36a16d170c3294b | liebke/avout | locks.clj | (ns avout.sdb.locks
(:use avout.core
avout.sdb.atom)
(:import (java.util.concurrent.locks Lock)
(java.util UUID)))
(deftype SDBLock [client domain-name name locked flag]
Lock
(lock [this]
(throw (UnsupportedOperationException.)))
(tryLock [this]
(if @locked
true
(rese... | null | https://raw.githubusercontent.com/liebke/avout/06f3e00d63f487ebd01581343302e96b915f5b03/plugins/avout-sdb/src/avout/sdb/locks.clj | clojure | LEASED LOCK | (ns avout.sdb.locks
(:use avout.core
avout.sdb.atom)
(:import (java.util.concurrent.locks Lock)
(java.util UUID)))
(deftype SDBLock [client domain-name name locked flag]
Lock
(lock [this]
(throw (UnsupportedOperationException.)))
(tryLock [this]
(if @locked
true
(rese... |
fa257dba64f71e62cd25260309a79195c9cff488453bc82833243603bb8cbf38 | seckcoder/course-compiler | s3_4.rkt | (define (sum [x : Integer]) : Integer
(if (eq? x 1) 1 (+ x (sum (+ x (- 1))))))
(if (eq? (sum 3) 6)
42
777)
| null | https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/s3_4.rkt | racket | (define (sum [x : Integer]) : Integer
(if (eq? x 1) 1 (+ x (sum (+ x (- 1))))))
(if (eq? (sum 3) 6)
42
777)
| |
19de643697f3bdf8af16e602d08e44ad20e1e3014c2a6ef93dc716884d733b61 | getong/getong_code_snippet | tuple_size_and_length.erl | -module(tuple_size_and_length).
%% API
-export([
start/0,
tuple/0,
list/0
]).
%%%===================================================================
%%% API
%%%===================================================================
start() ->
{_, R1} = process_info(self(), reductions),
A = timer:tc(?MODULE,... | null | https://raw.githubusercontent.com/getong/getong_code_snippet/cd740c1b56f7f30920d705c5470faf540fd00a31/erlang_code/tuple_size_and_length/tuple_size_and_length.erl | erlang | API
===================================================================
API
===================================================================
--------------------------------------------------------------------
@doc
@end
--------------------------------------------------------------------
========================... | -module(tuple_size_and_length).
-export([
start/0,
tuple/0,
list/0
]).
start() ->
{_, R1} = process_info(self(), reductions),
A = timer:tc(?MODULE, tuple, []),
{_, R2} = process_info(self(), reductions),
B = timer:tc(?MODULE, list, []),
{_, R3} = process_info(self(), reductions),
io:format("A:~p, ... |
f1540002ad09b6015d0147e647b89180b688bc31a670911ffd70a880434cfa50 | zkry/tessellation | example1.rkt | #lang racket
(require "tessellation.rkt")
(define g
(generate-grid
(circle 1)
(curve (pt -1 1) .. (pt 1 -1))
(curve (pt -1 -1) .. (pt 1 1))
(curve (pt -1 -1) .. (pt -1 1))
(curve (pt -1 1) .. (pt 1 1))
(curve (pt 1 1) .. (pt 1 -1))
(curve (pt -1 -1) .. (pt 1 -1))
(rotate90 (hmirror (vmirror (cu... | null | https://raw.githubusercontent.com/zkry/tessellation/6f881912eb35592f96539485e7bdd62bdc329528/example1.rkt | racket | The stars around the center.
The center star.
The background.
The lower, dark wire frame.
The golden frame on top. | #lang racket
(require "tessellation.rkt")
(define g
(generate-grid
(circle 1)
(curve (pt -1 1) .. (pt 1 -1))
(curve (pt -1 -1) .. (pt 1 1))
(curve (pt -1 -1) .. (pt -1 1))
(curve (pt -1 1) .. (pt 1 1))
(curve (pt 1 1) .. (pt 1 -1))
(curve (pt -1 -1) .. (pt 1 -1))
(rotate90 (hmirror (vmirror (cu... |
c318e4519de6d9d82b9e53014d76b046fc27bbc63934eca5f18a5b9cd8dbb44f | Novus-School/novus | responses.clj | (ns novus.responses
(:require [spec-tools.data-spec :as ds]))
(def base-url "")
(def step
{:step/step-id string?
:step/sort int?
:step/description string?
:step/recipe-id string?})
(def ingredient
{:ingredient/ingredient-id string?
:ingredient/sort int?
:ingredient/name string?
:ingredient/am... | null | https://raw.githubusercontent.com/Novus-School/novus/c65b37a654173df52084253651edc87033409f4b/novus/src/main/novus/responses.clj | clojure | (ns novus.responses
(:require [spec-tools.data-spec :as ds]))
(def base-url "")
(def step
{:step/step-id string?
:step/sort int?
:step/description string?
:step/recipe-id string?})
(def ingredient
{:ingredient/ingredient-id string?
:ingredient/sort int?
:ingredient/name string?
:ingredient/am... | |
f907f7d1c5b1bd030862afbcb3f699d51b0950a20d7d13b1710a1b4bbd5226be | bgusach/exercises-htdp2e | ex-109.rkt | #lang htdp/bsl
(require 2htdp/image)
(require 2htdp/universe)
(require test-engine/racket-tests)
; CONSTANTS
(define BACKGROUND-WIDTH 300)
(define BACKGROUND-HEIGHT 200)
(define BACKGROUND (empty-scene BACKGROUND-WIDTH BACKGROUND-HEIGHT))
; DATA DEFINITIONS
Status is one of
; - "accept-a"
; - "accept-b-c-d"
; - ... | null | https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/ex-109.rkt | racket | CONSTANTS
DATA DEFINITIONS
- "accept-a"
- "accept-b-c-d"
- "finished"
- "error"
FUNCTIONS
Status -> Image
Colour -> Image
handles the key events | #lang htdp/bsl
(require 2htdp/image)
(require 2htdp/universe)
(require test-engine/racket-tests)
(define BACKGROUND-WIDTH 300)
(define BACKGROUND-HEIGHT 200)
(define BACKGROUND (empty-scene BACKGROUND-WIDTH BACKGROUND-HEIGHT))
Status is one of
(define (render-world ws)
(overlay
(cond
[(string=? ws... |
3ccda42958f6216d4b51137f4d299c5d55b5a3bfb70362f65f68ebe253777dc2 | gafiatulin/codewars | FilterCoffee.hs | Filter Coffee
-- /
module Codewars.G964.FilterCoffee where
import Data.List (intercalate, sort)
search :: Int -> [Int] -> String
search budget = intercalate "," . map show . sort . filter (<= budget)
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/FilterCoffee.hs | haskell | / | Filter Coffee
module Codewars.G964.FilterCoffee where
import Data.List (intercalate, sort)
search :: Int -> [Int] -> String
search budget = intercalate "," . map show . sort . filter (<= budget)
|
d9c450a3da7cd7c1731dfdee6226de4746175b36095615a4c2b1fdd2a0d7f3bd | GaloisInc/cryptol | TypePat.hs | -- See Note [-Wincomplete-uni-patterns and irrefutable patterns]
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
{-# LANGUAGE Safe #-}
module Cryptol.TypeCheck.TypePat
( aInf, aNat, aNat'
, anAdd, (|-|), aMul, (|^|), (|/|), (|%|)
, aMin, aMax
, aWidth
, aCeilDiv, aCeilMod
, aLenFromThenTo
, aLiteral
... | null | https://raw.githubusercontent.com/GaloisInc/cryptol/f8b55439467abe3e7427b80edc37ff95a13de62b/src/Cryptol/TypeCheck/TypePat.hs | haskell | See Note [-Wincomplete-uni-patterns and irrefutable patterns]
# LANGUAGE Safe #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
--... | # OPTIONS_GHC -Wno - incomplete - uni - patterns #
module Cryptol.TypeCheck.TypePat
( aInf, aNat, aNat'
, anAdd, (|-|), aMul, (|^|), (|/|), (|%|)
, aMin, aMax
, aWidth
, aCeilDiv, aCeilMod
, aLenFromThenTo
, aLiteral
, aLiteralLessThan
, aLogic
, aTVar
, aFreeTVar
, aBit
, aSeq
, aWord
... |
0b566a27f3475450ef8743eeb31c989169165046255372649612c2c92b0c6afb | Enecuum/Node | Internal.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DuplicateRecordFields #
# LANGUAGE RecordWildCards #
module Enecuum.Samples.Blockchain.Domain.Internal (signTransaction, transactionForSign, microblockForSign, signMicroblock) where
import Data.HGraph.StringHashable (StringHash (..))
import ... | null | https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/src/Enecuum/Samples/Blockchain/Domain/Internal.hs | haskell | # LANGUAGE DeriveAnyClass # | # LANGUAGE DuplicateRecordFields #
# LANGUAGE RecordWildCards #
module Enecuum.Samples.Blockchain.Domain.Internal (signTransaction, transactionForSign, microblockForSign, signMicroblock) where
import Data.HGraph.StringHashable (StringHash (..))
import Data.UUID
import En... |
815a79eb99ed92238ac94c0e6856e3892e024fe2bd714975a35cd3900bd34123 | softwarelanguageslab/maf | R5RS_various_inc-5.scm | ; Changes:
* removed : 0
* added : 1
* swaps : 0
; * negated predicates: 0
; * swapped branches: 0
; * calls to id fun: 0
(letrec ((inc (lambda (x)
(<change>
()
x)
(+ x 1))))
(inc (inc 2))) | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_various_inc-5.scm | scheme | Changes:
* negated predicates: 0
* swapped branches: 0
* calls to id fun: 0 | * removed : 0
* added : 1
* swaps : 0
(letrec ((inc (lambda (x)
(<change>
()
x)
(+ x 1))))
(inc (inc 2))) |
185c4c9873fd9d0ccf8981793a06506833c8e248b2d4e504e30c6425916bc660 | inhabitedtype/ocaml-session | session_postgresql_async.ml | ----------------------------------------------------------------------------
Copyright ( c ) 2015 Inhabited Type LLC .
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions
are met :
... | null | https://raw.githubusercontent.com/inhabitedtype/ocaml-session/6180413996e8c95bd78a9afa1431349a42c95588/backends/postgresql/async/session_postgresql_async.ml | ocaml | ----------------------------------------------------------------------------
Copyright ( c ) 2015 Inhabited Type LLC .
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions
are met :
... | |
24f4ff34acf6be40706e53b8cb251e4032d3c5951f4d7cd90a72c1933a43f0fa | skanev/playground | controller-text.scm | (define ec-registers '(exp env val proc argl continue unev))
(define ec-core
'(eval-dispatch
(test (op self-evaluating?) (reg exp))
(branch (label ev-self-eval))
(test (op variable?) (reg exp))
(branch (label ev-variable))
(test (op quoted?) (reg exp))
(branch (label ev-quoted))
... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/05/showcase/explicit/controller-text.scm | scheme | Evaluating simple expressions
Evaluating procedure applications
Procedure application
Sequence evaluation
Conditionals
Assignments and definitions | (define ec-registers '(exp env val proc argl continue unev))
(define ec-core
'(eval-dispatch
(test (op self-evaluating?) (reg exp))
(branch (label ev-self-eval))
(test (op variable?) (reg exp))
(branch (label ev-variable))
(test (op quoted?) (reg exp))
(branch (label ev-quoted))
... |
f8792b49116d2499bab7b370decc9c363758e2d168771d637de63db2ee5fc064 | shayan-najd/NativeMetaprogramming | T8912.hs | # LANGUAGE ImplicitParams #
module T8912 where
class C a where
toInt :: a -> Int
instance (?imp :: Int) => C [a] where
toInt _ = ?imp
test :: Int
test = let ?imp = 5 in toInt "Hello, world"
| null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_fail/T8912.hs | haskell | # LANGUAGE ImplicitParams #
module T8912 where
class C a where
toInt :: a -> Int
instance (?imp :: Int) => C [a] where
toInt _ = ?imp
test :: Int
test = let ?imp = 5 in toInt "Hello, world"
| |
cc6cf0a99eba0ae0395993d404307aef523885e44e2839711d541a28debbd956 | purescript/pursuit | TimeUtils.hs |
module TimeUtils
( module Data.Time.Clock
, module TimeUtils
) where
import Prelude
import Data.Time.Clock
oneDay :: NominalDiffTime
oneDay = oneHour * 24
oneHour :: NominalDiffTime
oneHour = 60 * 60
subUTCTime :: UTCTime -> NominalDiffTime -> UTCTime
subUTCTime x y = addUTCTime (negate y) x
getElapsedTimeS... | null | https://raw.githubusercontent.com/purescript/pursuit/12863d56e1aed35e19b8ddbf036d833ae3334072/src/TimeUtils.hs | haskell |
module TimeUtils
( module Data.Time.Clock
, module TimeUtils
) where
import Prelude
import Data.Time.Clock
oneDay :: NominalDiffTime
oneDay = oneHour * 24
oneHour :: NominalDiffTime
oneHour = 60 * 60
subUTCTime :: UTCTime -> NominalDiffTime -> UTCTime
subUTCTime x y = addUTCTime (negate y) x
getElapsedTimeS... | |
b8efbda081ece9a958e8c3672fcfd7882bd0f75ddb721350b0508b53184d9027 | c-cube/ocabot | ocabot.ml |
module C = Calculon
let all_ : C.Plugin.t list = [
C.Plugin_social.plugin;
C.Plugin_factoids.plugin;
C.Plugin_state.plugin;
C.Plugin_history.plugin ~n:100 ();
Hello.plugin;
]
let config = {
C.Config.default with
C.Config.
log_level = Logs.Info;
server = "irc.libera.chat";
port = 6697;
username ... | null | https://raw.githubusercontent.com/c-cube/ocabot/7ba85a79c1e809825b72e89cddd5cdbea7c93763/src/ocabot.ml | ocaml | update with CLI parameters |
module C = Calculon
let all_ : C.Plugin.t list = [
C.Plugin_social.plugin;
C.Plugin_factoids.plugin;
C.Plugin_state.plugin;
C.Plugin_history.plugin ~n:100 ();
Hello.plugin;
]
let config = {
C.Config.default with
C.Config.
log_level = Logs.Info;
server = "irc.libera.chat";
port = 6697;
username ... |
6fd027a088e85daeab22fc83632f0dea5022d770ccd3a111337e1f6d6ad1487d | ssor/erlangDemos | command_store.erl | -module(command_store).
-behaviour(gen_server).
-export([init/1,handle_call/3,handle_cast/2,handle_info/2,
terminate/2,code_change/3]).
-export([insert_command_list/1,
insert_command/2,
get_command_list/2,
insert/2 ,
% delete/1,
% lookup/1,
to_list/0,
start_link/0]).
-define(TABLE_ID, ?MODULE).... | null | https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/command_transfer/src/command_store.erl | erlang | delete/1,
lookup/1,
io:format("command_store init -> ~n"),
ITimeStamp = ,
Objects = to_list(),
io:format("Ets -> ~p~n", [Objects]),
lookup(Port) ->
[] -> {error, not_found}
end.
delete(Port) ->
ets:match_delete(?TABLE_ID, {Port, '_'}).
io:format("LeaseTime -> ~p~n", [LeaseTime]),
io:format("Current... | -module(command_store).
-behaviour(gen_server).
-export([init/1,handle_call/3,handle_cast/2,handle_info/2,
terminate/2,code_change/3]).
-export([insert_command_list/1,
insert_command/2,
get_command_list/2,
insert/2 ,
to_list/0,
start_link/0]).
-define(TABLE_ID, ?MODULE).
-record(command, {flag, binar... |
2cf51890d3e5b5832c29747623c4dbf04b319ce86d54c574d01a7919256149ce | CoNarrative/precept | data.clj | (ns fullstack.db.data
(:require [clojure.string :as string]
[precept.util :as util]))
(def data {:adjective ["Small" "Ergonomic" "Rustic" "Intelligent" "Gorgeous" "Incredible" "Fantastic"
"Practical" "Sleek" "Awesome" "Generic" "Handcrafted" "Handmade" "Licensed"
... | null | https://raw.githubusercontent.com/CoNarrative/precept/6078286cae641b924a2bffca4ecba19dcc304dde/examples/fullstack/src/clj/fullstack/db/data.clj | clojure | (ns fullstack.db.data
(:require [clojure.string :as string]
[precept.util :as util]))
(def data {:adjective ["Small" "Ergonomic" "Rustic" "Intelligent" "Gorgeous" "Incredible" "Fantastic"
"Practical" "Sleek" "Awesome" "Generic" "Handcrafted" "Handmade" "Licensed"
... | |
a986fca9736ccc1ba7ee7da26f0d39186e7bbad18deca2dc1ef55966280cd741 | videlalvaro/rabbitmq-websockets | rabbit_websockets_consumer.erl | -module(rabbit_websockets_consumer).
-behaviour(gen_server).
-include_lib("amqp_client/include/amqp_client.hrl").
-export([init/1, terminate/2, code_change/3, handle_call/3,
handle_cast/2, handle_info/2]).
-export([start/1]).
-export([stop/1]).
-record(state, {channel, reply_pid, consumer_tag}).
start(Opt... | null | https://raw.githubusercontent.com/videlalvaro/rabbitmq-websockets/04c2d7689c25e515c5b6022d48815a6a143bc96c/src/rabbit_websockets_consumer.erl | erlang | -module(rabbit_websockets_consumer).
-behaviour(gen_server).
-include_lib("amqp_client/include/amqp_client.hrl").
-export([init/1, terminate/2, code_change/3, handle_call/3,
handle_cast/2, handle_info/2]).
-export([start/1]).
-export([stop/1]).
-record(state, {channel, reply_pid, consumer_tag}).
start(Opt... | |
9d3ea81e14603d8d03814feb032d3088fd8c0180fb8da71968b4c26859df0490 | noahlz/cosla | open_per_day.clj | (ns cosla.reports.open-per-day
(:require [cosla.config :refer :all]
[cosla.core :refer :all]
[cosla.csv :refer :all]
[cosla.fetch :refer :all]
[cosla.time :refer :all]
[clojure.tools.logging :refer :all]
[clj-time.core :as time]
[clj-... | null | https://raw.githubusercontent.com/noahlz/cosla/bec25ab51b1482066d8ced379df3ac65abb00595/src/cosla/reports/open_per_day.clj | clojure |
Issues Open Per-Day Report | (ns cosla.reports.open-per-day
(:require [cosla.config :refer :all]
[cosla.core :refer :all]
[cosla.csv :refer :all]
[cosla.fetch :refer :all]
[cosla.time :refer :all]
[clojure.tools.logging :refer :all]
[clj-time.core :as time]
[clj-... |
4ea173810a563508a90e333933fef5a79cb0dcbbeb1c3f850bfff939d9cfc1f2 | mu-chaco/ReWire | Annotation.hs | # LANGUAGE Rank2Types , ScopedTypeVariables , GADTs , TypeOperators , TypeFamilies , DeriveDataTypeable , OverloadedStrings #
# LANGUAGE Trustworthy #
# OPTIONS_GHC -Wno - missing - methods #
module ReWire.Annotation
( Annote (..)
, Annotation (..)
, Annotated (..)
, toSrcSpanInfo
, SrcSpa... | null | https://raw.githubusercontent.com/mu-chaco/ReWire/b04686a4cd6cb36ca9976a4b6c42bc195ce69462/src/ReWire/Annotation.hs | haskell | | Using the default definition of gfoldl.
TODO(chathhorn): afraid of screwing stuff up if the annotation isn't
ignored.
Probably not ideal.
TODO(chathhorn): should implement this for real. | # LANGUAGE Rank2Types , ScopedTypeVariables , GADTs , TypeOperators , TypeFamilies , DeriveDataTypeable , OverloadedStrings #
# LANGUAGE Trustworthy #
# OPTIONS_GHC -Wno - missing - methods #
module ReWire.Annotation
( Annote (..)
, Annotation (..)
, Annotated (..)
, toSrcSpanInfo
, SrcSpa... |
a1d6e10ab21221bdfc70a373a2cdabd461af6ab0484919972d2ec9458991fac2 | erszcz/learning | vr_SUITE.erl | -module(vr_SUITE).
-compile([export_all]).
-include_lib("eunit/include/eunit.hrl").
-include("myrec.hrl").
-define(eq(Expected, Actual), ?assertEqual(Expected, Actual)).
all() ->
[get_on_old_version,
get_on_latest_version,
upgrade_from_old_to_new].
%%
%% Tests
%%
get_on_old_version(_Config) ->
give... | null | https://raw.githubusercontent.com/erszcz/learning/b21c58a09598e2aa5fa8a6909a80c81dc6be1601/erlang-versioned-records/test/vr_SUITE.erl | erlang |
Tests
when accessing an undefined field, it's missing
when accessing an undefined field, it's missing | -module(vr_SUITE).
-compile([export_all]).
-include_lib("eunit/include/eunit.hrl").
-include("myrec.hrl").
-define(eq(Expected, Actual), ?assertEqual(Expected, Actual)).
all() ->
[get_on_old_version,
get_on_latest_version,
upgrade_from_old_to_new].
get_on_old_version(_Config) ->
given record versio... |
37a606bbaea9a959e8520e4c66676dc237bd2a011eaa0a8c68655f2dcfd0f3ee | Kakadu/fp2022 | interpret.ml | * Copyright 2021 - 2022 , Kakadu and contributors
* SPDX - License - Identifier : LGPL-3.0 - or - later
open Utils
type var_type =
| Local
| Class
let get_var_type name = if String.starts_with ~prefix:"@" name then Class else Local
module type MONAD = sig
type 'a t
val return : 'a -> 'a t
val ( >>= ) : ... | null | https://raw.githubusercontent.com/Kakadu/fp2022/a422d5bccf99ae11141672022178e89e1d7d1381/Ruby/lib/interpret.ml | ocaml | Lambda will inherit current local state
Discard function state entirely
Discard lambda state entirely
Methods always work with empty local state
Return value with the same class state
Accounting for yield sugar
Accounting for yield sugar
Adding class scope
Popping class scope
Changes from class variables ... | * Copyright 2021 - 2022 , Kakadu and contributors
* SPDX - License - Identifier : LGPL-3.0 - or - later
open Utils
type var_type =
| Local
| Class
let get_var_type name = if String.starts_with ~prefix:"@" name then Class else Local
module type MONAD = sig
type 'a t
val return : 'a -> 'a t
val ( >>= ) : ... |
ce039e2831c62eb4edeb8893e4080b4113974489f53d0f8591223c9e98e1fe5e | VisionsGlobalEmpowerment/webchange | views_form_description.cljs | (ns webchange.editor-v2.question.question-form.views-form-description
(:require
[reagent.core :as r]
[webchange.editor-v2.question.text.views-text-animation-editor :as text-animation]
[webchange.editor-v2.translator.translator-form.common.views-text-field :refer [text-field]]
[cljs-react-material-ui.r... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/e5747e187937d85e9c92c728d52a704f323f00ef/src/cljs/webchange/editor_v2/question/question_form/views_form_description.cljs | clojure | (ns webchange.editor-v2.question.question-form.views-form-description
(:require
[reagent.core :as r]
[webchange.editor-v2.question.text.views-text-animation-editor :as text-animation]
[webchange.editor-v2.translator.translator-form.common.views-text-field :refer [text-field]]
[cljs-react-material-ui.r... | |
4c343b1a811e876efcf3b5ae84c9b97736325acca2318ff4d2f6a9258a9996e7 | jafingerhut/clojure-benchmarks | fannkuch.clj-8.clj | Author : ( )
Date : July , 2009
This version takes about 3/4 the time for the medium size run as
fannkuch.clj-6.clj . It uses mutable Java arrays of ints wherever
;; possible, in hopes of speeding it up. I was hoping that would
;; speed it up more than it did.
(ns fannkuch
(:gen-class)
;; (:use [cloj... | null | https://raw.githubusercontent.com/jafingerhut/clojure-benchmarks/474a8a4823727dd371f1baa9809517f9e0b508d4/fannkuch/fannkuch.clj-8.clj | clojure | possible, in hopes of speeding it up. I was hoping that would
speed it up more than it did.
(:use [clojure.contrib.combinatorics :only (lex-permutations)])
" next-counts " next-counts "::"))
TBD: There are several methods shown for copying an array on this
web page. Try several of them, to... | Author : ( )
Date : July , 2009
This version takes about 3/4 the time for the medium size run as
fannkuch.clj-6.clj . It uses mutable Java arrays of ints wherever
(ns fannkuch
(:gen-class)
)
(set! *warn-on-reflection* true)
(defn left-rotate
"Return a sequence that is the same as s, except that ... |
a7076f4df6a05777dffd5db69c223830761f0c8e4d160fe4594adfdb1324ea52 | kdltr/chicken-core | reexport-m4.scm | ;;; export syntax that refers to reexported syntax (reexport-test-2.scm)
(module
reexport-m4
(baz)
(import (scheme) (chicken base) (chicken module) (reexport-m3))
(reexport (reexport-m3))
(define-syntax baz
(ir-macro-transformer
(lambda (e i c)
`(foo)))))
| null | https://raw.githubusercontent.com/kdltr/chicken-core/b2e6c5243dd469064bec947cb3b49dafaa1514e5/tests/reexport-m4.scm | scheme | export syntax that refers to reexported syntax (reexport-test-2.scm) | (module
reexport-m4
(baz)
(import (scheme) (chicken base) (chicken module) (reexport-m3))
(reexport (reexport-m3))
(define-syntax baz
(ir-macro-transformer
(lambda (e i c)
`(foo)))))
|
c18382bd58df5038de27b738f8cd6f9363cd3077666f25dcb69e7a2d7cd824bb | lambdamikel/DLMAPS | nrql-version.lisp | ;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: CL-USER -*-
(in-package :cl-user)
(ts::nrql-defun get-nrql-version ()
'1.9.1)
;;;
;;; TO DO:
;;;
( same - as $ ? x $ ? y ) - > reasoning ? ? ...
;;; forward checking (not (same-as $?x $?y)) ...
;;;
;;; (?x ?y (NOT equal)) -> to be implemented
( ? x ? y - r... | null | https://raw.githubusercontent.com/lambdamikel/DLMAPS/7f8dbb9432069d41e6a7d9c13dc5b25602ad35dc/src/query/nrql-version.lisp | lisp | -*- Mode: LISP; Syntax: Common-Lisp; Package: CL-USER -*-
TO DO:
forward checking (not (same-as $?x $?y)) ...
(?x ?y (NOT equal)) -> to be implemented
mlisp -> same-as fehlerhaft, casesensititve Symbole!
|
(in-package :cl-user)
(ts::nrql-defun get-nrql-version ()
'1.9.1)
( same - as $ ? x $ ? y ) - > reasoning ? ? ...
( ? x ? y - role ) - > Reasoning qbox etc . !
- AVL - Baeume als Index fuer data - substrate - Nodes mit numerischen Werten etc .
fehler in - queries-2 behoben - > abox - queries-3 -... |
f6b81b53d5a21e0d48171b94651dde72ee06ded57916772f37077e72b829f82b | zadean/basexerl | query_results_example.erl | -module(query_results_example).
-export([run/0]).
run() ->
{ok, Db} = basexerl:connect(),
{ok, Qid} = basexerl:query(Db,
[
"declare variable $name external; "
"'this is a string', "
"1.05, (:decimal:) "
"document { element root {"
... | null | https://raw.githubusercontent.com/zadean/basexerl/15ce1990eb334268eb0f615be0d55136d537c087/examples/query_results_example.erl | erlang | -module(query_results_example).
-export([run/0]).
run() ->
{ok, Db} = basexerl:connect(),
{ok, Qid} = basexerl:query(Db,
[
"declare variable $name external; "
"'this is a string', "
"1.05, (:decimal:) "
"document { element root {"
... | |
a83932fa5c01850e7771a0900a01c5da6041b50a2d45103372f868547a656d2b | josefs/Gradualizer | infer_enabled.erl | -module(infer_enabled).
-gradualizer(infer).
-export([f/0]).
f() ->
X = 1, Y = banana,
X + Y.
| null | https://raw.githubusercontent.com/josefs/Gradualizer/208f5816b0157f282212fc036ba7560f0822f9fc/test/should_fail/infer_enabled.erl | erlang | -module(infer_enabled).
-gradualizer(infer).
-export([f/0]).
f() ->
X = 1, Y = banana,
X + Y.
| |
5c1a014680f349b9511a352a2a5e4c006e6d1e03ddb16565a37556a06ccf791f | TGOlson/blockchain | Types.hs | module Data.Blockchain.Types
( module Data.Blockchain.Types.Blockchain
, module Data.Blockchain.Types.Block
, module Data.Blockchain.Types.BlockchainConfig
, module Data.Blockchain.Types.Difficulty
, module Data.Blockchain.Types.Hex
, module Data.Blockchain.Types.Transaction
) where
import ... | null | https://raw.githubusercontent.com/TGOlson/blockchain/da53ad888589b5a2f3fd2c53c33a399fefb48ab1/lib/Data/Blockchain/Types.hs | haskell | module Data.Blockchain.Types
( module Data.Blockchain.Types.Blockchain
, module Data.Blockchain.Types.Block
, module Data.Blockchain.Types.BlockchainConfig
, module Data.Blockchain.Types.Difficulty
, module Data.Blockchain.Types.Hex
, module Data.Blockchain.Types.Transaction
) where
import ... | |
4e88fc2f8ea7d1b50e914b46ee29f34582680cc5c866c7aba99fac29d8d9fd94 | processone/p1_utils | p1_time_compat.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2014 - 2015 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/processone/p1_utils/48c82bc5f58553c2665b1a2c66d8202e22adf7b7/src/p1_time_compat.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 2014 - 2015 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
If your code need to be able to execute on versions both
time API introduced in ERTS 7.0 and implement a fallba... |
e9912e0d2996b07393f800771e5c5263886772d1f08822361a12e7880f0bad21 | dktr0/estuary | Announcements.hs | {-# LANGUAGE OverloadedStrings #-}
module Estuary.Widgets.Announcements (splitPageWithAnnouncements) where
import Reflex hiding (Request,Response)
import Reflex.Dom hiding (Request,Response)
import Control.Monad.Fix (MonadFix)
import Data.Map
import qualified Data.Text as T
import Data.Time
import Estuary.Types.Lang... | null | https://raw.githubusercontent.com/dktr0/estuary/c08a4790533c983ba236468e0ae197df50f2109f/client/src/Estuary/Widgets/Announcements.hs | haskell | # LANGUAGE OverloadedStrings #
compiledAnnouncements contains "compiled-in" news and announcements, which are part
of the client and call attention to new features, changes, etc. These are
merged with dynamic announcements from the server to form the total displayed
news and announcements. |
module Estuary.Widgets.Announcements (splitPageWithAnnouncements) where
import Reflex hiding (Request,Response)
import Reflex.Dom hiding (Request,Response)
import Control.Monad.Fix (MonadFix)
import Data.Map
import qualified Data.Text as T
import Data.Time
import Estuary.Types.Language
import Estuary.Types.Translata... |
095c7cf753aedb7c9c83f43f5975072483eff1957b2accb108bed783532b8eab | rtoy/cmucl | ring.lisp | -*- Log : Hemlock . Log ; Package : Hemlock - Internals -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
(ext:file-comment
"$Header: src/h... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/hemlock/ring.lisp | lisp | Package : Hemlock - Internals -*-
**********************************************************************
**********************************************************************
This file defines a ring-buffer type and access functions.
The ring data structure:
The index after the last element.
The function... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
(ext:file-comment
"$Header: src/hemlock/ring.lisp $")
Written by
(in-package "HEMLOCK-INTERNALS")
(export '(ring ringp make-ring ring-push ring-pop ring-length ring-ref
... |
7182c775ab135c69f0437f850de5d42ab06d3064feaeddd30865b396e8a6c0bb | RolfRolles/PandemicML | IDA.ml | external get_screen_ea : unit -> int32 = "IDAOCaml_get_screen_ea"
external set_cmt : int32 -> string -> bool -> unit = "IDAOCaml_set_cmt"
external set_xterior_cmt : int32 -> string -> bool -> unit = "IDAOCaml_set_xterior_cmt"
external set_func_cmt : int32 -> string -> bool -> unit = "IDAOCaml_set_func_... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/IDA/IDA.ml | ocaml | external get_screen_ea : unit -> int32 = "IDAOCaml_get_screen_ea"
external set_cmt : int32 -> string -> bool -> unit = "IDAOCaml_set_cmt"
external set_xterior_cmt : int32 -> string -> bool -> unit = "IDAOCaml_set_xterior_cmt"
external set_func_cmt : int32 -> string -> bool -> unit = "IDAOCaml_set_func_... | |
2373ba20c2e2158024cab2f4254530583b0af3cac0a4daa3fc2d556d23238a18 | ghcjs/ghcjs-base | RegExp.hs | module JavaScript.RegExp
( module Data.JSString.RegExp
) where
import Data.JSString.RegExp
| null | https://raw.githubusercontent.com/ghcjs/ghcjs-base/18f31dec5d9eae1ef35ff8bbf163394942efd227/JavaScript/RegExp.hs | haskell | module JavaScript.RegExp
( module Data.JSString.RegExp
) where
import Data.JSString.RegExp
| |
4becd7e699ac13922e983823b5292b0de1c6dd4f239f69be00a3cdbf0f6683fa | Odie/gd-edit | dice.cljc | ;; -------------------------------------------------------------------
clj - fuzzy Sorensen - Dice Coefficient
;; -------------------------------------------------------------------
;;
;;
Author : ( Yomguithereal )
Version : 0.1
;; Explanation:
;; –Dice_coefficient
;;
(ns clj-fuzzy.dice
(:require cl... | null | https://raw.githubusercontent.com/Odie/gd-edit/abc91b6350ca0faa60e6b448cdfaddf056dafa04/src/clj_fuzzy/dice.cljc | clojure | -------------------------------------------------------------------
-------------------------------------------------------------------
Explanation:
–Dice_coefficient
Main functions | clj - fuzzy Sorensen - Dice Coefficient
Author : ( Yomguithereal )
Version : 0.1
(ns clj-fuzzy.dice
(:require clojure.string
clojure.set)
(:use [clj-fuzzy.helpers :only [bigrams]]))
Utilities
(defn- letter-pairs
[string]
(set (bigrams (-> (clojure.string/replace string #"\s+" "")
... |
03e32d3827e604546f666dcd841679ec07e094d4af141c6fce30f6ef90d18692 | KingoftheHomeless/in-other-words | Bracket.hs | # LANGUAGE CPP #
# OPTIONS_HADDOCK not - home #
module Control.Effect.Type.Bracket
( -- * Effects
Bracket(..)
, ExitCase(..)
-- * Threading utilities
, threadBracketViaClass
) where
import Control.Effect.Internal.Union
import Control.Effect.Internal.Utils
import Control.Effect.Internal.Reflection
import Con... | null | https://raw.githubusercontent.com/KingoftheHomeless/in-other-words/9c864c81beb4fdf71d363b6962db5c90275c57ef/src/Control/Effect/Type/Bracket.hs | haskell | * Effects
* Threading utilities
import qualified Control.Exception as X
| An effect for exception-safe acquisition and release of resources.
__'Bracket' is typically used as a primitive effect__.
If you define a 'Control.Effect.Carrier' that relies on a novel
non-trivial monad transformer @t@, then you need to ... | # LANGUAGE CPP #
# OPTIONS_HADDOCK not - home #
module Control.Effect.Type.Bracket
Bracket(..)
, ExitCase(..)
, threadBracketViaClass
) where
import Control.Effect.Internal.Union
import Control.Effect.Internal.Utils
import Control.Effect.Internal.Reflection
import Control.Effect.Internal.ViaAlg
import Control.M... |
d5751f84d2a58d2fcbadeb0e0e2c2fa93fb2d03002cec28903cf79e48b37f1a9 | pa-ba/compdata | Variables.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOper... | null | https://raw.githubusercontent.com/pa-ba/compdata/5783d0e11129097e045cabba61643114b154e3f2/src/Data/Comp/Multi/Variables.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
------------------------------------------------------------------------------
|
Module : Data.Comp.Multi.Variables
License : BSD3
... | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
Copyright : ( c ) 2011
Maintainer : < >
Portability : non - portable ( GHC Extensions )
data types , and scoped substitution . Capture - avoidance is /no... |
e921b655fea1196214a4d0fb8ac7ed7610b582d8d9ca3de67ff0432df2e0383e | grisp/rebar3_grisp | rebar3_grisp_package.erl | -module(rebar3_grisp_package).
% Callbacks
-export([init/1]).
-export([do/1]).
-export([format_error/1]).
-import(rebar3_grisp_util, [
debug/2,
info/1,
info/2,
console/1,
console/2,
warn/1,
warn/2,
abort/1,
abort/2
]).
%--- Macros --------------------------------------------------... | null | https://raw.githubusercontent.com/grisp/rebar3_grisp/f48f8c57947a8966359983cfd6bfcaeab300ce10/src/rebar3_grisp_package.erl | erlang | Callbacks
--- Macros --------------------------------------------------------------------
--- Callbacks -----------------------------------------------------------------
--- Internal ------------------------------------------------------------------ | -module(rebar3_grisp_package).
-export([init/1]).
-export([do/1]).
-export([format_error/1]).
-import(rebar3_grisp_util, [
debug/2,
info/1,
info/2,
console/1,
console/2,
warn/1,
warn/2,
abort/1,
abort/2
]).
-define(NAMESPACE, grisp).
-define(TASK, package).
-spec init(rebar_sta... |
5098233a2342f1daf7cdb2fd7293ece30186474398ab829b1cbfb907d4475a8c | INRIA/zelus | period.ml | (***********************************************************************)
(* *)
(* *)
(* Zelus, a synchronous language for hybrid systems *)
(* ... | null | https://raw.githubusercontent.com/INRIA/zelus/685428574b0f9100ad5a41bbaa416cd7a2506d5e/compiler/rewrite/period.ml | ocaml | *********************************************************************
Zelus, a synchronous language for hybrid systems
... | ( c ) 2020 Paris ( see the file )
Automatique . All rights reserved . This file is distributed under
the terms of the INRIA Non - Commercial License Agreement ( see the
and z = major & & ( time > = last h ) in
and z = major & & ( time > = last h )
and h = cpt * v2... |
d4f61c207a543ec3dedc87eba0251eba076eb6a55cb492aa146a85e4e0fae3bb | hiroshi-unno/coar | gib.ml |
let rec gib a b n =
if n=0 then a
else if n=1 then b
else gib a b ( n-1 ) + gib a b ( n-2 )
let main n =
assert ( gib 0 1 n > = 0 )
let rec gib a b n =
if n=0 then a
else if n=1 then b
else gib a b (n-1) + gib a b (n-2)
let main n =
assert (gib 0 1 n >= 0)
*)
let rec gib a b n =
if n=... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/benchmarks/OCaml/safety/tacas2015/gib.ml | ocaml |
let rec gib a b n =
if n=0 then a
else if n=1 then b
else gib a b ( n-1 ) + gib a b ( n-2 )
let main n =
assert ( gib 0 1 n > = 0 )
let rec gib a b n =
if n=0 then a
else if n=1 then b
else gib a b (n-1) + gib a b (n-2)
let main n =
assert (gib 0 1 n >= 0)
*)
let rec gib a b n =
if n=... | |
fabf8bf7a3b59ccd0b434516d9e3d3825a414ebcfdfc37ba99f32ddb5ee339fd | ocaml-ppx/ocamlformat | unclosed_class.ml | class c = object
| null | https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/9324ea439a77b4f3a31e9302b97ce1812cf8f17d/vendor/parser-recovery/test/expect/structure/unclosed_class.ml | ocaml | class c = object
| |
06d62de9299bcadba6f512b782e5bb38866c1de4f22e84aa417094014080d361 | ethercrow/opentelemetry-haskell | ZipkinExporter.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
module OpenTelemetry.ZipkinExporter where
protocol spec : -api/blob/master/zipkin2-api.yaml
import Control.Concurrent.Async
import Control.Concurrent.STM
import Control.Monad.IO.Class
import Data.Coerce
import qualified Data.HashMap.Strict as HM
im... | null | https://raw.githubusercontent.com/ethercrow/opentelemetry-haskell/33cb21735da555d4ef9c144a26f26bd1ca4a160a/opentelemetry-extra/src/OpenTelemetry/ZipkinExporter.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TypeApplications #
module OpenTelemetry.ZipkinExporter where
protocol spec : -api/blob/master/zipkin2-api.yaml
import Control.Concurrent.Async
import Control.Concurrent.STM
import Control.Monad.IO.Class
import Data.Coerce
import qualified Data.HashMap.Strict as HM
import Data.Scientific
import qualifi... |
7b76fd4939f505eefc51bd6e490ce35f0d7bf9e39e93497e299e184419c6ceaa | orbitz/ocaml-pastry | leaf_set.mli |
* The leaf set if the nodes that are closest to the current node by
* numeric value . It is an even number , suggested to contain 2^b or
* 2 * 2^b elements . Any time a new ndoe joins we determine if it
* is closer than one of the ones we if we are full or add it if we
* are not .
* The leaf set ... | null | https://raw.githubusercontent.com/orbitz/ocaml-pastry/9a31bf0328ae44b4130d729845119b5bf0413b36/lib/pastry/leaf_set.mli | ocaml |
* The leaf set if the nodes that are closest to the current node by
* numeric value . It is an even number , suggested to contain 2^b or
* 2 * 2^b elements . Any time a new ndoe joins we determine if it
* is closer than one of the ones we if we are full or add it if we
* are not .
* The leaf set ... | |
462c6af3c6f041d23bfcbe7c6be48ae3b7c3355aa09cae655a1955d9816880d9 | ditto/ditto | Cover.hs | module Ditto.Cover where
import Ditto.Syntax
import Ditto.Monad
import Ditto.Match
import Ditto.Whnf
import Ditto.Sub
import Ditto.Funify
import Ditto.Throw
import Data.List
import Data.Maybe
import Control.Monad.Except
----------------------------------------------------------------------
split :: Tel -> Name -> TCM... | null | https://raw.githubusercontent.com/ditto/ditto/f0d35271950216308f3f9bbcf701b176ece5ccd9/src/Ditto/Cover.hs | haskell | --------------------------------------------------------------------
--------------------------------------------------------------------
Γ₁, (x : A), Γ₂ → [Δ ⊢ δ']
--------------------------------------------------------------------
-------------------------------------------------------------... | module Ditto.Cover where
import Ditto.Syntax
import Ditto.Monad
import Ditto.Match
import Ditto.Whnf
import Ditto.Sub
import Ditto.Funify
import Ditto.Throw
import Data.List
import Data.Maybe
import Control.Monad.Except
split :: Tel -> Name -> TCM [(Tel, PSub)]
split _As x = splitVar _As1 x _A _As2
where (_As1, _A,... |
3c3f897eaca2a901d4bafcbb0e90aa0144cffdebdacb0bdd8ab27955ffb0f222 | hasktorch/ffi-experimental | StdArray.hs |
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
module ATen.Unmanaged.Type.StdArray where
import qualified Language.C.Inline.Cpp as C
impor... | null | https://raw.githubusercontent.com/hasktorch/ffi-experimental/54192297742221c4d50398586ba8d187451f9ee0/ffi/src/ATen/Unmanaged/Type/StdArray.hs | haskell | # LANGUAGE OverloadedStrings # |
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
module ATen.Unmanaged.Type.StdArray where
import qualified Language.C.Inline.Cpp as C
import qualified Language.C.Inline.Cpp.E... |
54543355017851ce7be05684e2958e3786b91785e52426eb05b403e022dfb5f7 | ralph-schleicher/rs-colors | generic-rgb.lisp | generic-rgb.lisp --- generic RGB color space .
Copyright ( C ) 2014
;; 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, th... | null | https://raw.githubusercontent.com/ralph-schleicher/rs-colors/0604867895fab0ea9b8a6bb0ac4a08d452c53c59/generic-rgb.lisp | lisp | 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.
* Redistributions in binary for... | generic-rgb.lisp --- generic RGB color space .
Copyright ( C ) 2014
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
COPYRIGHT HOLDER OR FOR ANY DIRECT , INDIRECT ,
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING ,
CAUSED AND ON ANY THEORY OF LIABILITY , W... |
24e38a20d489e9c028d996cc733f8b93bd43386ac983b08988563582336cc332 | input-output-hk/cardano-ledger-byron | CBOR.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Test.Cardano.Chain.Ssc.CBOR
( tests
)
where
import Cardano.Prelude
import Test.Cardano.Prelude
import Hedgehog (Group(..), Property)
import Cardano.Binary (dropBytes)
import Cardano.Chain.Ssc
( SscPayload(..)
, SscProof(..)
, dropCo... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger-byron/d309449e6c303a9f0dcc8dcf172df6f0b3195ed5/cardano-ledger/test/Test/Cardano/Chain/Ssc/CBOR.hs | haskell | # LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
Commitment
------------------------------------------------------------------------------
------------------------------------------------------------------------------
----------------------------------------... | # LANGUAGE TemplateHaskell #
module Test.Cardano.Chain.Ssc.CBOR
( tests
)
where
import Cardano.Prelude
import Test.Cardano.Prelude
import Hedgehog (Group(..), Property)
import Cardano.Binary (dropBytes)
import Cardano.Chain.Ssc
( SscPayload(..)
, SscProof(..)
, dropCommitment
, dropCommitmentsMap
,... |
6f940551476a056f61398ee3b6e6843cd62c2545a1f2dafb12ac9122726639ba | UBTECH-Walker/WalkerSimulationFor2020WAIC | _package_DigitalOutputCommand.lisp | (cl:in-package ubt_core_msgs-msg)
(cl:export '(NAME-VAL
NAME
VALUE-VAL
VALUE
)) | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_16.04_v1.2_20200616/walker_install/share/common-lisp/ros/ubt_core_msgs/msg/_package_DigitalOutputCommand.lisp | lisp | (cl:in-package ubt_core_msgs-msg)
(cl:export '(NAME-VAL
NAME
VALUE-VAL
VALUE
)) | |
f134c74b2666147f322ab371591c00ea9970ae05b01fe7ffb005f790d7fe3aa0 | phronmophobic/clj-media | raw.clj | (ns com.phronemophobic.clj-media.av.raw
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.pprint :refer [pprint]]
[clojure.edn :as edn]
[com.phronemophobic.clong.gen.jna :as gen]
[com.rpl.specter :as specter])
(:import
java.io.Pushbac... | null | https://raw.githubusercontent.com/phronmophobic/clj-media/cadac5275bad3c2d00b83ed9dfca8a681a86b987/src/com/phronemophobic/clj_media/av/raw.clj | clojure | to StructureByReference fields | (ns com.phronemophobic.clj-media.av.raw
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.pprint :refer [pprint]]
[clojure.edn :as edn]
[com.phronemophobic.clong.gen.jna :as gen]
[com.rpl.specter :as specter])
(:import
java.io.Pushbac... |
0eb8d83cbd055f5c24cfec7c556e0c478ea57d9606277c64abadd38a2aec6840 | OCamlPro/opam-bin | commandPush.ml | (**************************************************************************)
(* *)
Copyright 2020 OCamlPro & Origin Labs
(* *)
(* All rights ... | null | https://raw.githubusercontent.com/OCamlPro/opam-bin/322e46827280af0fdf6a24ac65893b67d3b9f269/src/opam_bin_lib/commandPush.ml | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2020 OCamlPro & Origin Labs
GNU Lesser General Public License version 2.1 , with the special
open Ez_opam_file.V1
open Ezcmd.TYPES
open EzConfig.OP
open Ez_file.V1
open EzFile.OP
module StringMap = EzCompat.StringMap
module OpamParserTypes = OpamParserTypes.Full... |
73d2f741898e2c73faf934b9a2bb014e41bfe4108063313531533fa30beba870 | iambrj/imin | interp-Cwhile-proxy-closure.rkt | #lang racket
(require "utilities.rkt")
(require "interp-Rwhile-proxy-closure.rkt")
(require "interp-Cvar.rkt")
(require "interp-Cif.rkt")
(require "interp-Cvec.rkt")
(require "interp-Cfun.rkt")
(require "interp-Clambda.rkt")
(require "interp-Cwhile.rkt")
(provide interp-Cwhile-proxy-closure)
(define Cwhile-class (inte... | null | https://raw.githubusercontent.com/iambrj/imin/baf9e829c2aa85b69a2e86bfba320969ddf05f95/interp-Cwhile-proxy-closure.rkt | racket | #lang racket
(require "utilities.rkt")
(require "interp-Rwhile-proxy-closure.rkt")
(require "interp-Cvar.rkt")
(require "interp-Cif.rkt")
(require "interp-Cvec.rkt")
(require "interp-Cfun.rkt")
(require "interp-Clambda.rkt")
(require "interp-Cwhile.rkt")
(provide interp-Cwhile-proxy-closure)
(define Cwhile-class (inte... | |
08ac49b484fe201a9e753489bc70c826deb5260ca72fcacddecd728298ae6ebe | erlang/otp | standard_error_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2014 - 2023 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/kernel/test/standard_error_SUITE.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 2014 - 2023 . 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(standard_error_SUITE).
-export([all/0,suite/0]).
-export([badarg/1,getopts/1,output/1]).
suite() ->
[{... |
240821f1b590a2c100ba244ccf844124d86faa2924cb77e6ffcaa84553bf9997 | digital-asset/ghc | T14884.hs | module T14884 where
x :: IO ()
x = _ print "abc"
| null | https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_fail/T14884.hs | haskell | module T14884 where
x :: IO ()
x = _ print "abc"
| |
2e21c710643d340530dc6eba1cbb0a859d9fda0877914357d1fc8d906548952a | ocsigen/ocaml-eliom | toploop.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/toplevel/toploop.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Path
open Format
open Config
open Misc
open Parsetree
open Types
open Typedtree
open Outcometree
op... |
0744071e5a802ca627065671cee10d0bd1650faa86ae7af0736a4e6ad7584f54 | ocaml-gospel/gospel | tterm.ml | (**************************************************************************)
(* *)
GOSPEL -- A Specification Language for OCaml
(* *)
Copyright ( ... | null | https://raw.githubusercontent.com/ocaml-gospel/gospel/281c169588ae8b282ec2805ea7619196b10b3a78/src/tterm.ml | ocaml | ************************************************************************
(as described in file LICE... | GOSPEL -- A Specification Language for OCaml
Copyright ( c ) 2018- The VOCaL Project
This software is free software , distributed under the MIT license
open Ppxlib
open Ttypes
open Symbols
module Ident = Identifier.Ident
type pattern = {
p_nod... |
8e993b825d03c55a12bacc17438e69b60f53ef17b1b3f00a0e5323b25fefb451 | lamdu/lamdu | TagView.hs | -- | Tag Views
module Lamdu.GUI.TagView
( make
) where
import qualified GUI.Momentu as M
import qualified Lamdu.GUI.NameView as NameView
import qualified Lamdu.GUI.WidgetIds as WidgetIds
import Lamdu.Name (Name(..))
import qualified Lamdu.Sugar.Types as Sugar
import Lamdu.Prelude
make ::... | null | https://raw.githubusercontent.com/lamdu/lamdu/5b15688e53ccbf7448ff11134b3e51ed082c6b6c/src/Lamdu/GUI/TagView.hs | haskell | | Tag Views |
module Lamdu.GUI.TagView
( make
) where
import qualified GUI.Momentu as M
import qualified Lamdu.GUI.NameView as NameView
import qualified Lamdu.GUI.WidgetIds as WidgetIds
import Lamdu.Name (Name(..))
import qualified Lamdu.Sugar.Types as Sugar
import Lamdu.Prelude
make :: _ => Sugar.Tag... |
2d36ddb194b2092b25e2c18713ef156c5cba9a3a492e7fbf00089e8f2f8ce913 | janestreet/ocaml_plugin | config_02.ml | let x = "from config_02"
let job = Ocaml_plugin_sample.Dsl.make_v2 (Config_util.f x)
| null | https://raw.githubusercontent.com/janestreet/ocaml_plugin/02b912d4200b107f936528c065f8d017ec378d32/sample/config/config_02.ml | ocaml | let x = "from config_02"
let job = Ocaml_plugin_sample.Dsl.make_v2 (Config_util.f x)
| |
62639638665182fcf1b83d55b1bb402496273393a50bdb870e1702c5b141ed07 | andrejv/cl-simple-tk | notebook.lisp | ;;;
Copyright ( c ) 2015 < >
;;;
;;; 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, publis... | null | https://raw.githubusercontent.com/andrejv/cl-simple-tk/0ef565fedde588caa62148c2551be1520a955567/src/notebook.lisp | lisp |
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above copyright notice... | Copyright ( c ) 2015 < >
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
... |
2a5c24a462c67b7e8f8d99f9c24785b1822dd3ff2d2df0fd0fe1db21e482eb8b | mfoemmel/erlang-otp | megaco_flex_scanner.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2001 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/megaco/src/flex/megaco_flex_scanner.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2001 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
Purpose : Scanner for text encoded Megac... |
712f6fccc91268363a5cd16696cb39e82b6765378eb84c8aa2370074405d12cf | jeffshrager/biobike | lispscript-tests.lisp | ;;
Copyright ( c ) 2005 , Gigamonkeys Consulting All rights reserved .
;;
(in-package :com.gigamonkeys.foo.lispscript-tests)
(defparameter *to-trim* (list #\Space #\Newline))
(defun make-test (string)
(list string (string-trim *to-trim* (generate-from-string *lispscript* string))))
(defun testpage ()
(html
... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/ThirdParty/monkeylib/foo/lispscript-tests.lisp | lisp |
)))) | Copyright ( c ) 2005 , Gigamonkeys Consulting All rights reserved .
(in-package :com.gigamonkeys.foo.lispscript-tests)
(defparameter *to-trim* (list #\Space #\Newline))
(defun make-test (string)
(list string (string-trim *to-trim* (generate-from-string *lispscript* string))))
(defun testpage ()
(html
(:ht... |
42ef0a7733b52d5117b9335e1f93344d27c175d6db0f3e222d72da1fa094237d | c4-project/c4f | litmus_stats.ml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fir/src/litmus_stats.ml | ocaml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | |
7b42a56a74e8ddc5e94e2f0cc2d841e23a4d4d32b46ca86978362269d05ea53d | iamaleksey/seestar | seestar_messages.erl | Copyright 2014
%%%
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... | null | https://raw.githubusercontent.com/iamaleksey/seestar/b9148c56d91500d008928c03b7aa125fdf027926/src/seestar_messages.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2014
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@private
-module(seestar_messages).
-export([encode/1, decode/2]).
-include("constants.hrl").
-include("seestar_messages.hrl").
-define(STARTUP, 16#01).... |
0d89e8511d04050ef3446654aa2843529969fe706fed55d4b47c2da74506be0a | angavrilov/cl-linux-debug | tasks.lisp | ;;; -*- mode: Lisp; indent-tabs-mode: nil; -*-
(in-package :cl-linux-debug.test)
(defsuite* (test/tasks :in test) ())
(defparameter *scheduler* nil)
(def fixture scheduler
(let ((*scheduler* (make-instance 'cl-linux-debug::debug-task-scheduler :name "TEST")))
(-body-)))
(def test test/tasks/run-wait-exit ()
... | null | https://raw.githubusercontent.com/angavrilov/cl-linux-debug/879da2dcd14918bb8ffab003e934f4b01fba12ff/test/tasks.lisp | lisp | -*- mode: Lisp; indent-tabs-mode: nil; -*- |
(in-package :cl-linux-debug.test)
(defsuite* (test/tasks :in test) ())
(defparameter *scheduler* nil)
(def fixture scheduler
(let ((*scheduler* (make-instance 'cl-linux-debug::debug-task-scheduler :name "TEST")))
(-body-)))
(def test test/tasks/run-wait-exit ()
(with-fixture scheduler
(let* ((foo 0)
... |
d7bf4f2293b180b3aac9e96ebc855e69e308324dae7d2b7ccff3158d0024d659 | maranget/hevea | myStack.mli | (***********************************************************************)
(* *)
(* HEVEA *)
(* *)
, projet , INRIA R... | null | https://raw.githubusercontent.com/maranget/hevea/226eac8c506f82a600d453492fbc1b9784dd865f/myStack.mli | ocaml | *********************************************************************
HEVEA
... | , projet , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
$ I d : myStack.mli , v 1.2 2007 - 02 - 08 18:12:08 maranget Exp $
exception Fatal of string
type 'a t
val... |
1f9bcbb9afcbd05119d6a39192f9d453faa924aed7ff14230a57a463c32b9aaf | erlang/otp | leex.erl | Copyright ( c ) 2008,2009 . All rights reserved .
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions
%% are met:
%%
1 . Redistributions of source code must retain the above copyright
%% notice, this list of conditions and ... | null | https://raw.githubusercontent.com/erlang/otp/b0afc29474f9625aa0b466b6672e0bbcefd07535/lib/parsetools/src/leex.erl | erlang |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials pr... | Copyright ( c ) 2008,2009 . All rights reserved .
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
COPYRIGHT HOLDERS OR FOR ANY DIRECT , INDIRECT ,... |
369319c3b7a6fcef82bb37f44f996909a575f215ae9f1c61bb8b8ccb0676fb7a | melange-re/melange | ast_literal.ml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/melange-re/melange/b595c2647a285e8bb8b16f109d0ab0fbfa22afa3/jscomp/common/ast_literal.ml | ocaml | use *predef*
use *predef*
use *predef* | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... |
021cd2ad0798ca9ce155a2cf5cf0b8bb622bdcc83fb2c6bb7631e097506c4d99 | chaoxu/fancy-walks | 13.hs |
nums :: String -> [Integer]
nums = map read . words
problem_13 = take 10 . show . sum . nums
main = readFile "input/p13.txt" >>= putStrLn . problem_13
| null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/projecteuler.net/13.hs | haskell |
nums :: String -> [Integer]
nums = map read . words
problem_13 = take 10 . show . sum . nums
main = readFile "input/p13.txt" >>= putStrLn . problem_13
| |
b164458f89f430275761b61d83cf9afc8818d66558fe05cf409397cccd046701 | ekmett/succinct | Dictionary.hs | -----------------------------------------------------------------------------
-- |
Copyright : ( C ) 2013 - 15
-- License : BSD-style (see the file LICENSE)
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable
--
----------------------------------------------------------... | null | https://raw.githubusercontent.com/ekmett/succinct/7e884138c2e943f5ca08f56b58b409d08b870ab9/src/Succinct/Dictionary.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : non-portable
--------------------------------------------------------------------------- | Copyright : ( C ) 2013 - 15
Maintainer : < >
module Succinct.Dictionary
( module Succinct.Dictionary.Builder
, module Succinct.Dictionary.Class
, module Succinct.Dictionary.Partitioned
, module Succinct.Dictionary.Poppy
, module Succinct.Dictionary.RangeMin
, module Succinct.Dictionary.Ran... |
bea2afbc05f0c805a91b1cf76b544ce1d626b1442fd168324c93f2f90211524e | rm-hull/project-euler | combinatorics.clj | ;;; combinatorics.clj: efficient, functional algorithms for generating lazy
;;; sequences for common combinatorial functions.
by ( )
Last updated - October 24 , 2011
(comment
"
(combinations items n) - A lazy sequence of all the unique
ways of taking n different elements from items.
Example: (combinations [1... | null | https://raw.githubusercontent.com/rm-hull/project-euler/04e689e87a1844cfd83229bb4628051e3ac6a325/src/util/combinatorics.clj | clojure | combinatorics.clj: efficient, functional algorithms for generating lazy
sequences for common combinatorial functions. |
by ( )
Last updated - October 24 , 2011
(comment
"
(combinations items n) - A lazy sequence of all the unique
ways of taking n different elements from items.
Example: (combinations [1 2 3] 2) -> ((1 2) (1 3) (2 3))
(subsets items) - A lazy sequence of all the subsets of
items (but generalized to all sequenc... |
763e09e088a77945d56df32ccb8462e5c39a483faa080b8c72b6418caa6a7b4c | infinisil/aoc18 | Main.hs | # LANGUAGE LambdaCase #
module Main where
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Text (Text)
import qualified Data.Text.IO as TIO
import Data.Void
import Paths_aoc3
import Sy... | null | https://raw.githubusercontent.com/infinisil/aoc18/049fae7c7a6b636fd65d5d5c188a4f7dc7bf5063/aoc3/src/Main.hs | haskell | ===== | # LANGUAGE LambdaCase #
module Main where
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Text (Text)
import qualified Data.Text.IO as TIO
import Data.Void
import Paths_aoc3
import Sy... |
a3a67452387b0a72724124ff23363f878eb8b09ee2b33f6ec3d9a6ca1522771c | informatimago/lisp | garnet.lisp | -*- coding : utf-8 -*-
;;;;****************************************************************************
;;;;FILE: garnet.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; Loader for garnet.
;;;;
< PJB > < >
MODIFI... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/cl-loaders/garnet.lisp | lisp | ****************************************************************************
FILE: garnet.lisp
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
Loader for garnet.
LEGAL
This program is free software: you can redistribute it and/or modify
(at your option) any late... | -*- coding : utf-8 -*-
USER - INTERFACE :
< PJB > < >
MODIFICATIONS
2004 - 03 - 29 < PJB > Created .
AGPL3
Copyright 2004 - 2016
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
... |
8592123d1fb9e8feb4eaff107569c8de2b0856ac2939fc7d78371958f0045f93 | elsen-trading/pgstream | Connection.hs | # LANGUAGE RecordWildCards #
{-# LANGUAGE OverloadedStrings #-}
module Database.PostgreSQL.Stream.Connection (
PoolSettings(..),
ConnSettings(..),
defaultPoolSettings,
pgPool,
pgPoolSettings,
withPgConnection,
connect,
connect_alt,
) where
import Data.Monoid
import Data.Pool
import Control.Applicati... | null | https://raw.githubusercontent.com/elsen-trading/pgstream/4adc43d8211073a9669a698435ffd15ce6ce0875/src/Database/PostgreSQL/Stream/Connection.hs | haskell | # LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
----------------------------------------------------------------------------- | # LANGUAGE RecordWildCards #
module Database.PostgreSQL.Stream.Connection (
PoolSettings(..),
ConnSettings(..),
defaultPoolSettings,
pgPool,
pgPoolSettings,
withPgConnection,
connect,
connect_alt,
) where
import Data.Monoid
import Data.Pool
import Control.Applicative
import Data.Time.Clock (NominalD... |
39dac5709b30ad920ce623f62beb596a2b38ca2fe91b3a5ae064ffbf89638b98 | clingen-data-model/genegraph | action.clj | (ns genegraph.annotate.action
(:require [cheshire.core :as json]))
(defmulti add-action :genegraph.transform.core/format)
(defmethod add-action :default [event]
(assoc event :genegraph.annotate/action :publish))
(defmethod add-action :gci-legacy [event]
(let [report-json (json/parse-string (:genegraph.sink.eve... | null | https://raw.githubusercontent.com/clingen-data-model/genegraph/2d6fe0d9fcf7d5444fb968c5d3d1cc5ae68977bc/src/genegraph/annotate/action.clj | clojure | (ns genegraph.annotate.action
(:require [cheshire.core :as json]))
(defmulti add-action :genegraph.transform.core/format)
(defmethod add-action :default [event]
(assoc event :genegraph.annotate/action :publish))
(defmethod add-action :gci-legacy [event]
(let [report-json (json/parse-string (:genegraph.sink.eve... | |
4ad4af152e18b638e891361b2187b3c798f9739ba2773c02147e545b5f73086d | FundingCircle/ring-gatekeeper | redis_spec.clj | (ns ring-gatekeeper.cache.redis-spec
(:require [speclj.core :refer :all]
[taoensso.carmine :as car]
[ring-gatekeeper.cache.redis :as redis]
speclj.run.standard))
(defmacro wcar* [& body] `(car/wcar nil ~@body))
(defn- clear-keys []
(wcar* (doseq [test-key (wcar* (car/keys "test... | null | https://raw.githubusercontent.com/FundingCircle/ring-gatekeeper/e2f7426e2c622fd5ae0a5dc03be950739c774416/spec/ring_gatekeeper/cache/redis_spec.clj | clojure | (ns ring-gatekeeper.cache.redis-spec
(:require [speclj.core :refer :all]
[taoensso.carmine :as car]
[ring-gatekeeper.cache.redis :as redis]
speclj.run.standard))
(defmacro wcar* [& body] `(car/wcar nil ~@body))
(defn- clear-keys []
(wcar* (doseq [test-key (wcar* (car/keys "test... | |
14bdf4137851c31d2afe94bed432c47ed50837aa3f1ad886e3f35811c2b5dd50 | sdiehl/llvm-codegen | LLVM.hs | module LLVM (
module LLVM.General,
module LLVM.Codegen
) where
import LLVM.General
import LLVM.Codegen
| null | https://raw.githubusercontent.com/sdiehl/llvm-codegen/6a88ecb4bc5af53491e5013d6a61181a2eeb41df/src/LLVM.hs | haskell | module LLVM (
module LLVM.General,
module LLVM.Codegen
) where
import LLVM.General
import LLVM.Codegen
| |
edbe384fc3c895e197f0d1a899c2174cef90e370f11d2f4840e38c86c1e13cab | UnkindPartition/regex-applicative | StateQueue.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , ScopedTypeVariables #
module StateQueue where
import Test.Tasty
import Test.Tasty.SmallCheck
import Test.SmallCheck.Series
import Control.Applicative
import Text.Regex.Applicative.StateQueue as SQ
fromElems :: [(a, Maybe Int)] -> StateQueue a
fromElems = foldl f ... | null | https://raw.githubusercontent.com/UnkindPartition/regex-applicative/d964042db76d1212854e94b756382f252a3ff33c/tests/StateQueue.hs | haskell | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , ScopedTypeVariables #
module StateQueue where
import Test.Tasty
import Test.Tasty.SmallCheck
import Test.SmallCheck.Series
import Control.Applicative
import Text.Regex.Applicative.StateQueue as SQ
fromElems :: [(a, Maybe Int)] -> StateQueue a
fromElems = foldl f ... | |
f59343dcce24016ccfafd0ce11e81f1c57eb440f84ff9a925c56947060b2913d | reborg/parallel | bamap.clj | (ns bamap)
(require '[criterium.core :refer [quick-bench]])
(require '[parallel.core :as p] :reload)
1.9
0.4
0.6
18
4.9
5.9
80
20
18
201
44
58
;; demanding f
(defn pi [n] (->> (range) (filter odd?) (take n) (map / (cycle [1 -1])) (reduce +) (* 4.0)))
(def pis (shuffle (range 400 800)))
... | null | https://raw.githubusercontent.com/reborg/parallel/7fde6e48e49455f213c435239c35d31c60e08948/benchmarks/bamap.clj | clojure | demanding f
11901 | (ns bamap)
(require '[criterium.core :refer [quick-bench]])
(require '[parallel.core :as p] :reload)
1.9
0.4
0.6
18
4.9
5.9
80
20
18
201
44
58
(defn pi [n] (->> (range) (filter odd?) (take n) (map / (cycle [1 -1])) (reduce +) (* 4.0)))
(def pis (shuffle (range 400 800)))
12178
6991
|
571200c9640363deee9a6e4ddce3b0b883524e15055dcccafba12ca0cb6cf96d | gelisam/frp-zoo | GlossInterface.hs | module GlossInterface where
import Graphics.Gloss (Color, Display, Picture)
import qualified Graphics.Gloss.Interface.IO.Game as G
import Control.DysFRP
type InputEvent = G.Event
playDysFRP
:: Display
-> Color
-> Int
-> (Event Float -> Event InputEvent -> BehaviorGen Picture)
-> IO ()
playDysFRP display c... | null | https://raw.githubusercontent.com/gelisam/frp-zoo/1a1704e4294b17a1c6e4b417a73e61216bad2321/DysFRP-example/GlossInterface.hs | haskell | module GlossInterface where
import Graphics.Gloss (Color, Display, Picture)
import qualified Graphics.Gloss.Interface.IO.Game as G
import Control.DysFRP
type InputEvent = G.Event
playDysFRP
:: Display
-> Color
-> Int
-> (Event Float -> Event InputEvent -> BehaviorGen Picture)
-> IO ()
playDysFRP display c... | |
69643bbcc0834937d9cf37759135b80970fb48c30a4dbcfcf8b5e29b0ab1dc31 | argp/bap | syscall_id.mli | * Statically identify obvious use of system call numbers on AST CFGs .
Finds uses like [ mov $ 20 , % eax . ] that a compiler would
emit .
Assumes that [ % eax ] contains the system call number before the
system call is executed .
@author ejs
Finds uses like [mov $20, %eax. syse... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/syscall_id.mli | ocaml | * find_syscalls [cfg] returns a list of tuples [(bb, n)]. A tuple
[(bb, n)] in the output list denotes that {e all} executions
reaching [bb] perform system call [n].
The non-existance of a tuple [(bb, n)] does not imply that an
execution reaching [bb] will {e not} perform system call [n]; it
only m... | * Statically identify obvious use of system call numbers on AST CFGs .
Finds uses like [ mov $ 20 , % eax . ] that a compiler would
emit .
Assumes that [ % eax ] contains the system call number before the
system call is executed .
@author ejs
Finds uses like [mov $20, %eax. syse... |
d37aa1960a631dfb7c4dba831025b4ef4f446f991e6d5cc355df67de555744a5 | semmons99/clojure-euler | prob-008.clj | problem 008 input ; ; ; ; ; ; ; ; ; ;
(def prob-008-input "7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950445244523161731856403098711121722383113622298934... | null | https://raw.githubusercontent.com/semmons99/clojure-euler/3480bc313b9df7f282dadf6e0b48d96230f1bfc1/prob-008.clj | clojure | ; ; ; ; ; ; ; ; ;
; ; ; ; ; ; ; ; ; | (def prob-008-input "73167176531330624919225119674426574742355349194934969835203127745063262395783180169848018694788518438586156078911294949545950173795833195285320880551112540698747158523863050715693290963295227443043557668966489504452445231617318564030987111217223831136222989342338030813533627661428280644448664523874... |
bea7ba48472e66b5c1b2d685357056ba3f603fcc23fa651bfb3667d38d247793 | yzhs/ocamlllvm | compilenv.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/asmcomp/compilenv.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : compilenv.mli 10424 2010 - 05... |
ff3cf199024da9b8afa46f41c967fc10054184b03b020730983f6a4b50cedcdd | igorhvr/bedlam | bigloo.scm | (module niceguy
(include "constants.scm")
(include "world.scm")
(include "gamestate.scm")
(include "seen.scm")
(include "package.scm")
(include "bid.scm")
(include "io.scm")
(include "weights.scm")
(include "ai.scm")
(include "mainloop.scm")
(include "init.scm"))
(define (vo... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-contrib/icfp/bigloo.scm | scheme | (define call/cc call-with-current-continuation) | (module niceguy
(include "constants.scm")
(include "world.scm")
(include "gamestate.scm")
(include "seen.scm")
(include "package.scm")
(include "bid.scm")
(include "io.scm")
(include "weights.scm")
(include "ai.scm")
(include "mainloop.scm")
(include "init.scm"))
(define (vo... |
e534b337d346b163593f881ce67aa2212e13112b488f6443c8c1f2475c384a4b | lisp-mirror/clpm | source-registry.lisp | ;;;; clpm source-registry
;;;;
This software is part of CLPM . See README.org for more information . See
;;;; LICENSE for license information.
(uiop:define-package #:clpm-cli/commands/source-registry
(:use #:cl
#:alexandria
#:clpm-cli/common-args
#:clpm-cli/interface-defs)
(:impor... | null | https://raw.githubusercontent.com/lisp-mirror/clpm/ad9a704fcdd0df5ce30ead106706ab6cc5fb3e5b/cli/commands/source-registry.lisp | lisp | clpm source-registry
LICENSE for license information. | This software is part of CLPM . See README.org for more information . See
(uiop:define-package #:clpm-cli/commands/source-registry
(:use #:cl
#:alexandria
#:clpm-cli/common-args
#:clpm-cli/interface-defs)
(:import-from #:adopt)
(:import-from #:clpm))
(in-package #:clpm-cli/comm... |
2710c364870b0ea82deda8985f6234ddefcc951ed45d1488361415b982ab0021 | gedge-platform/gedge-platform | amqp_connection.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
%% @type close_reason(Type) = {shutdown, amqp_rea... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/amqp_client/src/amqp_connection.erl | erlang |
@type close_reason(Type) = {shutdown, amqp_reason(Type)}.
@type amqp_reason(Type) = {Type, Code, Text}
Code = non_neg_integer()
Text = binary().
@doc This module is responsible for maintaining a connection to an AMQP
broker and manages channels within the connection. This module is used to
open and c... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
Erlang monitors on the returned connection and channe... |
5a5065032f87a5e8df80480dc6c95a4ce85c9edb4053e3e04d33843055048313 | elaforge/karya | Random.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
module Util.Random where
import qualified System.Random.Shuffle as Shuffle
import qualified Util.Num as Num
-- | Shuffle a list by a list of random integers. The random list must be
-... | null | https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Util/Random.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| Shuffle a list by a list of random integers. The random list must be
at least as long as the list to shuffle.
Shuffle has a really complicated precondition and crashes if it doesn't
get it. | Copyright 2013
module Util.Random where
import qualified System.Random.Shuffle as Shuffle
import qualified Util.Num as Num
shuffle :: [a] -> [Int] -> [a]
shuffle xs = Shuffle.shuffle xs . mangle
where
mangle rs = [Num.restrict 0 (len+1-i) v | (i, v) <- zip [0..] (take len rs)]
len = length xs - 1
|
65a8908c0ac39edac327ede7ef8cd33841bee766aeda3150cd2e0f478584b391 | erlscripten/erlscripten | erlps_logger.erl | -module(erlps_logger).
-author("gorbak25").
%% API
-export([die/2, debug/1, debug/2, info/1, info/2]).
die(File, Reason) ->
io:format(user,
"\e[1;31m[ERROR]\e[1;37m While compiling\e[0m ~s\e[1;37m:\e[0m\n~s\n",
[File, iolist_to_binary(Reason)]),
error(die).
debug(Format) ->
d... | null | https://raw.githubusercontent.com/erlscripten/erlscripten/6b70be39dc51c21388dd7bae1eb46a0d306ecdcc/src/erlps_logger.erl | erlang | API | -module(erlps_logger).
-author("gorbak25").
-export([die/2, debug/1, debug/2, info/1, info/2]).
die(File, Reason) ->
io:format(user,
"\e[1;31m[ERROR]\e[1;37m While compiling\e[0m ~s\e[1;37m:\e[0m\n~s\n",
[File, iolist_to_binary(Reason)]),
error(die).
debug(Format) ->
debug(Fo... |
13e3a4569d40c5245bc02215cc23e907a737d54e69ae8cc22efaf8b296773ba0 | flipstone/orville | OrvilleState.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE RankNTypes #-}
module Orville.PostgreSQL.Internal.OrvilleState
( OrvilleState,
newOrvilleState,
resetOrvilleState,
orvilleConnectionPool,
orvilleConnectionState,
orvilleErrorDetailLevel,
orvilleTransactionCallback,
orvilleSqlCommenterAttributes,... | null | https://raw.githubusercontent.com/flipstone/orville/bf2b739286e3107397be81f76f33a3311af1034c/orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/OrvilleState.hs | haskell | # LANGUAGE RankNTypes #
| The monad operation to execute with the modified state
# OVERLAPS #
|
Describes an event in the lifecycle of a database transaction. You can use
'addTransactionCallBack' to register a callback to respond to these events.
The callback will be called after the even in question has been s... | # LANGUAGE FlexibleInstances #
module Orville.PostgreSQL.Internal.OrvilleState
( OrvilleState,
newOrvilleState,
resetOrvilleState,
orvilleConnectionPool,
orvilleConnectionState,
orvilleErrorDetailLevel,
orvilleTransactionCallback,
orvilleSqlCommenterAttributes,
addTransactionCallback,... |
d965adff1203ac7b05d4fa54cfa9ca8205bce2a83cb82b593fef0717c8a2fab3 | mhwombat/grid | Spec.hs | ------------------------------------------------------------------------
-- |
-- Module : Main
Copyright : ( c ) 2012 - 2022
-- License : BSD-style
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
-- QuickCheck tests.
--
-----------------------------------------------... | null | https://raw.githubusercontent.com/mhwombat/grid/b8c4a928733494f4a410127d6ae007857de921f9/test/Spec.hs | haskell | ----------------------------------------------------------------------
|
Module : Main
License : BSD-style
Maintainer :
Stability : experimental
Portability : portable
QuickCheck tests.
---------------------------------------------------------------------- | Copyright : ( c ) 2012 - 2022
import Math.Geometry.Grid.Hexagonal2QC (test)
import Math.Geometry.Grid.HexagonalQC (test)
import Math.Geometry.Grid.OctagonalQC (test)
import Math.Geometry.Grid.SquareQC (test)
import Math.Geometry.Grid.TriangularQC (test)
import Math.Geometry.GridMap.LazyQC (test)
imp... |
dea4a8c5288534546dd7d787aee30af6c303b064f96d1de8c255b66a131b440b | anan44/it-starts-with-clojure | project.clj | (defproject sum-em-up "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.10.0"]]
:main ^:skip-aot sum-em-up.core
:target-path "target/%s"
:profiles {:ub... | null | https://raw.githubusercontent.com/anan44/it-starts-with-clojure/4bceac53a4004dc799a7bd96809d08009251a530/projects/sum-em-up/project.clj | clojure | (defproject sum-em-up "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.10.0"]]
:main ^:skip-aot sum-em-up.core
:target-path "target/%s"
:profiles {:ub... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.