_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 |
|---|---|---|---|---|---|---|---|---|
d6822126de34ccbca561337544e92757ffcb36103c2216572c3d7eb8bd6023b1 | ruricolist/serapeum | internal-definitions.lisp | (in-package :serapeum.tests)
(def-suite internal-definitions :in serapeum)
(in-suite internal-definitions)
(test internal-definitions
(is (eql 2
(local
(def x 1)
(def y (1+ x))
y)))
(is (eql 3
(local
(defun adder (y)
(+ x y)... | null | https://raw.githubusercontent.com/ruricolist/serapeum/d98b4863d7cdcb8a1ed8478cc44ab41bdad5635b/tests/internal-definitions.lisp | lisp | Closures in vars.
Test that the binding from the or doesn't end up outside the
Ensure that forms are partially expanded in the right env.
Defmacro inside progn.
Make sure this branch is not eliminated. | (in-package :serapeum.tests)
(def-suite internal-definitions :in serapeum)
(in-suite internal-definitions)
(test internal-definitions
(is (eql 2
(local
(def x 1)
(def y (1+ x))
y)))
(is (eql 3
(local
(defun adder (y)
(+ x y)... |
e5c52e11d917e14ac67f0ade8c1da1e779f5a69d6b1a0fa0d4db23dff50b01f0 | stamourv/optimization-coach | instrumentation.rkt | #lang racket/base
(require racket/string racket/match racket/list racket/contract
syntax/location racket/logging
"structs.rkt" "sandbox.rkt" "utils.rkt")
(provide/contract
[generate-logs (input-port? port-name? . -> . (values syntax? ; original
... | null | https://raw.githubusercontent.com/stamourv/optimization-coach/dbd6cf06613bf285b4540301ea86dd87239eab7d/optimization-coach/instrumentation.rkt | racket | original
fully expanded
does the log-entry refer to the file we're in?
good, let's keep checking
no location, reject
for hidden costs
get optimizer logs
From mzc, create a log-entry from the info.
From some other optimizer, add to the info log.
can be #f
From TR, use the log-entry struct provided.
build an ... | #lang racket/base
(require racket/string racket/match racket/list racket/contract
syntax/location racket/logging
"structs.rkt" "sandbox.rkt" "utils.rkt")
(provide/contract
(listof log-entry?)
... |
81d11cff443e91d38f891421efa5bdbabe54778de460e99a92added41b36070a | davisp/couchdb | couch_httpd_vhost.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/davisp/couchdb/b0420f9006915149e81607615720f32f21c76725/src/couchdb/couch_httpd_vhost.erl | erlang | use this file except in compliance with the License. You may obtain a copy of
the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(couch_httpd_vhost).
-behaviour(gen_server).
-export([start_link/0, config_change/2, reload/0, get_state/0, dispatch_host/1]).
-export([urlsplit_net... |
c2d99e7d274c6461bb5cd18804d2d2f5340647beb6183ebb7df9c882acb01487 | ozusrl/SubtypedQuotedML | gMap.ml | (*********************************************************************************************************************)
(* *)
... | null | https://raw.githubusercontent.com/ozusrl/SubtypedQuotedML/7b09eb5518dea21fda3dc9db3b966a17225d91ff/src/wallace/gMap.ml | ocaml | *******************************************************************************************************************
... |
, projet Cristal , INRIA Rocquencourt
Copyright 2000 Institut National de Recherche en Informatique et Automatique . Distributed only by per... |
ff01443d90431af4d277399eee783579578f7eede4448f4ecd8dc000d937d85f | jlongster/genetic-canvas | triangulate-ffi.scm |
(c-declare "#include \"triangulate.c\"")
(include "triangulate-ffi#.scm")
(define c-vec2-vector-data
(c-lambda (c-vec2-vector) c-vec2* "___result_voidstar = ___arg1.data;"))
(define c-vec2-vector-length
(c-lambda (c-vec2-vector) int "___result = ___arg1.length;"))
(define make-c-vec2
(c-lambda (float float) c... | null | https://raw.githubusercontent.com/jlongster/genetic-canvas/2592e48ddbd168a819ca6ca330a6f8af6ffc37aa/lib/ffi/triangulate-ffi.scm | scheme |
(c-declare "#include \"triangulate.c\"")
(include "triangulate-ffi#.scm")
(define c-vec2-vector-data
(c-lambda (c-vec2-vector) c-vec2* "___result_voidstar = ___arg1.data;"))
(define c-vec2-vector-length
(c-lambda (c-vec2-vector) int "___result = ___arg1.length;"))
(define make-c-vec2
(c-lambda (float float) c... | |
0f71dfa86d6699d98b659c99b4f4ecb5b20a7f8589ed41e3f5df7fa81187d161 | FranklinChen/hugs98-plus-Sep2006 | PixelMap.hs | --------------------------------------------------------------------------------
-- |
Module : Graphics . Rendering . OpenGL.GL.PixelRectangles . PixelMap
Copyright : ( c ) 2002 - 2005
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer :
-- Stability : provisi... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/OpenGL/Graphics/Rendering/OpenGL/GL/PixelRectangles/PixelMap.hs | haskell | ------------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/OpenGL/LICENSE)
Maintainer :
Stability : provisional
Portability : portable
------------------------------------------------------------------------------
-------------------... | Module : Graphics . Rendering . OpenGL.GL.PixelRectangles . PixelMap
Copyright : ( c ) 2002 - 2005
This module corresponds to a part of section 3.6.1 ( Pixel Storage Modes ) of
the OpenGL 1.5 specs .
module Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelMap (
PixelMapTarget(..), PixelMapCo... |
cc26042c4f443d2b03d622acedc55a955e366bfa946dab58efaf4dca46ac71bd | jaseemabid/mit-scheme | fcomp.scm | (declare (usual-integrations))
(define (compile exp)
(compile-expr exp #F))
(define (compile-expr exp s-env)
(let ((exp (macro-expand exp)))
(cond ((symbol? exp)
(compile-lookup exp s-env))
((not (pair? exp))
(compile-constant exp s-env))
((eq? (car exp) 'QUOTE)
(compile-constant (second exp... | null | https://raw.githubusercontent.com/jaseemabid/mit-scheme/d30da6b2c103e34b6e0805bd5cbefeb9501382c1/v8/src/bench/fcomp.scm | scheme | returns an access path, either pair from the global env or a
(spine-index.frame-index) pair
rest arg | (declare (usual-integrations))
(define (compile exp)
(compile-expr exp #F))
(define (compile-expr exp s-env)
(let ((exp (macro-expand exp)))
(cond ((symbol? exp)
(compile-lookup exp s-env))
((not (pair? exp))
(compile-constant exp s-env))
((eq? (car exp) 'QUOTE)
(compile-constant (second exp... |
993e4fb32891095ded9a2c297e540c5e39031afccc67e25355ac2a7f0ee348b5 | codinuum/cca | tokens_.ml |
Copyright 2013 - 2018 RIKEN
Copyright 2018 - 2020 Chiba Institude of Technology
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required b... | null | https://raw.githubusercontent.com/codinuum/cca/88ea07f3fe3671b78518769d804fdebabcd28e90/src/ast/analyzing/langs/fortran/parsing/src/tokens_.ml | ocaml | tokens_.ml
new Parser_aux.env
new Context.stack env |
Copyright 2013 - 2018 RIKEN
Copyright 2018 - 2020 Chiba Institude of Technology
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required b... |
624ffa4181a517077494f1b5f1bb1e26e64a5a9a8b6b358c5a46fc097ded1b8b | omkamra/cowbells | cowbells.clj | (ns omkamra.cowbells
(:require [omkamra.sequencer :as sequencer]
[omkamra.sequencer.protocols.Target :as Target]))
(def default-sequencer
(sequencer/create))
(defmacro defproject
[project-name project-options]
(assert (and (map? project-options)
(or (map? (:targets project-options))... | null | https://raw.githubusercontent.com/omkamra/cowbells/10beefd45663c3f397dd6da62ab55fe44c8eaab1/src/omkamra/cowbells.clj | clojure | (ns omkamra.cowbells
(:require [omkamra.sequencer :as sequencer]
[omkamra.sequencer.protocols.Target :as Target]))
(def default-sequencer
(sequencer/create))
(defmacro defproject
[project-name project-options]
(assert (and (map? project-options)
(or (map? (:targets project-options))... | |
f260bd5d6a6e4885e3d56ebad399ad2d8816940109d28f0dd6ecd2c20a87d905 | meamy/feynman | Univariate.hs | |
Module : Univariate
Description : Univariate polynomials ( notably cyclotomics )
Copyright : ( c ) , 2020
Maintainer :
Stability : experimental
Portability : portable
Module : Univariate
Description : Univariate polynomials (notably cyclotomics)
Copyright : (c) Matthew Amy, 2020
... | null | https://raw.githubusercontent.com/meamy/feynman/f3b8ed7ce774577b64d67e7deafbf8ef3ba633bb/src/Feynman/Algebra/Polynomial/Univariate.hs | haskell | ------------------------------
Univariate polynomials
------------------------------
| Univariate polynomials over the ring 'r'
| Print a univariate polynomial with a particular variable name
| Normalize a univariate polynomial
| The unique univariate variable
| Constant polynomial
| Multiply by a scalar
------... | |
Module : Univariate
Description : Univariate polynomials ( notably cyclotomics )
Copyright : ( c ) , 2020
Maintainer :
Stability : experimental
Portability : portable
Module : Univariate
Description : Univariate polynomials (notably cyclotomics)
Copyright : (c) Matthew Amy, 2020
... |
a970cad08590e43694626ef515f75828dc713a4e65120214e1f61116b4a09316 | iamFIREcracker/adventofcode | day03.lisp | (defpackage :aoc/2020/03 #.cl-user::*aoc-use*)
(in-package :aoc/2020/03)
(defun parse-map (data)
(let ((rows (length data)) (columns (length (first data))))
(make-array (list rows columns) :initial-contents data)))
(defun count-hits (map delta-col delta-row)
;; I was previously destructuring `rows` and `cols`... | null | https://raw.githubusercontent.com/iamFIREcracker/adventofcode/e5b2dfddbe478f698cfff8a84c5007fa374fa09c/src/2020/day03.lisp | lisp | I was previously destructuring `rows` and `cols` inside the for loop:
(loop with (rows cols) = (array-dimensions map)
...
That however gets expanded in such a way that the compiler would
throw a style warning:
- LOOP's destructuring bind would not signal an error if the list you are
DESTRUCTURING-BI... | (defpackage :aoc/2020/03 #.cl-user::*aoc-use*)
(in-package :aoc/2020/03)
(defun parse-map (data)
(let ((rows (length data)) (columns (length (first data))))
(make-array (list rows columns) :initial-contents data)))
(defun count-hits (map delta-col delta-row)
- But NIL is not a NUMBER , hence the warning
(de... |
37144b6666e234e695d9bfdc08b8b38c69fd076b1a61d88bc409c09abb437a0c | herd/herdtools7 | proc.mli | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/lib/proc.mli | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2019 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
c5ef2670df05cd3752a7dc46069cc6e768838f3ab084328c109d0a692bcec06f | katydid/katydid-haskell | Smart.hs | -- |
-- This module describes the smart constructors for Relapse patterns.
module Data.Katydid.Relapse.Smart
( Pattern(..)
, Grammar
, lookupRef
, compile
, emptyPat
, zanyPat
, nodePat
, orPat
, andPat
, notPat
, concatPat
, interleavePat
, zeroOrMorePat
, optionalPat
, containsPat
, re... | null | https://raw.githubusercontent.com/katydid/katydid-haskell/4588cd8676628cd15c671d61b65bdc2f3a199a38/src/Data/Katydid/Relapse/Smart.hs | haskell | |
This module describes the smart constructors for Relapse patterns.
| compile complies an ast into a smart grammar.
making sure that the main reference exists.
|
Pattern recursively describes a Relapse Pattern.
cmp is an efficient comparison function for patterns.
It is very important that cmp is efficient,
... | module Data.Katydid.Relapse.Smart
( Pattern(..)
, Grammar
, lookupRef
, compile
, emptyPat
, zanyPat
, nodePat
, orPat
, andPat
, notPat
, concatPat
, interleavePat
, zeroOrMorePat
, optionalPat
, containsPat
, refPat
, emptySet
, unescapable
, nullable
, lookupMain
)
where
im... |
22981fff90641fcff7e3fb77dd4fbe14d0a022d5994f0b0473f140e4cb97ff7b | joelburget/lvca | LanguageDiagram.ml | Inspiration : 's diagrams package , *
* Questions : What should be primitive ? How do we define a standard library ?
*
* Questions: What should be primitive? How do we define a standard library?
*)
let abstract_syntax =
{|
// rational?
// global: float
diagram :=
| atop(diagram; diagram)
| beside(... | null | https://raw.githubusercontent.com/joelburget/lvca/04ce0e68fa330576954deadab9101dc2fe777216/experimental/languages/LanguageDiagram.ml | ocaml | Inspiration : 's diagrams package , *
* Questions : What should be primitive ? How do we define a standard library ?
*
* Questions: What should be primitive? How do we define a standard library?
*)
let abstract_syntax =
{|
// rational?
// global: float
diagram :=
| atop(diagram; diagram)
| beside(... | |
373348f94e4bb316465f6ea5c5503daf9276c58bc00997c17392a0e96c2fff04 | ds-wizard/engine-backend | Detail_Bundle_GET.hs | module Registry.Specs.API.Package.Detail_Bundle_GET (
detail_bundle_get,
) where
import Data.Aeson (encode)
import qualified Data.ByteString.Char8 as BS
import Network.HTTP.Types
import Network.Wai (Application)
import Test.Hspec
import Test.Hspec.Wai hiding (shouldRespondWith)
import Test.Hspec.Wai.Matcher
import ... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/090f4f3460e8df128e88e2c3ce266b165e4a0a50/engine-registry/test/Registry/Specs/API/Package/Detail_Bundle_GET.hs | haskell | ------------------------------------------------------------------------
GET /packages/{pkgId}/bundle
------------------------------------------------------------------------
----------------------------------------------------
----------------------------------------------------
---------------------------------... | module Registry.Specs.API.Package.Detail_Bundle_GET (
detail_bundle_get,
) where
import Data.Aeson (encode)
import qualified Data.ByteString.Char8 as BS
import Network.HTTP.Types
import Network.Wai (Application)
import Test.Hspec
import Test.Hspec.Wai hiding (shouldRespondWith)
import Test.Hspec.Wai.Matcher
import ... |
9971e116159d25cd2dc95290f1d89dcdcb02ceda09d9952194d6af57d5f380cb | bvaugon/ocapic | camlinternalMod.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/lib/camlinternalMod.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2004 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type shape =
| Function
| Lazy
| Class
| Module of shape array
| Value of Obj.t
let overwrite ... |
3f43611fa881c6fb62cf4ed1e6e4a68efabb3c7f710e02a658a96ad63e7062bd | bytekid/mkbtt | miniSmt.ml | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either ve... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/logic/src/miniSmt.ml | ocaml | ** MODULES *****************************************************************
** FUNCTIONS ***************************************************************
replace by new process module begin
Unix.close r;
set handler at exit to what
everything computed
waiting for result
Unix.close din;
Unix.close derr;
r... | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either ve... |
f03049bb10190be46a8562b0add863544ea25eae46c23de8b94b563a918d7c31 | charlieg/Sparser | do-transitions.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1993,1994 -- all rights reserved
;;;
;;; File: "do transitions"
Module : " : names : fsa : "
version : 0.1 February 1994
;; -.3 (12/17/93) added a catch to handle the fact that the capitalization of
;; headers wil... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/model/core/names/fsa/do-transitions.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "do transitions"
-.3 (12/17/93) added a catch to handle the fact that the capitalization of
headers will catch them up in the initial scan. (12/22) fixed a ramification
of all that.
over words.
----------------------
debugging pa... | copyright ( c ) 1993,1994 -- all rights reserved
Module : " : names : fsa : "
version : 0.1 February 1994
-.2 ( 12/30 ) extended fsa driver to filter out literals from multiple edges
-.1 ( 1/6/94 ) adding cut - off switch to avoid running the network , etc .
0.0 ( 1/27/94 v2.3 ) broken out f... |
40607a080c26a5dc658837d02657de7ecd979f732743b7989c0434a0a30361f5 | jabber-at/ejabberd | acme_challenge.erl | -module(acme_challenge).
-export ([key_authorization/2,
solve_challenge/3,
process/2,
register_hooks/1,
unregister_hooks/1,
acme_handler/3
]).
%% Challenge Types
%% ================
1 . http-01 : -ietf-acme-acme-05#section-7.2
2 . :
3 . tls - sni-01 : -ietf-acme-acme-05#section-7.4
4 ... | null | https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/acme_challenge.erl | erlang | Challenge Types
================
This is the default endpoint for the http challenge
This hooks is called from ejabberd_http
TODO: Maybe validate request here??
Useful functions | -module(acme_challenge).
-export ([key_authorization/2,
solve_challenge/3,
process/2,
register_hooks/1,
unregister_hooks/1,
acme_handler/3
]).
1 . http-01 : -ietf-acme-acme-05#section-7.2
2 . :
3 . tls - sni-01 : -ietf-acme-acme-05#section-7.4
4 . ( ? ) oob-01 : -ietf-acme-acme-05#s... |
7a381e25811821a34aea73aecfd76dedb1adcdcb1824dd5ecdd5de04b2ca75ac | kowainik/smuggler | TypeUnused.hs | module Test.TypeUnused where
import Data.Bool (Bool, not)
foo = not
| null | https://raw.githubusercontent.com/kowainik/smuggler/b2ddcdad06a270e0b956f2203f9bebcd72301c53/test/Test/TypeUnused.hs | haskell | module Test.TypeUnused where
import Data.Bool (Bool, not)
foo = not
| |
4c15a2ebba994e63215d793639552f8dd51f1072ff8c81718b43e5a18f5f9f01 | geophf/1HaskellADay | Exercise.hs | module Y2017.M02.D06.Exercise where
-
As promised , a problem .
This problem is from / and reads thus :
Counting Subsets , solved by 1457 as of February 6th , 2017 :
Characters and SNPs
A character is any feature ( genetic , physical , etc . ) that divides a collection
of organisms into two separate g... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2017/M02/D06/Exercise.hs | haskell | } | module Y2017.M02.D06.Exercise where
-
As promised , a problem .
This problem is from / and reads thus :
Counting Subsets , solved by 1457 as of February 6th , 2017 :
Characters and SNPs
A character is any feature ( genetic , physical , etc . ) that divides a collection
of organisms into two separate g... |
cc4bbf19e89aef18b8c6f22189361cc88e83b5643e77eb46bfd27a57a19b96b5 | juji-io/datalevin | perf.cljc | (ns datalevin-bench.perf
(:require
[clojure.string :as str]
[datalevin-bench.core :as core]
#?(:clj clojure.java.shell))
#?(:cljs (:require-macros datalevin-bench.perf)))
(def ^:const enabled? true)
(def ^:dynamic debug? false)
#?(:cljs (enable-console-print!))
;; helpers
(defn pad [n l]
(let ... | null | https://raw.githubusercontent.com/juji-io/datalevin/ab421c34b9abee61ef574a57fb1c75f9033fbba2/bench/src/datalevin_bench/perf.cljc | clojure | helpers
flame graph
minibench | (ns datalevin-bench.perf
(:require
[clojure.string :as str]
[datalevin-bench.core :as core]
#?(:clj clojure.java.shell))
#?(:cljs (:require-macros datalevin-bench.perf)))
(def ^:const enabled? true)
(def ^:dynamic debug? false)
#?(:cljs (enable-console-print!))
(defn pad [n l]
(let [s (str n)]... |
50d1c61b4e256a15882d01b7e81a4f42a7bba2f2c644ff1ef9b858bebda54cf1 | well-typed-lightbulbs/ocaml-esp32 | main_args.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/driver/main_args.ml | ocaml | ************************************************************************
OCaml
... | , projet Para , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
let mk_a f =
"-a", Arg.Unit f, " Build a library"
;;
let mk_alert f =
"-alert", Arg.String f,
Printf... |
3ef9080e9a3ab057c2682095f50b57d6e0966b2aed59cf8b0cc330cf44f2b728 | bugarela/GADTInference | e4.hs | data T a where {TInt :: (a ~ Bool) => Int -> T a; TAny :: T a}
e = \x -> case x of {TAny -> True;TInt n -> (n > 0)}
-- T t -> Bool
| null | https://raw.githubusercontent.com/bugarela/GADTInference/dd179f6df2cd76055c25c33da3187a60815688d1/examples/inferred/e4.hs | haskell | T t -> Bool | data T a where {TInt :: (a ~ Bool) => Int -> T a; TAny :: T a}
e = \x -> case x of {TAny -> True;TInt n -> (n > 0)}
|
9c254b5bbde38ce1104a72b2ee8f1ef17db86664f2b2bf86b0ff998966a8b6aa | snorecone/meru | meru_riak.erl | -module(meru_riak).
-compile({inline, [do_call/3]}).
-export([
start_link/1,
get/3,
put/2,
delete/3,
mapred/3,
call/3,
transaction/2,
multi_transaction/3
]).
%%
%% API.
%%
start_link([Host, Port]) ->
riakc_pb_socket:start_link(Host, Port).
get(Pool, Bucket, Key) when is_atom(Pool)... | null | https://raw.githubusercontent.com/snorecone/meru/01e8ebe5da49f41bf5392be06c784c0550afbd3d/src/meru_riak.erl | erlang |
API.
private
| -module(meru_riak).
-compile({inline, [do_call/3]}).
-export([
start_link/1,
get/3,
put/2,
delete/3,
mapred/3,
call/3,
transaction/2,
multi_transaction/3
]).
start_link([Host, Port]) ->
riakc_pb_socket:start_link(Host, Port).
get(Pool, Bucket, Key) when is_atom(Pool) ->
do_cal... |
73abb374e5dd5326c1d9ae3f6a444e32ae9e18c03788b338ca16de0f2da12fbb | bobzhang/fan | b.ml |
%create{b};;
%extend{
b: [L1 Str as s %{s}]
}
(* local variables: *)
(* compile-command: "ocamlc -I ../../common -I ../../cold -pp ../../fan -c b.ml" *)
(* end: *)
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/unitest/suites/b.ml | ocaml | local variables:
compile-command: "ocamlc -I ../../common -I ../../cold -pp ../../fan -c b.ml"
end: |
%create{b};;
%extend{
b: [L1 Str as s %{s}]
}
|
06953a58634a7775718bcb09c0a39faaf3e40effd72bc88720f9e7d411346d8c | marick/fp-oo | add-and-make-2b.clj | This version will work with Triangle
(def make
(fn [type & args]
(apply type args)))
(prn (make Triangle (make Point 1 2)
(make Point 1 3)
(make Point 3 1)))
| null | https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/solutions/pieces/add-and-make-2b.clj | clojure | This version will work with Triangle
(def make
(fn [type & args]
(apply type args)))
(prn (make Triangle (make Point 1 2)
(make Point 1 3)
(make Point 3 1)))
| |
87a5bb6e13eec57405d7289c6923488d1b8515b1ba348b91b676369cb9f88813 | jbclements/portaudio | stream-play.rkt | #lang racket/base
(require racket/match
racket/place
ffi/unsafe
"portaudio.rkt"
"callback-support.rkt"
"devices.rkt"
(rename-in racket/contract [-> c->]))
;; this file contains the code required to play streams
(define nat? exact-nonnegative-integer?)
;; using ... | null | https://raw.githubusercontent.com/jbclements/portaudio/77a03c86054a5d7a26ed0082215b61162eb8b651/portaudio/stream-play.rkt | racket | this file contains the code required to play streams
using this contract would kill runtimes:
could be sample-setter/c
leaving this one out, too, to save runtime. might not be worth it:
could be buffer-filler/unsafe/c
we insist on an engine with latency at least this low:
the wake interval for the buffer-filler:... | #lang racket/base
(require racket/match
racket/place
ffi/unsafe
"portaudio.rkt"
"callback-support.rkt"
"devices.rkt"
(rename-in racket/contract [-> c->]))
(define nat? exact-nonnegative-integer?)
(define sample-setter/c (c-> nat? nat? void?))
... |
d8157a1046d25b9d2d800affc50d543939157f1f4fd632a3334b822f9d3e9e48 | typedclojure/typedclojure | memoize.clj | (ns typed-test.clj.spec.memoize
(:require [clojure.alpha.spec :as s]
[clojure.alpha.spec.protocols :as protocols
:refer [Spec conform* unform* explain* gen* with-gen* describe*
Schema keyspecs*
Select]]
[clojure.alpha.spec.gen :as gen]
... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/45556897356f3c9cbc7b1b6b4df263086a9d5803/typed/clj.spec/test/typed_test/clj/spec/memoize.clj | clojure | clojure.core/memoize (All [x y ...]
[[y ... y -> x] -> [y ... y -> x]])
a slightly less thorough memoize function.. | (ns typed-test.clj.spec.memoize
(:require [clojure.alpha.spec :as s]
[clojure.alpha.spec.protocols :as protocols
:refer [Spec conform* unform* explain* gen* with-gen* describe*
Schema keyspecs*
Select]]
[clojure.alpha.spec.gen :as gen]
... |
06351d4827ae3cb0e93ce6dcb90917d7949b691fd718cf8c2115860840257b8c | gar1t/modlib | modlib_sup.erl | -module(modlib_sup).
-export([start_link/0]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, httpd_sup, [httpd_servers()]).
httpd_servers() ->
case application:get_env(servers) of
undefined -> [];
{ok, Servers} ->
lists:map(fun server_to_httpd_c... | null | https://raw.githubusercontent.com/gar1t/modlib/e1e0b2aa160a760964a0508283146af81800d098/src/modlib_sup.erl | erlang | -module(modlib_sup).
-export([start_link/0]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, httpd_sup, [httpd_servers()]).
httpd_servers() ->
case application:get_env(servers) of
undefined -> [];
{ok, Servers} ->
lists:map(fun server_to_httpd_c... | |
9b60c333033d05849f6466fad40cf14495fd1a828bf51d11adb990bbbd786f93 | tcoram/maunder | maunder.erl | %%%-------------------------------------------------------------------
The contents of this file are subject to the Mozilla Public License
%% Version 2.0 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under th... | null | https://raw.githubusercontent.com/tcoram/maunder/ae8f8f286d51841087f7df79a37b6f3d882a19c2/src/maunder.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language gove... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
@author < >
( C ) 2012,2013 Todd Coram
Created : 27 Jul 2012 by < ) >
-module(maunder).
-export([start/0, stop/0]).
ensure_started(App) ->
case application:start(... |
2e7f151e9a9c4f114ee7253ac6d91f4205cce17d3719934131242a6ae029a5e8 | onedata/op-worker | replica_eviction_transfers_rest_test_SUITE.erl | %%%-------------------------------------------------------------------
@author
( C ) 2018 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%%--------------------------------------------------------------------
%%% @doc
%%% This module contains tests of replica evic... | null | https://raw.githubusercontent.com/onedata/op-worker/afc25178632796e095468a491a7d91b9d47aeafb/test_distributed/replica_eviction_transfers_rest_test_SUITE.erl | erlang | -------------------------------------------------------------------
--------------------------------------------------------------------
@doc
This module contains tests of replica eviction jobs, scheduled via REST.
@end
-------------------------------------------------------------------
API
fail_to_evict_file_r... | @author
( C ) 2018 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(replica_eviction_transfers_rest_test_SUITE).
-author("Jakub Kudzia").
-include("global_definitions.hrl").
-include("modules/fslogic/acl.hrl").
-include_lib("ctool/include/logging.hrl").
-in... |
cdaa7da485febcde05b0f7592190181a39614ebc92b8f7b61a52809b67a6e6a8 | mfoemmel/erlang-otp | wx_gen_cpp.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/api_gen/wx_gen_cpp.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
File : wx_gen_cpp.erl
Author : ... |
44ed7349b2281a2e52507df5805717bc1258aa16132a4eeb51f15117a48cfb4e | tezos/tezos-mirror | sc_rollup_arith.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/8ec9e944344bde6b2cc12332edc6236cbbd9ebc6/src/proto_alpha/lib_protocol/sc_rollup_arith.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
823f73976022e05979b3c2c0432ec73dd97537a0527a956fc6fae3505201584d | kerneis/cpc | util.ml | let list_array_map f l =
Array.to_list (Array.map f (Array.of_list l))
let rec count_map f l ctr =
match l with
| [] -> []
| [x] -> [f x]
| [x;y] ->
(* order matters! *)
let x' = f x in
let y' = f y in
[x'; y']
| [x;y;z] ->
let x' = f x in
let y'... | null | https://raw.githubusercontent.com/kerneis/cpc/0ca695d25e58dadbd92639162338a06a517875d9/ocamlutil/util.ml | ocaml | order matters! | let list_array_map f l =
Array.to_list (Array.map f (Array.of_list l))
let rec count_map f l ctr =
match l with
| [] -> []
| [x] -> [f x]
| [x;y] ->
let x' = f x in
let y' = f y in
[x'; y']
| [x;y;z] ->
let x' = f x in
let y' = f y in
let z' = f ... |
8037830e8e7c3e192e4f01484ce8fbd2dde53da4c8dde1fb8835a40f4e4735aa | chrovis/cljam | header.clj | (ns cljam.io.sam.util.header
"Utility functions for SAM header."
(:refer-clojure :exclude [sorted?])
(:require [clojure.string :as cstr]
[cljam.io.sam.common :as sam-common])
(:import clojure.lang.IEditableCollection))
;;; parse
(defn- parse-header-keyvalues
"e.g. \"LN:45 SN:ref\" -> {:LN 45, :S... | null | https://raw.githubusercontent.com/chrovis/cljam/2b8e7386765be8efdbbbb4f18dbc52447f4a08af/src/cljam/io/sam/util/header.clj | clojure | parse
stringify
@HD | (ns cljam.io.sam.util.header
"Utility functions for SAM header."
(:refer-clojure :exclude [sorted?])
(:require [clojure.string :as cstr]
[cljam.io.sam.common :as sam-common])
(:import clojure.lang.IEditableCollection))
(defn- parse-header-keyvalues
"e.g. \"LN:45 SN:ref\" -> {:LN 45, :SN \"ref\"}... |
b1169fdb63f108c47c7eabd3a825c19d215c8651a99759653f0fe9142ec977f8 | selfsame/procadia2016 | gif.clj | (ns game.gif
(require [arcadia.core :as a]
[game.data :as data]
[tween.core :refer :all])
(import [Moments Recorder]
[UnityEngine Canvas CanvasGroup]))
(def already-recording? (atom false))
(defn start-recording []
(let [recording-canvas (a/cmpt (a/object-named "recording-canvas") Canv... | null | https://raw.githubusercontent.com/selfsame/procadia2016/31ecd59a776e1731b1a99cd9f6f2f511cde1d053/Assets/game/gif.clj | clojure | (ns game.gif
(require [arcadia.core :as a]
[game.data :as data]
[tween.core :refer :all])
(import [Moments Recorder]
[UnityEngine Canvas CanvasGroup]))
(def already-recording? (atom false))
(defn start-recording []
(let [recording-canvas (a/cmpt (a/object-named "recording-canvas") Canv... | |
ec3c4e163b43ff0a588ee83277306ef0dbe5e2f4309f6e3108cfc95c550b6f43 | casperschipper/ocaml-cisp | cisp2.ml | open Cisp
open Midi
open Seq
simple mod of controller 1 onto pitch
let sr = ref 44100.0
type data = {c1: int; p: pitch; c2: int}
let currentState = ref {c1= 0; p= Pitch 0; c2= 0}
let pitchControl3 =
let ( let* ) x f = Reader.bind f x in
let* (MidiVal ctrl1) = MidiState.getControlR (MidiCh 0) (MidiCtrl 3) in
... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/examples/cisp_backup/vpnPatch/cisp2.ml | ocaml | create trigger from note On
write state ref
this maps midi input msg to an output msg (raw midi)
take msg, make it a state
run a bunch of readers to extract properties
turn back into raw midi | open Cisp
open Midi
open Seq
simple mod of controller 1 onto pitch
let sr = ref 44100.0
type data = {c1: int; p: pitch; c2: int}
let currentState = ref {c1= 0; p= Pitch 0; c2= 0}
let pitchControl3 =
let ( let* ) x f = Reader.bind f x in
let* (MidiVal ctrl1) = MidiState.getControlR (MidiCh 0) (MidiCtrl 3) in
... |
a0630b88c1fe6b7e39fffe5b8cfe97252a4cff84c44ae494057fc4abf78b75c8 | geneweb/geneweb | version.mli | val txt : string
(** Current Geneweb version *)
val available_languages : string list
(** List of all supported by Geneweb languages (abbreviations). *)
| null | https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/lib/version.mli | ocaml | * Current Geneweb version
* List of all supported by Geneweb languages (abbreviations). | val txt : string
val available_languages : string list
|
24c50a7e1851e5a4d69a13a4b632b02093de9649ac55119602c6ec44d050e914 | cbaggers/cepl.sdl2-ttf | text-to-tex.lisp | (in-package #:cepl.sdl2-ttf)
(defun init-cepl-sdl2-ttf ()
(unless (= 1 (sdl2-ttf:was-init))
(assert (and (find-package :cepl.sdl2)
(not (cepl.lifecycle:uninitialized-p)))
() "CEPL must be initialized before text-to-tex")
(unless (= 0 (sdl2-ttf:init))
(error "Failed to initi... | null | https://raw.githubusercontent.com/cbaggers/cepl.sdl2-ttf/11b498a3eb582ffcd41797c039a2f806bdf6d84b/text-to-tex.lisp | lisp | (in-package #:cepl.sdl2-ttf)
(defun init-cepl-sdl2-ttf ()
(unless (= 1 (sdl2-ttf:was-init))
(assert (and (find-package :cepl.sdl2)
(not (cepl.lifecycle:uninitialized-p)))
() "CEPL must be initialized before text-to-tex")
(unless (= 0 (sdl2-ttf:init))
(error "Failed to initi... | |
c2b33eecf8f649b8ca563341c5ba78c72f9d52a6a67b19da20a006b42864ed1a | cgrand/parsley | grammar.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/cgrand/parsley/c5c4783b5976b9412c80f35cf48ce79e77c9fee5/src/net/cgrand/parsley/grammar.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns net.cgrand.parsley.grammar
(:require [net.cgrand.parsley.util :as u]))
(defprotocol RuleFragment
(unsugar [fragment] "Remove sugarized forms")
(collect [fragment unspaced top-rulename] "Collect \"anonymous\" productions")
(develop [fragment rewrite space]
... |
eb6c6787eb0371a82696d528e5b89100224cb533b83a3d07dc924fdcfcf9ad3b | travelping/ergw_aaa | radius_SUITE.erl | Copyright 2017 - 2019 , Travelping GmbH < >
%% This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version
2 of the License , or ( at your option ) any later version .
-module(radius_SU... | null | https://raw.githubusercontent.com/travelping/ergw_aaa/963173d311552775d81e84959d5d8d69eca4016a/test/radius_SUITE.erl | erlang | This program is free software; you can redistribute it and/or
Common Test callbacks
===================================================================
Common Test callbacks
===================================================================
===================================================================
Test c... | Copyright 2017 - 2019 , Travelping GmbH < >
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version
2 of the License , or ( at your option ) any later version .
-module(radius_SUITE).
-compile([export_all, nowarn_export_all]).
-include_lib("... |
61b6780fa4a56600270cc137be33ae16d1c4233a7801fcb90a211f95b8521678 | softwarelanguageslab/maf | procedure.scm | (procedure? car)
| null | https://raw.githubusercontent.com/softwarelanguageslab/maf/daf47e4bf939936535739a83fcf9c09bc93f287f/test/R5RS/various/procedure.scm | scheme | (procedure? car)
| |
1da1aa45da751054fd66e0803dfadcb3dd72502640d579e25a7ce0e72c7f5dc7 | DanielG/cabal-helper | Lib.hs | module Lib where
lib = ()
| null | https://raw.githubusercontent.com/DanielG/cabal-helper/0e9df088226d80669dd0882ed743bca871dce61c/tests/multipkg/proj/pkg-a/Lib.hs | haskell | module Lib where
lib = ()
| |
5fdf1e823f6523e92a6f69b02e72bf09909c44fa4509d8f42751d0143e637bbe | monadbobo/ocaml-core | time.ml | open Common
open Std_internal
module Unix = Core_unix
this is a recreation of the algorithm used internally by the linux kernel
( supposedly invented by Gauss ) . In this case it is used to produce the number
of seconds since 1970 - 01 - 01 00:00:00 using epoch time semantics ( 86,400 seconds
per day
... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/time.ml | ocaml | shifted epoch for the time zone for conversion
A thin caching layer over the actual of_epoch (of_epoch_internal just above) used only
to gain some speed when we translate the same time/date over and over again
= 8 + 1 + 12
* Pause and don't allow events to interrupt.
* Pause but allow events to interrupt. | open Common
open Std_internal
module Unix = Core_unix
this is a recreation of the algorithm used internally by the linux kernel
( supposedly invented by Gauss ) . In this case it is used to produce the number
of seconds since 1970 - 01 - 01 00:00:00 using epoch time semantics ( 86,400 seconds
per day
... |
4775e4534cdc380b802d6f6f516e2f98f68b927750a89c6f27a0cbcd409fe166 | fragnix/fragnix | DataFamilies.hs | # LANGUAGE TypeFamilies , MultiParamTypeClasses #
module DataFamilies where
data family Vector a
newtype instance Vector Bool = V_Bool [Bool]
f :: Vector Bool -> ()
f (V_Bool v) = ()
class GVector v a where
basicLength :: v a -> Int
instance GVector Vector Bool where
basicLength (V_Bool v) = length v
| null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/quick/DataFamilies/DataFamilies.hs | haskell | # LANGUAGE TypeFamilies , MultiParamTypeClasses #
module DataFamilies where
data family Vector a
newtype instance Vector Bool = V_Bool [Bool]
f :: Vector Bool -> ()
f (V_Bool v) = ()
class GVector v a where
basicLength :: v a -> Int
instance GVector Vector Bool where
basicLength (V_Bool v) = length v
| |
c3385144def3c8adfb9616c87d4cbaddb1f591c973600844beb33cff98c97026 | ghc/packages-Cabal | ParseResult.hs | # LANGUAGE BangPatterns #
# LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
| A parse result type for parsers from AST to types .
module Distribution.Fields.ParseResult (
ParseResult,
runParseResult,
recoverWith,
parseWarning,
parseWarnings,
p... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/Cabal/Distribution/Fields/ParseResult.hs | haskell | # LANGUAGE RankNTypes #
| A monad with failure and accumulating errors and warnings.
failure, but we were able to recover a new-style spec-version declaration
success
Note: we have version here, as we could get any version.
@since 3.4.0.0
a successful value or
list of errors and possibly recovered a spec-... | # LANGUAGE BangPatterns #
# LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
| A parse result type for parsers from AST to types .
module Distribution.Fields.ParseResult (
ParseResult,
runParseResult,
recoverWith,
parseWarning,
parseWarnings,
parseFailure,
parseFatalFailure... |
1a821883583b34893c67a5826573373d0ee21cf87f6c0a3ae204dafec9a31300 | clj-easy/graalvm-clojure | main.clj | (ns simple.main
(:require [safely.core :refer [safely]])
(:gen-class))
(defn -main [& [file]]
(println "Attempting to read file:" file)
(safely
(println (slurp file))
:on-error
:max-retry 10
:log-stacktrace false
:circuit-breaker :read-file))
| null | https://raw.githubusercontent.com/clj-easy/graalvm-clojure/5de155ad4f95d5dac97aac1ab3d118400e7d186f/safely/src/simple/main.clj | clojure | (ns simple.main
(:require [safely.core :refer [safely]])
(:gen-class))
(defn -main [& [file]]
(println "Attempting to read file:" file)
(safely
(println (slurp file))
:on-error
:max-retry 10
:log-stacktrace false
:circuit-breaker :read-file))
| |
7ea0394181d44c24304dbca825f330ccf38f43d22cc2e1682641ffdd22af6542 | franzinc/clim2 | x11-keysyms.lisp | ;; See the file LICENSE for the full license governing this code.
;;
( c ) Copyright 1990 Sun Microsystems , Inc. All Rights Reserved .
;;
( c ) Copyright 1989 , 1990 , 1991 Sun Microsystems , Inc. Sun design
patents pending in the U.S. and foreign countries . OPEN LOOK is a
registered trade... | null | https://raw.githubusercontent.com/franzinc/clim2/e8d03da80e1f000be40c37d088e283d95365bfdd/xlib/x11-keysyms.lisp | lisp | See the file LICENSE for the full license governing this code.
trademark is hereby granted only in association with the images
and fonts described in this file.
MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF
WITH REGARD TO THIS CODE, INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILIT... |
( c ) Copyright 1990 Sun Microsystems , Inc. All Rights Reserved .
( c ) Copyright 1989 , 1990 , 1991 Sun Microsystems , Inc. Sun design
patents pending in the U.S. and foreign countries . OPEN LOOK is a
registered trademark of USL . Used by written permission of the owners .
( c ) Co... |
9d36c20c394f9e3e069b65fc6d2dc3c417a9ef3039d910a6c721397b5f1b4a30 | wdhowe/telegrambot-lib | methods.clj | (ns telegrambot-lib.api.methods
"Telegram Bot API Methods - function implementations.
- <#available-methods>
Most functions are multi-arity with the following options:
- Send all parameters in a 'content' map.
- Send only the required parameters as simple values.
- Send the required paraemters as simp... | null | https://raw.githubusercontent.com/wdhowe/telegrambot-lib/1ec60bd8fa6d83a9057933a4d04254cbe0b6d4d6/src/telegrambot_lib/api/methods.clj | clojure | a bot instance
the api method path
parameters for the api method"
a bot instance"
a bot instance"
a bot instance"
a bot instance
message to send
id of the target thread of the forum.
entity parsing in message
disable link previews
send silently
protect content from forwarding/saving
id of the original mes... | (ns telegrambot-lib.api.methods
"Telegram Bot API Methods - function implementations.
- <#available-methods>
Most functions are multi-arity with the following options:
- Send all parameters in a 'content' map.
- Send only the required parameters as simple values.
- Send the required paraemters as simp... |
8d383728dffe769ad510c38e6acb341866ed5d00ed99268e2038817c62fbcfdc | zaiste/atw-om | project.clj | (defproject atw-om/lein-template "0.3.1"
:description "Clojure, all the way with Om"
:url "-om"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:scm {:name "git"
:url "-om"}
:signing {:gpg-key ""}
:deploy-repositories [["clojars" {:creds :gpg}]]
:eval-in-leiningen true)
| null | https://raw.githubusercontent.com/zaiste/atw-om/b121b9ebfd63cda3afec85fe79dca4523f684ad3/project.clj | clojure | (defproject atw-om/lein-template "0.3.1"
:description "Clojure, all the way with Om"
:url "-om"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:scm {:name "git"
:url "-om"}
:signing {:gpg-key ""}
:deploy-repositories [["clojars" {:creds :gpg}]]
:eval-in-leiningen true)
| |
d0901fdc83670d46a77c3fabf36480c60eb20a573c6aa737f952354cf406b690 | szktty/esca | main.ml | open Core.Std
open Printf
let file_exists file =
match Sys.file_exists ~follow_symlinks:true file with
| `No | `Unknown ->
Printf.printf "Error: No such file `%s'\n" file;
exit (-1)
| `Yes -> ()
let parse_file file =
file_exists file;
In_channel.with_file file
~f:(fun chan ->
let buf = L... | null | https://raw.githubusercontent.com/szktty/esca/11be06b4a9810cdae4ccfd4ce7c5d85597bd1999/src/main.ml | ocaml | TODO: printing node
TODO: error handling
begin try Compiler.compile node ~file with
| Compiler.Error e ->
Printf.printf "Error: %s: %s\n" e.err_file e.err_reason
| _ as e -> raise e
end
| open Core.Std
open Printf
let file_exists file =
match Sys.file_exists ~follow_symlinks:true file with
| `No | `Unknown ->
Printf.printf "Error: No such file `%s'\n" file;
exit (-1)
| `Yes -> ()
let parse_file file =
file_exists file;
In_channel.with_file file
~f:(fun chan ->
let buf = L... |
4518e9c104b711645c04a802198a46148514b5b7e54ba0889316184c4f9d33c9 | mainland/nikola | UnboxedForeign.hs | # LANGUAGE CPP #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
-- |
-- Module : Data.Vector.CUDA.UnboxedForeign
Copyright : ( c ) Roman Leshchinskiy 2009 - 2010
Copyright : ( c ) 2012
-- License :... | null | https://raw.githubusercontent.com/mainland/nikola/d86398888c0a76f8ad1556a269a708de9dd92644/src/Data/Vector/CUDA/UnboxedForeign.hs | haskell | # LANGUAGE Rank2Types #
|
Module : Data.Vector.CUDA.UnboxedForeign
License : BSD-style
Stability : experimental
Portability : non-portable
Adaptive unboxed vectors. The implementation is based on type families
and picks an efficient, specialised representation for every element type.
In particular,... | # LANGUAGE CPP #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
Copyright : ( c ) Roman Leshchinskiy 2009 - 2010
Copyright : ( c ) 2012
Maintainer : < >
newtype instance ' Vector ' ( ' Complex ' a ) = V_Complex ( ' Vect... |
442cd7af5b79486d987df0e7fd050271e162e7f38a36b3aaac27a52ebe8b72b3 | karimarttila/clojure | users_common.clj | (ns simpleserver.userdb.users-common)
;; NOTE: We don't use incremental user ids since it is a bit anti-pattern in DynamoDB (since email is the hash key). So, we create uuid for userid.
I guess the same applies to Azure Table Storage as well so using uuid here as RowKey .
(defn uuid
[]
(.toString (java.util.UUID... | null | https://raw.githubusercontent.com/karimarttila/clojure/ee1261b9a8e6be92cb47aeb325f82a278f2c1ed3/clj-ring-cljs-reagent-demo/simple-server/src/simpleserver/userdb/users_common.clj | clojure | NOTE: We don't use incremental user ids since it is a bit anti-pattern in DynamoDB (since email is the hash key). So, we create uuid for userid. | (ns simpleserver.userdb.users-common)
I guess the same applies to Azure Table Storage as well so using uuid here as RowKey .
(defn uuid
[]
(.toString (java.util.UUID/randomUUID)))
|
e417e2b23ec17956b1a8ae0304402d0428951e28314ffa460c20a5d883b78ec3 | marijnh/Postmodern | data-types.lisp | -*- Mode : LISP ; Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : CL - POSTGRES ; -*-
(in-package :cl-postgres)
(defun int64-to-vector (int)
"Takes a 64 byte integer and returns a vector of unsigned bytes with a length of 8"
(when (and (integerp int) (< int 18446744073709551615))
(let ((intv (make-arra... | null | https://raw.githubusercontent.com/marijnh/Postmodern/626d3f0e7ff9f299a6656703bb71de274a018361/cl-postgres/data-types.lisp | lisp | Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : CL - POSTGRES ; -*- | (in-package :cl-postgres)
(defun int64-to-vector (int)
"Takes a 64 byte integer and returns a vector of unsigned bytes with a length of 8"
(when (and (integerp int) (< int 18446744073709551615))
(let ((intv (make-array '(8)
:element-type '(unsigned-byte 8)
... |
55e712003772421a6d8d00f7077fc35079049bee1d36f302eba4bb4e5454dd7c | programaker-project/Programaker-Core | automate_services_time_sup.erl | %%%-------------------------------------------------------------------
%% @doc Timekeeping service supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(automate_services_time_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([... | null | https://raw.githubusercontent.com/programaker-project/Programaker-Core/ef10fc6d2a228b2096b121170c421f5c29f9f270/backend/apps/automate_services_time/src/automate_services_time_sup.erl | erlang | -------------------------------------------------------------------
@doc Timekeeping service supervisor.
@end
-------------------------------------------------------------------
API
Supervisor callbacks
====================================================================
API functions
=============================... |
-module(automate_services_time_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
-include("../../automate_common_types/src/definitions.hrl").
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
Child : : { Id , StartFunc , Restart , Shut... |
ede512357636759bbcac057a83258a0c16556ecfe99c095022f19f300ec98a1c | rudymatela/speculate | Digraph.hs | -- |
-- Module : Test.Speculate.Utils.Digraph
Copyright : ( c ) 2016
License : 3 - Clause BSD ( see the file LICENSE )
Maintainer : < >
module Test.Speculate.Utils.Digraph
( Digraph
, empty
, succs
, preds
, filter
, discard
, isNode
, isEdge
, fromEdges
, narrow
)
wher... | null | https://raw.githubusercontent.com/rudymatela/speculate/8ec39747d03033db4349d554467d4b78bb72935d/src/Test/Speculate/Utils/Digraph.hs | haskell | |
Module : Test.Speculate.Utils.Digraph | Copyright : ( c ) 2016
License : 3 - Clause BSD ( see the file LICENSE )
Maintainer : < >
module Test.Speculate.Utils.Digraph
( Digraph
, empty
, succs
, preds
, filter
, discard
, isNode
, isEdge
, fromEdges
, narrow
)
where
import Prelude hiding (filter)
import qualified ... |
4a2f123e205626ba35852ae829cb6870d689abb372012a38820f3f4c575bf6c3 | Simre1/haskell-game | GPipe.hs | -----------------------------------------------------------------------------
--
Module : Graphics .
Copyright :
License : MIT
--
Maintainer :
-- Stability : Experimental
Portability : Portable
--
-- |
-- A typesafe API based on the conceptual model of OpenGl, but without the... | null | https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/GPipe-Core/GPipe-Core/src/Graphics/GPipe.hs | haskell | ---------------------------------------------------------------------------
Stability : Experimental
|
A typesafe API based on the conceptual model of OpenGl, but without the imperative state machine.
Includes an embedded domain specific language for GLSL shaders which provides type safety even when crossing ... | Module : Graphics .
Copyright :
License : MIT
Maintainer :
Portability : Portable
GPipe aims to be as close to raw OpenGl performance as possible , without compromising type safety or functional style .
Uses the OpenGl 3.3 core profile under the hood .
To learn , start wi... |
c08887487bf4d8e76b7e405d12f838372c898840ce56f49600d78d9820d6b973 | apache/couchdb-couch-index | couch_index.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/apache/couchdb-couch-index/f0a6854e578469612937a766632fdcdc52ee9c65/src/couch_index.erl | erlang | use this file except in compliance with the License. You may obtain a copy of
the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(couch_index).
-behaviour(gen_server).
-vsn(3).
-export([start_link/1, stop/1, get_state/2, get_info/1]).
-export([trigger_update/2]).
-export([com... |
5df286a0732ebfb9505b76dd1aee764ff2e949eb4071bf3115741a110720991b | well-typed/visualize-cbn | ticktock.hs | tick = (\c -> case c of {
Counter ti to d -> ti
})
tock = (\c -> case c of {
Counter ti to d -> to
})
display = (\c -> case c of {
Counter ti to d -> d
})
fix = (\f -> f (@fix f))
mkCounter = (\self -> \n ->
Counter (let n' = add n 1 in seq n' (self n'))
(let n' = add n... | null | https://raw.githubusercontent.com/well-typed/visualize-cbn/499a8bc806ce03ce6d1bc12df1ea6e6df7768817/examples/ticktock.hs | haskell | tick = (\c -> case c of {
Counter ti to d -> ti
})
tock = (\c -> case c of {
Counter ti to d -> to
})
display = (\c -> case c of {
Counter ti to d -> d
})
fix = (\f -> f (@fix f))
mkCounter = (\self -> \n ->
Counter (let n' = add n 1 in seq n' (self n'))
(let n' = add n... | |
576e3df8ee32eced19c7dad9f5020dab74254bf477b2d85df37bb190e6a68888 | clojure-interop/java-jdk | AttachmentMarshaller.clj | (ns javax.xml.bind.attachment.AttachmentMarshaller
"Enable JAXB marshalling to optimize storage of binary data.
This API enables an efficient cooperative creation of optimized
binary data formats between a JAXB marshalling process and a MIME-based package
processor. A JAXB implementation marshals the root body... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/bind/attachment/AttachmentMarshaller.clj | clojure | must be non-negative and no larger than array.length - `int`
must be non-negative and no larger than array.length - `int` | (ns javax.xml.bind.attachment.AttachmentMarshaller
"Enable JAXB marshalling to optimize storage of binary data.
This API enables an efficient cooperative creation of optimized
binary data formats between a JAXB marshalling process and a MIME-based package
processor. A JAXB implementation marshals the root body... |
9be8e02c091638cd1a649c07854aba6c969b807b751828dc565effbac96cbe93 | walkable-server/realworld | user.clj | (ns conduit.handler.user
(:require [ataraxy.core :as ataraxy]
[buddy.sign.jwt :as jwt]
[conduit.boundary.user :as user]
[buddy.hashers :as hashers]
[conduit.common :as common]
[ataraxy.response :as response]
[integrant.core :as ig]))
(defn with-... | null | https://raw.githubusercontent.com/walkable-server/realworld/786706f15399b827e2820877ac3e2e26184ee79a/src/conduit/handler/user.clj | clojure | (ns conduit.handler.user
(:require [ataraxy.core :as ataraxy]
[buddy.sign.jwt :as jwt]
[conduit.boundary.user :as user]
[buddy.hashers :as hashers]
[conduit.common :as common]
[ataraxy.response :as response]
[integrant.core :as ig]))
(defn with-... | |
9608db3502a4da31b89868813bd87a6993d325c3eaf8662fb8464df712198dfa | lotz84/bitcoin-spv-wallet | Verack.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
module Bitcoin.Protocol.Verack where
import Data.Binary (Binary(..))
import GHC.Generics (Generic)
import Bitcoin.Types (Message(..))
data Verack = Verack
deriving (Show, Generic)
instance Binary Verack
instance Message Verack where
commandName = "... | null | https://raw.githubusercontent.com/lotz84/bitcoin-spv-wallet/3e52d76b201a3f46d825be0a612d51f70dfda131/src/Bitcoin/Protocol/Verack.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DeriveGeneric #
module Bitcoin.Protocol.Verack where
import Data.Binary (Binary(..))
import GHC.Generics (Generic)
import Bitcoin.Types (Message(..))
data Verack = Verack
deriving (Show, Generic)
instance Binary Verack
instance Message Verack where
commandName = "verack"
|
f31584547cebb92491b83f56ba3168134cac5af8b82de16408cb6f210da37d6e | links-lang/links | lens_exception.ml | module Internal = struct
exception E of string
let raise pp v =
let s =
Format.asprintf
"Unhandled internal exception in relational lenses module:\n\n%a" pp v
in
raise (E s)
end
| null | https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/lens/lens_exception.ml | ocaml | module Internal = struct
exception E of string
let raise pp v =
let s =
Format.asprintf
"Unhandled internal exception in relational lenses module:\n\n%a" pp v
in
raise (E s)
end
| |
9380b1df57843f073cc85d6cd1355511b273e910f4abe54835a8b382f648531c | jyh/metaprl | itt_vec_list1.ml | doc <:doc<
@module[Itt_vec_list1]
The @tt[Itt_vec_list1] module defines lists expressed as
sequents.
@docoff
----------------------------------------------------------------
@begin[license]
This file is part of MetaPRL, a modular, higher order
logical framework that provides a logical progra... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/itt/extensions/vector/itt_vec_list1.ml | ocaml | ***********************************************************************
* Vlist.
* BUG: Unfortunately, we don't have define forms for sequents.
* Temporarily use the declare/prim_rw form.
***********************************************************************
* Squash list.
Auxiliary goal
*****************... | doc <:doc<
@module[Itt_vec_list1]
The @tt[Itt_vec_list1] module defines lists expressed as
sequents.
@docoff
----------------------------------------------------------------
@begin[license]
This file is part of MetaPRL, a modular, higher order
logical framework that provides a logical progra... |
5879bfca9d3e753598d389ec39425710b23563c68695142b2f6cea351035550b | jacobobryant/platypub | site.clj | (ns com.platypub.themes.default.site
(:require [babashka.fs :as fs]
[clojure.edn :as edn]
[clojure.string :as str]
[clojure.java.io :as io]
[clojure.java.shell :as shell]
[com.platypub.themes.common :as common]
[hiccup.util :refer [raw-string]]))... | null | https://raw.githubusercontent.com/jacobobryant/platypub/c72b4e26eae86caa9fa5dd67fc07dddc99b7acca/themes/default/src/com/platypub/themes/default/site.clj | clojure | post image (for social media previews). | (ns com.platypub.themes.default.site
(:require [babashka.fs :as fs]
[clojure.edn :as edn]
[clojure.string :as str]
[clojure.java.io :as io]
[clojure.java.shell :as shell]
[com.platypub.themes.common :as common]
[hiccup.util :refer [raw-string]]))... |
ae5e3eb6a4bc24288d8e8099c385c448cecf4d683e8fa8c57cf801c49ec3eafe | cram2/cram | setup.lisp | ;;;
Copyright ( c ) 2017 , < >
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_pr2/cram_pr2_pick_place_demo/src/setup.lisp | lisp |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redi... | Copyright ( c ) 2017 , < >
* Neither the name of the Intelligent Autonomous Systems Group/
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR ... |
348bdbc1eb80af8a71c592a60e8ee62cd25c457390b84e2f96a6251adeba871e | tonyg/kali-scheme | arith.scm | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
; Arithmetic that checks for overflow
(define (carefully op)
(lambda (x y succ fail)
(let ((z (op (extract-fixnum x) (extract-fixnum y))))
(if (or (too-big-for-fixnum? z)
(too-... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/vm/arith.scm | scheme | Arithmetic that checks for overflow
really care about this.
((>= j 0) 'ok)
(write `((* ,i ,j) ?=? ,(* i j)))
(newline))
Watch out for (quotient least-fixnum -1)
(quotient least-fixnum -1)
Overflow check not necessary
beware of (abs least-fixnum) | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
(define (carefully op)
(lambda (x y succ fail)
(let ((z (op (extract-fixnum x) (extract-fixnum y))))
(if (or (too-big-for-fixnum? z)
(too-small-for-fixnum? z))
(goto ... |
3856ef53a59755b89a18432256e54fb8d7bb3e010cff5ce83dee01a57fd2e98a | pascal-knodel/haskell-craft | E'11''6.hs | --
--
--
-----------------
Exercise 11.6 .
-----------------
--
--
--
module E'11''6 where
import Prelude hiding ( id )
id :: a -> a
id x = x
f :: Int -> Bool -- Example "f":
f 0 = False
f 1 = True
f _ = undefined
-- Behaviour and type instance of "(id $ f)" :
-------------------------------------... | null | https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/Chapter%C2%A011/E'11''6.hs | haskell |
---------------
---------------
Example "f":
Behaviour and type instance of "(id $ f)" :
----------------------------------------------
"(id $ f)" means 'apply "id" to "f"'.
Proposition: (id $ f) = f
Proof: (id $ f)
| $
= (id f)
= ... | Exercise 11.6 .
module E'11''6 where
import Prelude hiding ( id )
id :: a -> a
id x = x
f 0 = False
f 1 = True
f _ = undefined
In the first argument of ` f ' , namely ` i d '
Behaviour and type instance of " i d ( $ ) " :
I would argument the same way I did in exercise... |
7fc551e095ae13bdbba2d72e367570cb765794dcd7337c6938b3b5889b1c2263 | openmusic-project/openmusic | sdifeditor.lisp | ;=========================================================================
OpenMusic : Visual Programming Language for Music Composition
;
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
;
This file is part of the OpenMusic environment sources
;
OpenMusic is free software : you ... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/projects/sdif/sdif-om/sdifeditor.lisp | lisp | =========================================================================
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
======... | OpenMusic : Visual Programming Language for Music Composition
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
This file is part of the OpenMusic environment sources
OpenMusic is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public ... |
5521b1ccba14c1fd2700284d677fbeab451f0ad91372a575949541acc9e62df2 | foreverbell/project-euler-solutions | 55.hs |
isPalindrome :: Eq a => [a] -> Bool
isPalindrome xs = xs == (reverse xs)
isLychrel :: Integer -> Bool
isLychrel x = helper 1 x where
helper n x
| n >= 50 = True
| isPalindrome (show y) = False
| otherwise = helper (n + 1) y
where y = x + ((read . reverse . show) x)
main = print $ ... | null | https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/55.hs | haskell |
isPalindrome :: Eq a => [a] -> Bool
isPalindrome xs = xs == (reverse xs)
isLychrel :: Integer -> Bool
isLychrel x = helper 1 x where
helper n x
| n >= 50 = True
| isPalindrome (show y) = False
| otherwise = helper (n + 1) y
where y = x + ((read . reverse . show) x)
main = print $ ... | |
d482ec9ffe297d60360109a4b24a49349d448ec3a3a2533cb4015686ca27b07a | zkincaid/duet | syntax.mli | * Defines Formulas , Terms , Symbols , Types , and Contexts . Syntactic
manipulation of terms and formulas .
manipulation of terms and formulas. *)
(** A context manages symbols and sharing between expressions. [context] is a
phantom type: the ['a] type parameter ensures that expressions don't cross
... | null | https://raw.githubusercontent.com/zkincaid/duet/162d3da830f12ab8e8d51f7757cddcb49c4084ca/srk/src/syntax.mli | ocaml | * A context manages symbols and sharing between expressions. [context] is a
phantom type: the ['a] type parameter ensures that expressions don't cross
contexts.
* takes a context and outputs a tuple containing the (# of sexprs, # of symbols, # of named symbols)
* Environments are maps whose domain is a set of... | * Defines Formulas , Terms , Symbols , Types , and Contexts . Syntactic
manipulation of terms and formulas .
manipulation of terms and formulas. *)
type 'a context
val context_stats : 'a context -> (int * int * int)
module Env : sig
type 'a t
val empty : 'a t
val push : 'a -> 'a t -> 'a t
val fin... |
bed8fdc71a12f3ce3e5dbe2d337be9019450813eeffb9660fde89162b4984260 | acl2/acl2 | top.lisp | Kestrel Utilities
;
Copyright ( C ) 2020 Kestrel Institute ( )
;
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "ACL2")
(include-book "apply-fn-if-known")
(includ... | null | https://raw.githubusercontent.com/acl2/acl2/eb1c548cabe41b555e80af3a52296c306694d168/books/kestrel/utilities/top.lisp | lisp |
Skipping the following, because it requires a trust tag:
(include-book "forcert")
Skipping the following, because it requires a trust tag:
(include-book "non-ascii-pathnames" :ttags (:non-ascii-pathnames))
| Kestrel Utilities
Copyright ( C ) 2020 Kestrel Institute ( )
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
Author : ( )
(in-package "ACL2")
(include-book "apply-fn-if-known")
(include-book "auto-instance")
(include-book "auto-termination")
(include-book "bits-as-digits... |
83c3b477cdc98c33aafe0cf3cf97faa17ee7b5f9b4bb40952904a386d13d195e | Deducteam/Dedukti | dkdep.ml | (** Print the dependencies of a list of modules *)
open Kernel
open Api
open Basic
open Cmdliner
(** Output main program. This function assumes that all modules are in
the [load_path]. *)
let output_deps :
load_path:Api.Files.t ->
Format.formatter ->
Dep_legacy.t ->
(unit, mident * exn) result =
f... | null | https://raw.githubusercontent.com/Deducteam/Dedukti/abbe11318189c32ae236671ccd8dcf3c89525065/commands/dkdep.ml | ocaml | * Print the dependencies of a list of modules
* Output main program. This function assumes that all modules are in
the [load_path].
Actual work. | open Kernel
open Api
open Basic
open Cmdliner
let output_deps :
load_path:Api.Files.t ->
Format.formatter ->
Dep_legacy.t ->
(unit, mident * exn) result =
fun ~load_path fmt data ->
let open Dep_legacy in
let as_object_file_exn md =
let file = Files.get_file_exn load_path Kernel.Basic.dloc md... |
4bf2293238b21bd128dd957c6cd49098ddeb50ba20da9db4e36466b7f5c00dc3 | craigl64/clim-ccl | winlisp.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - DEMO ; Base : 10 ; Lowercase : Yes -*-
;; See the file LICENSE for the full license governing this code.
;;
(in-package :clim-demo)
" Copyright ( c ) 1990 , 1991 , 1992 Symbolics , Inc. All rights reserved . "
(define-command-table mswin-file-com... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/demo/winlisp.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : CLIM - DEMO ; Base : 10 ; Lowercase : Yes -*-
See the file LICENSE for the full license governing this code.
doesn't work unless inside define-app-frame ?!?
:test (lambda (condition)
(some #'(lambda (x) (typep condition x)) ',conditions))
Eat any abort gestures ... |
(in-package :clim-demo)
" Copyright ( c ) 1990 , 1991 , 1992 Symbolics , Inc. All rights reserved . "
(define-command-table mswin-file-commands
:menu (("Exit" :command (com-wlisp-exit))))
(define-command-table mswin-edit-commands
:menu (("Copy" :command (com-copy-object))
("Paste" :command (com-paste))))
(... |
c0847d67be7165700e45c2c0162242eaca6db8be43a532560c33e3cb717d169b | willowtreeapps/wombats-api | core.clj | (ns wombats.test.arena.core
(:require [clojure.test :refer :all]
[wombats.arena.utils :as a-utils]
[wombats.game.utils :as g-utils]
[wombats.arena.core :as a-core]))
(def wide-arena-configuration
#:arena {:food 0
:poison 0
:zakano 0
:perimeter fa... | null | https://raw.githubusercontent.com/willowtreeapps/wombats-api/738e4cc8d7011998695ec85e663f650be71f60ae/test/wombats/test/arena/core.clj | clojure | (ns wombats.test.arena.core
(:require [clojure.test :refer :all]
[wombats.arena.utils :as a-utils]
[wombats.game.utils :as g-utils]
[wombats.arena.core :as a-core]))
(def wide-arena-configuration
#:arena {:food 0
:poison 0
:zakano 0
:perimeter fa... | |
b46984862cf4215fc7c279a13a236a4a86173f8530521f85694ff78853938245 | xtdb/xtdb | document_store.clj | (ns ^:no-doc xtdb.document-store
(:require [clojure.set :as set]
[xtdb.cache :as cache]
[xtdb.codec :as c]
[xtdb.db :as db]
[xtdb.io :as xio]
[xtdb.memory :as mem]
[xtdb.system :as sys]
[juxt.clojars-mirrors.nippy.v3v1v1.taoensso.nipp... | null | https://raw.githubusercontent.com/xtdb/xtdb/e2f51ed99fc2716faa8ad254c0b18166c937b134/core/src/xtdb/document_store.clj | clojure | (ns ^:no-doc xtdb.document-store
(:require [clojure.set :as set]
[xtdb.cache :as cache]
[xtdb.codec :as c]
[xtdb.db :as db]
[xtdb.io :as xio]
[xtdb.memory :as mem]
[xtdb.system :as sys]
[juxt.clojars-mirrors.nippy.v3v1v1.taoensso.nipp... | |
c6d55eb950e79bccf4192ea1cc49e56b12c3d323e216a42b425e74544b3e6c35 | bmeurer/ocaml-arm | source.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Cr... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/debugger/source.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
OCaml port by and
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
... |
d556a88182e55500739531817fa6565d02268832fbea54ea2e82d45d13b3a3f1 | bortexz/tacos | tacos_test.clj | (ns bortexz.tacos-test
(:require [clojure.test :refer [deftest is]]
[bortexz.tacos :as ta]
[clojure.edn :as edn]
[bortexz.tacos.timeseries :as ts]
[bortexz.utils.math :as umath]
[bortexz.graphcom :as g]))
(defn- create-source-nodes
[{:keys [input m... | null | https://raw.githubusercontent.com/bortexz/tacos/b8c07dd501636ae64bba69fb6ef83c0d7cc27708/test/bortexz/tacos_test.clj | clojure | Indicator utils tests
Indicators | (ns bortexz.tacos-test
(:require [clojure.test :refer [deftest is]]
[bortexz.tacos :as ta]
[clojure.edn :as edn]
[bortexz.tacos.timeseries :as ts]
[bortexz.utils.math :as umath]
[bortexz.graphcom :as g]))
(defn- create-source-nodes
[{:keys [input m... |
114b2bf58fe5499b7ebabcddfe8c91650a0790e526c4c5c4868cd59f6bf04ff0 | lrascao/simple_web_server | simple_web_server_setup_api_v1.erl | -module(simple_web_server_setup_api_v1).
-behaviour(cowboy_handler).
% behaviour callbacks
-export([init/2,
terminate/3]).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Behaviour callbacks
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
init(Req0, State) ->
lager:debug("got api request: ~... | null | https://raw.githubusercontent.com/lrascao/simple_web_server/d5418f3dca4c436c29223fbb518713e30fb228d0/src/simple_web_server_setup_api_v1.erl | erlang | behaviour callbacks
Behaviour callbacks
Public api
Private
| -module(simple_web_server_setup_api_v1).
-behaviour(cowboy_handler).
-export([init/2,
terminate/3]).
init(Req0, State) ->
lager:debug("got api request: ~p",
[Req0]),
{ok, RespBody, RespCode, Req1} = handle_request(cowboy_req:method(Req0),
co... |
82e052f65037dd4ab9b56c7a4b21d527c0f90e61e8246b05f991300d62c13d37 | rotatef/gettext | example.lisp | ;;;; gettext for Common Lisp
;;;;
Copyright ( C ) 2013 < >
;;;;
;;;; This library is free software: you can redistribute it and/or modify
;;;; it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation , either version 3 of the License , or
;;;; (at your option... | null | https://raw.githubusercontent.com/rotatef/gettext/a432020cbad99fc22cbe6bb9aa8a83a35000d7aa/gettext-example/example.lisp | lisp | gettext for Common Lisp
This library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
(at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even ... | Copyright ( C ) 2013 < >
by the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package #:example)
( setf ( textdomaindir " gettext - example " ) ( asdf : system - relative - pathname : gettext - example " locale/ " ) )
... |
183df2d5ec9977edafc829407d18155b0513833d6d0acc32b7ee2260c90d6d85 | circleci/stefon | pools.clj | (ns stefon.pools)
Pool of scopes , to be used one per preprocessor
(defn make-pool []
(ref #{}))
(defn remove-from-pool [pool item]
(alter pool disj item)
item)
(defn get-from-pool [pool initializer]
(let [a (atom nil)]
(dosync
(when-let [item (first @pool)]
(swap! a (constantly item))
... | null | https://raw.githubusercontent.com/circleci/stefon/7c36114923ef7ec41316e22354d2e31217a1a416/stefon-core/src/stefon/pools.clj | clojure | (ns stefon.pools)
Pool of scopes , to be used one per preprocessor
(defn make-pool []
(ref #{}))
(defn remove-from-pool [pool item]
(alter pool disj item)
item)
(defn get-from-pool [pool initializer]
(let [a (atom nil)]
(dosync
(when-let [item (first @pool)]
(swap! a (constantly item))
... | |
81156eaac104665c369c91f869a061b6446df8daf229d258a03bdbd94ea074da | galdor/tungsten | package.lisp | (defpackage :system-test
(:use :cl :test)
(:export))
| null | https://raw.githubusercontent.com/galdor/tungsten/5d6e71fb89af32ab3994c5b2daf8b902a5447447/tungsten-system/t/package.lisp | lisp | (defpackage :system-test
(:use :cl :test)
(:export))
| |
9610b4fcf12ce0392005f0b6ab79516905358c8fd35dd4d313ab165eef6826a2 | filmor/ierl | jup_kernel_executor.erl | -module(jup_kernel_executor).
-behaviour(gen_server).
-include("internal.hrl").
-ignore_xref([
start_link/4
]).
-export([
start_link/4,
push/3,
status/3,
iopub/4,
reply/5,
stop/1
]).
-export([
init/1,
handle_info/2,
handle_call/3,
handle_cast/2
]).
Implement Silent ,... | null | https://raw.githubusercontent.com/filmor/ierl/81647bfabaccf535ca50525f50a93486cd13d7b6/apps/jupyter/src/jup_kernel_executor.erl | erlang | -module(jup_kernel_executor).
-behaviour(gen_server).
-include("internal.hrl").
-ignore_xref([
start_link/4
]).
-export([
start_link/4,
push/3,
status/3,
iopub/4,
reply/5,
stop/1
]).
-export([
init/1,
handle_info/2,
handle_call/3,
handle_cast/2
]).
Implement Silent ,... | |
332ecc177e543338100151e7edd114213d21c85789261221d4d626a925e66b72 | cj1128/sicp-review | 3.28.scm | Exercise 3.28
;; Define an or-gate as a primitive function box
(define (or-gate a1 a2 output)
(define (or-action-procedure)
(let ((new-value (logical-or (get-signal a1) (get-signal a2))))
(after-delay or-gate-delay
(lambda () (set-signal! output new-value)))))
(add-action! a1 or-action-procedu... | null | https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-3/3.3/3.28.scm | scheme | Define an or-gate as a primitive function box | Exercise 3.28
(define (or-gate a1 a2 output)
(define (or-action-procedure)
(let ((new-value (logical-or (get-signal a1) (get-signal a2))))
(after-delay or-gate-delay
(lambda () (set-signal! output new-value)))))
(add-action! a1 or-action-procedure)
(add-action! a2 or-action-procedure)
'ok)... |
0c93965d6f64eee784f5c771b5da4b581a4ca2ac613e2727f156034a13335f72 | zwizwa/staapl | live.rkt | #lang racket/base
(require
racket/match
racket/pretty
"tools.rkt"
"code.rkt")
(require/provide
"live/tethered.rkt" ;; Scat code for host<->target interaction.
"live/comm-uart.rkt"
"live/comm-pk2.rkt"
"live/comm-simulator.rkt" ;; monitor transports and reference implementation
"live/commands.rkt" ... | null | https://raw.githubusercontent.com/zwizwa/staapl/e30e6ae6ac45de7141b97ad3cebf9b5a51bcda52/live.rkt | racket | Scat code for host<->target interaction.
monitor transports and reference implementation
A target-local view to the above.
Base implementation of the target command language.
repl functionality
for 'live>'
necessary for reflective operations to work:
"target.rkt"
"scat.rkt"
(loading "live")
project namespace... | #lang racket/base
(require
racket/match
racket/pretty
"tools.rkt"
"code.rkt")
(require/provide
"live/comm-uart.rkt"
"live/comm-pk2.rkt"
Namespace operations .
" ns.rkt "
"macro.rkt"
)
(provide (all-defined-out))
All uses of ' eval in the / live/ modules will use the current
(define (c... |
521232a8b0b2913fce690d84004ce0be0ae854776d4ed119100893bb22cf8a01 | zhangyz/llvm-slicing | SDGType.hs | # LANGUAGE OverloadedStrings , TemplateHaskell , TypeSynonymInstances , FlexibleInstances , DeriveGeneric #
module LLVM.Slicing.Static.SDG.SDGType (
-- * Types
SDGEdge(..),
SDGNode(..), SDGNode2(..),
SDGGraphType, SDGGraphType2(..),
-- * Constructor
getUID,
convertNode, convertNode2,
insEdges2,
-- * ... | null | https://raw.githubusercontent.com/zhangyz/llvm-slicing/8f0fe59d3259473f463140acc79f87a36c6049c4/src/LLVM/Slicing/Static/SDG/SDGType.hs | haskell | * Types
* Constructor
* Visualization
- Visual
(C CGlobalVariable (N l))
(C CGlobalVariable (N l))
style dotted
---------------------------------------------------
-
# INLINE insEdges2 # | # LANGUAGE OverloadedStrings , TemplateHaskell , TypeSynonymInstances , FlexibleInstances , DeriveGeneric #
module LLVM.Slicing.Static.SDG.SDGType (
SDGEdge(..),
SDGNode(..), SDGNode2(..),
SDGGraphType, SDGGraphType2(..),
getUID,
convertNode, convertNode2,
insEdges2,
sdgGraphvizRepr
) where
import Dat... |
6b0c82586b45b591b41b001ba58f53b629e319cd8c03bf4e3ef0e0bbc1579a50 | JacquesCarette/Drasil | ExtractDocDesc.hs | # LANGUAGE LambdaCase , Rank2Types #
-- | Defines functions to extract certain kinds of information from a document.
Mainly used to pull the ' UID 's of chunks out of ' Sentence 's and ' 's .
module Drasil.ExtractDocDesc (getDocDesc, egetDocDesc, sentencePlate) where
import Control.Lens((^.))
import Drasil.Document... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/c7c57e77e0de03158e7c4db6e74e13898a889764/code/drasil-docLang/lib/Drasil/ExtractDocDesc.hs | haskell | | Defines functions to extract certain kinds of information from a document.
| Creates a section contents plate that contains diferrent system subsections.
gsdSec = Constant <$> \case
| Creates a section plate for expressions.
| Converts a 'Sentence' into a list of expressions. If the 'Sentence' cant be translated,... | # LANGUAGE LambdaCase , Rank2Types #
Mainly used to pull the ' UID 's of chunks out of ' Sentence 's and ' 's .
module Drasil.ExtractDocDesc (getDocDesc, egetDocDesc, sentencePlate) where
import Control.Lens((^.))
import Drasil.DocumentLanguage.Core
import Drasil.Sections.SpecificSystemDescription (inDataConstTbl, ... |
7e50475e5a3f20d021f57988e7e4d8d9ddff946b42254b947587724bf9e7ce84 | linuxsoares/artigos-clojure | home.clj | (ns hello-web-app.routes.home
(:require [hello-web-app.layout :as layout]
[compojure.core :refer [defroutes GET]]
[ring.util.http-response :as response]
[clojure.java.io :as io]))
(defn home-page []
(layout/render
"home.html" {:docs (-> "docs/docs.md" io/resource slurp)}))
... | null | https://raw.githubusercontent.com/linuxsoares/artigos-clojure/6c4183e767e71168c778973dd5831e7c9edfaf4a/criando-web-application-clojure/hello-web-app/src/clj/hello_web_app/routes/home.clj | clojure | (ns hello-web-app.routes.home
(:require [hello-web-app.layout :as layout]
[compojure.core :refer [defroutes GET]]
[ring.util.http-response :as response]
[clojure.java.io :as io]))
(defn home-page []
(layout/render
"home.html" {:docs (-> "docs/docs.md" io/resource slurp)}))
... | |
5977009e5bbb932260cc92cdb8d32159044f25c27c5639600b5d5353af9e3705 | ku-fpg/data-reify | ReifySpec.hs | # LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Data.ReifySpec where
import qualified Data.List as L
import Data.Reify
import Prelude ()
import Prelude.Compat
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec =... | null | https://raw.githubusercontent.com/ku-fpg/data-reify/0459fabac05feb8dc39c70d3f35f2f4a21d501f2/spec/Data/ReifySpec.hs | haskell | # LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Data.ReifySpec where
import qualified Data.List as L
import Data.Reify
import Prelude ()
import Prelude.Compat
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec =... | |
47b63553a39ab3a6c83580355546e0c66cfee915e9362de8b7453e7a64437afa | MichaelXavier/crc | CRC.hs | {-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
# LANGUAGE TypeFamilyDependencies #
#else
{-# LANGUAGE TypeFamilies #-}
#endif
module Data.Digest.CRC
( CRC(..)
, digest
, digestWithInitial
) where
------------------------------------------------------------------------... | null | https://raw.githubusercontent.com/MichaelXavier/crc/34678cf0fab495cb55c1e21bee5aac759f2dd3a0/src/Data/Digest/CRC.hs | haskell | # LANGUAGE CPP #
# LANGUAGE TypeFamilies #
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
----------------------------------------------------------------------------- | #if __GLASGOW_HASKELL__ >= 800
# LANGUAGE TypeFamilyDependencies #
#else
#endif
module Data.Digest.CRC
( CRC(..)
, digest
, digestWithInitial
) where
import Data.ByteString as BS
import Data.Vector.Unboxed as V
class CRC a where
#if __GLASGOW_HASKELL__ >= 800
type CRCWord ... |
fa33506b2d1bbe33270101661113dbcdf0b8849e0ebfd537e40b86b14dcf4ebd | artlaman/chalice-icon-theme | json.cljs | (ns chalice.json)
(defn clj->json [value]
(.stringify js/JSON (clj->js value) nil 2))
(defn json->clj [value]
(js->clj (.parse js/JSON value) :keywordize-keys true)) | null | https://raw.githubusercontent.com/artlaman/chalice-icon-theme/1d63ebe87b6af1da68fa3263b1f4592f203b46b2/src/chalice/json.cljs | clojure | (ns chalice.json)
(defn clj->json [value]
(.stringify js/JSON (clj->js value) nil 2))
(defn json->clj [value]
(js->clj (.parse js/JSON value) :keywordize-keys true)) | |
0fc806e10a3a6785b0660484e5f117a5924642d24e4ebdf438805ed598d8b4ee | snowleopard/hadrian | DirectoryContents.hs | # LANGUAGE TypeFamilies #
module Hadrian.Oracles.DirectoryContents (
directoryContents, copyDirectoryContents, directoryContentsOracle, copyDirectoryContentsUntracked,
Match (..), matches, matchAll
) where
import Control.Monad
import Development.Shake
import Development.Shake.Classes
import Development.Sha... | null | https://raw.githubusercontent.com/snowleopard/hadrian/b9a3f9521b315942e1dabb006688ee7c9902f5fe/src/Hadrian/Oracles/DirectoryContents.hs | haskell | | A 'Match' expression that always evaluates to 'True' (i.e. always matches).
| Check if a file name matches a given 'Match' expression.
| Given a 'Match' expression and a directory, recursively traverse it and all
its subdirectories to find and return all matching contents.
| Copy the contents of the source direc... | # LANGUAGE TypeFamilies #
module Hadrian.Oracles.DirectoryContents (
directoryContents, copyDirectoryContents, directoryContentsOracle, copyDirectoryContentsUntracked,
Match (..), matches, matchAll
) where
import Control.Monad
import Development.Shake
import Development.Shake.Classes
import Development.Sha... |
5151cc3c6c4eb69fdf78d976adf2be6ac3f9359543eb2f44ecb9a3c9d9993b9f | EligiusSantori/L2Apf | return_point.scm | (module system racket/base
(provide return-points)
(define return-points (list
(cons 0 'return-point/town)
(cons 1 'return-point/clanhall)
(cons 2 'return-point/castle)
(cons 3 'return-point/siege-hq)
(cons 4 'return-point/fixed)
))
)
| null | https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/packet/game/return_point.scm | scheme | (module system racket/base
(provide return-points)
(define return-points (list
(cons 0 'return-point/town)
(cons 1 'return-point/clanhall)
(cons 2 'return-point/castle)
(cons 3 'return-point/siege-hq)
(cons 4 'return-point/fixed)
))
)
| |
78ee8c432ec8cb2601df5f9bd87b07ccbf33ef25cc01a7378f906cc44dbe25db | zwizwa/rai | test-ai-linpar.rkt | #lang racket/base
(require rai/tools
rai/ai-linpar
"test-lang.rkt")
(define (t . a)
(let ((res (apply ai-linpar a)))
(pretty-print res)
res))
(define prog1 (t test-linpar1))
(define prog2 (t test-linpar2))
(define prog3 (t test-linpar2 '(L)))
| null | https://raw.githubusercontent.com/zwizwa/rai/6bcacb7da4172971816027fd88a0209adbd60e30/test/test-ai-linpar.rkt | racket | #lang racket/base
(require rai/tools
rai/ai-linpar
"test-lang.rkt")
(define (t . a)
(let ((res (apply ai-linpar a)))
(pretty-print res)
res))
(define prog1 (t test-linpar1))
(define prog2 (t test-linpar2))
(define prog3 (t test-linpar2 '(L)))
| |
bec8343bdc7a1d682fa044ee3cc7d83ac95202d3526c6033a682dac6ffb980cb | mfoemmel/erlang-otp | wxSpinEvent.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public Lic... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxSpinEvent.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
< dd><em > command_spinctrl_updated</em > , < e... |
85270f1a4e2ba61093f3e283164ad267010a300577f563d87a70da836b1aafa3 | haskell/haskell-language-server | PluginUtilsTest.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
module Ide.PluginUtilsTest
( tests
) where
import Data.Char (isPrint)
import qualified Data.Set as Set
import qualified Data.Text as T
import qualified Ide.Plugin.RangeMap as RangeMap
import ... | null | https://raw.githubusercontent.com/haskell/haskell-language-server/9e5fc880d1bcf45bdcda1160a1f2a67408bbf410/hls-plugin-api/test/Ide/PluginUtilsTest.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TypeApplications #
module Ide.PluginUtilsTest
( tests
) where
import Data.Char (isPrint)
import qualified Data.Set as Set
import qualified Data.Text as T
import qualified Ide.Plugin.RangeMap as RangeMap
import Ide.PluginUtils (posit... |
67dc8ca46705228569b20834018347a500171353c22c1d7d82a3c5fa2faf8537 | adnelson/nixfromnpm | Unit.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NoImplicitPrelude #
# LANGUAGE QuasiQuotes #
module Main (main) where
import ClassyPrelude hiding ((<>))
import Data.Either (isRight, isLeft)
import Data.Aeson (Value(..), decode)
import Nix.Expr
import Test.Hspec
import Test.QuickCheck (property, Arbitrary(..), oneof)
imp... | null | https://raw.githubusercontent.com/adnelson/nixfromnpm/4ab773cdead920d2312e864857fabaf5f739a80e/tests/Unit.hs | haskell | # LANGUAGE OverloadedStrings #
| Ability to parse git identifiers from URIs. | # LANGUAGE NoImplicitPrelude #
# LANGUAGE QuasiQuotes #
module Main (main) where
import ClassyPrelude hiding ((<>))
import Data.Either (isRight, isLeft)
import Data.Aeson (Value(..), decode)
import Nix.Expr
import Test.Hspec
import Test.QuickCheck (property, Arbitrary(..), oneof)
import NeatInterpolation (text)
import... |
180517e79597dda091317172a5469c4bbe44a784ac94155487e461ab77f26e9f | mainland/dph | Unlifted.hs | # LANGUAGE TypeOperators , CPP #
-- | WARNING:
-- This is an abstract interface. All the functions will just `error` if called.
--
This module provides an API for the segmented array primitives used by DPH .
-- None of the functions here have implementations.
--
-- Client programs should use either the @dp... | null | https://raw.githubusercontent.com/mainland/dph/742078c9e18b7dcf6526348e08d2dd16e2334739/dph-prim-interface/Data/Array/Parallel/Unlifted.hs | haskell | | WARNING:
This is an abstract interface. All the functions will just `error` if called.
None of the functions here have implementations.
Client programs should use either the @dph-prim-seq@ or @dph-prim-par@
packages, as these provide the same API and contain real code.
The dph-prim-interface, dph... | # LANGUAGE TypeOperators , CPP #
This module provides an API for the segmented array primitives used by DPH .
NOTE : The API is enforced by the DPH_Header.h and DPH_Interface.h headers .
#include "DPH_Header.h"
import qualified Prelude as P
import Prelude ( Eq(..), Num(..), Bool(..), ($), (.) )
#include "D... |
402e12e5abc255198e604baf3ad9e57af71dbc3bc7bf560fb58b4b3d2b2e69e7 | patricoferris/ocaml-multicore-monorepo | hmac_drbg.ml | module Make (H : Mirage_crypto.Hash.S) = struct
open Mirage_crypto.Uncommon
type g =
{ mutable k : Cstruct.t
; mutable v : Cstruct.t
; mutable seeded : bool
}
let block = H.digest_size
let (bx00, bx01) = Cs.(b 0x00, b 0x01)
fills k0 with 0s
and v0 =
let buf = Cstruct.creat... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/mirage-crypto/rng/hmac_drbg.ml | ocaml | XXX | module Make (H : Mirage_crypto.Hash.S) = struct
open Mirage_crypto.Uncommon
type g =
{ mutable k : Cstruct.t
; mutable v : Cstruct.t
; mutable seeded : bool
}
let block = H.digest_size
let (bx00, bx01) = Cs.(b 0x00, b 0x01)
fills k0 with 0s
and v0 =
let buf = Cstruct.creat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.