_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 |
|---|---|---|---|---|---|---|---|---|
49d484c4e765eebb4cb0fbc560e8cc9c8ac4d35c7a3ed62183bf646e9e35a6ec | CoNarrative/exemplar | ns_a.clj | (ns exemplar.ns-a)
(defn some-func [xs]
(map inc xs))
(defmacro some-macro [xs]
`(map inc ~xs))
(def some-atom (atom nil))
(defn some-impure-func [x]
(reset! some-atom x))
(comment
(defmacro infix-macro [a operator b]
`(~@[operator a b])))
| null | https://raw.githubusercontent.com/CoNarrative/exemplar/a9e76cdcdedfb441621f2b7c4f8b126f6ec0977a/test/exemplar/ns_a.clj | clojure | (ns exemplar.ns-a)
(defn some-func [xs]
(map inc xs))
(defmacro some-macro [xs]
`(map inc ~xs))
(def some-atom (atom nil))
(defn some-impure-func [x]
(reset! some-atom x))
(comment
(defmacro infix-macro [a operator b]
`(~@[operator a b])))
| |
180cd3ec1359cd9c2d0da49ec7c8dcb2c5ccee9a0730737a98ad32a2f8911449 | sbcl/sbcl | cross-misc.lisp | ;;;; cross-compile-time-only replacements for miscellaneous unportable
;;;; stuff
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public doma... | null | https://raw.githubusercontent.com/sbcl/sbcl/ef93759a8f34cfb61daebce9d92b13b89e4a6075/src/code/cross-misc.lisp | lisp | cross-compile-time-only replacements for miscellaneous unportable
stuff
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
Forward declarations
be safely degraded to ordinary THE.
Gray strea... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB-IMPL")
(defun make-system-hash-table (&rest args)
(let ((args (copy-list args)))
(remf args :weakness... |
a5cec77fa445a4b44044ff26fdd75076500e5b3e4a19236458bf84d0587305f1 | Clozure/ccl | level-1.lisp | -*-Mode : LISP ; Package : CCL -*-
;;;
Copyright 1994 - 2009 Clozure Associates
;;;
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 appli... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/level-1/level-1.lisp | lisp | Package : CCL -*-
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 la... | Copyright 1994 - 2009 Clozure Associates
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package "CCL")
(macrolet ((l1-load (name)
(let* ((namestring
(concatenate 'simple-base-string
"./l1-fasls/"
(string name)
... |
a08883daafb29ddeda2c246338d2206f4c700ffde47cfebd799f0ac86339b633 | cxphoe/SICP-solutions | compiler-open-code.rkt | ; Implementation about open code in ex-5.28 with parameter compile-env
; log:
; >> open code implementation with compile-env
; >> change the predicate open-code? to detect rebound operator
(define (open-code? exp compile-env)
(and (pair? exp)
(memq (car exp) open-operators)
(not (rebound? (car exp) co... | null | https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%205-Computing%20with%20Register%20Machines/5.%20Compile/compiler-open-code.rkt | racket | Implementation about open code in ex-5.28 with parameter compile-env
log:
>> open code implementation with compile-env
>> change the predicate open-code? to detect rebound operator
a)
I didn't do exactly what are asked by the exercise. During implementation
I just found out that creating a generic compile is mor... |
(define (open-code? exp compile-env)
(and (pair? exp)
(memq (car exp) open-operators)
(not (rebound? (car exp) compile-env))))
(define (rebound? op compile-env)
(not (eq? (find-variable op compile-env)
'not-found)))
(define open-operators '(= - + *))
(define (general-compile op operan... |
5da368d8bfb75f02deaaf416ac1888798b1631aae76fbf5d6a058de8905cd13e | ghcjs/ghcjs-dom | SVGEllipseElement.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.SVGEllipseElement
(js_getCx, getCx, js_getCy, getCy, js_getRx, getRx, js_getRy,
... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGEllipseElement.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.SVGEllipseElement
(js_getCx, getCx, js_getCy, getCy, js_getRx, getRx, js_getRy,
getRy, SVGEllipseElement(..), gTypeSVGEllipseElement)
where
import Prelude ((.), (==), (>>=... |
ca5e8993a542d0296b5876e644eb5651d4363123bc9266c6e741477d64ce818b | arttuka/reagent-material-ui | switch.cljs | (ns reagent-mui.material.switch
"Imports @mui/material/Switch as a Reagent component.
Original documentation is at -ui/api/switch/ ."
(:require [reagent.core :as r]
["@mui/material/Switch" :as MuiSwitch]))
(def switch (r/adapt-react-class (.-default MuiSwitch)))
| null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/material/switch.cljs | clojure | (ns reagent-mui.material.switch
"Imports @mui/material/Switch as a Reagent component.
Original documentation is at -ui/api/switch/ ."
(:require [reagent.core :as r]
["@mui/material/Switch" :as MuiSwitch]))
(def switch (r/adapt-react-class (.-default MuiSwitch)))
| |
8f2ccea95f92a9d8bbe1fde5803ee957580303f4494a46518456c27ddde5744f | clj-kondo/clj-kondo | copied_config_test.clj | (ns clj-kondo.impl.copied-config-test
(:require [babashka.fs :as fs]
[clj-kondo.impl.core :as core-impl]
[clj-kondo.impl.utils :as utils]
[clojure.test :refer [deftest is testing]]))
(deftest copied-configs-resolution-test
(testing "no findings"
(testing "when clj-kondo :con... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/2922c7f00edae0fa7ca4801f8076a182127a8eb7/test/clj_kondo/impl/copied_config_test.clj | clojure | (ns clj-kondo.impl.copied-config-test
(:require [babashka.fs :as fs]
[clj-kondo.impl.core :as core-impl]
[clj-kondo.impl.utils :as utils]
[clojure.test :refer [deftest is testing]]))
(deftest copied-configs-resolution-test
(testing "no findings"
(testing "when clj-kondo :con... | |
3368a7650781419767195b7b7d214c96e1967aeae6d1456f2b9a6e7cd950bfe9 | 2600hz-archive/whistle | proper_queue.erl | Copyright 2010 - 2011 < > ,
< >
and < >
%%%
This file is part of PropEr .
%%%
%%% PropEr is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 o... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/proper-1.0/src/proper_queue.erl | erlang |
PropEr is free software: you can redistribute it and/or modify
(at your option) any later version.
PropEr is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License fo... | Copyright 2010 - 2011 < > ,
< >
and < >
This file is part of PropEr .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Pub... |
d59b2a39ba1bbcbb938ac114db376c17314d3f65c3635c5b50150dbb2fe07535 | ferd/dispcount | prop_dispatch.erl | -module(prop_dispatch).
-behaviour(dispcount).
-export([init/1, checkout/2, checkin/2, handle_info/2, dead/1,
terminate/2, code_change/3]).
init([Tid]) ->
Id = ets:update_counter(Tid, id, 1),
{ok, Id}.
checkout(_From, Id) ->
{ok, Id, Id}.
checkin(Id, Id) ->
{ok, Id};
checkin(_SomeId, Id) ->
... | null | https://raw.githubusercontent.com/ferd/dispcount/4befc7445b4a8c5f616c0dadfec76569a1f4452b/test/prop_dispatch.erl | erlang | -module(prop_dispatch).
-behaviour(dispcount).
-export([init/1, checkout/2, checkin/2, handle_info/2, dead/1,
terminate/2, code_change/3]).
init([Tid]) ->
Id = ets:update_counter(Tid, id, 1),
{ok, Id}.
checkout(_From, Id) ->
{ok, Id, Id}.
checkin(Id, Id) ->
{ok, Id};
checkin(_SomeId, Id) ->
... | |
ddbcc0ae2649ecce0e54c1e71d1fccdb16d4392b2edadc719a7c767e433ad1c8 | fission-codes/fission | Types.hs | module Fission.Platform.Heroku.Region.Types (Region (..)) where
import Data.Swagger as Swagger
import Database.Persist.Sql
import qualified RIO.Text as Text
import Fission.Prelude
-- | Location of Heroku server requesting keys
data Region
= California
| Dublin
... | null | https://raw.githubusercontent.com/fission-codes/fission/ae177407dccc20be67948a901956b99f40d37ac8/fission-core/library/Fission/Platform/Heroku/Region/Types.hs | haskell | | Location of Heroku server requesting keys | module Fission.Platform.Heroku.Region.Types (Region (..)) where
import Data.Swagger as Swagger
import Database.Persist.Sql
import qualified RIO.Text as Text
import Fission.Prelude
data Region
= California
| Dublin
| Frankfurt
| Oregon
| Singapore
| Sydne... |
16a4d76792a3ac288f6da5a8e3a4353c9491654a1608d01e4324de4227e7d082 | dradtke/Lisp-Text-Editor | gtk.printing.lisp | (in-package :gtk)
; TODO: Printing | null | https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/cl-gtk2/gtk/gtk.printing.lisp | lisp | TODO: Printing | (in-package :gtk)
|
0c7d3fc72eff2e4cf3109e95604097126bbd7a0463f10fb3abaa93402aa73875 | Ericson2314/lighthouse | HpcShowTix.hs | module HpcShowTix (showtix_plugin) where
import Trace.Hpc.Mix
import Trace.Hpc.Tix
import Trace.Hpc.Util
import HpcFlags
import qualified HpcSet as Set
showtix_options
= excludeOpt
. includeOpt
. srcDirOpt
. hpcDirOpt
. outputOpt
showtix_plugin = Plugin { name = "show"
... | null | https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/utils/hpc/HpcShowTix.hs | haskell | module HpcShowTix (showtix_plugin) where
import Trace.Hpc.Mix
import Trace.Hpc.Tix
import Trace.Hpc.Util
import HpcFlags
import qualified HpcSet as Set
showtix_options
= excludeOpt
. includeOpt
. srcDirOpt
. hpcDirOpt
. outputOpt
showtix_plugin = Plugin { name = "show"
... | |
6b43871ade2bf09bac2cb5bdd8d421bc9ead5722d20d4b96df0a130022533112 | Bodigrim/arithmoi | PrimitiveRootsBench.hs | {-# LANGUAGE RankNTypes #-}
# OPTIONS_GHC -fno - warn - type - defaults #
module Math.NumberTheory.PrimitiveRootsBench
( benchSuite
) where
import Test.Tasty.Bench
import Data.Constraint
import Data.Maybe
import Math.NumberTheory.Moduli.Multiplicative
import Math.NumberTheory.Moduli.Singleton
import Math.Number... | null | https://raw.githubusercontent.com/Bodigrim/arithmoi/6cc9bc86b7241809ec1038c81ca0055913f156bb/benchmark/Math/NumberTheory/PrimitiveRootsBench.hs | haskell | # LANGUAGE RankNTypes #
prime to large power
large prime
twice prime to large power
twice large prime
highly composite
prime to large power
large prime
large prime squared
twice prime to large power
twice large prime |
# OPTIONS_GHC -fno - warn - type - defaults #
module Math.NumberTheory.PrimitiveRootsBench
( benchSuite
) where
import Test.Tasty.Bench
import Data.Constraint
import Data.Maybe
import Math.NumberTheory.Moduli.Multiplicative
import Math.NumberTheory.Moduli.Singleton
import Math.NumberTheory.Primes
primRootWrap ... |
bf93cedc450b7e8b37d4ea7f381a7a33372b71a4f4493b9ae53458ce828a4c3e | haskell-suite/haskell-tc | Naming4.hs | module Naming4 where
fn var_a = sub var_a
where
sub another_a = const var_a another_a
fn var_a = sub var_a
where
sub another_a = const var_a another_a
-}
const _ b = b
{-
outer a = a
where
inner b = b
-}
outer a = a
where
inner b = const (const a ()) b
id x = x
| null | https://raw.githubusercontent.com/haskell-suite/haskell-tc/abf5e3cc624e0095cae14c3c1c695b76ea8ffcb9/tests/Naming4.hs | haskell |
outer a = a
where
inner b = b
| module Naming4 where
fn var_a = sub var_a
where
sub another_a = const var_a another_a
fn var_a = sub var_a
where
sub another_a = const var_a another_a
-}
const _ b = b
outer a = a
where
inner b = const (const a ()) b
id x = x
|
efbbacfdad159e2df044fe62de4f0cfa5156554ac7b3c580a51bc47df3ed3761 | gafiatulin/codewars | Integertriangles.hs | Integer triangles
--
module Codewars.G964.Integertriangles where
import qualified Data.Vector as Vector (generate, (!))
import Data.IntMap.Strict (fromAscList, member, (!))
squares = fromAscList . map (\x -> (x*x, x)) $ [1..100000]
precomputed = Vector.generate 100000 f
where f per = length [1 | b <- [1 .. pe... | null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/5%20kyu/Integertriangles.hs | haskell | Integer triangles
module Codewars.G964.Integertriangles where
import qualified Data.Vector as Vector (generate, (!))
import Data.IntMap.Strict (fromAscList, member, (!))
squares = fromAscList . map (\x -> (x*x, x)) $ [1..100000]
precomputed = Vector.generate 100000 f
where f per = length [1 | b <- [1 .. per `d... | |
350202fc27fdbe58075d8762390b897e9e538bc8bb0cf697a204c5b1a799869c | shayan-najd/NativeMetaprogramming | tc203.hs | # OPTIONS_GHC -fno - warn - redundant - constraints #
{-# LANGUAGE RankNTypes #-}
-- Check that we can have a forall after a forall
module Foo4 where
type AnyE a = forall err. Either err a
foo :: Monad m => AnyE (m t)
foo = undefined
| null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_compile/tc203.hs | haskell | # LANGUAGE RankNTypes #
Check that we can have a forall after a forall | # OPTIONS_GHC -fno - warn - redundant - constraints #
module Foo4 where
type AnyE a = forall err. Either err a
foo :: Monad m => AnyE (m t)
foo = undefined
|
6287ff110a077637856474609aca555161fef68fa14addeff532e99dfdad8925 | matterandvoid-space/subscriptions | test_subs.cljc | (ns space.matterandvoid.subscriptions.test-subs
(:require
[space.matterandvoid.subscriptions.fulcro :as sut]))
(defonce counter_ (volatile! 0))
(sut/defregsub first-sub
(fn [db] (:first-sub db)))
(sut/defregsub second-sub :<- [::first-sub]
(fn [args]
(vswap! counter_ inc)
(+ 10 args)))
(sut/defreg... | null | https://raw.githubusercontent.com/matterandvoid-space/subscriptions/da41fa9fe7221d183e385589fa82874af661f2c5/src/test/space/matterandvoid/subscriptions/test_subs.cljc | clojure | pass a subscription as a parameter
use generative testing to ensure memory usage is constrained | (ns space.matterandvoid.subscriptions.test-subs
(:require
[space.matterandvoid.subscriptions.fulcro :as sut]))
(defonce counter_ (volatile! 0))
(sut/defregsub first-sub
(fn [db] (:first-sub db)))
(sut/defregsub second-sub :<- [::first-sub]
(fn [args]
(vswap! counter_ inc)
(+ 10 args)))
(sut/defreg... |
35decc51a6b1267087467ed37fbc5a49661b3f5944acb991128b2a12b2e44f27 | kadena-io/chainweaver | Common.hs | module Frontend.UI.Common where
------------------------------------------------------------------------------
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.String
import Data.Text (Text)
import Reflex.Dom.Contrib.... | null | https://raw.githubusercontent.com/kadena-io/chainweaver/4e9af3848b86ecda244c1e111899b4a2ac16bf28/frontend/src/Frontend/UI/Common.hs | haskell | ----------------------------------------------------------------------------
| Attributes which will turn off all autocomplete/autofill/autocorrect
functions, including the OS-level suggestions on macOS.
| Factored out input class modifier, so we can keep it in sync. | module Frontend.UI.Common where
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.String
import Data.Text (Text)
import Reflex.Dom.Contrib.CssClass
noAutofillAttrs :: (Ord attr, IsString attr) => Map attr Text
noAutof... |
7dd89c4a0c00cee26eded782fbb3adc115a84ded83d2a70dbe982546bfb8fec8 | resttime/cl-liballegro | events.lisp | (in-package #:cl-liballegro)
;;; Events
(defcfun ("al_create_event_queue" create-event-queue) :pointer)
(defcfun ("al_destroy_event_queue" destroy-event-queue) :void (queue :pointer))
(defcfun ("al_register_event_source" register-event-source) :void
(queue :pointer) (source :pointer))
(defcfun ("al_unregister_event_... | null | https://raw.githubusercontent.com/resttime/cl-liballegro/0f8a3a77d5c81fe14352d9a799cba20e1a3a90b4/src/ffi-functions/events.lisp | lisp | Events | (in-package #:cl-liballegro)
(defcfun ("al_create_event_queue" create-event-queue) :pointer)
(defcfun ("al_destroy_event_queue" destroy-event-queue) :void (queue :pointer))
(defcfun ("al_register_event_source" register-event-source) :void
(queue :pointer) (source :pointer))
(defcfun ("al_unregister_event_source" unr... |
e39dd32eb844dca9534c6d8bf3e3a214aada0101f6409036334e37b6fe39720c | srid/ka | PandocView.hs | # OPTIONS_GHC -fno - warn - orphans #
module Ka.PandocView
( render,
style,
)
where
import Clay (Css, pct, px, (?))
import qualified Clay as C
import qualified Data.Text as T
import Ka.Markdown (mdFileThing)
import Ka.Route (R, Route (..), renderThingLink)
import Reflex.Dom.Core
import Reflex.Dom.Pandoc
( C... | null | https://raw.githubusercontent.com/srid/ka/9d020738215a752d30674063384cdc6bf10c4067/src/Ka/PandocView.hs | haskell | | Route monoid for use with reflex-dom-pandoc
file)
Make list items more "relaxed" (with spacing around them)
GH checkboxes should have padding to right, to prevent text from "sticking" | # OPTIONS_GHC -fno - warn - orphans #
module Ka.PandocView
( render,
style,
)
where
import Clay (Css, pct, px, (?))
import qualified Clay as C
import qualified Data.Text as T
import Ka.Markdown (mdFileThing)
import Ka.Route (R, Route (..), renderThingLink)
import Reflex.Dom.Core
import Reflex.Dom.Pandoc
( C... |
0dcb75fc6fb8eaec1c7f0d9ab7b982ca6f902c4ae72bc3d0e5aab558fbb173fc | yakaz/yamerl | ex_6.19_secondary_tag_handle.erl | -module('ex_6.19_secondary_tag_handle').
-include_lib("eunit/include/eunit.hrl").
-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").
single_test_() ->
?_assertMatch(
{yamerl_parser,
{file,?FILENAME},
[],
<<>>,
74,
true,
[],
0,
75,
... | null | https://raw.githubusercontent.com/yakaz/yamerl/0032607a7b27fa2b548fc9a02d7ae6b53469c0c5/test/parsing/ex_6.19_secondary_tag_handle.erl | erlang | -module('ex_6.19_secondary_tag_handle').
-include_lib("eunit/include/eunit.hrl").
-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").
single_test_() ->
?_assertMatch(
{yamerl_parser,
{file,?FILENAME},
[],
<<>>,
74,
true,
[],
0,
75,
... | |
a48a59259bef7b3ddd51f38e0b76b6129f3f7c230cc1d000ea917286da63c8c9 | klarna-incubator/kappa | kappa.erl | %%%
Copyright ( c ) 2021 Klarna Bank AB ( publ )
%%%
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... | null | https://raw.githubusercontent.com/klarna-incubator/kappa/f6da63bd7b25e3ad50616d22b10d27b16f7e2d9d/src/kappa.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 g... | Copyright ( c ) 2021 Klarna Bank AB ( publ )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(kappa).
-export([ main/1 ]).
-export([ collect_architecture_info/1
, get_architecture_info/1
, ge... |
67daa5dbd705bd33806f99ca6093409589253060182d0c283037e20595c9556c | mukul-rathi/bolt | type_program.mli | (** Given the parsed AST of a bolt program, type-check it and if type-checking succeeds
return the AST with type annotations.
NB: We are not checking for data-race freedom in this stage of the type-checker. *)
open Core
open Parsing
val type_program : Parsed_ast.program -> Typed_ast.program Or_error.t
val p... | null | https://raw.githubusercontent.com/mukul-rathi/bolt/1faf19d698852fdb6af2ee005a5f036ee1c76503/src/frontend/typing/type_program.mli | ocaml | * Given the parsed AST of a bolt program, type-check it and if type-checking succeeds
return the AST with type annotations.
NB: We are not checking for data-race freedom in this stage of the type-checker. |
open Core
open Parsing
val type_program : Parsed_ast.program -> Typed_ast.program Or_error.t
val pprint_typed_ast : Format.formatter -> Typed_ast.program -> unit
* Given a formatter and typed AST , pretty - print the AST - useful for debugging
|
fd0439fb8754eefcb436258f083fc98d559519c20a2fdc57cb78326046a586d6 | hadolint/hadolint | Config.hs | module Hadolint.Config
( module Hadolint.Config.Configuration,
CommandlineConfig (..),
getConfigFromEnvironment,
getConfigFromFile,
parseCommandline
)
where
import Hadolint.Config.Commandline
import Hadolint.Config.Configuration
import Hadolint.Config.Environment
import Hadolint.Config.Configfile
| null | https://raw.githubusercontent.com/hadolint/hadolint/bf7e48ea735db423a349fb2d7a83fe7a77091cc2/src/Hadolint/Config.hs | haskell | module Hadolint.Config
( module Hadolint.Config.Configuration,
CommandlineConfig (..),
getConfigFromEnvironment,
getConfigFromFile,
parseCommandline
)
where
import Hadolint.Config.Commandline
import Hadolint.Config.Configuration
import Hadolint.Config.Environment
import Hadolint.Config.Configfile
| |
6daeaa991ca3be3747352357daccf183c8f1e7e058b3f0ad9e463f601c02d97d | dcastro/haskell-flatbuffers | HaskellToScalaSpec.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
module FlatBuffers.Integration.HaskellToScalaSpec where
import Data.Aeson ( (.=), Value(..), object )
import qualified Data.Aeson as J
import qualified Data.ByteString.Lazy as BSL
import qualified Data.Byte... | null | https://raw.githubusercontent.com/dcastro/haskell-flatbuffers/cea6a75109de109ae906741ee73cbb0f356a8e0d/test/FlatBuffers/Integration/HaskellToScalaSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TypeApplications #
module FlatBuffers.Integration.HaskellToScalaSpec where
import Data.Aeson ( (.=), Value(..), object )
import qualified Data.Aeson as J
import qualified Data.ByteString.Lazy as BSL
import qualified Data.ByteString.Lazy.UTF8 as BSLU
import ... |
e428b72b3dea5ee2f7148a041b7f18bb213c510b81d1d78792bd69cdc52474b9 | fgalassi/cs61a-sp11 | 3.8.scm | (define f (lambda (n) (set! f (lambda (n) 0)) n))
; > (+ (f 0) (f 1))
0
; > (define f (lambda (n) (set! f (lambda (n) 0)) n))
; f
; > (+ (f 1) (f 0))
1
| null | https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/homework/3.8.scm | scheme | > (+ (f 0) (f 1))
> (define f (lambda (n) (set! f (lambda (n) 0)) n))
f
> (+ (f 1) (f 0)) | (define f (lambda (n) (set! f (lambda (n) 0)) n))
0
1
|
156492cf86e289b5374b49522c809aa7c618de3bdbce496b22d3efbd21defe13 | mirage/alcotest | callsite_loc.412.ml |
* Copyright ( c ) 2022 >
*
* 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 IS PROVIDED " AS IS " AND THE AUT... | null | https://raw.githubusercontent.com/mirage/alcotest/838987da59f4e647d2286fdc18f445d30dc880ed/src/alcotest-engine/callsite_loc.412.ml | ocaml | this function, caller, bound of test |
* Copyright ( c ) 2022 >
*
* 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 IS PROVIDED " AS IS " AND THE AUT... |
741e5cb0309e1263cef52c822028345ab313779484d1f9803e7510eb0bcc7374 | mvv/data-dword | DoubleWord.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE UnicodeSyntax #
# LANGUAGE TypeFamilies #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
-- | This module provides strict (low and high halves are unpacked)
signed and unsigned binary word data types of sizes 96 , 128 ,
160 , 192 , 224 , and 256 bits .
mo... | null | https://raw.githubusercontent.com/mvv/data-dword/f3eb2807593e3dd46cc8b870f905362427fbdcf6/src/Data/DoubleWord.hs | haskell | # LANGUAGE DeriveDataTypeable #
| This module provides strict (low and high halves are unpacked) | # LANGUAGE TemplateHaskell #
# LANGUAGE UnicodeSyntax #
# LANGUAGE TypeFamilies #
# LANGUAGE DeriveGeneric #
signed and unsigned binary word data types of sizes 96 , 128 ,
160 , 192 , 224 , and 256 bits .
module Data.DoubleWord
( module Data.BinaryWord
, module Data.DoubleWord.Base
, Word96(..)
, Word1... |
6ceb46cc11ac938018adf04cf4d24dee19619690848b7f1c53cf8a8f5f617727 | Commonfare-net/macao-social-wallet | sign_in.clj | (ns freecoin.views.sign-in
(:require [freecoin.form_helpers :as fh]
[freecoin.routes :as routes]
[freecoin-lib.config :as config]
[auxiliary.translation :as t]
[taoensso.timbre :as log]))
(def sign-up-form
{:renderer :bootstrap3-stacked
:fields [{:name :first-name... | null | https://raw.githubusercontent.com/Commonfare-net/macao-social-wallet/d3724d6c706cdaa669c59da439fe48b0373e17b7/src/freecoin/views/sign_in.clj | clojure | (ns freecoin.views.sign-in
(:require [freecoin.form_helpers :as fh]
[freecoin.routes :as routes]
[freecoin-lib.config :as config]
[auxiliary.translation :as t]
[taoensso.timbre :as log]))
(def sign-up-form
{:renderer :bootstrap3-stacked
:fields [{:name :first-name... | |
fd8eca9c54e41a031a75172da0efa11c797e9d259c517ce7630a9781cd8449eb | alexandroid000/improv | KillRequest.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Turtlesim.KillRequest where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBinary
... | null | https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/msgs/Turtlesim/Ros/Turtlesim/KillRequest.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveDataTypeable # | # LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Turtlesim.KillRequest where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBinary
import Ros.Internal.Msg.MsgInfo
import qualified GHC.Generics as G
impo... |
8b3096d52871acecf039526c4ec0acccb8a2f29bd80e0a148ae84018bcf467fe | ghc/packages-Cabal | setup.test.hs | import Test.Cabal.Prelude
Test build when the library is empty , for # 1241
main = setupAndCabalTest $ withDirectory "empty" $ setup_build []
| null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/EmptyLib/setup.test.hs | haskell | import Test.Cabal.Prelude
Test build when the library is empty , for # 1241
main = setupAndCabalTest $ withDirectory "empty" $ setup_build []
| |
fa28fff4367ddef2d62552559834e8ad6919a67c99fa45409d5a242f9406acfb | unison-code/unison | ExtendWithCopies.hs | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | null | https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/Unison/Tools/Extend/ExtendWithCopies.hs | haskell | | Extends the block temporaries given by the function ft with copies
| Gives a list of ids and a function from ids to all temporary pairs of the
| form (t, t)
| Gives a list of ids and a function from ids to pairs of temporaries in
| virtual copies
| Extends the given temporary pair. The tuple (src, dst) contains... | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... |
27d11f1293a632ce855e26d2e8673fb0328953007f9020724733c3c9675a9ab5 | camlp5/camlp5 | warnings.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/ocaml_stuff/4.04.0/utils/warnings.mli | ocaml | ************************************************************************
OCaml
... | Pierre Weis & & Damien Doligez , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Format
type t =
1
2
3
4
5
6
7
8
9
10
11
12
13
14
... |
1817c12b10ea323ca64bf2a55f793f14a038c0717c2f99219a90793784f00b54 | Helium4Haskell/helium | TypeBug5.hs | module TypeBug5 where
f :: [[String]]->[String]
f (x:xs) = x ++ filter (not(eqString unwords(concat x xs))) xs
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/simple/typeerrors/Examples/TypeBug5.hs | haskell | module TypeBug5 where
f :: [[String]]->[String]
f (x:xs) = x ++ filter (not(eqString unwords(concat x xs))) xs
| |
5eb07a548b4e901663388f98e24440ed2a0eb2bf8de9cd97501e7291a1567ac2 | helmutkian/cl-wasm-runtime | wasm-table.lisp | (in-package #:cl-wasm-runtime)
(define-wasm-ref table)
(define-wasm-object-class table)
(defun wrap-wasm-table (pointer &key owner)
(enable-gc (make-instance 'wasm-global
:pointer pointer
:owner owner)))
| null | https://raw.githubusercontent.com/helmutkian/cl-wasm-runtime/683c79857efec29e6b8153446f0f58e95a5a276e/wasm-table.lisp | lisp | (in-package #:cl-wasm-runtime)
(define-wasm-ref table)
(define-wasm-object-class table)
(defun wrap-wasm-table (pointer &key owner)
(enable-gc (make-instance 'wasm-global
:pointer pointer
:owner owner)))
| |
616696f6878827f32a6bc6f352d63e69f8877364007e51fb37e88c6e9771b8f7 | jordanthayer/ocaml-search | best_first_goal_on_gen.ml | * Best first searches where the goal testing happens during node generation
instead of during node expansion .
Jordan , Septemeber 2009
instead of during node expansion.
Jordan, Septemeber 2009
*)
let no_record = (fun _ _ -> ())
let closed_pos = -2
let init_lists pred sface setpos =
let key =... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/best_first/best_first_goal_on_gen.ml | ocaml | * Needs some commenting
openlist reflects ordering. nodes has all nodes. pos is [closedpos]
for nodes on the closed list.
better path to previous state
new state
* [pred] is true if in order or equal (both for expansion and for
testing which duplicate is superior), [key] gives state data for
d... | * Best first searches where the goal testing happens during node generation
instead of during node expansion .
Jordan , Septemeber 2009
instead of during node expansion.
Jordan, Septemeber 2009
*)
let no_record = (fun _ _ -> ())
let closed_pos = -2
let init_lists pred sface setpos =
let key =... |
a0987d97226252a21d53ab882f51586261bec550e608a70f3454139de09970f4 | rescript-lang/rescript-compiler | object.ml | type hi = < z : int >
type 'a u = < hi ; x : int ; y : int; .. > as 'a
type 'a u1 = < hi; .. > as 'a
type 'a u2 = < hi ; hi; y : int ; hi; .. > as 'a
| null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/e87d6b52b7a78207c1fecfaba672523003e1dc3e/res_syntax/tests/conversion/reason/object.ml | ocaml | type hi = < z : int >
type 'a u = < hi ; x : int ; y : int; .. > as 'a
type 'a u1 = < hi; .. > as 'a
type 'a u2 = < hi ; hi; y : int ; hi; .. > as 'a
| |
97c7d03b138412b2574080373874adfc61f2028743164092bafcf2971e9848a9 | int-index/slay | Prim.hs | module Slay.Cairo.Prim
( module Slay.Cairo.Prim.Color,
module Slay.Cairo.Prim.Text,
module Slay.Cairo.Prim.Rect,
module Slay.Cairo.Prim.Curve,
module Slay.Cairo.Prim.Circle,
) where
import Slay.Cairo.Prim.Color
import Slay.Cairo.Prim.Text
import Slay.Cairo.Prim.Rect
import Slay.Cairo.Prim.Curve
imp... | null | https://raw.githubusercontent.com/int-index/slay/1c9d39b8cb4f32f0b4778677c21ebb85cc1cddf7/cairo/src/Slay/Cairo/Prim.hs | haskell | module Slay.Cairo.Prim
( module Slay.Cairo.Prim.Color,
module Slay.Cairo.Prim.Text,
module Slay.Cairo.Prim.Rect,
module Slay.Cairo.Prim.Curve,
module Slay.Cairo.Prim.Circle,
) where
import Slay.Cairo.Prim.Color
import Slay.Cairo.Prim.Text
import Slay.Cairo.Prim.Rect
import Slay.Cairo.Prim.Curve
imp... | |
293becc8f8ea7fcc23c238539240c1db9ad940b51fbff86cf8d7377798602491 | theleoborges/bouncer | runner.cljs | (ns bouncer.runner
(:require
[doo.runner :refer-macros [doo-tests]]
[bouncer.core-test]
[bouncer.validators-test]))
(doo-tests
'bouncer.core-test
'bouncer.validators-test)
| null | https://raw.githubusercontent.com/theleoborges/bouncer/e68bcfe38d0cb6ce2026ab97363dfc2ffd4d1c7a/test/bouncer/runner.cljs | clojure | (ns bouncer.runner
(:require
[doo.runner :refer-macros [doo-tests]]
[bouncer.core-test]
[bouncer.validators-test]))
(doo-tests
'bouncer.core-test
'bouncer.validators-test)
| |
1cdcb86613e14624a460054d9db46a94f1530b401fffb2eae8b490d6c9d0ccd6 | rbardou/red | render.ml | type cell =
{
character: string;
style: Style.t;
}
let empty_cell =
{
character = " ";
style = Style.default;
}
let cell ?(style = Style.default) character =
{
character;
style;
}
type frame =
{
width: int;
height: int;
grid: cell array array;
}
let create_frame w... | null | https://raw.githubusercontent.com/rbardou/red/e23c2830909b9e5cd6afe563313435ddaeda90bf/termlib/render.ml | ocaml | If size changed, just ignore previous frame.
Contains [true] if there is no need to set cursor position.
Only output cell if it has changed.
Output the difference in style with the current style.
Style is now the style of the current cell, save it for next cell.
Output cell contents.
Always reset cursor af... | type cell =
{
character: string;
style: Style.t;
}
let empty_cell =
{
character = " ";
style = Style.default;
}
let cell ?(style = Style.default) character =
{
character;
style;
}
type frame =
{
width: int;
height: int;
grid: cell array array;
}
let create_frame w... |
059cc597289da19d852188bfc0e2118a31edfd73076fc39d24ce89b2db3c61aa | janestreet/bonsai | bonsai_quickcheck.ml | open! Core
include Bonsai_quickcheck_internal
let packed_computation_to_ocaml_code = To_code.packed_computation_to_ocaml_code
| null | https://raw.githubusercontent.com/janestreet/bonsai/4baeedc75bf73a0915e04dc02d8a49b78779e9b0/test/quickcheck/src/bonsai_quickcheck.ml | ocaml | open! Core
include Bonsai_quickcheck_internal
let packed_computation_to_ocaml_code = To_code.packed_computation_to_ocaml_code
| |
5cc5b3d546b88f0f0f78c96ecb0f77dab6f5c7313585fa3af244a4278958f4ab | goderich/aoc2020 | day10.rkt | #lang racket
;; I like using threading macros to avoid deeply nested sexps, but this
is a matter of personal taste . No imports are required for this day .
(require threading)
;; Part 1
;;
We first build a sorted lists of all adaptors , and include the socket
;; (which is 0), and the maximum joltage (which is the... | null | https://raw.githubusercontent.com/goderich/aoc2020/96db9aab107e1f4a594319f38a9a309591bd331e/day10.rkt | racket | I like using threading macros to avoid deeply nested sexps, but this
Part 1
(which is 0), and the maximum joltage (which is the highest joltage
between adjacent elements of the initial list.
I use currying here to simplify what would have otherwise been a lambda.
There are many possible solutions to this part o... | #lang racket
is a matter of personal taste . No imports are required for this day .
(require threading)
We first build a sorted lists of all adaptors , and include the socket
of all adaptors plus 3 ) .
(define jolts
(let* ((adaptors (map string->number (file->lines "inputs/day10.txt")))
(max-joltage ... |
67499c8532a067bc3ddea31093dd273f253b79059d3e1fd67232ef71b183e4a2 | hackwaly/ocamlearlybird | env.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/hackwaly/ocamlearlybird/e483beb6e9080352234be45ab7309254ad7aaa37/src/typenv/411/env.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
open Types
open Misc
type value_unbound_reason =
| Val_unbound_instance_variable
| Val_unbound_self... |
5b7113bd017be30c2717e08a56db51db87c63231b5eaca8136b6e2f95b28c85c | msgpack/msgpack-haskell | Internal.hs | module Language.MessagePack.IDL.Internal (
withDirectory
) where
import Control.Exception
import System.Directory
withDirectory :: FilePath -> IO a -> IO a
withDirectory dir m = do
createDirectoryIfMissing True dir
bracket
getCurrentDirectory
setCurrentDirectory
(\_ -> setCurrentDirectory dir >> m... | null | https://raw.githubusercontent.com/msgpack/msgpack-haskell/f52a5d2db620a7be70810eca648fd152141f8b14/msgpack-idl/Language/MessagePack/IDL/Internal.hs | haskell | module Language.MessagePack.IDL.Internal (
withDirectory
) where
import Control.Exception
import System.Directory
withDirectory :: FilePath -> IO a -> IO a
withDirectory dir m = do
createDirectoryIfMissing True dir
bracket
getCurrentDirectory
setCurrentDirectory
(\_ -> setCurrentDirectory dir >> m... | |
2dbb42c3f71530adce659a9abc438d13aeabb8559d4f35b39838678776510523 | Hexirp/doctest-driver-gen | doctest-driver.hs | # OPTIONS_GHC -F -pgmF doctest - driver - gen -optF test #
| null | https://raw.githubusercontent.com/Hexirp/doctest-driver-gen/0b0b435a00254f6a97a5bfbfbd2f00aca114c19d/test/doctest-driver.hs | haskell | # OPTIONS_GHC -F -pgmF doctest - driver - gen -optF test #
| |
76635cca99543a248f798068568d804ff5fe6c196720df482455cb1854c087f3 | jwiegley/notes | Predicate.hs | Control . Conditional . Extras
# LANGUAGE ViewPatterns #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ExistentialQuantification #
# OPTIONS_GHC -fno - warn - orphans #
-- | 'Control.Conditional.Extras' provides a bit of extra stuff on top of
' Control . Conditional ' ( from the ... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/Predicate.hs | haskell | | 'Control.Conditional.Extras' provides a bit of extra stuff on top of
kinds of truth:
[@ToMaybe@] Where the answer is yes or no, and yes carries a value.
[@ToEither@] Where the answer is yes or no, and both yes and no carry
meaning.
Generalized folds for each of these form the core of w... | Control . Conditional . Extras
# LANGUAGE ViewPatterns #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ExistentialQuantification #
# OPTIONS_GHC -fno - warn - orphans #
' Control . Conditional ' ( from the @cond@ package ) for working with
truth - valued functions more abstra... |
6e0e9b24840b5c058aca5e8dd7040fa203964937537ed380f4aac49be268b945 | Gbury/dolmen | code.ml |
(* This file is free software, part of dolmen. See file "LICENSE" for more information *)
(* Exit codes *)
(* ************************************************************************* *)
type t = {
mutable code : int;
(* codes are set later (to accomodate users of the lib choosing error codes
that do not co... | null | https://raw.githubusercontent.com/Gbury/dolmen/749958343d9577bcd9930cf75dbcc33dffd03b35/src/loop/code.ml | ocaml | This file is free software, part of dolmen. See file "LICENSE" for more information
Exit codes
*************************************************************************
codes are set later (to accomodate users of the lib choosing error codes
that do not conflict with theirs), and should be unique for each e... |
type t = {
mutable code : int;
descr : string;
category : string;
mutable abort : bool;
}
let hash t = t.code
let equal t t' = t.code = t'.code
let compare t t' = compare t.code t'.code
let descr t = t.code, t.descr
let category t = t.category
cmdliner uses codes 123 , 124 and 125 , and codes greater t... |
f4325ddd783928116425bc9909f1b942c1660c00fac7c2053d24b844fa57d3b2 | tschady/advent-of-code | d08.clj | (ns aoc.2017.d08
(:require [aoc.file-util :as file-util]))
(def input (file-util/read-lines "2017/d08.txt"))
(def cmd-patt #"^(\w+) (inc|dec) (-?\d+) if (\w+) (.*?) (-?\d+)$")
(defn parse-command [s]
(let [[_ r1 op1 a1 r2 op2 a2] (re-find cmd-patt s)]
{:r1 r1
:op1 (if (= "dec" op1) - +)
:a1 (Long/p... | null | https://raw.githubusercontent.com/tschady/advent-of-code/ea4e2792c50a8b7cc986b5faf217c5a61946cc08/src/aoc/2017/d08.clj | clojure | (ns aoc.2017.d08
(:require [aoc.file-util :as file-util]))
(def input (file-util/read-lines "2017/d08.txt"))
(def cmd-patt #"^(\w+) (inc|dec) (-?\d+) if (\w+) (.*?) (-?\d+)$")
(defn parse-command [s]
(let [[_ r1 op1 a1 r2 op2 a2] (re-find cmd-patt s)]
{:r1 r1
:op1 (if (= "dec" op1) - +)
:a1 (Long/p... | |
f8baa3bef9a84dfeb003fa51d5fc5f6cec9bcbe8d56ac6dc6eac6ee822bd5111 | IUCompilerCourse/public-student-support-code | interp-Clambda.rkt | #lang racket
(require "utilities.rkt")
(require "interp-Llambda-prime.rkt")
(require "interp-Cvar.rkt")
(require "interp-Cif.rkt")
(require "interp-Cwhile.rkt")
(require "interp-Cvec.rkt")
(require "interp-Cvecof.rkt")
(require "interp-Cfun.rkt")
(require (prefix-in runtime-config: "runtime-config.rkt"))
(provide inter... | null | https://raw.githubusercontent.com/IUCompilerCourse/public-student-support-code/fe5f4a657f4622eba596454c14bc8f72765004d9/interp-Clambda.rkt | racket | #lang racket
(require "utilities.rkt")
(require "interp-Llambda-prime.rkt")
(require "interp-Cvar.rkt")
(require "interp-Cif.rkt")
(require "interp-Cwhile.rkt")
(require "interp-Cvec.rkt")
(require "interp-Cvecof.rkt")
(require "interp-Cfun.rkt")
(require (prefix-in runtime-config: "runtime-config.rkt"))
(provide inter... | |
9b313c9368d912b92cbbf870f03405a19a6b20d2d2f8552853e32ff6586660c6 | pink-gorilla/goldly | result.cljc | (ns goldly.service.result
(:require
[clojure.walk :as walk]
[com.rpl.specter :refer [transform setval END]]
#?(:clj [taoensso.timbre :refer [debug debugf info infof warn error errorf]]
:cljs [taoensso.timbre :refer-macros [debug debugf info infof warn error errorf]])))
(defn specter-resolve
[spect... | null | https://raw.githubusercontent.com/pink-gorilla/goldly/9589dc51c8fe894319e9eededdc1c965c3314491/service/src/goldly/service/result.cljc | clojure | (ns goldly.service.result
(:require
[clojure.walk :as walk]
[com.rpl.specter :refer [transform setval END]]
#?(:clj [taoensso.timbre :refer [debug debugf info infof warn error errorf]]
:cljs [taoensso.timbre :refer-macros [debug debugf info infof warn error errorf]])))
(defn specter-resolve
[spect... | |
e07492f9021304729b6de492a3cfa3ea40a088d1d734557a02a41afdd0429c29 | diagrams/diagrams-lib | Curvature.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
-----------------------------------------------------------------------------
-- |
-- Module : Diagrams.TwoD.Curvature
Copyright : ( c ) 2013 diagrams - lib team ( see LICENSE )
-- License : BSD-style (see LICENSE)
-- Maintainer :
--
... | null | https://raw.githubusercontent.com/diagrams/diagrams-lib/6f66ce6bd5aed81d8a1330c143ea012724dbac3c/src/Diagrams/TwoD/Curvature.hs | haskell | # LANGUAGE GADTs #
---------------------------------------------------------------------------
|
Module : Diagrams.TwoD.Curvature
License : BSD-style (see LICENSE)
Maintainer :
---------------------------------------------------------------------------
for the concept is how much you wou... | # LANGUAGE FlexibleContexts #
Copyright : ( c ) 2013 diagrams - lib team ( see LICENSE )
Compute curvature for segments in two dimensions .
module Diagrams.TwoD.Curvature
(
curvature
, radiusOfCurvature
, squaredCurvature
, squaredRadiusOfCurvature
) where
import Control.L... |
a889ddf2f713a4a8792db7b8682486942ff0bbb58ce1e5cbe5729ed6cd5ae35e | typedclojure/typedclojure | record_optional_key.clj | (ns clojure.core.typed.test.record-optional-key
(:require [typed.clojure :as t]))
(t/ann-record Foo [a :- (t/U nil t/Num)])
(defrecord Foo [a])
(map->Foo {})
(t/ann-record FooP [a :- (t/U nil t/Num)])
(defrecord FooP [a])
(map->FooP {})
| null | https://raw.githubusercontent.com/typedclojure/typedclojure/5fd7cdf7941c6e7d1dd5df88bf44474fa35e1fca/typed/clj.checker/test/clojure/core/typed/test/record_optional_key.clj | clojure | (ns clojure.core.typed.test.record-optional-key
(:require [typed.clojure :as t]))
(t/ann-record Foo [a :- (t/U nil t/Num)])
(defrecord Foo [a])
(map->Foo {})
(t/ann-record FooP [a :- (t/U nil t/Num)])
(defrecord FooP [a])
(map->FooP {})
| |
07570372be2bd700806aa48353fec41a0a57f1487ca731cda254eb17623d98ac | Clozure/ccl | cocoa-doc.lisp | ;;;-*-Mode: LISP; Package: GUI -*-
;;;
;;; Copyright 2007 Clozure Associates
;;;
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... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/cocoa-ide/cocoa-doc.lisp | lisp | -*-Mode: LISP; Package: GUI -*-
Copyright 2007 Clozure Associates
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 ... | distributed under the License is distributed on an " AS IS " BASIS ,
(in-package "GUI")
(def-cocoa-default *hyperspec-url-string* :string "/" "HTTP URL for HyperSpec lookup")
(defloadvar *hyperspec-root-url* nil)
(defloadvar *hyperspec-map-sym-hash* nil)
(defloadvar *hyperspec-map-sym-url* nil)
(defvar *lookup-hy... |
44ae10217f963247a1b803c3421ab71927c0c0c204e8110dd86bbfdd402f307a | webyrd/mediKanren | profiling.rkt | #lang racket
(provide
run/progress
)
(require "../../medikanren2/base.rkt"
chk)
( run / progress numMax s )
;;
Run a query while reporting statistics . Query must first be converted to a
stream s. Parameter numMax indicates the maximum desired number of
query results . Setting numMax to ... | null | https://raw.githubusercontent.com/webyrd/mediKanren/07640206bf74d2678392e1d35aea379232b54d0b/contrib/medikanren2/profiling.rkt | racket |
Statistics are printed to current-output-port.
Example:
(query->stream
(query (id)
(fresh (p o)
(nodes id p o)
(:== #t (id) (string-prefix? id "APO"))
))))
... | #lang racket
(provide
run/progress
)
(require "../../medikanren2/base.rkt"
chk)
( run / progress numMax s )
Run a query while reporting statistics . Query must first be converted to a
stream s. Parameter numMax indicates the maximum desired number of
query results . Setting numMax to -1 s... |
3ae9bd83ebd4e1c334b58d742cc88220703576670a1c13765d82fcc40759bde8 | ska80/thinlisp | stubs.lisp | (in-package "TL")
;;;; Module STUBS
Copyright ( c ) 1999 - 2001 The ThinLisp Group
Copyright ( c ) 1996 Gensym Corporation .
;;; All rights reserved.
This file is part of ThinLisp .
ThinLisp is open source ; you can redistribute it and/or modify it
under the terms of the ThinLisp License as published by t... | null | https://raw.githubusercontent.com/ska80/thinlisp/173573a723256d901887f1cbc26d5403025879ca/tl/lisp/stubs.lisp | lisp | Module STUBS
All rights reserved.
you can redistribute it and/or modify it
either version 1 or ( at your option ) any later version .
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Basic functions for inlining
Stubs for Operations
This module con... | (in-package "TL")
Copyright ( c ) 1999 - 2001 The ThinLisp Group
Copyright ( c ) 1996 Gensym Corporation .
This file is part of ThinLisp .
under the terms of the ThinLisp License as published by the ThinLisp
ThinLisp is distributed in the hope that it will be useful , but
For additional information se... |
2c1304d805bc394c3b402f0ff51b798efa88e9f13b5a06259172cd70f5329632 | CorticalComputer/Book_NeuroevolutionThroughErlang | fitness_postprocessor.erl | This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM
%%
Copyright ( C ) 2012 by , DXNN Research Group ,
%All rights reserved.
%
This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for th... | null | https://raw.githubusercontent.com/CorticalComputer/Book_NeuroevolutionThroughErlang/81b96e3d7985624a6183cb313a7f9bff0a7e14c5/Ch_16/fitness_postprocessor.erl | erlang |
All rights reserved.
Efficiency. | This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM
Copyright ( C ) 2012 by , DXNN Research Group ,
This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for the terms of use .
-module(f... |
8f342ccbe4b87f30d20bdb7f0938a1772c9c888d0b867525239f83a2a300eef6 | adinapoli/clj3D | fractal-tree.clj | ;;A simple fractal tree using clj3D
(ns clj3D.examples.fractal-tree
(:refer-clojure :rename {+ core-+})
(:use [clj3D math fl fenvs viewer] :reload))
(defn tree2d [teta length maxl]
(let [initial-branch (cylinder 4 length)]
(loop [tree initial-branch, teta teta, len length, mxl maxl, trasl len]
(if (<... | null | https://raw.githubusercontent.com/adinapoli/clj3D/1175bcaddc1d59fe37c6876dc8cc178417211e38/examples/fractal-tree.clj | clojure | A simple fractal tree using clj3D |
(ns clj3D.examples.fractal-tree
(:refer-clojure :rename {+ core-+})
(:use [clj3D math fl fenvs viewer] :reload))
(defn tree2d [teta length maxl]
(let [initial-branch (cylinder 4 length)]
(loop [tree initial-branch, teta teta, len length, mxl maxl, trasl len]
(if (<= len 2)
(color :brown tree)
(let ... |
86e048c27f955d20af4192e79bc1a9c4fd614d9842b1d624896567781d74d5f4 | rootmos/loom | loom_sup.erl | -module(loom_sup).
-behaviour(supervisor).
-export([start_link/1, init/1]).
start_link(Config) ->
supervisor:start_link({local, ?MODULE}, ?MODULE, Config).
init(#{port := Port, faucets := Faucets, dispatch := Dispatch}) ->
SupFlags = #{strategy => one_for_all, intensity => 0, period => 1},
ChildSpecs = ... | null | https://raw.githubusercontent.com/rootmos/loom/5f68ef9a9a5350f14d70935bacec3287aca60f1f/apps/loom/src/loom_sup.erl | erlang | -module(loom_sup).
-behaviour(supervisor).
-export([start_link/1, init/1]).
start_link(Config) ->
supervisor:start_link({local, ?MODULE}, ?MODULE, Config).
init(#{port := Port, faucets := Faucets, dispatch := Dispatch}) ->
SupFlags = #{strategy => one_for_all, intensity => 0, period => 1},
ChildSpecs = ... | |
1923640c7f34305ace35b3c00aed9e494db6c439358539337073b4cfab9f9377 | kushidesign/kushi | about.cljs | (ns kushi.playground.about
(:require
[kushi.ui.title.core :refer [title]]
[kushi.ui.link.core :refer [link]]
[kushi.ui.dom :as dom]
[kushi.ui.core :refer [defcom]]
[kushi.core :refer (sx merge-attrs)]
[kushi.ui.snippet.core :refer (copy-to-clipboard-button)]
[kushi.ui.dom :refer (copy-to-clipboar... | null | https://raw.githubusercontent.com/kushidesign/kushi/6a50dc0336a8e7fe8ddd776fcf41689f9110e590/src/kushi/playground/about.cljs | clojure | dark theme
typography
colors
:.medium
:lg:pie--5rem
:sm:pie--5rem | (ns kushi.playground.about
(:require
[kushi.ui.title.core :refer [title]]
[kushi.ui.link.core :refer [link]]
[kushi.ui.dom :as dom]
[kushi.ui.core :refer [defcom]]
[kushi.core :refer (sx merge-attrs)]
[kushi.ui.snippet.core :refer (copy-to-clipboard-button)]
[kushi.ui.dom :refer (copy-to-clipboar... |
df186db43054cff5513d0a87d55ff6982721edd5ed1ac189eeeceb4bd77d6310 | ryzhyk/cocoon | Pos.hs |
Copyrights ( c ) 2016 . Samsung Electronics Ltd. All right reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in ... | null | https://raw.githubusercontent.com/ryzhyk/cocoon/409d10b848a4512e7cf653d5b6cf6ecf247eb794/cocoon/Pos.hs | haskell | # LANGUAGE TypeSynonymInstances, FlexibleInstances # |
Copyrights ( c ) 2016 . Samsung Electronics Ltd. All right reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in ... |
29e7c92ce981138b24bb8bcff6ace5f4c288df0413727e7f7894d59dfd93dbc4 | mirage/ocaml-cohttp | request.mli | { { { Copyright ( c ) 2012 - 2014 Anil Madhavapeddy < >
*
* 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 IS PROVI... | null | https://raw.githubusercontent.com/mirage/ocaml-cohttp/8fed15a542b909f2fa24ef5392fc1624013543d1/cohttp/src/request.mli | ocaml | * HTTP/1.1 request handling
* This contains the metadata for a HTTP/1.1 request header, including the
{!headers}, {!version}, {!meth} and {!uri}. The body is handled by the
separate {!S} module type, as it is dependent on the IO implementation.
The interface exposes a [fieldslib] interface which provides ... | { { { Copyright ( c ) 2012 - 2014 Anil Madhavapeddy < >
*
* 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 IS PROVI... |
b62b95c280e415d8df36273f65c593f4aaa8df7cf796d70b988dbe3696350abe | duncanatt/detecter | evm_tracer.erl | %%% ----------------------------------------------------------------------------
@author
%%%
@doc Wrapper for the Erlang Virtual Machine tracing infrastructure .
%%% @end
%%%
Copyright ( c ) 2021 , < >
%%%
%%% This program is free software: you can redistribute it and/or modify it
under the terms of th... | null | https://raw.githubusercontent.com/duncanatt/detecter/7070ddd6b16dd323a81077a2915f4b938f9f0b80/detecter/src/tracing/evm_tracer.erl | erlang | ----------------------------------------------------------------------------
@end
This program is free software: you can redistribute it and/or modify it
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Publ... | @author
@doc Wrapper for the Erlang Virtual Machine tracing infrastructure .
Copyright ( c ) 2021 , < >
under the terms of the GNU General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option )
ANY WARRANTY ; without even the implied warr... |
29ed2338f04e4d208e802775904973ccdb5bb47318b6212ff639f6117a7f5c7d | pflanze/chj-schemelib | docstring-base.scm | Copyright 2020 by < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
;;; (at your option) any later version.
(require define-mac... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/docstring-base.scm | scheme | This file is free software; you can redistribute it and/or modify
(at your option) any later version.
(at runtime, presumably)
Hmm, FUTURE: allow fnname to be a local variable, so
that runtime references to other runtime function
values which are not at the top level can be possible.
To make sure the funct... | Copyright 2020 by < >
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
(require define-macro-star
(simple-match-1 assert*))
(export (macro docstring-from)
docstring)
"Base library for do... |
abb230c0a6ed08687567e61e3e298f6b7552f2b8cb073d30c02ddae28b4c2172 | jjtolton/rocinante | items.cljs | (ns {{base}}.lib.events.items
(:require [{{base}}.lib.utils :as utils]
[{{base}}.lib.data.ds :as ds]))
(defmulti event! utils/event-subtype)
(defmethod event! :done [e]
(let [id (utils/event-data e)]
{:data [{:event :data/transact
:data [{:item/id id
:item/s... | null | https://raw.githubusercontent.com/jjtolton/rocinante/625b1c5309b7f01d9f48af8d4df8f55b1ee97158/src/clj/new/rocinante/src/cljs/base/lib/events/items.cljs | clojure | (ns {{base}}.lib.events.items
(:require [{{base}}.lib.utils :as utils]
[{{base}}.lib.data.ds :as ds]))
(defmulti event! utils/event-subtype)
(defmethod event! :done [e]
(let [id (utils/event-data e)]
{:data [{:event :data/transact
:data [{:item/id id
:item/s... | |
b1edaf86f7cf839a1e913aa6ad6609ebfc412c42711692845ed3a79e60b532ea | jyh/metaprl | czf_false.mli |
* Logical false .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlman / default.htm... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/czf/czf_false.mli | ocaml |
* From false prove anything.
*
* H, x: false, J >> T
* by false_elim i
* False is well-formed.
* False is a restricted formula.
* -*-
* Local Variables:
* Caml-master: "editor.run"
* End:
* -*-
|
* Logical false .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlman / default.htm... |
f3e9b9932c27508a18f69058449135af5e544aa5baf357b3a6bab04114a963c5 | ulrikstrid/ocaml-jose | JWETest.ml | let () = Mirage_crypto_rng_unix.initialize ()
open Helpers
let jwe_suite, _ =
Junit_alcotest.run_and_report ~package:"jose" "JWE"
[
( "JWE",
[
Alcotest.test_case
"Can create and validate my own RSA-OAEP with A256GCM JWEs" `Quick
(fun () ->
let jwk =
... | null | https://raw.githubusercontent.com/ulrikstrid/ocaml-jose/7b1e5b89026659547e2a3d4802d68c23eab4ea5d/test/JWETest.ml | ocaml | let () = Mirage_crypto_rng_unix.initialize ()
open Helpers
let jwe_suite, _ =
Junit_alcotest.run_and_report ~package:"jose" "JWE"
[
( "JWE",
[
Alcotest.test_case
"Can create and validate my own RSA-OAEP with A256GCM JWEs" `Quick
(fun () ->
let jwk =
... | |
1473171b766da582ef63bf70286629bc4c338f6ae3c1a3b6eddb70dfe461eb85 | VERIMAG-Polyhedra/VPL | IndexBuild_t.ml | open Vpl
let mk = Index.Int.mk ;;
let mkl l = List.map Index.Int.mk l;;
module IndexList = struct
let components_ts : Test.t
= fun () ->
let chk : string * Index.Int.t * IndexBuild.IndexList.t -> (Test.stateT -> Test.stateT)
= fun (nm, ind, eil) state ->
let ail = IndexBuild.IndexList.components ind i... | null | https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/test/lin/IndexBuild_t.ml | ocaml | open Vpl
let mk = Index.Int.mk ;;
let mkl l = List.map Index.Int.mk l;;
module IndexList = struct
let components_ts : Test.t
= fun () ->
let chk : string * Index.Int.t * IndexBuild.IndexList.t -> (Test.stateT -> Test.stateT)
= fun (nm, ind, eil) state ->
let ail = IndexBuild.IndexList.components ind i... | |
5e90d903882f97af0541ca0d9fa3fc98716daee4816dd2557fcc7e391787c038 | xpe/clj-async-tcp-echo-nio.2 | client_server_test.clj | (ns echo-byte.client-server-test
(:require [clojure.test :refer :all]
[echo-byte.core :as core]
[echo-byte.server :as server]
[echo-byte.client :as client]))
(deftest client-server-test
(testing "client + server"
(let [host "127.0.0.1"
port 9517
s (server... | null | https://raw.githubusercontent.com/xpe/clj-async-tcp-echo-nio.2/1d39d23a5d7dac0a6420795688708349bc0bbad2/test/echo_byte/client_server_test.clj | clojure | (ns echo-byte.client-server-test
(:require [clojure.test :refer :all]
[echo-byte.core :as core]
[echo-byte.server :as server]
[echo-byte.client :as client]))
(deftest client-server-test
(testing "client + server"
(let [host "127.0.0.1"
port 9517
s (server... | |
4cf4189ee88d6baf36148b0f63ba3678ee4becb2b763e798dbcfb794d36e1b50 | uim/uim | im-custom.scm | ;;; im-custom.scm: Customization variables for im.scm
;;;
Copyright ( c ) 2003 - 2013 uim Project
;;;
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
1 . Redistributions of source... | null | https://raw.githubusercontent.com/uim/uim/492f4f703808cd32e74486a4edf52f410fbda61a/scm/im-custom.scm | scheme | im-custom.scm: Customization variables for im.scm
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditi... | Copyright ( c ) 2003 - 2013 uim Project
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of authors nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTOR... |
9f00b0034d478a2412a4aae4ed5a0197501ea127e6b2cdf2fca995d08c233672 | fossas/fossa-cli | ApkDatabase.hs | module Strategy.ApkDatabase (
discover,
findProjects,
mkProject,
) where
import App.Fossa.Analyze.Types (AnalyzeProject (analyzeProject, analyzeProject'))
import Container.OsRelease (OsInfo)
import Control.Effect.Diagnostics (Diagnostics)
import Control.Effect.Reader (Reader)
import Data.Aeson (ToJSON)
import Da... | null | https://raw.githubusercontent.com/fossas/fossa-cli/187f19afec2133466d1998c89fc7f1c77107c2b0/src/Strategy/ApkDatabase.hs | haskell | module Strategy.ApkDatabase (
discover,
findProjects,
mkProject,
) where
import App.Fossa.Analyze.Types (AnalyzeProject (analyzeProject, analyzeProject'))
import Container.OsRelease (OsInfo)
import Control.Effect.Diagnostics (Diagnostics)
import Control.Effect.Reader (Reader)
import Data.Aeson (ToJSON)
import Da... | |
11af2665cd399d8ac821b00d5398792383e0bc82728099f989c05b56d364e10e | freiksenet/cl-zmq | main.lisp | (in-package #:zmq.tests)
(defun run-tests ()
(run! 'main))
(def-suite main)
(in-suite main)
(defparameter *test-endpoint* "tcp:31723")
(defmacro with-test-reciever (socket &body body)
(let ((result-var (gensym "result"))
(msg-var (gensym "msg"))
(thread-var (gensym "thread")))
`(let* ((,res... | null | https://raw.githubusercontent.com/freiksenet/cl-zmq/9acd1faa1ea3b2e322241aa126c57ba3a8907b79/tests/main.lisp | lisp | Version
: Creating and configuring contexts
Creating and configuring sockets
Making and working with messages
Sending and recieving the messages | (in-package #:zmq.tests)
(defun run-tests ()
(run! 'main))
(def-suite main)
(in-suite main)
(defparameter *test-endpoint* "tcp:31723")
(defmacro with-test-reciever (socket &body body)
(let ((result-var (gensym "result"))
(msg-var (gensym "msg"))
(thread-var (gensym "thread")))
`(let* ((,res... |
f25f571a57e4c875b24b11702f3d6b9738cd520ff8cda9aba548bb0214fb7585 | pedrovgs/HaskellKatas | RockPaperScissorsSpec.hs | module RockPaperScissors.RockPaperScissorsSpec where
import RockPaperScissors.RockPaperScissors
import Test.Hspec
import Test.QuickCheck
spec = describe "RockPaperScissors requirements" $ do
it "rock beat scissors" $
Player "p1" Rock `whoWins` Player "p2" Scissors == Player1Win... | null | https://raw.githubusercontent.com/pedrovgs/HaskellKatas/79ecaeecf80e71c44cfa06692f56dd3a6d1c7308/test/RockPaperScissors/RockPaperScissorsSpec.hs | haskell | module RockPaperScissors.RockPaperScissorsSpec where
import RockPaperScissors.RockPaperScissors
import Test.Hspec
import Test.QuickCheck
spec = describe "RockPaperScissors requirements" $ do
it "rock beat scissors" $
Player "p1" Rock `whoWins` Player "p2" Scissors == Player1Win... | |
a703b19d55c4a1ebe485e2cd652bb5281af355bf5a4c2765d764dcfbda5f2893 | AshleyYakeley/Truth | Simplifier.hs | module Language.Expression.Common.Simplifier
( SimplifyTypeSystem(..)
) where
import Language.Expression.Common.TypeSystem
import Shapes
class TypeSystem ts => SimplifyTypeSystem ts where
simplify ::
forall a. TSMappable ts a
=> EndoM (TSOuter ts) a
| null | https://raw.githubusercontent.com/AshleyYakeley/Truth/4440fb14943e8a6ff02e760261918b1c9c535e3f/Pinafore/typed-expression/lib/Language/Expression/Common/Simplifier.hs | haskell | module Language.Expression.Common.Simplifier
( SimplifyTypeSystem(..)
) where
import Language.Expression.Common.TypeSystem
import Shapes
class TypeSystem ts => SimplifyTypeSystem ts where
simplify ::
forall a. TSMappable ts a
=> EndoM (TSOuter ts) a
| |
f04bf40e939cdd17df7e89f4a5c1e5b10c86150953ed533828d95af4f5cbfadf | McParen/croatoan | slk.lisp | (in-package :de.anvi.ncurses)
slk
;;; curses soft label routines
;;; -island.net/ncurses/man/curs_slk.3x.html
;;; C prototypes
;; int slk_init(int fmt);
;; int slk_set(int labnum, const char *label, int fmt);
int slk_refresh(void ) ;
;; int slk_noutrefresh(void);
char * labnum ) ;
;; int slk_clear(void);
;; i... | null | https://raw.githubusercontent.com/McParen/croatoan/413e8855b78a2e408f90efc38e8485f880691684/ncurses/slk.lisp | lisp | curses soft label routines
-island.net/ncurses/man/curs_slk.3x.html
C prototypes
int slk_init(int fmt);
int slk_set(int labnum, const char *label, int fmt);
int slk_noutrefresh(void);
int slk_clear(void);
int slk_restore(void);
int slk_touch(void);
int slk_wset(int labnum, const wchar_t *label, int ... | (in-package :de.anvi.ncurses)
slk
(cffi:defcfun ("slk_init" slk-init) :int (fmt :int))
(cffi:defcfun ("slk_set" slk-set) :int (labnum :int) (label :string) (fmt :int))
(cffi:defcfun ("slk_refresh" slk-refresh) :int)
(cffi:defcfun ("slk_noutrefresh" slk-noutrefresh) :in... |
0f6f86f5febfc56a889a54caee4957dcd052979793fc2fd4bbd0bc2f63feab07 | Plutonomicon/plutarch-core | Nix.hs | # LANGUAGE NoFieldSelectors #
module Examples.Nix (example) where
import Data.Functor.Identity (runIdentity)
import Data.Proxy (Proxy (Proxy))
import Data.Text (Text)
import Data.Type.Equality ((:~:) (Refl))
import Plutarch.Backends.Nix (compileAp)
import Plutarch.Frontends.Data (PAny)
import Plutarch.Frontends.Nix (... | null | https://raw.githubusercontent.com/Plutonomicon/plutarch-core/6befe9f205fd3a9f1b6697f09e7162331029dde0/Examples/Nix.hs | haskell | TODO: implement
psomeconst :: (PNix e) => Term e (PSome PConstF) | # LANGUAGE NoFieldSelectors #
module Examples.Nix (example) where
import Data.Functor.Identity (runIdentity)
import Data.Proxy (Proxy (Proxy))
import Data.Text (Text)
import Data.Type.Equality ((:~:) (Refl))
import Plutarch.Backends.Nix (compileAp)
import Plutarch.Frontends.Data (PAny)
import Plutarch.Frontends.Nix (... |
86758b6d04b1166de18d9af527b59ee4252d11e5aaf0314443c7beaacf24dbd6 | juxt/reap | rfc7231.clj | Copyright © 2020 , JUXT LTD .
(ns juxt.reap.alpha.decoders.rfc7231
(:refer-clojure :exclude [type second])
(:require
[juxt.reap.alpha.rfc7231 :as rfc]
[juxt.reap.alpha.regex :as re]
[juxt.reap.alpha.combinators :as p]
[juxt.reap.alpha.decoders.rfc4647 :as rfc4647]
[juxt.reap.alpha.decoders.rfc5234... | null | https://raw.githubusercontent.com/juxt/reap/29ffc8664df26041ebd93a53f009d2606d1a5b6c/src/juxt/reap/alpha/decoders/rfc7231.clj | clojure | Forward references
Helpers
We lower-case to support case-insensitive lookups
Definitions
Accept = [ ( "," / ( media-range [ accept-params ] ) ) *( OWS "," [
OWS ( media-range [ accept-params ] ) ] ) ]
OWS))))
The reason why we can't just use `media-range` is that we
need to resolve the ambiguity whereby the "... | Copyright © 2020 , JUXT LTD .
(ns juxt.reap.alpha.decoders.rfc7231
(:refer-clojure :exclude [type second])
(:require
[juxt.reap.alpha.rfc7231 :as rfc]
[juxt.reap.alpha.regex :as re]
[juxt.reap.alpha.combinators :as p]
[juxt.reap.alpha.decoders.rfc4647 :as rfc4647]
[juxt.reap.alpha.decoders.rfc5234... |
e1c3fef35c337dc9195a662af82f6cbb5f96fe8b3dd056e71652ed6439e0ab4c | gsakkas/rite | 3159.ml |
let l1 = [0; 0; 9; 9];;
let l2 = [1; 0; 0; 2];;
let x = (3, 3) :: (List.rev (List.combine l1 l2));;
let clone x n =
let rec helper x n acc =
if n <= 0 then acc else helper x (n - 1) (x :: acc) in
helper x n [];;
let padZero l1 l2 =
if (List.length l1) < (List.length l2)
then ((List.append (clone 0 ((Li... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/3159.ml | ocaml |
let l1 = [0; 0; 9; 9];;
let l2 = [1; 0; 0; 2];;
let x = (3, 3) :: (List.rev (List.combine l1 l2));;
let clone x n =
let rec helper x n acc =
if n <= 0 then acc else helper x (n - 1) (x :: acc) in
helper x n [];;
let padZero l1 l2 =
if (List.length l1) < (List.length l2)
then ((List.append (clone 0 ((Li... | |
3a369d0173e7ef6773d1c637cdaa0c4c71ad41a23969961842bad6819602670d | ice1000/learn | tiny-three-pass-compiler-given-up.hs | module TinyThreePassCompiler where
import Data.List.Split
import Data.List
data AST = Imm Int
| Arg Int
| Add AST AST
| Sub AST AST
| Mul AST AST
| Div AST AST
deriving (Eq, Show)
--
-- data Production = Token
-- | Expression AST
-- ... | null | https://raw.githubusercontent.com/ice1000/learn/4ce5ea1897c97f7b5b3aee46ccd994e3613a58dd/Haskell/CW-Kata/tiny-three-pass-compiler-given-up.hs | haskell |
data Production = Token
| Expression AST
| Term AST
| Factor AST
compile :: String -> [String]
(==>) Nothing _ = No errors
extract Nothing = No errors
parse :: [Token] -> [Token] -> AST
parse params ( TChar ' ( ' :( l:(op:(r : TChar ' ) ' ) ) ) ) = parse para... | module TinyThreePassCompiler where
import Data.List.Split
import Data.List
data AST = Imm Int
| Arg Int
| Add AST AST
| Sub AST AST
| Mul AST AST
| Div AST AST
deriving (Eq, Show)
deriving ( Eq , Show )
data Token = TChar Char
| TInt... |
84393626dfbc87dd0a8dfd2765852635d1a4527bf8d054b343171acced583298 | GaloisInc/semmc | ConcreteState.hs | # LANGUAGE ViewPatterns #
# LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleContexts #
module SemMC.Architecture.PPC32.ConcreteState (
zeroState,
randomState,
serialize,
deserial... | null | https://raw.githubusercontent.com/GaloisInc/semmc/a3b8b89b9e88c94aab2ec6e06f993edcc9126cea/semmc-ppc/src/SemMC/Architecture/PPC32/ConcreteState.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
| FIXME: Does not include memory
mapM_ addRandomBV64 frs
addRandomBV64 loc = do
<- V.ValueBV <$> liftIO (DA.arbitrary gen)
| States that include (pairs of) registers with interesting bit patterns.
For each pair of registers, combinations of interesting bit patterns ... | # LANGUAGE ViewPatterns #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleContexts #
module SemMC.Architecture.PPC32.ConcreteState (
zeroState,
randomState,
serialize,
deserialize,
interestingStates
) where
import Data.Pro... |
9f96c1d25b2a9a3716c87016c52f652ef9e63c43922b1a1f743eb432448f1b1a | jyh/metaprl | ocaml_logic.mli |
* Utilities for the semantics .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlman... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/ocaml_sos/ocaml_logic.mli | ocaml |
* Basic propositional logic.
* -*-
* Local Variables:
* Caml-master: "refiner"
* End:
* -*-
|
* Utilities for the semantics .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlman... |
3843a26973b32d33242020c15fae08bd2bca9f8c888b4c273f723dda0c1f4943 | marcoheisig/sb-simd | sse4-2.lisp | (in-package #:sb-simd-sse4.2)
(define-instruction-set :sse4.2
(:include :sse4.1)
(:test (sse4.2-supported-p))
(:instructions
;; u64.2
(two-arg-u64.2>~ #:pcmpgtq (u64.2) (u64.2 u64.2) :cost 3 :encoding :sse)
(two-arg-u64.2> nil (u64.2) (u64.2 u64.2) :cost 3 :encoding :fake-vop)
(two-arg-u64.2>=... | null | https://raw.githubusercontent.com/marcoheisig/sb-simd/f8fae2d35a7ca64e57c2649be5b1e405e098d03b/code/instruction-sets/sse4-2.lisp | lisp | u64.2 | (in-package #:sb-simd-sse4.2)
(define-instruction-set :sse4.2
(:include :sse4.1)
(:test (sse4.2-supported-p))
(:instructions
(two-arg-u64.2>~ #:pcmpgtq (u64.2) (u64.2 u64.2) :cost 3 :encoding :sse)
(two-arg-u64.2> nil (u64.2) (u64.2 u64.2) :cost 3 :encoding :fake-vop)
(two-arg-u64.2>= nil (... |
2c21b9455716e61ce901a354d413e5188ddf92aecc6bd6b837e4ce78cadac936 | HaskellForCats/HaskellForCats | hashtbl.hs | import Control.Monad
-- import qualified Data.HashTable as H
import qualified Data.HashTable.IO as H
main = do
m <- H.new (==) H.hashInt
forM_ [1..10000000] $ \n -> H.insert m n n
v <- H.lookup m 100
print v
| null | https://raw.githubusercontent.com/HaskellForCats/HaskellForCats/2d7a15c0cdaa262c157bbf37af6e72067bc279bc/hashtbl.hs | haskell | import qualified Data.HashTable as H | import Control.Monad
import qualified Data.HashTable.IO as H
main = do
m <- H.new (==) H.hashInt
forM_ [1..10000000] $ \n -> H.insert m n n
v <- H.lookup m 100
print v
|
7fbac5ce74cefd954708515462c33c729c51ab79ba27925b0f033af5f22d4410 | Adellica/cocoscheme | scratch.scm | (use cplusplus-object coops lolevel chickmunk srfi-13)
(include "scratch-truck.scm")
(include "scratch-labels.scm")
;; (define space (space-new))
;; (define (*draw*) #f)
(define (*draw*) #f
(draw-shapes (space-shapes space))
(if #f ;; draw cog?
(map (lambda (body) #f
(ccDrawCircle (v->CCPoint ... | null | https://raw.githubusercontent.com/Adellica/cocoscheme/1d92626a926696042ba917cc4fd1bf7cb76cd431/scm/scratch.scm | scheme | (define space (space-new))
(define (*draw*) #f)
draw cog?
#f if not touching, otherwise vector position
camera follows truck
remove bodies that are off the screen
(define *selection* '())
(define *bodies* #f)
(define *body* #f)
;;(use chickmunk)
;;(define space (space-new))
(define (*touch-begin* t)
(let... | (use cplusplus-object coops lolevel chickmunk srfi-13)
(include "scratch-truck.scm")
(include "scratch-labels.scm")
(define (*draw*) #f
(draw-shapes (space-shapes space))
(map (lambda (body) #f
(ccDrawCircle (v->CCPoint (vsub (body-get-pos body)
(bod... |
a5db614ded1702a9ffebb36035187a987629f757526ab001c018132e55fc8982 | tweag/ormolu | simple.hs | bar x = x
baz = x
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/value/function/simple.hs | haskell | bar x = x
baz = x
| |
e6dbdcca411686a35fed61b337bfd3b8092f774c20a43c5ba5f1893dbde2ee6a | clj-commons/iapetos | exceptions.clj | (ns iapetos.collector.exceptions
(:require [iapetos.core :as prometheus]
[iapetos.collector :as collector]
[iapetos.operations :as ops]))
# # Exception Counter Child
;;
;; This will wrap the original collector, the counter instance to use and
;; desired labels. Eventually, we'll add the 'ex... | null | https://raw.githubusercontent.com/clj-commons/iapetos/493b38c0d22afc5a4cd409bdd9748e15a960aa44/src/iapetos/collector/exceptions.clj | clojure |
This will wrap the original collector, the counter instance to use and
desired labels. Eventually, we'll add the 'exceptionClass' label and
increment the counter from within 'with-exception'.
This is a wrapper around a counter that defers labeling of the counter
instance so it can be done when 'exceptionClass' i... | (ns iapetos.collector.exceptions
(:require [iapetos.core :as prometheus]
[iapetos.collector :as collector]
[iapetos.operations :as ops]))
# # Exception Counter Child
(deftype ExceptionCounterChild [collector instance values]
clojure.lang.IFn
(invoke [_ exception-class]
(->> (assoc ... |
9dfb0a3f12f70ef2738fd1a31239024226458369c0b008aa7bce1cf45371fb9c | NetworkVerification/nv | UnboxEdges.ml | open Nv_lang.Syntax
open Nv_datastructures
let ty_transformer _ ty =
match ty with
| TEdge -> Some (TTuple [TNode; TNode])
| _ -> None
;;
let pattern_transformer _ p _ =
match p with
| PEdge (p1, p2) -> Some (PTuple [p1; p2])
| _ -> None
;;
let value_transformer _ v =
let make_node n = avalue (vnode n,... | null | https://raw.githubusercontent.com/NetworkVerification/nv/aa48abcd1bf9d4b7167cfe83a94b44e446a636e8/src/lib/transformations/UnboxEdges.ml | ocaml | The mask type for edges is always a tuple, even if we don't unbox them | open Nv_lang.Syntax
open Nv_datastructures
let ty_transformer _ ty =
match ty with
| TEdge -> Some (TTuple [TNode; TNode])
| _ -> None
;;
let pattern_transformer _ p _ =
match p with
| PEdge (p1, p2) -> Some (PTuple [p1; p2])
| _ -> None
;;
let value_transformer _ v =
let make_node n = avalue (vnode n,... |
41b6e85f21fd0141345b7c97e26a6e857ce3cf04d184a3eb192a8440506eaea3 | tsurucapital/franz | Reconnect.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE LambdaCase #
module Database.Franz.Client.Reconnect
( Pool
, poolLogFunc
, poolRetryPolicy
, withPool
, withReconnection
, Reconnect(..)
, atomicallyReconnecting
, fetc... | null | https://raw.githubusercontent.com/tsurucapital/franz/ebc013cade755228523b5457b4576a9efca3838f/src/Database/Franz/Client/Reconnect.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE OverloadedStrings #
Connection number
| A wrapper of 'fetch' which calls 'withReconnection' internally
| Run an action which takes a 'Connection', reconnecting whenever it throws an exception.
Don't disconnect if the sequential number is different;
another thread already establi... | # LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
module Database.Franz.Client.Reconnect
( Pool
, poolLogFunc
, poolRetryPolicy
, withPool
, withReconnection
, Reconnect(..)
, atomicallyReconnecting
, fetchWithPool
)
where
import Control.Retry (recovering, RetryP... |
dde8adb7774a1f7d71fe48c8dd8a2d7747a6f2b35823f144e7ac2dd56bd8c291 | t-sin/rosa | cli.lisp | (in-package :cl-user)
(uiop:define-package :rosa/cli
(:use :cl)
(:import-from :rosa
:index
:peruse-as-plist
:pick)
(:export :dump-all
:index-labels
:option-command
:parse-argv
:pick-bodies
:print-usage))
(in-pac... | null | https://raw.githubusercontent.com/t-sin/rosa/dfa505fa035ccc1811e575034ba79dbb36d9c159/cli.lisp | lisp | (in-package :cl-user)
(uiop:define-package :rosa/cli
(:use :cl)
(:import-from :rosa
:index
:peruse-as-plist
:pick)
(:export :dump-all
:index-labels
:option-command
:parse-argv
:pick-bodies
:print-usage))
(in-pac... | |
c331089cc419d2a312b282e6576172f57b552bfe40ea3ec1f58bdccd50719f87 | fossas/fossa-cli | Glide.hs | module Strategy.Glide (
discover,
) where
import App.Fossa.Analyze.Types (AnalyzeProject (analyzeProject'), analyzeProject)
import Control.Effect.Diagnostics (Diagnostics, context)
import Control.Effect.Reader (Reader)
import Data.Aeson (ToJSON)
import Discovery.Filters (AllFilters)
import Discovery.Simple (simpleDi... | null | https://raw.githubusercontent.com/fossas/fossa-cli/187f19afec2133466d1998c89fc7f1c77107c2b0/src/Strategy/Glide.hs | haskell | module Strategy.Glide (
discover,
) where
import App.Fossa.Analyze.Types (AnalyzeProject (analyzeProject'), analyzeProject)
import Control.Effect.Diagnostics (Diagnostics, context)
import Control.Effect.Reader (Reader)
import Data.Aeson (ToJSON)
import Discovery.Filters (AllFilters)
import Discovery.Simple (simpleDi... | |
6a47fa47f882764e7b506a28015aa0435bafb342cc7d02772f2bfa0b0c5f9d0d | databrary/databrary | Format.hs | {-# LANGUAGE OverloadedStrings #-}
module Controller.Format
( viewFormatsHandler
, formatIcon
) where
import Control.Monad.Reader (asks)
import qualified Data.Invertible as I
import Data.Monoid ((<>))
import System.Posix.FilePath (splitFileName, splitExtension)
import qualified Web.Route.Invertible as R
import ... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Controller/Format.hs | haskell | # LANGUAGE OverloadedStrings #
TODO: GET only | module Controller.Format
( viewFormatsHandler
, formatIcon
) where
import Control.Monad.Reader (asks)
import qualified Data.Invertible as I
import Data.Monoid ((<>))
import System.Posix.FilePath (splitFileName, splitExtension)
import qualified Web.Route.Invertible as R
import Model.Format
import Action.Run
impo... |
a5b594d56cb742a03d8eb7b0fc96d4f7766a893dca275c1a541a5fb835ed3c2e | huangz1990/real-world-haskell-cn | unsafeHead.hs | -- file ch04/unsafeHead.hs
unsafeHead = \(x:_) -> x
| null | https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch04/unsafeHead.hs | haskell | file ch04/unsafeHead.hs | unsafeHead = \(x:_) -> x
|
82da3600e66dc485155538f310cfba5604c0a85c9cedb7d0a1961a61996c5432 | racket/gui | test-macro.rkt | (module test-macro mzscheme
(require mzlib/etc)
(provide test)
;; test: (lambda (a?) ((a? a? . -> . boolean?) a? a? . -> . (void))
;; tests to see if the expression is true and prints and error if it's not
(define-syntax test
(syntax-rules (identity)
((_ test actual expected)
(let ([... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/embedded-gui/private/tests/test-macro.rkt | racket | test: (lambda (a?) ((a? a? . -> . boolean?) a? a? . -> . (void))
tests to see if the expression is true and prints and error if it's not | (module test-macro mzscheme
(require mzlib/etc)
(provide test)
(define-syntax test
(syntax-rules (identity)
((_ test actual expected)
(let ([result
(with-handlers
([exn? identity])
actual)])
(and (not (exn? result))
(... |
834b9421bf10f1a6effcdf3cedd19ded5dfeb042ecb68612c5f6e4ab3ac37777 | charlieg/Sparser | rules1.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
copyright ( c ) 1991 Content Technologies Inc.
copyright ( c ) 1992 -- all rights reserved
;;;
;;; File: "rules"
Module : " : names : places : countries : "
version : 1.0 October 1992
initiated December 1990 , thought abo... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/model/core/places/countries/rules1.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
File: "rules"
;;;------------------------------------------------
;;; extensions for combination into larger phrases
;;;------------------------------------------------
(def-cfr country ( "the" country ) ;; "the [United States]"
:referent (:dau... | copyright ( c ) 1991 Content Technologies Inc.
copyright ( c ) 1992 -- all rights reserved
Module : " : names : places : countries : "
version : 1.0 October 1992
initiated December 1990 , thought about in March , got first
context 10/2/91 v1.9
1.0 ( 10/12/92 v2.1 ) introducing new semant... |
b68696d94715dce3f0fa1ddf9befc97ab34fb2e82f000a92ee76050f29c0844c | johnwhitington/ocamli | references2.ml | Function to swap the contents of two references
let swap x y =
let t = !x in
x := !y;
y := t
let x = ref false
let y = ref true
let () = swap x y
| null | https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/examples/references2.ml | ocaml | Function to swap the contents of two references
let swap x y =
let t = !x in
x := !y;
y := t
let x = ref false
let y = ref true
let () = swap x y
| |
c26d8b18318fe69458a26898228be20a6e99f0f97656cd8b5a8c3e2b968e8fe4 | Purple-Services/app-service | db_tools.clj | (ns app.test.db-tools
(:require [common.db :as db]
[environ.core :refer [env]]
[clojure.java.jdbc :refer [with-connection do-commands]]
[clojure.test :refer [use-fixtures deftest is test-ns testing]]))
;; (println env)
;; (println {:db-host (env :test-db-host)
;; :db-po... | null | https://raw.githubusercontent.com/Purple-Services/app-service/e0a4f74c621159240cff33ed4225a7303524ebf8/test/app/test/db_tools.clj | clojure | (println env)
(println {:db-host (env :test-db-host)
:db-port (env :test-db-port)
:db-name (env :test-db-name)
:db-password (env :test-db-password)
:db-user (env :test-db-user)
:db-sql "database/ebdb.sql"})
read in the sql file
sepereate chunks into
statements... | (ns app.test.db-tools
(:require [common.db :as db]
[environ.core :refer [env]]
[clojure.java.jdbc :refer [with-connection do-commands]]
[clojure.test :refer [use-fixtures deftest is test-ns testing]]))
(def ebdb-test-config
"Configuration map for connecting to the local test d... |
93cbd128ae567d7454da2af7925abbb19de1e3ab7504896fb54b807495fdca6d | fugue/fregot | Extended.hs | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
-}
# LANGUAGE CPP #
... | null | https://raw.githubusercontent.com/fugue/fregot/c3d87f37c43558761d5f6ac758d2f1a4117adb3e/lib/Data/List/NonEmpty/Extended.hs | haskell | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
-}
# LANGUAGE CPP #
... | |
535129471627d453cc30fbf6bffd06661a88e53c163dc51fa7cfed81a8c04bba | daveyarwood/music-theory | note_test.cljc | (ns music-theory.note-test
(:require #?(:clj [clojure.test :refer :all]
:cljs [cljs.test :refer-macros (deftest testing is)])
[music-theory.note :as note]))
(deftest note-tests
(testing "representing notes as strings/keywords"
(comment "->Note constructs a Note record, which represe... | null | https://raw.githubusercontent.com/daveyarwood/music-theory/c58beb9fa6d290900afeff78ee4f86c875e393d7/test/music_theory/note_test.cljc | clojure | (ns music-theory.note-test
(:require #?(:clj [clojure.test :refer :all]
:cljs [cljs.test :refer-macros (deftest testing is)])
[music-theory.note :as note]))
(deftest note-tests
(testing "representing notes as strings/keywords"
(comment "->Note constructs a Note record, which represe... | |
494352202544f7b9ce5861d3882494507d3f386935d531da0048c9620cf3e988 | TerrorJack/ghc-alter | Safe.hs | {-# LANGUAGE Safe #-}
# LANGUAGE NoImplicitPrelude #
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.Marshal.Safe
Copyright : ( c ) The FFI task force 2003
-- License : BSD-style (see the file libraries/base/LICENSE)
--
Maintainer :
-- St... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/Foreign/Marshal/Safe.hs | haskell | # LANGUAGE Safe #
---------------------------------------------------------------------------
|
Module : Foreign.Marshal.Safe
License : BSD-style (see the file libraries/base/LICENSE)
Stability : provisional
Portability : portable
Marshalling support
Safe API Only.
---------------------------... | # LANGUAGE NoImplicitPrelude #
Copyright : ( c ) The FFI task force 2003
Maintainer :
(
@Foreign . Marshal@ hierarchy :
module Foreign.Marshal.Alloc
, module Foreign.Marshal.Array
, module Foreign.Marshal.Error
, module Foreign.Marshal.Pool
, module Fo... |
d9e67c4cec4e8eb4781678d3e501e16fc8c11bef0fdf770832a6aad826f07bc2 | avsm/ocaml-orm-sqlite | foreign_and_variant.ml | TYPE_CONV_PATH "Foreign_and_variant"
type v =
| Alice
| Bob of int
| Charlie of (int * int64)
and s = {
foo: string;
bar: int64;
xyz: v;
} and x = {
first: s;
second: s;
third: int;
} with orm
open OUnit
open Test_utils
let name = "foreign_and_variant.db"
let v = Charlie (1002,1003L)
let s = { foo="s1"... | null | https://raw.githubusercontent.com/avsm/ocaml-orm-sqlite/0c41dee6e254abd75706edcb785f657bfe55d08b/lib_test/foreign_and_variant.ml | ocaml | TYPE_CONV_PATH "Foreign_and_variant"
type v =
| Alice
| Bob of int
| Charlie of (int * int64)
and s = {
foo: string;
bar: int64;
xyz: v;
} and x = {
first: s;
second: s;
third: int;
} with orm
open OUnit
open Test_utils
let name = "foreign_and_variant.db"
let v = Charlie (1002,1003L)
let s = { foo="s1"... | |
673a0e055513cffe17326a2f776131c891f362ffaf6310f0cbc0552ae8eb8aed | aistrate/Okasaki | Ex03_04_Test.hs | import Test.HUnit
import Test.QuickCheck
import Data.List (sort)
import Text.Printf (printf)
import TestHelper
import Ex03_04
import Ex03_04_c
main = do printTime $ runTestTT hunitTests
printTime $ mapM_ (\(s,a) -> printf "%-25s: " s >> a) qcheckTests
hunitTests = TestList [
"insert/findMin" ~:
[
f... | null | https://raw.githubusercontent.com/aistrate/Okasaki/cc1473c81d053483bb5e327409346da7fda10fb4/MyCode/Ch03/Ex03_04_Test.hs | haskell | import Test.HUnit
import Test.QuickCheck
import Data.List (sort)
import Text.Printf (printf)
import TestHelper
import Ex03_04
import Ex03_04_c
main = do printTime $ runTestTT hunitTests
printTime $ mapM_ (\(s,a) -> printf "%-25s: " s >> a) qcheckTests
hunitTests = TestList [
"insert/findMin" ~:
[
f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.