_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 |
|---|---|---|---|---|---|---|---|---|
79a218497221ee9d310a3013ef760fd26faf60fa60b2544bee60c5bb02f8a38c | avsm/platform | ocamlary.mli |
* Copyright ( c ) 2014 < >
* < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE ... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/odoc.1.4.2/test/inactive/core/ocamlary.mli | ocaml | *
You may find more information about this HTML documentation renderer
at {{:} github.com/dsheets/ocamlary }.
*
This is some verbatim text: {v verbatim v}
*
This is some verbatim text: {v [][df[]]}} v}
*
Here is an index table of [Empty] modules: {!modules:Empty EmptyAlias}
*
Here is a table ... |
* Copyright ( c ) 2014 < >
* < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE ... |
16f8dc0b3a7a17c494223fcf0529bea4a1c38808c7aeb02af0770de9b3deb122 | JonathanLorimer/core-warn | InductionTest.hs | {-# OPTIONS_GHC -ddump-simpl -ddump-to-file -dsuppress-uniques #-}
{-# OPTIONS_GHC -fplugin=CoreWarn #-}
module InductionTest where
import Infra
import Data.Proxy
tree :: ()
tree = requireEmptyClass $ Proxy @(ToTree('[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,... | null | https://raw.githubusercontent.com/JonathanLorimer/core-warn/1b6348d4d01f4aab07df1e9461d6084fa29795db/test/InductionTest.hs | haskell | # OPTIONS_GHC -ddump-simpl -ddump-to-file -dsuppress-uniques #
# OPTIONS_GHC -fplugin=CoreWarn # |
module InductionTest where
import Infra
import Data.Proxy
tree :: ()
tree = requireEmptyClass $ Proxy @(ToTree('[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]))
induction :: ()
induction = requireInductionClass @('... |
0433cc135f3a8ccb3e6f177dbf1bcf2ad2aecb103d758b2d3323639c0f98575e | tweag/ormolu | fat-multiline.hs | module Main where
-- | Something.
data Foo
= Foo Int
Int
-- ^ Foo
| Bar Bool
Bool
-- ^ Bar
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/data/fat-multiline.hs | haskell | | Something.
^ Foo
^ Bar | module Main where
data Foo
= Foo Int
Int
| Bar Bool
Bool
|
3c87a65d6e56918aec128310d2c9c9727e60e4f13162c3d5dbeec45f58f10c5d | tyehle/llvm-lambda | Expr.hs | {-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE MultiParamTypeClasses #
module Expr where
import qualified Data.Set as Set
import qualified Data.Map as Map
import Scope
newtype VarIdent = VarIdent String deriving (Eq, Ord, Show)
data Expr = Nat Int
| BinOp BinOp Expr Expr
| If0 Expr Expr Expr
... | null | https://raw.githubusercontent.com/tyehle/llvm-lambda/679a9e1cc1d288fc9731a6f43fc45714c455741b/src/Expr.hs | haskell | # LANGUAGE TypeSynonymInstances #
| Mod | # LANGUAGE MultiParamTypeClasses #
module Expr where
import qualified Data.Set as Set
import qualified Data.Map as Map
import Scope
newtype VarIdent = VarIdent String deriving (Eq, Ord, Show)
data Expr = Nat Int
| BinOp BinOp Expr Expr
| If0 Expr Expr Expr
| Ref VarIdent
| L... |
0bb2d374d259419b87920ab73093ee9ffc8b198b46a61eb2a663d20f41f7c3c4 | swannodette/chambered | macros.clj | (ns chambered.macros)
(defmacro forloop [[init test step] & body]
`(loop [~@init]
(when ~test
~@body
(recur ~step))))
(defmacro local
([]
`(make-array 1))
([x]
`(cljs.core/array ~x)))
(defmacro >> [x v]
`(aset ~x 0 ~v))
(defmacro << [x]
`(aget ~x 0))
| null | https://raw.githubusercontent.com/swannodette/chambered/c20d232bddfa2f9e616f18cb9c591a3f1e74fc1c/src/chambered/macros.clj | clojure | (ns chambered.macros)
(defmacro forloop [[init test step] & body]
`(loop [~@init]
(when ~test
~@body
(recur ~step))))
(defmacro local
([]
`(make-array 1))
([x]
`(cljs.core/array ~x)))
(defmacro >> [x v]
`(aset ~x 0 ~v))
(defmacro << [x]
`(aget ~x 0))
| |
034843be2b0c4896dc132d16d653f9209e2470bb8b0451ce983eb27f968e27ae | tanakahx/cl-binary | io.lisp | (in-package :cl-user)
(defpackage :cl-binary.io
(:use :cl
:trivial-gray-streams
:ieee-floats))
(in-package :cl-binary.io)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun mkstr (&rest args)
(with-output-to-string (s)
(dolist (a args)
(princ a s))))
(defun symb (&re... | null | https://raw.githubusercontent.com/tanakahx/cl-binary/5295f2bc9e273f030a4aa9a2843c295699cb0c1a/src/io.lisp | lisp | read-u8
read-u16
read-u32
read-u64
read-s8
read-s16
read-s32
read-s64
read-f32
read-f64
write-u8
write-u16
write-u32
write-u64
write-s8
write-s16
write-s32
write-s64
write-f32
write-f64
make-u8vector
make-u16vector
make-u32vector
make-u64vector
make-s8vector
make-s16vector
make-s32vector
mak... | (in-package :cl-user)
(defpackage :cl-binary.io
(:use :cl
:trivial-gray-streams
:ieee-floats))
(in-package :cl-binary.io)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun mkstr (&rest args)
(with-output-to-string (s)
(dolist (a args)
(princ a s))))
(defun symb (&re... |
cf553871db4e82aeaba2fa305841fb2676dd00f89614fec07b45bdb1d8b6cdbb | RutledgePaulV/kube-api | deltafifo.clj | (ns kube-api.controllers.deltafifo
"Implements functionality similar to deltafifo from client-go.
Accumulates events and compacts multiple events that apply to
the same resource until the message is consumed. Events contain
an accreted view of the state of all watched resources that is
guaranteed to be up... | null | https://raw.githubusercontent.com/RutledgePaulV/kube-api/ff335b5e9dbf0f10ed00227733f26898d57c2c55/kube-api-controllers/src/kube_api/controllers/deltafifo.clj | clojure | the message was consumed, yay!
a consumed message was sent back!
novelty was received and incorporated | (ns kube-api.controllers.deltafifo
"Implements functionality similar to deltafifo from client-go.
Accumulates events and compacts multiple events that apply to
the same resource until the message is consumed. Events contain
an accreted view of the state of all watched resources that is
guaranteed to be up... |
4987188efebe19309edcd2a5b59e5be7cef1ee32d24b014d703f2e63bb6f8276 | spurious/sagittarius-scheme-mirror | htmlprag.scm | -*- mode : scheme ; coding : utf-8 -*-
#!nobacktrace
(import (rnrs)
(text sxml html-parser)
(srfi :39)
(srfi :64 testing))
(define %htmlprag:a2c integer->char)
(define-syntax %htmlprag:testeez
(syntax-rules (test-define test/equal)
((_ (test-define _ var val) tests ...)
(let ((var val))
(%htmlp... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/tests/text/sxml/htmlprag.scm | scheme | coding : utf-8 -*-
@section Tests
The HtmlPrag test suite can be enabled by editing the source code file and
loading @uref{/, Testeez}.
(define (%htmlprag:test)
TODO: Add verbatim-pair cases with attributes in the end tag.
TODO: Maybe lose this test.
ccc'ddd\" />")
TODO: Write more test cases for HTML encoding.
... | #!nobacktrace
(import (rnrs)
(text sxml html-parser)
(srfi :39)
(srfi :64 testing))
(define %htmlprag:a2c integer->char)
(define-syntax %htmlprag:testeez
(syntax-rules (test-define test/equal)
((_ (test-define _ var val) tests ...)
(let ((var val))
(%htmlprag:testeez tests ...)))
((_ (test/eq... |
7689010e1208496ad8b9131f30b38d92f040268a1d3a872813d42b7db50d62c4 | thheller/shadow-cljs | config.clj | (ns shadow.cljs.devtools.config
(:require
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.spec.alpha :as s]
[shadow.build.config :as build-config]
[shadow.cljs.util :as cljs-util]
[shadow.cljs.config-env :as config-env]
[shadow.jvm-log :as log]))
(s/def ::builds (s/map-of keyword?... | null | https://raw.githubusercontent.com/thheller/shadow-cljs/559628b0721778ffb8615aaf98d81529f00d74d6/src/main/shadow/cljs/devtools/config.clj | clojure | FIXME: properly do :exclusions and other things that may be allowed?
ensure that each build has an :build-id so user isn't forced to repeat it
ok
not | (ns shadow.cljs.devtools.config
(:require
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.spec.alpha :as s]
[shadow.build.config :as build-config]
[shadow.cljs.util :as cljs-util]
[shadow.cljs.config-env :as config-env]
[shadow.jvm-log :as log]))
(s/def ::builds (s/map-of keyword?... |
638da2b5f6438c189b7dc97ade05dee91c60e69272eaa3b89515f32265462bc5 | thosmos/riverdb | constituent.cljs | (ns riverdb.ui.constituent
(:require
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.fulcro.algorithms.tempid :refer [tempid]]
[riverdb.ui.lookups :as looks]))
(defsc Constituent [this props]
{:ident [:org.riverdb.db.constituentlookup/gid :db/id],
:initial-state ... | null | https://raw.githubusercontent.com/thosmos/riverdb/b47f01a938da26298ee7924c8b2b3a2be5371927/src/main/riverdb/ui/constituent.cljs | clojure | (ns riverdb.ui.constituent
(:require
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.fulcro.algorithms.tempid :refer [tempid]]
[riverdb.ui.lookups :as looks]))
(defsc Constituent [this props]
{:ident [:org.riverdb.db.constituentlookup/gid :db/id],
:initial-state ... | |
74072066eb4870baab0a725af45a660cab3b3d06fca558e7a00e70aaae90265b | tek/polysemy-hasql | DbType.hs | module Polysemy.Hasql.DbType where
import Polysemy.Db.Text.Quote (dquote)
import qualified Polysemy.Hasql.ColumnOptions as ColumnOptions
import qualified Polysemy.Hasql.Data.DbType as Column
import Polysemy.Hasql.Data.DbType (
Column (Column),
DbType (Prim, Prod, Sum),
Name (Name),
Selector (Selector),
Type... | null | https://raw.githubusercontent.com/tek/polysemy-hasql/2bdfb5c4a0c15b66a33412e24c1668efa7e66e08/packages/hasql/lib/Polysemy/Hasql/DbType.hs | haskell | module Polysemy.Hasql.DbType where
import Polysemy.Db.Text.Quote (dquote)
import qualified Polysemy.Hasql.ColumnOptions as ColumnOptions
import qualified Polysemy.Hasql.Data.DbType as Column
import Polysemy.Hasql.Data.DbType (
Column (Column),
DbType (Prim, Prod, Sum),
Name (Name),
Selector (Selector),
Type... | |
4b5eed53d20581da60579281aead5d3e6486f659f93edbd63450b79586ddfd3b | NicolasT/paxos | QuickCheck.hs | Paxos - Implementations of Paxos - related consensus algorithms
-
- Copyright ( C ) 2012
-
- 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 2.... | null | https://raw.githubusercontent.com/NicolasT/paxos/9f207868ce3c5f557c7013bed13edff70206dfdd/src/Data/Serialize/QuickCheck.hs | haskell | Paxos - Implementations of Paxos - related consensus algorithms
-
- Copyright ( C ) 2012
-
- 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 2.... | |
093ccdf7749414a75ef2daa9489b0609632d1dc136d93b15898229c382817fee | xh4/web-toolkit | bootstrap.lisp | (in-package :css-test)
(in-suite :css-test)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun get-bootstrap ()
(let* ((response (http:get "-bootstrap/4.4.1/css/bootstrap.css"))
(octets (alexandria::read-stream-content-into-byte-vector
(http:response-body response))))
... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/test/css/bootstrap.lisp | lisp | (test-bootstrap) | (in-package :css-test)
(in-suite :css-test)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun get-bootstrap ()
(let* ((response (http:get "-bootstrap/4.4.1/css/bootstrap.css"))
(octets (alexandria::read-stream-content-into-byte-vector
(http:response-body response))))
... |
1418e39515cc793e07c5a9f0f7c1b187bfdadc9406a23d4850b294651854eeb0 | wireless-net/erlang-nommu | win32reg_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1997 - 2011 . 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 Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/stdlib/test/win32reg_SUITE.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 limitatio... | Copyright Ericsson AB 1997 - 2011 . 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 "
-module(win32reg_SUITE).
-export([all/0, s... |
e472f5ce067894bfc42e02626c2d293523753f5cc01691e3bd1e677642dfd713 | Frama-C/Frama-C-snapshot | numerors_arithmetics.ml | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/value/values/numerors/numerors_arithmetics.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
11e171905c3c0408af14287a2a36055ad36b11e5582de54da1402810dc24b811 | lukstafi/invargent | DisjElim.mli | * Disjunction elimination for InvarGenT.
Released under the GNU General Public Licence ( version 2 or
higher ) , NO WARRANTY of correctness etc . ( C ) 2013
@author ( AT ) gmail.com
@since Mar 2013
Released under the GNU General Public Licence (version 2 or
higher), NO WARRANTY ... | null | https://raw.githubusercontent.com/lukstafi/invargent/e25d8b12d9f9a8e2d5269001dd14cf93abcb7549/src/DisjElim.mli | ocaml | * Allow more general argument types by inferring more existential
result type. Default value [false]. | * Disjunction elimination for InvarGenT.
Released under the GNU General Public Licence ( version 2 or
higher ) , NO WARRANTY of correctness etc . ( C ) 2013
@author ( AT ) gmail.com
@since Mar 2013
Released under the GNU General Public Licence (version 2 or
higher), NO WARRANTY ... |
7a4d6dfb76a1f97de8e7a321d8a7ce97c095d8458f365f1d888f1348f7d34019 | rtoy/cmucl | boot3.lisp | ;; Unexport the newly re-introduced compiler-macroexpand* symbols from
the CL package . This is for the benefit of old cores , which might
;; still have those "exported", even though the functions (or even the
symbols ) do n't exist . This is deep CMUCL voodoo magic , do n't even
;; try to understand it.
(unex... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/bootfiles/18d/boot3.lisp | lisp | Unexport the newly re-introduced compiler-macroexpand* symbols from
still have those "exported", even though the functions (or even the
try to understand it. | the CL package . This is for the benefit of old cores , which might
symbols ) do n't exist . This is deep CMUCL voodoo magic , do n't even
(unexport '(CL::COMPILER-MACROEXPAND-1 CL::COMPILER-MACROEXPAND) "CL")
|
29a2cc263103f20a96432a22aa5442306d85caa34bea25757c263e6586f30450 | ghcjs/ghcjs | eq.hs | import Control.Monad
main = do
when ((1::Int) == 1) $ putStrLn "Expected =="
when ((1::Int) == 2) $ putStrLn "Unexpected =="
when ((1::Int) /= 1) $ putStrLn "Unexpected /="
when ((1::Int) /= 2) $ putStrLn "Expected /="
when ((1::Double) == 1) $ putStrLn "Expected =="
when ((1::Double) == 2) $ putStrLn "Une... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/fay/eq.hs | haskell | import Control.Monad
main = do
when ((1::Int) == 1) $ putStrLn "Expected =="
when ((1::Int) == 2) $ putStrLn "Unexpected =="
when ((1::Int) /= 1) $ putStrLn "Unexpected /="
when ((1::Int) /= 2) $ putStrLn "Expected /="
when ((1::Double) == 1) $ putStrLn "Expected =="
when ((1::Double) == 2) $ putStrLn "Une... | |
79370d05bcbda91001dfeb35918524b5dc7af55c36d3f490090dbadc84e43e10 | Relph1119/sicp-solutions-manual | p1-43-iter-compose-repeated.scm | (load "src/practices/ch01/p1-42-compose.scm")
(define (repeated f n)
(define (iter i repeated-f)
(if (= i 1)
repeated-f
(iter (- i 1)
(compose f repeated-f))))
(iter n f)) | null | https://raw.githubusercontent.com/Relph1119/sicp-solutions-manual/f2ff309a6c898376209c198030c70d6adfac1fc1/src/practices/ch01/p1-43-iter-compose-repeated.scm | scheme | (load "src/practices/ch01/p1-42-compose.scm")
(define (repeated f n)
(define (iter i repeated-f)
(if (= i 1)
repeated-f
(iter (- i 1)
(compose f repeated-f))))
(iter n f)) | |
daf7703dc8e6480618cfabb81e2861b4b94a329c58f9e26c7ed04875765bc900 | dwayne/eopl3 | interpreter.test.rkt | #lang racket
(require "./interpreter.rkt")
(require rackunit)
(check-equal?
(run "5")
(num-val 5))
(check-equal?
(run "x")
(num-val 10))
(check-equal?
(run "zero?(i)")
(bool-val #f))
(check-equal?
(run "zero?(-(i, 1))")
(bool-val #t))
(check-equal?
(run "-(55, -(x, 11))")
(num-val 56))
(check-equal?
... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/04-ch4/interpreters/racket/CALL-BY-NEED-4.42/interpreter.test.rkt | racket |
(odd 888) end
CALL-BY-REFERENCE tests
a end
z end
CALL-BY-NAME tests
Answer: Yes!
However, if we use "eager" let then it runs indefinitely
or until it runs out of memory
Uncomment to see what happens
(check-equal?
(run
#<<CODE
in let a = (loop 0)
CODE
)
(num-val 5)) | #lang racket
(require "./interpreter.rkt")
(require rackunit)
(check-equal?
(run "5")
(num-val 5))
(check-equal?
(run "x")
(num-val 10))
(check-equal?
(run "zero?(i)")
(bool-val #f))
(check-equal?
(run "zero?(-(i, 1))")
(bool-val #t))
(check-equal?
(run "-(55, -(x, 11))")
(num-val 56))
(check-equal?
... |
f915d80aa0110e505265d7a90f6565d42518c462b8cce64ad1b2ea69f891a7b1 | mitchellwrosen/riak2 | ErlangFunction.hs | module Riak.ErlangFunction
( ErlangFunction(..)
) where
import RiakErlangFunction (ErlangFunction(..))
| null | https://raw.githubusercontent.com/mitchellwrosen/riak2/d3c4ef4389012c70e72623cdf9a4caec0a07e568/riak2/public/Riak/ErlangFunction.hs | haskell | module Riak.ErlangFunction
( ErlangFunction(..)
) where
import RiakErlangFunction (ErlangFunction(..))
| |
e7b470da969c92323a19a689845e34773f647878b6f538e935fc8015dca25ad4 | fizruk/tubes | Main.hs | module Main where
import Tubes
main :: IO ()
main = run
| null | https://raw.githubusercontent.com/fizruk/tubes/d56b619eef2573d7cdca28d5929a1a7a4119fbcf/app/Main.hs | haskell | module Main where
import Tubes
main :: IO ()
main = run
| |
c939ba6ab3f80c1500a1e2b13747fd672eae9604841387e558a2c6cd3d4451bc | S8A/htdp-exercises | ex097.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex097) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex097.rkt | racket | about the language level of this file in a form that our tools can easily process.
Constants
The missile ascends at 2x the speed of the UFO
A UFO is a Posn.
interpretation (make-posn x y) is the UFO's location
(using the top-down, left-to-right convention)
A Tank is a structure:
(make-tank Number Number).
... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex097) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t ... |
6222ee2ff3b253438be16b4726c84c2cf89f4dd6b7c8a456d4653a9fc5a73502 | filmor/ierl | jup_display.erl | -module(jup_display).
-ignore_xref([
display/1,
update/2
]).
-export([
to_map/1,
display/1,
update/2
]).
-export_type([
type/0
]).
-type type() ::
data()
| {mime_type(), data()}
| [{mime_type(), data()}, ...]
| #{mime_type() => data()}.
-type data() :: iodata().
-type mime_t... | null | https://raw.githubusercontent.com/filmor/ierl/81647bfabaccf535ca50525f50a93486cd13d7b6/apps/jupyter/src/jup_display.erl | erlang | Only works correctly when the io driver is jup_kernel_io | -module(jup_display).
-ignore_xref([
display/1,
update/2
]).
-export([
to_map/1,
display/1,
update/2
]).
-export_type([
type/0
]).
-type type() ::
data()
| {mime_type(), data()}
| [{mime_type(), data()}, ...]
| #{mime_type() => data()}.
-type data() :: iodata().
-type mime_t... |
f5174ebdaf3991ac383e6ffec7ce8849f61e2ffdb7ee0f5c0f1afb4952b0221b | evturn/haskellbook | Main.hs | module Main where
import Vigenere
main :: IO ()
main = run
| null | https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/29/29.09-file-io-with-vigenere/app/Main.hs | haskell | module Main where
import Vigenere
main :: IO ()
main = run
| |
bff7cc3c77642e7d9f8e220740b69b41a567af4978564c58fb3f78d8be4a5e3d | poroh/ersip | ersip_nameaddr.erl | %%%
Copyright ( c ) 2017 , 2020 Dmitry Poroh
%%% All rights reserved.
Distributed under the terms of the MIT License . See the LICENSE file .
%%%
%%% Name and address (Used in From/To/Contact etc. fields)
%%%
-module(ersip_nameaddr).
-export([parse/1,
parse/2,
assemble/2,
assemble_displ... | null | https://raw.githubusercontent.com/poroh/ersip/f1b0d3c5713fb063a6cc327ea493f06cff6a6e5e/src/message/ersip_nameaddr.erl | erlang |
All rights reserved.
Name and address (Used in From/To/Contact etc. fields)
===================================================================
Types
===================================================================
===================================================================
API
=======================... | Copyright ( c ) 2017 , 2020 Dmitry Poroh
Distributed under the terms of the MIT License . See the LICENSE file .
-module(ersip_nameaddr).
-export([parse/1,
parse/2,
assemble/2,
assemble_display_name/1,
assemble_display_name_bin/1
]).
-export_type([display_name/0]).
-in... |
c9e057897b871029c41e370cb4df1d5f31d853ba4ae6427aba92b0edf7098993 | zoomhub/zoomhub | Uploads.hs | module ZoomHub.Config.Uploads
( Uploads (..),
parse,
)
where
import Data.Aeson (ToJSON, Value (String), toJSON)
import qualified Data.Text as T
data Uploads
= UploadsDisabled
| UploadsEnabled
deriving (Eq, Show)
parse :: String -> Uploads
parse "true" = UploadsEnabled
parse _ = UploadsDisabled
instanc... | null | https://raw.githubusercontent.com/zoomhub/zoomhub/3779709478d17a4c46762de1d5d3ae451437c087/src/ZoomHub/Config/Uploads.hs | haskell | module ZoomHub.Config.Uploads
( Uploads (..),
parse,
)
where
import Data.Aeson (ToJSON, Value (String), toJSON)
import qualified Data.Text as T
data Uploads
= UploadsDisabled
| UploadsEnabled
deriving (Eq, Show)
parse :: String -> Uploads
parse "true" = UploadsEnabled
parse _ = UploadsDisabled
instanc... | |
16bb840732a5366d7a527f195690a799b87992a84ca8e19eec70a668e6d2954b | ProjectMAC/propagators | algebraic-tms-test.scm | ;;; ----------------------------------------------------------------------
Copyright 2010 and
;;; ----------------------------------------------------------------------
This file is part of Propagator Network Prototype .
;;;
Propagator Network Prototype is free software ; you can
;;; redistribute it and/or ... | null | https://raw.githubusercontent.com/ProjectMAC/propagators/add671f009e62441e77735a88980b6b21fad7a79/explorations/algebraic-tms-test.scm | scheme | ----------------------------------------------------------------------
----------------------------------------------------------------------
you can
redistribute it and/or modify it under the terms of the GNU
any later version.
will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of M... | Copyright 2010 and
This file is part of Propagator Network Prototype .
General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at your option )
Propagator Network Prototype is distributed in the hope that it
You should have received a copy of the GNU... |
841746d17f5d1f225fb61165d4235897b23316f5c197b55caefa6d234759d97c | Gertjan423/KHC | AssocList.hs |
module Utils.AssocList
( AssocList(..), lookupInAssocList, extendAssocList, adjustAssocList
, mapFstWithDataAssocList, mapAssocListM, mapAssocListM_ -- make it completely opaque
) where
import Utils.SnocList
import Utils.PrettyPrint
import Control.Arrow (second)
-- * Association Lists
-- ----------------------------... | null | https://raw.githubusercontent.com/Gertjan423/KHC/07d00ebaab5245f632eff8ae7930711a44259192/Utils/AssocList.hs | haskell | make it completely opaque
* Association Lists
------------------------------------------------------------------------------
GEORGE: Hate the name. Find something appropriate if possible.
GEORGE: I would have preferred to pass them to the right but this means
| Adjust ALL entries with this key
apply the function... |
module Utils.AssocList
( AssocList(..), lookupInAssocList, extendAssocList, adjustAssocList
) where
import Utils.SnocList
import Utils.PrettyPrint
import Control.Arrow (second)
newtype AssocList a b = AssocList (SnocList (a,b))
instance Semigroup (AssocList a b) where
(<>) (AssocList xs) (AssocList ys) = AssocLi... |
927541cf2d0fa16ac4df3d662158bff77c2f8daa0298ef93ee121f9b4d71a490 | RefactoringTools/HaRe | MultiMatchesIn4.hs | module MultiMatchesIn4 where
square x y = let sq x 0 = 0
sq x = x ^ pow
pow = 2
in sq x + sq y
g = let blah = 42 + blah2
blah2 = 9
in blah
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/testing/letToWhere/MultiMatchesIn4.hs | haskell | module MultiMatchesIn4 where
square x y = let sq x 0 = 0
sq x = x ^ pow
pow = 2
in sq x + sq y
g = let blah = 42 + blah2
blah2 = 9
in blah
| |
c3d1105645757287db3ae146a5beb6f83b4bb185d8363703c7658566e5584f31 | tezos/tezos-mirror | p2p_reader.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/448daee0f4ae76893ae524536e428aa0e22f1d60/src/lib_shell/p2p_reader.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2019 - 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 " , W... |
71c475d90a946327846fbe19275be82f61ebde9a4417baee2f2e4f9810433802 | spawnfest/eep49ers | bad_behaviour1.erl | -module(bad_behaviour1).
-export([behaviour_info/1]).
behaviour_info(callbacks) ->
[{a,1,bad}].
| null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/stdlib/test/erl_lint_SUITE_data/bad_behaviour1.erl | erlang | -module(bad_behaviour1).
-export([behaviour_info/1]).
behaviour_info(callbacks) ->
[{a,1,bad}].
| |
772c80e0f3588c2ef3213a45d7fad96f7f95bac835b1d338d537304912d068a1 | TrustInSoft/tis-kernel | dyncall.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/dyncall.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
bf22bb2dea4c8ff14e9687e23343c4d8d01ba96fe4f2c99381642f75b706d732 | ocharles/blog | 2013-12-18-doctest.hs | import Test.DocTest
main :: IO ()
main = doctest [ "2013-12-18-square.hs", "2013-12-18-print.hs" ]
| null | https://raw.githubusercontent.com/ocharles/blog/fa8e911d3c03b134eee891d187a1bb574f23a530/code/2013-12-18-doctest.hs | haskell | import Test.DocTest
main :: IO ()
main = doctest [ "2013-12-18-square.hs", "2013-12-18-print.hs" ]
| |
84648ad80cf50f7a72219e7148fc99eb2eb7ef127190893c854ea5509cd3f60a | qrilka/xlsx | Comment.hs | # LANGUAGE DeriveGeneric #
module Codec.Xlsx.Types.Comment where
import Control.DeepSeq (NFData)
import Data.Text (Text)
import GHC.Generics (Generic)
import Codec.Xlsx.Types.Common
-- | User comment for a cell
--
-- TODO: the following child elements:
-- guid, shapeId, commentPr
--
Section 18.7.3 " comment ( Comm... | null | https://raw.githubusercontent.com/qrilka/xlsx/397c3c9db965419a2d2d72470ba68f478748c573/src/Codec/Xlsx/Types/Comment.hs | haskell | | User comment for a cell
TODO: the following child elements:
guid, shapeId, commentPr
^ cell comment text, maybe formatted
^ comment author | # LANGUAGE DeriveGeneric #
module Codec.Xlsx.Types.Comment where
import Control.DeepSeq (NFData)
import Data.Text (Text)
import GHC.Generics (Generic)
import Codec.Xlsx.Types.Common
Section 18.7.3 " comment ( Comment ) " ( p. 1749 )
data Comment = Comment
{ _commentText :: XlsxText
Section 18.7.7 " text (... |
4531ae45dc48f33bd52549f63248c194ca5eaebcb81f18e3f039ff2f053e0f8f | atgreen/lisp-openshift | specials.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : HUNCHENTOOT ; Base : 10 -*-
Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;; * Redistrib... | null | https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/hunchentoot-1.2.3/specials.lisp | lisp | Syntax : COMMON - LISP ; Package : HUNCHENTOOT ; Base : 10 -*-
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 t... |
Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :hunchentoot)
(defmacro defconstant (name value &optional doc)
"Make sure VALUE is evaluated only ... |
54733a772210fd7c62512b850eb7073060be40aa4796a30335ab9d5bc4b0c1c5 | weblocks-framework/weblocks | html-utils.lisp |
(in-package :weblocks-test)
;;; test with-form-html macro
(deftest-html with-form-html-1
(with-request :get nil
(make-action #'identity "abc123")
(with-html-form (:get "abc123")
(:div "test1")
(:div "test2")))
(:form
:action "/foo/bar"
:method "get"
:onsubmit "initiateFormAc... | null | https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/test/snippets/html-utils.lisp | lisp | test with-form-html macro
testing render-link
test render-button
test render-form-and-button
test render-checkbox
test render-dropdown
test render-autodropdown
test render-radio-buttons
test render-password
test render-textarea
test render-list
test scriptonly
test noscript
test render-message |
(in-package :weblocks-test)
(deftest-html with-form-html-1
(with-request :get nil
(make-action #'identity "abc123")
(with-html-form (:get "abc123")
(:div "test1")
(:div "test2")))
(:form
:action "/foo/bar"
:method "get"
:onsubmit "initiateFormAction(\"abc123\", $(this), \"we... |
3bc757e01ad8149144f2e2b972123c6592211845f89c03e8dbe08c84530b7d1a | finnishtransportagency/harja | paallystyspalvelusopimukset.clj | (ns harja.palvelin.integraatiot.paikkatietojarjestelma.tuonnit.paallystyspalvelusopimukset
(:require [taoensso.timbre :as log]
[clojure.java.jdbc :as jdbc]
[harja.kyselyt.urakat :as u]
[harja.palvelin.integraatiot.paikkatietojarjestelma.tuonnit.shapefile :as shapefile]
... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/0c819266ba3ad90226926ca9d9ef69cd1b3abe9d/src/clj/harja/palvelin/integraatiot/paikkatietojarjestelma/tuonnit/paallystyspalvelusopimukset.clj | clojure | (ns harja.palvelin.integraatiot.paikkatietojarjestelma.tuonnit.paallystyspalvelusopimukset
(:require [taoensso.timbre :as log]
[clojure.java.jdbc :as jdbc]
[harja.kyselyt.urakat :as u]
[harja.palvelin.integraatiot.paikkatietojarjestelma.tuonnit.shapefile :as shapefile]
... | |
f3ae25ee6ad9d12bf0f4b8e03051f59f5547cd5f6ef3d3e1a87527d06920bcbd | ocurrent/ocaml-multicore-ci | repo_url_utils.ml | let git_ext_re = Str.regexp "\\.git$"
let sanitize_re = Str.regexp "[^A-Za-z0-9-_]"
let first_two = function
| [] -> [ "dummy"; "dummy" ]
| [ a ] -> [ a; "dummy" ]
| a :: b :: _ -> [ a; b ]
let url_gref_from_url url =
let bits = url |> String.split_on_char '@' in
match bits with [ url; gref ] -> (url, gref)... | null | https://raw.githubusercontent.com/ocurrent/ocaml-multicore-ci/d46eecaf7269283a4b95ee40d2a9d6c7ec34a7bf/lib/repo_url_utils.ml | ocaml | let git_ext_re = Str.regexp "\\.git$"
let sanitize_re = Str.regexp "[^A-Za-z0-9-_]"
let first_two = function
| [] -> [ "dummy"; "dummy" ]
| [ a ] -> [ a; "dummy" ]
| a :: b :: _ -> [ a; b ]
let url_gref_from_url url =
let bits = url |> String.split_on_char '@' in
match bits with [ url; gref ] -> (url, gref)... | |
aea63e4f262ccbf10deadcafe851f27388edec5aa87ddf96bb32aeb7d8145bc3 | tianyicui/golio | prim_macro.mli | (** Primitive macros *)
open Type
val load :
env -> sexp list -> env * value
;;
TODO abstract out , to Eval or something ?
(** association list of all primitive macros. The key of the list is the name
* of the macro. *)
val prim_macros :
(string * (env -> sexp list -> env * value)) list
;;
| null | https://raw.githubusercontent.com/tianyicui/golio/2f03a0ddb451ff8389125477e1214839973eaa1f/src/prim_macro.mli | ocaml | * Primitive macros
* association list of all primitive macros. The key of the list is the name
* of the macro. |
open Type
val load :
env -> sexp list -> env * value
;;
TODO abstract out , to Eval or something ?
val prim_macros :
(string * (env -> sexp list -> env * value)) list
;;
|
9db07785d0445c4d00f417499cf5bcea5e0714ea9a938ea20f0736b383aa9eab | rizo/snowflake-os | includecore.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/plugins/ocamlopt.opt/typing/includecore.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Misc
open Asttypes
open ... |
82dbae6d53192e1f9e6bda87cef311a1d858d721ced816287c6fb7d0aee8c481 | oakes/clojure-conj-2014 | 17-play-clj-defscreen.clj | (defscreen play-clj-defscreen-screen
:on-show
(fn [screen entities]
(update! screen :renderer (stage) :camera (orthographic))
(let [ui-skin (skin "skin/uiskin.json")
medium-font (skin! ui-skin :get-font "medium-font")
medium-style (style :label medium-font (color :white))
small... | null | https://raw.githubusercontent.com/oakes/clojure-conj-2014/575e8eeced02d761f8d278b95906083f03ba9565/17-play-clj-defscreen.clj | clojure | (defscreen play-clj-defscreen-screen
:on-show
(fn [screen entities]
(update! screen :renderer (stage) :camera (orthographic))
(let [ui-skin (skin "skin/uiskin.json")
medium-font (skin! ui-skin :get-font "medium-font")
medium-style (style :label medium-font (color :white))
small... | |
05c5590e9afd83f473bda9002c4f4b89a563f7cc046523135fee689106a4dbaf | IBM/wcs-ocaml | parser_util.mli |
* This file is part of the Watson Conversation Service OCaml API project .
*
* Copyright 2016 - 2017 IBM Corporation
*
* 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... | null | https://raw.githubusercontent.com/IBM/wcs-ocaml/b237b7057f44caa09d36e466be015e2bc3173dd5/examples/rulebot/src/parser/parser_util.mli | ocaml |
* This file is part of the Watson Conversation Service OCaml API project .
*
* Copyright 2016 - 2017 IBM Corporation
*
* 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... | |
380006f3fc74ea06b48cb4711c1a928992ff5d7ebd5d3dac18b9f49042e89d06 | OCADml/OCADml | sweep.ml | open Util
open V
module R2 = Rounding.Make (V2) (Arc2)
module Cap = struct
type offset =
{ d : float
; z : float
}
type offset_mode =
| Delta
| Chamfer
| Radius of
{ fn : int option
; fs : float option
; fa : float option
}
type offsets = Offsets : offset... | null | https://raw.githubusercontent.com/OCADml/OCADml/14cfc751a158d5a2f53a79e71fe9bb46a0886df7/lib/sweep.ml | ocaml | use the original shapes for caps if there has been point
duplication as repeated points will cause offset to fail (rounded caps) | open Util
open V
module R2 = Rounding.Make (V2) (Arc2)
module Cap = struct
type offset =
{ d : float
; z : float
}
type offset_mode =
| Delta
| Chamfer
| Radius of
{ fn : int option
; fs : float option
; fa : float option
}
type offsets = Offsets : offset... |
90b4aa58ae34c707638aae8e3a8bf6eabf464703d9eee6b58789e9d5428615be | JeffreyBenjaminBrown/digraphs-with-text | Edit.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE ViewPatterns #
module Dwt.Edit (
insLeaf -- Expr -> RSLT -> RSLT
Node(Tplt ) - > [ Node ] - > RSLT - > RSLT
Node(Tplt ) - > [ Node ] - > RSLT - > Either
Node(Tplt ) - > [ Node ] - > StateT RSLT ( Either DwtErr ) Node(Rel )
( Maybe Node)(principle ) - > [ Node ] - > ... | null | https://raw.githubusercontent.com/JeffreyBenjaminBrown/digraphs-with-text/34e47a52aa9abb6fd42028deba1623a92e278aae/src/Dwt/Edit.hs | haskell | Expr -> RSLT -> RSLT
unused
edit in place (as opposed to insert)
| Deprecated
title|principle, e.g. "alternatives"
======== edit (but not insert)
========= Deprecated | # LANGUAGE FlexibleContexts #
# LANGUAGE ViewPatterns #
module Dwt.Edit (
Node(Tplt ) - > [ Node ] - > RSLT - > RSLT
Node(Tplt ) - > [ Node ] - > RSLT - > Either
Node(Tplt ) - > [ Node ] - > StateT RSLT ( Either DwtErr ) Node(Rel )
( Maybe Node)(principle ) - > [ Node ] - > RSLT - > Either
RSLT - > Node... |
5b92d170f9458d7d75a2447e50a72a9d44d22940c02a3e7a9bfc3212fca93fb2 | xapi-project/example-ocaml-daemon | daemon_interface.ml |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... | null | https://raw.githubusercontent.com/xapi-project/example-ocaml-daemon/8ce07dab5c46d7ad2bffd08a0b75b9dac89b232b/daemon_interface.ml | ocaml | The interface is defined by extern function declarations. |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... |
363735bbe5b96bef99abe5e6f056793118bc36b747a12b04b0f87ea9bd746efc | pingles/clj-hector | serialize.clj | (ns ^{:author "Paul Ingles"
:description "Utilities for serializing and deserializing Clojure and Hector types."}
clj-hector.serialize
(:import [me.prettyprint.cassandra.serializers StringSerializer IntegerSerializer LongSerializer TypeInferringSerializer BytesArraySerializer SerializerTypeInferer UUIDSeriali... | null | https://raw.githubusercontent.com/pingles/clj-hector/020239c4148b21898a57830ef1696e6ca27a266c/src/clj_hector/serialize.clj | clojure | (ns ^{:author "Paul Ingles"
:description "Utilities for serializing and deserializing Clojure and Hector types."}
clj-hector.serialize
(:import [me.prettyprint.cassandra.serializers StringSerializer IntegerSerializer LongSerializer TypeInferringSerializer BytesArraySerializer SerializerTypeInferer UUIDSeriali... | |
30e1c3030a7e9899892a83cff738efb4794a7da2164acb85f385fdbc07e17b75 | 8c6794b6/haskell-sc-scratch | SchroederReverb.hs | ------------------------------------------------------------------------------
-- |
-- Module : $Header$
CopyRight : ( c ) 8c6794b6
-- License : BSD3
Maintainer :
-- Stability : unstable
-- Portability : portable
--
-- Schroeder reverb. Corresponding url for this module is:
--
< >
--
-- /Example... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/designing-sound/src/DesigningSound/SchroederReverb.hs | haskell | ----------------------------------------------------------------------------
|
Module : $Header$
License : BSD3
Stability : unstable
Portability : portable
Schroeder reverb. Corresponding url for this module is:
/Example/:
>
> // Choose which sort of input you want by (un)commenting these ... | CopyRight : ( c ) 8c6794b6
Maintainer :
< >
> > : m + Sound . SC3.ID
> > audition $ verb1 $ dust2 ' a ' kr ( mce [ 2.5,1.5 ] ) * sinOsc ar 440 0 * 0.2
> > audition $ verb2 $ dust2 ' a ' kr ( mce [ 2.5,1.5 ] ) * sinOsc ar 440 0 * 0.2
module DesigningSound.SchroederReverb where
import Sound.SC3
| C... |
fc251d9ebbbf90a8bdf6a4c275cdf64f59cee24b142c1912c307d0ea79fee463 | tel/saltine | Util.hs | # LANGUAGE TypeFamilies #
# LANGUAGE GeneralizedNewtypeDeriving #
# OPTIONS_GHC -fno - warn - orphans #
module Util where
import Crypto.Saltine.Class
import Control.Monad (replicateM)
import qualified Data.ByteString as S
import Data.Monoid
import Data.Semigroup... | null | https://raw.githubusercontent.com/tel/saltine/b00e00fa8ce8bf4ee176a9d3deead57c590fc686/tests/Util.hs | haskell | # LANGUAGE TypeFamilies #
# LANGUAGE GeneralizedNewtypeDeriving #
# OPTIONS_GHC -fno - warn - orphans #
module Util where
import Crypto.Saltine.Class
import Control.Monad (replicateM)
import qualified Data.ByteString as S
import Data.Monoid
import Data.Semigroup... | |
c1b7b2190b198842149014375c83a1891004db4f949c20cffd37f5065fd620a1 | dvanhorn/oaam | deltas.rkt | #lang racket
(require "do.rkt" "env.rkt" "notation.rkt" "primitives.rkt" racket/splicing racket/stxparam
"store-passing.rkt" "context.rkt" "fix.rkt"
"handle-limits.rkt"
"graph.rkt" racket/stxparam)
(provide bind-join-∆s bind-join*-∆s mk-∆-fix^ mk-∆-fix2^ mk-timestamp-∆-fix^ with-σ-∆s)
;; Uti... | null | https://raw.githubusercontent.com/dvanhorn/oaam/79bc68ecb79fef45474a948deec1de90d255f307/code/deltas.rkt | racket | Utility function for combining multiple σ-∆s
Wide fixpoint for σ-∆s
Uses counting and merges stores between stepping all states.
If a state is revisited with a different store, that counts as
a different state.
filter the final results | #lang racket
(require "do.rkt" "env.rkt" "notation.rkt" "primitives.rkt" racket/splicing racket/stxparam
"store-passing.rkt" "context.rkt" "fix.rkt"
"handle-limits.rkt"
"graph.rkt" racket/stxparam)
(provide bind-join-∆s bind-join*-∆s mk-∆-fix^ mk-∆-fix2^ mk-timestamp-∆-fix^ with-σ-∆s)
(defin... |
c171ba20d21e7b3e6cd6341c8e1c1f2ebbcaddca420de197f0ee8554ed5f67e6 | kowainik/extensions | Module.hs | |
Copyright : ( c ) 2020 - 2022 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
for Haskell Modules to get all Haskell Language Extensions used .
Copyright: (c) 2020-2022 Kowainik
SPDX-License-Identifier: MPL-2.0
Maintainer: Kowainik <>
Parser for Haskell Modules to get all Haskell Lang... | null | https://raw.githubusercontent.com/kowainik/extensions/188b1b6f751e80b9de9ce9a48cc36d7ef0e5f64a/src/Extensions/Module.hs | haskell | * Internal Parsers
| Internal data type for known and unknown extensions.
Make sure that there is no conflicting 'SafeHaskellExtension's.
| By the given file path, reads the file and returns 'ParsedExtensions', if
parsing succeeds.
| By the given file source content, returns 'ParsedExtensions', if parsing
succeed... | |
Copyright : ( c ) 2020 - 2022 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
for Haskell Modules to get all Haskell Language Extensions used .
Copyright: (c) 2020-2022 Kowainik
SPDX-License-Identifier: MPL-2.0
Maintainer: Kowainik <>
Parser for Haskell Modules to get all Haskell Lang... |
1d2044e87657efe9683b91b40ce7ad1736924f80f93a67cb31cce859791e51d7 | reactiveml/rml | syntaxerr.ml | This file was syntaxerr.ml from
(***********************************************************************)
(* *)
(* Objective Caml *)
(* ... | null | https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/patch/compiler/parsing/syntaxerr.ml | ocaml | *********************************************************************
Objective Caml
... | This file was syntaxerr.ml from
, projet Cristal , INRIA Rocquencourt
Copyright 1997 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 .
... |
ef0c172415c4d00e392f70eea4d04031a806c09e7512506edd32872dd9a7224a | chaoxu/mgccl-haskell | nwck.hs | import Data.Maybe
import System.IO
import Newick
import Data.Tree
main :: IO ()
main = loop []
loop xs = do c <- getLine
d <- getLine
let [x,y] = words d
do end <- isEOF
if end
then putStrLn $ unwords $ map show $ solve $ reverse ((c,x,y):xs)
... | null | https://raw.githubusercontent.com/chaoxu/mgccl-haskell/bb03e39ae43f410bd2a673ac2b438929ab8ef7a1/rosalind/nwck.hs | haskell | import Data.Maybe
import System.IO
import Newick
import Data.Tree
main :: IO ()
main = loop []
loop xs = do c <- getLine
d <- getLine
let [x,y] = words d
do end <- isEOF
if end
then putStrLn $ unwords $ map show $ solve $ reverse ((c,x,y):xs)
... | |
eb6015d61d35f554683572113ad1b2c682b90f8dec2a9c1d42aa1fec5fca1875 | workframers/garamond | logging.clj | (ns garamond.logging
(:require [taoensso.timbre :as timbre]
[clojure.string :as string]))
(defn- log-message [{:keys [msg_ level ?ns-str ?file ?line]}]
(let [msg (force msg_)
lev-str (->> level name string/upper-case (format "%-6s"))
where (str "[" (timbre/color-str :cyan (or ?fil... | null | https://raw.githubusercontent.com/workframers/garamond/a5077bc99d5f6e303735505068d5363d3b2cc00c/src/garamond/logging.clj | clojure | (ns garamond.logging
(:require [taoensso.timbre :as timbre]
[clojure.string :as string]))
(defn- log-message [{:keys [msg_ level ?ns-str ?file ?line]}]
(let [msg (force msg_)
lev-str (->> level name string/upper-case (format "%-6s"))
where (str "[" (timbre/color-str :cyan (or ?fil... | |
4878011a1cb814bceef50e64c7091f05f18e882b20ffd88d56fcc986c448a00b | int28h/HaskellTasks | 0024.hs |
, исходного списка , значение которых нечетно .
GHCi > oddsOnly [ 2,5,7,10,11,12 ]
[ 5,7,11 ]
четности можно использовать функции odd и even стандартной библиотеки .
Сформируйте список целых чисел, содержащий только те элементы исходного списка, значение которых нечетно.
GHCi> oddsOnly [2,5,7,10,... | null | https://raw.githubusercontent.com/int28h/HaskellTasks/38aa6c1d461ca5774350c68fa7dd631932f10f84/src/0024.hs | haskell |
, исходного списка , значение которых нечетно .
GHCi > oddsOnly [ 2,5,7,10,11,12 ]
[ 5,7,11 ]
четности можно использовать функции odd и even стандартной библиотеки .
Сформируйте список целых чисел, содержащий только те элементы исходного списка, значение которых нечетно.
GHCi> oddsOnly [2,5,7,10,... | |
3090aaf94b067326771b80b6511beec37660f861498d878d16a77fe858241942 | rurban/clisp | macros.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*-
;;;
TEXAS INSTRUMENTS INCORPORATED
;;; P.O. BOX 2909
AUSTIN , TEXAS 78769
;;;
Copyright ( C ) 1987 Texas Instruments Incorporated .
;;;
;;; Permission is granted to any individual or institution to use,... | null | https://raw.githubusercontent.com/rurban/clisp/75ed2995ff8f5364bcc18727cde9438cca4e7c2c/modules/clx/mit-clx/macros.lisp | lisp | Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*-
P.O. BOX 2909
Permission is granted to any individual or institution to use, copy, modify,
and distribute this software, provided that this complete copyright and
permission notice is maintained, intact, in all copies and supporting
... |
TEXAS INSTRUMENTS INCORPORATED
AUSTIN , TEXAS 78769
Copyright ( C ) 1987 Texas Instruments Incorporated .
Texas Instruments Incorporated provides this software " as is " without
CLX basicly implements a very low overhead remote procedure call
This is built on top of BUFFER
(in-package :xlib)... |
4ee81cc6b640066d362258a2f90f41a0c0ec3181bcbb936b03a8a9285bec6cfa | rescript-lang/rescript-compiler | parsing.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/c74eb8de6ed6dd909571da9cc4d0ad16ae2154d2/jscomp/stdlib-406/parsing.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Lexing
Internal interface to the parsing engine
type parser_env =
States
Semantic attribute... |
73f9f44b34f77fa68df0309eb4c456c6baa60a24fadc1e000192ac08d4523665 | openmusic-project/openmusic | metaobjectcontainer.lisp | ;=========================================================================
OpenMusic : Visual Programming Language for Music Composition
;
Copyright ( C ) 1997 - 2009 IRCAM - Centre , Paris , France .
;
This file is part of the OpenMusic environment sources
;
OpenMusic is free software : yo... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/kernel/ommodele/omframes/containereditors/metaobjectcontainer.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 - 2009 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 Publi... |
3f1cfd23e208559277e0bc08bb86612ebd20c5a19b17671a1c3d1ef3aa6b6df8 | qitab/pyjure | anormalization.clj | (ns pyjure.anormalization
(:use [clojure.core.match :only [match]]
[pyjure.debug]
[pyjure.utilities]))
(defn &A [x]
(fn [] x))
(defn anormalize- [x]
((&A x) []))
| null | https://raw.githubusercontent.com/qitab/pyjure/b9aa49b4f74c85f2b617e924f61eaddb194119bf/src/pyjure/anormalization.clj | clojure | (ns pyjure.anormalization
(:use [clojure.core.match :only [match]]
[pyjure.debug]
[pyjure.utilities]))
(defn &A [x]
(fn [] x))
(defn anormalize- [x]
((&A x) []))
| |
e005c354136de7c39326d8f29c21bca7d4438ac30c44ae65b3a08ada7794d190 | ormf/cm | utils.lisp | ;;; **********************************************************************
Copyright ( C ) 2009 , < taube ( at ) uiuc ( dot ) edu >
;;;
;;; This program is free software; you can redistribute it and/or
modify it under the terms of the Lisp Lesser Gnu Public License .
See for the text of this agreement .
;;; **... | null | https://raw.githubusercontent.com/ormf/cm/904e10db2a1b02265317c03e0f063bdcfd9c3de5/src/utils.lisp | lisp | **********************************************************************
This program is free software; you can redistribute it and/or
********************************************************************** | Copyright ( C ) 2009 , < taube ( at ) uiuc ( dot ) edu >
modify it under the terms of the Lisp Lesser Gnu Public License .
See for the text of this agreement .
generated by scheme->cltl from utils.scm on 04 - Aug-2009 14:11:45
(in-package :cm)
(defparameter %months #("Jan" "Feb" "Mar" "Apr" "May" "Jun" "J... |
025000955c6186c25dce21af7cf68be16ff31c740ee427176804cab4a18653cf | xapi-project/xen-api-client | xen_api_auth.ml |
* Copyright ( C ) 2015 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in fi... | null | https://raw.githubusercontent.com/xapi-project/xen-api-client/f23b43428076e9b9773f27368230102a924b6575/lib/xen_api_auth.ml | ocaml |
* Copyright ( C ) 2015 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in fi... | |
1cb0ab1afdf0b477cf88f5ee4e7d37a58b340dd26696d16ec82198da623d4ffb | ad-si/TaskLite | SqlUtils.hs | {-|
Utils to simplify creation of SQL queries
-}
module SqlUtils where
import Protolude as P (
Applicative (pure),
Bool (False),
Either (..),
Eq ((==)),
Float,
Foldable (fold),
Functor (fmap),
IO,
Integer,
Maybe (..),
Semigroup ((<>)),
Show,
Text,
show,
take,
try,
unlines,
unwords,
... | null | https://raw.githubusercontent.com/ad-si/TaskLite/e36e1cb7998ff35185d86b7b3c988cb062622db5/tasklite-core/source/SqlUtils.hs | haskell | |
Utils to simplify creation of SQL queries
as column otherAlias = (column, Just otherAlias) | module SqlUtils where
import Protolude as P (
Applicative (pure),
Bool (False),
Either (..),
Eq ((==)),
Float,
Foldable (fold),
Functor (fmap),
IO,
Integer,
Maybe (..),
Semigroup ((<>)),
Show,
Text,
show,
take,
try,
unlines,
unwords,
words,
($),
)
import Data.Text as T (
int... |
fadc8e09478beeee67c483e7f2cf89cf3170a631134d7695749e326325b6ff64 | nilenso/time-tracker | service.clj | (ns time-tracker.web.service
(:require [bidi.ring :refer [make-handler]]
[ring.middleware.json :refer [wrap-json-response
wrap-json-body]]
[ring.middleware.params :refer [wrap-params]]
[ring.middleware.defaults :refer :all]
[rin... | null | https://raw.githubusercontent.com/nilenso/time-tracker/054d0dc6d6b89a4ed234d8f0b0a260b6deeef9e3/src/clj/time_tracker/web/service.clj | clojure | (ns time-tracker.web.service
(:require [bidi.ring :refer [make-handler]]
[ring.middleware.json :refer [wrap-json-response
wrap-json-body]]
[ring.middleware.params :refer [wrap-params]]
[ring.middleware.defaults :refer :all]
[rin... | |
bb3f9cab5bb0e128a2dfdadd0a60e830fea9b477344006cec98bfd40f1c23603 | biocad/openapi3 | Utils.hs | # LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeOperators #
module Data.OpenApi.Internal.Utils where
import Prelude ()
import Prelude.Compat
import Control.Lens ((&), (%~))
import Control.Lens.TH
... | null | https://raw.githubusercontent.com/biocad/openapi3/e4b27f3b5dbc938a10b4a78eb88d0dca6341eab9/src/Data/OpenApi/Internal/Utils.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
keyword
keyword
keyword
Prelude conflict
Prelude conflict
Prelude conflict
Prelude conflict | # LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeOperators #
module Data.OpenApi.Internal.Utils where
import Prelude ()
import Prelude.Compat
import Control.Lens ((&), (%~))
import Control.Lens.TH
import Data.Aeson
import Data.Aeson.Types
import qualified Data... |
e05708e7d55c3fc6a238a4129d0290c1c87c87d3665f7a99a74bfd0748864fce | 40ants/cl-prevalence | master-slave.lisp | ;;;; -*- mode: lisp -*-
;;;;
$ Id$
;;;;
The master - slave system keeps one prevalence system in sync with another
;;;; by sending transactions over a socket
;;;;
Copyright ( C ) 2004 , Beta Nine BVBA .
;;;;
;;;; You are granted the rights to distribute and use this software
as governed by the terms of the L... | null | https://raw.githubusercontent.com/40ants/cl-prevalence/89f5767b61fd2aabbaf7c8ee1161908f75000809/src/master-slave.lisp | lisp | -*- mode: lisp -*-
by sending transactions over a socket
You are granted the rights to distribute and use this software
(), also known as the LLGPL. | $ Id$
The master - slave system keeps one prevalence system in sync with another
Copyright ( C ) 2004 , Beta Nine BVBA .
as governed by the terms of the Lisp Lesser General Public License
(in-package :cl-prevalence)
(defun start-master-client (prevalence-system &key (host "localhost") (port 7651))
"Start... |
e32f37a0fc1899f73ce7c8e94d91941da4c2bf4aedf002939fced8fea8222379 | gregsexton/SICP-Clojure | ch1.clj | (ns sicp.ch1)
Exercise 1.2
(/ (+ 5 4 (- 2 (- 3 (+ 6 (/ 4 5)))))
(* 3 (- 6 2) (- 2 7))) ; -37/150
Exercise 1.3
(defn sum-square-larger [a b c]
(letfn [(square [n] (* n n))]
(- (apply + (map square (vector a b c)))
(square (min a b c)))))
Exercise 1.7
(defn sqrt [n]
(letfn [(go... | null | https://raw.githubusercontent.com/gregsexton/SICP-Clojure/1f675feda18594ce8c12e028e3746298544dbd68/src/sicp/ch1.clj | clojure | -37/150
Exercise 1.12
Exercise 1.31
Exercise 1.35
Exercise 1.40
Exercise 1.41 | (ns sicp.ch1)
Exercise 1.2
(/ (+ 5 4 (- 2 (- 3 (+ 6 (/ 4 5)))))
Exercise 1.3
(defn sum-square-larger [a b c]
(letfn [(square [n] (* n n))]
(- (apply + (map square (vector a b c)))
(square (min a b c)))))
Exercise 1.7
(defn sqrt [n]
(letfn [(good-enough? [old-guess new-guess]
(< (/... |
8056271fcb5d3d854523fc062a3d83a9e8ab4fdc8f44f0675d9391571a8dca59 | erlang/corba | rmod_random_impl.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1998 - 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/erlang/corba/396df81473a386d0315bbba830db6f9d4b12a04f/lib/ic/examples/erl-plain/rmod_random_impl.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 1998 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module('rmod_random_impl').
-export([produce/0,init/3]).
produce() ->
random:uniform().
init(S1,S2,S3) ->... |
bfef217ba6e53c408c030f8cde28962d7dce533ddb8983b8d6ac7dcafeffee0c | emanjavacas/cosycat | utils.clj | (ns cosycat.routes.utils
(:require [ring.util.response :refer [redirect]]
[buddy.auth :refer [authenticated?]]
[taoensso.timbre :as timbre]
[cosycat.app-utils :refer [span->token-id deep-merge-with dekeyword normalize-by]]
[cosycat.roles :refer [check-annotation-role]]
... | null | https://raw.githubusercontent.com/emanjavacas/cosycat/a7186363d3c0bdc7b714af126feb565f98793a6e/src/clj/cosycat/routes/utils.clj | clojure | Exceptions | (ns cosycat.routes.utils
(:require [ring.util.response :refer [redirect]]
[buddy.auth :refer [authenticated?]]
[taoensso.timbre :as timbre]
[cosycat.app-utils :refer [span->token-id deep-merge-with dekeyword normalize-by]]
[cosycat.roles :refer [check-annotation-role]]
... |
cfaec4fe51c40a4b27f7b954f254cf0d4fea48fd31f6484c856f32ab4c3c0677 | melange-re/melange | int64_string_test.ml |
let suites : Mt.pair_suites ref = ref []
let test_id = ref 0
let eq loc x y = Mt.eq_suites ~test_id ~suites loc x y
let v = Int64.to_string Int64.max_int
;; eq __LOC__ v "9223372036854775807"
let f a b =
eq __LOC__ (Int64.to_string a) b
let hh = Int64.(add min_int 100L)
;; eq __LOC__
hh
(-92233720368... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/int64_string_test.ml | ocaml | + 100 |
let suites : Mt.pair_suites ref = ref []
let test_id = ref 0
let eq loc x y = Mt.eq_suites ~test_id ~suites loc x y
let v = Int64.to_string Int64.max_int
;; eq __LOC__ v "9223372036854775807"
let f a b =
eq __LOC__ (Int64.to_string a) b
let hh = Int64.(add min_int 100L)
;; eq __LOC__
hh
(-92233720368... |
d0d9daab3339ccef86dd9fe2e573047cd1e18eab7f2d7842520ad333827b9b00 | robert-strandh/Clump | packages.lisp | (cl:in-package #:common-lisp-user)
(defpackage #:clump-test
(:use #:common-lisp))
| null | https://raw.githubusercontent.com/robert-strandh/Clump/1ea4dbac1cb86713acff9ae58727dd187d21048a/Test/packages.lisp | lisp | (cl:in-package #:common-lisp-user)
(defpackage #:clump-test
(:use #:common-lisp))
| |
5154b2abc639b8a7427327c8d898351dd202922ddb35ddae774a9085986f08f0 | penpot/penpot | colors_list.cljc | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.common.types.colors-list)
(defn colors-seq
[file-data]
(vals (:colors file-data)))
(defn add-col... | null | https://raw.githubusercontent.com/penpot/penpot/5463671db13441ba3f730a34118547d34a5a36f1/common/src/app/common/types/colors_list.cljc | clojure |
Copyright (c) KALEIDOS INC | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.common.types.colors-list)
(defn colors-seq
[file-data]
(vals (:colors file-data)))
(defn add-color
[file-data color]
(update ... |
8fff356869a0b4b4faee10ace8e7df36b40aa81d0a4ff6efaedd0d016888eeef | derekmcloughlin/pearls | chap09a.hs | data Person = Person String |
Celebrity String
deriving (Show)
type Party = [Person]
knows :: Person -> Person -> Bool
knows (Person p) (Celebrity c) = True
knows (Celebrity c) (Person p) = False
knows (Celebrity c1) (Celebrity c2) = True
-- Most people at the party don't know each other
... | null | https://raw.githubusercontent.com/derekmcloughlin/pearls/42bc6ea0fecc105386a8b75789f563d44e05b772/chap09/chap09a.hs | haskell | Most people at the party don't know each other
Everyone knows themselves | data Person = Person String |
Celebrity String
deriving (Show)
type Party = [Person]
knows :: Person -> Person -> Bool
knows (Person p) (Celebrity c) = True
knows (Celebrity c) (Person p) = False
knows (Celebrity c1) (Celebrity c2) = True
except for and
knows (Person "Ernie") (Person ... |
b4fcc72854cadfe2ed142e96548156a0f9a228b56aabb5fecb264ffca3717d98 | Decentralized-Pictures/T4L3NT | test_frozen_deposits.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_alpha/lib_protocol/test/test_frozen_deposits.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... |
f469fed70ba060b154c4887879d0ed2f5ed8bc36c427d92ea9ed8bb8ae84bdcc | generateme/inferme | 04_dependence.clj | (ns probmods.04-dependence
(:require [fastmath.core :as m]
[inferme.core :refer :all]
[inferme.plot :as plot]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Causal and statistical dependence
;;;... | null | https://raw.githubusercontent.com/generateme/inferme/74959f1aebafb2f6c577b8da6911079a615af70f/notebooks/probmods/04_dependence.clj | clojure |
Causal and statistical dependence
Causal Dependence
Detecting Dependence Through Intervention
Statistical Dependence | (ns probmods.04-dependence
(:require [fastmath.core :as m]
[inferme.core :refer :all]
[inferme.plot :as plot]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(let [c (flipb)
b (flipb)
a (if b (flipb 0.1) (flipb 0.4))]
(or ... |
d6b93842771549f3228963b70ff5e0ac2415aba051302d8e3297dbba9c294ca5 | jeromesimeon/Galax | alg_path_analysis.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/projection/alg_path_analysis.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : alg_path_analysis.mli , v 1.6 2007/05/16 15:32:12 mff Exp $
Path analysis over the XQuery algebra . Intended for use
with document projection and streaming . -
with document projection and streaming. - Michael *)
open Ast... |
397bee7174625c4ddb28249cb78e183c9dd7f07274e83ce8012bdc6581d89d41 | hyperfiddle/electric | hfql_new_expansion.cljc | (ns dustin.y2022.hfql.hfql-new-expansion
(:require [hyperfiddle.api :as hf]
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom :as dom]
[hyperfiddle.photon-ui2 :as ui]
[hyperfiddle.rcf :as rcf :refer [tests tap % with]])
#?(:cljs (:require-macros dustin.y2022.hfql.hfq... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2022/hfql/hfql_new_expansion.cljc | clojure | (ns dustin.y2022.hfql.hfql-new-expansion
(:require [hyperfiddle.api :as hf]
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom :as dom]
[hyperfiddle.photon-ui2 :as ui]
[hyperfiddle.rcf :as rcf :refer [tests tap % with]])
#?(:cljs (:require-macros dustin.y2022.hfql.hfq... | |
f93fee7e7532bfadbbae195ddb3246c8781defe18e0a4ae872c1e9dd726c6565 | nextjournal/clerk | cards_macro.clj | (ns cards-macro
(:require [nextjournal.clerk.viewer :as v]))
(defmacro card [body] `(v/->viewer-eval '~(v/resolve-aliases body)))
| null | https://raw.githubusercontent.com/nextjournal/clerk/94dfb96138cfc549c3e4c0948f6ebf71380a4676/notebooks/cards_macro.clj | clojure | (ns cards-macro
(:require [nextjournal.clerk.viewer :as v]))
(defmacro card [body] `(v/->viewer-eval '~(v/resolve-aliases body)))
| |
5b17f5675a93a76f814591d532d4baec1907d32cb16c81c96104726a8fe3545a | racket/eopl | interp.rkt | #lang eopl
(require "lang.rkt")
(require "data-structures.rkt")
(require "environments.rkt")
(require "store.rkt")
(require "classes.rkt")
(require (only-in racket pretty-print))
(provide value-of-program value-of instrument-let instrument-newref)
;;;;;;;;;;;;;;;; switches for instrument-let ;;;;;;;;;;;;;;;;
(defi... | null | https://raw.githubusercontent.com/racket/eopl/43575d6e95dc34ca6e49b305180f696565e16e0f/tests/chapter9/classes/interp.rkt | racket | switches for instrument-let ;;;;;;;;;;;;;;;;
say (instrument-let #t) to turn instrumentation on.
(instrument-let #f) to turn it off again.
the interpreter ;;;;;;;;;;;;;;;;
new cases for CLASSES language
-> Listof(List(Ref,Something-Readable)) | #lang eopl
(require "lang.rkt")
(require "data-structures.rkt")
(require "environments.rkt")
(require "store.rkt")
(require "classes.rkt")
(require (only-in racket pretty-print))
(provide value-of-program value-of instrument-let instrument-newref)
(define instrument-let (make-parameter #f))
value - of - progr... |
f109990a551a6dd34aff7a2276ee9d2469994c4012efb5927fe5d5ed3ea0dfa6 | ocaml-multicore/ocaml-tsan | digest.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/stdlib/digest.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* MD5 message digest .
This module provides functions to compute 128 - bit ' digests ' of
arbi... |
1cd7aedd5c8d5578c2255adc64324e925f86dffe52d6140cfaaec6db9a28a1da | hunt-framework/hunt | AnalyzerTests.hs | {-# LANGUAGE OverloadedStrings #-}
module Hunt.AnalyzerTests
(analyzerTests)
where
- Tests for Normalizers Analyzers Formatters #
import Hunt.TestHelper
import qualified Data.Text as T
import Test.Framework
import Test.Framework.Providers.HUnit
import ... | null | https://raw.githubusercontent.com/hunt-framework/hunt/d692aae756b7bdfb4c99f5a3951aec12893649a8/hunt-searchengine/test/Hunt/AnalyzerTests.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
Analyzer tests
----------------------------------------------------------------------------
normalizer position tests
----------------------------------------------------------------------------
normalizer ... |
module Hunt.AnalyzerTests
(analyzerTests)
where
- Tests for Normalizers Analyzers Formatters #
import Hunt.TestHelper
import qualified Data.Text as T
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.Framework.Providers.Quick... |
04d6b129b7fe4dffc42630e6ae54de8b096b4ca5cda2843b293ef28aca1d4877 | open-company/open-company-auth | static_test.clj | (ns oc.auth.integration.static-test
(:require [midje.sweet :refer :all]
[cheshire.core :as json]
[oc.auth.lib.utils :as test-utils]
[oc.auth.lib.test-setup :as ts]))
(with-state-changes [(before :contents (ts/setup-system!))
(after :contents (ts/teardown-syste... | null | https://raw.githubusercontent.com/open-company/open-company-auth/79275bd3b877e70048a80960d7fa2d14be0abfe9/test/oc/auth/integration/static_test.clj | clojure | (contains? (body "slack") "links") => true
(contains? body "email") => true
(contains? (body "email") "links") => true) | (ns oc.auth.integration.static-test
(:require [midje.sweet :refer :all]
[cheshire.core :as json]
[oc.auth.lib.utils :as test-utils]
[oc.auth.lib.test-setup :as ts]))
(with-state-changes [(before :contents (ts/setup-system!))
(after :contents (ts/teardown-syste... |
206d0effd2d75f7b4ac24ad83a69fa0e8c779d9d9951fd340cc9c12f56cbd931 | oral-health-and-disease-ontologies/ohd-ontology | data-record-classes.lisp | (defclass data-record (data-resource)
((resultset ; the resultset that record is part of
:accessor resultset
:initarg :resultset
:initform nil)
(contents ; record's contents/data
:accessor contents
:initarg :contents
:initform nil)))
(defclass file-record (data-record)
... | null | https://raw.githubusercontent.com/oral-health-and-disease-ontologies/ohd-ontology/ba3f502b86487c8ba5fa04ff8ba33312a1679570/src/vdw-translation/development-library/classes/data-record-classes.lisp | lisp | the resultset that record is part of
record's contents/data | (defclass data-record (data-resource)
:accessor resultset
:initarg :resultset
:initform nil)
:accessor contents
:initarg :contents
:initform nil)))
(defclass file-record (data-record)
())
(defclass jdbc-results (data-record)
())
(defclass record-list (data-record)
())
|
f2dbec87e6226e91addd2c9d18bff51e2737858de016eb18c1184759126b42a6 | leeavital/Erlang-Chat | postal_service.erl | -module(postal_service).
-export([start/0]).
-include("client_info.hrl").
% when we start, there is no one connected
start() -> loop([]).
% this prcess does not handle any TCP,
% rather it receives message from the main
% server loop and the client_handlers.
% Connected : a list of connected clients (a list of so... | null | https://raw.githubusercontent.com/leeavital/Erlang-Chat/8e44eb2344a6c2bc1ed15168f25abc3f2f897197/postal_service.erl | erlang | when we start, there is no one connected
this prcess does not handle any TCP,
rather it receives message from the main
server loop and the client_handlers.
Connected : a list of connected clients (a list of sockets)
add a client to the list of clients
send Message to all the clients from User
if we can't match... | -module(postal_service).
-export([start/0]).
-include("client_info.hrl").
start() -> loop([]).
loop(Connected) ->
receive
{add_client, Client} ->
io:format("starting a client handler in loop\n"),
spawn( client_handler, start, [Client, self()] ),
io:format("... |
77244f702a9b46ba4d54c6bdeef54e4e7e46be39dfb9d3d9edefa53eac3c0c7d | bitnomial/bitcoind-rpc | Main.hs | # LANGUAGE NumericUnderscores #
module Main (main) where
import Control.Applicative (optional, (<**>))
import Control.Concurrent (threadDelay)
import Control.Monad ((>=>))
import Control.Monad.Fix (fix)
import Data.ByteString.Char8 (unpack)
import Data.List (isPrefixOf, sort)
import Data.Maybe (listToMaybe, mapMaybe)... | null | https://raw.githubusercontent.com/bitnomial/bitcoind-rpc/c9c95b08c4adc479fba94e4e8a5bc5518dfb6a0f/bitcoind-regtest/rpc-explorer/Main.hs | haskell | # LANGUAGE NumericUnderscores #
module Main (main) where
import Control.Applicative (optional, (<**>))
import Control.Concurrent (threadDelay)
import Control.Monad ((>=>))
import Control.Monad.Fix (fix)
import Data.ByteString.Char8 (unpack)
import Data.List (isPrefixOf, sort)
import Data.Maybe (listToMaybe, mapMaybe)... | |
b04736125a2be1b54fd4f59561bf09612705caf5394b8e7b06dc66e61cf0cf00 | cartazio/tlaps | pco.ml |
* pars / pco.ml --- parsers ( based on lazy lists )
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* pars/pco.ml --- parsers (based on lazy lists)
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
(** Parsers implementation *)
Revision.f "$Rev: 31530 $";;
modu... | null | https://raw.githubusercontent.com/cartazio/tlaps/562a34c066b636da7b921ae30fc5eacf83608280/src/pars/pco.ml | ocaml | * Parsers implementation
Functor arguments, reexported
* The type [('s, 'a) prs] represents parsers with internal (user)
state of type ['s] returning results of type ['a]
* Run the given parser on the given token stream, returning a
possible parsed value. On success, the input contains the
unparse... |
* pars / pco.ml --- parsers ( based on lazy lists )
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* pars/pco.ml --- parsers (based on lazy lists)
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
Revision.f "$Rev: 31530 $";;
module LL = LazyList
module type ... |
c6c415ae3595d6355c709e194333a144ac61cfd5ffbc5c2e0a61a883031c298c | babashka/neil | version_test.clj | (ns babashka.neil.version-test
(:require [babashka.neil.git :as git]
[babashka.neil.meta :as meta]
[babashka.neil.version :as version]
[babashka.neil.test-util :refer [neil read-deps-edn set-deps-edn!
reset-test-dir test-dir test-file]]
... | null | https://raw.githubusercontent.com/babashka/neil/02f450fc723a0d953c527e7644897c88cf01b658/test/babashka/neil/version_test.clj | clojure | (ns babashka.neil.version-test
(:require [babashka.neil.git :as git]
[babashka.neil.meta :as meta]
[babashka.neil.version :as version]
[babashka.neil.test-util :refer [neil read-deps-edn set-deps-edn!
reset-test-dir test-dir test-file]]
... | |
325b1442ffd5a1b6c291793916aa94f3c11a5d34044550b110b39a05c08079aa | tweag/asterius | dsrun021.hs | -- Transformation stress test
{-# OPTIONS_GHC -XTransformListComp #-}
module Main where
import Data.List(takeWhile)
import GHC.Exts(sortWith)
employees = [ ("Simon", "MS", 80)
, ("Erik", "MS", 100)
, ("Phil", "Ed", 40)
, ("Gordon", "Ed", 45)
, ("Paul", "Yale", 60)]
m... | null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/deSugar/dsrun021.hs | haskell | Transformation stress test
# OPTIONS_GHC -XTransformListComp # |
module Main where
import Data.List(takeWhile)
import GHC.Exts(sortWith)
employees = [ ("Simon", "MS", 80)
, ("Erik", "MS", 100)
, ("Phil", "Ed", 40)
, ("Gordon", "Ed", 45)
, ("Paul", "Yale", 60)]
main = putStrLn (show output)
where
output = [ (dept, salary)
... |
2e8ac90386ff8212b03f8520752507f016ee6bb7e1e6941ef04f49889eee0ebe | cunger/pythia | Clauses_.clj | (ns core.definitions.Clauses_
(:require [core.nlu.context.short_term_memory :as stm]
[core.data.LambdaRDF :refer :all])
(:import [core.data.LambdaRDF Term Count Triple Not And Or Filter Quant Sel Ask Select]))
;; aux
(defn access [k m] (if (k m) (k m) (k (m))))
;; Clauses
; Utterances
(def sa... | null | https://raw.githubusercontent.com/cunger/pythia/f58e35395968d4c46aef495fd363c26b1102003c/src/core/definitions/Clauses_.clj | clojure | aux
Clauses
Utterances
Declarative sentences
Coordination
Questions
(def Where :place)
(def When :datetime)
(def How :manner)
(def Why :reason)
Imperatives
Modalities
mod_clause : Modality -> Predicate -> Entity -> Statement; | (ns core.definitions.Clauses_
(:require [core.nlu.context.short_term_memory :as stm]
[core.data.LambdaRDF :refer :all])
(:import [core.data.LambdaRDF Term Count Triple Not And Or Filter Quant Sel Ask Select]))
(defn access [k m] (if (k m) (k m) (k (m))))
(def say identity)
(def ask identi... |
b78a2bc61202723624a499cd6683691c8e86d05519ed7318d360f19243b1d622 | philnguyen/soft-contract | impossible-precon.rkt | 1421368695192
#lang racket
(require soft-contract/fake-contract)
(define (f x) 5)
(provide (contract-out [f ((and/c integer? string?) . -> . string?)]))
| null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/sym-exe/impossible-precon.rkt | racket | 1421368695192
#lang racket
(require soft-contract/fake-contract)
(define (f x) 5)
(provide (contract-out [f ((and/c integer? string?) . -> . string?)]))
| |
1bda456f4bac98dd4e1d99fc1a4996c62ac0073a096ce8c81b6a8001e8bd054f | fragnix/fragnix | GHC.IO.Encoding.UTF8.hs | {-# LINE 1 "GHC.IO.Encoding.UTF8.hs" #-}
# LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude
, BangPatterns
, NondecreasingIndentation
, MagicHash
#
, BangPatterns
, NondecreasingIndentation
, MagicHash
#-}
{-# OPTIONS_GHC -funbox-strict-fi... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/builtins/base/GHC.IO.Encoding.UTF8.hs | haskell | # LINE 1 "GHC.IO.Encoding.UTF8.hs" #
# OPTIONS_GHC -funbox-strict-fields #
---------------------------------------------------------------------------
|
Module : GHC.IO.Encoding.UTF8
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
Portability : non-portable
----------... | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude
, BangPatterns
, NondecreasingIndentation
, MagicHash
#
, BangPatterns
, NondecreasingIndentation
, MagicHash
#-}
Copyright : ( c ) The University of Glasgow , 2009
UTF-8 Codec f... |
a86e0d06f07f1988a9e45b3fa5f9383d59b6483c9a43c5cd693c408556178dde | RolfRolles/PandemicML | X86Decode.ml | TODO : General cleanup at this point . Clean up language regarding
modrm_mem_reg_predicate vs. _ discriminator
let oJz ( ) = ...
Need to behave differently when given a 16 - bit address size : and with 0xFFFFl .
OIbAsOpndSize
OMbBx
OMbEbx
modrm_mem_reg_predicate vs. _disc... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/X86/Disassembler11272012-IncompleteAbstraction/X86Decode.ml | ocaml | Fetch bytes from an arbitrary source. Do this more intelligently.
Types and basic convenience functions: prefixes, mod R/M
base register number, scale register number, scale factor, displacement
Things that might go wrong
The "context" that we accrue while decoding an instruction
Convenience functions so w... | TODO : General cleanup at this point . Clean up language regarding
modrm_mem_reg_predicate vs. _ discriminator
let oJz ( ) = ...
Need to behave differently when given a 16 - bit address size : and with 0xFFFFl .
OIbAsOpndSize
OMbBx
OMbEbx
modrm_mem_reg_predicate vs. _disc... |
20cd6f5c6c773546efa9148a7c6f14a5e0c9ffbec61f175d7f33dc90d45c4543 | 8c6794b6/repa-sndfile | Examples.hs | # LANGUAGE BangPatterns , TypeOperators , ScopedTypeVariables #
|
CopyRight : ( c ) 8c6794b6
License : :
Stability : experimental
Portability : non - portable
Example for reading and writing sound files , and generating sine wave .
CopyRight : (c) 8c6794b6
License : BSD3
Maintainer ... | null | https://raw.githubusercontent.com/8c6794b6/repa-sndfile/34725b12e993c88aaf35963f9aed8214f3cd2b12/Data/Array/Repa/IO/Sndfile/Examples.hs | haskell | ---------------------------------------------------------------------------
| Read sound file as repa array, then write it without modification.
| Generate sine wave.
^ Frequency.
---------------------------------------------------------------------------
* Using storable vector
Runs faster when input file is s... | # LANGUAGE BangPatterns , TypeOperators , ScopedTypeVariables #
|
CopyRight : ( c ) 8c6794b6
License : :
Stability : experimental
Portability : non - portable
Example for reading and writing sound files , and generating sine wave .
CopyRight : (c) 8c6794b6
License : BSD3
Maintainer ... |
9dc7b5276424c7c4c0f9981c993add145d241279816b310a840f4aeb8a6312dd | snapframework/snap-server | Tests.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
# LANGUAGE ForeignFunctionInterface #
{-# LANGUAGE OverloadedStrings #-}
module System.SendFile.Tests (tests) where
------------------------------------------------------------------------------
import Control.Concurre... | null | https://raw.githubusercontent.com/snapframework/snap-server/f9c6e00630a8a78705aceafa0ac046ae70e1310e/test/System/SendFile/Tests.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE CPP #
# LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------... | # LANGUAGE ForeignFunctionInterface #
module System.SendFile.Tests (tests) where
import Control.Concurrent.MVar (MVar, modifyMVar, modifyMVar_, newMVar, readMVar)
import Control.Exception (evaluate)
import Data.ByteString.Builder (byteString)
import qualified Da... |
902a26c5e0d8cef7cdaae8ff945a1eb6f6d1e8c1dfc36b11fe754a0777b974e3 | marcelog/erlagi | erlagi_app.erl | Erlagi Application .
%%%
Copyright 2012 < >
%%%
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 writi... | null | https://raw.githubusercontent.com/marcelog/erlagi/fd406e9b55a04ce14c0e68d7b87bd769a3dd7a6f/src/erlagi_app.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Erlagi Application .
Copyright 2012 < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(erlagi_app).
-author("Marcelo Gornstein <>").
-github("").
-homepage("/").
-license("Apache License 2.0").
-behaviour(app... |
309f096804d1165f535fdbfc3b9f7d803640bdbe25db811b444b3d924b3f801b | Incanus3/ExiL | boxes.lisp | (in-package :exil-user)
(princ "========================================================================")
(complete-reset)
(unwatch all)
(watch facts)
(deffacts boxes
(space on 1)
(space on 2)
(space on 3)
(1 on table)
(2 on table)
(3 on table)
;; when we switch the goals, forward chaining makes the ... | null | https://raw.githubusercontent.com/Incanus3/ExiL/de0f7c37538cecb7032cc1f2aa070524b0bc048d/src/examples/boxes.lisp | lisp | when we switch the goals, forward chaining makes the wrong move
(step) | (in-package :exil-user)
(princ "========================================================================")
(complete-reset)
(unwatch all)
(watch facts)
(deffacts boxes
(space on 1)
(space on 2)
(space on 3)
(1 on table)
(2 on table)
(3 on table)
(goal 1 on 2)
(goal 2 on 3))
(defrule move-box
(goa... |
ca03cadfb76dc1a7aa12698520a1616016e0de6854aab925f2164fba34e99aa7 | jjmeyer0/gt | eq.mli | (** A reference to keep track of the current line number. *)
val cur_line : int ref
(** Just a dummy function to make it easier to generate functions. *)
val dummy : unit -> unit
* A function to compare to parameters of type start_sym .
@param els a pair of 2 elements to check if they are equal .
@return b t... | null | https://raw.githubusercontent.com/jjmeyer0/gt/c0c7febc2e3fd532d44617f663b224cc0b9c7cf2/doc/manual/ref/generated-funs/eq.mli | ocaml | * A reference to keep track of the current line number.
* Just a dummy function to make it easier to generate functions. | val cur_line : int ref
val dummy : unit -> unit
* A function to compare to parameters of type start_sym .
@param els a pair of 2 elements to check if they are equal .
@return b true if the are equal otherwise false
@param els a pair of 2 elements to check if they are equal.
@return b true if the are equ... |
614e4dc5d2bc56b6a46718c23556da343f5c1eddffd22cc9f9d1d670e1cf300c | Ericson2314/lighthouse | ByteString.hs | {-# OPTIONS_GHC -fglasgow-exts -cpp #-}
-----------------------------------------------------------------------------
-- |
Module : Text . Regex . . ByteString
Copyright : ( c ) 2006
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : ,
-- Stability : experimental
Portabil... | null | https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/regex-posix/Text/Regex/Posix/ByteString.hs | haskell | # OPTIONS_GHC -fglasgow-exts -cpp #
---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Maintainer : ,
Stability : experimental
To use these instance, you would normally import
functions. All of these report error by returning Le... | Module : Text . Regex . . ByteString
Copyright : ( c ) 2006
Portability : non - portable ( regex - base needs MPTC+FD )
This provides ' ByteString ' instances for RegexMaker and RegexLike
based on " Text . Regex . . Wrap " , and a ( RegexContext Regex
ByteString ByteString ) instance .
... |
93807db95507b4cf26a41289962f77ada498df707c7cba41290b44407505f286 | picrin-scheme/picrin | repl.scm | (define-library (picrin repl)
(import (scheme base)
(scheme read)
(scheme write)
(scheme eval)
(picrin base))
(cond-expand
((library (picrin readline))
(import (picrin readline)
(picrin readline history)))
(else
(begin
(define (readline str)
... | null | https://raw.githubusercontent.com/picrin-scheme/picrin/2af16bc88fbfca2efafd27ca9e5006d73c06f6fb/contrib/60.repl/repl.scm | scheme | exit | (define-library (picrin repl)
(import (scheme base)
(scheme read)
(scheme write)
(scheme eval)
(picrin base))
(cond-expand
((library (picrin readline))
(import (picrin readline)
(picrin readline history)))
(else
(begin
(define (readline str)
... |
1c2ac251ce25b5b86eb7f5681570eb025da13abf604531d89fd186b62163c417 | janestreet/bonsai | import.mli | module Incr = Ui_incr
module Vdom = Virtual_dom.Vdom
module Event : sig
type t = unit Ui_effect.t
val sequence : t list -> t
val no_op : t
end
module Bonsai = Bonsai
| null | https://raw.githubusercontent.com/janestreet/bonsai/4f45a60094ead7ce2db53286a272a0623a5bf5ba/web/import.mli | ocaml | module Incr = Ui_incr
module Vdom = Virtual_dom.Vdom
module Event : sig
type t = unit Ui_effect.t
val sequence : t list -> t
val no_op : t
end
module Bonsai = Bonsai
| |
3a068453369b21cc99f23dda26dc2205b33a52fc856217b272e2d9c23c0e54be | diku-dk/futhark | IxFun.hs | # OPTIONS_GHC -fno - warn - redundant - constraints #
-- | This module contains a representation for the index function based on
linear - memory accessor descriptors ; see , and work .
module Futhark.IR.Mem.IxFun
( IxFun (..),
Shape,
LMAD (..),
LMADDim (..),
Monotonicity (..),
index,
mkE... | null | https://raw.githubusercontent.com/diku-dk/futhark/0dca3bc5f056efb62bdaa5886573b479273977cf/src/Futhark/IR/Mem/IxFun.hs | haskell | | This module contains a representation for the index function based on
| The shape of an index function.
| The physical element ordering alongside a dimension, i.e. the
sign of the stride.
| Increasing.
| Decreasing.
| Unknown.
| A single dimension in an 'LMAD'.
stride, number of elements (or shape), permutat... | # OPTIONS_GHC -fno - warn - redundant - constraints #
linear - memory accessor descriptors ; see , and work .
module Futhark.IR.Mem.IxFun
( IxFun (..),
Shape,
LMAD (..),
LMADDim (..),
Monotonicity (..),
index,
mkExistential,
iota,
iotaOffset,
permute,
reshape,
coerce,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.