_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 |
|---|---|---|---|---|---|---|---|---|
8a29d5181313f893e5e0cccb536c40fde16bb1dc5e6af71937b81be902e10aef | EasyCrypt/easycrypt | ecTheory.ml | (* -------------------------------------------------------------------- *)
open EcUtils
open EcSymbols
open EcPath
open EcTypes
open EcDecl
open EcModules
(* -------------------------------------------------------------------- *)
module Sp = EcPath.Sp
(* ---------------------------------------------------------------... | null | https://raw.githubusercontent.com/EasyCrypt/easycrypt/f87695472e70c313ef2966e20979b1afcc2e543e/src/ecTheory.ml | ocaml | --------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
-----------------------------------... | open EcUtils
open EcSymbols
open EcPath
open EcTypes
open EcDecl
open EcModules
module Sp = EcPath.Sp
type import = { im_immediate : bool; im_atimport : bool; }
let import0 = { im_immediate = true; im_atimport = true; }
let noimport = { im_immediate = false; im_atimport = false; }
type theory = theory_item list
... |
28affd8d00a5a6928f766e627756600664b1c3b9e1491330369c6080361abc3e | Liqwid-Labs/plutus-extra | Set.hs | # LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans -Wno - missing - signatures #
module Suites.PlutusTx.Set (tests) where
--------------------------------------------------------------------------------
import Data.List (nub, sort)
import Prelude
--------------------------------------------------------------... | null | https://raw.githubusercontent.com/Liqwid-Labs/plutus-extra/7b47d92afbd8f0b2fcc21640b4c731ba93256fb6/plutus-extra/test/Suites/PlutusTx/Set.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Don... | # LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans -Wno - missing - signatures #
module Suites.PlutusTx.Set (tests) where
import Data.List (nub, sort)
import Prelude
import Test.QuickCheck
import Test.Tasty
import Test.Tasty.QuickCheck
import PlutusTx.IsData.Class (
FromData (fromBuiltinData),
ToData ... |
a81db138a764a46ec70c5c7df19bb3b76fc3b522aabd43341918d344dbfb888a | PascalLG/nubo-hs | Matching.hs | -----------------------------------------------------------------------------
Nubo Client Application
Copyright ( c ) 2017 ,
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
in the Software without... | null | https://raw.githubusercontent.com/PascalLG/nubo-hs/390212b73c31746f4ff03a3e341f92d657db0223/Client/src/Matching.hs | haskell | ---------------------------------------------------------------------------
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 ... | Nubo Client Application
Copyright ( c ) 2017 ,
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 ... |
b3d5e0f22d000df26a7571f9b42c89ec68c6003fddf26d22fa8e64cf5380b682 | duelinmarkers/clj-record | underscore_test.clj | (ns clj-record.underscore-test
(:require
[clj-record.test-model.thing-one :as thing-one]
[clj-record.test-model.thing-two :as thing-two])
(:use clojure.test
clj-record.test-helper))
(defdbtest nothing-blows-up
(let [t1-rec1 (thing-one/create {:name "foo"})
t2-rec1 (thing-two/create {:thi... | null | https://raw.githubusercontent.com/duelinmarkers/clj-record/2dd5b9a1fcb8828565acfdf9919330bf4b5dbfaa/test/clj_record/underscore_test.clj | clojure | (ns clj-record.underscore-test
(:require
[clj-record.test-model.thing-one :as thing-one]
[clj-record.test-model.thing-two :as thing-two])
(:use clojure.test
clj-record.test-helper))
(defdbtest nothing-blows-up
(let [t1-rec1 (thing-one/create {:name "foo"})
t2-rec1 (thing-two/create {:thi... | |
58e0df5a285bc1e76c2bd62a4a679d0373489ec37e45a81f3d2d82b2d1163530 | smallhadroncollider/taskell-2.0 | SerializedTaskSpec.hs | # LANGUAGE QuasiQuotes #
module Taskell.IO.MarkDown.Serializer.SerializedTaskSpec
( spec
) where
import RIO
import NeatInterpolation (text)
import Test.Hspec
import Taskell.IO.MarkDown.Serializer.Serialize (taskS)
import Taskell.IO.MarkDown.Types
-- was outputting too many newlines before tags
check1 :: S... | null | https://raw.githubusercontent.com/smallhadroncollider/taskell-2.0/ff7ee3960ab58abb787b1b92ec65fc699d8fedb8/test/Taskell/IO/MarkDown/Serializer/SerializedTaskSpec.hs | haskell | was outputting too many newlines before tags
not outputting newlines before next sub-task
tests | # LANGUAGE QuasiQuotes #
module Taskell.IO.MarkDown.Serializer.SerializedTaskSpec
( spec
) where
import RIO
import NeatInterpolation (text)
import Test.Hspec
import Taskell.IO.MarkDown.Serializer.Serialize (taskS)
import Taskell.IO.MarkDown.Types
check1 :: SerializedTask
check1 =
SerializedTask
... |
0693691c6c7e6c992e9cc16f2e5562fe0cd595b3ea4ebcedd12bf6c3c2f24c37 | rd--/hsc3 | pv_Morph.help.hs |
let o1 = pulse ar 180 (lfCub kr 1 0 * 0.1 + 0.3) * 0.2
o2 = varSaw ar 190 0 (lfCub kr 0.8 0 * 0.4 + 0.5) * 0.5
c1 = fft' (localBufId 'α' 2048 1) o1
c2 = fft' (localBufId 'β' 2048 1) o2
x = mouseX kr 0 1 Linear 0.2
h = X.pv_Morph c1 c2 x
in ifft' h * 0.5
| null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/pv_Morph.help.hs | haskell |
let o1 = pulse ar 180 (lfCub kr 1 0 * 0.1 + 0.3) * 0.2
o2 = varSaw ar 190 0 (lfCub kr 0.8 0 * 0.4 + 0.5) * 0.5
c1 = fft' (localBufId 'α' 2048 1) o1
c2 = fft' (localBufId 'β' 2048 1) o2
x = mouseX kr 0 1 Linear 0.2
h = X.pv_Morph c1 c2 x
in ifft' h * 0.5
| |
fd0d1db910b2e2ddbc575ad7f2b22a1ae1c6fcef9b7ec0b5ce7ef9f4fc23af05 | karamellpelle/grid | Modify.hs | grid is a game written in Haskell
Copyright ( C ) 2018
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your optio... | null | https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/Game/LevelPuzzleMode/Do/Grid/Modify.hs | haskell |
This file is part of grid.
grid is free software: you can redistribute it and/or modify
(at your option) any later version.
grid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GN... | grid is a game written in Haskell
Copyright ( C ) 2018
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
module Game.LevelPuzzleMode.Do.Grid.Modify
(
... |
9d510ddddcf18212310401f200eadca96234d3583643ace858aaf9d1fa16fbd9 | PDP-10/panda | carcdr.lsp |
;;; -*-LISP-*-
Purpose : to permit long names , like CADADADADDDR , to be easily
;;; macro-defined into appropriate sequences of CARs and CDRs.
;;; Use: (DEF-CARCDR CADADADADDDR CADADADDDDDR ... )
where the names must have at least 5 A / D 's .
;;; Produces a format internal to the compiler when b... | null | https://raw.githubusercontent.com/PDP-10/panda/522301975c062914ea3d630a1daefde261ddf590/files/maclisp/carcdr.lsp | lisp | -*-LISP-*-
macro-defined into appropriate sequences of CARs and CDRs.
Use: (DEF-CARCDR CADADADADDDR CADADADDDDDR ... )
Produces a format internal to the compiler when being expanded
for optimal compilation. For interpretation, produces a
LAMBDA form with a composition of initial carcdr functions
|
Purpose : to permit long names , like CADADADADDDR , to be easily
where the names must have at least 5 A / D 's .
of up to 4 deep , which should be ( already ) defined primitively .
(DEFMACRO DEF-CARCDR L
`(PROGN 'COMPILE
,@(mapcar '(lambda (x) `(DEFPROP ,x C*R MACRO)) l)))
... |
5b486f40317e781dd0142ddc40a93b6908bf7c1d459bc4aaea123cf94c0eddd0 | bobzhang/ocaml-book | first.ml | open Printf;
open Kaputt.Abbreviations ;
(* let _ = *)
(* let open Test in *)
(* add_enum_test *)
(* ~title:"int" *)
( Enum.int 1 5 )
(* (fun _ -> ()) *)
( Spec.always = = > Spec.never )
Test.add_simple_test
~title:"miscellaneous"
(fun () -> begin
Assert.is_true True;
Asse... | null | https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/code/kaputt/first.ml | ocaml | let _ =
let open Test in
add_enum_test
~title:"int"
(fun _ -> ()) | open Printf;
open Kaputt.Abbreviations ;
( Enum.int 1 5 )
( Spec.always = = > Spec.never )
Test.add_simple_test
~title:"miscellaneous"
(fun () -> begin
Assert.is_true True;
Assert.is_false False;
Assert.is_some (Some 3);
Assert.is_none None;
Assert.raises (fun () -> ... |
398f2fd969bea01ef69fa2667c1ace001863c4ce7cc5f06f91e0dd7e0d50ed8a | russelldb/rabl | rabl_amqp.erl | @author < >
( C ) 2017 ,
%%% @doc
a bridge between rabl and , so we can test more easily and
encaspulate anything that depends on the 3rd party amqp libs .
%%% @end
Created : 15 Jun 2017 by < >
-module(rabl_amqp).
-include_lib("amqp_client/include/amqp_client.hrl").
-compile(export_all).
-export... | null | https://raw.githubusercontent.com/russelldb/rabl/9aa140ef5ec09959393adba5a98321b6df8323e1/src/rabl_amqp.erl | erlang | @doc
@end
@doc parse the given `AMQPURI' into an opaque term that can be
passed back to `connection_start/1'
@doc connection_start:: start a rabbimq amqp connection, returns a
pid() or error.
@doc connection_close:: close a rabbitmq connection.
@doc open a channel on the given `Connection'
@doc closes a channe... | @author < >
( C ) 2017 ,
a bridge between rabl and , so we can test more easily and
encaspulate anything that depends on the 3rd party amqp libs .
Created : 15 Jun 2017 by < >
-module(rabl_amqp).
-include_lib("amqp_client/include/amqp_client.hrl").
-compile(export_all).
-export_type([amqp_connec... |
779f624d2aa2158824a6de5c95a5df14fcd51bd6b8255ad5e55ba23fdb56528d | vrom911/Rum | Util.hs | # LANGUAGE LambdaCase #
module Compiler.Rum.StackMachine.Util where
import Control.Monad.State ( State, get, gets, modify )
import qualified Data.HashMap.Strict as HM ( fromList, insert, lookup, empty )
import Data.Maybe ( fromMaybe )
import ... | null | https://raw.githubusercontent.com/vrom911/Rum/b060ff099cb0cb7c022b10902a7852d6c1ef1498/src/Compiler/Rum/StackMachine/Util.hs | haskell | ---------------
Environment --
---------------
-------------------
- Labels' stuff ---
------------------- | # LANGUAGE LambdaCase #
module Compiler.Rum.StackMachine.Util where
import Control.Monad.State ( State, get, gets, modify )
import qualified Data.HashMap.Strict as HM ( fromList, insert, lookup, empty )
import Data.Maybe ( fromMaybe )
import ... |
b5f635ea12b48ed7a1b76d6d3a16453bebe1532c34f044769b572e043bf18f54 | hakaru-dev/hakaru | Expect.hs | # LANGUAGE NoImplicitPrelude , DataKinds , TypeOperators #
module Tests.Expect where
import Prelude (($), (.))
import qualified Data.Text as Text
import Language.Hakaru.Syntax.ABT (ABT(..), TrivialABT)
import Language.Hakaru.Syntax.Variable (Variable(..))
import Language.Hakaru.Types.Sing
import Language.Hakaru... | null | https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/haskell/Tests/Expect.hs | haskell | | The main thing is that this should typecheck and not throw
[x * prob_ 1]@. We used to return that, but then we simplified
BUG: this seems to work fine for the old @Expect.hs@ but it loops
forever with the new @Expect2.hs@. This appears to be due to the
use of 'binder' in 'lam', since 'test1b' works fine...
bu... | # LANGUAGE NoImplicitPrelude , DataKinds , TypeOperators #
module Tests.Expect where
import Prelude (($), (.))
import qualified Data.Text as Text
import Language.Hakaru.Syntax.ABT (ABT(..), TrivialABT)
import Language.Hakaru.Syntax.Variable (Variable(..))
import Language.Hakaru.Types.Sing
import Language.Hakaru... |
e57ee310d1863378ecaef82b4c02c259cd56340a15100a4cef010db06e88c130 | andersfugmann/amqp-client | on_closed.ml | open Amqp_client_async
open Thread
Demonstrate how on_close can be used
let _ =
let _ =
Connection.connect ~id:"fugmann" ~heartbeat:10 "localhost" >>= fun connection ->
spawn (Connection.on_closed connection >>= fun () ->
Log.info "Connection closed";
return ());
Log.info "Conne... | null | https://raw.githubusercontent.com/andersfugmann/amqp-client/e6e92225b91742fa8777a02ad9b59a1dde45e752/examples/on_closed.ml | ocaml |
Connection.close connection >>= fun () ->
Log.info "Connection closed ";
| open Amqp_client_async
open Thread
Demonstrate how on_close can be used
let _ =
let _ =
Connection.connect ~id:"fugmann" ~heartbeat:10 "localhost" >>= fun connection ->
spawn (Connection.on_closed connection >>= fun () ->
Log.info "Connection closed";
return ());
Log.info "Conne... |
2cf9a67beaaa316db04acc989e2affeb509651166f7ed92eb841f5b123e74233 | darkling/lagra | isomorphism_SUITE.erl | %%% The following module is generated by the gen-parser-test-suite.sh script.
%%% Do not edit by hand.
-module(isomorphism_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([all/0]).
%% The test suite is generated from the test manifest file ct/isomorphism_SUITE_data/manifest.ttl
-export(['jena-iso_00'/1])... | null | https://raw.githubusercontent.com/darkling/lagra/6827ea20db86aeb4c139db45bd3133ffccfddb7d/ct/isomorphism_SUITE.erl | erlang | The following module is generated by the gen-parser-test-suite.sh script.
Do not edit by hand.
The test suite is generated from the test manifest file ct/isomorphism_SUITE_data/manifest.ttl |
-module(isomorphism_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([all/0]).
-export(['jena-iso_00'/1]).
-export(['jena-iso_01'/1]).
-export(['jena-iso_02'/1]).
-export(['jena-iso_03'/1]).
-export(['jena-iso_04'/1]).
-export(['jena-iso_05'/1]).
-export(['jena-iso_06'/1]).
-export(['jena-iso_07'/1]).
-ex... |
954f7c5487d2cd7d4d2b097c44e9ecf29107e62bcf99acb1b0cf532ec60b9177 | aria42/infer | lsh.clj | (ns infer.lsh
(:use [clojure.contrib.math :only (floor)])
(:use [clojure.set :only (union intersection difference)])
(:import [java.util Random])
(:use [infer.random-variate :only (random-normal)]))
(defn dot-product
[x y]
(apply + (map * x y)))
(defn permutation-dictionary
"Creates a map of values randomly... | null | https://raw.githubusercontent.com/aria42/infer/9849325a27770794b91415592a8706fd90777469/src/infer/lsh.clj | clojure | (ns infer.lsh
(:use [clojure.contrib.math :only (floor)])
(:use [clojure.set :only (union intersection difference)])
(:import [java.util Random])
(:use [infer.random-variate :only (random-normal)]))
(defn dot-product
[x y]
(apply + (map * x y)))
(defn permutation-dictionary
"Creates a map of values randomly... | |
2f93c71a24a691d72e969eca909511449eb2a58c11a8e4d05f2562d0a4861911 | camsaul/methodical | standard.clj | (ns methodical.impl.multifn.standard
"Standard Methodical MultiFn impl."
(:require
[clojure.core.protocols :as clojure.protocols]
[clojure.datafy :as datafy]
[methodical.impl.dispatcher.common :as dispatcher.common]
[methodical.interface :as i]
[methodical.util.describe :as describe]
[pretty.core ... | null | https://raw.githubusercontent.com/camsaul/methodical/274d0ef3435e1467d0d92d5186096233419d9aad/src/methodical/impl/multifn/standard.clj | clojure | "composite dispatch value" below just means a dispatch value consisting of multiple parts e.g. `[:x :y]` as opposed
to a single value like `:x`.
the result is the same as if we had
do not take preferences into account when calculating the effective dispatch value. Aux methods are applied
dominant over another base... | (ns methodical.impl.multifn.standard
"Standard Methodical MultiFn impl."
(:require
[clojure.core.protocols :as clojure.protocols]
[clojure.datafy :as datafy]
[methodical.impl.dispatcher.common :as dispatcher.common]
[methodical.interface :as i]
[methodical.util.describe :as describe]
[pretty.core ... |
59e4d2054deb4e06312a0a744bf1a267dc35c0cfcef16990c40f9bb927a000dc | SamB/coq | dn.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/tactics/dn.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i $Id$ i
Discrimination nets.
= (... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
type ('lbl,'tree) decompo... |
279a6c1b314f83de9b918b955165f363b361a54f896b31fcdc9744a98f34f6e4 | hiroshi-unno/coar | parser.ml | open Core
TODO
let get_position_string (lexbuf: Lexing.lexbuf) =
let pos = lexbuf.lex_curr_p in
Printf.sprintf "%d:%d"
pos.pos_lnum (pos.pos_cnum - pos.pos_bol + 1)
let parse_from_lexbuf lexbuf =
try
lexbuf
|> HESParser.toplevel HESLexer.main
|> typing
|> fun muclp -> Ok muclp
with
| ... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/muCLP/parser.ml | ocaml | open Core
TODO
let get_position_string (lexbuf: Lexing.lexbuf) =
let pos = lexbuf.lex_curr_p in
Printf.sprintf "%d:%d"
pos.pos_lnum (pos.pos_cnum - pos.pos_bol + 1)
let parse_from_lexbuf lexbuf =
try
lexbuf
|> HESParser.toplevel HESLexer.main
|> typing
|> fun muclp -> Ok muclp
with
| ... | |
1d20631650ffe63868747947f9132a37fe4a05c40f3e427f46cb58f65842011d | rgrinberg/humane-re | test1.ml | open OUnit2
module Str = Humane_re.Str
let quote s = "\"" ^ s ^ "\""
let printer strings = "[" ^ (String.concat " " (List.map quote strings)) ^ "]"
let test_split_simple _ =
let re = Str.regexp "_\\| " in
let str = "test_me one foo bar" in
let s = ["test"; "me"; "one"; "foo"; "bar"] in
let s' = Str.split re ... | null | https://raw.githubusercontent.com/rgrinberg/humane-re/60e3954c8e14cc8351debbd32a8c72a2c79e0bd6/lib_test/test1.ml | ocaml | open OUnit2
module Str = Humane_re.Str
let quote s = "\"" ^ s ^ "\""
let printer strings = "[" ^ (String.concat " " (List.map quote strings)) ^ "]"
let test_split_simple _ =
let re = Str.regexp "_\\| " in
let str = "test_me one foo bar" in
let s = ["test"; "me"; "one"; "foo"; "bar"] in
let s' = Str.split re ... | |
f5b8561effc113c22701a88f7d6567fe9a97bff71ba2c4f1dc489ed467736b00 | joehillen/craft | Types.hs | {-# LANGUAGE DeriveFunctor #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - orphans #
module Craft.Types
( module Craft.Types
, module Craft.Error
, module Craft.File.Mode
, module Path
)
where
import ... | null | https://raw.githubusercontent.com/joehillen/craft/de31caa7f86cceaab23dbef0f05208bb853cf73b/src/Craft/Types.hs | haskell | # LANGUAGE DeriveFunctor #
| Shortened aliases for Path types for convenience
| Try to get STDOUT from a process.
Note: This may or may not make sense.
Open to suggestions if any of this seems incorrect.
, _salt :: String | # LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - orphans #
module Craft.Types
( module Craft.Types
, module Craft.Error
, module Craft.File.Mode
, module Path
)
where
import Control.Lens
import Cont... |
2f0f0e4aeac60c1ef1062a09e87b549749e2045fdbd5730e164e299dc315650e | jbracker/supermonad | MTStdEnv.hs |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* H M T C *
* ... | null | https://raw.githubusercontent.com/jbracker/supermonad/2595396a225a65b1dce6ed9a1ce59960f392a55b/examples/monad/hmtc/original/MTStdEnv.hs | haskell | Re-exported
:: Env
[Types:] Boolean, Character, Integer
[Constants:]
* false, true : Boolean
[Functions (binary (infix) and unary (prefix/postfix) operators):]
_ ) , ( _ + + ) , ( _ -- ) : ( Ref Integer ) - > Integer
* (-_) : Integer -> Integer
(Integer, Integer) -> Boolean,
(Boolan, ... |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* H M T C *
* ... |
a89ca613b5115ea4e2f0f000eebb78d65d87af66f5211a547d26bc09f7a0398c | borodust/claw-legacy | type.lisp | (cl:in-package :claw.cffi.c)
(defun anonymous-p (entity)
(not (claw.spec:foreign-entity-name entity)))
(defun expand-constant (name value)
(let ((name (format-symbol (or (package-name (symbol-package name))
*package*) "+~A+" name)))
(export-symbol name)
`((defparameter ,... | null | https://raw.githubusercontent.com/borodust/claw-legacy/3cd4a96fca95eb9e8d5d069426694669f81b2250/src/cffi/c/generator/type.lisp | lisp | but if we get here through recursive definitions
and type is still not defined we need to put forward decls
register a visit | (cl:in-package :claw.cffi.c)
(defun anonymous-p (entity)
(not (claw.spec:foreign-entity-name entity)))
(defun expand-constant (name value)
(let ((name (format-symbol (or (package-name (symbol-package name))
*package*) "+~A+" name)))
(export-symbol name)
`((defparameter ,... |
5da1f54fda7af515b677ef55269adc507b2aa162ef2e269a9ca744f4642acade | kappamodeler/kappa | superargTk.ml | LablTK GUI for option selection .
Copyright ( C ) 2006
Light Version ( )
This LIGHT version does not require labltk
Copyright (C) Antoine Mine' 2006
Light Version (Jerome Feret)
This LIGHT version does not require labltk
*)
open Data_structures
open Superarg
exception E... | null | https://raw.githubusercontent.com/kappamodeler/kappa/de63d1857898b1fc3b7f112f1027768b851ce14d/complx_rep/lib/light/superargTk.ml | ocaml | MAIN
**** | LablTK GUI for option selection .
Copyright ( C ) 2006
Light Version ( )
This LIGHT version does not require labltk
Copyright (C) Antoine Mine' 2006
Light Version (Jerome Feret)
This LIGHT version does not require labltk
*)
open Data_structures
open Superarg
exception E... |
5521bc6dfa1036611fcfd9b6a35e8fab3831a0bb0e01003c984c2e6a0a35de3b | jeromesimeon/Galax | cs_code_selection_expr.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/code_selection/cs_code_selection_expr.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : cs_code_selection_expr.ml , v 1.72 2008/02/01 02:45:26 mff Exp $
open Error
open Xquery_common_ast
open Xquery_algebra_ast
open Xquery_physical_type_ast
open Xquery_algebra_ast_util
open Algebra_type
open Cs_util_coercion
open C... |
b7175db98037c2166083f797b8ffbbf0952ae5293a686bf79055aaa61aa0b81c | ocaml-sf/learn-ocaml-corpus | solution.ml | (* -- Part A -------------------------------------------------------------- *)
let words str =
let buf = Buffer.create 20 in
let res = ref [] in
let push () =
match Buffer.contents buf with
| "" -> ()
| word ->
Buffer.clear buf ;
res := word :: !res in
for i = 0 to String.length str... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/mooc/projects/markov/solution.ml | ocaml | -- Part A --------------------------------------------------------------
-- Part B --------------------------------------------------------------
-- Part C -------------------------------------------------------------- |
let words str =
let buf = Buffer.create 20 in
let res = ref [] in
let push () =
match Buffer.contents buf with
| "" -> ()
| word ->
Buffer.clear buf ;
res := word :: !res in
for i = 0 to String.length str - 1 do
match String.get str i with
| 'a' .. 'z' | 'A' .. 'Z' | '0' .. ... |
1f5e845258d76c9b0a2acabeec227abcc19b84bb4c48394f94397bcdc454a1c1 | dleslie/allegro-egg | color.scm | (cond-expand
(has-allegro-color
(register-feature! 'allegro-color)
(define color-addon-version (foreign-lambda unsigned-integer32 "al_get_allegro_color_version"))
(define hsv->rgb (foreign-primitive scheme-object ((float h) (float s) (float v)) "
float r, g, b;
al_color_hsv_to_rgb((float)h, (float)s, (float)... | null | https://raw.githubusercontent.com/dleslie/allegro-egg/0435fb891dda5c64e95aa9dedccddd31b17e27da/color.scm | scheme |
"))
"))
"))
"))
"))
")) | (cond-expand
(has-allegro-color
(register-feature! 'allegro-color)
(define color-addon-version (foreign-lambda unsigned-integer32 "al_get_allegro_color_version"))
(define hsv->rgb (foreign-primitive scheme-object ((float h) (float s) (float v)) "
"))
(define rgb->hsl (foreign-primitive scheme-object ((floa... |
3d7774f8be80815ce5aaea22d5b96b76684d7cef7ca9c5d9ec12a0eee1532216 | karimarttila/clojure | util.cljs | (ns worldstat.frontend.util
(:require [re-frame.core :as re-frame]
[cljs.pprint]
[reagent.core :as r]
[worldstat.frontend.log :as ws-log]
[worldstat.frontend.state :as ws-state]))
(defn vega-debug
"In development show the actions menu and log with debug level.
In ... | null | https://raw.githubusercontent.com/karimarttila/clojure/ee1261b9a8e6be92cb47aeb325f82a278f2c1ed3/statistics/worldstat/src/cljs/worldstat/frontend/util.cljs | clojure | Application wide properties. | (ns worldstat.frontend.util
(:require [re-frame.core :as re-frame]
[cljs.pprint]
[reagent.core :as r]
[worldstat.frontend.log :as ws-log]
[worldstat.frontend.state :as ws-state]))
(defn vega-debug
"In development show the actions menu and log with debug level.
In ... |
072ae491743bfb79145b643805b7bfd590ff842dce5139ec749bb8a94deeac9f | brendanhay/gogol | Get.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/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-tagmanager/gen/Gogol/TagManager/Accounts/Containers/Workspaces/Get.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Gets a Workspace.
/See:/ <-manager Tag Manager API Reference> for @tagmanager.accounts.containers.workspaces.get@.
* Resource
** Constructing a Request
| A resource alias for @tagmanager.accounts.containers.workspaces.get@ me... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
787beed9290b1df1ae4217886e3ec8b5507cddb525e241e28526c7560fa96e8d | retrogradeorbit/cloud-fighter | parallax.cljs | (ns cloud-fighter.parallax
(:require
[infinitelives.utils.math :as math]
[infinitelives.utils.vec2 :as vec2]
[infinitelives.utils.console :refer [log]]
[infinitelives.pixi.events :as e]
[infinitelives.pixi.sprite :as s]
[infinitelives.pixi.resources :as r]
[cloud-fighter.state :as state]
[cljs... | null | https://raw.githubusercontent.com/retrogradeorbit/cloud-fighter/4c4d30fc2d9b14ce4c73f3d252be519daaa09d51/src/cloud_fighter/parallax.cljs | clojure | (ns cloud-fighter.parallax
(:require
[infinitelives.utils.math :as math]
[infinitelives.utils.vec2 :as vec2]
[infinitelives.utils.console :refer [log]]
[infinitelives.pixi.events :as e]
[infinitelives.pixi.sprite :as s]
[infinitelives.pixi.resources :as r]
[cloud-fighter.state :as state]
[cljs... | |
76b755b3441aceb8019c6f586b7914c564e432839be047ed6628ad57e7734e28 | mikeflynn/gmail-clj | project.clj | (defproject gmail-clj "0.6.5"
:description "A simple Clojure library to interface with the GMail API (read: not imap)"
:url "-clj"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[http-kit "2.1.16"]
[cheshire "... | null | https://raw.githubusercontent.com/mikeflynn/gmail-clj/70b3fef5ef3518cc2623b22adc75c33ab89cb86b/project.clj | clojure | (defproject gmail-clj "0.6.5"
:description "A simple Clojure library to interface with the GMail API (read: not imap)"
:url "-clj"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[http-kit "2.1.16"]
[cheshire "... | |
ee21f699d1cae3ca1d642f637a5c91d4e2de1d2236799dab920f3052a4ba7aef | JAremko/spacetools | util.clj | (ns spacetools.spacedoc.node.util
"Helpers for writing specs and constructors for nodes."
(:require [clojure.core.reducers :as r]
[orchestra.core :refer [defn-spec]]))
;;;; Headline utils
(defn-spec headline? boolean?
"Return true if NODE is headline."
[x any?]
(= (:tag x) :headline))
(defn-s... | null | https://raw.githubusercontent.com/JAremko/spacetools/d047e99689918b5a4ad483022f35802b2015af5f/components/spacedoc/src/spacetools/spacedoc/node/util.clj | clojure | Headline utils | (ns spacetools.spacedoc.node.util
"Helpers for writing specs and constructors for nodes."
(:require [clojure.core.reducers :as r]
[orchestra.core :refer [defn-spec]]))
(defn-spec headline? boolean?
"Return true if NODE is headline."
[x any?]
(= (:tag x) :headline))
(defn-spec headline->depth ... |
b5ba9f2e3600ef14fc24c1421995893c361c3a5c2a40fdcafd5c06bdc9ea7ecf | NorfairKing/habitscipline | DB.hs | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamili... | null | https://raw.githubusercontent.com/NorfairKing/habitscipline/56637f324fbdf9c7983c2180fcdea89518e27500/habitscipline-client-data/src/Habitscipline/Client/Data/DB.hs | haskell | # LANGUAGE GADTs #
Not modifyable
Not modifyable
Not modifyable | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE Undecid... |
b1c98c9b799b5d1ea253be7fb70978752b078d69ea64f04cc7088cc6f924e7e7 | njordhov/clariform | parser.cljs | (ns clariform.ast.parser
(:require
[shadow.resource :as rc]
[instaparse.core :as insta
:refer-macros [defparser]]))
(def trailing-newline #(if (= \newline (last %)) % (str % \newline)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
TOKENS
(def tokens-grammar (rc/inline "../../c... | null | https://raw.githubusercontent.com/njordhov/clariform/d67ac911027ba98a956f526790823c74c98adccf/src/main/clariform/ast/parser.cljs | clojure |
STRICT PARSER
For the grammar, avoid using "ordered choice" in repetition
as it leads to ambiguities (possible a bug in instaparse)
overrides | (ns clariform.ast.parser
(:require
[shadow.resource :as rc]
[instaparse.core :as insta
:refer-macros [defparser]]))
(def trailing-newline #(if (= \newline (last %)) % (str % \newline)))
TOKENS
(def tokens-grammar (rc/inline "../../clarity/grammar/tokens.ebnf"))
(def strict-grammar (rc/inline "../../... |
a52036c81d8d1dde3b9a1518181ec2dc8af87bf9c8412d2ee4c69bc5d9153d72 | grin-compiler/ghc-wpc-sample-programs | Name.hs | |
Module : IRTS.JavaScript . Name
Description : The JavaScript name .
License : : The Idris Community .
Module : IRTS.JavaScript.Name
Description : The JavaScript name mangler.
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE OverloadedStrings, PatternGuards #-}
mo... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/idris-1.3.3/src/IRTS/JavaScript/Name.hs | haskell | # LANGUAGE OverloadedStrings, PatternGuards # | |
Module : IRTS.JavaScript . Name
Description : The JavaScript name .
License : : The Idris Community .
Module : IRTS.JavaScript.Name
Description : The JavaScript name mangler.
License : BSD3
Maintainer : The Idris Community.
-}
module IRTS.JavaScript.Name
( jsName
, jsNameGen... |
7c2ee058039258530fc76af5fc210797de63944a6353c88a52b6dd6e8a4fb116 | patricoferris/ocaml-multicore-monorepo | form.eml.ml | let show_form ?message request =
<html>
<body>
% begin match message with
% | None -> ()
% | Some message ->
<p>You entered: <b><%s message %>!</b></p>
% end;
<%s! Dream.form_tag ~action:"/" request %>
<input name="message" autofocus>
</form>
</body>
</html>
let () =
Eio_main.r... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/dream/example/d-form/form.eml.ml | ocaml | let show_form ?message request =
<html>
<body>
% begin match message with
% | None -> ()
% | Some message ->
<p>You entered: <b><%s message %>!</b></p>
% end;
<%s! Dream.form_tag ~action:"/" request %>
<input name="message" autofocus>
</form>
</body>
</html>
let () =
Eio_main.r... | |
8e4dbe6c0a16a653c1f31274859dc9a495392de86361fbaee7d851d9b457215c | Clozure/ccl-tests | next-method-p.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat May 31 08:04:45 2003
;;;; Contains: Tests of NEXT-METHOD-P
(in-package :cl-test)
(defgeneric nmp-gf-01 (x)
(:method ((x integer)) (notnot-mv (next-method-p)))
(:method ((x number)) 'foo)
(:method ((x symbol)) (next-method-p)))
(deftest next-method-p.1
... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/next-method-p.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of NEXT-METHOD-P
With AROUND methods
Need to also test next-method-p in builtin method combinations
Error tests | Author :
Created : Sat May 31 08:04:45 2003
(in-package :cl-test)
(defgeneric nmp-gf-01 (x)
(:method ((x integer)) (notnot-mv (next-method-p)))
(:method ((x number)) 'foo)
(:method ((x symbol)) (next-method-p)))
(deftest next-method-p.1
(nmp-gf-01 10)
t)
(deftest next-method-p.2
(nmp-gf-01 1.... |
3293050e01d202a7f1cfd24d5e36a78f28a07e1bb91efaabc04495bfda00c40b | nachivpn/mt | g13.erl | -module(g13).
% generic Overloaded constructors
-type either(A,B) :: {left, A} | {right, B}.
-type dir(A) :: {left,A} | {right,A} | {fwd,A} | {bwd,A}.
% polymorphic extract
extract({left,A}) -> A;
extract({right,A}) -> A.
foo() ->
X = {fwd,1},
extract(X).
foo1() ->
true = extract({left,true}).
fmap (... | null | https://raw.githubusercontent.com/nachivpn/mt/fcffbcb770cfe0b19c189e6c8ce2ccab61062195/test/good/g13.erl | erlang | generic Overloaded constructors
polymorphic extract | -module(g13).
-type either(A,B) :: {left, A} | {right, B}.
-type dir(A) :: {left,A} | {right,A} | {fwd,A} | {bwd,A}.
extract({left,A}) -> A;
extract({right,A}) -> A.
foo() ->
X = {fwd,1},
extract(X).
foo1() ->
true = extract({left,true}).
fmap (_,{left,A}) -> {left,A};
fmap (F,{right,A}) -> {right,F(... |
eb60151e776322d0fb7f758235a8799c3e2e24c1732a08b410b1ed23e161bc73 | robert-strandh/Cluster | aad.lisp | (cl:in-package #:cluster)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Mnemonic AAD
| null | https://raw.githubusercontent.com/robert-strandh/Cluster/9010412a2d2109d3eb6e607bd62cc0c482adac81/x86-instruction-database/aad.lisp | lisp |
Mnemonic AAD | (cl:in-package #:cluster)
|
89e4470b1858333759d0d4bd9ffa967f7b5c694a9c80214e1314fded5a266052 | ejgallego/coq-lsp | doc_manager.ml | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * INRIA , CNRS and contributors - Copyright 1999 - 2018
(* <O___,, * (see CREDITS file for the list of authors) *)
\VV/ * * * *... | null | https://raw.githubusercontent.com/ejgallego/coq-lsp/6d710023ea6d6ce776a5c790c6844723e06ab784/controller/doc_manager.ml | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
<O___,, * (see CREDITS file for the list of authors)
// * This file is distributed under the terms of the
* (see LICENSE file for... | v * INRIA , CNRS and contributors - Copyright 1999 - 2018
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser General Public License Version 2.1
Copyright 2019 MINES ParisTech -- ... |
b07dcb1028475d3619d5384f397137b19c1e72012b1ab917fe278bc658776d7b | elaforge/karya | LKeycaps.hs | Copyright 2020
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
module Cmd.Repl.LKeycaps where
import qualified Cmd.Cmd as Cmd
import qualified Cmd.SyncKeycaps as SyncKeycaps
import qualified Ui.KeycapsT as KeycapsT
open :: Cmd.M m => m ()
open = Syn... | null | https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Cmd/Repl/LKeycaps.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt | Copyright 2020
module Cmd.Repl.LKeycaps where
import qualified Cmd.Cmd as Cmd
import qualified Cmd.SyncKeycaps as SyncKeycaps
import qualified Ui.KeycapsT as KeycapsT
open :: Cmd.M m => m ()
open = SyncKeycaps.open
close :: Cmd.M m => m ()
close = SyncKeycaps.close
get_bindings :: Cmd.M m => m KeycapsT.Bindings... |
a511b2cf943301f3c878905ec9ca3d8c82fc06f51eef1b7fdf2d02176ff4fe29 | jrh13/hol-light | simp.ml | (* ========================================================================= *)
Simplification and rewriting .
(* *)
, University of Cambridge Computer Laboratory
(* ... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/simp.ml | ocaml | =========================================================================
=========================================================================
---------------... | Simplification and rewriting .
, University of Cambridge Computer Laboratory
( c ) Copyright , University of Cambridge 1998
( c ) Copyright , 1998 - 2007
needs "itab.ml";;
type ... |
6a1da0e334037b8a0d0be431eae4d4db2e9125468c8428d21882244d2f549f75 | patricoferris/ocaml-multicore-monorepo | bench_promise.ml | open Eio.Std
type request = {
req_body : int;
response : response option Promise.u;
}
and response = {
resp_body : int;
next_request : request Promise.u;
}
(* A client and server exchange these payload values.
Each contains the current message and a resolver which the other party can use to reply. *)
let ... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/624b3293ee41e83736fe7ac3a79f810c2b70f68b/duniverse/eio/bench/bench_promise.ml | ocaml | A client and server exchange these payload values.
Each contains the current message and a resolver which the other party can use to reply.
Set up reply channel
Send i and next_request channel to client
Await client's response, with new send channel
Wait for message and reply channel from server
Create ne... | open Eio.Std
type request = {
req_body : int;
response : response option Promise.u;
}
and response = {
resp_body : int;
next_request : request Promise.u;
}
let rec run_server ~n_iters ~i r =
let p2, r2 = Promise.create () in
Promise.resolve r (Some { resp_body = i; next_request = r2 });
let { req_body;... |
c703705aa5afe0111ba5bfa7339dc0d62afe8ed7483f0b395189461dd9ed7d4f | tamarin-prover/tamarin-prover | Monoid.hs | # LANGUAGE CPP #
-- |
Copyright : ( c ) 2012
-- License : GPL v3 (see LICENSE)
--
Maintainer : < >
--
A variant of " Data . Monoid " that also exports ' ( < > ) ' for ' mappend ' .
module Extension.Data.Monoid (
module Data.Monoid
#if __GLASGOW_HASKELL__ < 704
, (<>)
#endif
, MinMax(..)
... | null | https://raw.githubusercontent.com/tamarin-prover/tamarin-prover/c78c7afd3b93b52dd4d2884952ec0fc273832a0d/lib/utils/src/Extension/Data/Monoid.hs | haskell | |
License : GPL v3 (see LICENSE)
| An infix synonym for 'mappend'.
# INLINE (<>) #
| A newtype wrapper around 'Maybe' that returns a tuple of the minimum and
maximum value encountered, if there was any. | # LANGUAGE CPP #
Copyright : ( c ) 2012
Maintainer : < >
A variant of " Data . Monoid " that also exports ' ( < > ) ' for ' mappend ' .
module Extension.Data.Monoid (
module Data.Monoid
#if __GLASGOW_HASKELL__ < 704
, (<>)
#endif
, MinMax(..)
, minMaxSingleton
) where
import Data.Monoid
... |
0663cf63f5f425b228213fe12a8eeb5e3a71c5ba48116fd321cefa20d9b544e8 | berke/jsure | fake_ansi.ml | let black = 0;;
let red = 1;;
let green = 2;;
let yellow = 3;;
let blue = 4;;
let magenta = 5;;
let cyan = 6;;
let white = 7;;
let uncoloured = 8;;
let foreground = [|
"";
"";
"";
"";
"";
"";
"";
"";
"";
|];;
let background = [|
"";
"";
"";
"";
"";
... | null | https://raw.githubusercontent.com/berke/jsure/f7c32e21602cd8d8f18e90a608cfc59b1172be57/fake_ansi.ml | ocaml | let black = 0;;
let red = 1;;
let green = 2;;
let yellow = 3;;
let blue = 4;;
let magenta = 5;;
let cyan = 6;;
let white = 7;;
let uncoloured = 8;;
let foreground = [|
"";
"";
"";
"";
"";
"";
"";
"";
"";
|];;
let background = [|
"";
"";
"";
"";
"";
... | |
800b648403959cbcea3d4228f704d39d89e25e079c68ff6b3f6bbc31bc36f595 | lehins/massiv | Traverse.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - orphans #
module Main where
import Control.Monad.Trans.Maybe
import Criterion.Main
import Data.Massiv.Array as A
import Data.Massiv.Array.Manifest.Vector as A
import Data.Massiv.Bench as A
import Data... | null | https://raw.githubusercontent.com/lehins/massiv/67a920d4403f210d0bfdad1acc4bec208d80a588/massiv-bench/bench/Traverse.hs | haskell | # LANGUAGE BangPatterns # | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - orphans #
module Main where
import Control.Monad.Trans.Maybe
import Criterion.Main
import Data.Massiv.Array as A
import Data.Massiv.Array.Manifest.Vector as A
import Data.Massiv.Bench as A
import Data.Primitive.ByteArray
import Da... |
e4d625ba29f952ad7d75c4f2e5e114e1626da16a6586efdf5d7935a9d490447c | webyrd/mediKanren | clinical_kg.rkt | #lang racket/base
;; provide will load the materialized relation defined below
(provide patient-clinical-data)
(require "../base.rkt" (except-in racket/match ==))
(define path-clinical-data )
(define path-demographic-data )
(define in (open-input-file path-clinical-data))
(define-relation/table patient-clinical-da... | null | https://raw.githubusercontent.com/webyrd/mediKanren/a2b80ea94f66bcdd4305b9369ad4184c2afe9829/medikanren2/db/clinical_kg.rkt | racket | provide will load the materialized relation defined below
#f in the attrib-type means "any" type
if you know curie and value, you can get a pointer to all other data | #lang racket/base
(provide patient-clinical-data)
(require "../base.rkt" (except-in racket/match ==))
(define path-clinical-data )
(define path-demographic-data )
(define in (open-input-file path-clinical-data))
(define-relation/table patient-clinical-data
'path "uab_emr_covid/patient_clinical_data... |
d8df42707161d32b8a9920af54cb2bb86b26ad37c4503947aba81b28d0085344 | tip-org/tools | Main.hs | # LANGUAGE CPP , TemplateHaskell #
module Main where
import Tip.GHC
import Tip.GHC.Params
import System.Environment
import Data.Ord
import Control.Monad
import Tip.Core
import Tip.Fresh
import Tip.Simplify
import Tip.Lint
import Tip.Passes
import Tip.Utils.Rename
import Tip.Pretty
import Tip.Pretty.SMT as SMT
im... | null | https://raw.githubusercontent.com/tip-org/tools/34350072587bd29157d18331eb895a1b2819555f/tip-ghc/src/Main.hs | haskell | # LANGUAGE CPP , TemplateHaskell #
module Main where
import Tip.GHC
import Tip.GHC.Params
import System.Environment
import Data.Ord
import Control.Monad
import Tip.Core
import Tip.Fresh
import Tip.Simplify
import Tip.Lint
import Tip.Passes
import Tip.Utils.Rename
import Tip.Pretty
import Tip.Pretty.SMT as SMT
im... | |
cb156dea4b1e52a6a1ef51ac11eb3cc33130442c52e71b9f862fde00cac3382f | timjb/halma | Board.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
module Game.Halma.Board
( HalmaGrid (..)
, sideLength, numberOfFields
, HalmaDirection (..)
, oppositeDirection
,... | null | https://raw.githubusercontent.com/timjb/halma/0267d636dbed0de03d2d6527ca35458637a0021c/halma/src/Game/Halma/Board.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
| Numbers of fields on each straight edge of a star-shaped halma board of the
given size.
| Total number of fields on a halma board of the given size.
| From the point of view of the given corner: On which row lies the given
positive, rows nearer to the opposite co... | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE TypeFamilies #
module Game.Halma.Board
( HalmaGrid (..)
, sideLength, numberOfFields
, HalmaDirection (..)
, oppositeDirection
, leftOf
, rowsInDirection
, corner
, Team
, startC... |
cca02e0aaeab0162b87f1406134f138b362c53f41d39816af4c9bda683a13123 | msakai/toysolver | toysat.hs | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# OPTIONS_GHC -Wall -fno - warn - unused - do - bind #
-----------------------------------------------------------------------------
-- |
-- Module : toysat
Copyright : ( c ) 2012 - 2014
-- License ... | null | https://raw.githubusercontent.com/msakai/toysolver/62acc18d9dfb9134551bfd85095279844426db37/app/toysat/toysat.hs | haskell | ---------------------------------------------------------------------------
|
Module : toysat
License : BSD-style
Maintainer :
Stability : experimental
Portability : non-portable
---------------------------------------------------------------------------
-------------------------------------... | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# OPTIONS_GHC -Wall -fno - warn - unused - do - bind #
Copyright : ( c ) 2012 - 2014
A toy - level SAT solver based on .
module Main where
import Control.Concurrent (getNumCapabilities)
import Control.Co... |
050fd46b071ee2c0a192a56715a394dbfc1bbf4394753027ee9e7546014e6292 | treeowl/compact-sequences | Simple.hs | # language Safe #
|
Space - efficient queues with amortized \ ( O(\log n ) \ ) operations . These
directly use an underlying array - based implementation , without doing any
special optimization for the first few and last few elements of the queue .
Space-efficient queues with amortized \( O(\log n) \) ope... | null | https://raw.githubusercontent.com/treeowl/compact-sequences/85224a71428f230bec1bbb1bce0c0bcf3c65a9fc/src/Data/CompactSequence/Queue/Simple.hs | haskell | # language Safe #
|
Space - efficient queues with amortized \ ( O(\log n ) \ ) operations . These
directly use an underlying array - based implementation , without doing any
special optimization for the first few and last few elements of the queue .
Space-efficient queues with amortized \( O(\log n) \) ope... | |
8a29028586533abdb9ac70a7ca215b756b9362acc0aec38f4e2855783f1d1f7a | leviroth/ocaml-reddit-api | modmail.ml | open! Core
module Conversation = struct
include Json_object.Utils
module Id = struct
include Id36
include Identifiable.Make (struct
include Id36
let module_name = "Modmail.Conversation.Id"
end)
end
let id =
required_field "conversation" (fun json ->
Jsonaf.member_exn "id... | null | https://raw.githubusercontent.com/leviroth/ocaml-reddit-api/6519697a39d68d675c3c36fd54add8ba35e939f3/reddit_api_kernel/modmail.ml | ocaml | open! Core
module Conversation = struct
include Json_object.Utils
module Id = struct
include Id36
include Identifiable.Make (struct
include Id36
let module_name = "Modmail.Conversation.Id"
end)
end
let id =
required_field "conversation" (fun json ->
Jsonaf.member_exn "id... | |
1d3c768e0f9ebc3b5bdf19b61cec4115c170856c0b0992ecc2ba04bb0f9d14c4 | bitemyapp/esqueleto | Test.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module MySQL.Test where
import Common.Test.Import hiding (from, on)
import Control.Applicative
import Control.Monad (void)
import Control.Monad.IO.Class (MonadIO(liftIO))... | null | https://raw.githubusercontent.com/bitemyapp/esqueleto/34047e1f5f7c06c0aa09f1c3069dffc9b4faffff/test/MySQL/Test.hs | haskell | # LANGUAGE RankNTypes #
of changed rows
definitely doesn't work at the moment
testMysqlRandom | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module MySQL.Test where
import Common.Test.Import hiding (from, on)
import Control.Applicative
import Control.Monad (void)
import Control.Monad.IO.Class (MonadIO(liftIO))
import Control.Monad.Logger... |
93a37b929167eb8fbf5fc39bd1e5d430e81cbf1f3f40ba83d299f4989ad1fed8 | eWert-Online/OSnap | OSnap_Browser_Download.ml | open Cohttp_lwt_unix
open OSnap_Utils
let get_uri revision (platform : OSnap_Utils.platform) =
Uri.make
~scheme:"http"
~host:"storage.googleapis.com"
~port:80
~path:
(match platform with
| MacOS -> "/chromium-browser-snapshots/Mac/" ^ revision ^ "/chrome-mac.zip"
| MacOS_ARM ->
... | null | https://raw.githubusercontent.com/eWert-Online/OSnap/9010a45469ef069fffec2c9d992a7bc0808f04d8/lib/OSnap_Browser/OSnap_Browser_Download.ml | ocaml | open Cohttp_lwt_unix
open OSnap_Utils
let get_uri revision (platform : OSnap_Utils.platform) =
Uri.make
~scheme:"http"
~host:"storage.googleapis.com"
~port:80
~path:
(match platform with
| MacOS -> "/chromium-browser-snapshots/Mac/" ^ revision ^ "/chrome-mac.zip"
| MacOS_ARM ->
... | |
9238f80c98d2e5089000777eb63f99e16561ca322989584f47ae616bbccacfd8 | phadej/cabal-extras | Tracer.hs | {-# LANGUAGE RankNTypes #-}
module Peura.Tracer (
-- * Tracer
Tracer (..),
nullTracer,
traceWith,
hoistTracer,
) where
import GHC.Stack (callStack, CallStack)
import Peura.Exports
-------------------------------------------------------------------------------
Tracer
----------------------------... | null | https://raw.githubusercontent.com/phadej/cabal-extras/378cac5495b829794d67f243b27a9317eeed0858/peura/src/Peura/Tracer.hs | haskell | # LANGUAGE RankNTypes #
* Tracer
-----------------------------------------------------------------------------
----------------------------------------------------------------------------- | module Peura.Tracer (
Tracer (..),
nullTracer,
traceWith,
hoistTracer,
) where
import GHC.Stack (callStack, CallStack)
import Peura.Exports
Tracer
newtype Tracer m a = Tracer { traceWithCallStack :: CallStack -> a -> m () }
instance Contravariant (Tracer m) where
contramap f (Tracer g) = Trac... |
8e39c88292176ba820e79918da0135f566ec17f83aa2cbfec776c18bea5e23b5 | janestreet/krb | conn_type.ml | module Stable = struct
open Core.Core_stable
module V1 = struct
module T = struct
type t =
| Auth
| Safe
| Priv
[@@deriving bin_io, compare, sexp]
include (val Comparator.V1.make ~compare ~sexp_of_t)
end
include T
include Comparable.V1.Make (T)
end
end
... | null | https://raw.githubusercontent.com/janestreet/krb/1b00b2bec5232aedad0471e221b1390891c9c58f/src/conn_type.ml | ocaml | Priv is strongest
Safe is in between | module Stable = struct
open Core.Core_stable
module V1 = struct
module T = struct
type t =
| Auth
| Safe
| Priv
[@@deriving bin_io, compare, sexp]
include (val Comparator.V1.make ~compare ~sexp_of_t)
end
include T
include Comparable.V1.Make (T)
end
end
... |
49c73667cb370301b80f60f9da95d0c4714e275151c5ed953c3ce59a4093ce7e | tolysz/ghcjs-stack | FileMonitor.hs | # LANGUAGE CPP , DeriveGeneric , DeriveFunctor , GeneralizedNewtypeDeriving ,
NamedFieldPuns , BangPatterns #
NamedFieldPuns, BangPatterns #-}
# OPTIONS_GHC -fno - warn - orphans #
-- | An abstraction to help with re-running actions when files or other
-- input values they depend on have ch... | null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/cabal-install/Distribution/Client/FileMonitor.hs | haskell | | An abstraction to help with re-running actions when files or other
input values they depend on have changed.
* Declaring files to monitor
* Creating and checking sets of monitored files
----------------------------------------------------------------------------
Types for specifying files to monitor
| A descr... | # LANGUAGE CPP , DeriveGeneric , DeriveFunctor , GeneralizedNewtypeDeriving ,
NamedFieldPuns , BangPatterns #
NamedFieldPuns, BangPatterns #-}
# OPTIONS_GHC -fno - warn - orphans #
module Distribution.Client.FileMonitor (
MonitorFilePath(..),
MonitorKindFile(..),
MonitorKindDir(..),
... |
bcc04e95e0919bb8b2659369181e90dfa116a5851a7569bec1f52b50687153c4 | Fuuzetsu/ghc-prof-aeson-flamegraph | Main.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Main (main) where
import Control.Monad (unless)
import Control.Exception
import qualified Data.Aeson as A
import qualified Data.ByteString.Lazy as BSL
import Data.Foldable (asum)... | null | https://raw.githubusercontent.com/Fuuzetsu/ghc-prof-aeson-flamegraph/e1a4da5d1502cd6afe96a2cc14ac0bfac968bec5/app/Main.hs | haskell | # LANGUAGE BangPatterns #
Map containing actual information about the cost centre stacks.
Unlike in regular profiles, this is not duplicated in the
information, the stacks simply refer to the information by ID.
Renders the actual cost centre stacks.
Add current level to the stack.
Join module with the labe... | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Main (main) where
import Control.Monad (unless)
import Control.Exception
import qualified Data.Aeson as A
import qualified Data.ByteString.Lazy as BSL
import Data.Foldable (asum)
import Data.Monoid ((<>))
... |
667a1e2dcf9078e63872fb2afa16a292fb7e0f24ab093dc2cb664f8e0000dfc1 | WormBase/wormbase_rest | genotype.clj | (ns rest-api.classes.genotype
(:require
[rest-api.classes.genotype.widgets.overview :as overview]
[rest-api.classes.genotype.widgets.human-diseases :as human-diseases]
[rest-api.classes.genotype.widgets.references :as references]
[rest-api.classes.graphview.widget :as graphview]
[rest-api.routing ... | null | https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/genotype.clj | clojure | (ns rest-api.classes.genotype
(:require
[rest-api.classes.genotype.widgets.overview :as overview]
[rest-api.classes.genotype.widgets.human-diseases :as human-diseases]
[rest-api.classes.genotype.widgets.references :as references]
[rest-api.classes.graphview.widget :as graphview]
[rest-api.routing ... | |
0a358f3e4f98313adcefad96c01b23efe9f6ceee99b229bf78b3ef811277cee3 | nirum-lang/nirum | ModuleSet.hs | module Nirum.Package.ModuleSet ( ImportError ( CircularImportError
, MissingImportError
, MissingModulePathError
)
, ModuleSet
... | null | https://raw.githubusercontent.com/nirum-lang/nirum/4d4488b0524874abc6e693479a5cc70c961bad33/src/Nirum/Package/ModuleSet.hs | haskell | module Nirum.Package.ModuleSet ( ImportError ( CircularImportError
, MissingImportError
, MissingModulePathError
)
, ModuleSet
... | |
2676f4d50621a950a6d2b3113dac2a8b2c698c803d9ee1f0942b097bfe382862 | charlieg/Sparser | loader.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1992 - 1995 , 2010 - 2011 -- all rights reserved
extensions copyright ( c ) 2009 BBNT Solutions LLC . All Rights Reserved
$ Id$
;;;
;;; File: "loader"
;;; Module: "tools:basics"
Version : March 2011
7/23/09 Adde... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/tools/basics/loader.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "loader"
Module: "tools:basics"
repository of lisp utilities. | copyright ( c ) 1992 - 1995 , 2010 - 2011 -- all rights reserved
extensions copyright ( c ) 2009 BBNT Solutions LLC . All Rights Reserved
$ Id$
Version : March 2011
7/23/09 Added ' debugging ' with 's tools . Uncommented loading of no - breaks .
9/10 Added the SFL macro for creating CLOS class... |
cfc99599d7c5e6cf10618eac4fd0dae94f1a8d0f528c95ac25bb8595076939ad | imrehg/ypsilon | exceptions.scm | #!core
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (core exceptions)
(export with-exception-handler
guard
raise
raise-continuable
else
=>)
(import (core... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/stdlib/core/exceptions.scm | scheme | Reference:
-34/
[end] | #!core
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (core exceptions)
(export with-exception-handler
guard
raise
raise-continuable
else
=>)
(import (core... |
64f4eb71d654041298f5c815fa92e80327585384057a0dac17064932b21bdf24 | exercism/babashka | project.clj | (defproject tracks-on-tracks-on-tracks "0.1.0-SNAPSHOT"
:description "tracks-on-tracks-on-tracks exercise."
:url "-on-tracks-on-tracks"
:dependencies [[org.clojure/clojure "1.10.0"]]) | null | https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/concept/tracks-on-tracks-on-tracks/project.clj | clojure | (defproject tracks-on-tracks-on-tracks "0.1.0-SNAPSHOT"
:description "tracks-on-tracks-on-tracks exercise."
:url "-on-tracks-on-tracks"
:dependencies [[org.clojure/clojure "1.10.0"]]) | |
57f6eb99faa51ec886a6ada6e75ad8d600534c28a63419de056903decd36c81f | verement/etamoo | LambdaMOO.hs |
# LANGUAGE CPP , OverloadedStrings #
module MOO.Database.LambdaMOO (loadLMDatabase, saveLMDatabase) where
import Control.Applicative ((<$>))
import Control.Monad (unless, when, forM, forM_, join)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.State (StateT, evalStateT, modify, get, gets)
import Control.... | null | https://raw.githubusercontent.com/verement/etamoo/af65e2581ab5d093c9490f43692ef89bafc2efc1/src/MOO/Database/LambdaMOO.hs | haskell | Check sequential object ordering
old handles string
was argstr
was iobjstr
was prepstr
Enumeration constants from LambdaMOO
type_numeric = -2
permMask = 0xF
Database writing ...
old handles string
clear |
# LANGUAGE CPP , OverloadedStrings #
module MOO.Database.LambdaMOO (loadLMDatabase, saveLMDatabase) where
import Control.Applicative ((<$>))
import Control.Monad (unless, when, forM, forM_, join)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.State (StateT, evalStateT, modify, get, gets)
import Control.... |
11382a07118d4abd1f335018ea35f06953c57b5f67035a13a6d89724a1ae4aac | graninas/Functional-Design-and-Architecture | Language.hs | module Andromeda.Simulator.Language
(
) where
| null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/54928412e805f2ba5fb06589b58210a7da6d5aa1/Second-Edition-Manning-Publications/BookSamples/CH06/Section6p2/src/Andromeda/Simulator/Language.hs | haskell | module Andromeda.Simulator.Language
(
) where
| |
9c5598d58983f313e4a69c214703c8826bacf876d7829156c02ead38b1b8a3e8 | threatgrid/ctia | feedback_test.clj | (ns ctia.entity.feedback-test
(:require [ctia.entity.feedback :as sut]
[clj-momo.test-helpers.core :as mth]
[clojure.test :refer [deftest is join-fixtures testing use-fixtures]]
[ctia.domain.entities :refer [schema-version]]
[ctia.test-helpers
[auth :refer ... | null | https://raw.githubusercontent.com/threatgrid/ctia/32857663cdd7ac385161103dbafa8dc4f98febf0/test/ctia/entity/feedback_test.clj | clojure | (ns ctia.entity.feedback-test
(:require [ctia.entity.feedback :as sut]
[clj-momo.test-helpers.core :as mth]
[clojure.test :refer [deftest is join-fixtures testing use-fixtures]]
[ctia.domain.entities :refer [schema-version]]
[ctia.test-helpers
[auth :refer ... | |
80efa0ed9028abcb9546b484063231dd0952d4f90c90a8d9703da44f2f09482c | snapframework/snap | Tests.hs | module Snap.Snaplet.Config.Tests where
------------------------------------------------------------------------------
import Control.Concurrent
import Control.Concurrent.Async
import Control.Monad
import qualified Data.ByteString.Char8 as BS
import qualified Data.Configurator.Types as C
import Data.Function
import qua... | null | https://raw.githubusercontent.com/snapframework/snap/d63110d7b2776ccba0336a69438c84f106f60567/test/suite/Snap/Snaplet/Config/Tests.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------... | module Snap.Snaplet.Config.Tests where
import Control.Concurrent
import Control.Concurrent.Async
import Control.Monad
import qualified Data.ByteString.Char8 as BS
import qualified Data.Configurator.Types as C
import Data.Function
import qualified Data.Map as Map
#if !MIN_VERSION_base(4,11,0)
import Data.Semigroup
impo... |
245c5e17991bbae7e6a82fde54f06e2ad55807f23ee0165da1705a74502a0aad | symbiont-io/detsys-testkit | Main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Network.Socket
import Network.Socket.ByteString.Lazy
import GHC.Event
import Control.Concurrent
import Control.Concurrent.Async
import Control.Exception
import Control.Monad
import Data.Atomics.Counter
import Data.ByteString.Lazy (ByteString)
import qualifie... | null | https://raw.githubusercontent.com/symbiont-io/detsys-testkit/29a3a0140730420e4c5cc8db23df6fdb03f9302c/src/runtime-prototype/bench/http/Main.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------
, requestBody = body
XXX: log error for debugging purposes?
XXX: better parsing of response body
XXX: last for errors also?
| "Resident set size (RSS) is the portion of memory occupied by a process
that is held i... |
module Main where
import Network.Socket
import Network.Socket.ByteString.Lazy
import GHC.Event
import Control.Concurrent
import Control.Concurrent.Async
import Control.Exception
import Control.Monad
import Data.Atomics.Counter
import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteString.Lazy as BS
import... |
c4f6f31f28a6a92460ee97fae297d97a2c42a7d9703980725c816d552d22b524 | slipstream/SlipStreamServer | notification_test.cljc | (ns com.sixsq.slipstream.ssclj.resources.spec.notification-test
(:require
[clojure.test :refer [are deftest is]]
[com.sixsq.slipstream.ssclj.resources.notification :refer :all]
[com.sixsq.slipstream.ssclj.resources.spec.notification :as notification]
[com.sixsq.slipstream.ssclj.resources.spec.spec-tes... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi-resources/test/com/sixsq/slipstream/ssclj/resources/spec/notification_test.cljc | clojure | mandatory keywords
optional keywords | (ns com.sixsq.slipstream.ssclj.resources.spec.notification-test
(:require
[clojure.test :refer [are deftest is]]
[com.sixsq.slipstream.ssclj.resources.notification :refer :all]
[com.sixsq.slipstream.ssclj.resources.spec.notification :as notification]
[com.sixsq.slipstream.ssclj.resources.spec.spec-tes... |
d4c84c62cbf130071d0fa5d28874a246c34c4326cd36d97ea7228135871c466f | wagjo/hangman | main.clj | Copyright ( C ) 2012 , .
;;
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0
;; (-1.0.php) which can be found
;; in the file epl-v10.html at the root of this distribution.
;;
;; By using this software in any fashion, you are agreeing to be bound
;; by the terms of ... | null | https://raw.githubusercontent.com/wagjo/hangman/6abab88feb593c2ee3629f0047fbabb844caf194/src/hangman/main.clj | clojure |
The use and distribution terms for this software are covered by the
(-1.0.php) which can be found
in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound
by the terms of this license.
You must not remove this notice, or any other, from this... | Copyright ( C ) 2012 , .
Eclipse Public License 1.0
(ns hangman.main
"Entry point for Hangman."
ensure file is compiled so it can be easily called from java .
(:gen-class)
(:require [hangman.desktop :as desktop]))
(defn -main
"Main entry point for Hangman."
[& args]
(desktop/start-game!))
|
ac5f47cbe8e8a1b8ae7057a17fc6d3ad6203ff1aa7f78ef674ad9f4b11177038 | simmone/racket-simple-xlsx | empty-test.rkt | #lang racket
(require simple-xml)
(require rackunit/text-ui rackunit)
(require "../../../xlsx/xlsx.rkt")
(require "../../../sheet/sheet.rkt")
(require "../../../style/style.rkt")
(require "../../../style/sort-styles.rkt")
(require "../../../lib/lib.rkt")
(require"../../../xl/styles/styles.rkt")
(require racket/run... | null | https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/tests/xl/styles/empty-test.rkt | racket | #lang racket
(require simple-xml)
(require rackunit/text-ui rackunit)
(require "../../../xlsx/xlsx.rkt")
(require "../../../sheet/sheet.rkt")
(require "../../../style/style.rkt")
(require "../../../style/sort-styles.rkt")
(require "../../../lib/lib.rkt")
(require"../../../xl/styles/styles.rkt")
(require racket/run... | |
e0b3e4956dba654d861ab84239d583081d7103d3034a44fb4deb3100f9d8fdb5 | parapluu/Concuerror | io_format_3.erl | -module(io_format_3).
-export([scenarios/0]).
-export([test/0]).
-concuerror_options_forced([{non_racing_system, user}]).
scenarios() ->
[{test, inf, dpor}].
test() ->
P = self(),
spawn(
fun() -> P ! ok,
io:format("Child~n")
end),
receive
ok -> io:format("Parent~n"... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/basic_tests/src/io_format_3.erl | erlang | -module(io_format_3).
-export([scenarios/0]).
-export([test/0]).
-concuerror_options_forced([{non_racing_system, user}]).
scenarios() ->
[{test, inf, dpor}].
test() ->
P = self(),
spawn(
fun() -> P ! ok,
io:format("Child~n")
end),
receive
ok -> io:format("Parent~n"... | |
53f6138d0de1a96abfef4c469b80f766f8930d2c5f580df2b5b87d3f5f15b14f | ml4tp/tcoq | stateid.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/lib/stateid.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
type t = int
let initial = 1
... |
305105c536c88e84fb32438b10634fcf983959a7be43ebfaa4c3af2f5c350d09 | mfoemmel/erlang-otp | gs1.2.erl | -module(gs1).
-vsn(2).
-behaviour(gen_server).
-export([get_data/0, get_time/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-record(state, {data, time}).
get_data() ->
gen_server:call(gs1, get_data).
get_time() ->
gen_server:call(gs1, get_time).
init([... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/sasl/doc/src/rel/gs1.2.erl | erlang | -module(gs1).
-vsn(2).
-behaviour(gen_server).
-export([get_data/0, get_time/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-record(state, {data, time}).
get_data() ->
gen_server:call(gs1, get_data).
get_time() ->
gen_server:call(gs1, get_time).
init([... | |
003b3ff52dd470ef883f3ee148a2ef8db0ee401360d492bd3bdfa1920c1e6b22 | nasa/Common-Metadata-Repository | service_util.clj | (ns cmr.system-int-test.utils.service-util
"This contains utilities for testing services."
(:require
[cheshire.core :as json]
[clj-http.client :as client]
[clojure.test :refer [is]]
[cmr.common.mime-types :as mime-types]
[cmr.common.mime-types :as mt]
[cmr.common.util :as util]
[cmr.mock-echo.c... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/4e260a93a08b6819dcb9230fae08000520b66e3e/system-int-test/src/cmr/system_int_test/utils/service_util.clj | clojure | (ns cmr.system-int-test.utils.service-util
"This contains utilities for testing services."
(:require
[cheshire.core :as json]
[clj-http.client :as client]
[clojure.test :refer [is]]
[cmr.common.mime-types :as mime-types]
[cmr.common.mime-types :as mt]
[cmr.common.util :as util]
[cmr.mock-echo.c... | |
6c0adae70953a4cc85367dc623d42f21956a4e690d518e93e9f0a3be43c737de | SimSaladin/rnfssp | MediaSub.hs | # LANGUAGE NoImplicitPrelude , RankNTypes , TemplateHaskell , QuasiQuotes , OverloadedStrings , ConstraintKinds , FlexibleInstances , FlexibleContexts , TypeFamilies , GADTs #
# LANGUAGE MultiParamTypeClasses #
# OPTIONS_GHC -fno - warn - orphans #
-- | Rnfssp media subsite
module MediaSub
( module MediaSub
,... | null | https://raw.githubusercontent.com/SimSaladin/rnfssp/d04993524d13ed5d993e4b85e604c824ef7283ba/rnfssp-media/MediaSub.hs | haskell | | Rnfssp media subsite
Handlers
Sections | # LANGUAGE NoImplicitPrelude , RankNTypes , TemplateHaskell , QuasiQuotes , OverloadedStrings , ConstraintKinds , FlexibleInstances , FlexibleContexts , TypeFamilies , GADTs #
# LANGUAGE MultiParamTypeClasses #
# OPTIONS_GHC -fno - warn - orphans #
module MediaSub
( module MediaSub
, module MediaSub.Data
... |
3ba7a82ef4eaf24d4a75ca9b372a3490a21747265fb0613a56dd987ff32d5780 | tud-fop/vanda-haskell | Evaluation.hs | -----------------------------------------------------------------------------
-- |
Copyright : ( c ) 2015
-- License : BSD-style
--
-- Stability : unknown
-- Portability : portable
-----------------------------------------------------------------------------
module Vanda.Grammar.XRS.LCFRS.Evaluation
... | null | https://raw.githubusercontent.com/tud-fop/vanda-haskell/3214966361b6dbf178155950c94423eee7f9453e/library/Vanda/Grammar/XRS/LCFRS/Evaluation.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style
Stability : unknown
Portability : portable
---------------------------------------------------------------------------
(crisp) RETRANSLATION from rules and derivations
^ Ts
^ Ts
a sentence (terminal symbo... | Copyright : ( c ) 2015
module Vanda.Grammar.XRS.LCFRS.Evaluation
( sententialFront
, retranslateRule
, getDerivProbability
) where
import Control.Monad (join)
import qualified Data.Array as A
import qualified Data.Vector as V
import Data.NTT
import Vanda.Hypergraph.IntHypergrap... |
5545a6134d1678b9c7b61d24666f63787856809e2dcb48a961284b7d887244e4 | waldheinz/bling | Primitive.hs |
module Graphics.Bling.Primitive (
-- * Ray - Primitive intersections
Intersection, mkIntersection, intLe, intLight,
intDist, intEpsilon, intBsdf, intGeometry,
-- * Primitives
Primitive(..), nearest, nearest'
) where
import qualified Data.Vector as V
import Graphics.Bling.DifferentialGeometry
i... | null | https://raw.githubusercontent.com/waldheinz/bling/1f338f4b8dbd6a2708cb10787f4a2ac55f66d5a8/src/lib/Graphics/Bling/Primitive.hs | haskell | * Ray - Primitive intersections
* Primitives
# UNPACK #
# INLINE near #
# INLINE nearest #
# INLINE nearest' #
Intersections
# UNPACK #
# UNPACK #
^ true geometry at intersection point
| the light emitted at an @Intersection@
^ intersection to query for the emitted light
^ outgoing direction (must be normalize... |
module Graphics.Bling.Primitive (
Intersection, mkIntersection, intLe, intLight,
intDist, intEpsilon, intBsdf, intGeometry,
Primitive(..), nearest, nearest'
) where
import qualified Data.Vector as V
import Graphics.Bling.DifferentialGeometry
import Graphics.Bling.Light as L
import Graphics.Bling.Ref... |
316568bb2bda12a9bde997bf9c56a961b4ee641f55b05f835d3c333cc477c00b | lfe/rebar3_lfe | rebar3_lfe_prv_release.erl | -module(rebar3_lfe_prv_release).
-export([init/1,
do/1,
format_error/1]).
-include("rebar3_lfe.hrl").
-define(PROVIDER, release).
-define(DEPS, [{?NAMESPACE, compile}]).
%% =============================================================================
%% Public API
%% ==============================... | null | https://raw.githubusercontent.com/lfe/rebar3_lfe/79ed128c8a2fd4b6133529334acdb82be8a7c87d/src/rebar3_lfe_prv_release.erl | erlang | =============================================================================
Public API
=============================================================================
Generate release
=============================================================================
====================================================... | -module(rebar3_lfe_prv_release).
-export([init/1,
do/1,
format_error/1]).
-include("rebar3_lfe.hrl").
-define(PROVIDER, release).
-define(DEPS, [{?NAMESPACE, compile}]).
init(State) ->
Description = "Build a release for the LFE project",
Provider = providers:create([
{namespace, ... |
e87cf94c7817c5f83ade1447c532da07ec7c2d4f951f4d2eb16dba25ab821f16 | donaldsonjw/bigloo | link.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / comptime / Engine / link.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Engine/link.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* le compile normalement ... | * serrano / prgm / project / bigloo / comptime / Engine / link.scm * /
* Author : * /
* Creation : Sat Jan 15 11:16:02 1994 * /
* Last change : Sun Jul 21 11:09:27 2013 ( serrano ) * /
* Copy... |
253f0da5573940db1724ab6c6a43cc8d72ac6e63b3ee52467ca86ee8facb1809 | sbelak/huri | time.clj | (ns huri.time
(:require [clj-time.core :as t]
[clojure.math.numeric-tower :refer [ceil]]))
(defn quarter-of-year
[dt]
(ceil (/ (t/month dt) 3)))
(defn quarter
[dt]
(t/date-time (t/year dt) (inc (* (dec (quarter-of-year dt)) 3))))
(defn date
[dt]
(t/floor dt t/day))
(defn year-month
[dt]
... | null | https://raw.githubusercontent.com/sbelak/huri/a242d9d044dfa1c03691b5362bb94fc6fba20f30/src/huri/time.clj | clojure | (ns huri.time
(:require [clj-time.core :as t]
[clojure.math.numeric-tower :refer [ceil]]))
(defn quarter-of-year
[dt]
(ceil (/ (t/month dt) 3)))
(defn quarter
[dt]
(t/date-time (t/year dt) (inc (* (dec (quarter-of-year dt)) 3))))
(defn date
[dt]
(t/floor dt t/day))
(defn year-month
[dt]
... | |
26e0922656772cc39d6b581a54640d92664068203e903e47b6ec363e0b0b074d | janestreet/hardcaml | test_constant_propagation_muxes.ml | open! Import
open Signal
open Test_constant_propagation.Trace
let sexp_of_signal = Test_constants.sexp_of_const_signal
let%expect_test "[mux]" =
let sel = of_int ~width:2 2 in
let width = 3 in
for length = 0 to 5 do
print_s
[%message
""
(length : int)
~_:
(try_w... | null | https://raw.githubusercontent.com/janestreet/hardcaml/4126f65f39048fef5853ba9b8d766143f678a9e4/test/lib/test_constant_propagation_muxes.ml | ocaml | open! Import
open Signal
open Test_constant_propagation.Trace
let sexp_of_signal = Test_constants.sexp_of_const_signal
let%expect_test "[mux]" =
let sel = of_int ~width:2 2 in
let width = 3 in
for length = 0 to 5 do
print_s
[%message
""
(length : int)
~_:
(try_w... | |
33ca3483101a6b0f712ec09cbaaee54b42ea16e98c98fc4fe1d42ac6b1dc8c44 | jobjo/popper | input.mli | type t
val make : max_length:int -> size:int -> t Random.t
val make_seq : max_length:int -> size:int -> t Seq.t Random.t
val of_list : size:int -> Int32.t list -> t
val of_seq : size:int -> Int32.t Seq.t -> t
val head_tail : t -> (Int32.t * t) option
val take : int -> t -> Int32.t list
val drop : int -> t -> t
val hea... | null | https://raw.githubusercontent.com/jobjo/popper/33da372946d1d842f75994e086fa81c8cf62986e/src/lib/input.mli | ocaml | type t
val make : max_length:int -> size:int -> t Random.t
val make_seq : max_length:int -> size:int -> t Seq.t Random.t
val of_list : size:int -> Int32.t list -> t
val of_seq : size:int -> Int32.t Seq.t -> t
val head_tail : t -> (Int32.t * t) option
val take : int -> t -> Int32.t list
val drop : int -> t -> t
val hea... | |
582df756cfd8c04c16aaefa08f9f926f5f2ecc8cd0b590486e5fe0844ad58de9 | borkdude/advent-of-cljc | data.cljc | (ns aoc.y2017.d06.data)
(def input "4 1 15 12 0 9 9 5 5 8 7 3 14 5 12 3")
(def answer-1 6681)
(def answer-2 2392)
| null | https://raw.githubusercontent.com/borkdude/advent-of-cljc/17c8abb876b95ab01eee418f1da2e402e845c596/src/aoc/y2017/d06/data.cljc | clojure | (ns aoc.y2017.d06.data)
(def input "4 1 15 12 0 9 9 5 5 8 7 3 14 5 12 3")
(def answer-1 6681)
(def answer-2 2392)
| |
b4a77baaa50321814cd34c294fdb464465ad3fcefbf8d72378ce61d62afbc380 | onlyshk/epmail | popd_listener_sup.erl | %%%-------------------------------------------------------------------
@author
( C ) 2011 ,
%%% @doc
%%%
%%% @end
Created : 30 Jan 2011 by < >
%%%-------------------------------------------------------------------
-module(popd_listener_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([ini... | null | https://raw.githubusercontent.com/onlyshk/epmail/d08ab8e706a44e5e3287ea4b98490447cfb94448/src/popd_listener_sup.erl | erlang | -------------------------------------------------------------------
@doc
@end
------------------------------------------------------------------- | @author
( C ) 2011 ,
Created : 30 Jan 2011 by < >
-module(popd_listener_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1, stop/0]).
-export([start_child/1]).
-vsn('0.3').
-author('').
start_link() ->
supervisor:start_link({local,?MODULE}, ?MODULE, []).
start_child(Child) ->... |
431239c8694befb3f5a5dd657e6f1b005657d8145300d39a54056ce492fbb418 | ocaml/odoc | test_y.ml | * An other canonical unit test but this time in an .ml file .
@canonical Test . Y
@canonical Test.Y *)
type t
(** @canonical Test.Y_out *)
module Out = struct
type t
end
module In = struct
* @canonical Test .
type t
end
| null | https://raw.githubusercontent.com/ocaml/odoc/97f895a3bf044239eaa10c12ede42c677bac8aa6/test/xref2/canonical_module.t/test_y.ml | ocaml | * @canonical Test.Y_out | * An other canonical unit test but this time in an .ml file .
@canonical Test . Y
@canonical Test.Y *)
type t
module Out = struct
type t
end
module In = struct
* @canonical Test .
type t
end
|
26272c5dc5e10963fb66d96eb96009081754632ebe82753dc96f5eec4b56feae | opencog/opencog | sec.scm | ;
; sec.scm
;
Stimulus Evaluation Check ( SEC ) entity from Process Component Model theory
;
SEC are associated with a particular stimulus or the agent state . Thus , they
; do not have values on their own but only in association with a stimulus.
; Parameter specifying the initial default level for agent-state SEC... | null | https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/opencog/openpsi/dynamics/sec.scm | scheme |
sec.scm
do not have values on their own but only in association with a stimulus.
Parameter specifying the initial default level for agent-state SECs
(define agent-state (Concept (string-append psi-prefix-str "agent-state")))
Set the baseline value as the initial-value
for consi1stency with psi var representatio... | Stimulus Evaluation Check ( SEC ) entity from Process Component Model theory
SEC are associated with a particular stimulus or the agent state . Thus , they
(define agent-state-sec-init-value .5)
Agent ( iow system state )
(define psi-sec-node (Concept (string-append psi-prefix-str "SEC")))
(define (psi-creat... |
90833f6ba20623209ce4e91367c7202b3e116b4ca5aac2654f12b2bbb8ad2f45 | racket/rhombus-prototype | class-primitive.rkt | #lang racket/base
(require (for-syntax racket/base
syntax/parse/pre
"srcloc.rkt")
"name-root.rkt"
"name-root-space.rkt"
"expression.rkt"
"binding.rkt"
(submod "annotation.rkt" for-class)
(submod "dot.rkt" for-dot-provider)
... | null | https://raw.githubusercontent.com/racket/rhombus-prototype/60070a3edd2b850bf429298b84b66eee3ea79194/rhombus/private/class-primitive.rkt | racket | only for binding pattern in translucent mode | #lang racket/base
(require (for-syntax racket/base
syntax/parse/pre
"srcloc.rkt")
"name-root.rkt"
"name-root-space.rkt"
"expression.rkt"
"binding.rkt"
(submod "annotation.rkt" for-class)
(submod "dot.rkt" for-dot-provider)
... |
0cb616a02be8963958c1b9dcce522d28f8ed99c60bd17caf80154f52cbf92724 | jyp/lp-diagrams | Graphviz.hs | {-# LANGUAGE RecordWildCards, ScopedTypeVariables #-}
module Graphics.Diagrams.Graphviz (graph) where
import Graphics.Diagrams.Point as D
import Graphics.Diagrams.Object as D
import Graphics.Diagrams.Core as D
import Graphics.Diagrams.Shape as D
import Graphics.Diagrams.Path
import Data.GraphViz as G
import Data.Graph... | null | https://raw.githubusercontent.com/jyp/lp-diagrams/d334eee4343f340976c09d0da27431d5777a0266/Graphics/Diagrams/Graphviz.hs | haskell | # LANGUAGE RecordWildCards, ScopedTypeVariables #
ToTip | CircleTip | NoTip | StealthTip | LatexTip | ReversedTip LineTip | BracketTip | ParensTip
diaRaw $ tex $ "%Edge: " ++ show attrs ++ "\n"
diaRaw $ tex $ "%Node: " ++ show attrs ++ "\n" | module Graphics.Diagrams.Graphviz (graph) where
import Graphics.Diagrams.Point as D
import Graphics.Diagrams.Object as D
import Graphics.Diagrams.Core as D
import Graphics.Diagrams.Shape as D
import Graphics.Diagrams.Path
import Data.GraphViz as G
import Data.GraphViz.Attributes.Complete as G
import Data.GraphViz.Pars... |
19d700e4bb72aa284cb73d949fd8427f2eb149d2c1ca134a721da8b966c52e54 | frodwith/cl-urbit | axis.lisp | (defpackage #:urbit/nock/axis
(:use #:cl #:urbit/nock/math)
(:export #:decomposable #:tax #:cap #:mas #:peg #:for-axis #:compile-axis
#:dax #:axis #:axis-length #:axis-nth #:subaxis-p
#:axle #:axle-mint #:axle-length #:axle-nth #:subaxle-p))
(in-package #:urbit/nock/axis)
(declaim (optimize
... | null | https://raw.githubusercontent.com/frodwith/cl-urbit/65af924ee58c4c974056f369158bbc1401308fea/nock/axis.lisp | lisp | for indicating how many path elements are in an axis
there is an actual hoon function with this name, and this is how it returns.
bind tail to successive boolean values (true for tail) of axis,
executing forms in those bindings.
an axle is an axis that should be accompanied by its (non-zero) length,
meaning that ... | (defpackage #:urbit/nock/axis
(:use #:cl #:urbit/nock/math)
(:export #:decomposable #:tax #:cap #:mas #:peg #:for-axis #:compile-axis
#:dax #:axis #:axis-length #:axis-nth #:subaxis-p
#:axle #:axle-mint #:axle-length #:axle-nth #:subaxle-p))
(in-package #:urbit/nock/axis)
(declaim (optimize
... |
fbe9b0657a5bfb1480233b3a8839a5ef21529cb1d63d6233b9058d30a0617ae9 | kupl/LearnML | original.ml | type formula =
| True
| False
| Not of formula
| AndAlso of (formula * formula)
| OrElse of (formula * formula)
| Imply of (formula * formula)
| Equal of (exp * exp)
and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp)
let rec arithmetic (f : exp) : int =
match f with
| Num num -> num
... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub63/original.ml | ocaml | type formula =
| True
| False
| Not of formula
| AndAlso of (formula * formula)
| OrElse of (formula * formula)
| Imply of (formula * formula)
| Equal of (exp * exp)
and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp)
let rec arithmetic (f : exp) : int =
match f with
| Num num -> num
... | |
1dc07b1a42b1e7e2927d3d970077f0ac3ad97e95f5a0384e38a7972bfc244105 | mput/sicp-solutions | 1_42.rkt | #lang racket
Solution for exercise 1_42 .
(require rackunit "../solutions/utils.rkt")
(provide compose-fn)
(define (compose-fn fna fnb)
(lambda (x) (fna (fnb x))))
| null | https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/solutions/1_42.rkt | racket | #lang racket
Solution for exercise 1_42 .
(require rackunit "../solutions/utils.rkt")
(provide compose-fn)
(define (compose-fn fna fnb)
(lambda (x) (fna (fnb x))))
| |
2d928aff46e5ab2860ae2079e092a90aab578b70f1781ef5bc72eee0ed57f1c1 | ranjitjhala/sprite-lang | L3.hs | module Language.Sprite.L3 ( sprite ) where
import System.Exit
import qualified Language.Fixpoint.Types as F
import qualified Language . . Types . Config as F
import qualified Language . . Misc as F
import Language . Sprite . L3.Types
import Language.Sprite.L3.C... | null | https://raw.githubusercontent.com/ranjitjhala/sprite-lang/bebfa8a8de6d558853145cbed8c511daa9bda3c7/src/Language/Sprite/L3.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------ | module Language.Sprite.L3 ( sprite ) where
import System.Exit
import qualified Language.Fixpoint.Types as F
import qualified Language . . Types . Config as F
import qualified Language . . Misc as F
import Language . Sprite . L3.Types
import Language.Sprite.L3.C... |
7ddb1191897b948e2b157bdf955363932f9720de6b7f943daefa161f0ced5a61 | MichaelDrogalis/voluble | build_manifest.clj | (ns io.mdrogalis.manifest.build-manifest
(:require [cheshire.core :as json]))
(defn build-manifest []
(let [version (System/getProperty "voluble.version")]
{:title "Voluble"
:version version
:name "voluble"
:description "Intelligent data generator for Apache Kafka. Generates streams of realistic... | null | https://raw.githubusercontent.com/MichaelDrogalis/voluble/e3e46f739271de955b50b1e7d9972e5fd593b870/src-package/clj/io/mdrogalis/manifest/build_manifest.clj | clojure | (ns io.mdrogalis.manifest.build-manifest
(:require [cheshire.core :as json]))
(defn build-manifest []
(let [version (System/getProperty "voluble.version")]
{:title "Voluble"
:version version
:name "voluble"
:description "Intelligent data generator for Apache Kafka. Generates streams of realistic... | |
78e1c6db8d65e60096920b6b38b6fd7009e60753757298099a565f6db04b5d80 | markandrus/twiml-haskell | Syntax.hs | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE PolyKinds #
{-#LANGUAGE RankNTypes #-}
# LANGUAGE TypeOperators #
-------------------------------------------------------------------------------
-- |
-- Module : Text.XML.Twiml.Syntax
Copyright : ( C ) 2018
-- ... | null | https://raw.githubusercontent.com/markandrus/twiml-haskell/3071234aba90b5b86a6f435eaf0e47a218ca103a/src/Text/XML/Twiml/Syntax.hs | haskell | #LANGUAGE RankNTypes #
-----------------------------------------------------------------------------
|
Module : Text.XML.Twiml.Syntax
License : BSD-style (see the file LICENSE)
Stability : provisional
This module, in combination with the @RebindableSyntax@ and @RecordWilCards@
@
import Text.XML.... | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE PolyKinds #
# LANGUAGE TypeOperators #
Copyright : ( C ) 2018
Maintainer : < >
extensions , allows you to write TwiML using do - notation . For example ,
{ -\ # LANGUAGE RebindableSyntax \#- }
{ -\ # L... |
4d2a46c532c1d22483e7e93c59eead81e337094673fb51de68fcf5224f66dd12 | Elzair/nazghul | quest-sys.scm | Defines the basic stuff for the haxima quest system
;; Create a new quest.
;;
;; title - a string that will be shown in the quest log listing and at the top
;; of the quest pane
;;
;; tag - an optional tag (preferably unique) that can be used to retrieve the quest.
;;
descr - a list of strings ( ie paragraph ) tha... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.002/quest-sys.scm | scheme | Create a new quest.
title - a string that will be shown in the quest log listing and at the top
of the quest pane
tag - an optional tag (preferably unique) that can be used to retrieve the quest.
assign - an optional symbol[1] for a proc that will run when the quest is assigned;
of the form (assign quest targ... | Defines the basic stuff for the haxima quest system
descr - a list of strings ( ie paragraph ) that will be shown in the quest pane
status - an optional symbol [ 1 ] for a proc that will be called by the pane , of
Note that this should not be used to update the icon or / done / failed status , as
icon - sy... |
6a7775223629aad71e7d4a0318a5a30966ec672dfbae4adb3d56c9f10ce32e7c | AccelerateHS/accelerate-cuda | Context.hs | # LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
# LANGUAGE ViewPatterns #
-- |
Module : Data . Array . Accelerate . CUDA.Context
Copyright : [ 2013 .. 2014 ] , ,
-- License : BSD3
--
Maintainer : < >
-- Stability : experimental
Portability : non - portable ( GHC extensions... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-cuda/6285f87859788628ce68d1ff76ce7b348f585f9e/Data/Array/Accelerate/CUDA/Context.hs | haskell | |
License : BSD3
Stability : experimental
This module defines the execution context of an Accelerate computation in the
CUDA backend
An execution context
friends
system
| The execution context
# UNPACK #
information on hardware resources
# UNPACK #
device execution context
# UNPACK #
weak pointer ... | # LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
# LANGUAGE ViewPatterns #
Module : Data . Array . Accelerate . CUDA.Context
Copyright : [ 2013 .. 2014 ] , ,
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Array.Accelerate.CUDA.Context (
Context(.... |
90efbe31903411cbea5b04fc7f7ed75a064060aa7aa1d12fad062b5d9d483284 | eholk/harlan | lift-complex.scm | (library
(harlan middle lift-complex)
(export lift-complex
lift-expr)
(import
(rnrs)
(except (elegant-weapons helpers) ident?)
(harlan helpers))
(define lift-expr
(lambda (expr finish)
(match expr
((void) (finish `(void)))
((,t ,n) (guard (scalar-type? t)) (finish `(,t ,n))... | null | https://raw.githubusercontent.com/eholk/harlan/3afd95b1c3ad02a354481774585e866857a687b8/harlan/middle/lift-complex.scm | scheme | (library
(harlan middle lift-complex)
(export lift-complex
lift-expr)
(import
(rnrs)
(except (elegant-weapons helpers) ident?)
(harlan helpers))
(define lift-expr
(lambda (expr finish)
(match expr
((void) (finish `(void)))
((,t ,n) (guard (scalar-type? t)) (finish `(,t ,n))... | |
0e53be33a54f0fd025ee6ff037b1a8dcbb52c6d24b87c6d35379a0b3eeb0ea0a | vbmithr/ocaml-actor | actor_types.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
(* ... | null | https://raw.githubusercontent.com/vbmithr/ocaml-actor/d1c7dd1ad81a8e33efb1de07d5ce7db2edb91273/src/actor_types.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETH... |
7c9b644b0e823b528d7a04c61ad7cbbb8bc3bf3521796d0259cd8235722a586f | fragnix/fragnix | Codec.Compression.Zlib.hs | {-# LANGUAGE Haskell2010 #-}
{-# LINE 1 "Codec/Compression/Zlib.hs" #-}
-----------------------------------------------------------------------------
-- |
Copyright : ( c ) 2006 - 2014
-- License : BSD-style
--
-- Maintainer :
--
Compression and decompression of data streams in the zlib format .
--
... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/application/Codec.Compression.Zlib.hs | haskell | # LANGUAGE Haskell2010 #
# LINE 1 "Codec/Compression/Zlib.hs" #
---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
<>
See also the zlib home page: </>
---------------------------------------------------------------------------
| This module ... | Copyright : ( c ) 2006 - 2014
Compression and decompression of data streams in the zlib format .
The format is described in detail in RFC # 1950 :
module Codec.Compression.Zlib (
streams of data in the zlib format and represented by lazy ' ByteString 's .
This makes it easy to use either in memory or ... |
1fbc953b58b2a34ad5638a9639f6d84bb224771fd85b8c97ab3c452b7d38b140 | mstepniowski/project-euler | euler_030.clj | Solution to Project Euler problem 30
;;
;;
Surprisingly there are only three numbers that can be written as
the sum of fourth powers of their digits :
;;
1634 = 1 ^ 4 + 6 ^ 4 + 3 ^ 4 + 4 ^ 4
8208 = 8 ^ 4 + 2 ^ 4 + 0 ^ 4 + 8 ^ 4
9474 = 9 ^ 4 + 4 ^ 4 + 7 ^ 4 + 4 ^ 4
As 1 = 1 ^ 4 is not a sum it is not incl... | null | https://raw.githubusercontent.com/mstepniowski/project-euler/01d64aa46b21d96fc5291fdf216bf4bad8249029/src/com/stepniowski/euler_030.clj | clojure |
Find the sum of all the numbers that can be written as the sum of | Solution to Project Euler problem 30
Surprisingly there are only three numbers that can be written as
the sum of fourth powers of their digits :
1634 = 1 ^ 4 + 6 ^ 4 + 3 ^ 4 + 4 ^ 4
8208 = 8 ^ 4 + 2 ^ 4 + 0 ^ 4 + 8 ^ 4
9474 = 9 ^ 4 + 4 ^ 4 + 7 ^ 4 + 4 ^ 4
As 1 = 1 ^ 4 is not a sum it is not included .
T... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.