_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
47dc8f39835e0df5f8d01ad7f3a2c878986560f93abbee5c83ab7dc0f00bc751
xmonad/xmonad-contrib
ConstrainedResize.hs
----------------------------------------------------------------------------- -- | Module : XMonad . Actions . ConstrainedResize -- Description : Constrain the aspect ratio of a floating window. Copyright : ( c ) -- License : BSD3-style (see LICENSE) -- -- Maintainer : <> -- Stability : st...
null
https://raw.githubusercontent.com/xmonad/xmonad-contrib/28aa164abd853a237e409d0fbb9f3819f253cf56/XMonad/Actions/ConstrainedResize.hs
haskell
--------------------------------------------------------------------------- | Description : Constrain the aspect ratio of a floating window. License : BSD3-style (see LICENSE) Maintainer : <> Stability : stable Portability : unportable Lets you constrain the aspect ratio of a floating window (by, ...
Module : XMonad . Actions . ConstrainedResize Copyright : ( c ) module XMonad.Actions.ConstrainedResize ( XMonad.Actions.ConstrainedResize.mouseResizeWindow ) where import XMonad > import qualified XMonad . Actions . ConstrainedResize as > , ( ( modm , button3 ) , ...
b6e80ef965eec286ed295014189f33d7ad132d1cfbd135a71def640f5663a1c8
ocurrent/ocaml-multicore-ci
dune_build_cache.ml
let safe_char = function | 'A' .. 'Z' | 'a' .. 'z' | '0' .. '9' | '-' | '_' -> true | _ -> false let check_safe s = if not (Astring.String.for_all safe_char s) then Fmt.failwith "Unsafe characters in %S" s let for_owner_name owner name = check_safe owner; check_safe name; let name = Printf.sprintf "du...
null
https://raw.githubusercontent.com/ocurrent/ocaml-multicore-ci/d46eecaf7269283a4b95ee40d2a9d6c7ec34a7bf/lib/dune_build_cache.ml
ocaml
let safe_char = function | 'A' .. 'Z' | 'a' .. 'z' | '0' .. '9' | '-' | '_' -> true | _ -> false let check_safe s = if not (Astring.String.for_all safe_char s) then Fmt.failwith "Unsafe characters in %S" s let for_owner_name owner name = check_safe owner; check_safe name; let name = Printf.sprintf "du...
0fcb020876d953e8747b053199d291f88717322c6ca4d2599f3ef62d7e46bb3a
brendanhay/semver
Delimited.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # -- | -- Module : Data.SemVer.Delimited Copyright : ( c ) 2014 - 2020 < > License : This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . A copy of the MPL can be found in...
null
https://raw.githubusercontent.com/brendanhay/semver/7bc42dd298e0d98e119486ceab4f74042d46b004/lib/Data/SemVer/Delimited.hs
haskell
# LANGUAGE OverloadedStrings # | Module : Data.SemVer.Delimited you can obtain it at /. Stability : experimental A set of delimiters can be used to encode/decode a 'Version' and specify alternative serialisation strategies. Lenses can be used to modify the default delimiter set, as in the ...
# LANGUAGE RecordWildCards # Copyright : ( c ) 2014 - 2020 < > License : This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . A copy of the MPL can be found in the LICENSE file or Maintainer : < > Portability : non - portable ( G...
2aed529ee37111e2b32f33421d643b0efbb922b65a87d3aea7898b72baa9871d
mbj/stratosphere
ContactTargetInfoProperty.hs
module Stratosphere.SSMContacts.Contact.ContactTargetInfoProperty ( ContactTargetInfoProperty(..), mkContactTargetInfoProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere....
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/ssmcontacts/gen/Stratosphere/SSMContacts/Contact/ContactTargetInfoProperty.hs
haskell
module Stratosphere.SSMContacts.Contact.ContactTargetInfoProperty ( ContactTargetInfoProperty(..), mkContactTargetInfoProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere....
9f7429feee55ca70749978db589ec7cc72dd27428f8d6550843cfe01ec48ef53
jacquev6/JsOfOCairo
CairoMock.cppo.mli
Copyright 2017 - 2018 < > module type S = sig #include "S.incl.mli" end module Mock: sig include S val create: unit -> context end module Decorate(C: S): sig include S val create: C.context -> context val calls: context -> string list end include S val create: unit -> context val calls: contex...
null
https://raw.githubusercontent.com/jacquev6/JsOfOCairo/a00a31000b1a7cabe6ac74e48e86b52ec4699cff/src/CairoMock.cppo.mli
ocaml
Copyright 2017 - 2018 < > module type S = sig #include "S.incl.mli" end module Mock: sig include S val create: unit -> context end module Decorate(C: S): sig include S val create: C.context -> context val calls: context -> string list end include S val create: unit -> context val calls: contex...
7ddba15f69a9e5187789d31d40b923d131d52dccb7a5a429009a26ab9ee1c27f
kind2-mc/kind2
stringSExpr.mli
This file is part of the Kind 2 model checker . Copyright ( c ) 2014 by the Board of Trustees of the University of Iowa 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 a...
null
https://raw.githubusercontent.com/kind2-mc/kind2/c601470eb68af9bd3b88828b04dbcdbd6bd6bbf5/src/utils/SExpr/stringSExpr.mli
ocaml
* Define the type of the result from the functor application * Include the module here to avoid having to write [StringSExpr.StringSExpr] Local Variables: indent-tabs-mode: nil End:
This file is part of the Kind 2 model checker . Copyright ( c ) 2014 by the Board of Trustees of the University of Iowa 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 a...
62fbc7537f6186ef0091e3d9536446e9de5e1a2af7150c9792f945bcca1cc673
cyverse-archive/DiscoveryEnvironmentBackend
project.clj
(defproject org.iplantc/common-cfg "5.0.0" :description "DE services code for managing configurations." :url "/" :license {:name "BSD"} :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/tools.logging "0.3.1"] [com.fasterxml.jackson.core/jackson-core "2.5.1"] ...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/libs/common-cfg/project.clj
clojure
(defproject org.iplantc/common-cfg "5.0.0" :description "DE services code for managing configurations." :url "/" :license {:name "BSD"} :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/tools.logging "0.3.1"] [com.fasterxml.jackson.core/jackson-core "2.5.1"] ...
667295476255a1398ca648e9d84f644b13e04b723d25af36cea1bd2be2a8606e
ocaml-multicore/tezos
sc_rollup_arith.mli
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs < > (* ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/sc_rollup_arith.mli
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...
01fcc32f583d2bd429b7047bf262ad8394c5897c00b9a578d211359dafa0b48a
clojure-interop/java-jdk
Option.clj
(ns javax.swing.text.html.Option "Value for the ListModel used to represent <option> elements. This is the object installed as items of the DefaultComboBoxModel used to represent the <select> element. Warning: Serialized objects of this class will not be compatible with future Swing releases. The curren...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/text/html/Option.clj
clojure
(ns javax.swing.text.html.Option "Value for the ListModel used to represent <option> elements. This is the object installed as items of the DefaultComboBoxModel used to represent the <select> element. Warning: Serialized objects of this class will not be compatible with future Swing releases. The curren...
8befe1132e3c1338f1827cc7095b2672adec82899ded1e93bfd55dde70bfaa74
elldritch/hipsterfy
Main.hs
module Main (main) where import Control.Concurrent (getNumCapabilities) import Control.Concurrent.Async (async, wait) import Hipsterfy.Application (Config (..), Faktory (..), makeFaktory, makePostgres, makeZipkin, runAsContainer) import Hipsterfy.Internal.OrphanInstances () import Hipsterfy.Jobs.UpdateArtist (handleUp...
null
https://raw.githubusercontent.com/elldritch/hipsterfy/7d455697c1146d89fc6b2f78effe6694efe69120/cmd/hipsterfy-worker/Main.hs
haskell
module Main (main) where import Control.Concurrent (getNumCapabilities) import Control.Concurrent.Async (async, wait) import Hipsterfy.Application (Config (..), Faktory (..), makeFaktory, makePostgres, makeZipkin, runAsContainer) import Hipsterfy.Internal.OrphanInstances () import Hipsterfy.Jobs.UpdateArtist (handleUp...
c002343e2289e98ebd5a4ee8f7d106cafe5c0b2ad0b812d88492e7fb65fafead
coq/coq
genlambda.ml
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/1bacca2d42c3bab2c6826bd8cb50dd1805b310ea/kernel/genlambda.ml
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
82ce05bba61ed60cfe4159002ec980cb0882e15cb0ff246a14f55c514aad16ea
exercism/babashka
project.clj
(defproject bob "0.1.0-SNAPSHOT" :description "bob exercise." :url "" :dependencies [[org.clojure/clojure "1.10.0"]])
null
https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/practice/bob/project.clj
clojure
(defproject bob "0.1.0-SNAPSHOT" :description "bob exercise." :url "" :dependencies [[org.clojure/clojure "1.10.0"]])
95e3659a2cb5f8ab3196320463682653918e8e6f1118bb9e1beb6d43144a0708
arcadia-unity/ArcadiaGodot
sequences.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/arcadia-unity/ArcadiaGodot/d9881c8132c46f21efde4eb4eb9a534d808cdb20/Clojure/clojure/test_clojure/sequences.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . Contributors : (ns clojure.test-clojure.sequences (:require [clojure.test :refer :all] [clojure.test.check.generators :as gen] [clojure.test.check.properties :as prop] [clojure.test.check.clojure-test :refer (defspec)]) (:import...
449ca9629ea66e15ab6d5fe707a35a90afd97fdd737ef36f0dd754b499a117a0
WorksHub/client
reload.cljs
(ns wh.common.fx.reload (:require [re-frame.core :refer [reg-fx]])) (defn reload-effect [reload?] (when reload? (.reload js/location))) (reg-fx :reload reload-effect)
null
https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/client/src/wh/common/fx/reload.cljs
clojure
(ns wh.common.fx.reload (:require [re-frame.core :refer [reg-fx]])) (defn reload-effect [reload?] (when reload? (.reload js/location))) (reg-fx :reload reload-effect)
a8814cc8b870a5971198682c0e9967317b447c5d55e51f53e557b2755b19e09a
jyh/metaprl
proof_term_boot.ml
* This module provide conversion between proofs and terms . * We use a bi - directional memo . * * ---------------------------------------------------------------- * * This file is part of MetaPRL , a modular , higher order * logical framework that provides a logical programming * environment fo...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/tactics/proof/proof_term_boot.ml
ocaml
*********************************************************************** * TERM CONVERSION * *********************************************************************** * Term operations. * Make a term with a string parameter. * Versions o...
* This module provide conversion between proofs and terms . * We use a bi - directional memo . * * ---------------------------------------------------------------- * * This file is part of MetaPRL , a modular , higher order * logical framework that provides a logical programming * environment fo...
fb086de4009d95e16b090ff2d37c2cb2e010fd0b48585a8a65b08d3def213860
well-typed-lightbulbs/ocaml-esp32
simplify_boxed_integer_ops_intf.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/middle_end/flambda/simplify_boxed_integer_ops_intf.mli
ocaml
************************************************************************ OCaml ...
, OCamlPro and , Copyright 2014 - -2016 Jane Street Group LLC the GNU Lesser General Public License version 2.1 , with the [@@@ocaml.warning "+a-4-9-30-40-41-42"] module type S = sig type ...
c63ce20b00f698fad10ebbd02ea019ba34a4b862bb34ecd414cad3216ca625f6
hidaris/thinking-dumps
2-19.rkt
#lang eopl Bintree : = ( ) | ( ) number->bintree : Int - > ( ) (define number->bintree (lambda (n) (list n '() '()))) insert - to - right : (define insert-to-right (lambda (n bt) (list (list-ref bt 0) (list-ref bt 1) (let ((node-right (list-ref bt 2))) (i...
null
https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/eopl-solutions/chap2/2-19.rkt
racket
current-element : bintree -> Int
#lang eopl Bintree : = ( ) | ( ) number->bintree : Int - > ( ) (define number->bintree (lambda (n) (list n '() '()))) insert - to - right : (define insert-to-right (lambda (n bt) (list (list-ref bt 0) (list-ref bt 1) (let ((node-right (list-ref bt 2))) (i...
3efd3d675a5194378b35b3e95358c9cfe50681f1b9e16f17ff18d5e2cf371e76
VinylRecords/Vinyl
XRec.hs
# LANGUAGE DefaultSignatures # # LANGUAGE TypeApplications # # LANGUAGE FlexibleContexts # # LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE RankNTypes #-} # LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PatternSynonyms #...
null
https://raw.githubusercontent.com/VinylRecords/Vinyl/43aa1ae22f98dd5a71e94f8275684f19a05af03b/Data/Vinyl/XRec.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE GADTs # | A variant of 'Rec' whose values have eliminated common syntactic constructors. A common pain point with using 'Rec' is the mandatory /context/ of constructors are a nuisance, so we offer a way of avoiding them: are provided for converting between 'XRec' and 'Rec' so th...
# LANGUAGE DefaultSignatures # # LANGUAGE TypeApplications # # LANGUAGE FlexibleContexts # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PatternSynonyms # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariab...
b8deb9aeee846d6768560e98647430cd224ed05fc0da25029739f0f79e999cf1
erlangonrails/devdb
lib_misc_test.erl
-include_lib("eunit/include/eunit.hrl"). pmap_test() -> L = [0, 1, 2], ?assertEqual([0,1], pmap(fun(N) -> timer:sleep(N), N end, L, 2)). pmap_1_test() -> L = [0], ?assertEqual([0], pmap(fun(N) -> N end, L, 1)). reverse_bits_test() -> 3869426816 = reverse_bits(19088743), ...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/dynomite-0.6.0/etest/lib_misc_test.erl
erlang
hash_throughput_test_() -> Keys = lists:map(fun(N) -> end, lists:seq(1,1000)), FNVStart = now_float(), lists:foreach(fun(Key) -> fnv(Key) end, Keys), FNVEnd = now_float(), ?debugFmt("fnv took ~ps~n", [FNVEnd - FNVStart]), MStart = now_float(), lists:foreach(fun...
-include_lib("eunit/include/eunit.hrl"). pmap_test() -> L = [0, 1, 2], ?assertEqual([0,1], pmap(fun(N) -> timer:sleep(N), N end, L, 2)). pmap_1_test() -> L = [0], ?assertEqual([0], pmap(fun(N) -> N end, L, 1)). reverse_bits_test() -> 3869426816 = reverse_bits(19088743), ...
03785e95480399856d020920050dedb20bce5f602b106a7eccb0d54794b44d32
realworldocaml/book
memoize_tests.ml
open Stdune open Memo.O module Caml_lazy = Lazy open Dune_tests_common module Scheduler = struct let t = Test_scheduler.create () let yield () = Test_scheduler.yield t let run f = Test_scheduler.run t f end let () = init () let printf = Printf.printf let () = Memo.Perf_counters.enable () let () = Memo.Debu...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/test/expect-tests/memo/memoize_tests.ml
ocaml
to run a computation the trivial dependencies are simply the identity function compute the dependencies once so they are present in the global hash table define a counter so we can track how often our computation has been run Here we hide the optional argument [cutoff] of [Memo.Lazy.create]. Tests for depend...
open Stdune open Memo.O module Caml_lazy = Lazy open Dune_tests_common module Scheduler = struct let t = Test_scheduler.create () let yield () = Test_scheduler.yield t let run f = Test_scheduler.run t f end let () = init () let printf = Printf.printf let () = Memo.Perf_counters.enable () let () = Memo.Debu...
16b74168905115f286381a5688c3a63c66188078e9b2af175662629893b3815a
donaldsonjw/bigloo
walk.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / comptime / Trace / walk.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Trace/walk.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * The introduction of trace in debugging mode. */ *===========================...
* serrano / prgm / project / bigloo / comptime / Trace / walk.scm * / * Author : * / * Creation : Thu Apr 13 13:53:58 1995 * / * Last change : Mon Nov 11 10:33:55 2013 ( serrano ) * / * Copy...
d9f3a98c90648115df7f33b9fab2849223706f6d231244d3add57913c5ddb576
expipiplus1/vulkan
XR_KHR_android_surface_swapchain.hs
{-# language CPP #-} -- | = Name -- -- XR_KHR_android_surface_swapchain - instance extension -- -- = Specification -- -- See -- <#XR_KHR_android_surface_swapchain XR_KHR_android_surface_swapchain> -- in the main specification for complete information. -- -- = Registered Extension Number -- 5 -- -- = Revision -- 4 ...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/openxr/src/OpenXR/Extensions/XR_KHR_android_surface_swapchain.hs
haskell
# language CPP # | = Name XR_KHR_android_surface_swapchain - instance extension = Specification See <#XR_KHR_android_surface_swapchain XR_KHR_android_surface_swapchain> in the main specification for complete information. = Registered Extension Number = Revision = Extension and Version Dependencies ...
5 4 - Requires OpenXR 1.0 module OpenXR.Extensions.XR_KHR_android_surface_swapchain ( createSwapchainAndroidSurfaceKHR , withSwapchainAndroidSurfaceKHR , KHR_android_surface_swapchain_SPEC_VER...
8b7f9845cdf243f2b3f96c97e6f83ccfd2cf9b4c5e48e7735c47428a15425f7d
janestreet/ppx_sexp_conv
expand_sexp_of.ml
open! Base open! Ppxlib open Ast_builder.Default open Helpers open Lifted.Monad_infix (* Generates the signature for type conversion to S-expressions *) module Sig_generate_sexp_of = struct let type_of_sexp_of ~loc t = let loc = { loc with loc_ghost = true } in [%type: [%t t] -> Sexplib0.Sexp.t] ;; let ...
null
https://raw.githubusercontent.com/janestreet/ppx_sexp_conv/d9f92275eaff71fd721f7902756e621c22e6d118/expander/expand_sexp_of.ml
ocaml
Generates the signature for type conversion to S-expressions Conversion of types Conversion of tuples Conversion of variant types impossible? Polymorphic record fields Conversion of record types deliberately using whatever [sexp_of_list] is in scope deliberately using whatever [sexp_of_array] is in sco...
open! Base open! Ppxlib open Ast_builder.Default open Helpers open Lifted.Monad_infix module Sig_generate_sexp_of = struct let type_of_sexp_of ~loc t = let loc = { loc with loc_ghost = true } in [%type: [%t t] -> Sexplib0.Sexp.t] ;; let mk_type td = combinator_type_of_type_declaration td ~f:type_of_sexp...
c9a2625b5b2285ff92494d692fa4aafd7c9dde901aeb9394188332953ad60d10
gilith/hol-light
two_squares.ml
(* ========================================================================= *) Representation of primes = = 1 ( mod 4 ) as sum of 2 squares . (* ========================================================================= *) needs "Library/prime.ml";; prioritize_num();; (* ---------------------------...
null
https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/100/two_squares.ml
ocaml
========================================================================= ========================================================================= ------------------------------------------------------------------------- Definition of involution and various basic lemmas. ---------------...
Representation of primes = = 1 ( mod 4 ) as sum of 2 squares . needs "Library/prime.ml";; prioritize_num();; let involution = new_definition `involution f s = !x. x IN s ==> f(x) IN s /\ (f(f(x)) = x)`;; let INVOLUTION_IMAGE = prove (`!f s. involution f s ==> (IMAGE f s = s)`, REWRITE_TAC[in...
5977f1f19d0cc2a096e79c34c0a652b9b79a65e49a60c93db6bcdef5d1b5cc6e
40ants/html2text
core.lisp
(defpackage #:html2text/core (:nicknames #:html2text) (:use #:cl) (:shadow #:write) (:import-from #:alexandria #:last-elt #:ensure-list #:make-keyword) (:import-from #:plump) (:import-from #:log4cl) (:export #:foo #:bar #:html2text ...
null
https://raw.githubusercontent.com/40ants/html2text/b5620fdd435df5254a713f3c10bd756632df3dce/src/core.lisp
lisp
It should be bound to :ul or :ol depending on the context. This variable will contain a sequential number for the nest <li> item when rendering :ol list. We need to indicate that something was written to be able to put spaces between inline elements. inline element can be preceded by a block after which we need...
(defpackage #:html2text/core (:nicknames #:html2text) (:use #:cl) (:shadow #:write) (:import-from #:alexandria #:last-elt #:ensure-list #:make-keyword) (:import-from #:plump) (:import-from #:log4cl) (:export #:foo #:bar #:html2text ...
8206602f80d71eccaa3b481095c12eef0a3fb3f8b8bcb6c6c3b6e3d4fa5f5b03
xapi-project/xen-api
xapi_cluster_helpers.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/xen-api/fa6f118fb512a2c90159368a1a0bc1cc730c895b/ocaml/xapi/xapi_cluster_helpers.ml
ocaml
* check if [op] can be done while [current_ops] are already in progress. for now, disallow all concurrent operations if other operations are in progress, check that the new operation is allowed concurrently with them * Add to the cluster's current_operations, call a function and then remove from the current ope...
* 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...
eba379fa4dbffcb18dd631ef015a62ffc5b10ef25fdce085c40fd83a610fb094
arsalan0c/cdp-hs
EventBreakpoints.hs
{-# LANGUAGE OverloadedStrings, RecordWildCards, TupleSections #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE DeriveGeneric # # LANGUAGE TypeFamilies # | = EventBreakpoints EventBreakpoints permits setting breakpoi...
null
https://raw.githubusercontent.com/arsalan0c/cdp-hs/f946d706485b0dd16360a753321c46d6f098649d/src/CDP/Domains/EventBreakpoints.hs
haskell
# LANGUAGE OverloadedStrings, RecordWildCards, TupleSections # | Sets breakpoint on particular native event. | Instrumentation name to stop on. -- | Instrumentation name to stop on. | Removes breakpoint on particular native event. | Parameters of the 'EventBreakpoints.removeInstrumentationBreakpoint' command....
# LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE DeriveGeneric # # LANGUAGE TypeFamilies # | = EventBreakpoints EventBreakpoints permits setting breakpoints on particular operations and events in targets that run JavaS...
f94e7087cc1f3ff1505f36f1f42810baedd38d14b9e0c179bdc4a5ee62b92a4d
vernemq/vernemq
vmq_reg_sync.erl
Copyright 2018 Erlio GmbH Basel Switzerland ( ) %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, sof...
null
https://raw.githubusercontent.com/vernemq/vernemq/234d253250cb5371b97ebb588622076fdabc6a5f/apps/vmq_server/src/vmq_reg_sync.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright 2018 Erlio GmbH Basel Switzerland ( ) Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(vmq_reg_sync). -behaviour(gen_server). -export([ start_link/0, sync/3, sync/4, async/3, async/4, don...
04486d2f8ee8a7fea05f400228ae0b7692692f2c96c465b640309674ed5e8070
flosell/lambdacd
logic.cljs
(ns lambdacd.logic (:require-macros [cljs.core.async.macros :refer [go go-loop]]) (:require [lambdacd.utils :as utils] [cljs.core.async :as async] [re-frame.core :as re-frame] [lambdacd.db :as db] [lambdacd.api :as api])) (def poll-frequency 1000) (defn start-ticker...
null
https://raw.githubusercontent.com/flosell/lambdacd/e9ba3cebb2d5f0070a2e0e1e08fc85fc99ee7135/src/cljs/lambdacd/logic.cljs
clojure
(ns lambdacd.logic (:require-macros [cljs.core.async.macros :refer [go go-loop]]) (:require [lambdacd.utils :as utils] [cljs.core.async :as async] [re-frame.core :as re-frame] [lambdacd.db :as db] [lambdacd.api :as api])) (def poll-frequency 1000) (defn start-ticker...
cb1824f4cefa4f41109c0b992912b8f49b87f68b2ea3c157cb8168ed22a2aa99
johnwhitington/ocamli
d.ml
let rec pairs f a = function [] | [_] -> List.rev a | h::h'::t -> pairs f (f h h'::a) (h'::t) let x = (pairs ( + ) [] [1; 2; 3; 4] [@interpret])
null
https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/ocamli2/example/d.ml
ocaml
let rec pairs f a = function [] | [_] -> List.rev a | h::h'::t -> pairs f (f h h'::a) (h'::t) let x = (pairs ( + ) [] [1; 2; 3; 4] [@interpret])
347910dd2a7412f217e0a3bb6663f64c3de7ae3360084bcc5cd386e1f3aca7b5
jgm/skylighting
ANSI.hs
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE FlexibleInstances # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # module Skylighting.Format.ANSI ( formatANSI ) where import Data.D...
null
https://raw.githubusercontent.com/jgm/skylighting/16359a210ec43af308bd2cccea9595fa0c260404/skylighting-format-ansi/src/Skylighting/Format/ANSI.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveDataTypeable # ^ color support level ^ foreground ^ background ^ bold ^ italic ^ underlined FIXME: Not very widely supported in terminals grayscale colors “system” colors cannot actually fail cannot actually fail | Warning: this conversion is extremely approxi...
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE CPP # # LANGUAGE FlexibleInstances # # LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # module Skylighting.Format.ANSI ( formatANSI ) where import Data.Data import GHC.Generics import Data.Int import Data.Word import Data.Bi...
5353df6710734cca4cd4689bfdb00b23ded78f9173ce8bbab9c7eba53f5230aa
pmatos/racket-binaryen
functions.rkt
#lang racket/base ;; --------------------------------------------------------------------------------------------------- (require "private/binaryen-ffi.rkt" "private/functions.rkt" "private/types.rkt" "expressions.rkt" "modules.rkt" racket/contract) (provide module-add-fu...
null
https://raw.githubusercontent.com/pmatos/racket-binaryen/bc8956d837e0cae4945caa33a8d9a9480f8ad66e/functions.rkt
racket
--------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
#lang racket/base (require "private/binaryen-ffi.rkt" "private/functions.rkt" "private/types.rkt" "expressions.rkt" "modules.rkt" racket/contract) (provide module-add-function module-function-count function-name function-parameter-types function-result-types function...
dacc37c2a053267a2a2be980d89e227f842cf788d4b8efd35f0c126be33eef2a
degree9/uikit-hl
tab.cljs
(ns uikit-hl.tab (:require [hoplon.core :as hl] [uikit-hl.core :as core])) (def ^:dynamic *uk-tab* "") (def ^:dynamic *bottom* nil) (def ^:dynamic *active* nil) (def ^:dynamic *disabled* nil) (def ^:dynamic *title* nil) (def ^:dynamic *href* nil) (defmethod hl/do! :uk-tab [elem _ v] (.tab js/UIk...
null
https://raw.githubusercontent.com/degree9/uikit-hl/b226b1429ea50f8e9a6c1d12c082a3be504dda33/docs/docs.html.out/uikit_hl/tab.cljs
clojure
(ns uikit-hl.tab (:require [hoplon.core :as hl] [uikit-hl.core :as core])) (def ^:dynamic *uk-tab* "") (def ^:dynamic *bottom* nil) (def ^:dynamic *active* nil) (def ^:dynamic *disabled* nil) (def ^:dynamic *title* nil) (def ^:dynamic *href* nil) (defmethod hl/do! :uk-tab [elem _ v] (.tab js/UIk...
bfa6380458f906cfca5d0f1805846fcc38ed0e4cb493281cda3884f932861bf5
default-kramer/plisqin
racket.rkt
#lang racket ; Provide everything from racket except identifiers that clash with plisqin. (define-for-syntax plisqin-conflicts (list "group-by" "count" "min" "max" "second" "case" "null" "round" "this")) (require racket/provide) (provide (filtered-out (λ(name) (if (member name plisqin-conflicts) ...
null
https://raw.githubusercontent.com/default-kramer/plisqin/26421c7c42656c873c4e0a4fc7f48c0a3ed7770f/plisqin-doc/scribblings/racket.rkt
racket
Provide everything from racket except identifiers that clash with plisqin.
#lang racket (define-for-syntax plisqin-conflicts (list "group-by" "count" "min" "max" "second" "case" "null" "round" "this")) (require racket/provide) (provide (filtered-out (λ(name) (if (member name plisqin-conflicts) #f name)) (all-from-out racket)...
9585d811c2cb3b4dddaa3bb6705c825046b374d8a04f2d14b5f865f6fa7a6573
ideas-edu/ideas
JSON.hs
----------------------------------------------------------------------------- Copyright 2019 , Ideas project team . This file is distributed under the terms of the Apache License 2.0 . For more information , see the files " LICENSE.txt " and " NOTICE.txt " , which are included in the distribution . -------...
null
https://raw.githubusercontent.com/ideas-edu/ideas/f84907f92a8c407b7313f99e65a08d2646dc1565/src/Ideas/Text/JSON.hs
haskell
--------------------------------------------------------------------------- --------------------------------------------------------------------------- | Maintainer : Stability : provisional Support for JavaScript Object Notation (JSON) and remote procedure calls using ------------------------------...
Copyright 2019 , Ideas project team . This file is distributed under the terms of the Apache License 2.0 . For more information , see the files " LICENSE.txt " and " NOTICE.txt " , which are included in the distribution . Portability : portable ( depends on ghc ) JSON . JSON is a lightweight alterna...
b0f993a35dbd48991cf7c9d4f1f7ca86fce6c4414239520ea0bc2add874abfde
froggey/Mezzano
blit-generic.lisp
;;;; Architecture-independent surface blitting and filling functions. (in-package :mezzano.gui) ;; Line traversal functions. (defun %bitblt-line (blender to to-offset ncols from from-offset) (declare (type (simple-array mezzano.gui:colour (*)) to from) (type fixnum ncols to-offset from-offset) ...
null
https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/gui/blit-generic.lisp
lisp
Architecture-independent surface blitting and filling functions. Line traversal functions. Final blending functions. Alpha-blend PIXEL into DEST. GL_FUNC_ADD src = GL_ONE dst = GL_ONE_MINUS_SRC_ALPHA Fully transparent, do nothing. Fully opaque, just write.
(in-package :mezzano.gui) (defun %bitblt-line (blender to to-offset ncols from from-offset) (declare (type (simple-array mezzano.gui:colour (*)) to from) (type fixnum ncols to-offset from-offset) (type function blender) (optimize speed (safety 0))) (loop for i fixnum below n...
d1c53fb50ac1ee04756fb2ef78dcd03172bd52617a4daeece82c5bca73713ca2
ghc/testsuite
T1634.hs
{-# LANGUAGE RankNTypes #-} module T1634 where t1 :: a -> (forall b. b -> (a,b)) t1 = (,)
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_compile/T1634.hs
haskell
# LANGUAGE RankNTypes #
module T1634 where t1 :: a -> (forall b. b -> (a,b)) t1 = (,)
b69f4ec02f1beea2a4c55e9729806cfa4cef20bbdecc644b821d32d31df320f0
sondresl/AdventOfCode
25.hs
import Data.List.Extra import qualified Data.IntMap.Strict as IM data State = A | B | C | D | E | F deriving (Eq, Show) data TM = TM { _tape :: IM.IntMap Int , _cursor :: Int , _state :: State } deriving Show run :: TM -> TM run m@(TM tape cursor state) = l...
null
https://raw.githubusercontent.com/sondresl/AdventOfCode/a460af1866077639e0c58947354d750d1b96975c/2017/Haskell/25.hs
haskell
import Data.List.Extra import qualified Data.IntMap.Strict as IM data State = A | B | C | D | E | F deriving (Eq, Show) data TM = TM { _tape :: IM.IntMap Int , _cursor :: Int , _state :: State } deriving Show run :: TM -> TM run m@(TM tape cursor state) = l...
5a147573887a1794b49c65bbe4554a2ede12ac810247f89c2fe8a223b1a0140c
BranchTaken/Hemlock
test_round.ml
open! Basis.Rudiments open! Basis open Real let test () = let rec fn ts = begin match ts with | [] -> () | t :: ts' -> begin File.Fmt.stdout |> Fmt.fmt "round " |> fmt ~alt:true ~radix:Radix.Hex t |> Fmt.fmt " -> (Down: " |> fmt ~alt:true ~radix:Radix.Hex (round ~d...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/real/test_round.ml
ocaml
open! Basis.Rudiments open! Basis open Real let test () = let rec fn ts = begin match ts with | [] -> () | t :: ts' -> begin File.Fmt.stdout |> Fmt.fmt "round " |> fmt ~alt:true ~radix:Radix.Hex t |> Fmt.fmt " -> (Down: " |> fmt ~alt:true ~radix:Radix.Hex (round ~d...
892c60148a7aa625c66d33cebe346c240a43bc9a77f03dbba7ad38745c9c5b9b
hasktorch/ffi-experimental
BackwardSpec.hs
# LANGUAGE ScopedTypeVariables # {-# LANGUAGE BangPatterns #-} # LANGUAGE DataKinds # This test does the same test as deps / pytorch / aten / src / ATen / test / basic.cpp module BackwardSpec (spec) where import Test.Hspec import Control.Exception.Safe import qualified Language.C.Inline.Cpp.Exceptions as C import ...
null
https://raw.githubusercontent.com/hasktorch/ffi-experimental/54192297742221c4d50398586ba8d187451f9ee0/ffi/test/BackwardSpec.hs
haskell
# LANGUAGE BangPatterns # auto c = a + b; c.backward(); std::cout << a << std::endl << b << std::endl << c << std::endl;
# LANGUAGE ScopedTypeVariables # # LANGUAGE DataKinds # This test does the same test as deps / pytorch / aten / src / ATen / test / basic.cpp module BackwardSpec (spec) where import Test.Hspec import Control.Exception.Safe import qualified Language.C.Inline.Cpp.Exceptions as C import Control.Monad (forM_,forM,join...
7b9cb5dba9edd72a438dcd9cf01ab5468f8a8fb383e4beb3906c561db579ffe2
spell-music/csound-expression
Chord.hs
-- | Shortcuts for common chords. module Csound.Sam.Chord ( chTrans, chRot, chMin, chMaj, chLead, chMaj7, chMin7, ch7, chLead7, atMaj, atMin, atMaj7, atMin7 ) where import Csound.Base(int, D) import Csound.Sam(Chord) -- | A major chord. chMaj :: Chord chMaj = [0, 4, 7] -- | A minor chord chMin :: Chord...
null
https://raw.githubusercontent.com/spell-music/csound-expression/29c1611172153347b16d0b6b133e4db61a7218d5/csound-sampler/src/Csound/Sam/Chord.hs
haskell
| Shortcuts for common chords. | A major chord. | A minor chord | A lead tone triad. | Rotates the chord.
module Csound.Sam.Chord ( chTrans, chRot, chMin, chMaj, chLead, chMaj7, chMin7, ch7, chLead7, atMaj, atMin, atMaj7, atMin7 ) where import Csound.Base(int, D) import Csound.Sam(Chord) chMaj :: Chord chMaj = [0, 4, 7] chMin :: Chord chMin = [0, 3, 7] chLead :: Chord chLead = [0, 3, 6] | A dominant ...
3609e405f69acd09440dd95542a41be90d1cb35ee1730b3ba64a25135529e09c
anwarmamat/cmsc330spring19-public
public.ml
open OUnit2 open SmallCTypes open P3.Eval open Utils open TestUtils let env1 = [("var1", Int_Val 4); ("var2", Bool_Val false)] let test_expr_basic ctxt = let i = 5 in assert_equal (Int_Val i) (eval_expr [] (Int i)); let i = (-10) in assert_equal (Int_Val i) (eval_expr [] (Int i)); assert_equal (Bool_Val true) (...
null
https://raw.githubusercontent.com/anwarmamat/cmsc330spring19-public/98af1e8efc3d8756972731eaca19e55fe8febb69/project3/test/public.ml
ocaml
Simple sequence
open OUnit2 open SmallCTypes open P3.Eval open Utils open TestUtils let env1 = [("var1", Int_Val 4); ("var2", Bool_Val false)] let test_expr_basic ctxt = let i = 5 in assert_equal (Int_Val i) (eval_expr [] (Int i)); let i = (-10) in assert_equal (Int_Val i) (eval_expr [] (Int i)); assert_equal (Bool_Val true) (...
5c88276bf2ec5d6bfb7f9096d768b2e42d252e434312985d47df9be7304a6c0b
komoot/clj-kinesis-worker
project.clj
(defproject de.komoot/clj-kinesis-worker "1.0.2" :author "Johannes Staffans" :description "Wrapper for the Amazon Kinesis Client library" :url "-kinesis-worker" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"] [com.amazonaws/a...
null
https://raw.githubusercontent.com/komoot/clj-kinesis-worker/40906f9c48beabf2301cdd16e40d5b24187949d7/project.clj
clojure
(defproject de.komoot/clj-kinesis-worker "1.0.2" :author "Johannes Staffans" :description "Wrapper for the Amazon Kinesis Client library" :url "-kinesis-worker" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"] [com.amazonaws/a...
1cd4fdaf5ffbec83ab3024f5c7a55527ab6a4269cc15b761f05a7fc282628f96
RyanGlScott/ghc-software-foundations
Tactics.hs
# LANGUAGE DataKinds # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module SF.LF.Tactics where import Data.Nat import Data.Singletons.TH (singletons) import Data.Type.Equality ((:~:)(..)) import Prelude.Singletons hiding (Length) import SF.LF.Basics import SF.LF.Induction im...
null
https://raw.githubusercontent.com/RyanGlScott/ghc-software-foundations/ce7b8958e0aed4fb2c8611d71e7e0f1a2ef83222/logical-foundations/src/SF/LF/Tactics.hs
haskell
l' :~: Rev (Rev l') -- TODO RGS splitCombineStatement ::
# LANGUAGE DataKinds # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module SF.LF.Tactics where import Data.Nat import Data.Singletons.TH (singletons) import Data.Type.Equality ((:~:)(..)) import Prelude.Singletons hiding (Length) import SF.LF.Basics import SF.LF.Induction im...
d87024728dc50436e048b4e5a7b57f91ede7762b05c5c0488ff576b9d25d90cb
coq/coq
vmlambda.ml
open Util open Names open Esubst open Declarations open Genlambda open Vmvalues type lambda = structured_values Genlambda.lambda (** Simplification of lambda expression *) (* TODO: make the VM and native agree *) let can_subst lam = match lam with | Lrel _ | Lvar _ | Lconst _ | Luint _ | Lval _ | Lsort _ | Lin...
null
https://raw.githubusercontent.com/coq/coq/0061fc71f158fcbb8c87f8285de49c995f2ad60c/kernel/vmlambda.ml
ocaml
* Simplification of lambda expression TODO: make the VM and native agree s Translation from [constr] to [lambda] Translation of constructor *******************************
open Util open Names open Esubst open Declarations open Genlambda open Vmvalues type lambda = structured_values Genlambda.lambda let can_subst lam = match lam with | Lrel _ | Lvar _ | Lconst _ | Luint _ | Lval _ | Lsort _ | Lind _ -> true | _ -> false let simplify subst lam = simplify can_subst subst lam ...
0fbe775c6ee27136a697e7dea38ebf8874789b615868ab1622f22a193960f66c
bhaskara/programmable-reinforcement-learning
stratagus-env-pkg.lisp
(defpackage stratagus-env (:documentation "Package stratagus-env (s-env). Defines <stratagus-env> class to communicate with a running instance of the stratagus game over a socket. Make specific stratagus domains by subclassing this. Exported symbols: Class ----- <stratagus-env> - class Env states -------...
null
https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/envs/stratagus/stratagus-env-pkg.lisp
lisp
BEGIN EXPORT FROM STRAT-CONSTANTS
(defpackage stratagus-env (:documentation "Package stratagus-env (s-env). Defines <stratagus-env> class to communicate with a running instance of the stratagus game over a socket. Make specific stratagus domains by subclassing this. Exported symbols: Class ----- <stratagus-env> - class Env states -------...
7a504636d332eabc00cb1cab7bca67684ffe58d866a43f75ec2d91c1a121bd8a
dyzsr/ocaml-selectml
local_store.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/utils/local_store.ml
ocaml
************************************************************************ OCaml ...
, Tarides , Tarides the GNU Lesser General Public License version 2.1 , with the type ref_and_reset = | Table : { ref: 'a ref; init: unit -> 'a } -> ref_and_reset | Ref : { ref: 'a ref; mutable ...
70898e1629e8da990d485c3f3b836e91093e7a3feb2dd964bdf6ec9e4d5024d7
naryl/cl-tui
1hw.lisp
(defpackage cl-tui.examples (:use :cl :cl-tui)) (in-package cl-tui.examples) (defun start () with - screen evaluates its body with ncurses 's initialized ;; screen. Almost nothing else (unless otherwise noted) works ;; outside of with-screen. (with-screen () ;; Put some text on the :root frame which is...
null
https://raw.githubusercontent.com/naryl/cl-tui/4e8a06f50c682fba48884e5a35a6d16101298c08/examples/1hw.lisp
lisp
screen. Almost nothing else (unless otherwise noted) works outside of with-screen. Put some text on the :root frame which is created automatically Commit drawing to terminal Nothing on screen will be changed until this call Wait for a keypress (input will be described in a latter example)
(defpackage cl-tui.examples (:use :cl :cl-tui)) (in-package cl-tui.examples) (defun start () with - screen evaluates its body with ncurses 's initialized (with-screen () (put-text :root 0 0 "Hello world!") (refresh) (read-key)))
c68e63761b032937702b81db4cef802bfb9e372dd461b4ca322a75bcd81f11d4
fpco/schoolofhaskell.com
TestImport.hs
{-# LANGUAGE OverloadedStrings #-} module TestImport ( module Yesod.Test , App (..) , runDB , statusIs ) where import ClassyPrelude import Control.Monad.Logger import Control.Monad.Trans.Resource import Data.Conduit.Pool (Pool) import Database.Persist.Sql hiding (LogFunc, runSqlPool, runSqlPersistM...
null
https://raw.githubusercontent.com/fpco/schoolofhaskell.com/15ec1a03cb9d593ee9c0d167dc522afe45ba4f8e/tests/TestImport.hs
haskell
# LANGUAGE OverloadedStrings #
module TestImport ( module Yesod.Test , App (..) , runDB , statusIs ) where import ClassyPrelude import Control.Monad.Logger import Control.Monad.Trans.Resource import Data.Conduit.Pool (Pool) import Database.Persist.Sql hiding (LogFunc, runSqlPool, runSqlPersistMPool) import Foundation hiding (run...
809ddcb052b0db52de3d970e3040bc2d3565ca5b24fcc111270ad043db858b26
Bannerets/camlproto
BasicRand.ml
open! Base include Random let () = init 2751212 let int128 ( ) = let cs = Cstruct.create_unsafe 16 in let = int64 9223372036854775807L in let rand2 = int64 9223372036854775807L in Cstruct . LE.set_uint64 cs 0 rand1 ; Cstruct . LE.set_uint64 cs 8 rand2 ; cs let int256 ( ) = let cs = C...
null
https://raw.githubusercontent.com/Bannerets/camlproto/0b31083b8c0103079ec2881176f63f8cb12abb73/src/math/BasicRand.ml
ocaml
open! Base include Random let () = init 2751212 let int128 ( ) = let cs = Cstruct.create_unsafe 16 in let = int64 9223372036854775807L in let rand2 = int64 9223372036854775807L in Cstruct . LE.set_uint64 cs 0 rand1 ; Cstruct . LE.set_uint64 cs 8 rand2 ; cs let int256 ( ) = let cs = C...
67ab4fd4fbe036d6a74a025e67ceb0d9e4d4789e352b6f37699e3efd1d9441be
donaldsonjw/bigloo
_env.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / api / fthread / src / Llib/_env.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/api/fthread/src/Llib/_env.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * The implementation of fair environments. */ *===========================...
* serrano / prgm / project / bigloo / api / fthread / src / Llib/_env.scm * / * Author : * / * Creation : We d Feb 13 14:38:14 2002 * / * Last change : Tue Nov 15 11:10:00 2011 ( serrano ) * / * C...
cd4c6a8d355cf9ccce7059219a332b3f6e945cadb7a8a07ca3933d6f30a5172c
jbclements/RSound
test-filter.rkt
#lang racket (module+ test (require "../rsound.rkt" "../util.rkt" "../filter.rkt" "../network.rkt" "../filter-typed.rkt" "../reverb.rkt" rackunit rackunit/text-ui racket/flonum) (define i (sqrt -1)) (define test-sig (simple-...
null
https://raw.githubusercontent.com/jbclements/RSound/4cffe9416dee8da24a0e748d919cfa070ebae947/rsound/test/test-filter.rkt
racket
there could be a *lot* of good tests here... fir-filter regression; check dynamic-lti vs fir-filter test ordering of terms in dynamic-lti-filter should be the identity on a dc signal (after a while) same test with lpf: OLD TESTS: FIR-FILTER IIR-FILTER filter?
#lang racket (module+ test (require "../rsound.rkt" "../util.rkt" "../filter.rkt" "../network.rkt" "../filter-typed.rkt" "../reverb.rkt" rackunit rackunit/text-ui racket/flonum) (define i (sqrt -1)) (define test-sig (simple-...
1bfaa87c8e5e35239cfc7910927f03bd2a17855467bd2f9eaaed1a9300687fdd
nuprl/gradual-typing-performance
info.rkt
#lang info the XML tool has been moved to the stepper collection , so that the ;; stepper can create xml snips. See collects/stepper/tool.rkt for (a ;; bit) more information (define tools '(("text-box-tool.rkt"))) (define tool-names '("Text Box"))
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/xml/info.rkt
racket
stepper can create xml snips. See collects/stepper/tool.rkt for (a bit) more information
#lang info the XML tool has been moved to the stepper collection , so that the (define tools '(("text-box-tool.rkt"))) (define tool-names '("Text Box"))
15dc20f9c4ff1ffddf36021bd53deeec2380a7d33d4ce132d0d590f63831b1b3
haskell-tools/haskell-tools
Refactor.hs
-- | Defines the API for refactorings module Language.Haskell.Tools.Refactor ( module X , Ann, HasSourceInfo(..), HasRange(..), annListElems, annListAnnot, annList, annJust, annMaybe, isAnnNothing, Domain, Dom, IdDom , shortShowSpan, shortShowSpanWithFile, SrcTemplateStage, SourceInfoTraversal(..) -- elements o...
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/refactor/Language/Haskell/Tools/Refactor.hs
haskell
| Defines the API for refactorings elements of source templates
module Language.Haskell.Tools.Refactor ( module X , Ann, HasSourceInfo(..), HasRange(..), annListElems, annListAnnot, annList, annJust, annMaybe, isAnnNothing, Domain, Dom, IdDom , shortShowSpan, shortShowSpanWithFile, SrcTemplateStage, SourceInfoTraversal(..) , SourceTemplateTextElem(..) , UnsupportedExtensi...
e891e4eefef6f0a2bfe4cd0d1f3707426431fa0bfb3b399de6f788db2b6c79c2
bmsherman/haskell-matlab
MArray.hs
| Safe MArray interface to " Foreign . Matlab . Array " . An instance of ' Data . Array . MArray . MArray ' for ' MXArray ' . Although array access can be done through this instance , arrays themselves must be created using ' mxMArray ' along with one of the " Foreign . Matlab . Array " create functions . ...
null
https://raw.githubusercontent.com/bmsherman/haskell-matlab/21cdb98a2bcf23c90eb31026063f4c3a2cf5da15/Foreign/Matlab/Array/MArray.hs
haskell
| Safe MArray interface to " Foreign . Matlab . Array " . An instance of ' Data . Array . MArray . MArray ' for ' MXArray ' . Although array access can be done through this instance , arrays themselves must be created using ' mxMArray ' along with one of the " Foreign . Matlab . Array " create functions . ...
22094c2b3318a6894337c9a2ec3db76ca5417b29188ed1daf39c19ac6a77ff43
fetburner/Coq2SML
coqide.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/ide/coqide.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * The arguments that will be passed ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * The CoqIde main module v...
fec7a816d9673c21ceef5722f434aacfa72c3fee446e9c7571c5d5ba8821bf59
ygrek/mldonkey
tcpServerSocket.ml
Copyright 2001 , 2002 b8_bavard , b8_fee_carabine , This file is part of mldonkey . mldonkey is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ...
null
https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/utils/net/tcpServerSocket.ml
ocaml
Unix.inet_addr_any
Copyright 2001 , 2002 b8_bavard , b8_fee_carabine , This file is part of mldonkey . mldonkey is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ...
58acfcfcd38b8e97109acc3a6f37e09364efb9334b6ca3258a17b15c16f9601b
ocaml-multicore/tezos
translator_workload.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs , < > (* ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_benchmarks_proto/translator_workload.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 A...
0474840c9baf5c9da31b33398e52d335ffeab494fc14db676e5a7910135b98aa
bhk/scam
math1-q.scm
(require "core.scm") (require "math0.scm" &private) (require "math0-q.scm" &private) (require "math1.scm" &private) ;;-------------------------------- Utilities ;;-------------------------------- (define (FP n) (u2fp (U n))) Construct an FP number from decimal without normalizing ;; (define (DFP exp m) (make...
null
https://raw.githubusercontent.com/bhk/scam/59d7c02e673f1faebd0b7625d8c595daaa5efc51/math1-q.scm
scheme
-------------------------------- -------------------------------- -------------------------------- Tests -------------------------------- non-digit fp-norm u2fp cond: (not (non-digit? u)) cond: (findstring "E" (subst "e" "E" u)) cond: (u-begins? "-0") cond: (findstring "." u) misc. disallow extraneous spaces...
(require "core.scm") (require "math0.scm" &private) (require "math0-q.scm" &private) (require "math1.scm" &private) Utilities (define (FP n) (u2fp (U n))) Construct an FP number from decimal without normalizing (define (DFP exp m) (make-fp (U exp) (or (findstring "-" m) "+") (UV (subst ...
b8cf873ae17fb2b49f33b42869132dfc423d9a12c238bccd8cac76f66713b101
runeksvendsen/restful-payment-channel-server
Payment.hs
# LANGUAGE DataKinds , LambdaCase , TypeOperators , OverloadedStrings , FlexibleInstances , MultiParamTypeClasses # module PayChanServer.API.Payment ( RBPCP , FundInfo , ChanOpen , ChanPay , ChanClose ) where import RBPCP.Api
null
https://raw.githubusercontent.com/runeksvendsen/restful-payment-channel-server/0fe65eadccad5ef2b840714623ec407e509ad00b/src/PayChanServer/API/Payment.hs
haskell
# LANGUAGE DataKinds , LambdaCase , TypeOperators , OverloadedStrings , FlexibleInstances , MultiParamTypeClasses # module PayChanServer.API.Payment ( RBPCP , FundInfo , ChanOpen , ChanPay , ChanClose ) where import RBPCP.Api
5484840dbc11677474eada10c685281e28dd895f61fb942d40af724bf0d03755
aiya000/haskell-examples
Main.hs
# LANGUAGE ViewPatterns # newtype TXT = TXT { naked :: String } deriving (Show) -- Basic size :: [a] -> Int size (length -> x) = x txt :: String -> TXT txt (TXT -> x) = x main :: IO () main = do print $ size [0..4] print $ txt "hi"
null
https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Language/Haskell/Extension/ViewPatterns/Main.hs
haskell
Basic
# LANGUAGE ViewPatterns # newtype TXT = TXT { naked :: String } deriving (Show) size :: [a] -> Int size (length -> x) = x txt :: String -> TXT txt (TXT -> x) = x main :: IO () main = do print $ size [0..4] print $ txt "hi"
f02f9f7468fe63fa58164d9d12098dac952cf6db445b61872bca1220ee57ed4e
obelix-site-builder/obelix
cli.cljs
(ns obelix.cli (:require [clojure.edn :as edn] [clojure.tools.cli :as cli] fs [obelix.core :as obelix] [obelix.logging :as logging] [obelix.server :as server] [obelix.watcher :as watcher] path [taoensso.timbre :as log] ...
null
https://raw.githubusercontent.com/obelix-site-builder/obelix/87f298cf4d6da49bdb0c9a0470ec80346f3879a3/src/obelix/cli.cljs
clojure
(ns obelix.cli (:require [clojure.edn :as edn] [clojure.tools.cli :as cli] fs [obelix.core :as obelix] [obelix.logging :as logging] [obelix.server :as server] [obelix.watcher :as watcher] path [taoensso.timbre :as log] ...
7cc4828edde3ff2586edd2d86400f580a1d702539bf90f83cb4e2cd7a7ed45e2
acorrenson/cqfd
lprop__Lprop.ml
type prop = | Atom of int | And of prop * prop | Or of prop * prop | Impl of prop * prop | Bot let rec infix_eqeq (x: prop) (y: prop) : bool = match (x, y) with | (Atom n, Atom m) -> n = m | (And (a, b), And (a', b')) -> infix_eqeq a a' && infix_eqeq b b' | (Or (a, b), Or (a', b')) -> infix_eqeq a a'...
null
https://raw.githubusercontent.com/acorrenson/cqfd/56b126afbe76915830ec594f0ce4017822c29f3d/src/lprop__Lprop.ml
ocaml
type prop = | Atom of int | And of prop * prop | Or of prop * prop | Impl of prop * prop | Bot let rec infix_eqeq (x: prop) (y: prop) : bool = match (x, y) with | (Atom n, Atom m) -> n = m | (And (a, b), And (a', b')) -> infix_eqeq a a' && infix_eqeq b b' | (Or (a, b), Or (a', b')) -> infix_eqeq a a'...
234919aa20c7ba6f652ba100946557bc87ea217de38393c6a23fb31f18ccf07c
racket/compatibility
cm-accomplice.rkt
#lang racket/base (require compiler/cm-accomplice) (provide (all-from-out compiler/cm-accomplice))
null
https://raw.githubusercontent.com/racket/compatibility/492030dac6f095045ce8a13dca75204dd5f34e32/compatibility-lib/mzlib/cm-accomplice.rkt
racket
#lang racket/base (require compiler/cm-accomplice) (provide (all-from-out compiler/cm-accomplice))
8aebfbb36ec8bf1aee170c9e4bc2b2de337990177468c09acc2f4f863fd0bd80
derektmueller/algorithms-in-haskell
PriorityQueueSpec.hs
module PriorityQueueSpec where import Test.QuickCheck import Test.Hspec import Heap import qualified PriorityQueue as PQ import Data.List (unfoldr) sorted :: Ord a => [a] -> Bool sorted [] = True sorted [x] = True sorted (x:y:xs) = x <= y && sorted xs describe_priority_queue = describe "PriorityQueue" $ do de...
null
https://raw.githubusercontent.com/derektmueller/algorithms-in-haskell/e6b8555d83d30f5b94d3c1c90865c8e881c96a0e/test/PriorityQueueSpec.hs
haskell
module PriorityQueueSpec where import Test.QuickCheck import Test.Hspec import Heap import qualified PriorityQueue as PQ import Data.List (unfoldr) sorted :: Ord a => [a] -> Bool sorted [] = True sorted [x] = True sorted (x:y:xs) = x <= y && sorted xs describe_priority_queue = describe "PriorityQueue" $ do de...
4b41ce4f4c50ceaacfca92f990f8fe480398d880842d7f7a2be32010e6d0f409
ngless-toolkit/ngless
Soap.hs
Copyright 2016 - 2019 NGLess Authors - License : MIT - License: MIT -} # LANGUAGE FlexibleContexts , RankNTypes # module StandardModules.Mappers.Soap ( hasValidIndex , createIndex , callMapper ) where import System.Process import System.IO import System.Exit import System.Directory import ...
null
https://raw.githubusercontent.com/ngless-toolkit/ngless/6522017c229fa3796d3abbee85547b76b6c4f41d/NGLess/StandardModules/Mappers/Soap.hs
haskell
We are going to create a thread which simply consumes input and feeds it soup2sam for both runs. This is possibly not the simplest way to achieve this goal, but without having a resumable sink, I do not see exactly how to get it all to work. stdout stderr stdout asSamHeader :: C.Conduit ByteLine IO B.ByteStrin...
Copyright 2016 - 2019 NGLess Authors - License : MIT - License: MIT -} # LANGUAGE FlexibleContexts , RankNTypes # module StandardModules.Mappers.Soap ( hasValidIndex , createIndex , callMapper ) where import System.Process import System.IO import System.Exit import System.Directory import ...
aecbf70dfbf4e6506215834ccdefd8906ae6cb08f438ed9c594bc94d5c70357d
robrix/sequoia
Applicative.hs
# LANGUAGE FunctionalDependencies # module Sequoia.Functor.Applicative * applicative comap , Contrapply(..) , Contrapplicative(..) ) where import Data.Functor.Contravariant import Sequoia.Profunctor.Exp applicative comap :: Contravariant f => (a' -> a) -> (f a -> f a') comap = contramap class Contravariant ...
null
https://raw.githubusercontent.com/robrix/sequoia/2851088bc763e6c8bad99152ab94b2cf7bf7c580/src/Sequoia/Functor/Applicative.hs
haskell
# LANGUAGE FunctionalDependencies # module Sequoia.Functor.Applicative * applicative comap , Contrapply(..) , Contrapplicative(..) ) where import Data.Functor.Contravariant import Sequoia.Profunctor.Exp applicative comap :: Contravariant f => (a' -> a) -> (f a -> f a') comap = contramap class Contravariant ...
66358e3dd146082374481f3587a2a171de51da65e779f58418b925e33023bc97
LaurentMazare/ocaml-arrow
ppx_arrow.mli
open Ppxlib val arrow : Deriving.t module Reader : sig val deriver : Deriving.t end module Writer : sig val deriver : Deriving.t end
null
https://raw.githubusercontent.com/LaurentMazare/ocaml-arrow/a88aa7b2761c6397cd59ba2d6487f8e5112d7e26/src/ppx/ppx_arrow.mli
ocaml
open Ppxlib val arrow : Deriving.t module Reader : sig val deriver : Deriving.t end module Writer : sig val deriver : Deriving.t end
3984d6743e1e011514498a09e004c80ef062aab2e9d2b83bfc5c26d3acd17eb0
shop-planner/shop3
at-package.lisp
;;;--------------------------------------------------------------------------- Copyright Smart Information Flow Technologies , d / b / a SIFT , LLC ;;; All rights reserved. ;;; ;;; SIFT PROPRIETARY ;;;--------------------------------------------------------------------------- ;;; File Description: ;;; ;;; Package ...
null
https://raw.githubusercontent.com/shop-planner/shop3/ae9496c058d9a340d2becbd9f2f732dae81396c5/shop3/tests/at-package.lisp
lisp
--------------------------------------------------------------------------- All rights reserved. SIFT PROPRIETARY --------------------------------------------------------------------------- File Description: Package declaration for misnamed arity-tests. History/Bugs/Notes: block comment added . ----------...
Copyright Smart Information Flow Technologies , d / b / a SIFT , LLC (in-package :common-lisp-user) (defpackage arity-test (:nicknames #:at #:arity-tests) (:use #:common-lisp #:shop3) (:export #:all-shop3-internal-tests) (:import-from #:alexandria #:set-equal) (:import-from #:fiveam #:def-f...
c38198533f9c2ef37f68ad893eef61b1a0751988b47f7ed8441965ad9731f5c1
nuprl/gradual-typing-performance
main.rkt
#lang racket/base (require glob gtp-summarize/render-lnm gtp-summarize/lnm-parameters pict racket/class racket/string (only-in racket/list range) ) (define (pict->png p path) (send (pict->bitmap p) save-file path 'png)) (define (main tag version) Sort & make figures of with 6 plots each or whatever...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/paper/piday-2016/data/main.rkt
racket
#lang racket/base (require glob gtp-summarize/render-lnm gtp-summarize/lnm-parameters pict racket/class racket/string (only-in racket/list range) ) (define (pict->png p path) (send (pict->bitmap p) save-file path 'png)) (define (main tag version) Sort & make figures of with 6 plots each or whatever...
b6bca8b6b6196be9ad5de834d5d8e9e21c1b064094bf5c4d392cd851d26e6dc0
ucsd-progsys/nate
plugin.ml
(***********************************************************************) (* ocamlbuild *) (* *) , , projet Gallium , INRIA Rocquencourt (* ...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/ocamlbuild/plugin.ml
ocaml
********************************************************************* ocamlbuild ...
, , projet Gallium , INRIA Rocquencourt Copyright 2007 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ I d : plugin.ml , v 1.1.4.2 2007/09/17 11:56:04 er...
d4fcb495f0c010d24e4b590a3ef916cc2bcf516ddc2f2d1b0d7edb89f9eedf72
simonjohnthompson/streams
lazy3.erl
-module(lazy3). -compile([export_all]). % Replaces the ETS table with a map that is threaded through all calls. % The state variable for the map is called a store. % Different representation of cons: head is eager, tail is suspended. % Also requires a different suspension, to which a state is passed. Macro for co...
null
https://raw.githubusercontent.com/simonjohnthompson/streams/acdd8199d3c62a20b0a55773237e964d1b8afc60/lazy3.erl
erlang
Replaces the ETS table with a map that is threaded through all calls. The state variable for the map is called a store. Different representation of cons: head is eager, tail is suspended. Also requires a different suspension, to which a state is passed. Value for the head Closure constructing the tail (and n...
-module(lazy3). -compile([export_all]). Macro for constructing a new cons cell . Takes -define(cons(X , F , Sto ) , begin Ref = next_ref(Sto ) , { { ref , Ref } , } end ) . -define(cons(X,F,Sto), begin {{ref,next_ref(Sto)}, Sto#{next_ref(Sto) => {...
d46d19b43ee129169f1be73d86d605516ac06ae68c78c063b87eae671d9d092f
jfacorro/fp-interpreter-in-lisp
packages.lisp
;---------------------------------------------------- (defpackage :com.facorro.debug (:use :common-lisp) (:export :*debugging-package?* :debugging? :debug-on :debug-off :debug-msg)) ;---------------------------------------------------- (defpackage :com.facorro.tree (:use :common-lisp ...
null
https://raw.githubusercontent.com/jfacorro/fp-interpreter-in-lisp/b0c520593e98cce83b571939a22d7efd7926c711/src/packages.lisp
lisp
---------------------------------------------------- ---------------------------------------------------- ---------------------------------------------------- ---------------------------------------------------- ---------------------------------------------------- --------------------------------------------------...
(defpackage :com.facorro.debug (:use :common-lisp) (:export :*debugging-package?* :debugging? :debug-on :debug-off :debug-msg)) (defpackage :com.facorro.tree (:use :common-lisp :com.facorro.debug) (:export :make-node :children :datum :add-child)) (defpackage :com.facorro....
b26b7a5397137c2b9cec2d6f3ef148ba4af8765c46b3bb510d83dc7c9242b34a
RefactoringTools/wrangler
wls_code_lens_form_exit.erl
-module(wls_code_lens_form_exit). -behaviour(wls_code_lens). -export([command/3 ,pois/1 ]). -spec command(els_dt_document:item(), els_core:poi(), els_code_lens:state()) -> els_command:command(). command(Document, _POI, _State) -> Title = title(), #{uri := Uri} = Document, Argum...
null
https://raw.githubusercontent.com/RefactoringTools/wrangler/7f4c120e4bf06a39d8762caa60b4c88ef03086b0/src/wls/wls_code_lens_form_exit.erl
erlang
-module(wls_code_lens_form_exit). -behaviour(wls_code_lens). -export([command/3 ,pois/1 ]). -spec command(els_dt_document:item(), els_core:poi(), els_code_lens:state()) -> els_command:command(). command(Document, _POI, _State) -> Title = title(), #{uri := Uri} = Document, Argum...
297b1988c90c99f64a74deecb82abbc08fc5185d2d55ebeff8de1bd0efabd375
WormBase/wormbase_rest
rnai.clj
(ns rest-api.classes.phenotype.widgets.rnai (:require [rest-api.formatters.object :as obj :refer [pack-obj]] [rest-api.classes.generic-fields :as generic])) (defn rnai-info [p rnais] (some->> (seq rnais) (map (fn [rnai] {:rnai (pack-obj rnai) :sequenc...
null
https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/phenotype/widgets/rnai.clj
clojure
(ns rest-api.classes.phenotype.widgets.rnai (:require [rest-api.formatters.object :as obj :refer [pack-obj]] [rest-api.classes.generic-fields :as generic])) (defn rnai-info [p rnais] (some->> (seq rnais) (map (fn [rnai] {:rnai (pack-obj rnai) :sequenc...
aecca06f46ca9296cb4aaadfccd43a3c4f6d29ae225d78c3078cfd652356e99a
adamgundry/uom-plugin
Plugin.hs
# LANGUAGE DataKinds # -- | This module defines a typechecker plugin that solves equations -- involving units of measure. To use it, add -- -- > {-# OPTIONS_GHC -fplugin Data.UnitsOfMeasure.Plugin #-} -- -- above the module header of your source files, or in the -- @ghc-options@ field of your @.cabal@ file. You do n...
null
https://raw.githubusercontent.com/adamgundry/uom-plugin/4091052c0369032aa8258a45e02d2c42bf2bcf46/uom-plugin/src/Data/UnitsOfMeasure/Plugin.hs
haskell
| This module defines a typechecker plugin that solves equations involving units of measure. To use it, add > {-# OPTIONS_GHC -fplugin Data.UnitsOfMeasure.Plugin #-} above the module header of your source files, or in the @ghc-options@ field of your @.cabal@ file. You do not need to import this module. @-fpl...
# LANGUAGE DataKinds # module Data.UnitsOfMeasure.Plugin ( plugin ) where import GhcApi (TcCoercion, ctEvPred, ctEvTerm, typeKind, heqDataCon, evDFunApp, dataConName, dataConWrapId, occName, occNameFS, tyConDataCons, (<+>), isWanted, isGivenCt, isGiven, UnivCoProvenance(PluginProv), mkPrimEqPred, Type(TyConApp), ...
72031ee78938ff82963ccc371eee74859e3342ab3188134de554d382bd73552d
gstamp/tween-clj
math_interop.cljs
(ns tween-clj.math-interop) (def PI js/Math.PI) (def pow js/Math.pow) (def sin js/Math.sin) (def cos js/Math.cos) (def acos js/Math.acos)
null
https://raw.githubusercontent.com/gstamp/tween-clj/2024427002dab12d2d2069aaded7b1be13eefe16/src/tween_clj/math_interop.cljs
clojure
(ns tween-clj.math-interop) (def PI js/Math.PI) (def pow js/Math.pow) (def sin js/Math.sin) (def cos js/Math.cos) (def acos js/Math.acos)
be3b869a6060a029a1c1374213c5cd578330c0d05480afc4b30e3d808df03a44
dradtke/Lisp-Text-Editor
package.lisp
(defpackage :alexandria.0.dev (:nicknames :alexandria) (:use :cl) #+sb-package-locks (:lock t) (:export ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; BLESSED ;; ;; Binding constructs #:if-let #:when-let #:when-let* ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/quicklisp/dists/quicklisp/software/alexandria-20120208-git/package.lisp
lisp
BLESSED Binding constructs REVIEW IN PROGRESS Control flow -- no clear consensus yet -- -- problem free? -- REVIEW PENDING Definitions Hash tables Functions Lists Numbers Arrays Sequences Symbols Strings Types Conditions Features io new additions collected at the end (subject to removal or f...
(defpackage :alexandria.0.dev (:nicknames :alexandria) (:use :cl) #+sb-package-locks (:lock t) (:export #:if-let #:when-let #:when-let* #:cswitch #:eswitch #:switch #:multiple-value-prog2 #:nth-value-or #:whichever #:xor #:define-constant #:alist-hash-table #:copy-hash-t...
9fe4c2568596219db4e24f10f079506d72e8437b429373dac584cc0f15fe5131
kuberlog/holon
goals.lisp
(in-package :holon) (defclass goal () ;; This is a pretty fleshed out goal class ((name :initarg :name) (description :initarg :description) (why-do-it :initarg :why) (key-skills :initarg :key-skills) (tasks :initarg :tasks))) (defun new-goal (name description why key-skills) (make-instan...
null
https://raw.githubusercontent.com/kuberlog/holon/0fdb362faefb6839695744528c8f705ae860948a/lisp/goals.lisp
lisp
This is a pretty fleshed out goal class
(in-package :holon) (defclass goal () ((name :initarg :name) (description :initarg :description) (why-do-it :initarg :why) (key-skills :initarg :key-skills) (tasks :initarg :tasks))) (defun new-goal (name description why key-skills) (make-instance 'goal :name name :description descri...
7248f584ca0b0128d1bbc573e901592a7140bc510f52b88235c90c63f17c85eb
conreality/conreality
table.mli
(* This is free and unencumbered software released into the public domain. *) type t = (Value.t, Value.t) Hashtbl.t val create : int -> t val size : t -> int val clear : t -> unit val reset : t -> unit val remove : t -> Value.t -> unit val insert : t -> Value.t -> Value.t -> unit val lookup : t -> Value.t -> Va...
null
https://raw.githubusercontent.com/conreality/conreality/e03328ef1f0056b58e4ffe181a279a1dc776e094/src/consensus/scripting/table.mli
ocaml
This is free and unencumbered software released into the public domain.
type t = (Value.t, Value.t) Hashtbl.t val create : int -> t val size : t -> int val clear : t -> unit val reset : t -> unit val remove : t -> Value.t -> unit val insert : t -> Value.t -> Value.t -> unit val lookup : t -> Value.t -> Value.t val lookup_int : t -> string -> int option val lookup_string : t -> st...
80df5bd9dfca742130549cbaca79bc126e4f715782155e0bf80367c787550ee3
sjl/clojurecraft
mappings.clj
(ns clojurecraft.mappings (:use [clojurecraft.util])) (def packet-types { 0x00 :keepalive 0x01 :login 0x02 :handshake 0x03 :chat 0x04 :timeupdate 0x05 :equipment 0x06 :spawnposition 0x07 :useentity 0x08 :updatehealth 0x09 :respawn 0x0A :player 0x0B :playerposition 0x0C :playerlook 0x0D :...
null
https://raw.githubusercontent.com/sjl/clojurecraft/c4f27cd3a4953c6a439b0ef9b37241fd51731083/src/clojurecraft/mappings.clj
clojure
(ns clojurecraft.mappings (:use [clojurecraft.util])) (def packet-types { 0x00 :keepalive 0x01 :login 0x02 :handshake 0x03 :chat 0x04 :timeupdate 0x05 :equipment 0x06 :spawnposition 0x07 :useentity 0x08 :updatehealth 0x09 :respawn 0x0A :player 0x0B :playerposition 0x0C :playerlook 0x0D :...
8198622fcd544cc98930ab00b7b639e63afd1acd52bdb49b7cfc2f3492ae6557
janestreet/ppx_css
options.ml
open! Core open! Ppxlib type t = { rewrite : expression String.Map.t ; css_string : string ; stylesheet_location : location ; dont_hash_prefixes : string list } let combine_rewrite_and_dont_hash ~loc ~rewrite ~dont_hash = List.fold dont_hash ~init:rewrite ~f:(fun acc dont_hash_this -> Map.update acc d...
null
https://raw.githubusercontent.com/janestreet/ppx_css/227a89d7e4605f740366a1e1e20923c1d69d6bbc/src/options.ml
ocaml
Parses the AST of a list of expressions into an actual [expression list]. NOTE: This list is reversed, but it does not matter since currently it is only used to populate a map, but if it ever were to matter that the list is reversed, then this list would need to be reversed here. Rewrites insta...
open! Core open! Ppxlib type t = { rewrite : expression String.Map.t ; css_string : string ; stylesheet_location : location ; dont_hash_prefixes : string list } let combine_rewrite_and_dont_hash ~loc ~rewrite ~dont_hash = List.fold dont_hash ~init:rewrite ~f:(fun acc dont_hash_this -> Map.update acc d...
281f3f7846d58c45a34ef31e6404e0398d3fdf4acb91e86067aa381d006665fc
utkarshkukreti/reaml
Tree.ml
module R = Reaml module Tree = struct type t = | Node of string * t list | Leaf of string type props = { value : t } let[@reaml.component.recursive.memo "Tree"] make { value } make = let[@reaml] collapsed, setCollapsed = R.useState false in match value with | Node (value, many) -> R.d...
null
https://raw.githubusercontent.com/utkarshkukreti/reaml/5640a36293ba2a765171225deddb644f4d6c5d26/examples/Tree.ml
ocaml
module R = Reaml module Tree = struct type t = | Node of string * t list | Leaf of string type props = { value : t } let[@reaml.component.recursive.memo "Tree"] make { value } make = let[@reaml] collapsed, setCollapsed = R.useState false in match value with | Node (value, many) -> R.d...
15adc376f716f409bd885e741309732c560c1d5f8b38e0fa6cf51a38f6d6660a
hexlet-codebattle/battle_asserts
reverse_with_capitalize.clj
(ns battle-asserts.issues.reverse-with-capitalize (:require [clojure.test.check.generators :as gen] [clojure.string :as s] [faker.generate :as faker])) (def level :medium) (def tags ["strings"]) (def description {:en "Create a function that takes a string as input and reverses the order o...
null
https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/3d92dfc8be2379742e554ee1b6e3878372fe9e78/src/battle_asserts/issues/reverse_with_capitalize.clj
clojure
(ns battle-asserts.issues.reverse-with-capitalize (:require [clojure.test.check.generators :as gen] [clojure.string :as s] [faker.generate :as faker])) (def level :medium) (def tags ["strings"]) (def description {:en "Create a function that takes a string as input and reverses the order o...
121039166b3bc8ed85acebd126dd98e8b8253fc0c16912bcf8bb3b4cd61ddfeb
JacquesCarette/Drasil
References.hs
module Drasil.NoPCM.References (citations) where import Language.Drasil import Drasil.SWHS.References (incroperaEtAl2007, koothoor2013, lightstone2012, parnasClements1986, smithLai2005) citations :: BibRef citations = [incroperaEtAl2007, koothoor2013, lightstone2012, parnasClements1986, smithLai2005]
null
https://raw.githubusercontent.com/JacquesCarette/Drasil/cb52c5f5978b92c27c05c06458231774232a174a/code/drasil-example/nopcm/lib/Drasil/NoPCM/References.hs
haskell
module Drasil.NoPCM.References (citations) where import Language.Drasil import Drasil.SWHS.References (incroperaEtAl2007, koothoor2013, lightstone2012, parnasClements1986, smithLai2005) citations :: BibRef citations = [incroperaEtAl2007, koothoor2013, lightstone2012, parnasClements1986, smithLai2005]
b058a83777bef42a80d84a48176bc06afd2034bc9ff9642d676ce1d175eea860
lojic/LearningRacket
day10-conspicio.rkt
#lang racket This version inspired by . The goal was to store the configuration information for brackets in one place . I used a list ;; of tuples, with each tuple containing the following: ;; ( < left - bracket > < right - bracket > < part 1 value > < part 2 value > (require threading) (define (part1 input)...
null
https://raw.githubusercontent.com/lojic/LearningRacket/ede1ecf14b9c8c91732f0477010a0fcb9bcc0187/advent-of-code-2021/solutions/day10/day10-conspicio.rkt
racket
of tuples, with each tuple containing the following: Tests --------------------------------------------------------------------------------------
#lang racket This version inspired by . The goal was to store the configuration information for brackets in one place . I used a list ( < left - bracket > < right - bracket > < part 1 value > < part 2 value > (require threading) (define (part1 input) (for/sum ([ c (filter char? input) ]) (p1-value c)))...
5d1be786b3d0c9ca0a6e70593ba612201f47c877804999fb4de85ae245ec066b
sicmutils/sicmutils
bulirsch_stoer_test.cljc
#_"SPDX-License-Identifier: GPL-3.0" (ns sicmutils.numerical.quadrature.bulirsch-stoer-test (:require [clojure.test :refer [is deftest testing]] [same :refer [ish?]] [sicmutils.numerical.quadrature.bulirsch-stoer :as bs] [sicmutils.numerical.quadrature.romberg-test :as rom])) (de...
null
https://raw.githubusercontent.com/sicmutils/sicmutils/ce763b31153eb9253f165bd5b4e4e6a6087bf730/test/sicmutils/numerical/quadrature/bulirsch_stoer_test.cljc
clojure
#_"SPDX-License-Identifier: GPL-3.0" (ns sicmutils.numerical.quadrature.bulirsch-stoer-test (:require [clojure.test :refer [is deftest testing]] [same :refer [ish?]] [sicmutils.numerical.quadrature.bulirsch-stoer :as bs] [sicmutils.numerical.quadrature.romberg-test :as rom])) (de...
11abf30f6b175c8fe7040e6bc6ee2926b091077a355a23cee2423a0f675a7ad8
openmusic-project/openmusic
eval-process.lisp
;;=========================================================================== LW Lisp Tools Lisp programming tools for LispWorks delivered applications ;;=========================================================================== ;=========================================================================== ; This progr...
null
https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/api/om-LW/lw-lisp-tools/eval-process.lisp
lisp
=========================================================================== =========================================================================== =========================================================================== This program is free software; you can redistribute it and/or either version 2 See file ...
LW Lisp Tools Lisp programming tools for LispWorks delivered applications modify it under the terms of the GNU General Public License of the License , or ( at your option ) any later version . You should have received a copy of the GNU General Public License Foundation , Inc. , 59 Temple Place - Suite 330 , Bo...
da26f4ba6df97da6823536ef3a47aa287d3046c5582648306942e0540654b61a
cedlemo/OCaml-GI-ctypes-bindings-generator
Expander_style.ml
open Ctypes open Foreign type t = Collapsed | Semi_collapsed | Semi_expanded | Expanded let of_value v = if v = Unsigned.UInt32.of_int 0 then Collapsed else if v = Unsigned.UInt32.of_int 1 then Semi_collapsed else if v = Unsigned.UInt32.of_int 2 then Semi_expanded else if v = Unsigned.UInt32.of_int 3 then Exp...
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Expander_style.ml
ocaml
open Ctypes open Foreign type t = Collapsed | Semi_collapsed | Semi_expanded | Expanded let of_value v = if v = Unsigned.UInt32.of_int 0 then Collapsed else if v = Unsigned.UInt32.of_int 1 then Semi_collapsed else if v = Unsigned.UInt32.of_int 2 then Semi_expanded else if v = Unsigned.UInt32.of_int 3 then Exp...
dc912d25295cdb5e513772f5f92129ddd51d8c03c73722b2a904aca132485632
ocaml-community/lambda-term
lTerm.mli
* lTerm.mli * --------- * Copyright : ( c ) 2011 , < > * Licence : BSD3 * * This file is a part of Lambda - Term . * lTerm.mli * --------- * Copyright : (c) 2011, Jeremie Dimino <> * Licence : BSD3 * * This file is a part of Lambda-Term. *) (** Terminal definitions *) type t (** ...
null
https://raw.githubusercontent.com/ocaml-community/lambda-term/8d323b24135a97e30f9a4d10baf93612dc871c1c/src/lTerm.mli
ocaml
* Terminal definitions * Type of terminals. * {6 Creation} * Exception raised when an encoding does not exist. * Returns the model of the terminal. * Number of colors of the terminal. * Whether the terminal is a windows console or not. * [is_a_tty term] whether the intput and output of the given terminal a...
* lTerm.mli * --------- * Copyright : ( c ) 2011 , < > * Licence : BSD3 * * This file is a part of Lambda - Term . * lTerm.mli * --------- * Copyright : (c) 2011, Jeremie Dimino <> * Licence : BSD3 * * This file is a part of Lambda-Term. *) type t exception No_such_encoding of st...
67e73f31a900c673876bf4ae84aeccee181adfd9df184acc3cdfab95484aa72d
onedata/op-worker
gs_storage_logic_test_SUITE.erl
%%%-------------------------------------------------------------------- @author ( C ) 2019 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%-------------------------------------------------------------------- %%% @doc %%% This module tests storage logic ...
null
https://raw.githubusercontent.com/onedata/op-worker/e95cb04ebd6357d9952fbdb1d534c2285aeebe96/test_distributed/suites/graph_sync/gs_storage_logic_test_SUITE.erl
erlang
-------------------------------------------------------------------- @end -------------------------------------------------------------------- @doc This module tests storage logic API using mocked gs_client module. @end -------------------------------------------------------------------- export for ct ============...
@author ( C ) 2019 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . -module(gs_storage_logic_test_SUITE). -author("Michal Stanisz"). -include("logic_tests_common.hrl"). -export([all/0, init_per_suite/1, init_per_testcase/2, end_per_testcase/2, end_per_suite/1]). ...
12f82c28827781971bd55894e1f92ae89252bf80422fd2e2062a14052e7c8bf5
OlivierSohn/hamazed
Positionable.hs
{-# OPTIONS_HADDOCK hide #-} # LANGUAGE NoImplicitPrelude # # LANGUAGE FlexibleInstances # module Imj.Graphics.Class.Positionable ( Positionable(..) , HasReferencePosition(..) , GeoTransform(..) -- * Alignment , AlignmentKind(..) , Alignment(.....
null
https://raw.githubusercontent.com/OlivierSohn/hamazed/6c2b20d839ede7b8651fb7b425cb27ea93808a4a/imj-base/src/Imj/Graphics/Class/Positionable.hs
haskell
# OPTIONS_HADDOCK hide # * Alignment * Utilities ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ | A 'Positionable' is a graphical element that knows how to draw itself except for its positions. | Draw at ...
# LANGUAGE NoImplicitPrelude # # LANGUAGE FlexibleInstances # module Imj.Graphics.Class.Positionable ( Positionable(..) , HasReferencePosition(..) , GeoTransform(..) , AlignmentKind(..) , Alignment(..) , mkRightAlign , mkCentered ...
8f65ae43289d80cb5ba7371a73dd6dcfcc668b158de318b37f058b6db98389d9
kaizhang/Taiji
tests.hs
{-# LANGUAGE OverloadedStrings #-} import Bio.Data.Experiment.Types import qualified Data.Map as M import Data.Maybe import Data.Yaml import Test.Tasty import Test.Tasty.HUnit import Control.Lens import System.IO.Unsafe chipData :: [ChIPSeq] chipData ...
null
https://raw.githubusercontent.com/kaizhang/Taiji/f6a050ba0ee6acb6077435566669279455cef350/bio-experiments/tests/tests.hs
haskell
# LANGUAGE OverloadedStrings #
import Bio.Data.Experiment.Types import qualified Data.Map as M import Data.Maybe import Data.Yaml import Test.Tasty import Test.Tasty.HUnit import Control.Lens import System.IO.Unsafe chipData :: [ChIPSeq] chipData = fromJust $ unsafePerformIO $ deco...
a77bd525fc79cf4e01d4989a5f87d7982a406cf35071de6b9f3e01e6604d4796
skroutz/clj-skroutz
project.clj
(defproject clj-skroutz "0.0.1" :description "A Clojure client for Skroutz API (v3 and above)" :dependencies [[org.clojure/clojure "1.8.0"] [clj-http "3.7.0"] [cheshire "5.8.0"] [com.cemerick/url "0.1.1"] [ring/ring-core "1.6.3"]] :license {:name...
null
https://raw.githubusercontent.com/skroutz/clj-skroutz/25c6c32f5ac8d5ea082ef4dbede6720f74d15ef0/project.clj
clojure
(defproject clj-skroutz "0.0.1" :description "A Clojure client for Skroutz API (v3 and above)" :dependencies [[org.clojure/clojure "1.8.0"] [clj-http "3.7.0"] [cheshire "5.8.0"] [com.cemerick/url "0.1.1"] [ring/ring-core "1.6.3"]] :license {:name...
408689c605510e1728e89f40b6c82cfcab9c98d476cdd8d7b16e9c2954b9c97d
ntoronto/drbayes
comparison-lifts.rkt
#lang typed/racket/base (require racket/list racket/flonum "../../set.rkt" "../types.rkt" "../cache.rkt" "../pure-arrows.rkt" "make-real-lift.rkt" ) (provide </bot >/bot <=/bot >=/bot =/bot </pre >/pre <=/pre >=/pre =/pre) (define </bot (real2d/...
null
https://raw.githubusercontent.com/ntoronto/drbayes/e59eb7c7867118bf4c77ca903e133c7530e612a3/drbayes/private/arrow/pure-lifts/comparison-lifts.rkt
racket
#lang typed/racket/base (require racket/list racket/flonum "../../set.rkt" "../types.rkt" "../cache.rkt" "../pure-arrows.rkt" "make-real-lift.rkt" ) (provide </bot >/bot <=/bot >=/bot =/bot </pre >/pre <=/pre >=/pre =/pre) (define </bot (real2d/...
4e068969a379b0e4fe7168b56917a9d88c751f2fe3d7da4cfa58cc35439e1003
penpot/penpot
worker.cljs
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.main.worker (:require [app.config :as cf] [app.main.errors :as err] [app.util.worker :as uw...
null
https://raw.githubusercontent.com/penpot/penpot/cc18f84d620e37d8efafc5bed1bcdbe70ec23c1e/frontend/src/app/main/worker.cljs
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.main.worker (:require [app.config :as cf] [app.main.errors :as err] [app.util.worker :as uw])) (defonce instance (atom nil)...
78c01a007d18165a6fcb2df27abbdb5f3205972b2810c9ac30357a6f1fc6ceec
ivanjovanovic/sicp
e-3.22.scm
Exercise 3.22 . Instead of representing a queue as a pair of pointers , we can ; build a queue as a procedure with local state. The local state will consist ; of pointers to the beginning and the end of an ordinary list. Thus, the ; make-queue procedure will have the form ; (define (make-queue) ; (let ((front-pt...
null
https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/3.3/e-3.22.scm
scheme
build a queue as a procedure with local state. The local state will consist of pointers to the beginning and the end of an ordinary list. Thus, the make-queue procedure will have the form (define (make-queue) (let ((front-ptr ...) (rear-ptr ...)) <definitions of internal procedures> (define (d...
Exercise 3.22 . Instead of representing a queue as a pair of pointers , we can (load "../helpers.scm") (define (make-queue) (let ((front-ptr '()) (rear-ptr '())) (define (empty-queue?) (null? front-ptr)) (define (front-queue) (if (empty-queue?) (error "FRONT called with and empt...
903ecba839da19f57ced61b69ac57bfbab8156f3f78a380fc1a9587d2d6f89e3
rootmos/loom
arweave_prv_compile.erl
-module(arweave_prv_compile). -export([init/1, do/1, format_error/1]). -spec init(rebar_state:t()) -> {ok, rebar_state:t()}. init(State) -> Provider = providers:create([ {name, compile}, {namespace, arweave}, {module, ?MODULE}, {bare, true}, {example, "r...
null
https://raw.githubusercontent.com/rootmos/loom/5f68ef9a9a5350f14d70935bacec3287aca60f1f/arweave/src/arweave_prv_compile.erl
erlang
-module(arweave_prv_compile). -export([init/1, do/1, format_error/1]). -spec init(rebar_state:t()) -> {ok, rebar_state:t()}. init(State) -> Provider = providers:create([ {name, compile}, {namespace, arweave}, {module, ?MODULE}, {bare, true}, {example, "r...
923bd934c8c7990dcaf177364d8e1e7b1ab89beaedab2f9aefd3da96e2310248
erlangonrails/devdb
fd_db.erl
2007 - 2010 fuer Informationstechnik Berlin 2009 - 2010 onScale solutions GmbH 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 re...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/src/fd_db.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 gov...
2007 - 2010 fuer Informationstechnik Berlin 2009 - 2010 onScale solutions GmbH Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > @doc Database operations for the failure detec...
2909aea6f9c0f49f822cf391962f0093ff1b27d5ea53f1ca80788107085f81d9
dnlkrgr/hsreduce
Parser.hs
module Util.Parser where import Bag import Control.Exception import Control.Monad.IO.Class import StringBuffer import FastString import SrcLoc import Lexer import qualified Text.Megaparsec as MP import Control.Applicative (Alternative ((<|>), many, some)) import Data.Either (fromRight, isRight) import qualified Data.T...
null
https://raw.githubusercontent.com/dnlkrgr/hsreduce/8f66fdee036f8639053067572b55d9a64359d22c/src/Util/Parser.hs
haskell
TODO: how to handle Safe vs. Trustworthy? banner $ "Parsing: " <> fromAbsFile fileName I was told we could get away with using the unsafeGlobalDynFlags. as long as `parseDynamicFilePragma` is impure there seems to be no reason to use it. Prevent parsing of .ghc.environment.* "package environment files" (dflags3,...
module Util.Parser where import Bag import Control.Exception import Control.Monad.IO.Class import StringBuffer import FastString import SrcLoc import Lexer import qualified Text.Megaparsec as MP import Control.Applicative (Alternative ((<|>), many, some)) import Data.Either (fromRight, isRight) import qualified Data.T...