_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
171b9d046e16520244dc96a5749facaa6c5bd919d684bd042d92fb12df89f1ef
uw-unsat/serval
sbb.rkt
#lang racket/base (require "lib.rkt") (define tests (x86-suite "SBB" sbb-r/m32-imm8 sbb-r/m64-imm8 sbb-r/m32-r32 sbb-r/m64-r64 )) (module+ test (time (run-tests tests)))
null
https://raw.githubusercontent.com/uw-unsat/serval/be11ecccf03f81b8bd0557acf8385a6a5d4f51ed/test/x86/sbb.rkt
racket
#lang racket/base (require "lib.rkt") (define tests (x86-suite "SBB" sbb-r/m32-imm8 sbb-r/m64-imm8 sbb-r/m32-r32 sbb-r/m64-r64 )) (module+ test (time (run-tests tests)))
bec9ce11a3793b999bc642dde615c3e7a6202d597420a0e6b43bc1431ce501f2
hexlet-codebattle/battle_asserts
minmax_find.clj
(ns battle-asserts.issues.minmax-find (:require [clojure.test.check.generators :as gen])) (def level :elementary) (def tags ["collections"]) (def description {:en "Create a function that takes an array of numbers and return both the minimum and maximum numbers." :ru "Напишите функцию, которая принимает массив...
null
https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/37883e518539cf3688ba22f01af719ab67947eb8/src/battle_asserts/issues/minmax_find.clj
clojure
(ns battle-asserts.issues.minmax-find (:require [clojure.test.check.generators :as gen])) (def level :elementary) (def tags ["collections"]) (def description {:en "Create a function that takes an array of numbers and return both the minimum and maximum numbers." :ru "Напишите функцию, которая принимает массив...
c2bbe26d19b1fa0bd2310c7402d396913a1a672ccdd328aa9dcc9ca130b57ac9
coq-community/coqffi
pp.mli
open Format open Conflict val pp_if_not_empty : (formatter -> unit -> unit) -> formatter -> 'a list -> unit val pp_list : ?enclose:('a list -> bool) -> ?pp_prefix:(formatter -> unit -> unit) -> ?pp_suffix:(formatter -> unit -> unit) -> pp_sep:(formatter -> unit -> unit) -> (formatter -> 'a -> unit) -> f...
null
https://raw.githubusercontent.com/coq-community/coqffi/b76d6623a47dfc90ac4e7f8b7ee71fb101de1cee/src/pp.mli
ocaml
open Format open Conflict val pp_if_not_empty : (formatter -> unit -> unit) -> formatter -> 'a list -> unit val pp_list : ?enclose:('a list -> bool) -> ?pp_prefix:(formatter -> unit -> unit) -> ?pp_suffix:(formatter -> unit -> unit) -> pp_sep:(formatter -> unit -> unit) -> (formatter -> 'a -> unit) -> f...
0a9ca7b9869e3a93fc06361ae90e54b0eb75d8bc539f4b65305e894981193491
SamirTalwar/advent-of-code
Parse.hs
{-# OPTIONS -Wall #-} module Helpers.Parse where import qualified Data.Maybe as Maybe import Data.Text (Text) import qualified Data.Text.IO as Text.IO import Text.Parsec parseTextIO :: Parsec Text () a -> IO a parseTextIO parser = parseText parser <$> Text.IO.getContents parseText :: Parsec Text () a -> Text -> a p...
null
https://raw.githubusercontent.com/SamirTalwar/advent-of-code/94d525cffe213b8a1d89ccf1b879e32ad5a7ebd0/2021/Helpers/Parse.hs
haskell
# OPTIONS -Wall #
module Helpers.Parse where import qualified Data.Maybe as Maybe import Data.Text (Text) import qualified Data.Text.IO as Text.IO import Text.Parsec parseTextIO :: Parsec Text () a -> IO a parseTextIO parser = parseText parser <$> Text.IO.getContents parseText :: Parsec Text () a -> Text -> a parseText parser = eith...
1e83a73c7302dc92c36d4875efd09db2dd613d37d121db6f0f9a3e2b4fcf333e
UU-ComputerScience/uhc
Time1.hs
{- ---------------------------------------------------------------------------------------- what : Testing System.Time expected: ok constraints: exclude-if-js ---------------------------------------------------------------------------------------- -} import System.Time import System.Locale clock1 :: Cloc...
null
https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/99/Time1.hs
haskell
---------------------------------------------------------------------------------------- what : Testing System.Time expected: ok constraints: exclude-if-js ----------------------------------------------------------------------------------------
import System.Time import System.Locale clock1 :: ClockTime clock1 = TOD 10000000 1000 clock2 :: ClockTime clock2 = TOD 20000000 2000 main :: IO () main = do let dif0 = diffClockTimes clock1 clock1 dif1 = diffClockTimes clock2 clock1 clock3 = addToClockTime dif1 clock1 ndif = normalizeTim...
401f96d384400c5e23ce93b948da530ab965bd3613c9b2a7b1769427b35efa45
acieroid/scala-am
qsort.scm
Parallel quick - sort (define (build-vector n init f) (letrec ((v (make-vector n init)) (loop (lambda (i) (if (< i n) (begin (vector-set! v i (f i)) (loop (+ i 1))) v)))) (loop 0))) (...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/futures/qsort.scm
scheme
do nothing sort
Parallel quick - sort (define (build-vector n init f) (letrec ((v (make-vector n init)) (loop (lambda (i) (if (< i n) (begin (vector-set! v i (f i)) (loop (+ i 1))) v)))) (loop 0))) (...
5d3a166467aa04e2eb3c7e2ce5ebd1c9ee70f4d0e0cac4a9047b9b9e3bcfcc56
jfacorro/rebar3_docs
rebar3_docs.erl
-module(rebar3_docs). -export([init/1]). -spec init(rebar_state:t()) -> {ok, rebar_state:t()}. init(State) -> {ok, State1} = rebar3_docs_prv:init(State), {ok, State1}.
null
https://raw.githubusercontent.com/jfacorro/rebar3_docs/bda7c31877c643d3cff8f8d14487cd203f04c293/src/rebar3_docs.erl
erlang
-module(rebar3_docs). -export([init/1]). -spec init(rebar_state:t()) -> {ok, rebar_state:t()}. init(State) -> {ok, State1} = rebar3_docs_prv:init(State), {ok, State1}.
be02d756ac85049e5def892b71071478276ed50db09aa05705b8ccd96699f80d
callum-oakley/advent-of-code
06.clj
(ns aoc.2022.06 (:require [clojure.test :refer [deftest is]])) (defn marker [m signal] (loop [signal signal i 0] (if (apply distinct? (take m signal)) (+ i m) (recur (rest signal) (inc i))))) (defn part-1 [signal] (marker 4 signal)) (defn part-2 [signal] (marker 14 signal)) (deftest test-...
null
https://raw.githubusercontent.com/callum-oakley/advent-of-code/0f257a41435a7157efaf5c6b68a006ec4436ce94/src/aoc/2022/06.clj
clojure
(ns aoc.2022.06 (:require [clojure.test :refer [deftest is]])) (defn marker [m signal] (loop [signal signal i 0] (if (apply distinct? (take m signal)) (+ i m) (recur (rest signal) (inc i))))) (defn part-1 [signal] (marker 4 signal)) (defn part-2 [signal] (marker 14 signal)) (deftest test-...
819cba61b73a88ece2e8d3b172c47921bd17292e7530b5a94ee05c3ffc221454
8c6794b6/haskell-sc-scratch
Random.hs
{-# LANGUAGE BangPatterns #-} | Module : $ Header$ License : : unstable Portability : portable Playing with random . Module : $Header$ License : BSD3 Stability : unstable Portability : portable Playing with random. -} module Random where import Control.Monad import Data.List (...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/Misc/Random.hs
haskell
# LANGUAGE BangPatterns #
| Module : $ Header$ License : : unstable Portability : portable Playing with random . Module : $Header$ License : BSD3 Stability : unstable Portability : portable Playing with random. -} module Random where import Control.Monad import Data.List (unfoldr) import Control.Monad...
9e411c6386fefe34b7f599e45208f195f0fa67472fedccee7cdbc4394bf91475
pfdietz/ansi-test
cons-test-03.lsp
;-*- Mode: Lisp -*- Author : Created : Sat Mar 28 07:32:20 1998 Contains : Testing of CL Features related to " CONS " , part 3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; (typep <obj> 'list) ;;; These tests are now somewhat redundant (deftest typep-nil-list (notnot-mv (typep nil 'list)) t) ...
null
https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/cons/cons-test-03.lsp
lisp
-*- Mode: Lisp -*- (typep <obj> 'list) These tests are now somewhat redundant
Author : Created : Sat Mar 28 07:32:20 1998 Contains : Testing of CL Features related to " CONS " , part 3 (deftest typep-nil-list (notnot-mv (typep nil 'list)) t) (deftest typep-symbol-list (typep 'a 'list) nil) (deftest typep-singleton-list-list (notnot-mv (typep '(a) 'list)) t) (de...
e35b6e88c4c03dba7f8bc736364c54a551a8e700ea83ad62c58c6346a42eae47
fredlund/McErlang
mce_actions.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/src/mce_actions.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 -module(mce_actions). -include("actions.hrl"). -export([is_action/1]). -export([mk/1,mk/2,mk/3,mk/4...
7cc6399437db9fda449673ab81a0faf1b7317eddf6b2cd3ccf40a02ff4a8ca59
ocaml-multicore/tezos
ticket_scanner.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 , < > Copyright ( c ) 2021 - ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/ticket_scanner.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 , < > Copyright ( c ) 2021 - 2022 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARR...
b4b19277579a6f4b6ca578a6ed77adbf46d27cc8b35fd6eb94b2370332937e74
brendanhay/gogol
Types.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-speech/gen/Gogol/Speech/Types.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated * Configuration * Types ** Xgafv ** ListOperationsResponse ** LongRunningRecognizeMetadata ** LongRunningRecognizeResponse ** Operation ** Operation_Metadata ** Operation_Response ** SpeechRecognitionAlternative ** Speech...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
85a1a7bbfefeb57f808b4b1c60569b319c4f185b40b65367493185c230086aa5
parapluu/Concuerror
send_named_vs_send.erl
-module(send_named_vs_send). -export([send_named_vs_send/0]). -export([scenarios/0]). scenarios() -> [{?MODULE, inf, dpor}]. send_named_vs_send() -> register(name, self()), spawn(fun() -> name ! message_1 end), spawn(fun() -> unregister(name), register(name, self()), ...
null
https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/basic_tests/src/send_named_vs_send.erl
erlang
-module(send_named_vs_send). -export([send_named_vs_send/0]). -export([scenarios/0]). scenarios() -> [{?MODULE, inf, dpor}]. send_named_vs_send() -> register(name, self()), spawn(fun() -> name ! message_1 end), spawn(fun() -> unregister(name), register(name, self()), ...
6f84fa36311be96ec7af042fc01fbb864510cca1d7a9bad2562058abeadca9f3
testdouble/baizen
s_transaction_detail.clj
(ns baizen.formats.s-transaction-detail (:require [baizen.formats :refer [BaiFormat index-of drop-slash lookup-type-code]])) (defrecord STransactionDetail [line] BaiFormat (fields [_] [:record-code :type-code :amount :funds-type :immediate-availability-amount :oneday-availability-amount :morethanoneday-...
null
https://raw.githubusercontent.com/testdouble/baizen/66bc3da3b660bc88317e1be6fce266a95db883fb/src/baizen/formats/s_transaction_detail.clj
clojure
(ns baizen.formats.s-transaction-detail (:require [baizen.formats :refer [BaiFormat index-of drop-slash lookup-type-code]])) (defrecord STransactionDetail [line] BaiFormat (fields [_] [:record-code :type-code :amount :funds-type :immediate-availability-amount :oneday-availability-amount :morethanoneday-...
5d068f69ebea6230901b4ec452f1206a89e9316eefd29b5604b52661a0adde67
phadej/hooglite
Database.hs
{-# LANGUAGE OverloadedStrings #-} module Hooglite.Test.Database ( databaseTests, ) where import Test.Tasty (TestTree, testGroup, withResource) import Test.Tasty.HUnit (testCaseInfo, (@=?)) import Hooglite.Database import Hooglite.Haddock import Hooglite.MonoPoly.Pretty import Hooglite.Query databaseTests ...
null
https://raw.githubusercontent.com/phadej/hooglite/8414b270254f595940edde6fe6ea3f800919b71b/test/Hooglite/Test/Database.hs
haskell
# LANGUAGE OverloadedStrings #
module Hooglite.Test.Database ( databaseTests, ) where import Test.Tasty (TestTree, testGroup, withResource) import Test.Tasty.HUnit (testCaseInfo, (@=?)) import Hooglite.Database import Hooglite.Haddock import Hooglite.MonoPoly.Pretty import Hooglite.Query databaseTests :: TestTree databaseTests = wit...
0d42e0a5fa17a62930abf759a628cd96453deed498de68524369e5604ff06d33
ghc/testsuite
TH_repPrim2.hs
# LANGUAGE MagicHash , UnboxedTuples # -- test the representation of unboxed literals module Main where import GHC.Exts import GHC.Float import Language.Haskell.TH import Text.PrettyPrint import System.IO main :: IO () main = do putStrLn $ show $ $( do e <- [| 20# |] runIO $ putStrL...
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/th/TH_repPrim2.hs
haskell
test the representation of unboxed literals
# LANGUAGE MagicHash , UnboxedTuples # module Main where import GHC.Exts import GHC.Float import Language.Haskell.TH import Text.PrettyPrint import System.IO main :: IO () main = do putStrLn $ show $ $( do e <- [| 20# |] runIO $ putStrLn $ show e ru...
5dd993cb99671cb0638ad4e6c9ee3be58b2a4c98a5dbc5aa69232af236887279
camllight/camllight
string.mli
(* String operations *) value string_length : string -> int = 1 "string_length" (* Return the length (number of characters) of the given string. *) ;; value nth_char : string -> int -> char [ nth_char s n ] returns character number [ n ] in string [ s ] . The first character is character number ...
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/windows/src/lib/string.mli
ocaml
String operations Return the length (number of characters) of the given string. [s1 ^ s2] returns a fresh string containing the concatenation of the strings [s1] and [s2]. Return a fresh string containing the concatenation of all the strings in the argument list. [sub_string s start len] ...
value string_length : string -> int = 1 "string_length" ;; value nth_char : string -> int -> char [ nth_char s n ] returns character number [ n ] in string [ s ] . The first character is character number 0 . The last character is character number [ string_length s - 1 ] . Raise...
15b68e405ebf23b36e2de26a05c6803dfea6ad8b5fa0400bb0a1caa2cb42387b
polyfy/polylith
paths.clj
(ns polylith.clj.core.path-finder.paths (:require [clojure.set :as set] [polylith.clj.core.file.interface :as file] [polylith.clj.core.path-finder.sources-on-disk :as sources])) (defn project-paths [{:keys [paths profile-src-paths profile-test-paths]}] (concat (:src paths) (:test paths) pro...
null
https://raw.githubusercontent.com/polyfy/polylith/abd20bb656e2cdd712732d80e1238316d3ea1b7f/components/path-finder/src/polylith/clj/core/path_finder/paths.clj
clojure
(ns polylith.clj.core.path-finder.paths (:require [clojure.set :as set] [polylith.clj.core.file.interface :as file] [polylith.clj.core.path-finder.sources-on-disk :as sources])) (defn project-paths [{:keys [paths profile-src-paths profile-test-paths]}] (concat (:src paths) (:test paths) pro...
d23fa746acc6f30bf842ec68ae20c286f0e782bf5b0a125ae67563b7e82159a4
fccm/glMLite
jpeg_loader.ml
(** JPEG image loader *) (** Jpeg image loader, optimised to load the data directly inside the bigarray. *) (* type image_color_space = | JCS_RGB (** red/green/blue *) | JCS_GRAYSCALE (** monochrome *) | JCS_CMYK (** C/M/Y/K *) * Y / Cb / Cr ( also known as YUV ) | JCS_YCCK (**...
null
https://raw.githubusercontent.com/fccm/glMLite/c52cd806909581e49d9b660195576c8a932f6d33/SRC/jpeg_loader.ml
ocaml
* JPEG image loader * Jpeg image loader, optimised to load the data directly inside the bigarray. type image_color_space = | JCS_RGB (** red/green/blue * monochrome * C/M/Y/K * Y/Cb/Cr/K * error/unspecified
* Y / Cb / Cr ( also known as YUV ) *) external load_img: GL.img_input -> GL.image_data * int * int * GL.InternalFormat.internal_format * GL.pixel_data_format = "caml_load_jpeg_file" * The 2 additionnal integers are the [ width ] and [ height ]
d64f3501984cb8046843d1823b68a56c1b6c8b8a3f5f816fcf21e9873647e004
mukul-rathi/bolt
bad_consume_variable.ml
open Core open Print_typed_ast let%expect_test "Consume this" = print_typed_ast " class Foo { capability linear Bar; const int f : Bar; Foo test() : Bar { consume this } } void main(){ } " ; [%expect {| Line:6 Position:10 Type error - Trying to consume '...
null
https://raw.githubusercontent.com/mukul-rathi/bolt/1faf19d698852fdb6af2ee005a5f036ee1c76503/tests/frontend/expect/typing/bad_consume_variable.ml
ocaml
open Core open Print_typed_ast let%expect_test "Consume this" = print_typed_ast " class Foo { capability linear Bar; const int f : Bar; Foo test() : Bar { consume this } } void main(){ } " ; [%expect {| Line:6 Position:10 Type error - Trying to consume '...
eeebc92ab003e46c719dd1e66d738fa6dc3e2f719acb1ae455957bc46b4f2e57
rowangithub/DOrder
app-lin-ord3.ml
let app (a:int) (f:int->(int->unit)->unit) (a:int) (g:int->unit) = f a g let f x (a:int) (k:int->unit) = k x let check (x:int) (y:int) = assert (x = y) let main a b = app (4 * a + 2 * b) (f (4 * a + 2 * b)) (4 * a + 2 * b) (check (4 * a + 2 * b)) let _ = main 1 1
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/popl13/app-lin-ord3.ml
ocaml
let app (a:int) (f:int->(int->unit)->unit) (a:int) (g:int->unit) = f a g let f x (a:int) (k:int->unit) = k x let check (x:int) (y:int) = assert (x = y) let main a b = app (4 * a + 2 * b) (f (4 * a + 2 * b)) (4 * a + 2 * b) (check (4 * a + 2 * b)) let _ = main 1 1
42a4a7e20dd58d351f4f0e8caf93b5da5d1c1354cf736589c5dacd0faa5fd328
inria-parkas/sundialsml
kinsol_impl.ml
(***********************************************************************) (* *) (* OCaml interface to Sundials *) (* *) ( ) , ( ) , and...
null
https://raw.githubusercontent.com/inria-parkas/sundialsml/a72ebfc84b55470ed97fbb0b45d700deebfc1664/src/kinsol/kinsol_impl.ml
ocaml
********************************************************************* OCaml interface to Sundials ...
( ) , ( ) , and ( LIENS ) Copyright 2014 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed open Sundials let e = Sundials.RecoverableFailure Types shared between and Kinsol_bbd . See the notes on Cvode_impl about th...
fd74519021a5d22fe983d57fe4d48c9884452b9706104a19ba6b61fc387458ce
mroman42/discokitty
LesJustesVector.hs
# LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE UndecidableInstances #-} module Discokitty.Examples.LesJustesVector where import Data.Semigroup import Discokitty import Discokitty.Examples.LesJustesUniverse import Discokitty.M...
null
https://raw.githubusercontent.com/mroman42/discokitty/c9e6af9327b187549a3b0e2f3bb14657279ecdc5/source/Discokitty/Examples/LesJustesVector.hs
haskell
# LANGUAGE UndecidableInstances # The real numbers have the obvious semiring structure.
# LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # module Discokitty.Examples.LesJustesVector where import Data.Semigroup import Discokitty import Discokitty.Examples.LesJustesUniverse import Discokitty.Models.Vectorspaces import qualified Discokit...
fb02654ab7b3ae6cec4fc46b8915e31ef8bfb191b777fa092c0062d3064c5cd3
steinuil/nene
xml.ml
open Combinators let ( let* ) = Result.bind module Attr = struct open Unordered.Parsers type input = Xmlm.attribute list type error = [ Combinators.error | `Attribute_not_found of string | `Trailing_elements_detected | `Conversion_failed of string * string * string ] type ('a, 'err) t = ('a...
null
https://raw.githubusercontent.com/steinuil/nene/7fd538a826fc1c7ad107d931849b1be1b87b0692/patche/xml.ml
ocaml
open Combinators let ( let* ) = Result.bind module Attr = struct open Unordered.Parsers type input = Xmlm.attribute list type error = [ Combinators.error | `Attribute_not_found of string | `Trailing_elements_detected | `Conversion_failed of string * string * string ] type ('a, 'err) t = ('a...
ffaa9e907c2e271670a6781847e2d0252896945ee48617932c0539bf647fee10
langston-barrett/CoverTranslator
Layout.hs
module Cl.Layout where import Cl.Lex -- Generated by the BNF Converter -- local parameters topLayout = True layoutWords = ["where"] layoutStopWords = [] by setting the first argument False , you can switch off top - level layout resolveLayout :: Bool -> [Token] -> [Token] resolveLayout tp = tailif . res iftop ...
null
https://raw.githubusercontent.com/langston-barrett/CoverTranslator/4172bef9f4eede7e45dc002a70bf8c6dd9a56b5c/src/Cl/Layout.hs
haskell
Generated by the BNF Converter local parameters the parameters are used in this way stack of block positions test if layout is used pop the stack special introduction of braces if the end of file is encountered exit to yet outer block reserved word or symbol
module Cl.Layout where import Cl.Lex topLayout = True layoutWords = ["where"] layoutStopWords = [] by setting the first argument False , you can switch off top - level layout resolveLayout :: Bool -> [Token] -> [Token] resolveLayout tp = tailif . res iftop where remove first ; ( hack ) ifmix t0 = prToken ...
2ddadf81a38958e56520fc99edf68297812b8fb805aa0136cec8e98b3b704f31
brendanhay/terrafomo
DataSources.hs
-- This module is auto-generated. # LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # -- | -- Module : Terrafomo.VSphere.DataSources Copyright : ( c ) 2017 - 2018 Licens...
null
https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-vsphere/gen/Terrafomo/VSphere/DataSources.hs
haskell
This module is auto-generated. | Module : Terrafomo.VSphere.DataSources Stability : auto-generated * vsphere_compute_cluster * vsphere_custom_attribute * vsphere_datacenter * vsphere_datastore_cluster * vsphere_datastore * vsphere_distributed_virtual_switch * vsphere_host * vsphere_network * vspher...
# LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # Copyright : ( c ) 2017 - 2018 License : Mozilla Public License , v. 2.0 . Maintainer : < brendan.g.hay+ > Por...
605e89e8d6a965a292d1bfce89f3c4b39cb363a736ab972d06c17f2b69e4c1bc
liqd/aula
ContextMenu.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE ViewPatterns # # OPTIONS_GHC -Werror -Wall # module Frontend.Fragment.ContextMenu where import Frontend.Prelude contextMenu :: Monad m => [(Bool, ST, HtmlT m ())] -> HtmlT m () contextMenu (filter (view _1) -> entries) = do nav_ [class_ "pop-menu m-cta de...
null
https://raw.githubusercontent.com/liqd/aula/f96dbf85cd80d0b445e7d198c9b2866bed9c4e3d/src/Frontend/Fragment/ContextMenu.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE ViewPatterns # # OPTIONS_GHC -Werror -Wall # module Frontend.Fragment.ContextMenu where import Frontend.Prelude contextMenu :: Monad m => [(Bool, ST, HtmlT m ())] -> HtmlT m () contextMenu (filter (view _1) -> entries) = do nav_ [class_ "pop-menu m-cta detail-header-menu"] $ do span_...
4eb54d2cd5d9193f18c9306177601bf03af5a9416cb991c7b675e0a9e80670a2
offby1/anagrams
bag.scm
(module bag (export bag-empty? subtract-bags bag )) (define (bag s) "Return an object that describes all the letters in S, without regard to order." (list->string (sort (filter char-alphabetic? (string->list (string-downcase s))) char<?))) (define (bag-empty? s) (string=? s "")) (define bags=? string...
null
https://raw.githubusercontent.com/offby1/anagrams/0a7fbcff49a7dee6ed28333ecd354dd1fcff4bd6/scheme/bigloo/bag.scm
scheme
top minus bottom. if BOTTOM contains any characters that aren't in TOP, fail. if BOTTOM contains more of a given character than TOP does, also fail. unit tests creating a bag from a string needn't be all that fast, since we'll reading a dictionary of words), whereas subtracting bags needs to be *really* fa...
(module bag (export bag-empty? subtract-bags bag )) (define (bag s) "Return an object that describes all the letters in S, without regard to order." (list->string (sort (filter char-alphabetic? (string->list (string-downcase s))) char<?))) (define (bag-empty? s) (string=? s "")) (define bags=? string...
088fa5956e7ff074156b8a4c242a32cdd61423400c076de235152d0eb072635a
Dasudian/DSDIN
utils_debug.erl
-module(utils_debug). -export([pp/1]). pp(X) -> try pp_(X) catch error:Err -> {'PP_ERROR', Err, X} end. pp_(B) when is_tuple(B), element(1, B) == block -> try H = aec_blocks:height(B), RH = aec_blocks:root_hash(B), PH = aec_blocks:prev_hash(B), lists:flatten( io...
null
https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/utils/src/utils_debug.erl
erlang
-module(utils_debug). -export([pp/1]). pp(X) -> try pp_(X) catch error:Err -> {'PP_ERROR', Err, X} end. pp_(B) when is_tuple(B), element(1, B) == block -> try H = aec_blocks:height(B), RH = aec_blocks:root_hash(B), PH = aec_blocks:prev_hash(B), lists:flatten( io...
2be4a7c529f4a38514fbc4ab3878313bced259a94bcb9411ba01f2bdbbb97369
pixlsus/registry.gimp.org_static
comicstrip_0.scm
;*************************************************************************************** Comic - Strip script for GIMP 2.2 Copyright ( C ) 2019 > Based on comic - book script by < ; -------------------------------------------------------------------- (define (script-fu-Comic-Strip img ...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/comicstrip_0.scm
scheme
*************************************************************************************** -------------------------------------------------------------------- so Empty and All are the same.
Comic - Strip script for GIMP 2.2 Copyright ( C ) 2019 > Based on comic - book script by < (define (script-fu-Comic-Strip img drawable ) (gimp-image-undo-group-start img) (let* ( (width (car (gimp-drawable-width drawable))) (height (car (gimp-drawable-height drawable)...
29d10c8140149892377c690b80452470a17942d8f239d67107ebdb733ef0e3f5
ocaml/merlin
emitter.ml
open MenhirSdk.Cmly_api open Utils let menhir = "MenhirInterpreter" (* Generation scheme doing checks and failing at runtime, or not ... *) let safe = false module Codeconsing (S : Synthesis.S) (R : Recovery.S with module G = S.G) : sig Step 1 : record all definitions val record_item : R.item -> unit type in...
null
https://raw.githubusercontent.com/ocaml/merlin/e576bc75f11323ec8489d2e58a701264f5a7fe0e/src/ocaml/preprocess/recover/emitter.ml
ocaml
Generation scheme doing checks and failing at runtime, or not ... Return counter
open MenhirSdk.Cmly_api open Utils let menhir = "MenhirInterpreter" let safe = false module Codeconsing (S : Synthesis.S) (R : Recovery.S with module G = S.G) : sig Step 1 : record all definitions val record_item : R.item -> unit type instr = | Nil | Cons of instr S.paction * instr | Ref of int r...
73e3dfc693a6c2c2bbbcf68427911c8066dcc7def1558c14c3ca6c1a66bf0656
ksaveljev/yampa-2048
Rendering.hs
module Rendering (drawBoard) where import Graphics.Gloss import GameModel import Types rowHeight :: Float rowHeight = 100 tilePrecision :: Int tilePrecision = 10 tileS :: Float tileS = 90 tileRoundness :: Float tileRoundness = 4 textScale :: Float textScale = 0.2 tileBackColor :: Color tileBackColor = makeColor...
null
https://raw.githubusercontent.com/ksaveljev/yampa-2048/c436e59cd6de3ef024f4f8cf9ddfdef9facd5529/src/Rendering.hs
haskell
Takes x-offset and tile and draws the tile itself | Draw current board representation depending on the status of the game. All tiles will be drawn at all tiles and game over message is drawn onto the game board when game status is GameOver original game. The rest of the numbers should be assigned some good TODO: ...
module Rendering (drawBoard) where import Graphics.Gloss import GameModel import Types rowHeight :: Float rowHeight = 100 tilePrecision :: Int tilePrecision = 10 tileS :: Float tileS = 90 tileRoundness :: Float tileRoundness = 4 textScale :: Float textScale = 0.2 tileBackColor :: Color tileBackColor = makeColor...
b78faed7a1e000c3e5fd8144893bd7a4daa7ec0532d670858074ac5445a32ed5
ddssff/refact-global-hse
ModuleInfo.hs
# LANGUAGE CPP , DeriveDataTypeable , DeriveFunctor , FlexibleInstances , PackageImports # # LANGUAGE ScopedTypeVariables , StandaloneDeriving , TemplateHaskell , TypeFamilies # {-# OPTIONS -Wall -fno-warn-type-defaults #-} module Refactor.ModuleInfo ( ModuleInfo(..) , addScope , unScope , exactPrint' ...
null
https://raw.githubusercontent.com/ddssff/refact-global-hse/519a017009cae8aa1a3db1b46eb560d76bd9895d/src/Refactor/ModuleInfo.hs
haskell
# OPTIONS -Wall -fno-warn-type-defaults # Pretty, (dropAnn) , moduleName' | A top symbol is either one returned by topDeclSymbols or a reference to λ> getTopSymbols i | Given a module name and a function that specifies where a module 's declarations should be moved to , compute a new set of modules reflect...
# LANGUAGE CPP , DeriveDataTypeable , DeriveFunctor , FlexibleInstances , PackageImports # # LANGUAGE ScopedTypeVariables , StandaloneDeriving , TemplateHaskell , TypeFamilies # module Refactor.ModuleInfo ( ModuleInfo(..) , addScope , unScope , exactPrint' , putModuleDecls , putNewModules ,...
3866e7c1df03b01892b6e38c07c76c945e420e7778976eca92cbfcfbbb214e10
javgh/bridgewalker
Config.hs
module Config ( readConfig , BridgewalkerConfig(..) , BridgewalkerHandles(..) ) where import Control.Applicative import Control.Concurrent import Control.Monad.Error import Control.Watchdog import Database.PostgreSQL.Simple import Data.ConfigFile import Network.BitcoinRPC import Network.BitcoinRPC.Even...
null
https://raw.githubusercontent.com/javgh/bridgewalker/ec5a62e6ebf36e52b98996a00a7d6042cc22ead7/src/Config.hs
haskell
module Config ( readConfig , BridgewalkerConfig(..) , BridgewalkerHandles(..) ) where import Control.Applicative import Control.Concurrent import Control.Monad.Error import Control.Watchdog import Database.PostgreSQL.Simple import Data.ConfigFile import Network.BitcoinRPC import Network.BitcoinRPC.Even...
b007c21f74eb818c88dc5d73fc84ce680c125237c101bfe9a413281db38da38c
MLstate/opalang
terminal.ml
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/terminal.ml
ocaml
depends
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
1301b42a02d15a85d05ea45b7b33a5cb02d7e44edf4ccb7fa11f33861cc2dd93
basho/basho_bench
basho_bench_app.erl
%% ------------------------------------------------------------------- %% %% basho_bench: Benchmarking Suite %% Copyright ( c ) 2009 - 2010 Basho Techonologies %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License...
null
https://raw.githubusercontent.com/basho/basho_bench/aa66398bb6a91645dbb97e91a236f3cdcd1f188f/src/basho_bench_app.erl
erlang
------------------------------------------------------------------- basho_bench: Benchmarking Suite Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the spe...
Copyright ( c ) 2009 - 2010 Basho Techonologies This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(basho_bench_app). -beh...
ac2332399be6b9e03e013a37a7fdff74f0deca884250fc92e0557ec503c5fa4a
zhangchiqing/beginner-friendly-haskell-for-web-development
Strings.hs
module Data.Strings where import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import Data.String.Conversions (cs) import qualified Data.Text as T import qualified Data.Text.Lazy as TL -- from String stringToByteString :: String -> B.ByteString stringToByteString = cs stringToLazyByteStr...
null
https://raw.githubusercontent.com/zhangchiqing/beginner-friendly-haskell-for-web-development/70a620c76f0a08dfb2caa8788c7c9dfa801122e9/a-simple-http-service/src/Data/Strings.hs
haskell
from String fromByteString fromLazyByteString fromText fromLazyText Show
module Data.Strings where import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import Data.String.Conversions (cs) import qualified Data.Text as T import qualified Data.Text.Lazy as TL stringToByteString :: String -> B.ByteString stringToByteString = cs stringToLazyByteString :: String -...
6dee820004ce0f6245579340099100b1dad797f94bf58494cfa584b3bb6b309f
s3rius/brainbreak
Main.hs
module Main where import CLI import Interpreter.REPL import Lib import MainOptions import Options main :: IO () main = runCommand $ \opts args -> case (input opts, output opts) of ("", "") -> startREPL (inFile, "") -> runFile inFile ...
null
https://raw.githubusercontent.com/s3rius/brainbreak/bee6439ce4f30318980c3d19cc8cfdc3b8eefbce/app/Main.hs
haskell
module Main where import CLI import Interpreter.REPL import Lib import MainOptions import Options main :: IO () main = runCommand $ \opts args -> case (input opts, output opts) of ("", "") -> startREPL (inFile, "") -> runFile inFile ...
1e4f7024012f737b1f1e7c114033bc5c39265b38172d7f21b02b9f55827eabdb
40ants/cl-hamcrest
ci.lisp
(defpackage #:hamcrest/ci (:use #:cl) (:import-from #:40ants-ci/workflow #:defworkflow) (:import-from #:40ants-ci/jobs/linter #:linter) (:import-from #:40ants-ci/jobs/run-tests #:run-tests) (:import-from #:40ants-ci/jobs/docs #:build-docs)) (in-p...
null
https://raw.githubusercontent.com/40ants/cl-hamcrest/9abb4978271907e11c21411ba350b0d6d7d9cb12/src/ci.lisp
lisp
(defpackage #:hamcrest/ci (:use #:cl) (:import-from #:40ants-ci/workflow #:defworkflow) (:import-from #:40ants-ci/jobs/linter #:linter) (:import-from #:40ants-ci/jobs/run-tests #:run-tests) (:import-from #:40ants-ci/jobs/docs #:build-docs)) (in-p...
76d2ae9206eeab7cce968ac6d65d1004d6267b4c6f11e10f3a6f7bf7e9db08db
willtim/Atavachron
Repository.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # # OPTIONS_GHC -fno - warn - orphans # | A layer on top of the Store abstraction which provides functions for putting and getting objects o...
null
https://raw.githubusercontent.com/willtim/Atavachron/bbf9a93eac0e096ee4595e23067c912af865601e/src/Atavachron/Repository.hs
haskell
# LANGUAGE OverloadedStrings # * Types * Functions | Represents a remote repository used to backup files to. A repository must be initialised before use. ^ The repository URL ^ The Store implementation to use. ^ The master key used to decrypt the manifest. ^ The metadata needed for encoding/decoding chunks. ne...
# LANGUAGE DeriveGeneric # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # # OPTIONS_GHC -fno - warn - orphans # | A layer on top of the Store abstraction which provides functions for putting and getting objects of specific types , e.g. Chunks and ...
ff109b3c8a21bed3a787adeab6deee675497e1f269d9037d837c134486611e85
jeffshrager/biobike
fasta.lisp
-*- Package : bioutils ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*- (in-package :bioutils) ;;; +=========================================================================+ | Copyright ( c ) 2002 , 2003 , 2004 JP , , | ;;; | ...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Bioutils/fasta.lisp
lisp
mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*- +=========================================================================+ | | | Permission is hereby granted, free of charge, to any person obtaining | | a copy of this software and as...
(in-package :bioutils) | Copyright ( c ) 2002 , 2003 , 2004 JP , , | | " Software " ) , to deal in the Software without restriction , including | | distribute , sublicense , and/or sell copies of the Software , and to | | permit persons to whom the Software is furnished to do so , subject ...
51b2dfaa10d68c7506a92beab970cad23ec2a1515af3334f016c65e1f31b7466
kazu-yamamoto/hhp
BrowseSpec.hs
module BrowseSpec where import Test.Hspec import Dir import Hhp import Hhp.Cradle spec :: Spec spec = do describe "browseModule" $ do it "lists up symbols in the module" $ do cradle <- findCradle syms <- lines <$> browseModule defaultOptions cradle "Data.Map" syms `sh...
null
https://raw.githubusercontent.com/kazu-yamamoto/hhp/81fcf5753cce716d37644b713f46fdd177d02de4/test/BrowseSpec.hs
haskell
module BrowseSpec where import Test.Hspec import Dir import Hhp import Hhp.Cradle spec :: Spec spec = do describe "browseModule" $ do it "lists up symbols in the module" $ do cradle <- findCradle syms <- lines <$> browseModule defaultOptions cradle "Data.Map" syms `sh...
ad97db94c676cdbc4e78a91fc31d01933f997ba8fdd6365078c145b997551829
avsm/eeww
stringLabels.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/avsm/eeww/4d65720b5dd51376842ffe5c8c220d5329c1dc10/boot/ocaml/stdlib/stringLabels.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 * Strings . A string [ s ] of length [ n ] is an indexable and immutable sequence of [ n ] ...
04204d95d34f32960aa7d016c5c789578413ffe0405c2d03bb4cc6db9861632f
mikera/core.matrix
operators.clj
(ns clojure.core.matrix.operators "Namespace for core.matrix operators. These operators provide convenient notation for common array operations (e.g. +, *, -=) that replace equivalent functions in clojure.core and operate on whole arrays at once. Behaviour for numerical scalar values remians the same as ...
null
https://raw.githubusercontent.com/mikera/core.matrix/0a35f6e3d6d2335cb56f6f3e5744bfa1dd0390aa/src/main/clojure/clojure/core/matrix/operators.clj
clojure
===================================================================== this computes the reciprocal (cond (odd? (count bindings)) (error "Summation requires an even number of forms in binding vector") (seq more) `(Σ [~sym ~vals] (Σ [~@more] ~exp)) :else `(reduce m/add (map (fn [i#] (let [~sym i#...
(ns clojure.core.matrix.operators "Namespace for core.matrix operators. These operators provide convenient notation for common array operations (e.g. +, *, -=) that replace equivalent functions in clojure.core and operate on whole arrays at once. Behaviour for numerical scalar values remians the same as ...
302f39bb31bdd862099dc4d46153b2de8b6662e41d24191e72ebb58295c363a5
thautwarm/RBNF.hs
TargetGen.hs
module RBNF.BackEnds.TargetGen where import RBNF.BackEnds.Pyrrha import RBNF.BackEnds.Josta import RBNF.IRs.IRTrans import RBNF.IRs.Marisa import Data.Text.Prettyprint.Doc class BackEnd a data PythonBackEnd = PythonBackEnd data JuliaBackEnd = JuliaBackEnd instance BackEnd PythonBackEnd instance BackEnd JuliaBackEnd ...
null
https://raw.githubusercontent.com/thautwarm/RBNF.hs/c95838e68d5121b9e9661cc726cd1752345b3f53/src/RBNF/BackEnds/TargetGen.hs
haskell
module RBNF.BackEnds.TargetGen where import RBNF.BackEnds.Pyrrha import RBNF.BackEnds.Josta import RBNF.IRs.IRTrans import RBNF.IRs.Marisa import Data.Text.Prettyprint.Doc class BackEnd a data PythonBackEnd = PythonBackEnd data JuliaBackEnd = JuliaBackEnd instance BackEnd PythonBackEnd instance BackEnd JuliaBackEnd ...
342c0ce91c03479c94b16ae390e0a6a6f6e465167ff7d828236e44746fb9224d
jeffshrager/biobike
ajax-server.lisp
(in-package :com.gigamonkeys.ajax) ;; TODO: deal with fact that server sends the response headers (with a 200 status ) first but can subsequentry time out an send an HTTP 500 ;; body which the client sees as just some xml. Maybe just make the ;; timeout very long (infinite). (defvar *channel* nil) (defvar *channels...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/ThirdParty/monkeylib/ajax/ajax-server.lisp
lisp
TODO: deal with fact that server sends the response headers (with a body which the client sees as just some xml. Maybe just make the timeout very long (infinite). if you recompile this file you get screwed if the hash table doesn't get filled in again because you don't restart the ajax server... this is an attemp...
(in-package :com.gigamonkeys.ajax) 200 status ) first but can subsequentry time out an send an HTTP 500 (defvar *channel* nil) (defvar *channels-lock* (mp:make-process-lock)) (defvar *newest-channel* nil) (defvar *channels* (make-hash-table :test #'equal)) (defvar *timer* (make-timer)) (defvar *generators* (make-ha...
241531d7c05c4d9000ff08c207e22c1634e6b0596e2d0e89f38f3c78b4596141
Jannis/om-next-kanban-demo
users.cljs
(ns kanban.parsing.users (:require [om.next :as om] [kanban.reconciler :refer [mutate read]])) (defmethod read :users [{:keys [state query]} key _] (let [st @state] {:value (om/db->tree query (get st key) st)}))
null
https://raw.githubusercontent.com/Jannis/om-next-kanban-demo/84719bfb161d82f1d4405e263f258730277c7783/src/kanban/parsing/users.cljs
clojure
(ns kanban.parsing.users (:require [om.next :as om] [kanban.reconciler :refer [mutate read]])) (defmethod read :users [{:keys [state query]} key _] (let [st @state] {:value (om/db->tree query (get st key) st)}))
0dc7558706dbbfeebde237eb39cebbb4fe8a6a0e272a7075ccfcad23d1c78ae4
conal/Fran
Editor2.hs
Curve editor , version 2 . Adds visual feedback for point picking . module Editor2 ( XPoint, renderXPoint, editXPoint, editXPointTest , pointSize, grabDistance, graphPaper, whiteIm , renderCurve, editCurve, editor, main ) where import Editor1 hiding (renderCurv...
null
https://raw.githubusercontent.com/conal/Fran/a113693cfab23f9ac9704cfee9c610c5edc13d9d/demos/CurveEditor/Editor2.hs
haskell
A "excitable point": position and whether excited. The looks of an excitable point. Green when excited, red when not. to be fixed to understand weak pair.) brighter (5*wiggle) red colorHSL colorRGB256 0 255 0 -- dark green Test: tracks mouse position and left button state closeEnough. Track mouse whi...
Curve editor , version 2 . Adds visual feedback for point picking . module Editor2 ( XPoint, renderXPoint, editXPoint, editXPointTest , pointSize, grabDistance, graphPaper, whiteIm , renderCurve, editCurve, editor, main ) where import Editor1 hiding (renderCurv...
c1d6c33bec10ee36193d9ebcfeccc1cf14be25040c21a97d38401ee7c32f9fe9
nuscr/nuscr
pragma.ml
open! Base type t = | NestedProtocols | ShowPragmas | PrintUsage | RefinementTypes | SenderValidateRefinements | ReceiverValidateRefinements | ValidateRefinementSatisfiability | ValidateRefinementProgress [@@deriving show] let pragma_of_string str : t = match str with | "ShowPragmas" -> ShowPragma...
null
https://raw.githubusercontent.com/nuscr/nuscr/7f350b978712dc639620f05c8e51ec261691f7cf/lib/utils/pragma.ml
ocaml
open! Base type t = | NestedProtocols | ShowPragmas | PrintUsage | RefinementTypes | SenderValidateRefinements | ReceiverValidateRefinements | ValidateRefinementSatisfiability | ValidateRefinementProgress [@@deriving show] let pragma_of_string str : t = match str with | "ShowPragmas" -> ShowPragma...
cfd5fce9ce7a2b35d98b81f2877088f15999adce65aac3e05ee613d4015d2e27
SimonJF/monitored-session-erlang
monitor_gen.erl
-module(monitor_gen). -compile(export_all). -include("monitor_records.hrl"). %%%%%%%% %%% Top-level generation functions %%%%%%%% print_fsms(NestedFSMs) -> NestedFSMList = orddict:to_list(NestedFSMs), lists:foreach(fun({ID, FSM}) -> io:format("FSM ID: ~p~n", [ID]), States =...
null
https://raw.githubusercontent.com/SimonJF/monitored-session-erlang/5ec76f327d3d2da4050d4c5a468ac343207f4521/src/monitor/monitor_gen.erl
erlang
Top-level generation functions io:format("~p: ~w~n", [S, sets:to_list(TSet)]), print_fsm(States, Transitions), Create an outer monitor gen state. Create the start state Various monitor errors Transition Construction Functions par_state(NestedFSMIDs) -> {par_state, NestedFSMIDs}. Internal Monitor Generation...
-module(monitor_gen). -compile(export_all). -include("monitor_records.hrl"). print_fsms(NestedFSMs) -> NestedFSMList = orddict:to_list(NestedFSMs), lists:foreach(fun({ID, FSM}) -> io:format("FSM ID: ~p~n", [ID]), States = FSM#monitor_gen_state.states, Tr...
2c3fd83a205fc74031eee6f9e048562a2121392e6f0c4782f5e3eb81bb64504f
PataphysicalSociety/soupault
template.ml
open Soupault_common open Jingoo type t = Jg_template.Loaded.t let rec jingoo_of_json j = match j with | `O o -> List.map (fun (k, v) -> k, jingoo_of_json v) o |> Jg_types.box_obj | `A a -> List.map jingoo_of_json a |> Jg_types.box_list | `String s -> Jg_types.box_string s | `Bool b -> Jg_types.box_bool b ...
null
https://raw.githubusercontent.com/PataphysicalSociety/soupault/e9aa46af54933d0f4b3c2de257cf40dac708bf79/src/template.ml
ocaml
Jingoo incorrectly does not expose its parse error exception in the module interface, so we have to use a catch-all approach here for now.
open Soupault_common open Jingoo type t = Jg_template.Loaded.t let rec jingoo_of_json j = match j with | `O o -> List.map (fun (k, v) -> k, jingoo_of_json v) o |> Jg_types.box_obj | `A a -> List.map jingoo_of_json a |> Jg_types.box_list | `String s -> Jg_types.box_string s | `Bool b -> Jg_types.box_bool b ...
7e39aaec0693c70f7965a61e83b4777c2735815518fada5ca91f018effdd59ec
kazzmir/master-of-magic
optParse.mli
* optParse - Functions for parsing command line arguments . * Copyright ( C ) 2004 * * Heavily influenced by the optparse.py module from the Python * standard library , but with lots of adaptation to the ' Ocaml Way ' * * * This library is free software ; you can redistribute it and/or ...
null
https://raw.githubusercontent.com/kazzmir/master-of-magic/830bfd1c549a5ac7370fa6a72bb06be5d3435fa0/lib/extlib-1.5/optParse.mli
ocaml
* Modules for GNU [getopt(3)]-style command line parsing. * This module contains the basic functions and types for defining new option types and accessing the values of options. * [No_value] gets raised by {!OptParse.Opt.get} when an option value is not available. * When an option wants to display a usage ...
* optParse - Functions for parsing command line arguments . * Copyright ( C ) 2004 * * Heavily influenced by the optparse.py module from the Python * standard library , but with lots of adaptation to the ' Ocaml Way ' * * * This library is free software ; you can redistribute it and/or ...
98a8ebc86e0b993e40dc4c946ed04993534df5e582dba12837da30c60617c925
chovencorp/erlangzmq
erlangzmq_acceptance_router_with_dealer.erl
@copyright 2016 Choven Corp. %% This file is part of erlangzmq . %% erlangzmq is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or %% (at your option) any later v...
null
https://raw.githubusercontent.com/chovencorp/erlangzmq/2be5c3b36dd78b010d1790a8f74ae2e823f5a424/test/erlangzmq_acceptance_router_with_dealer.erl
erlang
(at your option) any later version. erlangzmq is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. wait client sockets to be estabilish...
@copyright 2016 Choven Corp. This file is part of erlangzmq . erlangzmq is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of ...
7ea7253e85f88bff1ec80443246d811dc4ad12d44a7999482f5ea44cec822c11
unnohideyuki/bunny
sample324.hs
main = do let (a, b, c) = (1, 2, 3) print a print b print c
null
https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample324.hs
haskell
main = do let (a, b, c) = (1, 2, 3) print a print b print c
3238271c1736aa71c62a89b651d8750fd816ed83e33de1ecaad93b8a517f12e1
agda/agda
Abstract.hs
-- | Tools to manipulate patterns in abstract syntax in the TCM ( type checking monad ) . module Agda.TypeChecking.Patterns.Abstract where import Control.Monad.Except import qualified Data.List as List import Data.Void import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Abstract.Pattern import Agda.S...
null
https://raw.githubusercontent.com/agda/agda/f50c14d3a4e92ed695783e26dbe11ad1ad7b73f7/src/full/Agda/TypeChecking/Patterns/Abstract.hs
haskell
| Tools to manipulate patterns in abstract syntax | Expand literal integer pattern into suc/zero constructor patterns. | Expand away (deeply) all pattern synonyms in a pattern. Unfortunately, the more general type signature arising from a use of ‘postTraverseAPatternM’ and keep the type class ExpandPatte...
in the TCM ( type checking monad ) . module Agda.TypeChecking.Patterns.Abstract where import Control.Monad.Except import qualified Data.List as List import Data.Void import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Abstract.Pattern import Agda.Syntax.Abstract.Views import Agda.Syntax.Concrete (Fie...
1cae8ce838d244352b1f7fa595d7aa32ff7ad5b6720cf40f7ef79e4a30fd3312
mpickering/apply-refact
Import2.hs
import A(Foo) ; import A
null
https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Import2.hs
haskell
import A(Foo) ; import A
5f99db1ed9334d9c58ce7a647172b78627fb8b8838e190860e39a41e2c38569c
tolbrino/hotwheels
janus_acceptor.erl
Copyright ( c ) 2009 Oortle , Inc %%% 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, modify, merge, ...
null
https://raw.githubusercontent.com/tolbrino/hotwheels/8dca95a1f8e80e9d09c39158577588b40663a313/src/janus_acceptor.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation including without limitation the rights to use, copy, modify, merge, subject to the following conditions: The above copyright notice and this permission notice shall be included OR IMPLIE...
Copyright ( c ) 2009 Oortle , Inc files ( the " Software " ) , to deal in the Software without restriction , publish , distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do so , in all copies or substantial portions of the Software . ...
c50ebfc03c46f338c64525792116c623beecc59a8959a3e9c271ef5fb6d0741f
johnlawrenceaspden/hobby-code
u.clj
;; LOAD ME WITH ;; (load-file "/home/likestream/hobby-code/u.clj") ;; This file conditions a repl in various ways that I do all the time. (ns u) (require 'clojure.pprint) ;; This file conditions a repl in various ways that I do all the time. ;; Some of clojure's extra namespaces are so useful at the REPL that I wa...
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/u.clj
clojure
LOAD ME WITH (load-file "/home/likestream/hobby-code/u.clj") This file conditions a repl in various ways that I do all the time. This file conditions a repl in various ways that I do all the time. Some of clojure's extra namespaces are so useful at the REPL that I want them to have shorter names, i.e. I want to b...
(ns u) (require 'clojure.pprint) (defn sn[] "require clojure.contrib.trace as cct, etc" (require '(clojure [test :as ct] [inspector :as ci] [repl :as cr] [pprint :as pp] [string :as cs] )) (require '[clo...
b9a108f5d86886d0eb920c898fec4a864bef3f5d7ca51ce3a52def2b05c3b639
ltoth/unison
trace.ml
Unison file synchronizer : src / ubase / trace.ml Copyright 1999 - 2010 , 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 3 of the License , or ( at yo...
null
https://raw.githubusercontent.com/ltoth/unison/e763510165e3d93c5140a4c5f2ea0dcbf5825a0c/ubase/trace.ml
ocaml
---------------------------------------------------------------------- Choosing where messages go ---------------------------------------------------------------------- Debugging messages tracing labeled "" is enabled if anything is '-debug verbose' enables everything '-debug all+' likewise '-debug all' ...
Unison file synchronizer : src / ubase / trace.ml Copyright 1999 - 2010 , 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 3 of the License , or ( at yo...
dd5d7aff30807c3c13ff343646b497a9e55c1ebaf2c2338fb42cafcab77a38cc
sondresl/AdventOfCode
Day08.hs
module Day08 where import Control.Lens import Lib import Data.List.Extra import Text.ParserCombinators.Parsec import Data.Set (Set) import qualified Data.Set as Set import Linear type Screen = Set Point data Instruction = Rect Int Int | Col Int Int | Row Int Int deriving Show run :: Screen -> Instruction ->...
null
https://raw.githubusercontent.com/sondresl/AdventOfCode/224cf59354c7c1c31821f36884fe8909c5fdf9a6/2016/Haskell/src/Day08.hs
haskell
module Day08 where import Control.Lens import Lib import Data.List.Extra import Text.ParserCombinators.Parsec import Data.Set (Set) import qualified Data.Set as Set import Linear type Screen = Set Point data Instruction = Rect Int Int | Col Int Int | Row Int Int deriving Show run :: Screen -> Instruction ->...
97a837cba8d8b4d1e0f9e9da9544a2dff88888b8b8134436eee4af7a82da88ca
justinmeiners/exercises
2_21.scm
(define (square-list items) (if (null? items) items (cons (* (car items) (car items)) (square-list (cdr items))) )) (define (square-list2 items) (map (lambda (x) (* x x)) items)) (display (square-list (list 1 2 3 4))) (newline) (display (square-list2 (list 4 5 6 7)))
null
https://raw.githubusercontent.com/justinmeiners/exercises/9491bc16925eae12e048ccd3f424b870ebdc73aa/sicp/2/2_21.scm
scheme
(define (square-list items) (if (null? items) items (cons (* (car items) (car items)) (square-list (cdr items))) )) (define (square-list2 items) (map (lambda (x) (* x x)) items)) (display (square-list (list 1 2 3 4))) (newline) (display (square-list2 (list 4 5 6 7)))
c5dc3798a7f89becf142d2a420bd1315c4d32199233ef488ab7e9610d0dc4774
REMath/mit_16.399
fixpoint_printing_iterates.ml
(* fixpoint.ml *) open Cenv (* lfp x c f : iterative computation of the c-least fixpoint of f *) (* c-greater than or equal to the prefixpoint x (f(x) >= x) *) ; ... ; U f(xn ) ; ... ; xl where xl c xl U f(xl ) let lfp x c f = let rec iterate n x = print_string "iterate ";print_int n;print_string "...
null
https://raw.githubusercontent.com/REMath/mit_16.399/3f395d6a9dfa1ed232d307c3c542df3dbd5b614a/project/Collecting-Interpreter/fixpoint_printing_iterates.ml
ocaml
fixpoint.ml lfp x c f : iterative computation of the c-least fixpoint of f c-greater than or equal to the prefixpoint x (f(x) >= x)
open Cenv ; ... ; U f(xn ) ; ... ; xl where xl c xl U f(xl ) let lfp x c f = let rec iterate n x = print_string "iterate ";print_int n;print_string " = ";print x; print_newline (); let x' = (join x (f (copy x))) in (if (c x' x) then (print_string "fixpoint = ";print x'; ...
74a47a4a6c4e2fdcb5efdc5aeba65c28634e822c2bbd639334cce119b7759346
serefayar/ayatori
core.clj
(ns ayatori.lra.core (:require [clojure.string :as string] [java-time :as jt] [ayatori.lra.db :as db] [malli.core :as m] [exoscale.ex :as ex] [ayatori.lra-domain.interface :as domain] [clojure.core.async :as async]) (:import (clojure.core.async.impl.channels ManyToManyChannel))) (def AsyncChan...
null
https://raw.githubusercontent.com/serefayar/ayatori/4ae80d64439850b7e515526554d9ff29ee078fc9/components/lra/src/ayatori/lra/core.clj
clojure
check an instance of for now else else
(ns ayatori.lra.core (:require [clojure.string :as string] [java-time :as jt] [ayatori.lra.db :as db] [malli.core :as m] [exoscale.ex :as ex] [ayatori.lra-domain.interface :as domain] [clojure.core.async :as async]) (:import (clojure.core.async.impl.channels ManyToManyChannel))) (def AsyncChan...
88c22980132659dcea4c73603848ceb3d9624977b950f53f87db45cc5a9982ed
eneroth/fulcro-template-aleph
user.cljs
(ns poc.session.user (:require [poc.session.db :as db] [taoensso.timbre :as timbre :refer [spy info]] [poc.core.router :as router] [com.fulcrologic.fulcro.ui-state-machines :as uism :refer [defstatemachine]])) (defn handle-login [{::uism/keys [event-data] :as env}] (info "Handl...
null
https://raw.githubusercontent.com/eneroth/fulcro-template-aleph/ed614f192cee63ee56fcbb325d92ea24a3a95a1f/src/poc/session/user.cljs
clojure
------------------------------------------------------------------------ INITIAL CHECKING EXISTING SESSION CHECKING CREDENTIALS LOGGED OUT SERVER FAILED
(ns poc.session.user (:require [poc.session.db :as db] [taoensso.timbre :as timbre :refer [spy info]] [poc.core.router :as router] [com.fulcrologic.fulcro.ui-state-machines :as uism :refer [defstatemachine]])) (defn handle-login [{::uism/keys [event-data] :as env}] (info "Handl...
00ca7a2df2ca4101f648b4428eebb9c99b7cc1bb84e787f990c87f779f13d496
jrh13/hol-light
tobias.ml
prioritize_real();; let rational = new_definition `rational(r) <=> ?p q. ~(q = 0) /\ (abs(r) = &p / &q)`;; horizon := 1;; let TOBIAS = thm `; let f be real->real; assume f(&0) = &1 [1]; assume !x y. f(x + y + &1) = f x + f y [2]; let r be real; assume rational r [3]; thus f r = r + &1 proof set g...
null
https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/miz3/Samples/tobias.ml
ocaml
prioritize_real();; let rational = new_definition `rational(r) <=> ?p q. ~(q = 0) /\ (abs(r) = &p / &q)`;; horizon := 1;; let TOBIAS = thm `; let f be real->real; assume f(&0) = &1 [1]; assume !x y. f(x + y + &1) = f x + f y [2]; let r be real; assume rational r [3]; thus f r = r + &1 proof set g...
65ef486f5f72c2f868ba01d2a9b037e4762fe81a4441360f0b33a543422a0516
kbaird/consensus
consensus_utils.erl
-module(consensus_utils). %% API exports -export([ binary_to_char/1, powerset/1, uniqueify/1 ]). -include("include/common.hrl"). -include("include/parties.hrl"). %%==================================================================== %% API functions %%=====================================================...
null
https://raw.githubusercontent.com/kbaird/consensus/37a8e1e502435c8537e5dd3d3dff23bec5b95e2f/src/consensus_utils.erl
erlang
API exports ==================================================================== API functions ==================================================================== ==================================================================== ====================================================================
-module(consensus_utils). -export([ binary_to_char/1, powerset/1, uniqueify/1 ]). -include("include/common.hrl"). -include("include/parties.hrl"). -spec binary_to_char(binary()) -> char(). binary_to_char(Bin) -> hd(binary_to_list(Bin)). powerset([]) -> [[]]; powerset([H|T]) -> PT = powerset(T), ...
a3feeb6a0764ad5e295e54c59cf820e7fbbf7f799f774dc4f3a4952e07c1a78d
mput/sicp-solutions
3_07.test.rkt
#lang racket (require rackunit rackunit/text-ui) (require (only-in "../solutions/3_07.rkt" make-accoutn make-joint)) (define tests (test-suite "Test for exercise 3_03" (test-case "Test for make-accoutn" (define acc (make-accoutn 100 'pass)) (define child-acc (make-joint acc 'pass 'child-p...
null
https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/tests/3_07.test.rkt
racket
#lang racket (require rackunit rackunit/text-ui) (require (only-in "../solutions/3_07.rkt" make-accoutn make-joint)) (define tests (test-suite "Test for exercise 3_03" (test-case "Test for make-accoutn" (define acc (make-accoutn 100 'pass)) (define child-acc (make-joint acc 'pass 'child-p...
bd74b9f185d2f14ffdbbbeb0e3810d64808b093f329aaa5430dcee21dce1f96b
atlas-engineer/nyxt
spell-check.lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :nyxt/tests) (define-test toggle-spell-check-mode () (let ((buffer (make-instance 'modable-buffer))) (with-current-buffer buffer (assert-true (enable-modes* 'nyxt/spell-check-mode:spell-check-mode bu...
null
https://raw.githubusercontent.com/atlas-engineer/nyxt/65a9aa568b16c109281fa403a7c045b3b6d87025/tests/offline/mode/spell-check.lisp
lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :nyxt/tests) (define-test toggle-spell-check-mode () (let ((buffer (make-instance 'modable-buffer))) (with-current-buffer buffer (assert-true (enable-modes* 'nyxt/spell-check-mode:spell-check-mode bu...
f4056b6f95b7dc8600db212fc3d43f2cbca201d802d9651786321d5853eebfae
kamek-pf/ntfd
Weather.hs
module Stores.Weather ( Store(..) , Error(..) , WeatherClient ) where import Control.Concurrent.Async (mapConcurrently) import Control.Concurrent (newEmptyMVar, tryReadMVar, tryTakeMVar, putMVar, MVar) import Data.Aeson ((.=), object) import Data.Bifunctor (first) import Data.Text (Text) import Data.Te...
null
https://raw.githubusercontent.com/kamek-pf/ntfd/d297a59339b3310a62341ffa9c378180c578dbce/src/Stores/Weather.hs
haskell
| Query and update Weather data. | Initialize the store | Synchronize local data with the weather service. | Get a rendered version of the configured template | Get current temperature | Get forecast temperature | Get current description in the configured language | Get forecast description in the configured la...
module Stores.Weather ( Store(..) , Error(..) , WeatherClient ) where import Control.Concurrent.Async (mapConcurrently) import Control.Concurrent (newEmptyMVar, tryReadMVar, tryTakeMVar, putMVar, MVar) import Data.Aeson ((.=), object) import Data.Bifunctor (first) import Data.Text (Text) import Data.Te...
99cce8f86dcba5dbd94a55f33635cac0e26987e9b89656de21c44eb1534910b4
louispan/ghcjs-base-stub
Prim.hs
module GHCJS.Prim ( JSVal(..) , WouldBlockException(..) , JSException(..) , mkJSException , fromJSString , toJSString , toJSArray , fromJSArray , fromJSInt , toJSInt , isNull , isUndefined , jsNull , getProp , getProp' ) where import Data.Typeab...
null
https://raw.githubusercontent.com/louispan/ghcjs-base-stub/8eaee240c9af1a2290f4572a87528f3ddb3e9f12/src/GHCJS/Prim.hs
haskell
- START Shim-specific - END Shim-specific | Low-level conversion utilities for packages that cannot depend on ghcjs-base # INLINE getProp # # INLINE getProp' # | If a synchronous thread tries to do something that can only be done asynchronously, and the thread is set up to not continue asynchronously...
module GHCJS.Prim ( JSVal(..) , WouldBlockException(..) , JSException(..) , mkJSException , fromJSString , toJSString , toJSArray , fromJSArray , fromJSInt , toJSInt , isNull , isUndefined , jsNull , getProp , getProp' ) where import Data.Typeab...
f5028642dedacdab2d3fa6bd5a50746410475dc7cf493af417cf044e072173a4
korya/efuns
conv_event.mli
(***********************************************************************) (* *) xlib for (* *) Fabrice Le Fessant , projet Para / SOR , INRIA Rocq...
null
https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/xlib/conv_event.mli
ocaml
********************************************************************* ...
xlib for Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt Copyright 1998 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . val debug : bool ref val eventNum : string -> int val serial...
d302858544742bc4f6dcfe3f7b358a6a60c9b38e642015586b64f6ef7767e36f
elaforge/fast-tags
Tag.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE CPP # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternGuards # # LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # {-# OPTIONS_GHC -funbox-strict-fields #-} module FastTags.Tag ( -- * types Tag...
null
https://raw.githubusercontent.com/elaforge/fast-tags/f5bbe4fc05db9d9f14df97e2feb79d2df81911e6/src/FastTags/Tag.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # # OPTIONS_GHC -funbox-strict-fields # * types * process * util for testing * types ^ parent of this tag; parent can only be of type Class, Data or Family matches, vim will visit them in order, so this should be in the order of interest. We rely that Ty...
# LANGUAGE CPP # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternGuards # # LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # module FastTags.Tag ( TagVal(..) , Type(..) , Tag(..) , Pos(..) , SrcPos(..) , UnstrippedTokens(..) , processFile , qua...
2ca8fbd6ad8571bb666f2fa81f0e56538d232eb64e80e227d0d458330963c3a4
threatgrid/naga
pabu.cljc
(ns naga.lang.pabu "Implements Pabu, which is a Prolog-like language for Naga. Parses code and returns Naga rules." (:require [zuko.schema :refer [Axiom Triple EPVPattern Pattern FilterPattern]] [naga.schema.structs :as structs :refer #?(:clj [Program] ...
null
https://raw.githubusercontent.com/threatgrid/naga/7371c38096d3490d33fecb896cfe1f28fb5faf5b/src/naga/lang/pabu.cljc
clojure
TODO: Multi-arity not yet supported a filter predicate. Wrap in extra vector for syntax purposes output
(ns naga.lang.pabu "Implements Pabu, which is a Prolog-like language for Naga. Parses code and returns Naga rules." (:require [zuko.schema :refer [Axiom Triple EPVPattern Pattern FilterPattern]] [naga.schema.structs :as structs :refer #?(:clj [Program] ...
8776d538dbcafba95a9faa3e9c8389218312bf6c8390817408bf933346bd94ae
Viasat/halite
test_type_check.clj
Copyright ( c ) 2022 Viasat , Inc. Licensed under the MIT license (ns com.viasat.halite.test-type-check (:require [clojure.test :refer :all] [com.viasat.halite.type-check :as type-check] [schema.core :as s] [schema.test :refer [validate-schemas]])) (set! *warn-on-reflection* ...
null
https://raw.githubusercontent.com/Viasat/halite/5a434fa2276f5f2654c4d91045595ae5bbc6580e/test/com/viasat/halite/test_type_check.clj
clojure
(run-tests)
Copyright ( c ) 2022 Viasat , Inc. Licensed under the MIT license (ns com.viasat.halite.test-type-check (:require [clojure.test :refer :all] [com.viasat.halite.type-check :as type-check] [schema.core :as s] [schema.test :refer [validate-schemas]])) (set! *warn-on-reflection* ...
49018425fc1eacf58868dabb7131659ef084edf7228bbd454d2177988fb65c3c
audreyt/openafp
OAMU.hs
module OpenAFP.Records.T.OAMU where import OpenAFP.Types import OpenAFP.Internals data T_OAMU = T_OAMU { t_oamu_Type :: !N1 ,t_oamu :: !NStr } deriving (Show, Typeable)
null
https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/T/OAMU.hs
haskell
module OpenAFP.Records.T.OAMU where import OpenAFP.Types import OpenAFP.Internals data T_OAMU = T_OAMU { t_oamu_Type :: !N1 ,t_oamu :: !NStr } deriving (Show, Typeable)
d4c5df2383656f88ade0d11a8f4e6662a76bafe56f364efa16af8e32f9e4d403
squirrel-prover/squirrel-prover
smt.stub.ml
let literals_unsat ~slow table system evars msg_atoms trace_lits axioms = print_endline "smt tactic unavailable:"; print_endline "Squirrel was compiled without the Why3 API support"; print_endline "(the why3 package may be missing from your setup)"; false
null
https://raw.githubusercontent.com/squirrel-prover/squirrel-prover/d25b6dab570ea0e99915059a67599fd3a38caa8b/src/smt.stub.ml
ocaml
let literals_unsat ~slow table system evars msg_atoms trace_lits axioms = print_endline "smt tactic unavailable:"; print_endline "Squirrel was compiled without the Why3 API support"; print_endline "(the why3 package may be missing from your setup)"; false
2fdbc8960237cf8218cb2bd3acfa2cdc441b482ccc6881ab87475d1802cdc0f5
JoelSanchez/ventas
i18n.clj
(ns ventas.entities.i18n (:require [clojure.spec.alpha :as spec] [clojure.test.check.generators :as gen] [slingshot.slingshot :refer [throw+]] [ventas.common.utils :as common.utils] [ventas.database :as db] [ventas.database.entity :as entity] [ventas.database.generators :as generators] [ventas...
null
https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/src/clj/ventas/entities/i18n.clj
clojure
(ns ventas.entities.i18n (:require [clojure.spec.alpha :as spec] [clojure.test.check.generators :as gen] [slingshot.slingshot :refer [throw+]] [ventas.common.utils :as common.utils] [ventas.database :as db] [ventas.database.entity :as entity] [ventas.database.generators :as generators] [ventas...
1c42e38a80f9c231ab69eb2cb16791ad57ddcde1ee2b803874d40a6bf5ef305e
exoscale/vinyl
sql.clj
(ns exoscale.vinyl.sql "Small facade for vinyl to perform simple SQL queries. See `list-query` for syntax details." (:require [exoscale.vinyl.store :as store] [instaparse.core :as insta])) (def ^:private ^:no-doc vinyl-statement "BNF SQL syntax for vinyl" (insta/parser " <statement> = se...
null
https://raw.githubusercontent.com/exoscale/vinyl/aed9094588f3c5ab9ea2868f9eebc05d2c19bba2/src/exoscale/vinyl/sql.clj
clojure
=> [:= :id 1] => [:matches :p [:= :id 1]]
(ns exoscale.vinyl.sql "Small facade for vinyl to perform simple SQL queries. See `list-query` for syntax details." (:require [exoscale.vinyl.store :as store] [instaparse.core :as insta])) (def ^:private ^:no-doc vinyl-statement "BNF SQL syntax for vinyl" (insta/parser " <statement> = se...
168664cb82c635111ca167a2605f82067c55d84410446043422babf4261b3fe1
bos/rwh
ValidFunctor.hs
{-- snippet Foo --} data Foo a = Foo a instance Functor Foo where fmap f (Foo a) = Foo (f a) {-- /snippet Foo --} {-- snippet Bar --} data Eq a => Bar a = Bar a instance Functor Bar where fmap f (Bar a) = Bar (f a) {-- /snippet Bar --}
null
https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch10/ValidFunctor.hs
haskell
- snippet Foo - - /snippet Foo - - snippet Bar - - /snippet Bar -
data Foo a = Foo a instance Functor Foo where fmap f (Foo a) = Foo (f a) data Eq a => Bar a = Bar a instance Functor Bar where fmap f (Bar a) = Bar (f a)
b7b9ce2312786beb19a21c59eace7cd63682bad3aa0efe6fbe4779afd7e188cd
kovasb/session
system.cljs
(ns session.system (:require [om.core :as om] [om.dom :as dom] [session.io :as io] [cljs.reader :as reader] [cljs.js :as cljs] [session.eval] [cljs-uuid-utils.core :as uuid])) (defn save [service-url app-state] (let [x (update-in @app-state [:loops] (fn [x] (mapv #(dissoc % :output) x...
null
https://raw.githubusercontent.com/kovasb/session/f14f182f8dfa0c33345bee71d880df8f3b9e744b/src/session/system.cljs
clojure
(println r)
(ns session.system (:require [om.core :as om] [om.dom :as dom] [session.io :as io] [cljs.reader :as reader] [cljs.js :as cljs] [session.eval] [cljs-uuid-utils.core :as uuid])) (defn save [service-url app-state] (let [x (update-in @app-state [:loops] (fn [x] (mapv #(dissoc % :output) x...
c94ca8e001eb686a98bce556505d5594c9408791d42bd9e1a485e31cdd58865c
ghcjs/ghcjs
t4474b.hs
{-# LANGUAGE BangPatterns #-} module Main where data Tree = Leaf !Int | Fork !Tree !Tree deriving Show fullTree 0 = Leaf 1 fullTree n = let t = fullTree (n - 1) in Fork t t flatListNaive (Leaf n) = [n] flatListNaive (Fork a b) = flatListNaive a ++ flatListNaive b flatListCons t = flat t [] where flat (Leaf n...
null
https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/perf/t4474b.hs
haskell
# LANGUAGE BangPatterns #
module Main where data Tree = Leaf !Int | Fork !Tree !Tree deriving Show fullTree 0 = Leaf 1 fullTree n = let t = fullTree (n - 1) in Fork t t flatListNaive (Leaf n) = [n] flatListNaive (Fork a b) = flatListNaive a ++ flatListNaive b flatListCons t = flat t [] where flat (Leaf n) ns = n : ns flat (Fork a...
ace358de16915cedf9f422ba4a9ba7ef15e399f97a5ba1a2818a3ee6862e5fdc
dundalek/solid-cljs
core.cljs
(ns todomvc.core ; (:require-macros [secretary.core :refer [defroute]]) (:require [goog.events :as events] [reagent.dom] [re-frame.core :as rf :refer [dispatch dispatch-sync]] ; [secretary.core :as secretary] These two are only required to make the compiler [todomvc...
null
https://raw.githubusercontent.com/dundalek/solid-cljs/1637b4668870093c59bd3ee54a4b979158b0a7a5/examples/todomvc/src/todomvc/core.cljs
clojure
(:require-macros [secretary.core :refer [defroute]]) [secretary.core :as secretary] load them (see docs/App-Structure.md) -- Debugging aids ---------------------------------------------------------- so that println writes to `console.log` Put an initial value into app-db. The event handler for `:initialise-db` c...
(ns todomvc.core (:require [goog.events :as events] [reagent.dom] [re-frame.core :as rf :refer [dispatch dispatch-sync]] These two are only required to make the compiler [todomvc.views] ["solid-js/web" :as solid-web]) (:import [goog History] [goog.history...
77225cc0ba16d65dc875d501c6d312a3ac3424a20f75b6fb2126fb425a25012c
fragnix/fragnix
QualifiedMethods.hs
# LANGUAGE TypeFamilies # module QualifiedMethods where import qualified ExportListWildcards as ExportListWildcards import qualified DataFamilies as DataFamilies import OtherClass data Rodor = Rodor x :: ExportListWildcards.Foo x = ExportListWildcards.Foo1 instance ExportListWildcards.Bar Rodor where x Rodor ...
null
https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/quick/QualifiedAssociates/QualifiedMethods.hs
haskell
# LANGUAGE TypeFamilies # module QualifiedMethods where import qualified ExportListWildcards as ExportListWildcards import qualified DataFamilies as DataFamilies import OtherClass data Rodor = Rodor x :: ExportListWildcards.Foo x = ExportListWildcards.Foo1 instance ExportListWildcards.Bar Rodor where x Rodor ...
605d73d4182dfa92f701b173dc1fed7f679e7a21e34c1e1b5d314ede703934c2
ekmett/unboxed
IntRep.hs
{-# Language DataKinds #-} module IntRep where import GHC.Types type Rep = 'IntRep
null
https://raw.githubusercontent.com/ekmett/unboxed/e4c6ca80fb8946b1abfe595ba1c36587a33931db/internal/IntRep.hs
haskell
# Language DataKinds #
module IntRep where import GHC.Types type Rep = 'IntRep
bf264028bf9387f6ad50e8f24df0a3d0b0b6d8bf4902e432e9dbf7e7292ef5c6
epgsql/epgsql
epgsql_cmd_describe_portal.erl
%% @doc Asks the server to provide description of portal's results columns %% %% ``` %% > Describe(PORTAL) %% < RowDescription | NoData %% ''' -module(epgsql_cmd_describe_portal). -behaviour(epgsql_command). -export([init/1, execute/2, handle_message/4]). -export_type([response/0]). -include("epgsql.hrl"). -include("p...
null
https://raw.githubusercontent.com/epgsql/epgsql/f811a09926892dbd1359afe44a9bfa8f6907b322/src/commands/epgsql_cmd_describe_portal.erl
erlang
@doc Asks the server to provide description of portal's results columns ``` > Describe(PORTAL) < RowDescription | NoData '''
-module(epgsql_cmd_describe_portal). -behaviour(epgsql_command). -export([init/1, execute/2, handle_message/4]). -export_type([response/0]). -include("epgsql.hrl"). -include("protocol.hrl"). -type response() :: {ok, [epgsql:column()]} | {error, epgsql:query_error()}. -record(desc_portal, {name :: iodata(), ...
03027621a6727422d80caecf1f6c83c85df2528280a014e478930dde873a3879
binghe/cl-net-snmp
parser.lisp
;;;; -*- Mode: Lisp -*- $ Id$ (in-package :asn.1) #+lispworks (eval-when (:compile-toplevel :load-toplevel :execute) (require "parsergen")) #+lispworks (macrolet ((define-parser (name syntax) `(parsergen:defparser ,name ,@syntax))) (define-parser asn.1-parser #.*asn.1-syntax*)) #-lispworks (macro...
null
https://raw.githubusercontent.com/binghe/cl-net-snmp/3cf053bce75734097f0d7e2245a53fa0c45f5e05/compiler/parser.lisp
lisp
-*- Mode: Lisp -*-
$ Id$ (in-package :asn.1) #+lispworks (eval-when (:compile-toplevel :load-toplevel :execute) (require "parsergen")) #+lispworks (macrolet ((define-parser (name syntax) `(parsergen:defparser ,name ,@syntax))) (define-parser asn.1-parser #.*asn.1-syntax*)) #-lispworks (macrolet ((define-parser (nam...
26333411409d77fdb80639c8c0d495e90fae56f0391245200eb940adb86fc0f9
jdreaver/amy
Subtyping.hs
# LANGUAGE TupleSections # module Amy.TypeCheck.Subtyping ( subtype , instantiate , articulateTyFunExist , freeTEVars ) where import Data.Foldable (for_) import Data.List (foldl', nub) import qualified Data.List.NonEmpty as NE import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import Data....
null
https://raw.githubusercontent.com/jdreaver/amy/a0c73f6c02e7d923f1d85c0de89f78dc204dae2f/library/Amy/TypeCheck/Subtyping.hs
haskell
Subtyping TODO: This logic was copy/pasted and modified from old unification code. This probably needs to be audited to make sure it is actually checking for subtyping in the correct order (that is, t1 is a subtype of t2) and we aren't accidentally switching things around. We only need fresh type variables for ...
# LANGUAGE TupleSections # module Amy.TypeCheck.Subtyping ( subtype , instantiate , articulateTyFunExist , freeTEVars ) where import Data.Foldable (for_) import Data.List (foldl', nub) import qualified Data.List.NonEmpty as NE import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import Data....
eddd03585ea2ddf77a069f90616067287dfcd8cbd6844801040b635a40433e8a
stanfordhaskell/cs43
site.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE FlexibleContexts # import Data.Monoid (mappend) import qualified Data.Set as S import Data.List (intercalate) import Control.Monad.State import Hakyll import Text.Pandoc.Options import Text.Pandoc.JSON import...
null
https://raw.githubusercontent.com/stanfordhaskell/cs43/8353da9e27336a7fe23488c3536e0dab4aaabfff/site.hs
haskell
# LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ tufte and custom css fonts ------------------------------------------------------------------------------ ----------------------------------------------------------------------------- This could be implement...
# LANGUAGE FlexibleContexts # import Data.Monoid (mappend) import qualified Data.Set as S import Data.List (intercalate) import Control.Monad.State import Hakyll import Text.Pandoc.Options import Text.Pandoc.JSON import Text.Pandoc.Walk (walk,...
1951eeae711ac95a704b04a643338665c809250003545bb5a85d0fda0a957a25
EveryTian/Haskell-Codewars
from-to-step-sequence-generator.hs
-- -to-step-sequence-generator module FromToStepGenerator where generator :: Integer -> Integer -> Integer -> [Integer] generator from to step | step == 0 = [] | from < to = [from, from + abs step .. to] | otherwise = [from, from - abs step .. to] where abs x = if x >= 0 then x else -x
null
https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/7kyu/from-to-step-sequence-generator.hs
haskell
-to-step-sequence-generator
module FromToStepGenerator where generator :: Integer -> Integer -> Integer -> [Integer] generator from to step | step == 0 = [] | from < to = [from, from + abs step .. to] | otherwise = [from, from - abs step .. to] where abs x = if x >= 0 then x else -x
942d4dbbf29c1ff2e04c3a12d1a21b07099fc4e002b092fb8e55a0d3a56c35a8
racket/errortrace
info.rkt
#lang info (define collection 'multi) (define deps '("errortrace-lib" "eli-tester" "rackunit-lib")) (define build-deps '("base" "racket-index" "compiler-lib" "at-exp-lib")) (define pkg-desc "tests for \"errortrace\"") (define pkg-authors '(mflatt robby f...
null
https://raw.githubusercontent.com/racket/errortrace/6e89c54a5f9de8b925ad668888aa241722e5bbfc/errortrace-test/info.rkt
racket
#lang info (define collection 'multi) (define deps '("errortrace-lib" "eli-tester" "rackunit-lib")) (define build-deps '("base" "racket-index" "compiler-lib" "at-exp-lib")) (define pkg-desc "tests for \"errortrace\"") (define pkg-authors '(mflatt robby f...
30c6f3c5d6de9125a1ad9338c3ad9eb7d36092769835f208f6ca8e08d2a38d4f
xapi-project/xen-api
pool_features.ml
( C ) 2006 - 2010 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LIC...
null
https://raw.githubusercontent.com/xapi-project/xen-api/fa6f118fb512a2c90159368a1a0bc1cc730c895b/ocaml/xapi/pool_features.ml
ocaml
The set of core restrictions of a pool is the intersection of the sets of features of the individual hosts. Find the feature flags in the given license params that are not represented in the feature type. These are additional flags given to us by v6d. Assume that their names always start with "restrict_". ...
( C ) 2006 - 2010 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LIC...
3db4b682b6ccff6604028cc20226f1b32fc945c0796e62db995d93962fcc0f89
spectrum-finance/cardano-dex-sdk-haskell
Constants.hs
module ErgoDex.Amm.Constants where import Ledger.Ada (lovelaceValueOf) import Ledger.Value (Value) import ErgoDex.Contracts.Types (Amount(..), Lovelace) minSafeOutputAmount :: Amount Lovelace minSafeOutputAmount = Amount 3000000 minSafeOutputValue:: Value minSafeOutputValue = lovelaceValueOf ...
null
https://raw.githubusercontent.com/spectrum-finance/cardano-dex-sdk-haskell/85b3e6b4fa18e7cc2196672102b2217461f2b0c2/dex-core/src/ErgoDex/Amm/Constants.hs
haskell
module ErgoDex.Amm.Constants where import Ledger.Ada (lovelaceValueOf) import Ledger.Value (Value) import ErgoDex.Contracts.Types (Amount(..), Lovelace) minSafeOutputAmount :: Amount Lovelace minSafeOutputAmount = Amount 3000000 minSafeOutputValue:: Value minSafeOutputValue = lovelaceValueOf ...
fc919bcfcae3ce7c5c9a23477bad2a8714a6bc1bc15594cfdbf85ac7d7149837
janestreet/core
hashtbl_unit_tests.mli
* @inline
null
https://raw.githubusercontent.com/janestreet/core/4b6635d206f7adcfac8324820d246299d6f572fe/core/test/hashtbl_unit_tests.mli
ocaml
* @inline
dbc5d141d0d204aa9d9b0dc99ba725b7abc5cd4f4bf087551699eb0e11bdfc8b
bananu7/Hate
Util.hs
# LANGUAGE Trustworthy # | Module : Util Description : Various utilities used by Hate framework License : MIT Maintainer : Stability : stable Portability : full This module contains various utilities missing from @Prelude@ or @Control . Monad@. Module : Util Description : Vario...
null
https://raw.githubusercontent.com/bananu7/Hate/4aa4ec0cf1e9bcb32d8cc807ab2ee092807c7ddb/src/Hate/Util.hs
haskell
|A "functional" if-statement. |Monad "unless" that automatically extracts the value from the action. |A bit cleaner "maybe".
# LANGUAGE Trustworthy # | Module : Util Description : Various utilities used by Hate framework License : MIT Maintainer : Stability : stable Portability : full This module contains various utilities missing from @Prelude@ or @Control . Monad@. Module : Util Description : Vario...
566475fd4cefdda0a0a71dc6536a4ccf8ee69b4c293beea41c290b8573d9d203
fujita-y/ypsilon
exception.scm
Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited . ;;; See LICENSE file for terms and conditions of use. (define parent-exception-handler (make-parameter #f)) (define raise (lambda (c) (cond ((current-exception-handler) => (lambda (proc) (proc c) ...
null
https://raw.githubusercontent.com/fujita-y/ypsilon/44260d99e24000f9847e79c94826c3d9b76872c2/heap/boot/exception.scm
scheme
See LICENSE file for terms and conditions of use. (define scheme-error
Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited . (define parent-exception-handler (make-parameter #f)) (define raise (lambda (c) (cond ((current-exception-handler) => (lambda (proc) (proc c) (cond ((parent-exception-handler) ...
4ccb05048b21c804b2997a631c790b2f72b8fa96a65f52caa8f1cf7676527817
dterei/SafeHaskellExamples
Set.hs
# LANGUAGE RoleAnnotations # module Set ( Set(), insert, empty ) where import Data.List (sort) If nominal role , then does n't work . -- type role Set nominal newtype Set a = Set [a] deriving (Show) insert :: Ord a => a -> Set a -> Set a insert x (Set xs) = Set $ sort $ x:xs empty :: Set a empty = ...
null
https://raw.githubusercontent.com/dterei/SafeHaskellExamples/0f7bbb53cf1cbb8419ce3a4aa4258b84be30ffcc/gnd/Set.hs
haskell
type role Set nominal
# LANGUAGE RoleAnnotations # module Set ( Set(), insert, empty ) where import Data.List (sort) If nominal role , then does n't work . newtype Set a = Set [a] deriving (Show) insert :: Ord a => a -> Set a -> Set a insert x (Set xs) = Set $ sort $ x:xs empty :: Set a empty = Set []
20a7e20688cb7b900298bd1ea9eefcfca94cd40fda6305715a043c85980d2b66
mirage/mirage-tcpip
udp.ml
module type S = sig type error val pp_error: error Fmt.t type ipaddr type t val disconnect : t -> unit Lwt.t type callback = src:ipaddr -> dst:ipaddr -> src_port:int -> Cstruct.t -> unit Lwt.t val listen : t -> port:int -> callback -> unit val unlisten : t -> port:int -> unit val input: t -> src:ipadd...
null
https://raw.githubusercontent.com/mirage/mirage-tcpip/3ab30ab7b43dede75abf7b37838e051e0ddbb23a/src/core/udp.ml
ocaml
module type S = sig type error val pp_error: error Fmt.t type ipaddr type t val disconnect : t -> unit Lwt.t type callback = src:ipaddr -> dst:ipaddr -> src_port:int -> Cstruct.t -> unit Lwt.t val listen : t -> port:int -> callback -> unit val unlisten : t -> port:int -> unit val input: t -> src:ipadd...
9b2af3619b2564d02ab75e6fc496b578a84cfafca25bc3ef21d3a2bf4ecf5aab
haskell/cabal
Paths_pkg.template.hs
{% if supportsCpp %} # LANGUAGE CPP # {% endif %} {% if supportsNoRebindableSyntax %} # LANGUAGE NoRebindableSyntax # {% endif %} {% if not absolute %} # LANGUAGE ForeignFunctionInterface # {% endif %} {% if supportsCpp %} #if __GLASGOW_HASKELL__ >= 810 # OPTIONS_GHC -Wno - prepositive - qualified - module # #endif {% ...
null
https://raw.githubusercontent.com/haskell/cabal/a49c1ddae0d768b6978cac76a50a01447e7066b6/templates/Paths_pkg.template.hs
haskell
don't remove the trailing slash if
{% if supportsCpp %} # LANGUAGE CPP # {% endif %} {% if supportsNoRebindableSyntax %} # LANGUAGE NoRebindableSyntax # {% endif %} {% if not absolute %} # LANGUAGE ForeignFunctionInterface # {% endif %} {% if supportsCpp %} #if __GLASGOW_HASKELL__ >= 810 # OPTIONS_GHC -Wno - prepositive - qualified - module # #endif {% ...
d741ed0cc94398e79486f785c98dc8389902e063652916958003846e4994f094
mfelleisen/RacketSchool
6-form.rkt
#lang racket (require "gui.rkt" "ops.rkt" (for-syntax syntax/parse)) (provide form (rename-out [boolean-widget boolean] [money-widget money] [-/coerce -] [>/coerce >] [</coerce <] ...
null
https://raw.githubusercontent.com/mfelleisen/RacketSchool/ada599f31d548a538a37d998b32d80aa881d699a/Plan/ql/6-form.rkt
racket
#lang racket (require "gui.rkt" "ops.rkt" (for-syntax syntax/parse)) (provide form (rename-out [boolean-widget boolean] [money-widget money] [-/coerce -] [>/coerce >] [</coerce <] ...