_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
3040897e101eae4cb9d7fd7216aae3a9f9bb37ae2db6636f59ca37a9bcd2a1e3
gonimo/gonimo
I18N.hs
{-# LANGUAGE OverloadedStrings #-} module Gonimo.Client.MessageBox.UI.I18N where import Gonimo.I18N data Message = The_invitation_got_rejected_and_is_now_invalid | Your_device_is_now_a_family_member_make_it_a_baby_station | You_are_already_a_member_of_this_family_wanna_switch ...
null
https://raw.githubusercontent.com/gonimo/gonimo/f4072db9e56f0c853a9f07e048e254eaa671283b/front/src/Gonimo/Client/MessageBox/UI/I18N.hs
haskell
# LANGUAGE OverloadedStrings #
module Gonimo.Client.MessageBox.UI.I18N where import Gonimo.I18N data Message = The_invitation_got_rejected_and_is_now_invalid | Your_device_is_now_a_family_member_make_it_a_baby_station | You_are_already_a_member_of_this_family_wanna_switch | Switch_Family ...
7a7450d50a7992647eda1072d3142c87b89e7ef4c7f175918fe1706828f0ab4f
rowangithub/DOrder
15_invgen.ml
* from Invgen test suite : faile because j + k > = n is the desired invariant * from Invgen test suite: faile because j + k >= n is the desired invariant *) let rec loop j k n = if (j < n) then loop (j+1) (k-1) n else assert (k >= 0) let main k n = if (n > 0 && k > n) then let j = 0 in loop j k n e...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/hola/15_invgen.ml
ocaml
* from Invgen test suite : faile because j + k > = n is the desired invariant * from Invgen test suite: faile because j + k >= n is the desired invariant *) let rec loop j k n = if (j < n) then loop (j+1) (k-1) n else assert (k >= 0) let main k n = if (n > 0 && k > n) then let j = 0 in loop j k n e...
f2d3142cd1d9fa796e82c78d009e90c8f36dadb94ae20ad9fb455e63ff973420
racket/draw
arrow.rkt
#lang racket/base (require racket/class racket/math racket/draw) (provide draw-arrow) (define largest 16383) (define smallest -16383) (define arrow-head-angle (/ pi 8)) (define cos-arrow-head-angle (cos arrow-head-angle)) (define sin-arrow-head-angle (sin arrow-head-angle)) ; If alpha is the angl...
null
https://raw.githubusercontent.com/racket/draw/a6558bdc18438e784c23d452ffd877dac867a7fd/draw-lib/racket/draw/arrow.rkt
racket
If alpha is the angle between the x axis and the Start->End vector: p2-x = end-x + arrow-head-size * cos(alpha + pi - arrow-head-angle) = end-x - arrow-head-size * cos(alpha - arrow-head-angle) = end-x - arrow-head-size-cos-arrow-head-angle * cos-alpha - arrow-head-size-sin-arrow-head-angle * sin-alpha ...
#lang racket/base (require racket/class racket/math racket/draw) (provide draw-arrow) (define largest 16383) (define smallest -16383) (define arrow-head-angle (/ pi 8)) (define cos-arrow-head-angle (cos arrow-head-angle)) (define sin-arrow-head-angle (sin arrow-head-angle)) = end - x - arr...
8be1adeb3b622afeb5157c5a5308aa3ac7e25d9a77debf375fba0b962d5b9495
TorXakis/TorXakis
All.hs
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} module ExploreModels.All (allTests) wher...
null
https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/test/sqatt/src/ExploreModels/All.hs
haskell
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} module ExploreModels.All (allTests) wher...
fad359603500de6e52ef3cced1700ef817664f6b09a859b8dd51eca8a29c584c
naoiwata/sicp
ex3.46.scm
;; ;; @author naoiwata SICP Chapter3 Exercise 3.46 . ;; ; ------------------------------------------------------------------------ ; discussion ; ------------------------------------------------------------------------ あるプロセスAが set - and - test ! ( set - car ! cell # t ) によって セルを真に代入するまでの間に , 別のプロセスBが set - ...
null
https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter3/ex3.46.scm
scheme
@author naoiwata ------------------------------------------------------------------------ discussion ------------------------------------------------------------------------ END
SICP Chapter3 Exercise 3.46 . あるプロセスAが set - and - test ! ( set - car ! cell # t ) によって セルを真に代入するまでの間に , 別のプロセスBが set - and - test ! プロセスAとプロセスBが同時に相互排除器を獲得するのを許してしまい , .
0ade52e7c8b3113035ecf1fb98c5cfd5687c3ca68728e1a64be834595457fe9e
ocaml-sf/learn-ocaml-corpus
trail_reverse_undo.ml
(* ------------------------------------------------------------------------------ *) (* Building formulae. *) let var x = FVar x let falsity = FConst false let truth = FConst true let const sense = if sense then truth else falsity (* [FConst sense] would work too, but would allocate memory *) let neg ...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/sat/wrong/trail_reverse_undo.ml
ocaml
------------------------------------------------------------------------------ Building formulae. [FConst sense] would work too, but would allocate memory ------------------------------------------------------------------------------ Evaluating formulae. We assume [n < Sys.word_size - 1]. -----------------...
let var x = FVar x let falsity = FConst false let truth = FConst true let const sense = if sense then truth else falsity let neg f = match f with | FConst sense -> const (not sense) | FNeg f -> f | _ -> FNeg f let conn sense f1 f2 = match f1, f2 with | FConst sense', f | f...
477def5281b069553d2895e9146972dd3411e94e000de06c0f54db580dba1f46
workframers/garamond
version.clj
(ns garamond.version (:require [clojure.string :as string] [taoensso.timbre :as log]) (:import (com.github.zafarkhaja.semver Version))) cf (defn parse [version-str] (try (Version/valueOf version-str) (catch Exception e (log/errorf "Can't parse version string from '%s': %s" version...
null
https://raw.githubusercontent.com/workframers/garamond/a5077bc99d5f6e303735505068d5363d3b2cc00c/src/garamond/version.clj
clojure
Note, this is probably pretty brittle but works for simple cases
(ns garamond.version (:require [clojure.string :as string] [taoensso.timbre :as log]) (:import (com.github.zafarkhaja.semver Version))) cf (defn parse [version-str] (try (Version/valueOf version-str) (catch Exception e (log/errorf "Can't parse version string from '%s': %s" version...
33b0cfc0e2d3ffd6a102fa9eb2e8b4f5d5061517454b774e54de7573c8b6bc92
sufrin/InteractiveSedlexMenhirExample
sedlexing.mli
The package sedlex is released under the terms of an MIT - like license . (* See the attached LICENSE file. *) Copyright 2005 , 2013 by and LexiFi . Modified 2021 to adapt for use with channels connected to terminals * Runtime support for lex...
null
https://raw.githubusercontent.com/sufrin/InteractiveSedlexMenhirExample/b38b83ad3dfc3e134b230564070a75283689b08f/sedlexing.mli
ocaml
See the attached LICENSE file. * The type of lexer buffers. A lexer buffer is the argument passed to the scanning functions defined by the generated lexers. The lexer buffer holds the internal information for the scanners, including the code points...
The package sedlex is released under the terms of an MIT - like license . Copyright 2005 , 2013 by and LexiFi . Modified 2021 to adapt for use with channels connected to terminals * Runtime support for lexers generated by [ sedlex ] . * This module is roughly equivalent to the mod...
cdc30e22f50d23695b6dfe2a5cf3d990b725130dcf93c63c8de9aee346fd6c59
candera/vmt
install.cljs
(ns weathergen.falcon.install (:require [weathergen.settings :as settings] [taoensso.timbre :as log :refer-macros (log trace debug info warn error fatal report logf tracef debugf infof warnf errorf fatalf reportf spy get-env log-...
null
https://raw.githubusercontent.com/candera/vmt/8cf450e6c34af87d748152afd7f547b92ae9b38e/src/weathergen/falcon/install.cljs
clojure
(set! *warn-on-infer* true) OMG how do people program like this? Not happy about the cell deref here. Seems like I'm mixing callbacks and cells and it's going to be a mess.
(ns weathergen.falcon.install (:require [weathergen.settings :as settings] [taoensso.timbre :as log :refer-macros (log trace debug info warn error fatal report logf tracef debugf infof warnf errorf fatalf reportf spy get-env log-...
3eb604884155fcaf872e6820cce2a3b20948d261022ea8889325281c4b91829c
REPROSEC/dolev-yao-star
Vale_X64_Stack.ml
open Prims let (va_code_Callee_save_registers : Prims.bool -> (Vale_X64_Decls.ins, Vale_X64_Decls.ocmp) Vale_X64_Machine_s.precode) = fun win -> Vale_X64_Machine_s.Block [if win then Vale_X64_Machine_s.Block [Vale_X64_InsStack.va_code_PushXmm (Prims.of_int (15)) ...
null
https://raw.githubusercontent.com/REPROSEC/dolev-yao-star/d97a8dd4d07f2322437f186e4db6a1f4d5ee9230/concrete/hacl-star-snapshot/ml/Vale_X64_Stack.ml
ocaml
open Prims let (va_code_Callee_save_registers : Prims.bool -> (Vale_X64_Decls.ins, Vale_X64_Decls.ocmp) Vale_X64_Machine_s.precode) = fun win -> Vale_X64_Machine_s.Block [if win then Vale_X64_Machine_s.Block [Vale_X64_InsStack.va_code_PushXmm (Prims.of_int (15)) ...
4a193c0570295cd8f19a143691b8d943527cb13c9484357ff28016653d09b8d7
bobot/FetedelascienceINRIAsaclay
findpath.ml
open Printf module Sensor = Mindstorm.Sensor module Motor = Mindstorm.Motor let usleep s = ignore (Unix.select [] [] [] s) let bt = if Array.length Sys.argv < 2 then ( printf "%s <bluetooth addr>\n" Sys.argv.(0); exit 1; ) else Sys.argv.(1) let conn = Mindstorm.connect_bluetooth bt let eye = ...
null
https://raw.githubusercontent.com/bobot/FetedelascienceINRIAsaclay/87765db9f9c7211a26a09eb93e9c92f99a49b0bc/2010/robot/small-programs/findpath.ml
ocaml
Recatch_path : -1, +1, -2, +2 ... follow_path ()
open Printf module Sensor = Mindstorm.Sensor module Motor = Mindstorm.Motor let usleep s = ignore (Unix.select [] [] [] s) let bt = if Array.length Sys.argv < 2 then ( printf "%s <bluetooth addr>\n" Sys.argv.(0); exit 1; ) else Sys.argv.(1) let conn = Mindstorm.connect_bluetooth bt let eye = ...
437de96016e899d563eb8c09b34b4979c8c1437f985fe502e00f7ca6548bacca
josefs/Gradualizer
recursive_type_fail.erl
-module(recursive_type_fail). -export([g/0, j/0, m/0]). -type recursive_t1() :: #{key => recursive_t1()}. -type recursive_t2() :: #{binary() | atom() => recursive_t2()} | true | false | null. -type recursive_t3() :: #{binary() | atom() => recursive_t3()} | true | false | null ...
null
https://raw.githubusercontent.com/josefs/Gradualizer/e57106f4edb1a17288100f776e6c1c190920ec23/test/should_fail/recursive_type_fail.erl
erlang
-module(recursive_type_fail). -export([g/0, j/0, m/0]). -type recursive_t1() :: #{key => recursive_t1()}. -type recursive_t2() :: #{binary() | atom() => recursive_t2()} | true | false | null. -type recursive_t3() :: #{binary() | atom() => recursive_t3()} | true | false | null ...
95d7aa6e3433e4a083c4237cb63d1f2a3f5612166d701386c7769cb0a3712fce
arttuka/reagent-material-ui
accordion.cljs
(ns reagent-mui.material.accordion "Imports @mui/material/Accordion as a Reagent component. Original documentation is at -ui/api/accordion/ ." (:require [reagent.core :as r] ["@mui/material/Accordion" :as MuiAccordion])) (def accordion (r/adapt-react-class (.-default MuiAccordion)))
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/material/accordion.cljs
clojure
(ns reagent-mui.material.accordion "Imports @mui/material/Accordion as a Reagent component. Original documentation is at -ui/api/accordion/ ." (:require [reagent.core :as r] ["@mui/material/Accordion" :as MuiAccordion])) (def accordion (r/adapt-react-class (.-default MuiAccordion)))
745eaf0d0236f653c7f64fa8a69ea5a8b53f611d717aad761f0dabd641821ac9
replikativ/hasch
platform.clj
(ns hasch.platform "Platform specific implementations." (:require [hasch.benc :refer [split-size encode-safe]] [clojure.edn :as edn] [clojure.java.io :as io] [incognito.base :as ib] [hasch.benc :refer [magics PHashCoercion -coerce diges...
null
https://raw.githubusercontent.com/replikativ/hasch/84c4f86ac16a92f356c9378e08e94152d00ee0a2/src/hasch/platform.clj
clojure
don't distinguish characters from string for javascript BUG somehow records can also trigger the map sometimes (?) file is used due to length knowledge support default split-size behaviour transparently 1.7 s factor for single byte ~100x hasch 0.2.3
(ns hasch.platform "Platform specific implementations." (:require [hasch.benc :refer [split-size encode-safe]] [clojure.edn :as edn] [clojure.java.io :as io] [incognito.base :as ib] [hasch.benc :refer [magics PHashCoercion -coerce diges...
a049902823c61d107263351e1478b8c234cc7a427230ccfb59d383e7e01eb8a2
ktakashi/sagittarius-scheme
jwe.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; ;;; rfc/jwe.scm - JSON Web Encryption (JWE) ;;; Copyright ( c ) 2021 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Redistribut...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/80d73e019394331afbb6c7b6bf6a6efc0af8ed6e/sitelib/rfc/jwe.scm
scheme
coding : utf-8 ; -*- rfc/jwe.scm - JSON Web Encryption (JWE) 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 condi...
Copyright ( c ) 2021 < > " 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 #!nounbound (library (rfc jwe) (export jwe-hea...
bc11101b824947ae1296bf2b71069a318f7c6a487c033ff90a65215f7e1c8aa6
kelamg/HtDP2e-workthrough
ex306.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-intermediate-lambda-reader.ss" "lang")((modname ex306) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Abstraction/ex306.rkt
racket
about the language level of this file in a form that our tools can easily process. N -> [List-of N] creates a list (list 0 ... (- n 1)) for any natural number n N -> [List-of N] N -> [List-of N] N -> [List-of N] [Number -> X] Number -> [List-of X] abstract tabulate function
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex306) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (require 2htdp/abstraction) (check-expect (series 5)...
8d5938f0aa6a6163a6ead12d00775a1c7b312e35d5037323755e895f37be1204
anwyn/cl-horde3d
enums.lisp
;;; enums.lisp --- horde3d enums ;;; ___ _ __ _ _ _ __ ___ ___ / _ \ ' _ \| | | | ' _ ` _ \/ _ _ | ;;; | __/ | | | |_| | | | | | \__ \ ;;; \___|_| |_|\__,_|_| |_| |_|___/ ;;; Copyright ( C ) 2009 < > ;;; (in-package :horde3d-cffi) ;;;; ----------------------------------------------------------------...
null
https://raw.githubusercontent.com/anwyn/cl-horde3d/0576aba1879ab6c0f7688566c604d022cc538b4c/src/enums.lisp
lisp
enums.lisp --- horde3d enums ___ _ __ _ _ _ __ ___ ___ | __/ | | | |_| | | | | | \__ \ \___|_| |_|\__,_|_| |_| |_|___/ --------------------------------------------------------------------------- * Group: Enumerations only messages which are smaller or equal to this value only affects textures only af...
/ _ \ ' _ \| | | | ' _ ` _ \/ _ _ | Copyright ( C ) 2009 < > (in-package :horde3d-cffi) (defcenum option "The available engine option parameters. (hence more important) are published in the message queue. (Default: 4) :max-num-messages - Defines the maximum number of m...
e56c94fee5345114083d2f65bf46ebdd93aa3741738caa85518e95a9739fcd8b
camlp5/camlp5
plexing.ml
(* camlp5r *) (* plexing.ml,v *) Copyright ( c ) INRIA 2007 - 2017 open Versdep; type pattern = (string * string); exception Error of string; type location = Ploc.t; type location_function = int -> location; value make_loc = Ploc.make_unlined; value dummy_loc = Ploc.dummy; module Locations = struct type t = {...
null
https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/lib/plexing.ml
ocaml
camlp5r plexing.ml,v
Copyright ( c ) INRIA 2007 - 2017 open Versdep; type pattern = (string * string); exception Error of string; type location = Ploc.t; type location_function = int -> location; value make_loc = Ploc.make_unlined; value dummy_loc = Ploc.dummy; module Locations = struct type t = { locations : ref (array (option P...
62123c764ef3b3c3415c9e36a4db184e519b0030cb06f36d9f1651956ad46853
ocharles/engine.io
Main.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} module Main where import Control.Monad.IO.Class (liftIO) import Control.Monad (forever) import qualified Control.Concurrent.STM as STM import qualified Network.EngineIO as EIO import qualified Network.EngineIO.Snap as EIOSnap import qualified Snap.Core ...
null
https://raw.githubusercontent.com/ocharles/engine.io/04c6092f91cecd34558766564e50ede0cb3c8081/examples/latency/Main.hs
haskell
# LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------
# LANGUAGE FlexibleContexts # module Main where import Control.Monad.IO.Class (liftIO) import Control.Monad (forever) import qualified Control.Concurrent.STM as STM import qualified Network.EngineIO as EIO import qualified Network.EngineIO.Snap as EIOSnap import qualified Snap.Core as Snap import qualified Snap.Util....
d3a993c3393dcfe880153ae640f2b726d4a0d6fc72c33a402fb8739d9484f712
eait-itig/rdp_proto
rdpdr_fsm.erl
%% %% rdpproxy %% remote desktop proxy %% Copyright 2022 < > The University of Queensland %% All rights reserved. %% %% Redistribution and use in source and binary forms, with or without %% modification, are permitted provided that the following conditions %% are met: 1 . Redistributions of source code must re...
null
https://raw.githubusercontent.com/eait-itig/rdp_proto/f096dc9625f328ef71c5ba23521bb8e645723b70/src/rdpdr_fsm.erl
erlang
rdpproxy remote desktop proxy All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer. notice, this list of conditions and the followi...
Copyright 2022 < > The University of Queensland 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS '' AND ANY EXPRESS OR INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENT...
8147f51683c405db0faea4f62703bad6bfa930ed8fee8e3fbe49e350ca72d5a8
brunjlar/protop
Reflexivities.hs
# LANGUAGE ScopedTypeVariables # {-# LANGUAGE GADTs #-} # LANGUAGE TypeFamilies # module Protop.Core.Reflexivities ( REFL(..) ) where import Data.Proxy (Proxy(..)) import Protop.Core.Morphisms import Protop.Core.Proofs import Protop.Core.Setoids data REFL :: * -> * where REFL :: IsMorphism a =...
null
https://raw.githubusercontent.com/brunjlar/protop/9f520aeb4dd9baf9ebed8751584e33e3a3e23df6/src/Protop/Core/Reflexivities.hs
haskell
# LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # module Protop.Core.Reflexivities ( REFL(..) ) where import Data.Proxy (Proxy(..)) import Protop.Core.Morphisms import Protop.Core.Proofs import Protop.Core.Setoids data REFL :: * -> * where REFL :: IsMorphism a => a -> REFL a instance...
efb8721887d357e7eac0eab619e37b97471ad7d93d7c958d618f61645433c544
patrikja/AFPcourse
Map.hs
---------------------------------------------------------------- : : ( a->a ) - > Array a - > Array a mapArr = mapArrInt mapArrInt : : ( Int - > Int ) - > Array Int - > Array Int mapArrInt f ( ArrInt is ) = ArrInt ( map f is ) = undefined -- mapArrPair mapArrPair : : ( ArrayElem b ) =...
null
https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/L13/src/Array/Map.hs
haskell
-------------------------------------------------------------- mapArrPair mapArrPair
: : ( a->a ) - > Array a - > Array a mapArr = mapArrInt mapArrInt : : ( Int - > Int ) - > Array Int - > Array Int mapArrInt f ( ArrInt is ) = ArrInt ( map f is ) mapArrPair : : ( ArrayElem b ) = > ( b - > b ) - > Array ( b , b ) - > Array ( b , b ) mapArrPair f ( ArrPair ( as , bs ) ) = Arr...
3b24448fdc46b4b55814ae3760671f8850cc254a5f88295578e77d57630d4f97
tfausak/rattletrap
ByteGet.hs
module Rattletrap.ByteGet where import qualified Control.Exception as Exception import qualified Data.Bits as Bits import qualified Data.ByteString as ByteString import qualified Data.ByteString.Lazy as LazyByteString import qualified Data.Functor.Identity as Identity import qualified Data.Int as Int import qualified ...
null
https://raw.githubusercontent.com/tfausak/rattletrap/cc6d6aba923d840f23de7673cab9a043096d3099/src/lib/Rattletrap/ByteGet.hs
haskell
module Rattletrap.ByteGet where import qualified Control.Exception as Exception import qualified Data.Bits as Bits import qualified Data.ByteString as ByteString import qualified Data.ByteString.Lazy as LazyByteString import qualified Data.Functor.Identity as Identity import qualified Data.Int as Int import qualified ...
8bfbbc42d1a722eecc96681e5001e0f5865712111e5c4b6a4db839ebe1272dc7
gregtatcam/imaplet-lwt
lexer.mli
open Core_replace val message : Lexer_state.t -> Lexing.lexbuf -> Grammar.token val content_type : Lexing.lexbuf -> Grammar.token val find_boundary : string -> Lexing.lexbuf -> [ `Open_boundary_first of int | `Open_boundary of (int * int) | `Close_boundary of (int * int) | `Eof ] val is_rfc2045_token ...
null
https://raw.githubusercontent.com/gregtatcam/imaplet-lwt/d7b51253e79cffa97e98ab899ed833cd7cb44bb6/lib/parsemail/lexer.mli
ocaml
open Core_replace val message : Lexer_state.t -> Lexing.lexbuf -> Grammar.token val content_type : Lexing.lexbuf -> Grammar.token val find_boundary : string -> Lexing.lexbuf -> [ `Open_boundary_first of int | `Open_boundary of (int * int) | `Close_boundary of (int * int) | `Eof ] val is_rfc2045_token ...
bca94272116fb9bf8d436e6e8ba68dc298c18b76d3a7010fda04aa97378ddfc4
nyuichi/r7expander
pp.scm
File : " pp.scm " ( c ) 1991 , ; 'generic-write' is a procedure that transforms a Scheme data value (or ; Scheme program expression) into its textual representation. The interface ; to the procedure is sufficiently general to easily implement other useful ; formatting procedures such as pretty printing, output...
null
https://raw.githubusercontent.com/nyuichi/r7expander/6016af336607212563624f6e04ea90d367736bce/extlib/pp.scm
scheme
'generic-write' is a procedure that transforms a Scheme data value (or Scheme program expression) into its textual representation. The interface to the procedure is sufficiently general to easily implement other useful formatting procedures such as pretty printing, output to a string and truncated output. Param...
File : " pp.scm " ( c ) 1991 , OUTPUT Procedure of 1 argument of string type , called repeatedly ( write obj ) = ( generic - write obj # f # f display - string ) (define (generic-write obj display? width output) (define (read-macro? l) (define (length1? l) (and (pair? l) (null? (cdr l))))...
4f7ec80c92aa5d3e7859ad069cdae28afd3805f422a249e436202aaf947ba3ac
SimulaVR/Simula
Imports.hs
module Plugin.Imports ( module B , module D , module G , module P ) where Things I wish were in Prelude import Control.Category as B ((<<<), (>>>)) import Control.Monad as B ((<=<), (>=>)) import Control.Lens as B ((^.), (...
null
https://raw.githubusercontent.com/SimulaVR/Simula/0a6041c73c419a35fc45c028191ac1c32d4c419f/addons/godot-haskell-plugin/src/Plugin/Imports.hs
haskell
Dependencies Godot Hiding things you shouldn't have to bother with import Godot
module Plugin.Imports ( module B , module D , module G , module P ) where Things I wish were in Prelude import Control.Category as B ((<<<), (>>>)) import Control.Monad as B ((<=<), (>=>)) import Control.Lens as B ((^.), (...
b5d8cc6a74d69ee5d7c09eb7e8d3996fa99d71bc2a163e9748139be7513ddf71
clash-lang/clash-protocols
Plugin.hs
| A GHC source plugin providing a DSL for writing Circuit components . Credits to @circuit - notation@ at < -notation > . A GHC source plugin providing a DSL for writing Circuit components. Credits to @circuit-notation@ at <-notation>. -} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE CPP # module Protocols.Plugi...
null
https://raw.githubusercontent.com/clash-lang/clash-protocols/06c581b774712bb7a6a79fb8e745f395b1e3868b/src/Protocols/Plugin.hs
haskell
# LANGUAGE OverloadedStrings # base clash-protocols circuit-notation | Type inference helper used by circuit-notation plugin | 'circuit-notation' plugin repurposed for 'Protocols.protocols'.
| A GHC source plugin providing a DSL for writing Circuit components . Credits to @circuit - notation@ at < -notation > . A GHC source plugin providing a DSL for writing Circuit components. Credits to @circuit-notation@ at <-notation>. -} # LANGUAGE CPP # module Protocols.Plugin where import Prelude ...
af44141e4c811b2fdc97a503fd26baee6aa33a44a8785e4fdf7aced27cbb5856
mogenslund/liq2
markdownfolds_test.clj
(ns liq2.extras.markdownfolds-test (:require [clojure.test :refer :all] [liq2.buffer :as buffer] [liq2.extras.markdownfolds :refer :all])) (deftest get-headline-level-test "" (is (= (get-headline-level (buffer/buffer "# abc") 1) 1)) (is (= (get-headline-level (buffer/buffer "## abc") 1)...
null
https://raw.githubusercontent.com/mogenslund/liq2/66a323a75804154ea51c3ff9d3c23cbd26c9d24d/test/liq2/extras/markdownfolds_test.clj
clojure
(ns liq2.extras.markdownfolds-test (:require [clojure.test :refer :all] [liq2.buffer :as buffer] [liq2.extras.markdownfolds :refer :all])) (deftest get-headline-level-test "" (is (= (get-headline-level (buffer/buffer "# abc") 1) 1)) (is (= (get-headline-level (buffer/buffer "## abc") 1)...
e43195c527e500b3d5f3b5aabedd05d156874ea0d9fcebefb1671440fe9522c0
mjsottile/publicstuff
KDTree.hs
-- -- KDTree code -- -- -- module DLA.KDTree ( KDTreeNode(..), newKDTree, kdtAddPoints, kdtRangeSearch, kdtCollisionDetect, kdtInBounds, dumpKDTree ) where import DLA.Vec3 import Data.Maybe import System.IO data KDTreeNode a = Empty | Node (KDTreeNode a) Vec3 a (KDTreeNode a) | Leaf Vec3 a de...
null
https://raw.githubusercontent.com/mjsottile/publicstuff/46fccc93cc62eb9de46186f53012381750fbb17b/dla3d/optimized-haskell2/DLA/KDTree.hs
haskell
KDTree code
module DLA.KDTree ( KDTreeNode(..), newKDTree, kdtAddPoints, kdtRangeSearch, kdtCollisionDetect, kdtInBounds, dumpKDTree ) where import DLA.Vec3 import Data.Maybe import System.IO data KDTreeNode a = Empty | Node (KDTreeNode a) Vec3 a (KDTreeNode a) | Leaf Vec3 a deriving Show printVec :: Vec...
01d53a9ec3cf839b6c21d603431a92b65868d38b6322c5b07312ffe94bfbdc6b
vikram/lisplibraries
foreign-loader.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: foreign-loader.lisp ;;;; Purpose: Loads foreign libraries Author : Date Started : Feb 2002 ;;;; $ I ...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/uffi-1.5.17/tests/foreign-loader.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 -*- ************************************************************************* FILE IDENTIFICATION Name: foreign-loader.lisp Purpose: Loads foreign libraries ************************************************************************* usage
Author : Date Started : Feb 2002 $ I d : foreign-loader.lisp 11021 2006 - 08 - 14 04:22:28Z kevin $ This file , part of UFFI , is Copyright ( c ) 2002 - 2005 by For CMUCL , it 's necessary to load foreign files separate from their (in-package uffi-tests) #+clisp (uffi:load-foreign-library "...
c7e08ccd3af9fe93aeff3c9dd3f4e0f9211b9619b8604bd753db11e862dc2ff4
herbelin/coq-hh
entries.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/kernel/entries.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * This module defines the entry type...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Univ open Ter...
f3b3cc3a18e8f495acc2bf1b1ab3ccf3e028d156fd473b484243bb675d0d7e62
spaceships/circuit-synthesis
Simple.hs
# LANGUAGE TupleSections # module Examples.Simple where import Circuit import Circuit.Builder import Circuit.Utils import Control.Monad export :: Gate g => [(String, [IO (String, Circuit g)])] export = [ ("simple", [("simple",) <$> return simple]) , ("sub1", [("sub1",) <$> return (subCirc 1...
null
https://raw.githubusercontent.com/spaceships/circuit-synthesis/3fdb67f814acd16e29064138b38c4fedff27b4d5/src/Examples/Simple.hs
haskell
# LANGUAGE TupleSections # module Examples.Simple where import Circuit import Circuit.Builder import Circuit.Utils import Control.Monad export :: Gate g => [(String, [IO (String, Circuit g)])] export = [ ("simple", [("simple",) <$> return simple]) , ("sub1", [("sub1",) <$> return (subCirc 1...
5e3db627186a2405e10a231ecaae5fd5312f8bfc8c5356aa5af65bef9fa99c2a
alexanderkiel/phrase
tach_runner.cljs
(ns phrase.tach-runner (:require [cljs.test :refer-macros [run-tests]] [phrase.alpha-test])) (run-tests 'phrase.alpha-test)
null
https://raw.githubusercontent.com/alexanderkiel/phrase/a941b8ba64623baa5ffeb470b3d3e7c7889babff/test/cljs/phrase/tach_runner.cljs
clojure
(ns phrase.tach-runner (:require [cljs.test :refer-macros [run-tests]] [phrase.alpha-test])) (run-tests 'phrase.alpha-test)
0bf4c655816b8f5543e430966c5b5bf515083d1eb750bb7da71873aec17fd6a1
glutamate/bugpan
LovGreg.hs
# LANGUAGE ViewPatterns , NoMonomorphismRestriction , FlexibleInstances , ForeignFunctionInterface , ScopedTypeVariables # # OPTIONS_GHC -fvia - c -optc - O3 # {- INCLUDE "poisson.h" #-} {- INCLUDE "poisson.c" #-} {- CFILES poisson.c #-} module Main where import HaskSyntaxUntyped import import EvalM --import Numbers...
null
https://raw.githubusercontent.com/glutamate/bugpan/d0983152f5afce306049262cba296df00e52264b/LovGreg.hs
haskell
INCLUDE "poisson.h" # INCLUDE "poisson.c" # CFILES poisson.c # import Numbers [amp, t0, tau1, tau2,amp2 ] likelihood (realToFrac rate) (realToFrac tau) (realToFrac baseline) (realToFrac t0) penalty_tau1 p -- + penalty_pslow p foo = transpose $ map fst sdata foo = transpose $ m...
# LANGUAGE ViewPatterns , NoMonomorphismRestriction , FlexibleInstances , ForeignFunctionInterface , ScopedTypeVariables # # OPTIONS_GHC -fvia - c -optc - O3 # module Main where import HaskSyntaxUntyped import import EvalM import System.Environment import Data . import Data.List import TNUtils import Query import ...
b261ba6f4560e24de3a04eba3306bdeec063ad27e1a950da09ae7eb179d8a465
gedge-platform/gedge-platform
rabbit_mgmt_wm_channels.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 ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_mgmt_wm_channels). -export([init/...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_management/src/rabbit_mgmt_wm_channels.erl
erlang
--------------------------------------------------------------------
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 ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_mgmt_wm_channels). -export([init/2, to_...
2c365678dbbfddd7890af63b48b15bc4d646424283d1e7f9301f474a350cbcd7
fredlund/McErlang
mce_mon_queue.erl
Copyright ( c ) 2009 , %% All rights reserved. %% %% Redistribution and use in source and binary forms, with or without %% modification, are permitted provided that the following conditions are met: %% %% Redistributions of source code must retain the above copyright %% notice, this list of conditions a...
null
https://raw.githubusercontent.com/fredlund/McErlang/25b38a38a729fdb3c3d2afb9be016bbb14237792/monitors/src/mce_mon_queue.erl
erlang
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: %% Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. %% Redi...
Copyright ( c ) 2009 , IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR @author 2006 - 2009 @private -module(mce_mon_queue). -export([init/1,stateChange/3,monitorType/0]). -include("state.hr...
d38235424f005f4cd2c345663ee4b2e49a3ffe38e0c74d0d20676d4cfd99bcbd
amir343/avlang
avl_reference.erl
Copyright ( c ) 2016 - 2017 %% 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...
null
https://raw.githubusercontent.com/amir343/avlang/36b14f476327c38d7fb75a787e1e8fd89f25919e/src/avl_reference.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright ( c ) 2016 - 2017 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(avl_reference). -behaviour(type_interface). -export([ abs_form/0 , lub/0 , name/0 ]). -include("type_macros.h...
bcd0aa4ff4727da59fed3d17ab4c14dd60e812b2b7b22b3e74953a1f34ac728a
soudy/basically
errors.clj
(ns basically.errors) (defn error ([type] (error type nil)) ([type label] (let [message (case type :type-mismatch "?TYPE MISMATCH ERROR" :syntax-error "?SYNTAX ERROR" :undefd-statement "?UNDEF'D STATEMENT ERROR" :next-without-for "?NEXT...
null
https://raw.githubusercontent.com/soudy/basically/739a33f7e97aa3a85080102e8bf160df5d1a98b5/src/basically/errors.clj
clojure
(ns basically.errors) (defn error ([type] (error type nil)) ([type label] (let [message (case type :type-mismatch "?TYPE MISMATCH ERROR" :syntax-error "?SYNTAX ERROR" :undefd-statement "?UNDEF'D STATEMENT ERROR" :next-without-for "?NEXT...
7905cb4a4d1ef9f1bd206ac7bf227c89a505f508995859930b3d285fb1a74d8e
lispbuilder/lispbuilder
package.lisp
;;; -*- lisp -*- (in-package #:cl-user) (defpackage #:lispbuilder-openrm-examples (:use #:cl #:cffi) (:nicknames #:rm-examples) (:documentation "Examples for `lispbuilder-openrm'.") (:export #:jballs #:spotlight #:clrball #:cones #:rm-example-1 #:rm-example-2 #:jballs-sdl #:image))...
null
https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-openrm/examples/package.lisp
lisp
-*- lisp -*-
(in-package #:cl-user) (defpackage #:lispbuilder-openrm-examples (:use #:cl #:cffi) (:nicknames #:rm-examples) (:documentation "Examples for `lispbuilder-openrm'.") (:export #:jballs #:spotlight #:clrball #:cones #:rm-example-1 #:rm-example-2 #:jballs-sdl #:image))
8f8c4029980b5f8511bdab7214c4fc9d344ae668c3f1bc6bf4e1b8f71ac67d40
aatree/aaworker
lpc.cljs
(ns aaworker.lpc (:require [cljs.reader :refer [read-string]])) (def worker-map (atom {})) (defn process-message [file-name event] (let [[fn-key message-type result] (read-string(.-data event))] (cond (= message-type :success) (let [[state error loading counter] (get-in @worker-map [file-name 1 fn...
null
https://raw.githubusercontent.com/aatree/aaworker/d5c1cb1b02b2185ec4034db619dedb4b0005a1ac/src/client/aaworker/lpc.cljs
clojure
(ns aaworker.lpc (:require [cljs.reader :refer [read-string]])) (def worker-map (atom {})) (defn process-message [file-name event] (let [[fn-key message-type result] (read-string(.-data event))] (cond (= message-type :success) (let [[state error loading counter] (get-in @worker-map [file-name 1 fn...
e02860052f6e34ad0f4d473cb3eb35c879284fcc6d3eec926f9bc3002a26ff86
LPCIC/matita
nCicTacReduction.mli
||M|| This file is part of HELM , an Hypertextual , Electronic ||A|| Library of Mathematics , developed at the Computer Science ||T|| Department , University of Bologna , Italy . ||I|| ||T||...
null
https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/ng_tactics/nCicTacReduction.mli
ocaml
||M|| This file is part of HELM , an Hypertextual , Electronic ||A|| Library of Mathematics , developed at the Computer Science ||T|| Department , University of Bologna , Italy . ||I|| ||T||...
12d8b82320e5a13b2b0d65f025f7247debdbdc1cf9e0b10ab5857923d7319256
fractalide/fractalide
radio-box.rkt
#lang racket/base (require fractalide/modules/rkt/rkt-fbp/agent fractalide/modules/rkt/rkt-fbp/agents/gui/helper) (require racket/gui/base racket/match) (require (prefix-in class: racket/class)) (define base-default (hash 'label #f 'choices '() 'selection 0 'style '(verti...
null
https://raw.githubusercontent.com/fractalide/fractalide/9c54ec2615fcc2a1f3363292d4eed2a0fcb9c3a5/modules/rkt/rkt-fbp/agents/gui/radio-box.rkt
racket
in port out port
#lang racket/base (require fractalide/modules/rkt/rkt-fbp/agent fractalide/modules/rkt/rkt-fbp/agents/gui/helper) (require racket/gui/base racket/match) (require (prefix-in class: racket/class)) (define base-default (hash 'label #f 'choices '() 'selection 0 'style '(verti...
42a3563dbdbff62e6749cad66e35f580483fae6bdc047f542e873cd0714d85e7
inhabitedtype/ocaml-aws
registerTargetWithMaintenanceWindow.mli
open Types type input = RegisterTargetWithMaintenanceWindowRequest.t type output = RegisterTargetWithMaintenanceWindowResult.t type error = Errors_internal.t include Aws.Call with type input := input and type output := output and type error := error
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/registerTargetWithMaintenanceWindow.mli
ocaml
open Types type input = RegisterTargetWithMaintenanceWindowRequest.t type output = RegisterTargetWithMaintenanceWindowResult.t type error = Errors_internal.t include Aws.Call with type input := input and type output := output and type error := error
45c1a9f705b676f48800be4b5c6600fc941e011a83ad41a72c6dba801c041f7d
xvw/preface
applicative.mli
(** An [Applicative] is a functor with lifting and sequencing capabilities. [Applicative] is more general (and by extension weaker) than a {!module:Monad}. An [Applicative] is also a {!module:Functor}. *) * { 2 Laws } To have a predictable behaviour , the instance of [ Applicative ] must obey some...
null
https://raw.githubusercontent.com/xvw/preface/51892a7ce2ddfef69de963265da3617968cdb7ad/lib/preface_specs/applicative.mli
ocaml
* An [Applicative] is a functor with lifting and sequencing capabilities. [Applicative] is more general (and by extension weaker) than a {!module:Monad}. An [Applicative] is also a {!module:Functor}. * Minimal interface using [map] and [product]. * The type held by the [Applicative]. * inline * Minimal inte...
* { 2 Laws } To have a predictable behaviour , the instance of [ Applicative ] must obey some laws . + [ apply = lift2 i d ] + [ lift2 f x y = f < $ > x < * > y ] + [ pure i d < * > v = v ] + [ pure ( % ) < * > u < * > v < * > w = u < * > ( v < * > w ) ] + [ pure f < * > pur...
1560fd55bab2330f0c0cfeb919bb2f0cb6eb9a2917cafacb65cb623164bae697
hatemogi/misaeng
계승.clj
(ns 미생.예제.계승 (:use [미생.기본] [미생.검사])) (함수 자연수? [n] (논리곱 (정수? n) (논리합 (양? n) (영? n)))) (함수 계승 "계승(factorial)을 구한다. 단순한 재귀호출 버전." [n] (만약 (<= n 1) 1 (*' n (계승 (감소 n))))) (함수 계승' "계승(factorial) 구하기. 적용 함수 이용 버전." [n] (적용 *' (범위 2 (증가 n)))) (검사정의 계승검사 (검사 "계승(factoria...
null
https://raw.githubusercontent.com/hatemogi/misaeng/7b097d9d9ae497606cf54be586fe7a0f50bb7ffc/src/%EB%AF%B8%EC%83%9D/%EC%98%88%EC%A0%9C/%EA%B3%84%EC%8A%B9.clj
clojure
(ns 미생.예제.계승 (:use [미생.기본] [미생.검사])) (함수 자연수? [n] (논리곱 (정수? n) (논리합 (양? n) (영? n)))) (함수 계승 "계승(factorial)을 구한다. 단순한 재귀호출 버전." [n] (만약 (<= n 1) 1 (*' n (계승 (감소 n))))) (함수 계승' "계승(factorial) 구하기. 적용 함수 이용 버전." [n] (적용 *' (범위 2 (증가 n)))) (검사정의 계승검사 (검사 "계승(factoria...
35991c638c17f2ac78fedc191a95d19ae0df12f72561d46f1ae03085286f12d8
dhammikamare/Learn-OCaml
lab08_max_tuple.ml
Task : The function max_tuple that takes a list of tuples of the form ( key , value ) as input . * It should return the tuple with the maximum value in the list . * For example * let l = [ ( " Kandy",10 ) ; ( " Colombo",15 ) ; ( " Galle",8 ) ] * max_tuple l * should be equal to ( " Colombo",15 ) *...
null
https://raw.githubusercontent.com/dhammikamare/Learn-OCaml/2d4e3da38ee86cd7477964ffb8756a8483260322/quizzes/CO225%20(2014%20fall)/lab08_max_tuple.ml
ocaml
test
Task : The function max_tuple that takes a list of tuples of the form ( key , value ) as input . * It should return the tuple with the maximum value in the list . * For example * let l = [ ( " Kandy",10 ) ; ( " Colombo",15 ) ; ( " Galle",8 ) ] * max_tuple l * should be equal to ( " Colombo",15 ) *...
026381055a88a8d68ab851a27fc4405e3f0d1731a83c58e148a59ac0c4a22e8a
haskell-repa/repa
SVG.hs
module SVG where -- Making a SVG diagram of the points and hull makeSVG :: [(Int, Int)] -> [(Int, Int)] -> String makeSVG points hull = unlines $ [ "<svg width=\"100%\" height=\"100%\" version=\"1.1\" xmlns=\"\">" ] ++ [svgPolygon hull] ++ map svgPoint points ++ map svgPointH...
null
https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-examples/examples/QuickHull/SVG.hs
haskell
Making a SVG diagram of the points and hull
module SVG where makeSVG :: [(Int, Int)] -> [(Int, Int)] -> String makeSVG points hull = unlines $ [ "<svg width=\"100%\" height=\"100%\" version=\"1.1\" xmlns=\"\">" ] ++ [svgPolygon hull] ++ map svgPoint points ++ map svgPointHull hull ++ ["</svg>"] svgPolygon :: ...
7812798cf5cab51d6b5e3d525de378a1aebe543d8b962bbbeb6740ee8e99403a
ocharles/blog
2013-12-06-persistent.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # import Control.Monad.IO.Class (liftIO) import Control.Monad.Logger import Data.Text import Data.Time import Database.Esqueleto import Database.Persist h...
null
https://raw.githubusercontent.com/ocharles/blog/fa8e911d3c03b134eee891d187a1bb574f23a530/code/2013-12-06-persistent.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings #
# LANGUAGE FlexibleContexts # # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # import Control.Monad.IO.Class (liftIO) import Control.Monad.Logger import Data.Text import Data.Time import Database.Esqueleto import Database.Persist hiding ((==.)) import Database.Persist.Sqlite (runSqlite) i...
7f079cb57492391d5f2823cd7300bf9a1cf4c853f075358bc5f797b028cd9d0c
janestreet/bonsai
bonsai_form_experimental.ml
module Combine = Combine module Product = Product module Validated = Validated open! Core open! Import type ('input, 'result, 'parsed) t = default:'parsed -> ( 'input , ('result Or_error.t Product.With_view.t, 'parsed) Product.t ) Bonsai.Arrow_deprecated.t let form_element (type t) (module M : Bonsai....
null
https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/experimental/form/src/bonsai_form_experimental.ml
ocaml
module Combine = Combine module Product = Product module Validated = Validated open! Core open! Import type ('input, 'result, 'parsed) t = default:'parsed -> ( 'input , ('result Or_error.t Product.With_view.t, 'parsed) Product.t ) Bonsai.Arrow_deprecated.t let form_element (type t) (module M : Bonsai....
c5e3059b9bcdcbc4a30a16d277a79dacfc333da6212fc8b1c098da264e6d9fcb
roman/Haskell-Reactive-Extensions
Subject.hs
module Rx.Subject ( Subject , newPublishSubject , newSyncPublishSubject , Single.newSingleSubject , Single.newSingleSubjectWithQueue , IObserver(..) , ToAsyncObservable(..) , subscribe ) where import Rx.Observable.Types import qualified Rx.Subject.PublishS...
null
https://raw.githubusercontent.com/roman/Haskell-Reactive-Extensions/0faddbb671be7f169eeadbe6163e8d0b2be229fb/rx-core/src/Rx/Subject.hs
haskell
module Rx.Subject ( Subject , newPublishSubject , newSyncPublishSubject , Single.newSingleSubject , Single.newSingleSubjectWithQueue , IObserver(..) , ToAsyncObservable(..) , subscribe ) where import Rx.Observable.Types import qualified Rx.Subject.PublishS...
e80686c031241ad94c163de6d96f35a447bfc4ca1d12d3f9e44e5cf6793e411e
lokedhs/maxima-client
reflect.lisp
(in-package :maxima-client) (defun retrieve-arglist-from-function (name) (let ((arglist (get name 'maxima::arg-list))) (when arglist (return-from retrieve-arglist-from-function arglist))) (let ((arg-list (trivial-arguments:arglist name))) In some cases , TRIVIAL - ARGUMENTS : ARGLIST returns an imprope...
null
https://raw.githubusercontent.com/lokedhs/maxima-client/163421fcd1d01b5dee88fd68d1d8613b501f8278/src/reflect.lisp
lisp
list. I suspect this is a problem with trivial-arguments. Until it has been investigated, we'll just skip that case. I'm not entirely certain about how the content of the function definition can vary, so let's add some assertions that encodes the current understanding of the situation.
(in-package :maxima-client) (defun retrieve-arglist-from-function (name) (let ((arglist (get name 'maxima::arg-list))) (when arglist (return-from retrieve-arglist-from-function arglist))) (let ((arg-list (trivial-arguments:arglist name))) In some cases , TRIVIAL - ARGUMENTS : ARGLIST returns an imprope...
b9958fdf09e5b0bc03265ae6f327edcc060040f11fa31585577674d5c65e69ec
vehicle-lang/vehicle
Substitution.hs
module Vehicle.Compile.Type.Meta.Substitution ( MetaSubstitutable, substMetas, ) where import Data.List.NonEmpty (NonEmpty) import Vehicle.Compile.Error import Vehicle.Compile.Normalise.NBE import Vehicle.Compile.Prelude import Vehicle.Compile.Type.Core import Vehicle.Compile.Type.Meta.Map (MetaMap (..)) impor...
null
https://raw.githubusercontent.com/vehicle-lang/vehicle/3a3548f9b48c3969212ccb51e954d4d4556ea815/vehicle/src/Vehicle/Compile/Type/Meta/Substitution.hs
haskell
| Substitutes meta-variables through the provided object, returning the updated object and the set of meta-variables within the object for which no subsitution was provided. ------------------------------------------------------------------------------ Substitution operation NOTE: no need to lift the substitutions...
module Vehicle.Compile.Type.Meta.Substitution ( MetaSubstitutable, substMetas, ) where import Data.List.NonEmpty (NonEmpty) import Vehicle.Compile.Error import Vehicle.Compile.Normalise.NBE import Vehicle.Compile.Prelude import Vehicle.Compile.Type.Core import Vehicle.Compile.Type.Meta.Map (MetaMap (..)) impor...
be02c1eb1879a6b5e3fb2740b87044a21defe4b5b9453354fa95c03ae01f97e4
mlang/chessIO
Hash.hs
# LANGUAGE PatternSynonyms # module Game.Chess.Polyglot.Hash (hashPosition) where import Data.Bits (Bits (xor)) import Data.Coerce (coerce) import Data.Ix (Ix (index)) import Data.Maybe (mapMaybe) import ...
null
https://raw.githubusercontent.com/mlang/chessIO/ee7d4956d2e21f4231ce4549cebf1b437956a4d6/src/Game/Chess/Polyglot/Hash.hs
haskell
# LANGUAGE PatternSynonyms # module Game.Chess.Polyglot.Hash (hashPosition) where import Data.Bits (Bits (xor)) import Data.Coerce (coerce) import Data.Ix (Ix (index)) import Data.Maybe (mapMaybe) import ...
361ffecdf4ddeaaae009ae358cb349902b096fbe1a8644c10e771800d30dd8f4
racket/typed-racket
scribble-example.rkt
#lang racket/base ;; test evaluators, as used in Scribble docs (require scribble/example) (for ((the-eval (in-list (list (make-base-eval #:lang 'typed/racket) (make-base-eval '(require typed/racket)))))) ;; define-predicate : non-function polymorphic type ;; ...
null
https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/shallow/scribble-example.rkt
racket
test evaluators, as used in Scribble docs define-predicate : non-function polymorphic type cast : bad list object-name returns #f (shape-check error)
#lang racket/base (require scribble/example) (for ((the-eval (in-list (list (make-base-eval #:lang 'typed/racket) (make-base-eval '(require typed/racket)))))) (examples #:label #f #:eval the-eval (eval:error (define-predicate p? (All (A) (Listof A)))) ...
6b80f2a2da7548ab4ed57de1fc707383b36c76add260a2807b6ea2018c6bf0d2
tweag/lagoon
Schema.hs
Copyright 2020 Pfizer Inc. 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 under th...
null
https://raw.githubusercontent.com/tweag/lagoon/2ef0440db810f4f45dbed160b369daf41d92bfa4/src/backend/src/Lagoon/Util/PostgreSQL/Schema.hs
haskell
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 permiss...
Copyright 2020 Pfizer Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , module Lagoon.Util.PostgreSQL.Schema ( module Lagoon.Util.PostgreSQL.Schema.SqlEntity , module Lagoon.Util.PostgreSQL.Schema.SqlFun , mod...
a160c6b8ab30b05565838282b49028b301fd971d96ffc530bc59358eca9b054e
ChrisPenner/proton
Orphans.hs
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE InstanceSigs # # LANGUAGE TupleSections # module Proton.Internal.Orphans where import Data.Profunctor import Control.Comonad import Proton . Types import Proton . Setter import Proton . Getter -- Steal this from Cokleisli at some point instance > Choice ( Co...
null
https://raw.githubusercontent.com/ChrisPenner/proton/4ce22d473ce5bece8322c841bd2cf7f18673d57d/src/Proton/Internal/Orphans.hs
haskell
Steal this from Cokleisli at some point Not quite right instance Strong (Costar ((,) e)) where starFlip :: Costar ((,) e) a b -> Star ((->) e) a b starFlip (Costar f) = Star (\e a -> f (a, e)) costarFlip :: Star ((->) e) a b -> Costar ((,) e) a b
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE InstanceSigs # # LANGUAGE TupleSections # module Proton.Internal.Orphans where import Data.Profunctor import Control.Comonad import Proton . Types import Proton . Setter import Proton . Getter instance > Choice ( Costar w ) where instance Comonad f => Stron...
856f7981b136ad535856911c546d844c8178522b13e2ebcb1e3fd87aa6e3d91b
sibylfs/sibylfs_src
diff.mli
(****************************************************************************) Copyright ( c ) 2013 , 2014 , 2015 , , , , ( as part of the SibylFS project ) (* *) (* Permission to use, copy, modify, and/or d...
null
https://raw.githubusercontent.com/sibylfs/sibylfs_src/30675bc3b91e73f7133d0c30f18857bb1f4df8fa/fs_test/lib/diff.mli
ocaml
************************************************************************** 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 no...
Copyright ( c ) 2013 , 2014 , 2015 , , , , ( as part of the SibylFS project ) THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL PROFITS , WHETHER IN AN ACTION OF CONTRACT , NEGLIGENCE OR OTHER TORTIOUS ACTION , ARISING OUT OF OR IN CONNE...
e70bc1059a2140a9f87b47fc7987211a10bd608df71ab642ff2de7da6952cd9a
matterhorn-chat/matterhorn
InputPreview.hs
{-# LANGUAGE RankNTypes #-} module Matterhorn.Draw.InputPreview ( inputPreview ) where import Prelude () import Matterhorn.Prelude import Brick import Brick.Widgets.Border import Brick.Widgets.Edit import Control.Arrow ( (>>>) ) import qualified Data.Tex...
null
https://raw.githubusercontent.com/matterhorn-chat/matterhorn/19a73ce833a8a8de3616cf884c03e9f08a4db0a7/src/Matterhorn/Draw/InputPreview.hs
haskell
# LANGUAGE RankNTypes # Insert a cursor sentinel into the input text just before rendering the preview. We use the inserted sentinel (which is not rendered) to get brick to ensure that the line the cursor is on is visible in the preview viewport. We put the sentinel at the *end* of the line because it will still i...
module Matterhorn.Draw.InputPreview ( inputPreview ) where import Prelude () import Matterhorn.Prelude import Brick import Brick.Widgets.Border import Brick.Widgets.Edit import Control.Arrow ( (>>>) ) import qualified Data.Text as T import Data...
610b7a6e64780836810bbbcdb0a8237ab9b28dd871a4d2ace2c6d44e4694c457
ml-in-barcelona/server-reason-react
belt_MutableSetInt.ml
[@@@ocaml.text " This module is {!Belt.MutableSet} specialized with key type to be a \ primitive type.\n\ \ It is more efficient in general, the API is the same with \ {!Belt_MutableSet} except its key type is fixed,\n\ \ and identity is not needed(using the built-in one) \n"] module I = Belt_internalSetInt m...
null
https://raw.githubusercontent.com/ml-in-barcelona/server-reason-react/a5d22907eb2633bcb8e77808f6c677802062953a/lib/belt/belt_MutableSetInt.ml
ocaml
[@@@ocaml.text " This module is {!Belt.MutableSet} specialized with key type to be a \ primitive type.\n\ \ It is more efficient in general, the API is the same with \ {!Belt_MutableSet} except its key type is fixed,\n\ \ and identity is not needed(using the built-in one) \n"] module I = Belt_internalSetInt m...
1accb0ca9162cbe2034097a948ad13df1b8df32e30b453c2f2731e9611511d66
abakst/Brisk
Simple03.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE ScopedTypeVariables # {-# OPTIONS_GHC -fplugin Brisk.Plugin #-} # OPTIONS_GHC -fplugin - opt Brisk . Plugin : main # module Simple03 where import Control.Distributed.Process import Data.Binary import Data.Typeable ...
null
https://raw.githubusercontent.com/abakst/Brisk/3e4ce790a742d3e3b786dba45d36f715ea0e61ef/examples/Simple03.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE DeriveDataTypeable # # OPTIONS_GHC -fplugin Brisk.Plugin #
# LANGUAGE DeriveGeneric # # LANGUAGE ScopedTypeVariables # # OPTIONS_GHC -fplugin - opt Brisk . Plugin : main # module Simple03 where import Control.Distributed.Process import Data.Binary import Data.Typeable import GHC.Generics (Generic) data PingMsg = Ping ProcessId | Pong ProcessId deriving (...
7a7bf607c8c3d620577d432d60ef233ed2a8fddaedbec461d4c7bfe721a2b7d5
McMasterU/HashedExpression
Embed.hs
module HashedExpression.Embed where import Data.FileEmbed import Data.List (foldl') import qualified Data.Text as T | Utilities for computing FFT fftUtils :: String fftUtils = $(embedStringFile "embed/fftw.c") -- | Version of HashedExpression version :: String version = $(embedStringFile "VERSION") -- | CSimple t...
null
https://raw.githubusercontent.com/McMasterU/HashedExpression/83d25821cc89ee0bd82fcb79f3c0ae4e6ca5d58f/src/HashedExpression/Embed.hs
haskell
| Version of HashedExpression | CSimple template
module HashedExpression.Embed where import Data.FileEmbed import Data.List (foldl') import qualified Data.Text as T | Utilities for computing FFT fftUtils :: String fftUtils = $(embedStringFile "embed/fftw.c") version :: String version = $(embedStringFile "VERSION") cSimpleTemplate :: T.Text cSimpleTemplate = $(e...
2a762e5d04cc231a644248330f6302d474802814a24f55faf6176c0b391ddecf
samrushing/irken-compiler
t_multiple.scm
;; -*- Mode: Irken -*- (include "lib/basis.scm") (include "lib/map.scm") (let (((q r) (divmod 1000 3))) (printf "q= " (int q) " r= " (int r) "\n") )
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_multiple.scm
scheme
-*- Mode: Irken -*-
(include "lib/basis.scm") (include "lib/map.scm") (let (((q r) (divmod 1000 3))) (printf "q= " (int q) " r= " (int r) "\n") )
927bb44cb09059f9048dfb026787e571e7a18dfc5252ebdd0f6beee778ac2985
penpot/penpot
component.cljc
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.common.types.component) (defn instance-root? [shape] (some? (:component-id shape))) (defn instan...
null
https://raw.githubusercontent.com/penpot/penpot/84dcd8f89cd056eb705a7571f875f49949996727/common/src/app/common/types/component.cljc
clojure
Copyright (c) KALEIDOS INC
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.common.types.component) (defn instance-root? [shape] (some? (:component-id shape))) (defn instance-of? [shape file-id component...
11d97459661e52252a5fa5da0cc32f2b833ea5d377d75a93da24e7f3f20e2851
onedata/op-worker
time_test_utils.erl
%%%------------------------------------------------------------------- @author ( C ) 2020 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc %%% Utility functions manipulating tim...
null
https://raw.githubusercontent.com/onedata/op-worker/c551a834f5a6ccb07ce32e60289ad01c1265ffe1/test_distributed/utils/time_test_utils.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc Utility functions manipulating time used in ct tests. @end ------------------------------------------------------------------- ===========================================...
@author ( C ) 2020 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . -module(time_test_utils). -author("Bartosz Walkowicz"). -include_lib("ctool/include/test/test_utils.hrl"). -export([ freeze_time/1, unfreeze_time/1, get_frozen_time_millis/0, get_frozen_t...
58ef8f091ed03a230b46c34ea2fe6afeeb80866bc166f51f635da47f9caa2058
tomjkidd/web-whiteboard
websocket.cljs
(ns web-whiteboard.client.handlers.websocket (:require-macros [cljs.core.async.macros :refer [go]]) (:require [carafe.websockets :as ws] [cognitect.transit :as transit] [cljs.core.async :as async :refer [>! <! put! chan alts!]])) (declare open-handler) (declare close-handler) (...
null
https://raw.githubusercontent.com/tomjkidd/web-whiteboard/6bc508703b14c136be0def8bb6839f2784a3ae9b/src/web_whiteboard/client/handlers/websocket.cljs
clojure
TODO: Queue events on error so that they can be made available once reconnected...
(ns web-whiteboard.client.handlers.websocket (:require-macros [cljs.core.async.macros :refer [go]]) (:require [carafe.websockets :as ws] [cognitect.transit :as transit] [cljs.core.async :as async :refer [>! <! put! chan alts!]])) (declare open-handler) (declare close-handler) (...
df450e952d034113f5213233d7321e2d9c3b76cca67750718ab44efdddb441f9
b0-system/brzo
brzo_b0_doxygen.ml
--------------------------------------------------------------------------- Copyright ( c ) 2019 The programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 2019...
null
https://raw.githubusercontent.com/b0-system/brzo/e481a39d7881d7aaf800cf3c7a9b6cd836867a90/src-c/brzo_b0_doxygen.ml
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2019 The programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 2019...
5737028d3870d31013090dc8e92859f95690a16bba7a51cc7f0e7fca269abada
okeuday/erlbench
jsx_encoder.erl
%% The MIT License Copyright ( c ) 2010 - 2013 < > %% Permission is hereby granted, free of charge, to any person obtaining a copy %% of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the rights %% to use, copy, modi...
null
https://raw.githubusercontent.com/okeuday/erlbench/9fc02a2e748b287b85f6e9641db6b2ca68791fa4/src/jsx_encoder.erl
erlang
The MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished to do so, subject to the following conditions: The above co...
Copyright ( c ) 2010 - 2013 < > in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , E...
213c8d0f1d87cf70d9a1130850ce5064799a922bd9c2bd8e55fd7bb288362202
lsrcz/grisette
SymBiMap.hs
# LANGUAGE ScopedTypeVariables # -- | Module : . Backend . SBV.Data . SMT.SymBiMap Copyright : ( c ) 2021 - 2023 -- License : BSD-3-Clause (see the LICENSE file) -- -- Maintainer : -- Stability : Experimental Portability : GHC only module Grisette.Backend.SBV.Data.SMT.SymBiMap ...
null
https://raw.githubusercontent.com/lsrcz/grisette/51d492f60fb37b74a626b591ec4c7ed128fa6217/src/Grisette/Backend/SBV/Data/SMT/SymBiMap.hs
haskell
| License : BSD-3-Clause (see the LICENSE file) Maintainer : Stability : Experimental
# LANGUAGE ScopedTypeVariables # Module : . Backend . SBV.Data . SMT.SymBiMap Copyright : ( c ) 2021 - 2023 Portability : GHC only module Grisette.Backend.SBV.Data.SMT.SymBiMap ( SymBiMap (..), emptySymBiMap, sizeBiMap, addBiMap, addBiMapIntermediate, findStringToSymbol...
04f3d62d94e0b56dc56a74c45e9d9e3ba5f9e5062b59d7a35b63969b12639d4b
city41/mario-review
daisy_atom.cljs
(ns daisy.atom (:require [daisy.atom.menus :as menus] [daisy.atom.file-loader :as file-loader] [daisy.atom.frame-writer :as frame-writer] [cljs.nodejs :as node])) (enable-console-print!) (def app (node/require "app")) (def BrowserWindow (node/require "browser-window")) (def main...
null
https://raw.githubusercontent.com/city41/mario-review/1b6ebfff88ad778a52865a062204cabb8deed0f9/cropping-app/src/atom/daisy_atom.cljs
clojure
(ns daisy.atom (:require [daisy.atom.menus :as menus] [daisy.atom.file-loader :as file-loader] [daisy.atom.frame-writer :as frame-writer] [cljs.nodejs :as node])) (enable-console-print!) (def app (node/require "app")) (def BrowserWindow (node/require "browser-window")) (def main...
dfbc69e9d67ad5a5e786161aa07feb62710c1d3f3717e6e1e42a3f680364b7fb
input-output-hk/cardano-ledger
Common.hs
module Test.Cardano.Ledger.Common ( module X, ledgerTestMain, ledgerTestMainWith, ledgerHspecConfig, ) where import Control.Monad as X (forM_, unless, when) import System.IO ( BufferMode (LineBuffering), hSetBuffering, hSetEncoding, stdout, utf8, ) import Test.Hspec as X import Test.Hspec.QuickCheck...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/libs/cardano-ledger-core/testlib/Test/Cardano/Ledger/Common.hs
haskell
module Test.Cardano.Ledger.Common ( module X, ledgerTestMain, ledgerTestMainWith, ledgerHspecConfig, ) where import Control.Monad as X (forM_, unless, when) import System.IO ( BufferMode (LineBuffering), hSetBuffering, hSetEncoding, stdout, utf8, ) import Test.Hspec as X import Test.Hspec.QuickCheck...
615611b63b09c3d1d64653a84aea0c1a5be53789aff61ab4a6ed8dc4ad7316ea
ragkousism/Guix-on-Hurd
mail.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 , 2014 , 2015 , 2016 < > Copyright © 2014 , 2015 , 2017 < > Copyright © 2014 < > Copyright © 2014 < > Copyright © 2014 < > Copyright © 2015 < > Copyright © 2015 < > Copyright © 2015 , 2016 < > Copyrig...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/mail.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2013 , 2014 , 2015 , 2016 < > Copyright © 2014 , 2015 , 2017 < > Copyright © 2014 < > Copyright © 2014 < > Copyright © 2014 < > Copyright © 2015 < > Copyright © 2015 < > Copyright © 2015 , 2016 < > Copyright © 2015 < > Copyright © 2015 , 2016 < > Cop...
f16310d68f42fb1f072f0f1ca0d1589e2b735c704b5b38b31488f5b958957695
hammerlab/prohlatype
mas_align.ml
Test that the alignment parsing and then applying gives the same sequences as the fasta 's There are known ( 2016 - 11 - 18 ) differences : B_nuc : B*44:02:01:02S C_nuc : C*04:09N DRB_nuc : DRB4 * 01:03:01:02N as the fasta's There are known (2016-11-18) differences: ...
null
https://raw.githubusercontent.com/hammerlab/prohlatype/3acaf7154f93675fc729971d4c76c2b133e90ce6/src/tests/mas_align.ml
ocaml
Test that the alignment parsing and then applying gives the same sequences as the fasta 's There are known ( 2016 - 11 - 18 ) differences : B_nuc : B*44:02:01:02S C_nuc : C*04:09N DRB_nuc : DRB4 * 01:03:01:02N as the fasta's There are known (2016-11-18) differences: ...
d54c3c7563a549aba45181ffa8ba8614de135c7dee48624ca34f83550a2823cb
mpardalos/Kima
XmlFormatter.hs
module Kima.Test.XmlFormatter where import Test.Hspec.Formatters withTestCase :: String -> FormatM () -> FormatM () withTestCase name content = do writeLine ("<testcase name=\"" <> name <> "\">") content writeLine "</testcase>" xmlFormatter :: Formatter xmlFormatter = Formatter { headerForm...
null
https://raw.githubusercontent.com/mpardalos/Kima/2d9bfb44d873795108789910c4b374059786c0e4/test/Kima/Test/XmlFormatter.hs
haskell
module Kima.Test.XmlFormatter where import Test.Hspec.Formatters withTestCase :: String -> FormatM () -> FormatM () withTestCase name content = do writeLine ("<testcase name=\"" <> name <> "\">") content writeLine "</testcase>" xmlFormatter :: Formatter xmlFormatter = Formatter { headerForm...
baf5d9716c5438e9627f4cc59632a08ebdb77adddefe88acc1a3e9e0722b73fa
EFanZh/EOPL-Exercises
exercise-3.17-test.rkt
#lang racket/base (require rackunit) (require "../solutions/exercise-3.x-let-lang.rkt") (check-equal? (run "let x = 30 in let* x = -(x, 1) y = -(x, 2) in -(x, y)") (num-val 2))
null
https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-3.17-test.rkt
racket
#lang racket/base (require rackunit) (require "../solutions/exercise-3.x-let-lang.rkt") (check-equal? (run "let x = 30 in let* x = -(x, 1) y = -(x, 2) in -(x, y)") (num-val 2))
c2003bf134dfe621264f22c210c7636cc0ae29fa6ada2a0513a72e4095cf4360
singleheart/programming-in-haskell
ex8.hs
-- from ch7/ex7.hs type Bit = Int int2bin :: Int -> [Bit] int2bin 0 = [] int2bin n = n `mod` 2 : int2bin (n `div` 2) from ch7 / voting.hs rmdups :: Eq a => [a] -> [a] rmdups [] = [] rmdups (x:xs) = x : rmdups (filter (/= x) xs) -- from book data Prop = Const Bool | Var Char | Not Prop | And Prop Prop | O...
null
https://raw.githubusercontent.com/singleheart/programming-in-haskell/80c7efc0425babea3cd982e47e121f19bec0aba9/ch08/ex8.hs
haskell
from ch7/ex7.hs from book bools - an alternative implementation bools - simpler implementation predefined propositions
type Bit = Int int2bin :: Int -> [Bit] int2bin 0 = [] int2bin n = n `mod` 2 : int2bin (n `div` 2) from ch7 / voting.hs rmdups :: Eq a => [a] -> [a] rmdups [] = [] rmdups (x:xs) = x : rmdups (filter (/= x) xs) data Prop = Const Bool | Var Char | Not Prop | And Prop Prop | Or Prop Prop | Imply Prop Prop ...
3ffad675129a87240346739a22b69105f1c94b997271f398757c56419ee54985
dharrigan/startrek
impl.clj
(ns startrek.core.session.impl {:author "David Harrigan"} (:require [startrek.core.session.repository :as repository])) (set! *warn-on-reflection* true) (defn delete-session [opts app-config] (repository/delete-session opts app-config)) (defn get-session [opts app-config] (repository/get-session opts ...
null
https://raw.githubusercontent.com/dharrigan/startrek/a91caa3f504ffea502b79cfd29d0499574aaced6/src/startrek/core/session/impl.clj
clojure
(ns startrek.core.session.impl {:author "David Harrigan"} (:require [startrek.core.session.repository :as repository])) (set! *warn-on-reflection* true) (defn delete-session [opts app-config] (repository/delete-session opts app-config)) (defn get-session [opts app-config] (repository/get-session opts ...
b36eff8def1cf6e2c217f08c33d803a1258daae64bcd7207e563ec9ce6f277ae
psholtz/MIT-SICP
exercise1-28b.scm
;; ;; Statistics ;; ;; Collect some performance statistics, to see how this procedure compares with the other prime ;; testing procedures we developed in this section. ;; ;; ;; Define the prime-testing procedure ;; (define (expmod base exp m) (cond ((= exp 0) 1) ((even? exp) (remainder (square (expmod base (/ ex...
null
https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-1.2/mit-scheme/exercise1-28b.scm
scheme
Statistics Collect some performance statistics, to see how this procedure compares with the other prime testing procedures we developed in this section. Define the prime-testing procedure avg : list -> float average value for a list of numbers std : list -> float standard deviation for a list of numbers ...
(define (expmod base exp m) (cond ((= exp 0) 1) ((even? exp) (remainder (square (expmod base (/ exp 2) m)) m)) (else (remainder (* base (expmod base (- exp 1) m)) m)))) (define (prime? n) (define (get-random-a) (+ 2 (random (- n 4)))) (define (test a) (= (expmod a (- n 1) n) 1)) (con...
15792d7d5d068e73eef508c18720b3badcac6b1cfbffd580de6217e00ffc985a
juxt/bolt
dev.clj
Copyright © 2015 , JUXT LTD . (ns dev (:require [clojure.pprint :refer (pprint)] [clojure.reflect :refer (reflect)] [clojure.repl :refer (apropos dir doc find-doc pst source)] [clojure.tools.namespace.repl :refer (refresh refresh-all)] [clojure.java.io :as io] [com.stuartsierra.component :as comp...
null
https://raw.githubusercontent.com/juxt/bolt/f77be416f82c1ca19d5dc20a15942375edc9b740/dev/src/dev.clj
clojure
Copyright © 2015 , JUXT LTD . (ns dev (:require [clojure.pprint :refer (pprint)] [clojure.reflect :refer (reflect)] [clojure.repl :refer (apropos dir doc find-doc pst source)] [clojure.tools.namespace.repl :refer (refresh refresh-all)] [clojure.java.io :as io] [com.stuartsierra.component :as comp...
e9005268958730575a0b9150d049786b4ce27eda6b207d75ca8e8eccb8be92e8
namin/biohacker
use.lisp
(use-package :cl-smt-lib/cl-smt-lib) (named-readtables:in-readtable :cl-smt-lib) (defparameter smt (make-smt "z3" "-in" "-smt2")) (write-to-smt smt (let ((range 8)) #!`((set-option :produce-models true) (set-logic QF_BV) (define-fun hamming-weight ...
null
https://raw.githubusercontent.com/namin/biohacker/bc2f790538b2823845b54ead694047ddf78bb5fa/BPS/smt/use.lisp
lisp
(use-package :cl-smt-lib/cl-smt-lib) (named-readtables:in-readtable :cl-smt-lib) (defparameter smt (make-smt "z3" "-in" "-smt2")) (write-to-smt smt (let ((range 8)) #!`((set-option :produce-models true) (set-logic QF_BV) (define-fun hamming-weight ...
2b173865060c916ab06e385e249786a2a89a44ef5cc4b00759ff7b0d133f046d
oakes/full-stack-boot-example
util.cljc
(ns full-stack-boot-example.util)
null
https://raw.githubusercontent.com/oakes/full-stack-boot-example/da895e60e02b9866259e8d34f334ae30e1ed3220/src/cljc/full_stack_boot_example/util.cljc
clojure
(ns full-stack-boot-example.util)
efd627847c7f5f242aea0598012af13deac1366bd97a13fbcf197f9e5c1e6160
shop-planner/shop3
stdepots.lisp
(in-package :shop-user) (defdomain depot ((:operator (!drive ?x ?y ?z ?start ?time) ((time ?x ?time1) (track ?x ?time2) (assign ?start (eval (max ?time1 ?time2))) (assign ?time 10) (assign ?change (eval (+ ?start ?time 0.01)))) ((at ?x ?y) (time ?x ?time1) (tr...
null
https://raw.githubusercontent.com/shop-planner/shop3/ba429cf91a575e88f28b7f0e89065de7b4d666a6/shop3/examples/IPC-2002/Depots/SimpleTime/stdepots.lisp
lisp
Find those surfaces which do not have any goal associated with them. Find those surfaces which are in their final position and therefore don't need to be moved. Find the place each crate not in its final position is supposed to end up Decomposition Decomposition Check if ?x can be moved to its final position on ?...
(in-package :shop-user) (defdomain depot ((:operator (!drive ?x ?y ?z ?start ?time) ((time ?x ?time1) (track ?x ?time2) (assign ?start (eval (max ?time1 ?time2))) (assign ?time 10) (assign ?change (eval (+ ?start ?time 0.01)))) ((at ?x ?y) (time ?x ?time1) (tr...
f36e92aaaefe8640f93e876092fd74a3b249f42488cce72ee31f3a08faf9f838
theodormoroianu/SecondYearCourses
mWriter.hs
--- Monada Writer newtype WriterS a = Writer { runWriter :: (a, String) } instance Monad WriterS where return va = Writer (va, "") ma >>= k = let (va, log1) = runWriter ma (vb, log2) = runWriter (k va) in Writer (vb, log1 ++ log2) instance Applicative WriterS where pure = r...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%203/mWriter.hs
haskell
- Monada Writer
newtype WriterS a = Writer { runWriter :: (a, String) } instance Monad WriterS where return va = Writer (va, "") ma >>= k = let (va, log1) = runWriter ma (vb, log2) = runWriter (k va) in Writer (vb, log1 ++ log2) instance Applicative WriterS where pure = return mf <*> ma ...
06454ef81d25954513192d0dcda6bddf1685d9bd68f449b09d6dff4e00502c66
pokepay/aws-sdk-lisp
api.lisp
;; DO NOT EDIT: File is generated by AWS-SDK/GENERATOR. (common-lisp:defpackage #:aws-sdk/services/entitlement.marketplace/api (:use) (:nicknames #:aws/entitlement.marketplace) (:import-from #:aws-sdk/generator/shape) (:import-from #:aws-sdk/generator/operation) (:import-from #:aws-sdk/api) (:import-from #...
null
https://raw.githubusercontent.com/pokepay/aws-sdk-lisp/ad9a8f9294a9799cef5f4d85e0cd34eca418be24/services/entitlement.marketplace/api.lisp
lisp
DO NOT EDIT: File is generated by AWS-SDK/GENERATOR.
(common-lisp:defpackage #:aws-sdk/services/entitlement.marketplace/api (:use) (:nicknames #:aws/entitlement.marketplace) (:import-from #:aws-sdk/generator/shape) (:import-from #:aws-sdk/generator/operation) (:import-from #:aws-sdk/api) (:import-from #:aws-sdk/request) (:import-from #:aws-sdk/error)) (com...
a06a8e3162296bd3a1e09038b9fc05f23df0c2c05021ab67493bec1064598e1a
NorfairKing/the-notes
Domain.hs
module Relations.Domain where import Notes import Logic.FirstOrderLogic.Macro import Sets.Basics.Terms import Relations.Basics.Macro import Relations.Basics.Terms import Relations.Domain.Macro import Relations.Domain.Terms domainAndImage :: Not...
null
https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Relations/Domain.hs
haskell
module Relations.Domain where import Notes import Logic.FirstOrderLogic.Macro import Sets.Basics.Terms import Relations.Basics.Macro import Relations.Basics.Terms import Relations.Domain.Macro import Relations.Domain.Terms domainAndImage :: Not...
08ebe6cadd359a487c99731893e9b029a45a9df1f71ecca76ad62f35aa169a1c
clojuredatascience/ch1-statistics
data.clj
(ns cljds.ch1.data (:require [clojure.java.io :as io] [incanter.core :as i] [incanter.excel :as xls])) (defmulti load-data identity) (defmethod load-data :uk [_] (-> (io/resource "UK2010.xls") (str) (xls/read-xls))) (defmethod load-data :uk-scrubbed [_] (->> (load-data :uk) ...
null
https://raw.githubusercontent.com/clojuredatascience/ch1-statistics/46905605b05581ca9b6cb489e17120cdddeb8b14/src/cljds/ch1/data.clj
clojure
(ns cljds.ch1.data (:require [clojure.java.io :as io] [incanter.core :as i] [incanter.excel :as xls])) (defmulti load-data identity) (defmethod load-data :uk [_] (-> (io/resource "UK2010.xls") (str) (xls/read-xls))) (defmethod load-data :uk-scrubbed [_] (->> (load-data :uk) ...
19434fe4c30ad4910571b600d50d5e8780fb8ac394fc33f7302c0e780044584a
mhallin/graphql_ppx
comment.ml
module My_query = [%graphql {| query ($arg: NonrecursiveInput!) { nonrecursiveInput(arg: $arg) # comment to test } |}]
null
https://raw.githubusercontent.com/mhallin/graphql_ppx/5796b3759bdf0d29112f48e43a2f0623f7466e8a/tests_native/comment.ml
ocaml
module My_query = [%graphql {| query ($arg: NonrecursiveInput!) { nonrecursiveInput(arg: $arg) # comment to test } |}]
e3ab0687beeeebbae634be82b6a5707907aba77393ffaadbb3c4234b489d36d5
amuletml/amulet
Unicode.hs
| So whilst does support UTF8 , it 's rather hard to get it to work with character categories ( such as only accepting upper case ones ) . The answer is simple : we cheat . Our lexer operates on latin1 encoded strings , mapping ASCII characters to themselves and other characters to elements in the ran...
null
https://raw.githubusercontent.com/amuletml/amulet/fcba0b7e198b8d354e95722bbe118bccc8483f4e/src/Parser/Unicode.hs
haskell
into a couple of key categories. These are used to designate the beginning of symbols These are guaranteed parse order. The only difference is that "graphic" is printable, while other may not be. | Determine the class for a given character. See classification descriptions in <-14.html#GC_Values_Table> Cased le...
| So whilst does support UTF8 , it 's rather hard to get it to work with character categories ( such as only accepting upper case ones ) . The answer is simple : we cheat . Our lexer operates on latin1 encoded strings , mapping ASCII characters to themselves and other characters to elements in the ran...
48e2b68016bc8e1cf4dae3480f4f64fbe5bb8ec05dd4018ab290d30bd40bb7bc
khibino/haskell-relational-record
SetB.hs
# LANGUAGE TemplateHaskell , MultiParamTypeClasses , FlexibleInstances , DataKinds , DeriveGeneric # module SetB where import GHC.Generics (Generic) import Prelude hiding (seq) import PgTestDataSource (defineTable) $(defineTable [] "EXAMPLE3" "set_b" [''Show, ''Generic])
null
https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/examples/HDBC/PostgreSQL/example/3/SetB.hs
haskell
# LANGUAGE TemplateHaskell , MultiParamTypeClasses , FlexibleInstances , DataKinds , DeriveGeneric # module SetB where import GHC.Generics (Generic) import Prelude hiding (seq) import PgTestDataSource (defineTable) $(defineTable [] "EXAMPLE3" "set_b" [''Show, ''Generic])
f1dac8eef7414d32c4b720890af44a0440cf148fffaf6ff376ef3cd8e347bd87
clojurewerkz/statistiker
optimization_test.clj
(ns clojurewerkz.statistiker.optimization-test (:require [clojurewerkz.statistiker.regression :refer :all] [clojurewerkz.statistiker.utils :refer [almost=]] [clojurewerkz.statistiker.functions] [clojure.test :refer :all])) (def linear-regression-test-data [[1.47 52.21] [1.5 53.1...
null
https://raw.githubusercontent.com/clojurewerkz/statistiker/f056f68c975cf3d6e0f1c8212aef9114d4eb657c/test/clj/clojurewerkz/statistiker/optimization_test.clj
clojure
(ns clojurewerkz.statistiker.optimization-test (:require [clojurewerkz.statistiker.regression :refer :all] [clojurewerkz.statistiker.utils :refer [almost=]] [clojurewerkz.statistiker.functions] [clojure.test :refer :all])) (def linear-regression-test-data [[1.47 52.21] [1.5 53.1...
e85e40a3587ccb35e7706ca74e87d657992eefa47ddb1e06c7130aa54e030081
fyquah/hardcaml_zprize
toneli_shank.mli
val tonelli_shank : p:Z.t -> Z.t -> (Z.t * Z.t) option
null
https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/twisted_edwards/model/toneli_shank.mli
ocaml
val tonelli_shank : p:Z.t -> Z.t -> (Z.t * Z.t) option
f907aad48e1272de8806216c82fc0f5af0d3969c9ca1cccfb636acd1331a5285
diagrams/diagrams-builder
Builder.hs
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # # OPTIONS_GHC -fno...
null
https://raw.githubusercontent.com/diagrams/diagrams-builder/fa73414a1de8e9d8ba1117aa5ae023633859c0db/src/Diagrams/Builder.hs
haskell
# LANGUAGE CPP # # LANGUAGE DeriveDataTypeable # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # --------------------------------------------------------------------------- | Module : Diagrams.Builder License : BSD-style (see LI...
# LANGUAGE MultiParamTypeClasses # # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # # OPTIONS_GHC -fno - warn - orphans # Copyright : ( c ) 2012 diagrams - lib team ( see LICENSE ) module Diagrams.Builder BuildOpts(..), mkBuildOpts, backendOpts, snippets, pragmas, imports, qim...
e148a798c0be10f199146c0e44c4ea5955ee61cfb31398b719c49fa1aab6852a
input-output-hk/cardano-wallet
Balance.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedLabels # # LANGUAGE OverloadedLists # # LANGUAGE RecordWildCards # ...
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet/41deda8a7e31f8e054dc149473461613492fbc7a/lib/coin-selection/lib/Cardano/CoinSelection/Balance.hs
haskell
# LANGUAGE BangPatterns # | License: Apache-2.0 Provides an algorithm for producing a balanced coin selection with change, where the fee is paid for. multi-asset UTxO sets. See documentation for the 'performSelection' function for more details on how to perform a selection. * Performing a selection * Selec...
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedLabels # # LANGUAGE OverloadedLists # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables...
71b127820454f56908c5038c20e2c2ee11dae3dc94d7b3531e36762232dea398
donaldsonjw/bigloo
typec.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / comptime / Reduce / typec.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Reduce/typec.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * The reduction of type checks. */ *===========================...
* serrano / prgm / project / bigloo / comptime / Reduce / typec.scm * / * Author : * / * Creation : Thu Jul 13 10:29:17 1995 * / * Last change : Tue Feb 4 10:29:52 2014 ( serrano ) * / * Cop...
8b62f673226c9d298cd26a00a981e3a47de846a707e5f89c7061ad4d2d7e2f7c
vshaxe/hxparser
ast.ml
The Haxe Compiler Copyright ( C ) 2005 - 2017 Haxe Foundation This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later v...
null
https://raw.githubusercontent.com/vshaxe/hxparser/8621d5e44805b6d664654d15737faf6a3a4a18fa/src/syntax/ast.ml
ocaml
The Haxe Compiler Copyright ( C ) 2005 - 2017 Haxe Foundation This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later v...
563af334414ec56bdbc75366233cf0a67e9c5adc6f34fcce9325936780326e37
ruricolist/infix-math
data.lisp
(defpackage :infix-math/data (:use :cl :alexandria :serapeum :infix-math/symbols) (:export :unary :operator? :trim-dotted-operator :precedence :unary? :right-associative? :declare-unary-operator :declare-binary-operator)) (in-package :infix-math/data) (deftype operator () 'sy...
null
https://raw.githubusercontent.com/ruricolist/infix-math/f5155ae9709e518061ace79887d78f8e79c61cac/data.lisp
lisp
(defpackage :infix-math/data (:use :cl :alexandria :serapeum :infix-math/symbols) (:export :unary :operator? :trim-dotted-operator :precedence :unary? :right-associative? :declare-unary-operator :declare-binary-operator)) (in-package :infix-math/data) (deftype operator () 'sy...
e17b58bee578d44f96e09c3e960a434d511fcc0170b2f831393cf04c37e958ec
sbcl/sbcl
type-vops.lisp
;;;; type testing and checking VOPs for the RISC-V VM 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 p...
null
https://raw.githubusercontent.com/sbcl/sbcl/5ad1869117c16f74673e5c21f1704ac9f529e65a/src/compiler/riscv/type-vops.lisp
lisp
type testing and checking VOPs for the RISC-V VM 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. Test generation utilities. WHEN-TRUE and WHEN-FALSE are the labels to branch to when we kno...
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-VM") (defun %test-fixnum (value temp target not-p) (assemble () (inst andi temp value fixnum-tag-mask)...
5c07d17be9a8df0f93897b21754916117ad927a2342e9ca7987c9701707e1ea9
logicblocks/salutem
ports.clj
(ns salutem.test.support.ports (:import [java.net ServerSocket])) (defn free-port [] (with-open [socket (ServerSocket. 0)] (.getLocalPort socket)))
null
https://raw.githubusercontent.com/logicblocks/salutem/575aee302cfd416d0496d9855f3a05b53a37c300/check-fns/http-endpoint/test/shared/salutem/test/support/ports.clj
clojure
(ns salutem.test.support.ports (:import [java.net ServerSocket])) (defn free-port [] (with-open [socket (ServerSocket. 0)] (.getLocalPort socket)))
a8c96104988c79d8a6f439a0685c04c39c788b2349b715dba84632d8e88db89e
janestreet/file_path
types.ml
open! Core include Types_intf module T = struct type t = string [@@deriving equal, hash, sexp_of, sexp_grammar] let to_string = Fn.id let compare = Path_string.compare include (val Comparator.make ~compare ~sexp_of_t) module Expert = struct let unchecked_of_canonical_string = Fn.id end end module P...
null
https://raw.githubusercontent.com/janestreet/file_path/c45fdc863413ada8d8088abd71064368252d0b72/src/types.ml
ocaml
open! Core include Types_intf module T = struct type t = string [@@deriving equal, hash, sexp_of, sexp_grammar] let to_string = Fn.id let compare = Path_string.compare include (val Comparator.make ~compare ~sexp_of_t) module Expert = struct let unchecked_of_canonical_string = Fn.id end end module P...
25b7535adee6b79cabee3aafb43b8c2bde13cf659b357de13d69e137461cf851
wireless-net/erlang-nommu
ssh_xfer.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2005 - 2013 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Publi...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/ssh/src/ssh_xfer.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitatio...
Copyright Ericsson AB 2005 - 2013 . 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(ssh_xfer). -export([attach/2, c...
701a08515942afecd63e6552441e21c0dc8287d9d72fde83f3065bd5a01a794a
input-output-hk/cardano-base
SHA256.hs
# LANGUAGE DataKinds # # LANGUAGE TypeFamilies # -- | Implementation of the SHA256 hashing algorithm. module Cardano.Crypto.Hash.SHA256 ( SHA256 ) where import Control.Monad (unless) import Cardano.Crypto.Libsodium.C (c_crypto_hash_sha256) import Cardano.Foreign (SizedPtr(SizedPtr)) import Cardano.Crypto.Hash.Cla...
null
https://raw.githubusercontent.com/input-output-hk/cardano-base/41017cbe66aa0af80e7d27d4280eee286cd5d8d5/cardano-crypto-class/src/Cardano/Crypto/Hash/SHA256.hs
haskell
| Implementation of the SHA256 hashing algorithm.
# LANGUAGE DataKinds # # LANGUAGE TypeFamilies # module Cardano.Crypto.Hash.SHA256 ( SHA256 ) where import Control.Monad (unless) import Cardano.Crypto.Libsodium.C (c_crypto_hash_sha256) import Cardano.Foreign (SizedPtr(SizedPtr)) import Cardano.Crypto.Hash.Class (HashAlgorithm, SizeHash, hashAlgorithmName, diges...