_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
26ffce9b63887a5d2ce92c9f341d87689218b83304b3fe6eac1a50463575b2e9
lem-project/lem
sql-mode.lisp
(defpackage :lem-sql-mode (:use :cl :lem :lem.language-mode :lem.language-mode-tools) (:import-from :lem.tmlanguage :load-tmlanguage) (:export :sql-mode)) (in-package :lem-sql-mode) (defun make-tmlanguage-sql () (load-tmlanguage (merge-pathnames "sql.tmLanguage.json" ...
null
https://raw.githubusercontent.com/lem-project/lem/26bd2dc10d92a90317d99ac818286371e5da9b14/modes/sql-mode/sql-mode.lisp
lisp
(variable-value 'beginning-of-defun-function) 'beginning-of-defun (variable-value 'end-of-defun-function) 'end-of-defun
(defpackage :lem-sql-mode (:use :cl :lem :lem.language-mode :lem.language-mode-tools) (:import-from :lem.tmlanguage :load-tmlanguage) (:export :sql-mode)) (in-package :lem-sql-mode) (defun make-tmlanguage-sql () (load-tmlanguage (merge-pathnames "sql.tmLanguage.json" ...
7bec2480fe1a2bec60f62cd50407b9694720489b1e77c1c2d18f97b9b1ba8588
w3ntao/sicp-solution
3-78.rkt
#lang racket (require (only-in "../ToolBox/AbstractionOfData/stream.rkt" cons-stream add-streams delay scale-stream delayed-integral stream-ref )) (define (solve-2nd a b dt y-0 dy-0) (define...
null
https://raw.githubusercontent.com/w3ntao/sicp-solution/00be3a7b4da50bb266f8a2db521a24e9f8c156be/chap-3/3-78.rkt
racket
#lang racket (require (only-in "../ToolBox/AbstractionOfData/stream.rkt" cons-stream add-streams delay scale-stream delayed-integral stream-ref )) (define (solve-2nd a b dt y-0 dy-0) (define...
cf51332cc1115292e94dff42efca2ddbd95b68f065c5c56a6de26bf2321b3d83
thegeez/clj-board
dev.cljs
(ns net.thegeez.clj-board.dev (:require [net.thegeez.clj-board.core :as core])) (enable-console-print!) (defn reload [] (println "reloading") (core/main))
null
https://raw.githubusercontent.com/thegeez/clj-board/e162d6097ce7b66438f7529418bf48af66e34fa8/dev/cljs/net/thegeez/clj_board/dev.cljs
clojure
(ns net.thegeez.clj-board.dev (:require [net.thegeez.clj-board.core :as core])) (enable-console-print!) (defn reload [] (println "reloading") (core/main))
c195b2297bca7816dd810c280072c48974ea6790211e9d496ef7ca5a7ada87cb
arne-schroppe/dash
Recursion.hs
module Language.Dash.Normalization.Recursion ( resolveRecursion ) where import Control.Monad.Except (ExceptT (..), runExceptT, throwError) import Control.Monad.Identity (Identity (..), runIdentity) import Control.Monad.State.S...
null
https://raw.githubusercontent.com/arne-schroppe/dash/82df755edc6555cba808539970ab6ff225c18b35/src/Language/Dash/Normalization/Recursion.hs
haskell
resolveRecDestrBind vars pat subjVar expr TODO avoid nub TODO avoid nub We return the free vars for this lambda so that match instructions coming later can know about them. (they need to know about free vars so that they can call match-branches correctly.) placeholder, so that we can easily pop the context late...
module Language.Dash.Normalization.Recursion ( resolveRecursion ) where import Control.Monad.Except (ExceptT (..), runExceptT, throwError) import Control.Monad.Identity (Identity (..), runIdentity) import Control.Monad.State.S...
6429a453ee4bddd2fe37743f9a849fba5b6c394bd1d4642ac39fc2b7c6086609
gethop-dev/dashboard-manager.grafana
grafana.clj
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 dev.gethop.dashboard-manager.grafana (:require [clojure.data.json :as json] [clojure.string :as str] [dev.gethop.dashboard-manage...
null
https://raw.githubusercontent.com/gethop-dev/dashboard-manager.grafana/f086e11a7b6720c5952545a57e66ce7a89583619/src/dev/gethop/dashboard_manager/grafana.clj
clojure
file, You can obtain one at / Socket layer related exceptions HTTP layer related exceptions TODO: add support for OAUTH login
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 (ns dev.gethop.dashboard-manager.grafana (:require [clojure.data.json :as json] [clojure.string :as str] [dev.gethop.dashboard-manager.core :as core] [diehard.core...
123ae8833db6bd2cfe56d00b09ce87c3bc3ff9ee850219d368aedf312ca706dd
alpmestan/servant
Links.hs
# LANGUAGE PolyKinds # # LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE FunctionalDependencies # # LANGUAGE ScopedTypeVariables # # LANGUAGE UndecidableInstances # -- | Type safe internal links. -- -- Provides the function 'mkLink': -- -- @ -- type ...
null
https://raw.githubusercontent.com/alpmestan/servant/d67b5e1f3e9af4b249f95ed72dcaebc4ce328a96/servant/src/Servant/Utils/Links.hs
haskell
| Type safe internal links. Provides the function 'mkLink': @ type API = Proxy ("hello" :> Get Int api :: API api = proxy link2 :: Proxy ("hello" :> Delete) link2 = proxy mkLink link1 API -- typechecks, returns 'Link "/hello"' does n't @ returns a 'Link', but only typechecks if the li...
# LANGUAGE PolyKinds # # LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE FunctionalDependencies # # LANGUAGE ScopedTypeVariables # # LANGUAGE UndecidableInstances # : < | > " bye " :> QueryParam " name " String :> Post Bool ) link1...
e826873e68b292d521a161809f2ee86d286a8f13e66ac733ed8d407c3f663a02
ChillkroeteTTS/fischer
model.clj
(ns fischer.model) (defprotocol Model (train [_ feature-vectors]) (scores [_ feature-vectors mu-and-sigma]) (predict [_ scores epsylon]))
null
https://raw.githubusercontent.com/ChillkroeteTTS/fischer/2f479ac0d410f536f5bd89659d7f69113422784a/src/clj/fischer/model.clj
clojure
(ns fischer.model) (defprotocol Model (train [_ feature-vectors]) (scores [_ feature-vectors mu-and-sigma]) (predict [_ scores epsylon]))
80cb5c77f9c55cbb3fcf1e61bc338050d37403e91fb7e158f864deb93a7f4e52
mnemonic-no/act-scio
utils.clj
(ns scio-back.utils) (defmacro zip "Zip sequences together" [& body] `(apply (partial map vector) ~(vec body)))
null
https://raw.githubusercontent.com/mnemonic-no/act-scio/bd2e2ccfa54c8a102748d37c79c1292abb63522b/src/scio_back/utils.clj
clojure
(ns scio-back.utils) (defmacro zip "Zip sequences together" [& body] `(apply (partial map vector) ~(vec body)))
6c3ef154b63d1f0d6284ffe4fcf79086b60b971d74ec467a8f1a6278e19d43ae
votinginfoproject/data-processor
candidate_addresses.clj
(ns vip.data-processor.validation.db.v3-0.candidate-addresses (:require [clojure.string :as str] [korma.core :as korma] [vip.data-processor.errors :as errors])) (def required-address-fields #{:filed_mailing_address_line1 :filed_mailing_address_city :filed_mailing_address_state :...
null
https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/src/vip/data_processor/validation/db/v3_0/candidate_addresses.clj
clojure
if all address fields are empty then is valid if there is an address with any required fields blank, then invalid Otherwise we have a valid address with all required fields maybe this function should take a map
(ns vip.data-processor.validation.db.v3-0.candidate-addresses (:require [clojure.string :as str] [korma.core :as korma] [vip.data-processor.errors :as errors])) (def required-address-fields #{:filed_mailing_address_line1 :filed_mailing_address_city :filed_mailing_address_state :...
436e5f97c020c049153b181e6dc0dba92b5270cad4f2efe9945199ec6096b964
deadpendency/deadpendency
RepoFilesRequest.hs
module Common.Effect.GitHub.FetchRepoFiles.Model.RepoFilesRequest ( RepoFilesRequest (..), ) where import Common.Aeson.Aeson import Common.Model.Git.GitPath import Common.Model.Git.GitSha import Common.Model.Git.QualifiedRepo import Data.Aeson import Data.Vector.NonEmpty qualified as NV data RepoFilesRequest = Re...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/Effect/GitHub/FetchRepoFiles/Model/RepoFilesRequest.hs
haskell
module Common.Effect.GitHub.FetchRepoFiles.Model.RepoFilesRequest ( RepoFilesRequest (..), ) where import Common.Aeson.Aeson import Common.Model.Git.GitPath import Common.Model.Git.GitSha import Common.Model.Git.QualifiedRepo import Data.Aeson import Data.Vector.NonEmpty qualified as NV data RepoFilesRequest = Re...
8d20df39f3d8cbaeeaec72ae8c9a85628ca33ef52eaac76ec80ed492e6b51d70
snapframework/xmlhtml
Parse.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TupleSections # module Text.XmlHtml.HTML.Parse where import Control.Applicative import Control.Monad import Data.Char import Data.List import Data.Maybe import Text.XmlHtml.Common import Text.XmlHt...
null
https://raw.githubusercontent.com/snapframework/xmlhtml/faa82a905bd90a0f72cf6b1de31d876187bdf018/src/Text/XmlHtml/HTML/Parse.hs
haskell
# LANGUAGE OverloadedStrings # ---------------------------------------------------------------------------- | HTML version of document fragment parsing rule It differs only in that it parses the HTML version of 'content' and returns an 'HtmlDocument'. -----------------------------------------------------------------...
# LANGUAGE TupleSections # module Text.XmlHtml.HTML.Parse where import Control.Applicative import Control.Monad import Data.Char import Data.List import Data.Maybe import Text.XmlHtml.Common import Text.XmlHtml.HTML.Meta import Text....
c9f6ee91552cf3cafe435d67589fe9fe592bd95c0407f203f45ac25bbfd45d61
baryluk/ex11
example13.erl
-module(example13). Copyright ( C ) 2004 by ( ) %% All rights reserved. %% The copyright holder hereby grants the rights of usage, distribution %% and modification of this software to everyone and for any purpose, as %% long as this license and the copyright notice above are preserved and %% not modified. There i...
null
https://raw.githubusercontent.com/baryluk/ex11/be8abc64ab9fb50611f93d6631fc33ffdee08fdb/widgets/example13.erl
erlang
All rights reserved. The copyright holder hereby grants the rights of usage, distribution and modification of this software to everyone and for any purpose, as long as this license and the copyright notice above are preserved and not modified. There is no warranty for this software.
-module(example13). Copyright ( C ) 2004 by ( ) Actually dragframes are redundant use DragBoxes instead see example 14 -export([start/0]). -import(sw, [xStart/1]). -include("sw.hrl"). -define(bg, 16#ffffcc). start() -> spawn(fun win/0). win() -> Display = xStart("3.1"), Win = swTopLevel:ma...
e8ffb884e849b39361df971166a6943ab90a5800d2cdd5f9b047165a72595048
ucsd-progsys/liquidhaskell
HoleCrash1.hs
{-@ LIQUID "--expect-error-containing=Illegal type specification for `HoleCrash1.t`" @-} {-@ LIQUID "--expect-error-containing=Illegal type specification for `HoleCrash1.C`" @-} module HoleCrash1 where data Poo a = C { t :: Poo a } {-@ type Geq N = {v:_ | N <= v} @-} @ data a = C { t : : ( Geq 0 ) } @
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/errors/HoleCrash1.hs
haskell
@ LIQUID "--expect-error-containing=Illegal type specification for `HoleCrash1.t`" @ @ LIQUID "--expect-error-containing=Illegal type specification for `HoleCrash1.C`" @ @ type Geq N = {v:_ | N <= v} @
module HoleCrash1 where data Poo a = C { t :: Poo a } @ data a = C { t : : ( Geq 0 ) } @
c94a8f03d3fbb7a6bd0c8b56c9407899fdb166474d7b195e2504895615f8d77c
input-output-hk/plutus
Nat.hs
-- | @nat@ and related functions. {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # {-# LANGUAGE TypeOperators #-} module PlutusCore.StdLib.Data.Nat ( natData , natTy , zero , succ , foldrNat , foldNat , natToInteger ) where import Prelude hiding (succ) import Pl...
null
https://raw.githubusercontent.com/input-output-hk/plutus/1f31e640e8a258185db01fa899da63f9018c0e85/plutus-core/plutus-core/stdlib/PlutusCore/StdLib/Data/Nat.hs
haskell
| @nat@ and related functions. # LANGUAGE OverloadedStrings # # LANGUAGE TypeOperators # > fix \(nat :: *) -> all r. r -> (nat -> r) -> r > wrapNat [] /\(r :: *) -> \(z : r) (f : nat -> r) -> z > \(n : nat) -> wrapNat [] /\(r :: *) -> \(z : r) (f : nat -> r) -> f n > /\(r :: *) -> \(f : r -> r) (z : r) -> ...
# LANGUAGE TypeApplications # module PlutusCore.StdLib.Data.Nat ( natData , natTy , zero , succ , foldrNat , foldNat , natToInteger ) where import Prelude hiding (succ) import PlutusCore.Core import PlutusCore.Default.Builtins import PlutusCore.MkPlc import PlutusCore.Name import P...
f193a9b4956397136675bef3c27d56ad7d5954a8965688f3611300b9cb3d387b
mbillingr/lisp-in-small-pieces
interpreter5.scm
(import (builtin core) (libs utils) (libs book)) ; instructions are encoded as bytecode ; call/cc is defined as a primitive ; bind-exit is defined as a special form (include "common-stuff.scm") (include "pretreatment.scm") (define backup.g.current g.current) (define (original.g.current) backup.g.curr...
null
https://raw.githubusercontent.com/mbillingr/lisp-in-small-pieces/b2b158dfa91dc95d75af4bd7d93f8df22219047e/07-compilation/interpreter5.scm
scheme
instructions are encoded as bytecode call/cc is defined as a primitive bind-exit is defined as a special form =========================================================================== instructions defined below =========================================================================== ========================...
(import (builtin core) (libs utils) (libs book)) (include "common-stuff.scm") (include "pretreatment.scm") (define backup.g.current g.current) (define (original.g.current) backup.g.current) (define *code* 'anything) (define *pc* 'anything) (define *constants* 'anything) (define *env* 'anything) (def...
70e879b659f1d48777bffec3eac969beaa16443ece78df611cf74133de5f58c9
adamwynne/twitter-api
core.clj
(ns twitter.test-utils.core (:require [clojure.test :refer :all] [http.async.client :as ac] [twitter.api.restful :refer [users-show]] [twitter.test.creds :refer [make-app-only-test-creds make-test-creds]])) (defmacro is-async-200 "checks t...
null
https://raw.githubusercontent.com/adamwynne/twitter-api/6443d1c8ed7d6b6cc9f5efaa5fd9c7cc176e80f0/test/twitter/test_utils/core.clj
clojure
(ns twitter.test-utils.core (:require [clojure.test :refer :all] [http.async.client :as ac] [twitter.api.restful :refer [users-show]] [twitter.test.creds :refer [make-app-only-test-creds make-test-creds]])) (defmacro is-async-200 "checks t...
f4169829486fc533400d755906cf51db4ee540b4d0ad8625d832749944c15dec
chetmurthy/poly-protobuf
pbrt_array.ml
let insert_n n : int Pbrt.Repeated_field.t = let a = Pbrt.Repeated_field.make 0 in let rec loop = function | i when i = n -> () | i -> (Pbrt.Repeated_field.add i a; loop (i + 1)) in loop 0; a let () = (* Small array *) let a = insert_n 3 in assert([|0; 1; 2; |] = (Pbrt.Repeated_field....
null
https://raw.githubusercontent.com/chetmurthy/poly-protobuf/1f80774af6472fa30ee2fb10d0ef91905a13a144/tests/testdata/unit-tests/pbrt_array.ml
ocaml
Small array Larger Repeated_field Larger Repeated_field Pbrt.Repeated_field.fold_left
let insert_n n : int Pbrt.Repeated_field.t = let a = Pbrt.Repeated_field.make 0 in let rec loop = function | i when i = n -> () | i -> (Pbrt.Repeated_field.add i a; loop (i + 1)) in loop 0; a let () = let a = insert_n 3 in assert([|0; 1; 2; |] = (Pbrt.Repeated_field.to_array a)) let...
fd858016a3b0c1fbb3ca8356c920d7384ecfa7d203385eb6c087e849b3649cfa
ricardobcl/DottedDB
dotted_db_utils.erl
-module(dotted_db_utils). -compile(export_all). -include("dotted_db.hrl"). make_request_id() -> erlang:phash2({self(), os:timestamp()}). % only has to be unique per-pid -spec primary_node(bkey()) -> index_node(). primary_node(Key) -> DocIdx = riak_core_util:chash_key(Key), riak_core_apl:first_up(DocIdx...
null
https://raw.githubusercontent.com/ricardobcl/DottedDB/e3b96a9ec77439af90f94a80b875a01732c1425e/src/dotted_db_utils.erl
erlang
only has to be unique per-pid we still haven't cached this key replica nodes getting the binary consistent hash is more efficient since it lives in a ETS. getting the binary consistent hash is more efficient since it lives in a ETS. We are assuming a consistent hashing ring, thus we return the N-1 before this node...
-module(dotted_db_utils). -compile(export_all). -include("dotted_db.hrl"). make_request_id() -> -spec primary_node(bkey()) -> index_node(). primary_node(Key) -> DocIdx = riak_core_util:chash_key(Key), riak_core_apl:first_up(DocIdx, dotted_db). -spec replica_nodes(bkey()) -> [index_node()]. replica_nodes(K...
27c8d672d6fd6c6bff888c7562deed869caf9dc628ef5ebda0af5181706bfbc0
clojure-interop/google-cloud-clients
RemoteSpannerHelper.clj
(ns com.google.cloud.spanner.testing.RemoteSpannerHelper "Utility that provides access to a Cloud Spanner instance to use for tests, and allows uniquely named test databases to be created within that instance." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.spanner.testing RemoteSpa...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.spanner/src/com/google/cloud/spanner/testing/RemoteSpannerHelper.clj
clojure
an appropriate name will be chosen and the statement generated
(ns com.google.cloud.spanner.testing.RemoteSpannerHelper "Utility that provides access to a Cloud Spanner instance to use for tests, and allows uniquely named test databases to be created within that instance." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.spanner.testing RemoteSpa...
4b1debbeffd739414dc4affc466ac163be1442d01892d43cb7b2e7308f08888c
mfikes/fifth-postulate
ns130.cljs
(ns fifth-postulate.ns130) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns130.cljs
clojure
(ns fifth-postulate.ns130) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
e8fc5a64a316a5eb136a936af76f685fa4dcfa8b940ca08ee9e61ebddeb6a97e
hellopatrick/xmas
main.ml
open Containers module Step = struct type t = Forward of int | Left | Right let pp = function | Left -> "Left" | Right -> "Right" | Forward i -> Printf.sprintf "Go %d" i end module Facing = struct type t = Up | Down | Left | Right let score = function Right -> 0 | Down -> 1 | Left -> 2 | Up -> 3...
null
https://raw.githubusercontent.com/hellopatrick/xmas/ff2cbbfb2d569aabd33905e1caece50f88c8c54e/2022/day22/main.ml
ocaml
open Containers module Step = struct type t = Forward of int | Left | Right let pp = function | Left -> "Left" | Right -> "Right" | Forward i -> Printf.sprintf "Go %d" i end module Facing = struct type t = Up | Down | Left | Right let score = function Right -> 0 | Down -> 1 | Left -> 2 | Up -> 3...
43e441433ed1f8a8ed3e022dc0d01bb4ece586ffd99727a54a7dba0c17148fed
music-suite/music-preludes
note_voice_score.hs
>>> [(1,c)^.note]^.voice >>> [(1<->2,c)^.event]^.score >>> [(1,c)^.note]^.voice <> [(2,d)^.note]^.voice [(1,0)^.note,(2,2)^.note]^.voice Compose two voices using relative time , resulting score uses absolute time >>> renderAlignedVoice $ aligned 0 0 $ [(1,c)^.note]^.voice <> [(2,d)^.note]^.voice [(0 <-> 1,0)^.eve...
null
https://raw.githubusercontent.com/music-suite/music-preludes/2512b7dba62b4adadd04c01772046a3c09be72d7/examples/note_voice_score.hs
haskell
Align end rather than beginning
>>> [(1,c)^.note]^.voice >>> [(1<->2,c)^.event]^.score >>> [(1,c)^.note]^.voice <> [(2,d)^.note]^.voice [(1,0)^.note,(2,2)^.note]^.voice Compose two voices using relative time , resulting score uses absolute time >>> renderAlignedVoice $ aligned 0 0 $ [(1,c)^.note]^.voice <> [(2,d)^.note]^.voice [(0 <-> 1,0)^.eve...
5ea83395f7e10e9bfe2373c7e77d1370dacf73fe37d8863e9a670127031e50d0
vseloved/cl-nlp
decision-tree-test.lisp
( c ) 2015 - 2017 Vsevolod Dyomkin (in-package #:nlearn) (named-readtables:in-readtable rutilsx-readtable) (defparameter *golf-data* (let (labels data) (iter (:for line :in (split #\Newline " OUTLOOK | TEMPERATURE | HUMIDITY | WINDY | PLAY ===================================================== sunny | ...
null
https://raw.githubusercontent.com/vseloved/cl-nlp/f180b6c3c0b9a3614ae43f53a11bc500767307d0/test/learning/decision-tree-test.lisp
lisp
( c ) 2015 - 2017 Vsevolod Dyomkin (in-package #:nlearn) (named-readtables:in-readtable rutilsx-readtable) (defparameter *golf-data* (let (labels data) (iter (:for line :in (split #\Newline " OUTLOOK | TEMPERATURE | HUMIDITY | WINDY | PLAY ===================================================== sunny | ...
d8cdd2da1504a7a1bf7c155b338af025c753872e0717c76c9e20542b2b1faf27
re-ops/re-core
spec.clj
(ns lxc.spec (:require [clojure.spec.alpha :as s] [re-share.spec :as re-ops])) (s/def :lxc/node (s/keys :re-un [:re-ops/host :re-ops/port :re-ops/path :lxc/p12 :re-ops/password :lxc/crt])) (s/def :lxc/container (s/keys :re-un [:re-ops/node]))
null
https://raw.githubusercontent.com/re-ops/re-core/93596efd4f3068d57e8140106da60011a6569310/src/lxc/spec.clj
clojure
(ns lxc.spec (:require [clojure.spec.alpha :as s] [re-share.spec :as re-ops])) (s/def :lxc/node (s/keys :re-un [:re-ops/host :re-ops/port :re-ops/path :lxc/p12 :re-ops/password :lxc/crt])) (s/def :lxc/container (s/keys :re-un [:re-ops/node]))
b2ac05d41291be3d219fea9e804432ac987b78dc50b68e74e11097fed83816b2
danr/hipspec
SomePrelude.hs
module SomePrelude where import Prelude (Bool(..),Maybe(..)) id :: a -> a id x = x -- constant function const :: a -> b -> a const x _ = x -- function composition (.) :: (b -> c) -> (a -> b) -> a -> c f . g = \ x -> f (g x) flip f takes i...
null
https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/tfp1/tests/SomePrelude.hs
haskell
constant function function composition right-associating infix application operators (useful in continuation-passing style) Boolean type Boolean functions Character type Maybe type Either type curry converts an uncurried function to a curried function; uncurry converts a curried function to a function on pai...
module SomePrelude where import Prelude (Bool(..),Maybe(..)) id :: a -> a id x = x const :: a -> b -> a const x _ = x (.) :: (b -> c) -> (a -> b) -> a -> c f . g = \ x -> f (g x) flip f takes its ( first ) two arguments in the reverse ord...
4ac18ff645234e833cc0a933bc5cfe174a6ba5f8fa4d2bf6d0b55736711be3c3
haskell-tools/haskell-tools
Fields_res.hs
module Refactor.OrganizeImports.Fields where import Control.Monad.State (Monad(..), StateT(runStateT)) import Control.Monad.Trans (MonadTrans(..)) x = runStateT (lift putStrLn >> return ()) ()
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/OrganizeImports/Fields_res.hs
haskell
module Refactor.OrganizeImports.Fields where import Control.Monad.State (Monad(..), StateT(runStateT)) import Control.Monad.Trans (MonadTrans(..)) x = runStateT (lift putStrLn >> return ()) ()
fff1fd5dec601dd53b646eb170aa0888be7babde8cb2670958bae096c81dcbd9
OlivierSohn/hamazed
Cyclic.hs
adapted from -Diaz/matrix to use an unboxed vector , -- allow indices rotation, and 0-index the matrix. # LANGUAGE NoImplicitPrelude # # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveLift #-} module Imj.Data.Matrix.Cyclic ( -- * Matrix type Matrix , nelems, nrows, ncols, rotation, mvect -- * Builders ...
null
https://raw.githubusercontent.com/OlivierSohn/hamazed/c0df1bb60a8538ac75e413d2f5bf0bf050e5bc37/imj-base/src/Imj/Data/Matrix/Cyclic.hs
haskell
allow indices rotation, and 0-index the matrix. # LANGUAGE DeriveLift # * Matrix type * Builders * Variations ** Rotations ** Interleaved ** Special matrices * List conversions * Accessing * Matrix operations * Linear transformations ----------------------------------------------------- ---------------------...
adapted from -Diaz/matrix to use an unboxed vector , # LANGUAGE NoImplicitPrelude # # LANGUAGE DeriveGeneric # module Imj.Data.Matrix.Cyclic ( Matrix , nelems, nrows, ncols, rotation, mvect , matrix , rowVector , colVector , setRotation , unsafeSetRotation , RotationOrder(..) , produceRotations,...
399377a113ba781f4d3f1d79e88372620983d70bd4802d98b445304036e2342b
akamai/cl-http2-protocol
flow-buffer.lisp
Copyright ( c ) 2014 Akamai Technologies , Inc. ( MIT License ) (in-package :cl-http2-protocol) (defclass flowbuffer-include () ((send-buffer :accessor send-buffer :initarg :send-buffer :initform nil)) (:documentation "Implementation of stream and connection DATA flow control: frames may be split and / or may b...
null
https://raw.githubusercontent.com/akamai/cl-http2-protocol/67fb6befe78ed1e52e1ba1f1e66a0a793119033e/flow-buffer.lisp
lisp
Copyright ( c ) 2014 Akamai Technologies , Inc. ( MIT License ) (in-package :cl-http2-protocol) (defclass flowbuffer-include () ((send-buffer :accessor send-buffer :initarg :send-buffer :initform nil)) (:documentation "Implementation of stream and connection DATA flow control: frames may be split and / or may b...
990a3fbb92ae9c92a15e2e2b7665a385a5116cf6c2a960a36cb7670e9e277def
tfausak/strive
Activities.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # -- | </> module Strive.Types.Activities ( ActivityDetailed (..), ActivitySummary (..), ActivityZoneDetailed (..), ActivityZoneDistributionBucket (..), ActivityLapSummary (..), ) where import Control.Applicative...
null
https://raw.githubusercontent.com/tfausak/strive/8bd61df4b2723301273b11589c5f237b42e934dc/source/library/Strive/Types/Activities.hs
haskell
# LANGUAGE OverloadedStrings # | </> | </#detailed> | </#summary> | </#zones> | </#zones> | </#laps>
# LANGUAGE LambdaCase # # LANGUAGE TemplateHaskell # module Strive.Types.Activities ( ActivityDetailed (..), ActivitySummary (..), ActivityZoneDetailed (..), ActivityZoneDistributionBucket (..), ActivityLapSummary (..), ) where import Control.Applicative (empty) import Data.Aeson (FromJSON, Value ...
7d94512fe40306e1637e362055eef19fe2aaf0ed3d6ac1ea875cf8e94e6b77f3
eudoxia0/lucerne
test.lisp
(in-package :cl-user) (defpackage {{name}}-test (:use :cl :fiveam)) (in-package :{{name}}-test) (def-suite tests :description "{{name}} tests.") (in-suite tests) (test simple-test (is (equal 1 1)) (is-true (and t t))) (run! 'tests)
null
https://raw.githubusercontent.com/eudoxia0/lucerne/7037f2c20d5bbf7a789bd9fe2e85eb1ed3ef247c/skeleton/t/test.lisp
lisp
(in-package :cl-user) (defpackage {{name}}-test (:use :cl :fiveam)) (in-package :{{name}}-test) (def-suite tests :description "{{name}} tests.") (in-suite tests) (test simple-test (is (equal 1 1)) (is-true (and t t))) (run! 'tests)
c38893effe916fe5f3696b0bbb0f94369c12b14314c7f9f98b38175f0f101ca8
JacquesCarette/Drasil
Main.hs
module Main (main) where import GHC.IO.Encoding import Language.Drasil.Generate (gen, DocSpec(DocSpec), DocType(SRS), Format(..), docChoices) import Drasil.Template.Body (srs, printSetting) main :: IO() main = do setLocaleEncoding utf8 gen (DocSpec (docChoices SRS [HTML, TeX, JSON]) "Template_SRS") srs printSetti...
null
https://raw.githubusercontent.com/JacquesCarette/Drasil/98c6e2e81bc1479010ce71b22960ab214a891159/code/drasil-example/template/app/Main.hs
haskell
module Main (main) where import GHC.IO.Encoding import Language.Drasil.Generate (gen, DocSpec(DocSpec), DocType(SRS), Format(..), docChoices) import Drasil.Template.Body (srs, printSetting) main :: IO() main = do setLocaleEncoding utf8 gen (DocSpec (docChoices SRS [HTML, TeX, JSON]) "Template_SRS") srs printSetti...
db578ecb054fa997366651a69dcad306671ccf984443eb8ca4e0da5dee7e1a42
minoki/haskell-floating-point
Unboxed.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE MultiParamTypeClasses # module Numeric.Rounded.Hardware.Vector.Unboxed ( roundedSum , zipWith_roundedAdd , zipWith_roundedSub , zipWith_roundedMul , zipWith3_roundedFusedMultiplyAdd , zipWith_roundedDiv , map_...
null
https://raw.githubusercontent.com/minoki/haskell-floating-point/7d7bb31bb2b07c637a5eaeda92fc622566e9b141/rounded-hw/src/Numeric/Rounded/Hardware/Vector/Unboxed.hs
haskell
| Equivalent to 'VU.sum' | Equivalent to @'VU.zipWith' (+)@ | Equivalent to @'VU.zipWith' (-)@ | Equivalent to @'VU.zipWith' (*)@ | Equivalent to @'VU.zipWith' (/)@ | Equivalent to @'VU.map' sqrt@
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE MultiParamTypeClasses # module Numeric.Rounded.Hardware.Vector.Unboxed ( roundedSum , zipWith_roundedAdd , zipWith_roundedSub , zipWith_roundedMul , zipWith3_roundedFusedMultiplyAdd , zipWith_roundedDiv , map_...
5189caf1ed6e66a72628fe548fd2efa9dc59619957ab8cd68fea7a06ce9e158e
hypernumbers/hypernumbers
wp_everybody_inline_test_SUITE.erl
%%%----------------------------------------------------------------------------- %%% File : webpage_test_suite.erl Author : < > %%% Description : tests security for a webpage view %%% Created : 30 August 2010 by %%%----------------------------------------------------------------------------- ...
null
https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/tests/security_test/wp_everybody_inline_test_SUITE.erl
erlang
----------------------------------------------------------------------------- File : webpage_test_suite.erl Description : tests security for a webpage view ----------------------------------------------------------------------------- Note: This directive should only be used in test suites. callbacks tests ...
Author : < > Created : 30 August 2010 by -module(wp_everybody_inline_test_SUITE). -compile(export_all). -include("test_server.hrl"). -define(SITE, ":9000"). -define(test(Name, Path, Input, Expected), Name(_Config) -> URL = ?SITE++Path, Got = test:post_logge...
e3fefa2c3bf7f76b6e6e7bf20552665a1bc9508b7e58a4fcb6c1b6035b5b4b6c
cvogt/2020-07-01-haskell-game-demo
Visualize.hs
module Platformer.Visualize where import qualified Data.Map as Map import My.Prelude import Platformer.GameState import Playtime visualize :: (TextureId -> Pos -> Sprite) -> EngineState -> GameState -> [Sprite] visualize sprite EngineState {..} GameState {..} = [sprite MainCharacter gsMainCharacter] <> room where...
null
https://raw.githubusercontent.com/cvogt/2020-07-01-haskell-game-demo/f90fcd19ea79802774dcfafe8505415d6f8c8a8b/platformer/Platformer/Visualize.hs
haskell
module Platformer.Visualize where import qualified Data.Map as Map import My.Prelude import Platformer.GameState import Playtime visualize :: (TextureId -> Pos -> Sprite) -> EngineState -> GameState -> [Sprite] visualize sprite EngineState {..} GameState {..} = [sprite MainCharacter gsMainCharacter] <> room where...
f9a39751ee684c1c1a325cd9128b22d39fe92685cf77ee919c237c351aeab992
sbcl/sbcl
def-to-lisp.lisp
(in-package #:sb-grovel) (defvar *default-c-stream* nil) (defun split-cflags (string) (remove-if (lambda (flag) (zerop (length flag))) (loop for start = 0 then (if end (1+ end) nil) for end = (and start (position #\Space string :start start)) ...
null
https://raw.githubusercontent.com/sbcl/sbcl/da10b7852450d4f5e5f172cbeaff43e71f64e019/contrib/sb-grovel/def-to-lisp.lisp
lisp
offset length functions accepting them declare them as signed Cast to signed long when possible. Other platforms do not seem to be affected by this, but we used to cast everything to INT on x86-64, preserve that behaviour. Very important: This OUTPUT formal parameter should ** literally ** be (USE-PACKAGE "ASDF...
(in-package #:sb-grovel) (defvar *default-c-stream* nil) (defun split-cflags (string) (remove-if (lambda (flag) (zerop (length flag))) (loop for start = 0 then (if end (1+ end) nil) for end = (and start (position #\Space string :start start)) ...
27a4298560640a9491826663082f9e1e00ea13b8cee468afc605d1decf3e0513
degree9/uikit-hl
transition.cljs
(ns uikit-hl.transition (:require [hoplon.core :as h] [hoplon.jquery])) (defn- format-transition [transition] (str "uk-transition-" transition)) (defmethod h/do! ::default [elem kw v] (h/do! elem :class {(format-transition (name kw)) v}))
null
https://raw.githubusercontent.com/degree9/uikit-hl/b226b1429ea50f8e9a6c1d12c082a3be504dda33/src/uikit_hl/transition.cljs
clojure
(ns uikit-hl.transition (:require [hoplon.core :as h] [hoplon.jquery])) (defn- format-transition [transition] (str "uk-transition-" transition)) (defmethod h/do! ::default [elem kw v] (h/do! elem :class {(format-transition (name kw)) v}))
26894c884d8744ac6c18c1b45d86a935b160e7285dc76c40b9479ee53eb57757
CloudI/CloudI
weird_types.erl
-*- coding : utf-8 -*- -*- erlang - indent - level : 2 -*- %%% ------------------------------------------------------------------- Copyright 2010 - 2020 < > , < > and < > %%% This file is part of PropEr . %%% %%% PropEr is free software: you can redistribute it a...
null
https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/proper/test/weird_types.erl
erlang
------------------------------------------------------------------- PropEr is free software: you can redistribute it and/or modify (at your option) any later version. PropEr is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITN...
-*- coding : utf-8 -*- -*- erlang - indent - level : 2 -*- Copyright 2010 - 2020 < > , < > and < > This file is part of PropEr . it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the Licens...
537c92dc862f768c215892c6a04abde6ec0a47279fedab312ceb0a0de3497c47
reagent-project/reagent
dom.cljs
(ns reagent.dom (:require [react-dom :as react-dom] [reagent.impl.util :as util] [reagent.impl.template :as tmpl] [reagent.impl.batching :as batch] [reagent.impl.protocols :as p] [reagent.ratom :as ratom])) (defonce ^:private roots (atom {})) (defn- unmoun...
null
https://raw.githubusercontent.com/reagent-project/reagent/ce80585e9aebe0a6df09bda1530773aa512f6103/src/reagent/dom.cljs
clojure
(ns reagent.dom (:require [react-dom :as react-dom] [reagent.impl.util :as util] [reagent.impl.template :as tmpl] [reagent.impl.batching :as batch] [reagent.impl.protocols :as p] [reagent.ratom :as ratom])) (defonce ^:private roots (atom {})) (defn- unmoun...
380e12897db211e250808a2d781b92c3bb7988771b8a94a683f9ecf893d712cb
snapframework/io-streams
List.hs
{-# LANGUAGE BangPatterns #-} -- | List conversions and utilities. module System.IO.Streams.List ( -- * List conversions fromList , toList , outputToList , writeList -- * Utility , chunkList , chunkListWith , concatLists , listOutputStream ) where -----------------------------------------------------...
null
https://raw.githubusercontent.com/snapframework/io-streams/ae692fee732adea9fe843fb3efe0dd43a6993844/src/System/IO/Streams/List.hs
haskell
# LANGUAGE BangPatterns # | List conversions and utilities. * List conversions * Utility ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- --------------------------------------------------------------------------...
module System.IO.Streams.List fromList , toList , outputToList , writeList , chunkList , chunkListWith , concatLists , listOutputStream ) where import Control.Concurrent.MVar (modifyMVar, modifyMVar_, newMVar) import Control.Monad.IO.Class (MonadIO (..)) import Data.I...
55b9af480523c7c16c9c46744751d046739e849d7e35ab42a85a43696e4d0f25
JustusAdam/schedule-planner
SchedulePlanner.hs
# LANGUAGE CPP # | Module : $ Header$ Description : Collective umbrella module for the Application Copyright : ( c ) , 2015 License : LGPL-3 Maintainer : Stability : experimental Portability : POSIX No intrinsic use . Only harbors submodules . Module : $Header$ Description ...
null
https://raw.githubusercontent.com/JustusAdam/schedule-planner/ba501c4c8332b5e11379fb500d867fdc8082d482/src/SchedulePlanner.hs
haskell
, scrape
# LANGUAGE CPP # | Module : $ Header$ Description : Collective umbrella module for the Application Copyright : ( c ) , 2015 License : LGPL-3 Maintainer : Stability : experimental Portability : POSIX No intrinsic use . Only harbors submodules . Module : $Header$ Description ...
a3523effe7884eccebd190d8025de3d0094fe6d7c3683f0bfd05a257b4f92957
rudymatela/extrapolate
ConditionalGeneralization.hs
-- | -- Module : Test.Extrapolate.ConditionalGeneralization Copyright : ( c ) 2017 - 2019 License : 3 - Clause BSD ( see the file LICENSE ) Maintainer : < > -- -- This module is part of Extrapolate, -- a library for generalization of counter-examples. -- -- This defines utilities for conditi...
null
https://raw.githubusercontent.com/rudymatela/extrapolate/0b3ca28eed0d04358b2fb033664476f8b29821a6/src/Test/Extrapolate/ConditionalGeneralization.hs
haskell
| Module : Test.Extrapolate.ConditionalGeneralization This module is part of Extrapolate, a library for generalization of counter-examples. This defines utilities for conditional generalization. You are probably better off importing "Test.Extrapolate". is always useful to check if a generalization withou...
Copyright : ( c ) 2017 - 2019 License : 3 - Clause BSD ( see the file LICENSE ) Maintainer : < > module Test.Extrapolate.ConditionalGeneralization ( conditionalCounterExampleGeneralizations , validConditions , candidateConditions ) where import Data.Ratio import Test.LeanCheck.Error (er...
58d221539eefb2ce43c7539f48e61d4dda1712e3aa2254259729804f8a1df08a
xapi-project/xen-api
suspend_image.ml
* Copyright ( C ) 2006 - 2014 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 describe...
null
https://raw.githubusercontent.com/xapi-project/xen-api/48cc1489fff0e344246ecf19fc1ebed6f09c7471/ocaml/xenopsd/lib/suspend_image.ml
ocaml
All additional fields below should use the [@sexp.option] extension length
* Copyright ( C ) 2006 - 2014 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 describe...
0aeca75657491c328a1e1d2e61cbf6bb7c4894776a063585e2580df15eb0e87f
clojurecup2014/parade-route
core.clj
(ns unity.core (:require [unity.reflect :as r] unity.messages) (:import [UnityEngine MonoBehaviour])) ;; ============================================================ ;; defscript ;; ============================================================ (defn- parse-opts [s] (loop [opts {} [k v & rs :as s] s]...
null
https://raw.githubusercontent.com/clojurecup2014/parade-route/adb2e1ea202228e3da07902849dee08f0bb8d81c/Assets/Clojure/Libraries/unity/core.clj
clojure
============================================================ defscript ============================================================ make all fields mutable add protocol declaration for known unity messages wrap method bodies in typehinted let bindings ============================================================...
(ns unity.core (:require [unity.reflect :as r] unity.messages) (:import [UnityEngine MonoBehaviour])) (defn- parse-opts [s] (loop [opts {} [k v & rs :as s] s] (if (keyword? k) (recur (assoc opts k v) rs) [opts s]))) (defn- parse-impls [specs] (loop [ret {} s specs] (if (seq s)...
37298d5ae9962018646b0c3682a7c14adf2803aee1b8cc2aa47b4f8049b7e665
ghc/nofib
EtaAbstract.hs
-- ==========================================================-- -- === Add parameters to supercombinators which ===-- = = = otherwise return functions EtaAbstract.hs = = = -- -- ==========================================================-- module EtaAbstract where import BaseDefs import Utils imp...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/real/anna/EtaAbstract.hs
haskell
==========================================================-- === Add parameters to supercombinators which ===-- ==========================================================-- ==========================================================-- Doesn't assume that the tree has been lambda-lifted. It does however ...
module EtaAbstract where import BaseDefs import Utils import MyUtils eaEtaAbstract :: AnnExpr Naam TExpr -> AnnExpr Naam TExpr eaEtaAbstract ae@(tau, AVar v) = ae eaEtaAbstract ae@(tau, ANum n) = ae eaEtaAbstract ae@(tau, AConstr c) = ae eaEtaAbstract ae@(tau, AAp e1 e2) = (tau, AAp (e...
f9feae57045f04ad81f29417d8e8df3063d5bb2a567add3dca3e32094baeec6a
aleator/CV
Function.hs
# LANGUAGE PatternGuards # module Utils.Function where both f (x,y) = (f x, f y) with f = \x -> (x, f x) under a b = \x y -> a (b x y) -- Numerical functions affine1d (toA,toB) (fromA,fromB) x = x1 where x0 = (x - toA)/(toB-toA) x1 = x0*(fromB-fromA) + fromA mkFst f a = (f a, a) mkSnd f a = (a, f a)...
null
https://raw.githubusercontent.com/aleator/CV/1e2c9116bcaacdf305044c861a1b36d0d8fb71b7/Utils/Function.hs
haskell
Numerical functions
# LANGUAGE PatternGuards # module Utils.Function where both f (x,y) = (f x, f y) with f = \x -> (x, f x) under a b = \x y -> a (b x y) affine1d (toA,toB) (fromA,fromB) x = x1 where x0 = (x - toA)/(toB-toA) x1 = x0*(fromB-fromA) + fromA mkFst f a = (f a, a) mkSnd f a = (a, f a) For . Find a prop...
18749bad6e52f1093b53f15c7eea39b49b54db5d02d63ed66774797cc785a5c8
fukamachi/clozure-cl
nx2.lisp
;;;-*-Mode: LISP; Package: ccl -*- ;;; Copyright ( C ) 2008 - 2009 Clozure Associates and contributors This file is part of Clozure CL . ;;; Clozure CL is licensed under the terms of the Lisp Lesser GNU Public License , known as the LLGPL and distributed with Clozure CL as the ;;; file "LICENSE". T...
null
https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/compiler/nx2.lisp
lisp
-*-Mode: LISP; Package: ccl -*- file "LICENSE". The LLGPL consists of a preamble and the LGPL, conflict, the preamble takes precedence. Clozure CL is referenced in the preamble as the "LIBRARY." The LLGPL is also available online at Shared compiler backend utilities and infrastructure. Return a...
Copyright ( C ) 2008 - 2009 Clozure Associates and contributors This file is part of Clozure CL . Clozure CL is licensed under the terms of the Lisp Lesser GNU Public License , known as the LLGPL and distributed with Clozure CL as the which is distributed with Clozure CL as the file " LGPL " . W...
0b9c06492c058e4e2f20ebab0914514176fcdf390d01c39636b29bedeee9447f
gregnwosu/haskellbook
chapter8.hs
module Chapter7 where mc91 :: Integral a => a -> a mc91 x | x > 100 = x - 10 | otherwise = mc91 . mc91 $ x+11
null
https://raw.githubusercontent.com/gregnwosu/haskellbook/b21fb6772e58f07cff334d9c551d0477ec856897/chapter8/chapter8.hs
haskell
module Chapter7 where mc91 :: Integral a => a -> a mc91 x | x > 100 = x - 10 | otherwise = mc91 . mc91 $ x+11
55450ce59e24e5cc0f4c7c1b2b9fca631d740340b47d950cddffce5aabec68ab
kumarshantanu/citius
core_test.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 LICENSE at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; the ...
null
https://raw.githubusercontent.com/kumarshantanu/citius/3ef839a845379a20aa5b54855aee2e0023ef2a58/test/citius/core_test.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 LICENSE at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this ...
Copyright ( c ) . All rights reserved . (ns citius.core-test (:require [clojure.string :as s] [clojure.test :refer [deftest use-fixtures]] [citius.core :as c])) (use-fixtures :once (c/make-bench-wrapper ["pig" "horse" "cheetah"] {:chart-title "Animals" ...
c96526f055400f9d27aaeb058dbec0c337c05b850b3d2faa8db65e352ba60ade
fdopen/uwt
help.mli
val timeout : int option val wait : unit -> unit Lwt.t val clean : unit -> unit val write_something: string -> 'a Lwt.t
null
https://raw.githubusercontent.com/fdopen/uwt/44276aa6755b92eddc9ad58662a968afad243e8b/examples/help.mli
ocaml
val timeout : int option val wait : unit -> unit Lwt.t val clean : unit -> unit val write_something: string -> 'a Lwt.t
962b8386147b8ed80b6d92e53ca0b090d699ff8ae8386beafcafbdee60423b9f
vaclavsvejcar/headroom
Header.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # -- | -- Module : Headroom.Header -- Description : Operations with copyright/license headers Copyright ...
null
https://raw.githubusercontent.com/vaclavsvejcar/headroom/3b20a89568248259d59f83f274f60f6e13d16f93/src/Headroom/Header.hs
haskell
# LANGUAGE OverloadedStrings # | Module : Headroom.Header Description : Operations with copyright/license headers License : BSD-3-Clause Maintainer : Stability : experimental Portability : POSIX This module is the heart of /Headroom/ as it contains functions for working with * Header Info Extract...
# LANGUAGE FlexibleContexts # # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # Copyright : ( c ) 2019 - 2022 the /license headers/ and the /source code files/. module Headroom.Header extractHeaderInfo , e...
a8f719c8a41efda541e4c40a31f320de3fb5623c8885874eeb8d743a69e376ba
reborg/clojure-essential-reference
6.clj
< 1 > # { [ 1 " a " : y ] [ 1 " b " :x ] } < 2 > # { [ 1 " a " : y ] [ 1 " b " :x ] }
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Sets/sorted-setandsorted-set-by/6.clj
clojure
< 1 > # { [ 1 " a " : y ] [ 1 " b " :x ] } < 2 > # { [ 1 " a " : y ] [ 1 " b " :x ] }
23c07da7905f6b302cbeade4af0cae47e57b721465feefcb51fd146166074f39
lojic/LearningRacket
concurrency.rkt
#lang racket (require racket/async-channel) (provide define/atomic define/atomchan) (define-syntax-rule (define/atomic (name arg ...) E ...) (define name (let ([sema (make-semaphore 1)]) (lambda (arg ...) (dynamic-wind (λ () (semaphore-wait sema)) (λ () E ...) ...
null
https://raw.githubusercontent.com/lojic/LearningRacket/eb0e75b0e16d3e0a91b8fa6612e2678a9e12e8c7/exercism.io/concurrency.rkt
racket
#lang racket (require racket/async-channel) (provide define/atomic define/atomchan) (define-syntax-rule (define/atomic (name arg ...) E ...) (define name (let ([sema (make-semaphore 1)]) (lambda (arg ...) (dynamic-wind (λ () (semaphore-wait sema)) (λ () E ...) ...
659b074fc54ef4b6c2b94fa717165ce757c53ec203147edd2d38d5f8bbaa85b3
mRrvz/bmstu-ca
Parse.hs
module Parse ( parseTable, toDouble, toInt, tuple ) where type ValueTable = [[Double]] parseTable :: [String] -> ValueTable parseTable = map (map (\x -> read x :: Double)) . map words toDouble :: String -> Double toDouble x = read x :: Double toInt :: String -> Int toInt x = read x :: Int tuple :: ...
null
https://raw.githubusercontent.com/mRrvz/bmstu-ca/866a32b37878d45006ec3c4f99f67983ae681717/lab_02/src/Parse.hs
haskell
module Parse ( parseTable, toDouble, toInt, tuple ) where type ValueTable = [[Double]] parseTable :: [String] -> ValueTable parseTable = map (map (\x -> read x :: Double)) . map words toDouble :: String -> Double toDouble x = read x :: Double toInt :: String -> Int toInt x = read x :: Int tuple :: ...
ff195ad57d47b3eed3a98906055da51cc7ae36b23fa5628bcb7ba267d0004106
conscell/hugs-android
Configure.hs
# OPTIONS_GHC -cpp # ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Configure Copyright : 2003 - 2005 -- Maintainer : < > -- Stability : alpha -- Portability : portable -- -- Explanation: Perform the \"@.\/setup configure@\...
null
https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/packages/Cabal/Distribution/Simple/Configure.hs
haskell
--------------------------------------------------------------------------- | Module : Distribution.Simple.Configure Stability : alpha Portability : portable Explanation: Perform the \"@.\/setup configure@\" action. ----------------------------------------------------------------------------- * Conf...
# OPTIONS_GHC -cpp # Copyright : 2003 - 2005 Maintainer : < > Outputs the @.setup - config@ file . All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : * Redistribution...
30bb10d3ea0828c9d99ca2d5d6bd755b0082097127230cae3f4f3dd7196f6436
project-oak/hafnium-verification
typeErr.mli
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/nullsafe/typeErr.mli
ocaml
* Module for Type Error messages. InstrRefT callee signature * Instance of an error
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
f1363bb6f32c8f1156a824198204bbed2c15e0aa2f1a4fda1f53d5ccf2e1478f
ghcjs/jsaddle-dom
HTMLMeterElement.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.HTMLMeterElement (setValue, getValue, setMin, getMin, setMax, getMax, setLow, getLow, setHigh, getHigh, set...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/HTMLMeterElement.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.HTMLMeterElement (setValue, getValue, setMin, getMin, setMax, getMax, setLow, getLow, setHigh, getHigh, setOptimum, getOptimum, getLabels, HTMLMeterElement(..), gTypeHTMLMeterElement) where i...
899285f1bac834cfe3bc183a21f0721bdfdbb5cab05502039dc0b1b23f1e5078
deadpendency/deadpendency
Main.hs
module Main ( main, ) where import RG.TheMain (theMain) main :: IO () main = theMain
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/report-generator/app/Main.hs
haskell
module Main ( main, ) where import RG.TheMain (theMain) main :: IO () main = theMain
5bc09ac92721123e45e82df6270caf8c0b5bae0ec398923ece9dd5c538d2b140
imrehg/ypsilon
r6rs-lib.scm
Note : This file must be utf-8 . Confirm you see lambda - > " λ " (import (core) (test-lite)) (format #t "Test Examples of R6RS Standard Libraries\n\n") (test-begin "1.1 Characters") (test-equal "char 1" (char-upcase #\i) => #\I) (test-equal "char 1" (char-downcase #\i) => #\i) (test-equal "char 2" (char-titlecas...
null
https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/test/r6rs-lib.scm
scheme
fix errarum in R6RS (fujita) fix errarum in R6RS (fujita) add port => &syntax exception) => &syntax exception) => &syntax exception) => &syntax exception) (define f (lambda (x) (g (* x x)))) (define g (lambda (x) (+ x x))) fix errarum in R6RS 12.8 ( fujita )
Note : This file must be utf-8 . Confirm you see lambda - > " λ " (import (core) (test-lite)) (format #t "Test Examples of R6RS Standard Libraries\n\n") (test-begin "1.1 Characters") (test-equal "char 1" (char-upcase #\i) => #\I) (test-equal "char 1" (char-downcase #\i) => #\i) (test-equal "char 2" (char-titlecas...
a6eabf0a729ced3d126ca2110a759c12274e788863f3f1d2666d8dd3aeedfe52
TheLortex/mirage-monorepo
test.ml
open Eio.Std module Ctf = Eio.Private.Ctf let () = Logs.(set_level ~all:true (Some Debug)); Logs.set_reporter @@ Logs.format_reporter (); Printexc.record_backtrace true let read_one_byte ~sw r = Fiber.fork_promise ~sw (fun () -> let r = Option.get (Eio_linux.get_fd_opt r) in Eio_linux.Low_level.a...
null
https://raw.githubusercontent.com/TheLortex/mirage-monorepo/0c29acffaf08dc0008097d36225a14960769f132/duniverse/eio/lib_eio_linux/tests/test.ml
ocaml
Write a string to a pipe and read it out again.
open Eio.Std module Ctf = Eio.Private.Ctf let () = Logs.(set_level ~all:true (Some Debug)); Logs.set_reporter @@ Logs.format_reporter (); Printexc.record_backtrace true let read_one_byte ~sw r = Fiber.fork_promise ~sw (fun () -> let r = Option.get (Eio_linux.get_fd_opt r) in Eio_linux.Low_level.a...
de93e9cad18c914d80ad626ba756b337d60d44846b9aeac506ca761238525e6f
CarlWright/NGerlguten
planningSheet.erl
%%====================================================================== %% Purpose: Grid planning sheet %%---------------------------------------------------------------------- Copyright ( C ) 2003 %% %% General Terms %% Erlguten is free software . It can be used , modified and %% redis...
null
https://raw.githubusercontent.com/CarlWright/NGerlguten/3c87f2e3a44ae9069f9379933b99c0feb8262d66/lib/ng_examples/src/planningSheet.erl
erlang
====================================================================== Purpose: Grid planning sheet ---------------------------------------------------------------------- General Terms redistributed by anybody for personal or commercial use. The only restriction is altering the copyright notice associ...
Copyright ( C ) 2003 Erlguten is free software . It can be used , modified and modify the Erlguten engine . All material developed with the Erlguten Authors : < > ( ) Last Edit : 2010 - 04 - 14 -module(planningSheet). -import(eg_pdf_op, [n2s/1]). -import(eg_...
c1854f05d2bc24f3abf651d25a5748ed69a4977cf73dd6a862e4fc695a6b1c8e
Vetd-Inc/vetd-app
vendors.clj
(ns com.vetd.app.vendors (:require [com.vetd.app.db :as db] [com.vetd.app.common :as com] [com.vetd.app.util :as ut] [com.vetd.app.docs :as docs] [com.vetd.app.hasura :as ha] [taoensso.timbre :as log] [clj-http.client :as http] [miker...
null
https://raw.githubusercontent.com/Vetd-Inc/vetd-app/9b33b1443b9d84d39305a63fc58119f8e014cf11/src/clj/com/vetd/app/vendors.clj
clojure
TODO?? This is crazy slow and could definitely be improved, but... doesn't matter??
(ns com.vetd.app.vendors (:require [com.vetd.app.db :as db] [com.vetd.app.common :as com] [com.vetd.app.util :as ut] [com.vetd.app.docs :as docs] [com.vetd.app.hasura :as ha] [taoensso.timbre :as log] [clj-http.client :as http] [miker...
e699f054c787e5051393b150e56c122bc39285402fe47f251f353a486bf6f464
tonyrog/bt
bt_mon.erl
@author < > ( C ) 2022 , %%% @doc %%% Simple RF comm monitor %%% @end Created : 4 May 2022 by < > -module(bt_mon). -export([rfcomm/2]). -export([l2cap/2]). %% rfcomm monitor loop rfcomm(Address, Channel) -> case rfcomm:connect(Address, Channel, 10000) of {ok, Ref} -> Res = rfcomm_loop(R...
null
https://raw.githubusercontent.com/tonyrog/bt/66198811aa37b4e60c334c9dff65a186b405d681/src/bt_mon.erl
erlang
@doc Simple RF comm monitor @end rfcomm monitor loop io:format("read continue\n", []), detect close? l2cap monitor loop io:format("read continue\n", []),
@author < > ( C ) 2022 , Created : 4 May 2022 by < > -module(bt_mon). -export([rfcomm/2]). -export([l2cap/2]). rfcomm(Address, Channel) -> case rfcomm:connect(Address, Channel, 10000) of {ok, Ref} -> Res = rfcomm_loop(Ref), rfcomm:close(Ref), Res; Error -> Error end. r...
acb1b19b1ddd02bedb6e46b0f67d93f44a65b53e5fac4f4b15f0c2ddc3749765
NelosG/fp-tests
T6Spec.hs
{-# LANGUAGE ScopedTypeVariables, QuasiQuotes #-} module Hi.Test.T6Spec (spec) where import Text.RawString.QQ import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range import Test.Hspec.Hedgehog import Data.Text import Hi.Test.Common import Numeric (showHex) spec :: Spec spec = do describe "byte...
null
https://raw.githubusercontent.com/NelosG/fp-tests/c383e34e98db238a2de43cda54b43b5fa6ee6e7f/hw3/test/Hi/Test/T6Spec.hs
haskell
# LANGUAGE ScopedTypeVariables, QuasiQuotes #
module Hi.Test.T6Spec (spec) where import Text.RawString.QQ import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range import Test.Hspec.Hedgehog import Data.Text import Hi.Test.Common import Numeric (showHex) spec :: Spec spec = do describe "bytes" $ do it "const" $ do "pack-bytes([ 3,...
33560b8ec9c397a99d0f39c88d0c4b7b11d17bc0b904eb8399703fa48b4ca764
stain/rdf-clj
utils.clj
(ns rdf.utils (:import [java.util UUID]) (:require [clojure.string :as string]) ) (defmacro if-instance [type value & body] `(if (instance? ~type ~value) ~value ~@body)) (defn uuid (^UUID [] (java.util.UUID/randomUUID)) (^UUID [id] (if-instance UUID id ; otherwise, parse as string (...
null
https://raw.githubusercontent.com/stain/rdf-clj/3fc767af3c561cf85b661c27b8d014d395190519/src/rdf/utils.clj
clojure
otherwise, parse as string
(ns rdf.utils (:import [java.util UUID]) (:require [clojure.string :as string]) ) (defmacro if-instance [type value & body] `(if (instance? ~type ~value) ~value ~@body)) (defn uuid (^UUID [] (java.util.UUID/randomUUID)) (^UUID [id] (if-instance UUID id (java.util.UUID/fromString (str id))...
e0eaa84edd0cf8d4db2a5493f38831c5db589dddb449cce5eb24cca887cc239a
rmculpepper/crypto
digest.rkt
Copyright 2018 ;; ;; This library is free software: you can redistribute it and/or modify ;; it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or ;; (at your option) any later version. ;; ;; This library is distributed in...
null
https://raw.githubusercontent.com/rmculpepper/crypto/fec745e8af7e3f4d5eaf83407dde2817de4c2eb0/crypto-lib/private/decaf/digest.rkt
racket
This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCH...
Copyright 2018 by the Free Software Foundation , either version 3 of the License , or GNU Lesser General Public License for more details . You should have received a copy of the GNU Lesser General Public License #lang racket/base (require racket/class ffi/unsafe "../common/digest.rkt" ...
3ade7dcbfa29f08e9d0b9a7ce2f90645168680e1eac94fa76107163f810f085c
gas2serra/cldk
image-prim.lisp
(in-package :cldk-internals) #+nil (declaim (optimize speed)) ;;; Utilities ;;; (defparameter *alpha-epsilon* 10) (defmacro with-make-image-bounds ((width height) &body code) `(let ((,width (round ,width)) (,height (round ,height))) ,@code)) (defmacro with-set-image-bounds ((src-img x y width heig...
null
https://raw.githubusercontent.com/gas2serra/cldk/63c8322aedac44249ff8f28cd4f5f59a48ab1441/Core/image/image-prim.lisp
lisp
TO FIX ROUNDING TO FIX ROUNDING TO FIX ROUNDING generic primitives -fn call- call- set call blend
(in-package :cldk-internals) #+nil (declaim (optimize speed)) Utilities (defparameter *alpha-epsilon* 10) (defmacro with-make-image-bounds ((width height) &body code) `(let ((,width (round ,width)) (,height (round ,height))) ,@code)) (defmacro with-set-image-bounds ((src-img x y width height) &bod...
5ddc90e6718bc84f3a611f16dc34dca73c9761d4316139fa87015c455b3e5d1c
hopbit/sonic-pi-snippets
dp_str_0.sps
# key: dp str 0 # point_line: 0 # point_index: 0 # -- # DP STR 0 # Let's start with simple dnb live loop set_volume! 1 live_loop :metronome do use_bpm 170 puts "---> Bar: #{tick} <---" 32.times do |b| puts "# Beat: #{b}" ##| sample :drum_snare_hard sleep 1 end end # -lipka-vocals-freebie live_loop...
null
https://raw.githubusercontent.com/hopbit/sonic-pi-snippets/2232854ac9587fc2f9f684ba04d7476e2dbaa288/dp/dp_str_0.sps
scheme
# key: dp str 0 # point_line: 0 # point_index: 0 # -- # DP STR 0 # Let's start with simple dnb live loop set_volume! 1 live_loop :metronome do use_bpm 170 puts "---> Bar: #{tick} <---" 32.times do |b| puts "# Beat: #{b}" ##| sample :drum_snare_hard sleep 1 end end # -lipka-vocals-freebie live_loop...
037bd4742e738b02ad44ee0ffe7eebf15e49c085ffec81181fcc8f917edc2078
BillHallahan/G2
Test20.hs
{-@ LIQUID "--short-names" @-} {-@ LIQUID "--no-termination" @-} {-@ LIQUID "--prune-unsorted" @-} module Combined (f) where import Data.List (minimumBy) @ f : : [ Int ] - > ( Int , { v : Int | v = 1 } ) @ f :: [Int] -> (Int, Int) f = g g :: [Int] -> (Int, Int) g cs = (minimumBy (\_ _ -> LT) cs, 1)
null
https://raw.githubusercontent.com/BillHallahan/G2/21c648d38c380041a9036d0e375ec1d54120f6b4/tests_lh/test_files/Pos/Test20.hs
haskell
@ LIQUID "--short-names" @ @ LIQUID "--no-termination" @ @ LIQUID "--prune-unsorted" @
module Combined (f) where import Data.List (minimumBy) @ f : : [ Int ] - > ( Int , { v : Int | v = 1 } ) @ f :: [Int] -> (Int, Int) f = g g :: [Int] -> (Int, Int) g cs = (minimumBy (\_ _ -> LT) cs, 1)
ff139892e8e92c93b0daacf13f304c11e281c24b278f326de60dd22690ae8c42
arohner/spectrum
recur.clj
(ns spectrum.examples.good.recur (:require [clojure.spec.alpha :as s])) (s/fdef foo :args (s/cat :i integer?) :ret even?) (defn foo [x] (if (even? x) x (recur (inc x))))
null
https://raw.githubusercontent.com/arohner/spectrum/72b47a91a5ce4567eed547507d25b2528f48c2d1/test/spectrum/examples/good/recur.clj
clojure
(ns spectrum.examples.good.recur (:require [clojure.spec.alpha :as s])) (s/fdef foo :args (s/cat :i integer?) :ret even?) (defn foo [x] (if (even? x) x (recur (inc x))))
f468a5abd2c172789b9160526acc53943e31e7e4eb730721e62e4a98b6fbee7d
JKTKops/cspim
Pass.hs
module MIPS.Peephole.Pass where import MIPS.Peephole.CleanJumps import MIPS.Peephole.Liveness import MIPS.Language import Control.Monad.Identity runMipsPeepholePass :: Program -> Program runMipsPeepholePass prog = runIdentity $ pass prog where pass = liveness >=> cleanJumps
null
https://raw.githubusercontent.com/JKTKops/cspim/0218d88ee774023eecef2c4a0733c3cf1184f443/src/MIPS/Peephole/Pass.hs
haskell
module MIPS.Peephole.Pass where import MIPS.Peephole.CleanJumps import MIPS.Peephole.Liveness import MIPS.Language import Control.Monad.Identity runMipsPeepholePass :: Program -> Program runMipsPeepholePass prog = runIdentity $ pass prog where pass = liveness >=> cleanJumps
0aa42e40339f3366390a84a0d1ff2b4511a7e078b676941ba0deb782327ec556
Viasat/halite
md_tag.clj
Copyright ( c ) 2022 Viasat , Inc. Licensed under the MIT license (ns com.viasat.halite.doc.md-tag (:require [com.viasat.halite.doc.utils :as utils])) (set! *warn-on-reflection* true) (defn tag-md [{:keys [lang op-maps op-maps-j tag-map tag-map-j]} {:keys [prefix get-link-f get-svg-link-f get-reference-links-f...
null
https://raw.githubusercontent.com/Viasat/halite/5a434fa2276f5f2654c4d91045595ae5bbc6580e/src/com/viasat/halite/doc/md_tag.clj
clojure
Copyright ( c ) 2022 Viasat , Inc. Licensed under the MIT license (ns com.viasat.halite.doc.md-tag (:require [com.viasat.halite.doc.utils :as utils])) (set! *warn-on-reflection* true) (defn tag-md [{:keys [lang op-maps op-maps-j tag-map tag-map-j]} {:keys [prefix get-link-f get-svg-link-f get-reference-links-f...
b4b891aac4f9c5c1d8b24364fbd6b4b373a1aa0a6810eb15733b6a8801f32636
aantron/dream
websocket.ml
This file is part of Dream , released under the MIT license . See LICENSE.md for details , or visit . Copyright 2022 for details, or visit . Copyright 2022 Anton Bachin *) module Stream = Dream_pure.Stream let websocket_handler stream socket = (* Queue of received frames. There doesn't ap...
null
https://raw.githubusercontent.com/aantron/dream/10a6e3459ffcf10e9174b7c2db1a99b3b452abff/src/http/shared/websocket.ml
ocaml
Queue of received frames. There doesn't appear to be a nice way to achieve backpressure with the current API of websocket/af, so that will have to be added later. The user-facing API of Dream does support backpressure. Frame reader called by websocket/af on each frame received. There is no good way to...
This file is part of Dream , released under the MIT license . See LICENSE.md for details , or visit . Copyright 2022 for details, or visit . Copyright 2022 Anton Bachin *) module Stream = Dream_pure.Stream let websocket_handler stream socket = let frames, push_frame = Lwt_stream.create ()...
453b8f56e5b2db278bb6243722eeb6534d13c81d638834188b50766d94ad35c8
asciidoctor/asciidoctor-lein-plugin
project.clj
(defproject example "0.1.0-SNAPSHOT" :description "Simple example of using lein-asciidoctor" :url "-lein-plugin/tree/master/example" :license {:name "The MIT License" :url "-lein-plugin/blob/master/LICENSE.adoc"} ; List of plugins :plugins [[lein-asciidoctor "0.1.17"]] ; List of hooks It 's ...
null
https://raw.githubusercontent.com/asciidoctor/asciidoctor-lein-plugin/19eb05468c937c491a6a897516c04f40a3396d60/example/project.clj
clojure
List of plugins List of hooks lein-asciidoctor configuration
(defproject example "0.1.0-SNAPSHOT" :description "Simple example of using lein-asciidoctor" :url "-lein-plugin/tree/master/example" :license {:name "The MIT License" :url "-lein-plugin/blob/master/LICENSE.adoc"} :plugins [[lein-asciidoctor "0.1.17"]] It 's used for running during compile pha...
c09321eb302b70d9acd3ad80b3922337af747f38a0736df5d2030e0d8e6c37d9
rbkmoney/erlang_capi_v2
capi_handler_analytics.erl
-module(capi_handler_analytics). -include_lib("damsel/include/dmsl_merch_stat_thrift.hrl"). -behaviour(capi_handler). -export([prepare/3]). -import(capi_handler_utils, [logic_error/2]). -spec prepare( OperationID :: capi_handler:operation_id(), Req :: capi_handler:request_data(), Context :: capi_handle...
null
https://raw.githubusercontent.com/rbkmoney/erlang_capi_v2/bc6446611ef7af7c6a60f6de9ca5f4b896d1c004/apps/capi/src/capi_handler_analytics.erl
erlang
-module(capi_handler_analytics). -include_lib("damsel/include/dmsl_merch_stat_thrift.hrl"). -behaviour(capi_handler). -export([prepare/3]). -import(capi_handler_utils, [logic_error/2]). -spec prepare( OperationID :: capi_handler:operation_id(), Req :: capi_handler:request_data(), Context :: capi_handle...
a20dfe845c2d771d7ae60da9ef7a686447ca72839d0c13b6f017e582b11bf1c9
FrankC01/clasew
gen_asmm.clj
(ns ^{:author "Frank V. Castellucci" :doc "clasew - Experimental AppleScript Generator - Multi Methods"} clasew.gen-asmm (:require [clasew.ast-emit :refer :all])) ;; ;; Predefs and utilities ;; (def nolookup (fn [term-kw] (name term-kw))) (def ^:dynamic *lookup-fn* nolookup) (def ^:private COMMA ",") (de...
null
https://raw.githubusercontent.com/FrankC01/clasew/1e5a444bccd4f34c68a1e5d1ec2121a36fd8c959/src/clasew/gen_asmm.clj
clojure
Predefs and utilities wrapper for dispatch Default handler - TODO: Hook exception Simple Term types Predicate processing Conditional processing For loop processing Entry point
(ns ^{:author "Frank V. Castellucci" :doc "clasew - Experimental AppleScript Generator - Multi Methods"} clasew.gen-asmm (:require [clasew.ast-emit :refer :all])) (def nolookup (fn [term-kw] (name term-kw))) (def ^:dynamic *lookup-fn* nolookup) (def ^:private COMMA ",") (def ^:private AND " and ") (def ^...
9a341730a258b2a1b4e91b6c1214494cb6ba97e3b5acbc739aac1b2156ef23f0
MLstate/opalang
surfaceAstStaticInclude.ml
Copyright © 2011 , 2012 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be us...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/passes/surfaceAstStaticInclude.ml
ocaml
see surfaceAstPasses.mli to have a description of what these passes do * The path may still be relative, e.g. if project_root is "." Seems stange that directory inclusions not use options then file inclusions use it. let is_directory path = try F.is_directory path with | Unix.Unix_error _ -> false in TODO: ch...
Copyright © 2011 , 2012 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be us...
78c88a6c93d0a969ab7bed7d3444299acba57bb883fd2304c19859008b5d597f
aryx/fork-efuns
cpp_mode.ml
* * Copyright ( C ) 2015 * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file license.txt ....
null
https://raw.githubusercontent.com/aryx/fork-efuns/6a1db42c497228ca8953df3a9011d821602a9412/pfff_modes/cpp_mode.ml
ocaml
*************************************************************************** Prelude *************************************************************************** *************************************************************************** *************************************************************************** work ...
* * Copyright ( C ) 2015 * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file license.txt ....
be45864af9afb5028af71a8ce047e6135ced603a16cc6c1390019beb5d5821ca
coccinelle/coccinelle
ctltotex.mli
* This file is part of Coccinelle , licensed under the terms of the GPL v2 . * See copyright.txt in the Coccinelle source code for more information . * The Coccinelle source code can be obtained at * This file is part of Coccinelle, licensed under the terms of the GPL v2. * See copyright.txt in the Cocci...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/engine/ctltotex.mli
ocaml
* This file is part of Coccinelle , licensed under the terms of the GPL v2 . * See copyright.txt in the Coccinelle source code for more information . * The Coccinelle source code can be obtained at * This file is part of Coccinelle, licensed under the terms of the GPL v2. * See copyright.txt in the Cocci...
82f0b60f0af843fe78f191ef46d729bd230dee5f349fc37ab16ab74fae334c55
joes-esolangs/smalc
parser.erl
-module(parser). -export([parse/1, parse_and_scan/1, format_error/1]). -file("src/parser/parser.yrl", 29). -file("c:/Program Files/erl-24.0/lib/parsetools-2.3/include/yeccpre.hrl", 0). %% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2018 . All Rights Reserved . %% Licensed under the Apache License , Version...
null
https://raw.githubusercontent.com/joes-esolangs/smalc/0f40102fa69ff265626c71be7ce50696cbd06ca7/src/parser.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
-module(parser). -export([parse/1, parse_and_scan/1, format_error/1]). -file("src/parser/parser.yrl", 29). -file("c:/Program Files/erl-24.0/lib/parsetools-2.3/include/yeccpre.hrl", 0). Copyright Ericsson AB 1996 - 2018 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; ...
095c28fe2754de92259937e46d89dc66f0168d034b6f9682128db1c311a487df
gator1/jepsen
core_test.clj
(ns block-e.core-test (:require [clojure.test :refer :all] [block-e.core :refer :all] [block-e.nemesis :refer :all] [jepsen.core :as jepsen] [jepsen.generator :as gen] [jepsen.checker :as checker] [jepsen.tests :as tests] [jepsen.neme...
null
https://raw.githubusercontent.com/gator1/jepsen/1932cbd72cbc1f6c2a27abe0fe347ea989f0cfbb/block-e/test/block_e/core_test.clj
clojure
(ns block-e.core-test (:require [clojure.test :refer :all] [block-e.core :refer :all] [block-e.nemesis :refer :all] [jepsen.core :as jepsen] [jepsen.generator :as gen] [jepsen.checker :as checker] [jepsen.tests :as tests] [jepsen.neme...
515392a0da8f4af99b4a90a3ce98a9db227533b5a8dbedd94a372e95cb88ec2a
fetburner/Coq2SML
haskell.ml
(************************************************************************) 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/plugins/extraction/haskell.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** s Production of Haskell syntax. s T...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Pp open Util open Names...
c0939153f1d053a069ffdebfc2fbdc95fde6ff8bba839e11459c70421f0a9b3f
rmculpepper/webapi
config.rkt
Copyright 2011 - 2013 Released under the terms of the LGPL version 3 or later . ;; See the file COPYRIGHT for details. #lang racket/base (require scribble/manual scribble/eval (for-label racket/base racket/class racket/contract)) (provide (all-defined-out...
null
https://raw.githubusercontent.com/rmculpepper/webapi/c1a172e360db667be49dcd81eba85f4a35b73a94/webapi/scribblings/config.rkt
racket
See the file COPYRIGHT for details. ----
Copyright 2011 - 2013 Released under the terms of the LGPL version 3 or later . #lang racket/base (require scribble/manual scribble/eval (for-label racket/base racket/class racket/contract)) (provide (all-defined-out) (for-label (all-from-out rac...
44463f5fd57b1f0da7a036fbca15250227ca72dcf1939c4b342e2ef30fdba1f2
johnyob/dromedary
test_pr6993.ml
open! Import open Util let%expect_test "" = let str = {| type ('a, 'b) cmp = | Eq constraint 'a = 'b | Not_eq of string ;; external print_endline : string -> unit = "%print_endline";; let (type 'a) f = fun (t : ('a list, 'a) cmp) -> match t with ...
null
https://raw.githubusercontent.com/johnyob/dromedary/a9359321492ff5c38c143385513e673d8d1f05a4/test/typing/gadts/test_pr6993.ml
ocaml
We support recursive aliases :)
open! Import open Util let%expect_test "" = let str = {| type ('a, 'b) cmp = | Eq constraint 'a = 'b | Not_eq of string ;; external print_endline : string -> unit = "%print_endline";; let (type 'a) f = fun (t : ('a list, 'a) cmp) -> match t with ...
13efe4ade0a4800ef70b91572a3f9e646a4c6bf7ca6a6b3d209fdb03aacf5f8d
ghcjs/ghcjs-dom
MessageEvent.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.MessageEvent (js_newMessageEvent, newMessageEvent, js_initMessageEvent, initMes...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/MessageEvent.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/MessageEvent Mozilla MessageEvent documentation> | <-US/docs/Web/API/MessageEvent.data Mozilla MessageEvent.data documentation>
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.MessageEvent (js_newMessageEvent, newMessageEvent, js_initMessageEvent, initMessageEvent, js_getOrigin, getOrigin, js_getLastEventId, getLastEventId, js_getSource, getSou...
ec9fe6c299db257099ef3ed45dc35935d333b0c7edd0c8346592ced27539c1fa
janestreet/ppx_type_directed_value
utils.mli
open Import type context = { loc : location ; module_ : longident ; attrs_decls : (module Attrs_intf.Attrs_declarations) ; td : type_declaration } * Returns a canonical function name for a type directed value generated with this PPX val get_type_directed_name : type_:string -> module_:...
null
https://raw.githubusercontent.com/janestreet/ppx_type_directed_value/f85693cc6d0ad8a9bc3bad55fed22a3d78e1fcaf/src/utils.mli
ocaml
* Returns a canonical parameter name for a type variable
open Import type context = { loc : location ; module_ : longident ; attrs_decls : (module Attrs_intf.Attrs_declarations) ; td : type_declaration } * Returns a canonical function name for a type directed value generated with this PPX val get_type_directed_name : type_:string -> module_:...
3d5b4008b5f3e87b6ba0e7e74f8dbd70564ca3259ba5b1e7308bf8e60823a486
ocurrent/ocaml-ci
status_tree.mli
type key = string type 'a tree = Leaf of 'a | Branch of key * 'a t and 'a t = 'a tree list val add : key list -> 'a -> 'a t -> 'a t
null
https://raw.githubusercontent.com/ocurrent/ocaml-ci/f725829e07cb83091b00780325ea1c125ee6f145/web-ui/view/status_tree.mli
ocaml
type key = string type 'a tree = Leaf of 'a | Branch of key * 'a t and 'a t = 'a tree list val add : key list -> 'a -> 'a t -> 'a t
6b3f4823cfbdf493f881863aa847c534b46955842b70936f7306f3ab46ba68fa
OCamlPro/digodoc
xml.mli
* Xml Light , an small Xml parser / printer with DTD support . * Copyright ( C ) 2003 ( ) * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation ; either * version 2.1 ...
null
https://raw.githubusercontent.com/OCamlPro/digodoc/d14307636c0fb220774744c0aacac3ee73fd28ce/src/ez_html/xml.mli
ocaml
* Get a full error message from an Xml error. * Get the Xml error message as a string. * Get the line the error occurred at. * Get the relative character range (in current line) the error occurred at. * Get the absolute character range the error occurred at. * [tag xdata] returns the tag value of the xml node. Rai...
* Xml Light , an small Xml parser / printer with DTD support . * Copyright ( C ) 2003 ( ) * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation ; either * version 2.1 ...
7d50c19b1e49fb50a69d1038342f6946cb2cd008cab5b5a35d4a711be1899b62
rsnikhil/Forvis_RISCV-ISA-Spec
Mem_Ops.hs
Copyright ( c ) 2018 -- See LICENSE for license details module Mem_Ops where -- ================================================================ -- This module defines instruction field values that specify the type -- and size of memory operations. Note : these are duplicates of defs in Forvis_Spec.hs where t...
null
https://raw.githubusercontent.com/rsnikhil/Forvis_RISCV-ISA-Spec/0c5590a12f4b39644d0497fa6285ad5e33003dfc/ZZ_OLD/v2/Mem_Ops.hs
haskell
See LICENSE for license details ================================================================ This module defines instruction field values that specify the type and size of memory operations. repeated here because this information is also needed by memory and I/O servers, and by top-level execution and debug w...
Copyright ( c ) 2018 module Mem_Ops where Note : these are duplicates of defs in Forvis_Spec.hs where they are used in the specs of LOAD , STORE and AMO instructions . They are Forvis_Spec.hs could have just imported this module , but these defs Standard Haskell imports import Data.Word import Data...
e36080565ba7781c75071a95c6e03afba2ff08886a7cb1e0c5f5142648257ef0
shirok/Gauche
singleton.scm
;;; ;;; singleton.scm - implements singleton mixin ;;; NB : singleton is moved to gauche.mop.singleton . ;; This file provides backward compatibility. (define-module gauche.singleton (extend gauche.mop.singleton)) (warn "gauche.singleton is obsoleted. use gauche.mop.sigleton.")
null
https://raw.githubusercontent.com/shirok/Gauche/ecaf82f72e2e946f62d99ed8febe0df8960d20c4/lib/gauche/singleton.scm
scheme
singleton.scm - implements singleton mixin This file provides backward compatibility.
NB : singleton is moved to gauche.mop.singleton . (define-module gauche.singleton (extend gauche.mop.singleton)) (warn "gauche.singleton is obsoleted. use gauche.mop.sigleton.")
b69886250c44c2afdb7b4f4f2578491924fcc34f26150d50e9ff4e1d375279e9
grin-compiler/ghc-wpc-sample-programs
Global.hs
{-# LANGUAGE DeriveDataTypeable #-} | Module : Text . Pandoc . Lua Copyright : Copyright © 2017 - 2020 License : GNU GPL , version 2 or above Maintainer : > Stability : alpha 's Lua globals . Module : Text.Pandoc.Lua Copyright : Copyright © 2017-2020 A...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/src/Text/Pandoc/Lua/Global.hs
haskell
# LANGUAGE DeriveDataTypeable # | Permissible global Lua variables. | Set all given globals. | Readonly and lazy pandoc objects.
| Module : Text . Pandoc . Lua Copyright : Copyright © 2017 - 2020 License : GNU GPL , version 2 or above Maintainer : > Stability : alpha 's Lua globals . Module : Text.Pandoc.Lua Copyright : Copyright © 2017-2020 Albert Krewinkel License : GNU...
dadff91701f068fb4b7f4b4154e2ec056a3f881c5b5981340124436384dcf147
elastic/eui-cljs
icon_token_method.cljs
(ns eui.icon-token-method (:require ["@elastic/eui/lib/components/icon/assets/tokenMethod.js" :as eui])) (def tokenMethod eui/icon)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_token_method.cljs
clojure
(ns eui.icon-token-method (:require ["@elastic/eui/lib/components/icon/assets/tokenMethod.js" :as eui])) (def tokenMethod eui/icon)
b5666614aa867579fbe1fee59986c4869834eb94fd6901fa945922f1b8084917
andyarvanitis/purescript-native
Main.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE TemplateHaskell # module Main where import Control.Monad (when) import qualified Control.Monad.Parallel as Par import Data.Aeson import Data.Aeson.Types import Data.Char import Data.FileEmbed (embedFile) import Data.List (delete, intercalate, i...
null
https://raw.githubusercontent.com/andyarvanitis/purescript-native/1410c211aea993c63827f2f0ebd1b39bbde55c6f/app/Main.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # let (opts, files) = partition (isPrefixOf "--") args help Show this help text\n\n\ no-build Generate go source files, but do not build an executable\n\ help\n"
# LANGUAGE TemplateHaskell # module Main where import Control.Monad (when) import qualified Control.Monad.Parallel as Par import Data.Aeson import Data.Aeson.Types import Data.Char import Data.FileEmbed (embedFile) import Data.List (delete, intercalate, isPrefixOf, nub, partition, (\\)) import Data.Maybe import Data....
09573da066aebadd6839fbd87d39d4a62ff95f25d75782b743bbfd44d63f6ad8
mfoemmel/erlang-otp
wxPaintEvent.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxPaintEvent.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(wxPaintEvent). -include("wxe.hrl"...
07d80389b8db68e8ed4e98f126a5b2779df1d00c714434a7b8a7aba9037f867e
ktakashi/sagittarius-scheme
keystore.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; security / keystore / jceks / keystore.scm - JCEKS keystore ;;; Copyright ( c ) 2010 - 2015 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/7dc2c28ee15073e79b08bd8b2d485755d25c502b/sitelib/security/keystore/jceks/keystore.scm
scheme
coding : utf-8 ; -*- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaime...
security / keystore / jceks / keystore.scm - JCEKS keystore Copyright ( c ) 2010 - 2015 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR ...
e8267508007fd1b02096acae8a65fd1b1f563e2d3f4ac8577efa9716fadac5ed
thelema/ocaml-community
frx_color.ml
(***********************************************************************) (* *) MLTk , Tcl / Tk interface of OCaml (* *) , , and ...
null
https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/otherlibs/labltk/frx/frx_color.ml
ocaml
********************************************************************* described in file LICENSE found in the...
MLTk , Tcl / Tk interface of OCaml , , and projet Cristal , INRIA Rocquencourt , Kyoto University RIMS Copyright 2002 Institut National de Recherche en Informatique et en Automatique and...
f2fb40daed98ed1ea2f4c3cb907d86d9c25c4194d4f69062fac5f9b5ee4548b3
faylang/fay
Optimizer.hs
# LANGUAGE FlexibleContexts # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternGuards #-} # LANGUAGE TupleSections # | Optimizing the outputted JavaScript(-ish ) AST . module Fay.Compiler.Optimizer where import Fay.Compiler.Prelude import Fay.Com...
null
https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/src/Fay/Compiler/Optimizer.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE PatternGuards # | The arity of a function. Arity here is defined to be the number of arguments that can be directly uncurried from a curried lambda | Optimize monad. | State. | Run an optimizer, which may output additional statements. Optimizations Plumbing | Flatte...
# LANGUAGE FlexibleContexts # # LANGUAGE NoImplicitPrelude # # LANGUAGE TupleSections # | Optimizing the outputted JavaScript(-ish ) AST . module Fay.Compiler.Optimizer where import Fay.Compiler.Prelude import Fay.Compiler.Misc import Fay.Types import Control.Monad....
ddbe743555c85b47fa6133415128830a529e0e0ec130ec381edbac12fd895e58
wireless-net/erlang-nommu
epp_dodger.erl
%% ===================================================================== %% This library is free software; you can redistribute it and/or modify %% it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 2 of the %% License, or (at your option) any lat...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/syntax_tools/src/epp_dodger.erl
erlang
===================================================================== This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as License, or (at your option) any later version. This library is distributed in the hope that it will be useful, ...
published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA 2001 - 2006 @author < > @doc ` epp_dodger ' - bypasses the Erlang preprocessor . < p ...
7b41905b2056bc581cb8b005e68bb902f7257313eef38b6034f6a93e5a7eef21
EMSL-NMR-EPR/Haskell-MFAPipe-Executable
Zipper.hs
module Data.List.Extras.Zipper ( zipper ) where zipper :: [a] -> [([a], a, [a])] zipper [] = [] zipper (r0:rs0) = let z0 = ([], r0, rs0) in z0 : go z0 where go :: ([a], a, [a]) -> [([a], a, [a])] go ( _, _, []) = [] go (ls, l, r:rs) = let z = (l:ls, r, rs) in z : go z # INLINE go # # INLINE zipper ...
null
https://raw.githubusercontent.com/EMSL-NMR-EPR/Haskell-MFAPipe-Executable/8a7fd13202d3b6b7380af52d86e851e995a9b53e/list-extras-zipper/src/Data/List/Extras/Zipper.hs
haskell
module Data.List.Extras.Zipper ( zipper ) where zipper :: [a] -> [([a], a, [a])] zipper [] = [] zipper (r0:rs0) = let z0 = ([], r0, rs0) in z0 : go z0 where go :: ([a], a, [a]) -> [([a], a, [a])] go ( _, _, []) = [] go (ls, l, r:rs) = let z = (l:ls, r, rs) in z : go z # INLINE go # # INLINE zipper ...
b3fc35003ea1692e10f4e3555afd2f864b878f8dd8a30bc82145eaabf74f70d0
johnyob/dromedary
solver.ml
(*****************************************************************************) (* *) Dromedary (* *) ...
null
https://raw.githubusercontent.com/johnyob/dromedary/a9359321492ff5c38c143385513e673d8d1f05a4/lib/constraints/solver.ml
ocaml
*************************************************************************** ...
Dromedary , University of Cambridge Copyright 2021 . All rights reserved . This file is distributed under the terms of the MIT This module implements a constraint ...
cf1409fe637cda529f04ad20794c5ae29dc27393aa68962aa09ec49d750a9e80
input-output-hk/cardano-ledger
Consensus.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # -- | Generic Consensus examples -- This module...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/da48c5ba96b72426a51f36507d49604505fc96a7/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/Consensus.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # | Generic Consensus examples This module is meant to replace a bunch of Consensus examples for every era once, by writing code that is parameterized by a (Proof era), it should be easier to maintain. It is meant to be byte for...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # distributed across many Era . By defining the Consensus examples module Test.Cardano.Ledger.Generic.Consensus where import Cardano.Crypto.D...