_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
98c4eeadd18fbb3549e2b6d30b2316dd63337291292d7562fa7cac3d07f3e867
rybern/mstan
WebSocketServer.hs
{-# LANGUAGE OverloadedStrings #-} module WebSocketServer where import Network.WebSockets import qualified Data.Text as Text import qualified Data.ByteString.Lazy.Char8 as BSL data WSServerOptions = WSServerOptions { port :: Int } deriving Show defaultWSServerOptions = ...
null
https://raw.githubusercontent.com/rybern/mstan/ddb0f96359d52f43f0df12ec38822fba84ff48ca/mstan-server/WebSocketServer.hs
haskell
# LANGUAGE OverloadedStrings #
module WebSocketServer where import Network.WebSockets import qualified Data.Text as Text import qualified Data.ByteString.Lazy.Char8 as BSL data WSServerOptions = WSServerOptions { port :: Int } deriving Show defaultWSServerOptions = WSServerOptions { port = 12345 ...
f4db6ea52b7b9246550eb13b9996274055e033ec44272f76a32dbd80964eb312
ericclack/overtone-loops
kick_kick_snare.clj
(ns overtone-loops.examples.kick-kick-snare (:use [overtone.live] [overtone-loops.loops])) (set-up) Define some samples from Freesound.org (def kick (freesound2 250547)) (def snare (freesound2 270156)) (def hat (freesound2 96140)) (bpm 140) (beats-in-bar 4) ;; 1 & 2 & 3 & 4 & (...
null
https://raw.githubusercontent.com/ericclack/overtone-loops/54b0c230c1e6bd3d378583af982db4e9ae4bda69/src/overtone_loops/examples/kick_kick_snare.clj
clojure
1 & 2 & 3 & 4 & (stop)
(ns overtone-loops.examples.kick-kick-snare (:use [overtone.live] [overtone-loops.loops])) (set-up) Define some samples from Freesound.org (def kick (freesound2 250547)) (def snare (freesound2 270156)) (def hat (freesound2 96140)) (bpm 140) (beats-in-bar 4) (defloop kicks 1/2 kick [8 _ 7 _ _ _ _ _])...
506e87c29bad481853a13c9d8f36547065623615c88b13182cf2ea600c8df7a0
paurkedal/viz
cst_to_ast.mli
Copyright ( C ) 2011 - -2016 Petter A. Urkedal < > * * This file is part of the Viz Compiler < / > . * * The Viz Compiler 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...
null
https://raw.githubusercontent.com/paurkedal/viz/ab1f1071fafdc51eae69185ec55d7a6e7bb94ea9/camlviz/cst_to_ast.mli
ocaml
* Conversion from Concrete to Abstract Syntax Tree
Copyright ( C ) 2011 - -2016 Petter A. Urkedal < > * * This file is part of the Viz Compiler < / > . * * The Viz Compiler 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...
ab5d48d3792b8c0eccf4a1577722d0a0f657e1d6f78220c95c030e01fb6fadd1
axellang/axel
ResourceSpec.hs
HLINT ignore " Redundant do " module Axel.Test.Eff.ResourceSpec where import Axel.Prelude import Axel.Eff.Resource as Res import Axel.Test.Eff.FileSystemMock as Mock import Axel.Test.Eff.ResourceMock as Mock import qualified Effectful as Eff import qualified Effectful.Error.Static as Eff import Test.Hspec import...
null
https://raw.githubusercontent.com/axellang/axel/8da784ae24406d4328e111b3db13f64dc943f738/test/Axel/Test/Eff/ResourceSpec.hs
haskell
HLINT ignore " Redundant do " module Axel.Test.Eff.ResourceSpec where import Axel.Prelude import Axel.Eff.Resource as Res import Axel.Test.Eff.FileSystemMock as Mock import Axel.Test.Eff.ResourceMock as Mock import qualified Effectful as Eff import qualified Effectful.Error.Static as Eff import Test.Hspec import...
7e5f35da6e6b056dae00996fb6b91feffa4be6d52c754bb15deb6edfe0eeab5e
Martoon-00/toy-compiler
IArraySpec.hs
# LANGUAGE OverloadedLists # # LANGUAGE TemplateHaskell # module Test.Examples.IArraySpec ( spec ) where import Test.Hspec (Spec, describe, it) import Test.QuickCheck (NonNegative (..), Property, Small (..), property, (==>)) import Universum import Test.Arbitrary ...
null
https://raw.githubusercontent.com/Martoon-00/toy-compiler/a325d56c367bbb673608d283197fcd51cf5960fa/test/Test/Examples/IArraySpec.hs
haskell
{{{... 1 ...}}}
# LANGUAGE OverloadedLists # # LANGUAGE TemplateHaskell # module Test.Examples.IArraySpec ( spec ) where import Test.Hspec (Spec, describe, it) import Test.QuickCheck (NonNegative (..), Property, Small (..), property, (==>)) import Universum import Test.Arbitrary ...
42740991040b04131f0059ded1ee54879480cf523645ddbab8e5405c3a9cf42a
dyzsr/ocaml-selectml
alerts.ml
(* TEST * expect *) (* Enable all alerts as errors, except foo (soft) and bar (disabled) *) [@@@ocaml.alert "@all--foo-bar"];; module X : sig val x: int [@@alert foo "Foo!"] val y: int [@@alert bar "Bar!"] val z: int [@@alert baz "Baz!"] val t: int [@@alert foo "FOO"] [@@alert bar "BAR"] [@@alert baz "BAZ...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/typing-deprecated/alerts.ml
ocaml
TEST * expect Enable all alerts as errors, except foo (soft) and bar (disabled) Turn all alerts into soft mode Disable all alerts Multiple alert messages of the same kind
[@@@ocaml.alert "@all--foo-bar"];; module X : sig val x: int [@@alert foo "Foo!"] val y: int [@@alert bar "Bar!"] val z: int [@@alert baz "Baz!"] val t: int [@@alert foo "FOO"] [@@alert bar "BAR"] [@@alert baz "BAZ"] end = struct let x, y, z, t = 0, 0, 0, 0 end [%%expect{| module X : sig val x : int val y ...
379c0c145f5aa51c51559e9817b7b14d03d8adc9bd0836a26c6e07138f947bd7
jtod/Hydra
Add4Run.hs
Add4Run : simulation driver for This file is part of Hydra . See README , Copyright ( c ) 2022 module Main where import HDL.Hydra.Core.Lib import Add4 -- Each test has input data "c x y" where c is the carry input (must be 0 or 1 ) and x and y are integers between 0 and 15 . A number of ...
null
https://raw.githubusercontent.com/jtod/Hydra/cf67a88050720acfff6a51b16d5f9efbd154dc1e/examples/adder/Add4Run.hs
haskell
Each test has input data "c x y" where c is the carry input (must such tests are provided; they will run on successive clock cycles. ------------------------------------------------ c x y -- name of signal ------------------------------------------------ inputs for clock cycle 0 Inputs Circuit Ou...
Add4Run : simulation driver for This file is part of Hydra . See README , Copyright ( c ) 2022 module Main where import HDL.Hydra.Core.Lib import Add4 be 0 or 1 ) and x and y are integers between 0 and 15 . A number of testdata1 :: [String] testdata1 = inputs for clock cycle 1 ...
f8bc8d97a8b6cb19468fd9c391d7855d87fdfd9b20b652646a69caa3d69897fe
apatil/ocaml-vega-lite
gen.ml
module Gu = Gen_utils exception NullType let load_file (f : string) : string = let ic = open_in f in let n = in_channel_length ic in let s = Bytes.create n in really_input ic s 0 n; close_in ic; (s) let save_file (f : string) (contents : string) : unit = let channel = open_out f in output_string chan...
null
https://raw.githubusercontent.com/apatil/ocaml-vega-lite/182cbbe134942a2f98c2900fc134071ab6c93479/gen/gen.ml
ocaml
Note: if you want these to be non-backticked variants, you need to build a type_declaration wrapping a Ptype_variant. If this is a singleton record, treat it as an alias. We can't completely squash it in the IR because we need the to_json function to preserve the field name. Note: i...
module Gu = Gen_utils exception NullType let load_file (f : string) : string = let ic = open_in f in let n = in_channel_length ic in let s = Bytes.create n in really_input ic s 0 n; close_in ic; (s) let save_file (f : string) (contents : string) : unit = let channel = open_out f in output_string chan...
b132a4445814b49f35786ce50b6ff8fe5a119772a55282373939a2c52e9c9515
sgbj/MaximaSharp
getopt.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: main.lisp ;;;; Purpose: Command line option processing like GNU's getopt_long Programmer : Date Started : Se...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/getopt.lisp
lisp
Syntax : ANSI - Common - Lisp ; Package : ************************************************************************* FILE IDENTIFICATION Name: main.lisp Purpose: Command line option processing like GNU's getopt_long ************************************************************************* This...
Programmer : Date Started : Sep 2003 $ I d : , v 1.1 2009 - 07 - 13 15:25:24 rtoy Exp $ needs of maxima . Basically , we changed so that : - " -ab " is recognized as two separate options : " -a " " -b " " --batch - lisp " and " --batch -- string " . But " --bat " is still an Copyright ...
f2d9df430243eb91f91db6c602f9d099388d1ea2a666cf6fdd3aa752611a1b0d
hyperfiddle/electric
todomvc.cljc
(ns leo.todomvc (:require [hyperfiddle.photon :as p] [hyperfiddle.photon-dom :as dom] [user.demo-5-todomvc :as t] [datascript.core :as d]) (:import hyperfiddle.photon.Pending)) (p/defn InputText " Todo item creator widget. Argument is a p/fn taking todo description and returning...
null
https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/leo/todomvc.cljc
clojure
(ns leo.todomvc (:require [hyperfiddle.photon :as p] [hyperfiddle.photon-dom :as dom] [user.demo-5-todomvc :as t] [datascript.core :as d]) (:import hyperfiddle.photon.Pending)) (p/defn InputText " Todo item creator widget. Argument is a p/fn taking todo description and returning...
ae8e4bdf015d9809c8252095022af755ca28b1e32368f5b0a7981d94e800dae0
spawngrid/htoad
htoad_app.erl
-module(htoad_app). -behaviour(application). -include_lib("htoad/include/htoad.hrl"). -include_lib("htoad/include/stdlib.hrl"). %% Application callbacks -export([start/2, stop/1]). %% =================================================================== %% Application callbacks %% =====================================...
null
https://raw.githubusercontent.com/spawngrid/htoad/f0c7dfbd911b29fb0c406b7c26606f553af11194/apps/htoad/src/htoad_app.erl
erlang
Application callbacks =================================================================== Application callbacks =================================================================== private
-module(htoad_app). -behaviour(application). -include_lib("htoad/include/htoad.hrl"). -include_lib("htoad/include/stdlib.hrl"). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> {ok, {Args, Cmds}} = getopt:parse(optspec(), init:get_plain_arguments()), case Cmds of [] -> getopt...
9b830ead8274c482ba767d0bf5b12f77e0f17d19ee8bf980c6d19290bb938a4f
jmackie/HandyHaskell
2018-11-22_1.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ViewPatterns # import qualified Network.HTTP.Client as Http import qualified Network.HTTP.Types.Status as Http (statusCode) import Control.Exception (try, throwIO) import Data.ByteString.Lazy (ByteString) pattern BadStatus :: Int -> Http.HttpException pattern BadStatus n <- ...
null
https://raw.githubusercontent.com/jmackie/HandyHaskell/13e4cbbc3b59acb2da434d5ab1cd1088ee9aa48d/2018-11-22_1.hs
haskell
e.g. Just e.g. Nothing
# LANGUAGE PatternSynonyms # # LANGUAGE ViewPatterns # import qualified Network.HTTP.Client as Http import qualified Network.HTTP.Types.Status as Http (statusCode) import Control.Exception (try, throwIO) import Data.ByteString.Lazy (ByteString) pattern BadStatus :: Int -> Http.HttpException pattern BadStatus n <- ...
00314ccdca305506a1474c1e89515a63fc315cd03e88f34af24dc8caedb2dba2
racket/plot
107.rkt
#lang racket (require rackunit plot pict racket/runtime-path math/distributions "../helpers.rkt") (random-seed 42) (define (rnorm sample-count mean stddev) (sample (normal-dist mean stddev) sample-count)) (define a (rnorm 500 10 5)) (define b (append (rnorm 500 13 1) (rnorm 500 18 1))) (...
null
https://raw.githubusercontent.com/racket/plot/9908b7bb08aa97c56b611cc0d79a1a9f681a42b6/plot-test/plot/tests/PRs/107.rkt
racket
#lang racket (require rackunit plot pict racket/runtime-path math/distributions "../helpers.rkt") (random-seed 42) (define (rnorm sample-count mean stddev) (sample (normal-dist mean stddev) sample-count)) (define a (rnorm 500 10 5)) (define b (append (rnorm 500 13 1) (rnorm 500 18 1))) (...
97ccb013153eaed8bd4635f55a4f6dbdc9bfc3ff91adec06069ed520b9c7e584
haskell-distributed/distributed-process-platform
HRoqLeak.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} import Control.Applicative ((<$>), (<*>)) import Control.Concurrent import Control.Distributed.Process hiding (call) import Control.Distributed.Process.Node import Control.Distributed.Process.Platform import Control....
null
https://raw.githubusercontent.com/haskell-distributed/distributed-process-platform/46d63f81910e7dd527fb1d41e654a5cfb0dbfdba/regressions/HRoqLeak.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE OverloadedStrings # --------------------------------------------------------------------- runProcess node worker --------------------------------------------------------------------- wait_for_tables [table] Infinity ms2 <- get_state logm $ "mnesia state ms2:" ++ (show ms...
# LANGUAGE FlexibleInstances # import Control.Applicative ((<$>), (<*>)) import Control.Concurrent import Control.Distributed.Process hiding (call) import Control.Distributed.Process.Node import Control.Distributed.Process.Platform import Control.Distributed.Process.Platform.ManagedProcess hiding (runProcess) import ...
ca4971331b98e160cd345b6e44727e002f2d1010dcc713f15bbc47d4b026b170
ocamllabs/ocaml-modular-implicits
t010-const3.ml
3;; * 0 CONST3 1 ATOM0 2 STOP * 0 CONST3 1 ATOM0 2 SETGLOBAL T010-const3 4 STOP **)
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t010-const3.ml
ocaml
3;; * 0 CONST3 1 ATOM0 2 STOP * 0 CONST3 1 ATOM0 2 SETGLOBAL T010-const3 4 STOP **)
20597ca79c0fe09e4c2d7434fcf359d52131dfa22ca1f07988c0c31b09363364
mfikes/fifth-postulate
ns242.cljs
(ns fifth-postulate.ns242) (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/ns242.cljs
clojure
(ns fifth-postulate.ns242) (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...
0f77c4b65d46550f82c5f0ea1682459f4b720ce28f8a32571d1bd17b1f0ba7ee
sebsheep/elm2node
Name.hs
# OPTIONS_GHC -Wall # {-# LANGUAGE OverloadedStrings #-} module Generate.JavaScript.Name ( Name , toBuilder , fromString , fromIndex , fromInt , fromLocal , fromGlobal , fromCycle , fromKernel , makeF , makeA , makeLabel , makeTemp , dollar ) where import qualified Data.ByteString.Buil...
null
https://raw.githubusercontent.com/sebsheep/elm2node/602a64f48e39edcdfa6d99793cc2827b677d650d/compiler/src/Generate/JavaScript/Name.hs
haskell
# LANGUAGE OverloadedStrings # NAME - _ - _ . $ TEMPORARY NAMES RESERVED NAMES INT TO ASCII skip $ as a standalone name UNSAFE INT TO ASCII ASCII BYTES lower upper _ $ digit BAD FIELDS
# OPTIONS_GHC -Wall # module Generate.JavaScript.Name ( Name , toBuilder , fromString , fromIndex , fromInt , fromLocal , fromGlobal , fromCycle , fromKernel , makeF , makeA , makeLabel , makeTemp , dollar ) where import qualified Data.ByteString.Builder as B import Data.Monoid ((<>)) ...
56f078ce3443fe4e9f498b9d66077738658fbe3c0285aa0ad65c3d475c448b18
SamB/coq
blaster_window.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/ide/blaster_window.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** window#misc#hide () present
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * $ Id$ open Gobject.Data ...
801ee5899a2cc4ef973b7018f3cdda1f624941985be81761c858350d7a48b41e
thomasbhatia/hss
hss_xml.erl
%%% $Id: hss_xml.erl,v 1.3 2008/02/18 05:34:31 vances Exp $ %%%--------------------------------------------------------------------- 2008 Motivity Telecom Inc. @author < > [ ] %%% @end %%% Copyright ( c ) 2008 , Motivity Telecom Inc. %%% %%% All rights reserved. %%% %%% Redistribution and use in source and...
null
https://raw.githubusercontent.com/thomasbhatia/hss/0d06b844ccb5929a8a7e9cecf62da8db64203972/src/hss_xml.erl
erlang
$Id: hss_xml.erl,v 1.3 2008/02/18 05:34:31 vances Exp $ --------------------------------------------------------------------- @end All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redist...
2008 Motivity Telecom Inc. @author < > [ ] Copyright ( c ) 2008 , Motivity Telecom Inc. - Neither the name of Motivity Telecom nor the names of its " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CON...
fc119a2e5b6e289eb63fe692ac63d6eb74fe6c530c89df54b3919191b419bf89
y2q-actionman/jp-numeral
wari.lisp
-*- coding : utf-8 ; -*- (in-package :jp-numeral.test) (test test-wari-normal ;; integer (is (equal "〇割" (wari-str :normal 0))) (is (equal "十割" (wari-str :normal 1))) (is (equal "二十割" (wari-str :normal 2))) (is (equal "百割" (wari-str :normal 10))) (is (equal "百十割" (wari-str :normal 11))) (is (equal "百二...
null
https://raw.githubusercontent.com/y2q-actionman/jp-numeral/60cce7ac32b940dd6822d097cda569ec08f0e070/test/wari.lisp
lisp
-*- integer ratio float integer ratio float integer ratio float integer ratio float too big num ;; too small num complex [Integer] digits-after-dot -- ignored [Rational] digits-after-dot -- ignored [Float] digits-after-dot
(in-package :jp-numeral.test) (test test-wari-normal (is (equal "〇割" (wari-str :normal 0))) (is (equal "十割" (wari-str :normal 1))) (is (equal "二十割" (wari-str :normal 2))) (is (equal "百割" (wari-str :normal 10))) (is (equal "百十割" (wari-str :normal 11))) (is (equal "百二十割" (wari-str :normal 12))) (is (equal...
9923697305801aec08fa63c96765b20c4014f120de09908498a74999be51d3e5
CLowcay/hgbc
Length.hs
# LANGUAGE RecordWildCards # module Machine.GBC.Audio.Length ( Length, newLength, initLength, powerOffLength, reloadLength, extraClocks, clockLength, ) where import Control.Monad (unless, when) import Data.Bits (Bits (..)) import Data.IORef (IORef, newIORef, readIORef, writeIORef) import D...
null
https://raw.githubusercontent.com/CLowcay/hgbc/76a8cf91f3c3b160eadf019bc8fc75ef07601c2f/core/src/Machine/GBC/Audio/Length.hs
haskell
Has the length counter clocked to 0 and not been reloaded? Set when the counter reaches 0 to prevent further clocking. on the next clock, so unfreezing the length counter effectively sets it to the last frame sequencer step clocked the length, then clock the length again. length counter, the length counter is imm...
# LANGUAGE RecordWildCards # module Machine.GBC.Audio.Length ( Length, newLength, initLength, powerOffLength, reloadLength, extraClocks, clockLength, ) where import Control.Monad (unless, when) import Data.Bits (Bits (..)) import Data.IORef (IORef, newIORef, readIORef, writeIORef) import D...
96d3535df414f3277dfe9ed43b09ee898a7e1f493eb073976879c3f5591564d8
joearms/elib1
elib1_diff.erl
Copyright ( c ) 2006 - 2009 See MIT - LICENSE for licensing information . -module(elib1_diff). %% File : diff.erl Author : ( ) Purpose : Diff of two files ( like Diff and patch ) . %% diff(A, B) -> Patch %% patch(B, Patch) -> A %% patchL(B, [Patch]) -> A' %% -compile(export_all). -export([diff/2,...
null
https://raw.githubusercontent.com/joearms/elib1/d617d0ec70a058ef102749eadf51c024444c28d9/lib/src/elib1_diff.erl
erlang
File : diff.erl diff(A, B) -> Patch patch(B, Patch) -> A patchL(B, [Patch]) -> A' -compile(export_all). diff(A, B) -> P computer patches P that takes B in A ie P such that patch(B, P) -> A The idea is that we only keep the latest version of a file "New". Given Old and New we compute P (the patch...
Copyright ( c ) 2006 - 2009 See MIT - LICENSE for licensing information . -module(elib1_diff). Author : ( ) Purpose : Diff of two files ( like Diff and patch ) . -export([diff/2, diff_files/2, patch/2, patchL/2]). -export([test/0]). -import(lists, [foldl/3, reverse/1]). test() -> diff_files("d...
c485c3ef2bd301f97f360522fe4c088eba76be3d479d16d80c5d02fe98fba77b
astro/prittorrent
model_worker.erl
-module(model_worker). -behaviour(gen_server). -export([start_link/1, stop/0, init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -record(state, {conn}). start_link(Args) -> gen_server:start_link(?MODULE, Args, []). stop() -> gen_server:cast(?MODULE, stop). init(Args) -> ...
null
https://raw.githubusercontent.com/astro/prittorrent/5173eeb8b00fd9ab7c0d347c9e361052023faebd/apps/model/src/model_worker.erl
erlang
Manually rethrow before the wrapping pgsql:with_transaction/2 swallows the stack trace.
-module(model_worker). -behaviour(gen_server). -export([start_link/1, stop/0, init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -record(state, {conn}). start_link(Args) -> gen_server:start_link(?MODULE, Args, []). stop() -> gen_server:cast(?MODULE, stop). init(Args) -> ...
b587d1ae6bf7890b6172e2dfdafd0a38c84f3af1d0488192953e076ea7d4d9ef
robrix/isometry
Plane.hs
module Geometry.Plane ( signedDistance ) where import Linear.Metric import Linear.Vector signedDistance :: (Metric v, Num a) => v a -> v a -> v a -> a signedDistance o n p = (p ^-^ o) `dot` n
null
https://raw.githubusercontent.com/robrix/isometry/171b9261b8d7ea32c86ce6019c8c3973742f0349/src/Geometry/Plane.hs
haskell
module Geometry.Plane ( signedDistance ) where import Linear.Metric import Linear.Vector signedDistance :: (Metric v, Num a) => v a -> v a -> v a -> a signedDistance o n p = (p ^-^ o) `dot` n
976c9881a9b40bebf2a72acc9d2e8c3376fb7b939d51212ae6bc49e57f156bcf
klarna-incubator/kflow
kflow_pipe.erl
%%%------------------------------------------------------------------- ( C ) 2019 , Klarna Bank AB %%% @doc This module implements interface towards pipe. %%% %%% <i>Note:</i>It does not require starting `kflow' root supervisor, %%% so it can be reused in other applications. %%% %%% @end %%%-------------------------...
null
https://raw.githubusercontent.com/klarna-incubator/kflow/9acdc6df73f300afcec9c051b8baf6e6da69205c/src/framework/kflow_pipe.erl
erlang
------------------------------------------------------------------- @doc This module implements interface towards pipe. <i>Note:</i>It does not require starting `kflow' root supervisor, so it can be reused in other applications. @end ------------------------------------------------------------------- API Intern...
( C ) 2019 , Klarna Bank AB -module(kflow_pipe). -behavior(gen_statem). -include("kflow_int.hrl"). -include_lib("hut/include/hut.hrl"). -export([start_link/1, stop/1]). -export([desugar_node_spec/1]). -export([callback_mode/0, init/1, terminate/3]). -export([handle_event/4]). -type entrypoint() :: fun((kflow:...
0a1aa6d3496226830a65933d31b17e4c4d75fe66dc2eb37b3dcec86873132317
AllAlgorithms/clojure
binary_search.clj
(ns searches.binary-search) (defn binary-search "Takes a sorted sequence s and returns an index of x in s. Returns nil if x is not in s." [s x] (let [s (if (vector? s) s (vec s))] (loop [low 0 high (count s)] (when (< low high) (let [mid (+ low (quot (- high low) 2)) ...
null
https://raw.githubusercontent.com/AllAlgorithms/clojure/cfb2f46eaaed338dd279e93b69251526f9048ff9/algorithms/searches/binary_search.clj
clojure
(ns searches.binary-search) (defn binary-search "Takes a sorted sequence s and returns an index of x in s. Returns nil if x is not in s." [s x] (let [s (if (vector? s) s (vec s))] (loop [low 0 high (count s)] (when (< low high) (let [mid (+ low (quot (- high low) 2)) ...
6eeec3ead0c8ed47e114091aeaa650f281066546ae26a5f542b6b2e446b74cf6
bmeurer/ocaml-arm
main_args.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet...
null
https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/driver/main_args.mli
ocaml
********************************************************************* OCaml ...
, projet Para , INRIA Rocquencourt Copyright 1998 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ Id$ module type Bytecomp_options = ...
0daa986ad211de6112894f51443a5f15d048870e6617dc44acf082d51e5d5540
Bodigrim/arithmoi
Standard.hs
-- | Module : Math . . ArithmeticFunctions . Standard Copyright : ( c ) 2016 Licence : MIT Maintainer : < > -- -- Textbook arithmetic functions. -- # LANGUAGE ScopedTypeVariables # module Math.NumberTheory.ArithmeticFunctions.Standard ( -- * List divisors divisors, divisorsA , di...
null
https://raw.githubusercontent.com/Bodigrim/arithmoi/0f73644e06906b37affa409790b7338688a8061e/Math/NumberTheory/ArithmeticFunctions/Standard.hs
haskell
| Textbook arithmetic functions. * List divisors * Multiplicative functions * Additive functions * Misc | Create a multiplicative function from the function on prime's powers. See examples below. | See 'divisorsA'. # SPECIALIZE divisors :: Natural -> Set Natural # # SPECIALIZE divisors :: Integer -> Set Integ...
Module : Math . . ArithmeticFunctions . Standard Copyright : ( c ) 2016 Licence : MIT Maintainer : < > # LANGUAGE ScopedTypeVariables # module Math.NumberTheory.ArithmeticFunctions.Standard divisors, divisorsA , divisorsList, divisorsListA , divisorsSmall, divisorsSmallA , divi...
276195c38c0cbb6adb42b1e2680f20e15ec9d53d26e12024139dd76eb6d123cd
travitch/haggle
Dominators.hs
-- | Compute the dominators in a graph from a root node. -- The set of dominators for a ' Vertex ' in a graph is always with regard to a @root@ ' Vertex ' , given as input to the algorithm . ' Vertex ' @d@ dominates ' Vertex ' @v@ if every path from the @root@ to @v@ must go through @d@. @d@ strictly domina...
null
https://raw.githubusercontent.com/travitch/haggle/9ec822c0ff8895972b51026801bb34c031c38545/src/Data/Graph/Haggle/Algorithms/Dominators.hs
haskell
| Compute the dominators in a graph from a root node. dominates @v@. This implementation is ported from FGL (<>) and is substantially similar. The major change is that it uses the vector library instead of array. The algorithm is based on \"A Simple, Fast Dominance Algorithm\" by </~keith/EMBED/dom.pdf> f...
The set of dominators for a ' Vertex ' in a graph is always with regard to a @root@ ' Vertex ' , given as input to the algorithm . ' Vertex ' @d@ dominates ' Vertex ' @v@ if every path from the @root@ to @v@ must go through @d@. @d@ strictly dominates @v@ if @d@ dominates @v@ and is not @v@. The immedia...
9464be8ce8f61fc5bea6415f627f2c436bf8f391b545e606a309f1d27889b7f5
avik-das/garlic
private-module-method.scm
(require "../aux/auxillary-module" => am) (display (am:private-method))
null
https://raw.githubusercontent.com/avik-das/garlic/5545f5a70f33c2ff9ec449ef66e6acc7881419dc/test/failure-compile/private-module-method.scm
scheme
(require "../aux/auxillary-module" => am) (display (am:private-method))
2847512acc918c1cd4272eba73046f0c7b25f0a6cac0788bf4a1b3f3a0105476
manuel-serrano/hop
deep_clone.scm
;*=====================================================================*/ * Author : * / * Copyright : 2007 - 13 , see LICENSE file * / ;* ------------------------------------------------------------- */ * This file is part of Scheme2Js . ...
null
https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/scheme2js/deep_clone.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * */ * but WITHOUT ANY WARRANTY; without even the implied warranty of */ * MERCHANTABILITY or FITNE...
* Author : * / * Copyright : 2007 - 13 , see LICENSE file * / * This file is part of Scheme2Js . * / * Scheme2Js is distributed in the hope that it will be useful , * / (module deep-clone (import node...
9f93d59e5d72dcd0afd1dd81fecfa6ff0988788781e199ef89a7d572cf984a37
coq/coq
gen_principle.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/41555f5a227b2d0d658b0c5a7fe4593faca61cf6/plugins/funind/gen_principle.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...
8e9a82c905d9ffabbf07ccb0523b9a543b840fcdf2aa7550545e6ba8c50bf44c
andrewthad/primitive-containers
Unlifted.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE KindSignatures # # LANGUAGE MagicHash # {-# LANGUAGE RankNTypes #-} # LANGUAGE TypeFamilies # {-# OPTIONS_GHC -O2 #-} module Data.Set.NonEmpty.Unlifted ( Set , singleton , member , size -- * Conversion , toArray , toList , fromNonEmpty , toSet , fromSet ...
null
https://raw.githubusercontent.com/andrewthad/primitive-containers/55e2775df3399b447c7b44396d95956111ceb449/src/Data/Set/NonEmpty/Unlifted.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE RankNTypes # # OPTIONS_GHC -O2 # * Conversion * Folds | /O(n)/ Convert a set to a list. The elements are given in ascending order. | /O(1)/ Convert a set to a non-empty set. This returns @Nothing@ if the set is empty. The resulting non-empty set shares internal represention as...
# LANGUAGE KindSignatures # # LANGUAGE MagicHash # # LANGUAGE TypeFamilies # module Data.Set.NonEmpty.Unlifted ( Set , singleton , member , size , toArray , toList , fromNonEmpty , toSet , fromSet , foldr , foldMap , foldl' , foldr' , foldMap' * , traverse_ , itraverse_ ) where im...
df19d4915408876f969c72e05137583dabeb69b497147c1ed17ba2ad08b1ce86
avsm/platform
uuseg_grapheme_cluster.mli
--------------------------------------------------------------------------- Copyright ( c ) 2014 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
null
https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/uuseg.12.0.0%2Bdune/src/uuseg_grapheme_cluster.mli
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2014 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
6ec5c2240b286a5f90cd20bbb7a3a30fe223bd26b2a2389ec692967013133c5a
fugue/goldplate
Splice.hs
module Text.Splice ( SpliceEnv , MissingEnvVar (..) , splice ) where import Control.Exception (Exception) import qualified Data.List as List import Data.Typeable (Typeable) -- | Environment for splicing in things. type SpliceEnv = [(String, String)] data MissingEnvVar ...
null
https://raw.githubusercontent.com/fugue/goldplate/a049c8b294aed63afd30e2f9da1ac6f518f9a2c7/src/Text/Splice.hs
haskell
| Environment for splicing in things. | Splice in a string with "Hello ${FOO}" syntax. Escape
module Text.Splice ( SpliceEnv , MissingEnvVar (..) , splice ) where import Control.Exception (Exception) import qualified Data.List as List import Data.Typeable (Typeable) type SpliceEnv = [(String, String)] data MissingEnvVar = MissingEnvVar String deriving (Type...
5b06405cce23277346f08c272eaba467eed684f645b8f33c79b1003ba00b5d2e
phuhl/linux_notification_center
Helpers.hs
{-# LANGUAGE OverloadedStrings #-} module Helpers where import qualified Data.ConfigFile as CF import qualified Control.Monad.Except as Error import Control.Applicative ((<|>)) import Control.Monad import Data.Foldable import Data.Functor ( fmap, (<&>) ) import Data.Gettext import Data.Maybe ( fromMaybe, listToMaybe ...
null
https://raw.githubusercontent.com/phuhl/linux_notification_center/88f46682108abe4de218199317b4fa417f42273f/src/Helpers.hs
haskell
# LANGUAGE OverloadedStrings # Create a list of paths to search for translations. is language[_territory][.codeset]. Since there are translations with territory specified, search for locales with reducing granularity. split a string at ":" The following tags should be supported: <b> ... </b> Bold <u...
module Helpers where import qualified Data.ConfigFile as CF import qualified Control.Monad.Except as Error import Control.Applicative ((<|>)) import Control.Monad import Data.Foldable import Data.Functor ( fmap, (<&>) ) import Data.Gettext import Data.Maybe ( fromMaybe, listToMaybe ) import Text.HTML.TagSoup (Tag(..)...
9b2275c6c7a6734cd68c9b2bd879fbfd6a069401793cd48c396847dbbf7d0513
funcool/buddy-core
mac_tests.clj
Copyright 2014 - 2015 < > ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to in writing, software distributed un...
null
https://raw.githubusercontent.com/funcool/buddy-core/bd31ff9b802e689b046afae0f8c29ed70bb15ab5/test/buddy/core/mac_tests.clj
clojure
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 2014 - 2015 < > Licensed under the Apache License , Version 2.0 ( the " License " ) distributed under the License is distributed on an " AS IS " BASIS , (ns buddy.core.mac-tests (:require [clojure.test :refer :all] [buddy.core.codecs :as codecs :refer :all] [buddy.core.byte...
607b4c935f81a87862e139ec3ad025d6c3ccdae85abf3b66cb7f2c5f208e443c
patricoferris/ocaml-multicore-monorepo
gluten_mirage.ml
---------------------------------------------------------------------------- * Copyright ( c ) 2019 - 2020 * * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are met : * ...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/dream/src/vendor/gluten/mirage/gluten_mirage.ml
ocaml
---------------------------------------------------------------------------- * Copyright ( c ) 2019 - 2020 * * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are met : * ...
c6cf2dcf69fc45b18be76ca08a13a828e42229af1247b7ac46067d9ed071c4dc
xvw/preface
arrow_alt.ml
module type LAWS = sig type ('a, 'b) t end module For (A : Preface_specs.ARROW_ALT) : LAWS with type ('a, 'b) t := ('a, 'b) A.t = Arrow.For (A)
null
https://raw.githubusercontent.com/xvw/preface/f908ba45e5d58c330781e61162628bbd7c240145/lib/preface_laws/arrow_alt.ml
ocaml
module type LAWS = sig type ('a, 'b) t end module For (A : Preface_specs.ARROW_ALT) : LAWS with type ('a, 'b) t := ('a, 'b) A.t = Arrow.For (A)
3567b0abe12c48cf2aa69d3cdeefd143c8fe8195cf73e662e6bb13efe0d222db
roehst/tapl-implementations
syntax.mli
module Syntax : syntax trees and associated support functions open Support.Pervasive open Support.Error (* Data type definitions *) type ty = TyId of string | TyVar of int * int | TyArr of ty * ty | TyRec of string * ty type term = TmVar of info * int * int | TmAbs of info * string * ty * term | ...
null
https://raw.githubusercontent.com/roehst/tapl-implementations/23c0dc505a8c0b0a797201a7e4e3e5b939dd8fdb/equirec/syntax.mli
ocaml
Data type definitions Contexts Shifting and substitution Printing Misc
module Syntax : syntax trees and associated support functions open Support.Pervasive open Support.Error type ty = TyId of string | TyVar of int * int | TyArr of ty * ty | TyRec of string * ty type term = TmVar of info * int * int | TmAbs of info * string * ty * term | TmApp of info * term * term ...
eae50ac60f4c68af67bcf2315e4810541d9a5f2399bebf293475a3fc30031268
dgtized/shimmers
grid_variations.cljs
(ns shimmers.sketches.grid-variations (:require [quil.core :as q :include-macros true] [quil.middleware :as m] [shimmers.common.framerate :as framerate] [shimmers.common.transition-interval :as transition] [shimmers.math.equations :as eq] [shimmers.math.probability :as p] [shimmers.math.vector :a...
null
https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/sketches/grid_variations.cljs
clojure
Add state for shape+deformations, stroke-weight, color, and opacity.
(ns shimmers.sketches.grid-variations (:require [quil.core :as q :include-macros true] [quil.middleware :as m] [shimmers.common.framerate :as framerate] [shimmers.common.transition-interval :as transition] [shimmers.math.equations :as eq] [shimmers.math.probability :as p] [shimmers.math.vector :a...
b4f5ae052ce514f0c0eab2df2727c2138043f7844cc809d26f18539efaeb5bab
tommaisey/aeon
quad-n.help.scm
(define quad_ quad-c) (hear (mul (quad_ ar 4000 1 -1 -0.75 0) 0.1)) (hear (let ((r (mouse-x kr 3.5441 4 0 0.1))) (mul (quad_ ar 4000.0 (neg r) r 0 0.1) 0.1))) (hear (let ((r (mouse-x kr 3.5441 4 0 0.1))) (mul (sin-osc ar (mul-add (quad_ ar 4 (neg r) r 0 0.1) 800 900) 0) 0.1)))
null
https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/chaos/quad-n.help.scm
scheme
(define quad_ quad-c) (hear (mul (quad_ ar 4000 1 -1 -0.75 0) 0.1)) (hear (let ((r (mouse-x kr 3.5441 4 0 0.1))) (mul (quad_ ar 4000.0 (neg r) r 0 0.1) 0.1))) (hear (let ((r (mouse-x kr 3.5441 4 0 0.1))) (mul (sin-osc ar (mul-add (quad_ ar 4 (neg r) r 0 0.1) 800 900) 0) 0.1)))
ab3d0d055343e85bc34bcefc239ea47f4f372050de25be312885746a95d26028
froggey/Mezzano
fat32.lisp
Copyright ( c ) 2017 - 2018 This code is licensed under the MIT license . For now support reading fat32 FS and some write operations . (defpackage :mezzano.fat-file-system (:use :cl :mezzano.file-system :mezzano.file-system-cache :mezzano.disk) (:local-nicknames (:sys.int :mezzano.internals)) (:export...
null
https://raw.githubusercontent.com/froggey/Mezzano/e9c4e426ae9732daa45cd7fd0f812a627b79dea6/file/fat32.lisp
lisp
Operating system specific high byte is major revision number and low byte is minor revision number Operating system specific (defstruct fs-info 4 480 496 12 (trail-signature nil :type (unsigned-byte 32))) (defconstant +lead-signature+ #x41615252) (defun check-lead-signature (lead-signature) (if (= lead-si...
Copyright ( c ) 2017 - 2018 This code is licensed under the MIT license . For now support reading fat32 FS and some write operations . (defpackage :mezzano.fat-file-system (:use :cl :mezzano.file-system :mezzano.file-system-cache :mezzano.disk) (:local-nicknames (:sys.int :mezzano.internals)) (:export...
5ebe8e08d2b4029dab6e7f202f40783d54ad80cebb59a33ddfc81b70e9565a16
vyzo/gerbil
bytes__1.scm
(declare (block) (standard-bindings) (extended-bindings) (inlining-limit 200)) (define |gerbil/gambit/bytes[:0:]#@bytes| (lambda (_stx388_) (let* ((_g391405_ (lambda (_g392401_) (gx#raise-syntax-error '#f '"Bad syntax" _g392401_))) (_g390479_ (lambda (_g392409_) ...
null
https://raw.githubusercontent.com/vyzo/gerbil/17fbcb95a8302c0de3f88380be1a3eb6fe891b95/src/bootstrap/gerbil/gambit/bytes__1.scm
scheme
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
(declare (block) (standard-bindings) (extended-bindings) (inlining-limit 200)) (define |gerbil/gambit/bytes[:0:]#@bytes| (lambda (_stx388_) (let* ((_g391405_ (lambda (_g392401_) (gx#raise-syntax-error '#f '"Bad syntax" _g392401_))) (_g390479_ (lambda (_g392409_) ...
4d16317c3469341249620ca9fe796f3840b40061151790cb2d55e1cf76958669
dyzsr/ocaml-selectml
typeclass.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/typing/typeclass.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Asttypes open Types open Format type 'a class_info = { cls_id : Ident.t; cls_id_loc : string loc; ...
ea3495e222443049e2674f3c399a24a7b848674288acbeb8e8fc406a7c380af8
stevana/coroutine-state-machines
Suspension.hs
module Suspension where import Data.IntMap (IntMap) import qualified Data.IntMap as M import Coroutine import Event import FileSystem import StateMachine ------------------------------------------------------------------------ data Suspension s i o = Suspension { sIntMap :: IntMap (Request (FSReq, i) FSResp (SM ...
null
https://raw.githubusercontent.com/stevana/coroutine-state-machines/c832a54415d5e91b93fa1c6cc677d757bd4b2c76/src/Suspension.hs
haskell
----------------------------------------------------------------------
module Suspension where import Data.IntMap (IntMap) import qualified Data.IntMap as M import Coroutine import Event import FileSystem import StateMachine data Suspension s i o = Suspension { sIntMap :: IntMap (Request (FSReq, i) FSResp (SM s i o)) , sCounter :: Int } noSuspensions :: Suspension s i o noSusp...
64149da10423774930db26eb8ffe949d8926b90667657158dd035da9dfe6b963
sbcl/sbcl
macros.lisp
This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The software is in the public domain and is ;;;; provided with absolutely no wa...
null
https://raw.githubusercontent.com/sbcl/sbcl/a8610d824447fbc5332d413c4bccd42906fbe5f6/src/interpreter/macros.lisp
lisp
more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. DEFSPECIAL name (destructuring-lambda-list) [FORMS]* :IMMEDIATE (ENV) FORMS+ :DEFERRED (&optional ENV) FORMS+ and a deferred-mode...
This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB-INTERPRETER") Two versions of a special - form processor for NAME are defined : an immediate - mode proce...
958440e6165e0811fa95174ff839a5195007307697a54ae2a72b3e3bbefcff50
jscl-project/jscl
load.lisp
-*- mode : lisp ; coding : utf-8 -*- ;;; ;;; LOAD - load & compile Common Lisp file. ;;; Simple implementation of the common Lisp function 'load' for JSCL environment . ;;; JSCL is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as p...
null
https://raw.githubusercontent.com/jscl-project/jscl/3a3c907f7de84e995fd8f9e697485d0d0243fcee/src/load.lisp
lisp
coding : utf-8 -*- LOAD - load & compile Common Lisp file. Simple implementation of the common Lisp function 'load' License, or (at your option) any later version. WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Publ...
for JSCL environment . JSCL is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the JSCL is distributed in the hope that it will be useful , but You should have received a co...
c9ccbda7eb89b6bd39c6abed246e6d02e49d377b451c2b142811e1b82257294c
bluegraybox/examples
kvstore.erl
-module(kvstore). %% Plugin module for server. -import(server). -export([init/0, handle/2]). % Implement the Server callback interface. -export([start_server/0]). % Export our own API functions. -export([test/0]). % Export our unit tests. %% Client API functions start_server() -> RPC = server:start(?MODULE),...
null
https://raw.githubusercontent.com/bluegraybox/examples/20f238be10e2e987687d7289b2f4897cc7d95abd/erlang_servers/anonymous/kvstore.erl
erlang
Plugin module for server. Implement the Server callback interface. Export our own API functions. Export our unit tests. Client API functions Create closures for each of our functions Server callback handlers Unit Tests
-module(kvstore). -import(server). start_server() -> RPC = server:start(?MODULE), Set = fun(Key, Value) -> RPC({setKV, Key, Value}) end, Get = fun(Key) -> RPC({getKV, Key}) end, {{setKV, Set}, {getKV, Get}}. init() -> dict:new(). { Response , NewState } = handle(Request , State ) , handle({setK...
f85cc0619f5497319e895d4500dcebc768024cb9345326736e722e2903893aad
wasp-lang/strong-path
TastyDiscoverDriver.hs
# OPTIONS_GHC -F -pgmF tasty - discover -optF --modules=*Test.hs # -optF --modules=*Test.hs tells tasty - discover to pick up only files that match * Test.hs . -- I did not do this for any strong reason so we can remove it in the future if we figure out -- it is too restrictive.
null
https://raw.githubusercontent.com/wasp-lang/strong-path/cc34714609613e517543ff6d0225725df2b36c67/test/TastyDiscoverDriver.hs
haskell
modules=*Test.hs # modules=*Test.hs tells tasty - discover to pick up only files that match * Test.hs . I did not do this for any strong reason so we can remove it in the future if we figure out it is too restrictive.
879b7cfd3d59e544afb0ac1c4bcbe12775aa1e511a2e0720a71d2c75f8df130b
janestreet/lwt-async
test_lwt_event.ml
Lightweight thread library for * Module Test_lwt_event * Copyright ( C ) 2009 * * 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 , with linking exceptions ; *...
null
https://raw.githubusercontent.com/janestreet/lwt-async/c738e6202c1c7409e079e513c7bdf469f7f9984c/tests/react/test_lwt_event.ml
ocaml
Lightweight thread library for * Module Test_lwt_event * Copyright ( C ) 2009 * * 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 , with linking exceptions ; *...
0c9780c5789400b1612f90fcca04fd998f01322e234306231b06239bb318da52
mbj/mhs
Main.hs
module Main where import PGT.Prelude import System.Environment (getArgs) import qualified PGT.CLI -- | Main entry point main :: IO () main = PGT.CLI.run =<< getArgs
null
https://raw.githubusercontent.com/mbj/mhs/a80cb49d1b52e0f2e24da61b862ca5e91bc709d5/pgt/app/Main.hs
haskell
| Main entry point
module Main where import PGT.Prelude import System.Environment (getArgs) import qualified PGT.CLI main :: IO () main = PGT.CLI.run =<< getArgs
cd8e76e44f6d4f68ace2cdae40ccb833f741b2fddfb9e72add1bfdfcc0216cd7
MichaelBurge/haskoin
ListBalances.hs
import qualified Haskoin.Cli.ListBalances as ListBalances main :: IO () main = ListBalances.main
null
https://raw.githubusercontent.com/MichaelBurge/haskoin/b4b7bab7e06a5496dad3623b63facd82befacff4/app/ListBalances.hs
haskell
import qualified Haskoin.Cli.ListBalances as ListBalances main :: IO () main = ListBalances.main
59529f66068a878b1d36b29db36be4e623802945b9c13d727a52c65f9a21d85e
metaocaml/ber-metaocaml
pr6394.ml
(* TEST * expect *) [@@@ ocaml.warning "+4"] module rec X : sig type t = int * bool end = struct type t = A | B let f = function A | B -> 0 end;; [%%expect{| Lines 4-7, characters 6-3: 4 | ......struct 5 | type t = A | B 6 | let f = function A | B -> 0 7 | end.. Error: Signature mismatch: Modules d...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-modules/pr6394.ml
ocaml
TEST * expect
[@@@ ocaml.warning "+4"] module rec X : sig type t = int * bool end = struct type t = A | B let f = function A | B -> 0 end;; [%%expect{| Lines 4-7, characters 6-3: 4 | ......struct 5 | type t = A | B 6 | let f = function A | B -> 0 7 | end.. Error: Signature mismatch: Modules do not match: s...
dd1237cb95312bbacfcab5dfae99a5e9aa7bcbb55efb2e50c94a34c966dba269
racket/racket7
serialize-state.rkt
#lang racket/base (provide (struct-out serialize-state) make-serialize-state intern-scopes intern-shifted-multi-scopes intern-mpi-shifts intern-context-triple intern-properties push-syntax-context! get-syntax-context ...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/compile/serialize-state.rkt
racket
A `serialize-state` record is threaded through the construction of a deserialization expression the set of all reachable scopes to record pruned binding tables to record pruned bulk-binding lists interned scope sets interned shifted multi-scope lists interned module path index shifts map full props to previous...
#lang racket/base (provide (struct-out serialize-state) make-serialize-state intern-scopes intern-shifted-multi-scopes intern-mpi-shifts intern-context-triple intern-properties push-syntax-context! get-syntax-context ...
4040233331cf59ee5b34deece82a61fdf5cf787da72a3d6bbd0cc1a1da96ceb4
Apress/practical-webdev-haskell
Auth.hs
module Domain.Auth ( -- * Types Auth(..), Email(rawEmail), mkEmail, Password(rawPassword), mkPassword, UserId, VerificationCode, SessionId, RegistrationError(..), EmailVerificationError(..), LoginError(..), -- * Ports AuthRepo(..), EmailVerificationNotif(..), SessionRepo(..), -- * U...
null
https://raw.githubusercontent.com/Apress/practical-webdev-haskell/17b90c06030def254bb0497b9e357f5d3b96d0cf/08/src/Domain/Auth.hs
haskell
* Types * Ports * Use cases
module Domain.Auth ( Auth(..), Email(rawEmail), mkEmail, Password(rawPassword), mkPassword, UserId, VerificationCode, SessionId, RegistrationError(..), EmailVerificationError(..), LoginError(..), AuthRepo(..), EmailVerificationNotif(..), SessionRepo(..), register, verifyEmail, login...
cb842f43fdae14e9f9310f275138bab5f9a79dbc250b68d70284e3ca906c8f3e
synduce/Synduce
largest_even_pos_v2.ml
* @synduce -NB -n 10 --no - lifting type 'a clist = | Elt of 'a | Cons of 'a * 'a clist let rec is_sorted = function | Elt x -> true | Cons (hd, tl) -> aux hd tl and aux prev = function | Elt x -> prev >= x | Cons (hd, tl) -> prev >= hd && aux hd tl ;; let rec lpen = function | Elt x -> if x mod 2 = 0...
null
https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/constraints/sortedlist/largest_even_pos_v2.ml
ocaml
* @synduce -NB -n 10 --no - lifting type 'a clist = | Elt of 'a | Cons of 'a * 'a clist let rec is_sorted = function | Elt x -> true | Cons (hd, tl) -> aux hd tl and aux prev = function | Elt x -> prev >= x | Cons (hd, tl) -> prev >= hd && aux hd tl ;; let rec lpen = function | Elt x -> if x mod 2 = 0...
51156624ffb65536ff3891c5a6b95236f2b046f8461c4927fd5af309a97ecba2
input-output-hk/marlowe-cardano
Transaction.hs
{-# LANGUAGE Arrows #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} module Language.Marlowe.Runtime.Transaction where import Cardano.Api (Tx) import qualified Cardano.Api as C import Cardano.Api.Byron (BabbageEra) import Control.Concurrent.Component import Control.Concurrent.STM (STM) import Data.Text (Text)...
null
https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/bc9a0325f13b886e90ea05196ffb70a46c2ab095/marlowe-runtime/tx/Language/Marlowe/Runtime/Transaction.hs
haskell
# LANGUAGE Arrows # # LANGUAGE GADTs # # LANGUAGE RankNTypes #
module Language.Marlowe.Runtime.Transaction where import Cardano.Api (Tx) import qualified Cardano.Api as C import Cardano.Api.Byron (BabbageEra) import Control.Concurrent.Component import Control.Concurrent.STM (STM) import Data.Text (Text) import Data.Void import Language.Marlowe.Runtime.ChainSync.Api (ChainSyncQ...
161da1addc9266e14fae7e62408691a56b03b1271511ce36b3e18324353f033b
blamario/monoid-subclasses
Stateful.hs
Copyright 2013 - 2022 License : BSD3 ( see BSD3-LICENSE.txt file ) Copyright 2013-2022 Mario Blazevic License: BSD3 (see BSD3-LICENSE.txt file) -} -- | This module defines the monoid transformer data type 'Stateful'. -- > > let s = setState [ 4 ] $ pure " data " : : Stateful [ Int ] String ...
null
https://raw.githubusercontent.com/blamario/monoid-subclasses/32e2b8310bb76fde7b0bda54c159f1a44092f745/src/Data/Monoid/Instances/Stateful.hs
haskell
| This module defines the monoid transformer data type 'Stateful'. >> s >Stateful ("data",[4]) >> factors s # LANGUAGE Haskell2010, DeriveDataTypeable # (Applicative(..)) ((<$>)) # INLINE (<>) # # INLINE foldl' # # INLINE foldMap # # INLINE take # # INLINE drop # # INLINE foldl' # # INLINE spanMaybe_' # # INLINE...
Copyright 2013 - 2022 License : BSD3 ( see BSD3-LICENSE.txt file ) Copyright 2013-2022 Mario Blazevic License: BSD3 (see BSD3-LICENSE.txt file) -} > > let s = setState [ 4 ] $ pure " data " : : Stateful [ Int ] String > [ Stateful ( " d",[]),Stateful ( " a",[]),Stateful ( " t",[]),Statefu...
5749a0cdff7f42a90eee4b7efa6456678ec052074f4c5d5ee0e8d47902a26622
yallop/ocaml-ctypes
test_stubs.ml
* Copyright ( c ) 2013 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2013 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) open OUnit2 open Ctypes open ...
null
https://raw.githubusercontent.com/yallop/ocaml-ctypes/52ff621f47dbc1ee5a90c30af0ae0474549946b4/tests/test-stubs/test_stubs.ml
ocaml
* Copyright ( c ) 2013 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2013 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) open OUnit2 open Ctypes open ...
33fd0fd308262ea2e544c1e88208733f45beb906bd9b9b59655a7dd546227912
andrewMacmurray/haskell-book-solutions
compose.hs
module Compose where oddsFrom :: Integer -> [Integer] oddsFrom = take 5 . filter odd . enumFrom negateSum :: Num a => [a] -> a negateSum = negate . sum mySum :: Num a => [a] -> a mySum = foldl (+) 0 ay :: [Char] -> Int ay = length . filter (== 'a')
null
https://raw.githubusercontent.com/andrewMacmurray/haskell-book-solutions/f4fd386187c03828d1736d9a43642ab4f0ec6462/src/ch7/compose.hs
haskell
module Compose where oddsFrom :: Integer -> [Integer] oddsFrom = take 5 . filter odd . enumFrom negateSum :: Num a => [a] -> a negateSum = negate . sum mySum :: Num a => [a] -> a mySum = foldl (+) 0 ay :: [Char] -> Int ay = length . filter (== 'a')
2f1dd284a294abfad6ecb00d65aee6df21e6cadea0da05689620c5c7bba9fef9
EligiusSantori/L2Apf
command_builder.scm
; l2j/gameserver/clientpackets/SendBypassBuildCmd.java (module system racket/base (require "../../packet.scm" ) (provide game-client-packet/command-builder) (define (game-client-packet/command-builder command) (let ((s (open-output-bytes))) (begin (write-byte #x5b s) (write-utf16 command s) (get...
null
https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/packet/game/client/command_builder.scm
scheme
l2j/gameserver/clientpackets/SendBypassBuildCmd.java
(module system racket/base (require "../../packet.scm" ) (provide game-client-packet/command-builder) (define (game-client-packet/command-builder command) (let ((s (open-output-bytes))) (begin (write-byte #x5b s) (write-utf16 command s) (get-output-bytes s) ) ) ) )
6de2599d3eda33f87b2a04c7054973ac18910aac2c31d63387b81f8263cca867
privet-kitty/cl-competitive
read-float.lisp
;; This is a decimal reader specialized for the inputs that can be handled ;; within the range of FIXNUM. The implementation is based on ;; SB-IMPL::MAKE-FLOAT. (defpackage :cp/read-float (:use :cl) (:export #:read-decimal #:read-float)) (in-package :cp/read-float) ;; TODO: test (declaim (ftype (function * (value...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/read-float.lisp
lisp
This is a decimal reader specialized for the inputs that can be handled within the range of FIXNUM. The implementation is based on SB-IMPL::MAKE-FLOAT. TODO: test #\Nul
(defpackage :cp/read-float (:use :cl) (:export #:read-decimal #:read-float)) (in-package :cp/read-float) (declaim (ftype (function * (values rational &optional)) read-decimal)) (defun read-decimal (&optional (in *standard-input*)) "Reads a fixed-point decimal and returns it as a rational. Example: CL-USER> (re...
1024f22c23dc9ce9fe1689518a3cb0fdc9567b81c149e88969f8c34533de18c9
rabbitmq/ra
enqueuer.erl
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 ) 2017 - 2022 VMware , Inc. or its affiliates . All rights reserved . %% -module(enqueuer). -behaviour(gen_server). %% AP...
null
https://raw.githubusercontent.com/rabbitmq/ra/72439a5c25f6cf9e8d2a26b21fe456f94df516d4/test/enqueuer.erl
erlang
API functions gen_server callbacks =================================================================== API functions =================================================================== =================================================================== gen_server callbacks ========================================...
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 ) 2017 - 2022 VMware , Inc. or its affiliates . All rights reserved . -module(enqueuer). -behaviour(gen_server). -export([st...
525d47de71581971670425b07f33a582271d14e2137721562b171b2b80dc1b41
mchakravarty/gloss-game
Main.hs
-- Very simple example of bouncing and jumping character. import Data.Maybe import Graphics.Gloss.Game -- Constants -- --------- width, height :: Float width = 600 height = 400 slimeSprite :: Picture slimeSprite = bmp "Slime.bmp" slimeBounceSprites :: [Picture] slimeBounceSprites = [ scale 0.5 0.5 $ bmp "Slim...
null
https://raw.githubusercontent.com/mchakravarty/gloss-game/1fa1208ae97cee7c1b9ac406cedf14d61551a3e6/examples/bouncy-slime/Main.hs
haskell
Very simple example of bouncing and jumping character. Constants --------- Game world state ---------------- Game play --------- Level design ------------
import Data.Maybe import Graphics.Gloss.Game width, height :: Float width = 600 height = 400 slimeSprite :: Picture slimeSprite = bmp "Slime.bmp" slimeBounceSprites :: [Picture] slimeBounceSprites = [ scale 0.5 0.5 $ bmp "Slime2.bmp" , scale 0.5 0.5 $ bmp "Slime3.bmp" , scale 0.5 0.5 $ bmp "Slime4.bmp...
c1727c0a35a9bc5dffbd94b6164f21331c1829a05b7c9083659ebecee67d2b39
uscensusbureau/citysdk
core.cljs
(ns worker.core (:require [census.core :refer [census]])) (def ^:export worker census)
null
https://raw.githubusercontent.com/uscensusbureau/citysdk/c19195fc1e7f03c384eb98a2f5bb7f2224a43a51/v2/src/worker/core.cljs
clojure
(ns worker.core (:require [census.core :refer [census]])) (def ^:export worker census)
a8604ba5e9765cf991086d81c4b9b544ee4d5d832689c73079e3c5e60eb20671
BU-CS320/Fall-2018
Lang3Test.hs
module Lang3Test where import Data.Char import Data.List import Test.Tasty (testGroup) import Test.Tasty.HUnit (assertEqual, assertBool, testCase) import Test.Tasty.QuickCheck (testProperty,Arbitrary, oneof,arbitrary ) import Lang3(Ast(AstInt,Plus,Separator,Assign,Id), eval) unitTests = testGroup ...
null
https://raw.githubusercontent.com/BU-CS320/Fall-2018/beec3ca88be5c5a62271a45c8053fb1b092e0af1/assignments/week5/hw/tests/Lang3Test.hs
haskell
module Lang3Test where import Data.Char import Data.List import Test.Tasty (testGroup) import Test.Tasty.HUnit (assertEqual, assertBool, testCase) import Test.Tasty.QuickCheck (testProperty,Arbitrary, oneof,arbitrary ) import Lang3(Ast(AstInt,Plus,Separator,Assign,Id), eval) unitTests = testGroup ...
655d550ac0dacd48f553d562088cb23578bf854b5893501ced1e74f9ec93f128
cirodrig/triolet
RemoveUnits.hs
| Remove unit types from a program . After closure conversion , unit values serve no purpose and we can delete them . They must be kept before closure conversion in order to account for curried application . For example , if the function @f@ takes two arguments and returns an int , then @f(1)@ returns a ...
null
https://raw.githubusercontent.com/cirodrig/triolet/e515a1dc0d6b3e546320eac7b71fb36cea5b53d0/src/program/LowLevel/RemoveUnits.hs
haskell
| Expand a variable to a value. If the variable has unit type, then delete it. Remove unit values from types Load or store of unit value is deleted Closure conversion should have eliminated these
| Remove unit types from a program . After closure conversion , unit values serve no purpose and we can delete them . They must be kept before closure conversion in order to account for curried application . For example , if the function @f@ takes two arguments and returns an int , then @f(1)@ returns a ...
a68f9783887b2e7a6216ad95064fe297eb41ef72798e504dfb6823527b9bf645
kaoskorobase/mescaline
default.hs
it = patch $ par $ flip List.map [0..7] $ \i -> let tick = 0.125 in sequencer tick (region i tick (rand 0 1))
null
https://raw.githubusercontent.com/kaoskorobase/mescaline/13554fc4826d0c977d0010c0b4fb74ba12ced6b9/resources/patches/default.hs
haskell
it = patch $ par $ flip List.map [0..7] $ \i -> let tick = 0.125 in sequencer tick (region i tick (rand 0 1))
c237f6ed0d58506724520f3b4c4b96f4ff05fdd1f7fdffedae00233ccb9fe99b
ocaml-omake/omake
lm_uname.ml
type uname = { sysname : string; nodename : string; release : string; version : string; machine : string } external lm_uname : unit -> uname = "lm_uname" let uname = lm_uname () let sysname = uname.sysname let nodename = uname.nodename let release = uname.release let version = uname...
null
https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/libmojave/lm_uname.ml
ocaml
type uname = { sysname : string; nodename : string; release : string; version : string; machine : string } external lm_uname : unit -> uname = "lm_uname" let uname = lm_uname () let sysname = uname.sysname let nodename = uname.nodename let release = uname.release let version = uname...
1fe84d8bc84dd3d67f9570447eb9406545418256087128bbec5394138a228abd
TrustInSoft/tis-kernel
export.mli
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/qed/src/export.mli
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of WP plug - in of Frama - C. Copyright ( C ) 2007 - 2015 ...
2f2811823f2df069a0158b4b29cbf0431957492f86974a608c453563e145343c
qnikst/imagemagick
PixelIterator.hs
module Graphics.ImageMagick.MagickWand.PixelIterator ( pixelIterator , pixelRegionIterator , pixelGetNextIteratorRow , pixelSyncIterator , pixelResetIterator , pixelIterateList TODO move to another file TODO move to another file -- , clonePixelIterator -- , isPixelIterator -- , pixelGetCurrentItera...
null
https://raw.githubusercontent.com/qnikst/imagemagick/bc9e7ac85749f42a87901b722c5d36a8bed07d5c/src/Graphics/ImageMagick/MagickWand/PixelIterator.hs
haskell
, clonePixelIterator , isPixelIterator , pixelGetCurrentIteratorRow , pixelGetNextIteratorRow , pixelGetPreviousIteratorRow , pixelSetFirstIteratorRow , pixelSetIteratorRow , pixelSetLastIteratorRow | creates lazy list of pixel vectors
module Graphics.ImageMagick.MagickWand.PixelIterator ( pixelIterator , pixelRegionIterator , pixelGetNextIteratorRow , pixelSyncIterator , pixelResetIterator , pixelIterateList TODO move to another file TODO move to another file , pixelGetIteratorRow ) where import Control.Monad import ...
ea59d547a83a0a85cf5dcd533a6fb76295c7798cb65a751575ab66e492d217f7
kudu-dynamics/blaze
Pretty.hs
# LANGUAGE UndecidableInstances # HLINT ignore " Use : " module Blaze.Pretty ( (<++>), PrettyShow(..), PrettyShow'(..), PStmts(..), PIndexedStmts(..), TokenType(..), TokenContext(..), Token(..), TokenizerCtx, Tokenizer(), Tokenizable(..), runTokenize, blankTokenizer...
null
https://raw.githubusercontent.com/kudu-dynamics/blaze/2220a07d372a817e79525ec2707984b189fe98c9/src/Blaze/Pretty.hs
haskell
, confidence :: Int XXX Figure out value and operand here -- PIL TODO: Need to add carry TODO: Need to add carry TODO: Need added TODO: Add field offset - CallGraph - Function - CFG TODO: Improve | This matches each node to an Int and uses the Int to show the edges
# LANGUAGE UndecidableInstances # HLINT ignore " Use : " module Blaze.Pretty ( (<++>), PrettyShow(..), PrettyShow'(..), PStmts(..), PIndexedStmts(..), TokenType(..), TokenContext(..), Token(..), TokenizerCtx, Tokenizer(), Tokenizable(..), runTokenize, blankTokenizer...
ca13eedd4b2e55db7264c7a119124d83d9d728091d1cae3fcecc08748c2a688e
jmid/regexpanalyser
proddom.ml
module Make(C1 : Absstore.LATTICE)(C2 : Absstore.LATTICE)(C3 : Absstore.LATTICE) = struct type elem = C1.elem * C2.elem * C3.elem let bot = (C1.bot,C2.bot,C3.bot) let top = (C1.top,C2.top,C3.top) leq : elem - > elem - > bool let leq (c1,c2,c3) (d1,d2,d3) = C1.leq c1 d1 && C2.leq c2 d2 && C3.leq c3 d...
null
https://raw.githubusercontent.com/jmid/regexpanalyser/317c2153e593a3abf8887d15b48380672a8021a1/src/proddom.ml
ocaml
eq : elem -> elem -> bool join : elem -> elem -> elem meet : elem -> elem -> elem widening : elem -> elem -> elem fpprint : Format.formatter -> elem -> unit pprint : elem -> unit to_string : L.elem -> string
module Make(C1 : Absstore.LATTICE)(C2 : Absstore.LATTICE)(C3 : Absstore.LATTICE) = struct type elem = C1.elem * C2.elem * C3.elem let bot = (C1.bot,C2.bot,C3.bot) let top = (C1.top,C2.top,C3.top) leq : elem - > elem - > bool let leq (c1,c2,c3) (d1,d2,d3) = C1.leq c1 d1 && C2.leq c2 d2 && C3.leq c3 d...
de6de91f3d0523ecce0f4b20e480740f3c8446d723c930b0d6e0d626aed90dc1
S8A/htdp-exercises
ex230.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex230) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "univers...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex230.rkt
racket
about the language level of this file in a form that our tools can easily process. Data definitions :. – '() Main ::.. FSM.v2 -> FSM.v2 Functions FSM.v2 -> Image FSM.v2 -> Boolean Ends the simulation if the final state is reached. Auxiliary functions finds the state representing current in transitions and ...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex230) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp") (lib "itunes.rkt"...
33bfa5a7734a7065fac07e8f70d771946c2ec05400374e9aec103ca82e5ed595
karimarttila/clojure
users_table_storage.clj
(ns simpleserver.userdb.users-table-storage (:require [clojure.tools.logging :as log] [environ.core :as environ] [simpleserver.userdb.users-service-interface :as ss-users-service-interface] [simpleserver.util.azure-utils :as ss-azure-utils] [simpleserver.userdb.users-common :as ss-users-common]) ...
null
https://raw.githubusercontent.com/karimarttila/clojure/ee1261b9a8e6be92cb47aeb325f82a278f2c1ed3/clj-ring-cljs-reagent-demo/simple-server/src/simpleserver/userdb/users_table_storage.clj
clojure
In real production code we should check the result value, of course.
(ns simpleserver.userdb.users-table-storage (:require [clojure.tools.logging :as log] [environ.core :as environ] [simpleserver.userdb.users-service-interface :as ss-users-service-interface] [simpleserver.util.azure-utils :as ss-azure-utils] [simpleserver.userdb.users-common :as ss-users-common]) ...
8eef216fae7ea4e56b0e7ed84922a5f4cd137ee7558d3b4b136cda414aa8fcf0
theodormoroianu/SecondYearCourses
HaskellChurch_20210415163442.hs
{-# LANGUAGE RankNTypes #-} module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = "cBool " <> show (cIf b True False) The boolean constant true always ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurch_20210415163442.hs
haskell
# LANGUAGE RankNTypes # The boolean negation switches the alternatives The boolean conjunction can be built as a conditional The boolean disjunction can be built as a conditional a pair is a way to compute something based on the values contained within the pair. a function to be applied on the values, it will apply i...
module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = "cBool " <> show (cIf b True False) The boolean constant true always chooses the first alternativ...
cb29feae1cc9c60367920c103ca7a4e6ec88b56108f399f7e074fa1f5c34abb2
Kappa-Dev/KappaTools
cflow_js_interface.ml
* cflow_js_interface.ml * * Creation : < 2016 - 04 - 30 18:34:00 > * Last modification : Time - stamp : < 2016 - 04 - 30 > * * Causal flow compression : a module for * , projet Abstraction , INRIA Paris - Rocquencourt * , Université Paris - Diderot , CNRS *...
null
https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/cflow/cflow_js_interface.ml
ocaml
* cflow_js_interface.ml * * Creation : < 2016 - 04 - 30 18:34:00 > * Last modification : Time - stamp : < 2016 - 04 - 30 > * * Causal flow compression : a module for * , projet Abstraction , INRIA Paris - Rocquencourt * , Université Paris - Diderot , CNRS *...
c7396218f598d3154de879dc0a657254e1115197cb4dd56ee306ea19541eea7d
pepe/two-in-shadows
client.cljs
(ns two-in-shadows.client (:require [rum.core :as rum] [potok.core :as ptk] [two-in-shadows.client.events :as events] [two-in-shadows.client.clowns.events :as clowns.events] [two-in-shadows.client.components :as components])) (defn ^:dev/after-load mount [] (rum/moun...
null
https://raw.githubusercontent.com/pepe/two-in-shadows/b49a484cf1cc1a9a2e0a5ffb358acfe0f56d895c/src/two_in_shadows/client.cljs
clojure
(ns two-in-shadows.client (:require [rum.core :as rum] [potok.core :as ptk] [two-in-shadows.client.events :as events] [two-in-shadows.client.clowns.events :as clowns.events] [two-in-shadows.client.components :as components])) (defn ^:dev/after-load mount [] (rum/moun...
ebcfd345adc4a1af5f60d5b07ab4ca4178846add232a0605fff7b19425b4b71a
comby-tools/comby
comments.ml
module Omega = Omega_comments module Alpha = Alpha_comments
null
https://raw.githubusercontent.com/comby-tools/comby/fa71ea540855ba5bd48d948dd8c8ff034714348d/lib/kernel/parsers/comments.ml
ocaml
module Omega = Omega_comments module Alpha = Alpha_comments
98b27f21118e73ecbbc34fad481761f181c458d395e9b202c7fbfd368ec7a464
oscoin/oscoin
Abstract.hs
| Storing blocks This module provides an opaque interface on a ' BlockStore ' , a handle - like , stateful record which can be used to persist blocks on disk . This is the module where the abstract interface lives , but we also provides two concrete implementations : a pure one living in the '...
null
https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/src/Oscoin/Storage/Block/Abstract.hs
haskell
* Internals The full 'BlockStore' API is the composition of its public and private parts. Morally, the 'BlockStore' offers an opaque interface to some kind of persistent storage for blocks, with a set of operations to insert, remove and retrieve them. | The internals for this 'BlockStore', i.e. the private API wh...
| Storing blocks This module provides an opaque interface on a ' BlockStore ' , a handle - like , stateful record which can be used to persist blocks on disk . This is the module where the abstract interface lives , but we also provides two concrete implementations : a pure one living in the '...
2e6297f04095d4b74181727e4974eb31d9dabd21992e44812b6c36307efeaf88
lpgauth/marina
marina_cache.erl
-module(marina_cache). -include("marina_internal.hrl"). -export([ erase/2, get/2, init/0, put/3 ]). %% public -spec erase(atom(), binary()) -> ok | {error, not_found}. erase(Pool, Key) -> try ets:delete(?ETS_TABLE_CACHE, {Pool, Key}), ok catch error:badarg -> ...
null
https://raw.githubusercontent.com/lpgauth/marina/2d775c003f58d125bb38e7c953c30c36aebc72c6/src/marina_cache.erl
erlang
public
-module(marina_cache). -include("marina_internal.hrl"). -export([ erase/2, get/2, init/0, put/3 ]). -spec erase(atom(), binary()) -> ok | {error, not_found}. erase(Pool, Key) -> try ets:delete(?ETS_TABLE_CACHE, {Pool, Key}), ok catch error:badarg -> {error,...
bfaa795983c178c44a0b3b93d4a370ea6c5a4b81e0e9523db11ec223668e0987
RedPRL/ocaml-bwd
Bwd.ml
include BwdDef module Bwd = BwdNoLabels module BwdLabels = BwdLabels module BwdNotation = BwdNotation
null
https://raw.githubusercontent.com/RedPRL/ocaml-bwd/6551e12be1e47f7cf2723d0a1e9f0d636de67a06/src/Bwd.ml
ocaml
include BwdDef module Bwd = BwdNoLabels module BwdLabels = BwdLabels module BwdNotation = BwdNotation
7b83635e218f3d5ac35a862f259ca9c455c63b1642233c7b99fb6ab7e7c603ec
aowens-21/puzzler
main.rkt
#lang racket/base (require "tokenizer.rkt" "parser.rkt") (require syntax/strip-context) (module+ reader (provide read-syntax)) (define (read-syntax path port) (define parse-tree (parse path (make-tokenizer port))) (strip-context #`(module puzzler-mod puzzler/expander #,parse-tree)))
null
https://raw.githubusercontent.com/aowens-21/puzzler/be84df0049795acddf4eee0cc0225f0659df0445/main.rkt
racket
#lang racket/base (require "tokenizer.rkt" "parser.rkt") (require syntax/strip-context) (module+ reader (provide read-syntax)) (define (read-syntax path port) (define parse-tree (parse path (make-tokenizer port))) (strip-context #`(module puzzler-mod puzzler/expander #,parse-tree)))
1b99c134896b420fa8ef380da68f19558b5c4efdb9ca9523d93f7ae0190a5f32
well-typed/cborg
Serialise.hs
{-# LANGUAGE CPP #-} # LANGUAGE RankNTypes # -- | Module : Codec . Serialise Copyright : ( c ) 2015 - 2017 License : BSD3 - style ( see LICENSE.txt ) -- -- Maintainer : -- Stability : experimental Portability : non - portable ( GHC extensions ) -- -- This module prov...
null
https://raw.githubusercontent.com/well-typed/cborg/9be3fd5437f9d2ec1df784d5d939efb9a85fd1fb/serialise/src/Codec/Serialise.hs
haskell
# LANGUAGE CPP # | Maintainer : Stability : experimental This module provides functions to serialise and deserialise Haskell values for storage or transmission, to and from lazy and utilities to help you make your types serialisable. For a full tutorial on using this module, see $highleve...
# LANGUAGE RankNTypes # Module : Codec . Serialise Copyright : ( c ) 2015 - 2017 License : BSD3 - style ( see LICENSE.txt ) Portability : non - portable ( GHC extensions ) @'Data . ByteString . Lazy . ByteString'@s . It also provides a type class " Codec . Serialise . Tutorial " . ...
14150b326dda14f3d40b5c5bf83fc29270ec83b95bb64f931bd1c696e0ef7cc2
hyperfiddle/electric
pokemon.cljc
(ns dustin.y2023.pokemon #?(:cljs (:require-macros dustin.y2023.pokemon)) (:import [hyperfiddle.electric Pending]) (:require [hyperfiddle.electric :as e] [hyperfiddle.electric-dom2 :as dom])) ;; Context: ;; We want to react to database changes ;; Some databases are reactive by design (Materialize....
null
https://raw.githubusercontent.com/hyperfiddle/electric/b61175a5d9984a0aa8d6990caf8f8b0c7e8eb8e2/scratch/dustin/y2023/pokemon.cljc
clojure
Context: We want to react to database changes Some databases are reactive by design (Materialize.com) Some have interesting features: - Firebase can notify for changes Solution: We want this example to stay simple. We simulate a DB notification with a `!dirty` atom. If `!dirty` has changed, we rerun the query....
(ns dustin.y2023.pokemon #?(:cljs (:require-macros dustin.y2023.pokemon)) (:import [hyperfiddle.electric Pending]) (:require [hyperfiddle.electric :as e] [hyperfiddle.electric-dom2 :as dom])) - PostgreSQL have LISTEN / NOTIFY ( example : -11-05-LuminusPostgresNotifications.html ) - one can als...
0adecdf1a5f520a7e8d9532d097124e43dcea2a260baaa73943720b5df33c5fc
duncanatt/detecter
cow_date.erl
Copyright ( c ) 2013 - 2018 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC...
null
https://raw.githubusercontent.com/duncanatt/detecter/95b6a758ce6c60f3b7377c07607f24d126cbdacf/experiments/coordination_2022/src/cowlib/cow_date.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2013 - 2018 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(cow_date). -export([parse_date/1]). -export(...
0c17a0464c9ee7ec14230c0d71c95903a4a385aac7e7002b35f0dc5c1ca6b20c
spurious/sagittarius-scheme-mirror
jwa.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; rfc / jwa.scm - JSON Web Algorithms ( JWK ) ;;; Copyright ( c ) 2017 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. R...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/rfc/jwa.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...
rfc / jwa.scm - JSON Web Algorithms ( JWK ) Copyright ( c ) 2017 < > " 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 TORT ( INCLUDING (libr...
0ffe2bd8cbabcf3cd7d3822112cdf0947f331a5ef4227586f28453156adfdcef
clojure/clojurescript
cli.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 ;; the t...
null
https://raw.githubusercontent.com/clojure/clojurescript/9c01d9b0a70ada1cb17cf3ce65ae93d76d0d3b08/src/main/clojure/cljs/cli.clj
clojure
The use and distribution terms for this software are covered by the 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 this notice, or any other, from this software. ---...
Copyright ( c ) . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns cljs.cli (:require [clojure.java.io :as io] [clojure.string :as string] [clojure.edn :as edn] [cljs.util :as util] [cljs.env :as env] [cljs.analyzer :as ana] ...
a19d7dd7e8ce8a45fdbf9d50a06e358468bfdd427bfe1f492637078cd447a36b
BrunoBonacci/mulog
json.clj
(ns com.brunobonacci.mulog.common.json (:require [charred.api :as json] [com.brunobonacci.mulog.utils :as ut])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; ----=...
null
https://raw.githubusercontent.com/BrunoBonacci/mulog/25d5cc1041a5957ebf46a79bfcc9d1faf8b8bd2c/mulog-json/src/com/brunobonacci/mulog/common/json.clj
clojure
;; ----==| I N T E R N A L |==---- ;; ;; Add encoders for various types ...
(ns com.brunobonacci.mulog.common.json (:require [charred.api :as json] [com.brunobonacci.mulog.utils :as ut])) (defn- to-keyword "turns the argument into a keyword and interns it" {:inline (fn [x] `(clojure.lang.Keyword/intern ^String ~x))} [^String x] (clojure.lang.Keyword/intern x)) (ex...
8e88ac868f83e245b1a6c91393b976c921fd436355a21dcba26f327e5895f0af
AndrasKovacs/setoidtt
Trie.hs
# options_ghc -Wno - unused - imports # module StringTrie.Trie where import Data.Char import Data.Bits import Data.Word newtype Prefix = Prefix Int instance Show Prefix where show = undefined data Node a = Node { _prefix :: Prefix, _value :: a, _child :: Trie a, _next :: Trie a } deriving Show d...
null
https://raw.githubusercontent.com/AndrasKovacs/setoidtt/621aef2c4ae5a6acb418fa1153575b21e2dc48d2/setoidtt/src/StringTrie/Trie.hs
haskell
# unpack # # unpack # # unpack #
# options_ghc -Wno - unused - imports # module StringTrie.Trie where import Data.Char import Data.Bits import Data.Word newtype Prefix = Prefix Int instance Show Prefix where show = undefined data Node a = Node { _prefix :: Prefix, _value :: a, _child :: Trie a, _next :: Trie a } deriving Show d...
de4c5706fde3e0ee4520c73f87f787bd1bb2713ca1b4d41e347b01bef5f46141
o1-labs/snarkyjs-crypto
params.ml
type 'a t = {mds: 'a array array; round_constants: 'a array array} let map f {mds; round_constants} = let f = Array.map (Array.map f) in {mds= f mds; round_constants= f round_constants}
null
https://raw.githubusercontent.com/o1-labs/snarkyjs-crypto/626f2d3a591447e9803f11955e734e84c1edaa71/src/params.ml
ocaml
type 'a t = {mds: 'a array array; round_constants: 'a array array} let map f {mds; round_constants} = let f = Array.map (Array.map f) in {mds= f mds; round_constants= f round_constants}
4c64d8865b1302b28a2558992aec88b504080be387964ad23d67dd93f8b95b35
aelve/guide
Merge.hs
| An algorithm for merging users ' edits . Specifically , there 's just one function – ' merge ' – and it simply does a three - way diff . module Guide.Diff.Merge ( merge, ) where import Imports import Guide.Diff.Tokenize import qualified Data.Patch as PV import qualified Data.Text as T | An implementatio...
null
https://raw.githubusercontent.com/aelve/guide/96a338d61976344d2405a16b11567e5464820a9e/back/src/Guide/Diff/Merge.hs
haskell
^ Original text ^ Variant A (preferred) ^ Variant B ^ Merged text
| An algorithm for merging users ' edits . Specifically , there 's just one function – ' merge ' – and it simply does a three - way diff . module Guide.Diff.Merge ( merge, ) where import Imports import Guide.Diff.Tokenize import qualified Data.Patch as PV import qualified Data.Text as T | An implementatio...
40dd4af1a80e062c7f3de3dc77436f567526306c294051b401ac73e2e9317328
emanjavacas/cosycat
landing.clj
(ns cosycat.views.landing (:require [hiccup.core :refer [html]] [cosycat.views.imgs :refer [random-img]] [cosycat.views.layout :refer [base]])) (defn landing-page [& {:keys [logged?] :or {:logged? false}}] (let [{href :href name :name} (random-img)] (base {:left [:div ...
null
https://raw.githubusercontent.com/emanjavacas/cosycat/a7186363d3c0bdc7b714af126feb565f98793a6e/src/clj/cosycat/views/landing.clj
clojure
(ns cosycat.views.landing (:require [hiccup.core :refer [html]] [cosycat.views.imgs :refer [random-img]] [cosycat.views.layout :refer [base]])) (defn landing-page [& {:keys [logged?] :or {:logged? false}}] (let [{href :href name :name} (random-img)] (base {:left [:div ...
1f0bdf3c376196f82c6350b5b1f440b06cb6e52c4a420d0fa9ff1ab93e919a23
BillHallahan/G2
LHReducers.hs
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TupleSections # # LANGUAGE UndecidableInstances # module G2.Liquid.LHReducers ( lhRed , allCallsRed , higherOrderCallsRed ,...
null
https://raw.githubusercontent.com/BillHallahan/G2/ef627b06422bf1fc4cb9ca6cf14d1cb83bacc33a/src/G2/Liquid/LHReducers.hs
haskell
# LANGUAGE OverloadedStrings # lhReduce (b) [StateB] The other var is created if the definition of f is of the form: We introduce a new symbolic variable x_s, with the same type of s, and set the curr expr to let x = x_s in Assert (a x'_1 ... x'_n x_s) x_s This allows us to choose any value for ...
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TupleSections # # LANGUAGE UndecidableInstances # module G2.Liquid.LHReducers ( lhRed , allCallsRed , higherOrderCallsRed , redArbErrors ...
2b19bb1f85b4266761616e1dd1f8ff822ef3099806e13d089c33a850b2eddd56
Idorobots/spartan
peggen.rkt
#lang racket ;; PEG parser generator (require (for-syntax "utils/peg.rkt")) (provide match-result no-match matches matches? match-match match-start match-end generate-parser) ;; Matches (define (no-match) '()) (define-struct match-result (result start end) #:transparent) (define (matches m start end) (make-ma...
null
https://raw.githubusercontent.com/Idorobots/spartan/453155f369bfb1d8cee9a210a34e0f9ea0adef94/src/compiler/peggen.rkt
racket
PEG parser generator Matches
#lang racket (require (for-syntax "utils/peg.rkt")) (provide match-result no-match matches matches? match-match match-start match-end generate-parser) (define (no-match) '()) (define-struct match-result (result start end) #:transparent) (define (matches m start end) (make-match-result m start end)) (define m...
1d05ff59b79d255dbb8c263d7671a3e6b0a729b34cb6f44c4eb240e169619b19
igorhvr/bedlam
fmt-mzscheme.scm
fmt-mzscheme.scm -- ;; Copyright ( c ) 2007 - 2009 . All rights reserved . ;; BSD-style license: (module fmt mzscheme (require (only (lib "1.ss" "srfi") find fold length+ remove filter...
null
https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/fmt/fmt-0.8.1/fmt-mzscheme.scm
scheme
BSD-style license: -- insert fmt.scm here --
fmt-mzscheme.scm -- Copyright ( c ) 2007 - 2009 . All rights reserved . (module fmt mzscheme (require (only (lib "1.ss" "srfi") find fold length+ remove filter ev...
7748331b4152a1e3cd74a213dcd5929e6189ea74b9836a9815e1b67b1970bc4e
alonsodomin/groot
TaskDef.hs
module Groot.Internal.AWS.TaskDef where import Control.Lens import Control.Monad.Trans.Maybe import Data.Conduit import qualified Data.Conduit.List as CL import Network.AWS import qualified Network.AWS.ECS as ECS import Groot.Types taskDefId :: ECS....
null
https://raw.githubusercontent.com/alonsodomin/groot/040215db2797bef27b1c336ea826a58ddd45f8de/src/Groot/Internal/AWS/TaskDef.hs
haskell
module Groot.Internal.AWS.TaskDef where import Control.Lens import Control.Monad.Trans.Maybe import Data.Conduit import qualified Data.Conduit.List as CL import Network.AWS import qualified Network.AWS.ECS as ECS import Groot.Types taskDefId :: ECS....
238fe70c56bc59844cbf891c5fe4b1b08f374bcac8b564694b1ac37ee9805d96
links-lang/links
column.ml
open Lens_utility module Type = Phrase_type type t = { table : string; name : string; alias : string; typ : Type.t; present : bool; } [@@deriving show, sexp] let make ~table ~name ~alias ~typ ~present = { table; name; alias; typ; present } let name t = t.name let alias t = t.alias let present t = t.pre...
null
https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/lens/column.ml
ocaml
Equality in this case can be the simple structural equality
open Lens_utility module Type = Phrase_type type t = { table : string; name : string; alias : string; typ : Type.t; present : bool; } [@@deriving show, sexp] let make ~table ~name ~alias ~typ ~present = { table; name; alias; typ; present } let name t = t.name let alias t = t.alias let present t = t.pre...
0f34aa66afe6cfc9dd262e16eb83b64d08aa8b2095e559e61f8a3ead21253c42
yapsterapp/er-cassandra
record_test.clj
(ns er-cassandra.record-test (:require [er-cassandra.util.test :as tu] [er-cassandra.session :as s] [er-cassandra.session.alia :as alia-session] [er-cassandra.record :as r] [schema.test :as st] [clojure.test :refer [deftest is testing use-fixtures]] [clj-uuid :as uuid])) (use-fixtures :once st/v...
null
https://raw.githubusercontent.com/yapsterapp/er-cassandra/1d059f47bdf8654c7a4dd6f0759f1a114fdeba81/test/er_cassandra/record_test.clj
clojure
insert with record layer to trigger truncates on session close insert with record layer to trigger truncates on session close
(ns er-cassandra.record-test (:require [er-cassandra.util.test :as tu] [er-cassandra.session :as s] [er-cassandra.session.alia :as alia-session] [er-cassandra.record :as r] [schema.test :as st] [clojure.test :refer [deftest is testing use-fixtures]] [clj-uuid :as uuid])) (use-fixtures :once st/v...