_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
a009ce258d786d7745733e2a9ebd5f3e0a0691525a47faf9c811943120cf4ba5
LesBoloss-es/ppx_deriving_madcast
identity.ml
let () = assert ([%madcast: int -> int] 42 = 42); assert ([%madcast: char -> char] 'c' = 'c'); assert ([%madcast: int list -> int list] [42; 0] = [42; 0]); assert ([%madcast: string -> string] "42" = "42"); assert ([%madcast: int array -> int array] [|1; 2|] = [|1; 2|])
null
https://raw.githubusercontent.com/LesBoloss-es/ppx_deriving_madcast/2c728604cf87c07c937b18d9b599fc6785670a9b/test/positive/identity.ml
ocaml
let () = assert ([%madcast: int -> int] 42 = 42); assert ([%madcast: char -> char] 'c' = 'c'); assert ([%madcast: int list -> int list] [42; 0] = [42; 0]); assert ([%madcast: string -> string] "42" = "42"); assert ([%madcast: int array -> int array] [|1; 2|] = [|1; 2|])
dec17ba9dcd7288cc07e68b584f4ad8fd344e817be9dc51c0b4a702c7f4e7c0a
bgusach/exercises-htdp2e
ex-297.rkt
#lang htdp/isl+ (require test-engine/racket-tests) # # # Functions (define (mk-circle centre-x centre-y r) ; Posn -> Boolean (λ (p) (<= (distance-between centre-x centre-y p) ))) ; Number Number Posn -> Number Determines the distance between ( x , y ) and p (check-expect (distance-between 0...
null
https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/3-abstraction/ex-297.rkt
racket
Posn -> Boolean Number Number Posn -> Number
#lang htdp/isl+ (require test-engine/racket-tests) # # # Functions (define (mk-circle centre-x centre-y r) (λ (p) (<= (distance-between centre-x centre-y p) ))) Determines the distance between ( x , y ) and p (check-expect (distance-between 0 0 (make-posn 0 0)) 0) (check-expect (distance-betw...
ea300335d892b2e5d9b18a3298fc94426e86550a3c3b37e9b4bdaa637a9d22fe
webyrd/mediKanren
csv-semmed-simplify.rkt
#lang racket/base (require "csv.rkt" "edge.rkt" "read.rkt" (except-in racket/control set) racket/file racket/list racket/pretty racket/set racket/string ) This is the first normalization pass , which generates several files : ;; * publication-reference.scm ;; ** PREDICATION_ID ;; ** SENTENCE_ID ...
null
https://raw.githubusercontent.com/webyrd/mediKanren/a2b80ea94f66bcdd4305b9369ad4184c2afe9829/attic/code/csv-semmed-simplify.rkt
racket
* publication-reference.scm ** PREDICATION_ID ** SENTENCE_ID ** PMID * concept.scm ** CUI ** NAME ** (list-of #(SEMTYPE NOVELTY)) * cui-by-semtype.scm ** (SEMTYPE . (list-of CUI)) ** index.scm *** [SUBJECT,OBJECT]_CUI *** detail.bin file position of edge block for [SUBJECT,OBJECT] ** detail.bin (byte-enco...
#lang racket/base (require "csv.rkt" "edge.rkt" "read.rkt" (except-in racket/control set) racket/file racket/list racket/pretty racket/set racket/string ) This is the first normalization pass , which generates several files : * edge - by-[subject , object]/ * * * [ SUBJECT , OBJECT]_CUI (...
7eaed7e5f474313b5395f655cc3d5fae1b313553bda8761035e952a495aa3650
UnixJunkie/dokeysto
db_camltc_gen.mli
* { 4 Read - only persistent generic key to generic value hash table using tokyocabinet as backend . } using tokyocabinet as backend.} *) type filename = string module RO: functor (KV: Dokeysto.Db_gen.Key_val) -> sig type t (** [open_existing fn] open in read-only mode the persistent hash...
null
https://raw.githubusercontent.com/UnixJunkie/dokeysto/48b0486769d127f60d523cce89db001179ced92b/src/db_camltc_gen.mli
ocaml
* [open_existing fn] open in read-only mode the persistent hashtbl whose data are stored in file [fn] and whose index is stored in [fn ^ ".idx"]. * [dummy ()] create a value of type [t]. Do not do anything with this value. * [close db] close the previously opened [db]. * [mem db k] check if [k] is ...
* { 4 Read - only persistent generic key to generic value hash table using tokyocabinet as backend . } using tokyocabinet as backend.} *) type filename = string module RO: functor (KV: Dokeysto.Db_gen.Key_val) -> sig type t val open_existing: filename -> t val dummy: unit -> t val close: ...
8976ad1d72b7c51f5808dea190f88718111ccb438563827f401d78060ba6f8d8
Storkle/clj-forex
shorthand.clj
(clojure.core/use 'nstools.ns) (ns+ forex.module.indicator.shorthand (:clone clj.core) (:use forex.module.indicator.map forex.module.indicator.util) (:use forex.util.emacs [clj-time.core :exclude [extend start]] [clj-time.coerce] forex.util.spawn forex.util.core forex.util.log ...
null
https://raw.githubusercontent.com/Storkle/clj-forex/1800b982037b821732b9df1e2e5ea1eda70f941f/src/forex/module/indicator/shorthand.clj
clojure
(clojure.core/use 'nstools.ns) (ns+ forex.module.indicator.shorthand (:clone clj.core) (:use forex.module.indicator.map forex.module.indicator.util) (:use forex.util.emacs [clj-time.core :exclude [extend start]] [clj-time.coerce] forex.util.spawn forex.util.core forex.util.log ...
98ab13cfc353a5d1b336390dd921f5e5499bbcbcc49ac5c5049a8be2958d5c2a
deadtrickster/prometheus.cl
basic.lisp
(in-package #:prometheus.exposers.hunchentoot.test) (plan 1) (defclass my-acceptor (prom.tbnl:exposer tbnl:acceptor) ()) (defun gunzip (vector) (trivial-utf-8:utf-8-bytes-to-string (chipz:decompress nil 'chipz:gzip vector))) (defun test-metrics-endpoint (expected-metrics-text) (subtest "Metrics" (multiple...
null
https://raw.githubusercontent.com/deadtrickster/prometheus.cl/60572b793135e8ab5a857d47cc1a5fe0af3a2d53/t/exposers/hunchentoot/basic.lisp
lisp
(in-package #:prometheus.exposers.hunchentoot.test) (plan 1) (defclass my-acceptor (prom.tbnl:exposer tbnl:acceptor) ()) (defun gunzip (vector) (trivial-utf-8:utf-8-bytes-to-string (chipz:decompress nil 'chipz:gzip vector))) (defun test-metrics-endpoint (expected-metrics-text) (subtest "Metrics" (multiple...
4af5e10ab4417652ea216315c209eafd5db55e3877b04941b999e79979774359
roman/Haskell-Reactive-Extensions
Either.hs
# LANGUAGE NoImplicitPrelude # module Rx.Observable.Either where import Prelude.Compat import Control.Concurrent.MVar (newEmptyMVar, readMVar, takeMVar, tryPutMVar) import Control.Exception (SomeException) import Control.Monad ...
null
https://raw.githubusercontent.com/roman/Haskell-Reactive-Extensions/0faddbb671be7f169eeadbe6163e8d0b2be229fb/rx-core/src/Rx/Observable/Either.hs
haskell
# LANGUAGE NoImplicitPrelude # module Rx.Observable.Either where import Prelude.Compat import Control.Concurrent.MVar (newEmptyMVar, readMVar, takeMVar, tryPutMVar) import Control.Exception (SomeException) import Control.Monad ...
f5c1b953af9799ad120ce719d7037bf7db8dc0c2bc92915c6233d443507ec9d6
LaurentMazare/ocaml-jupyter-async
kernel_intf.ml
open Core type context = { write_display_data : Jupyter_async_message.Message.Display_data_content.t -> unit } module type S = sig type t val create : context -> t val eval : t -> string -> unit Or_error.t val complete : t -> string -> int * (string * string) list end
null
https://raw.githubusercontent.com/LaurentMazare/ocaml-jupyter-async/c7a4e237c108ffa8be9ccfe560ff4758ff6bf74c/src/kernel/kernel_intf.ml
ocaml
open Core type context = { write_display_data : Jupyter_async_message.Message.Display_data_content.t -> unit } module type S = sig type t val create : context -> t val eval : t -> string -> unit Or_error.t val complete : t -> string -> int * (string * string) list end
38578a9ed66a16f7444bd0741ad97f00979e557322ae272eecda53d0cc3be14f
ryantm/nixpkgs-update
Process.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Process where import qualified Data.ByteString.Lazy as BSL import Polysemy import Polysemy.Input import System.Exit (ExitCode (..)) import qualified System.Process.Typed as TP data Process m a where Read_ :: TP.ProcessConfig stdin stdout stderr...
null
https://raw.githubusercontent.com/ryantm/nixpkgs-update/c78b63b4432444f33e62709382c9c89ae85e9305/src/Process.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Process where import qualified Data.ByteString.Lazy as BSL import Polysemy import Polysemy.Input import System.Exit (ExitCode (..)) import qualified System.Process.Typed as TP data Process m a where Read_ :: TP.ProcessConfig stdin stdout stderr -> Process m (BSL.ByteString, BSL....
f4dbe216c2365a4d5d9e9d831631dace738260b768a5b1327afb595f6cc2738d
clojure-interop/aws-api
AmazonSQSAsync.clj
(ns com.amazonaws.services.sqs.AmazonSQSAsync "Interface for accessing Amazon SQS asynchronously. Each asynchronous method will return a Java Future object overloads which accept an AsyncHandler can be used to receive notification when an asynchronous operation completes. Note: Do not directly implement this i...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.sqs/src/com/amazonaws/services/sqs/AmazonSQSAsync.clj
clojure
(ns com.amazonaws.services.sqs.AmazonSQSAsync "Interface for accessing Amazon SQS asynchronously. Each asynchronous method will return a Java Future object overloads which accept an AsyncHandler can be used to receive notification when an asynchronous operation completes. Note: Do not directly implement this i...
7bafa22d8151d286463ec6846a1b28e09627fede5bb5c0a0faf373abb690c827
caisah/sicp-exercises-and-examples
ex_2.4.scm
;; Here is an alternative procedural representation of pairs. For this representation, ;; verify that (car (cons x y)) yields x for any objects x and y. ;; (define (cons x y) ;; (lambda(m) (m x y))) ;; (define (car z) ;; (z (lambda (p q) p))) ;; What is the corresponding definition of cdr? (define (cons a...
null
https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/2.1.3-what_is_meant_by_data/ex_2.4.scm
scheme
Here is an alternative procedural representation of pairs. For this representation, verify that (car (cons x y)) yields x for any objects x and y. (define (cons x y) (lambda(m) (m x y))) (define (car z) (z (lambda (p q) p))) What is the corresponding definition of cdr?
(define (cons a b) (lambda(y) (y a b))) (define (car z) (z (lambda(p q) p))) (define (cdr z) (z (lambda(p q) q))) (define t (cons 1 2)) (car t) (cdr t)
af11ff8be3b9a6a2e99fd69560288931db61c3ace1a977f7254de2ab0281274c
seckcoder/iu_c311
print-tree.rkt
#lang racket (struct tree (key left right))
null
https://raw.githubusercontent.com/seckcoder/iu_c311/a1215983b6ab08df32058ef1e089cb294419e567/racket/compiler/ki-1/print-tree.rkt
racket
#lang racket (struct tree (key left right))
646027e405ee136eb766a20f086bb34610d614267bef27f9baef604b9055ed8d
lathe/punctaffy-for-racket
test-hypertee-2.rkt
#lang parendown racket/base punctaffy / tests / test - hypertee-2 ; Unit tests of the hypertee data structure for hypersnippet - shaped ; data. Copyright 2017 - 2020 The Lathe Authors ; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ; you may not use this file except in compliance...
null
https://raw.githubusercontent.com/lathe/punctaffy-for-racket/399657556e22ecaca53c7d3d8310bf22e9394f00/punctaffy-test/tests/test-hypertee-2.rkt
racket
data. 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, either express or implied. See the License for the specific language governing permissions and limitations under the ...
#lang parendown racket/base punctaffy / tests / test - hypertee-2 Unit tests of the hypertee data structure for hypersnippet - shaped Copyright 2017 - 2020 The Lathe Authors software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , (...
4010a559166fc513fcc603490e8b90c2c2493b5a9a38821befacdc8fd93c9fc2
archaelus/erlmail
imapd_ext.erl
%%%--------------------------------------------------------------------------------------- @author < > [ ] 2006 - 2007 Simple Enigma , Inc. All Rights Reserved . %%% @doc IMAP server extention processing @reference See < a href=" / modules / erlmail " target="_top">Erlang Software Framework</...
null
https://raw.githubusercontent.com/archaelus/erlmail/fe69b0e936f1512b4f349666e56c31c0af7b672c/src/imapd_ext.erl
erlang
--------------------------------------------------------------------------------------- @doc IMAP server extention processing @reference See <a href="" target="_top">ErlMail Google Code Repository</a> for more information @version 0.0.6 @end Permission is hereby granted, free of charge, to any...
@author < > [ ] 2006 - 2007 Simple Enigma , Inc. All Rights Reserved . @reference See < a href=" / modules / erlmail " target="_top">Erlang Software Framework</a > for more information @since 0.0.5 The MIT License Copyright ( c ) 2007 , Simple Enigma , Inc. All Righs Reserved i...
d966400410676348754583dd6a0a1ec1ed2832e0b256b310dc2fb514f121ef73
philnguyen/set-extras
tests.rkt
#lang typed/racket/base (require racket/set typed/rackunit "main.rkt") (define s1 (set 1 2 3 4 5)) (define s2 (set 3 4 5 6 7)) (define-values (s1s2 s1* s2*) (set-intersect/differences s1 s2)) (check-equal? s1s2 (set 3 4 5)) (check-equal? s1* (set 1 2)) (check-equal? s2* (set 6 7)) (check-equal? (ma...
null
https://raw.githubusercontent.com/philnguyen/set-extras/37eff681f658ff2e760993ff736f6a4ff9eda93d/set-extras/tests.rkt
racket
#lang typed/racket/base (require racket/set typed/rackunit "main.rkt") (define s1 (set 1 2 3 4 5)) (define s2 (set 3 4 5 6 7)) (define-values (s1s2 s1* s2*) (set-intersect/differences s1 s2)) (check-equal? s1s2 (set 3 4 5)) (check-equal? s1* (set 1 2)) (check-equal? s2* (set 6 7)) (check-equal? (ma...
5ff74d0b60ff8518c5e291b66c1c4d8be425b7af9b3267ec5c3d9396c0baf56c
snowleopard/alga
AdjacencyIntMap.hs
----------------------------------------------------------------------------- -- | -- Module : Algebra.Graph.Test.AdjacencyIntMap Copyright : ( c ) 2016 - 2022 License : MIT ( see the file LICENSE ) -- Maintainer : -- Stability : experimental -- -- Testsuite for "Algebra.Graph.AdjacencyIntMap". ------...
null
https://raw.githubusercontent.com/snowleopard/alga/399b5dc538a2496b67f9322dc7247e06a4ec326b/test/Algebra/Graph/Test/AdjacencyIntMap.hs
haskell
--------------------------------------------------------------------------- | Module : Algebra.Graph.Test.AdjacencyIntMap Maintainer : Stability : experimental Testsuite for "Algebra.Graph.AdjacencyIntMap". --------------------------------------------------------------------------- * Testsuite
Copyright : ( c ) 2016 - 2022 License : MIT ( see the file LICENSE ) module Algebra.Graph.Test.AdjacencyIntMap ( testAdjacencyIntMap ) where import Algebra.Graph.AdjacencyIntMap import Algebra.Graph.Test import Algebra.Graph.Test.API (Mono (..), adjacencyIntMapAPI) import Algebra.Graph.Test.Generic...
d75bfbe400545607b0d3ca1ad1c172ac407018a420c1ce9e3dd585acb93182da
mfoemmel/erlang-otp
random_kill_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/test_server/src/things/random_kill_SUITE.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(random_kill_SUITE). -compile([expor...
ba076d620c27fee50fe298eda85aaa77cd9b5611dd237ec64bff7b803303f313
JHU-PL-Lab/jaylang
rstack.mli
open Dj_common include module type of Rstack_intf val empty : t val to_string : t -> string val pp : Format.formatter -> t -> unit val length : t -> int val construct_stks : t -> frame list * frame list val push : t -> frame -> t val pop : t -> frame -> t option val paired_callsite : t -> Id.t -> Id.t option val pop_a...
null
https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/src/dbmc/structure/rstack.mli
ocaml
open Dj_common include module type of Rstack_intf val empty : t val to_string : t -> string val pp : Format.formatter -> t -> unit val length : t -> int val construct_stks : t -> frame list * frame list val push : t -> frame -> t val pop : t -> frame -> t option val paired_callsite : t -> Id.t -> Id.t option val pop_a...
fb42308a5dd1ce9de980323698728126fb9c7ea3af949cb7ea617ac3b322919f
well-typed-lightbulbs/ocaml-esp32
lexer.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/parsing/lexer.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 val init : unit -> unit val token: Lexing.lexbuf -> Parser.token val skip_hash_bang: Lexing.lexbuf -> un...
e6aa69420715cdf2f517af646aa6f2e7f2538d5343dc6374cf23845469f145ad
samuelrivas/moka
preserve_cover.erl
Copyright ( c ) 2013 , < > %%% 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 conditio...
null
https://raw.githubusercontent.com/samuelrivas/moka/92521e43d1d685794f462ed49403c99baeae0226/test/acceptance/preserve_cover.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. * Redistr...
Copyright ( c ) 2013 , < > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTI...
2b5cbf316c19b2bb279745fdfe00250501a3885848575453b0fae5cd6536c0f4
chrisnc/tangaroa
udpsend.hs
module Main (main) where import Control.Monad (forever) import Network.Socket hiding (recv, recvFrom, send, sendTo) import Network.Socket.ByteString import Data.ByteString.Char8 as B localhost :: HostAddress localhost = 0x0100007f port :: PortNumber port = 10000 main :: IO () main = do sock <- socket AF_INET Data...
null
https://raw.githubusercontent.com/chrisnc/tangaroa/5dc68d9de0bdc23506e58f86357576f2c4a0c178/bin/udpsend.hs
haskell
module Main (main) where import Control.Monad (forever) import Network.Socket hiding (recv, recvFrom, send, sendTo) import Network.Socket.ByteString import Data.ByteString.Char8 as B localhost :: HostAddress localhost = 0x0100007f port :: PortNumber port = 10000 main :: IO () main = do sock <- socket AF_INET Data...
40f77ef3c46fc95901703d79adf5b1e0fe3ee9fc66ccddadee721d4ab73d78d6
input-output-hk/cardano-sl
Dump.hs
# LANGUAGE RecordWildCards # -- | Generation of genesis data for testnet. module Dump ( dumpRichSecrets , dumpFakeAvvmSeed , dumpGeneratedGenesisData ) where import Universum import Control.Lens ((?~)) import qualified Data.Text as T import Serokell.Util (en...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/tools/src/keygen/Dump.hs
haskell
| Generation of genesis data for testnet. -------------------------------------------------------------------------- Dump individual secrets -------------------------------------------------------------------------- -------------------------------------------------------------------------- Dump all generated secrets...
# LANGUAGE RecordWildCards # module Dump ( dumpRichSecrets , dumpFakeAvvmSeed , dumpGeneratedGenesisData ) where import Universum import Control.Lens ((?~)) import qualified Data.Text as T import Serokell.Util (enumerate) import qualified Serokell.Util.Base6...
6e46e8a9cac095d030c7567553e7faabfa7d3b8ef36f9bca51323ed4a5f6a539
mirage/mirage-skeleton
unikernel.ml
open Lwt.Infix open Printf module Main (Time : Mirage_time.S) (B : Mirage_block.S) = struct let log_src = Logs.Src.create "block" ~doc:"block tester" module Log = (val Logs.src_log log_src : Logs.LOG) let tests_started = ref 0 let tests_passed = ref 0 let tests_failed = ref 0 let ( >>*= ) x f = x >>...
null
https://raw.githubusercontent.com/mirage/mirage-skeleton/9fba1271e74e29e53c0474edd26bf284eb985ae3/device-usage/block/unikernel.ml
ocaml
won't escape
open Lwt.Infix open Printf module Main (Time : Mirage_time.S) (B : Mirage_block.S) = struct let log_src = Logs.Src.create "block" ~doc:"block tester" module Log = (val Logs.src_log log_src : Logs.LOG) let tests_started = ref 0 let tests_passed = ref 0 let tests_failed = ref 0 let ( >>*= ) x f = x >>...
45a153fa715ea78339734d8b5db13dd87c6086639ca1e0799bcaa8aa49f22745
wireless-net/erlang-nommu
wxPrintPreview.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 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/wx/src/gen/wxPrintPreview.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 2008 - 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(wxPrintPreview). -include("wxe.hr...
44949fbea6487b8d255b5ea91208764b398feb1bf114caaca5da232916b13703
pippijn/mlwidgets
buffer_pen_t.ml
let run () = let size = Concrete.({ width = 32; height = 16; }) in let viewport = Concrete.({ position = { x = 4; y = 2; }; size = { width = 24; height = 12; }; }) in let pen = new BufferPen.t ~size in let buffer = pen#buffer in let pen = pen#frame viewport in pen#fill "."; let pen = pen#ad...
null
https://raw.githubusercontent.com/pippijn/mlwidgets/0255a0c9543ca27cbcf5367051050bd8d17009ce/testsuite/widget/buffer_pen_t.ml
ocaml
let run () = let size = Concrete.({ width = 32; height = 16; }) in let viewport = Concrete.({ position = { x = 4; y = 2; }; size = { width = 24; height = 12; }; }) in let pen = new BufferPen.t ~size in let buffer = pen#buffer in let pen = pen#frame viewport in pen#fill "."; let pen = pen#ad...
ecb85ba1f1ad4ed64099162c36f7da0389f7a22e201d126185d4f60337f1d62e
wireapp/wire-server
Util.hs
# LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # {-# OPTIONS_GHC -Wno-redundant-constraints #-} -- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under ...
null
https://raw.githubusercontent.com/wireapp/wire-server/72a03a776d4a8607b0a9c3e622003467be914894/libs/hscim/src/Web/Scim/Test/Util.hs
haskell
# OPTIONS_GHC -Wno-redundant-constraints # This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty...
# LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # Copyright ( C ) 2022 Wire Swiss GmbH < > 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 You should have received a...
c999ebfc37657d04665f4f9254e055e00a7d670473e0b5543ef77dd8c57669e4
exercism/babashka
isogram_test.clj
(ns isogram-test (:require [clojure.test :refer [deftest is]] isogram)) (deftest test-isograms (is (isogram/isogram? "duplicates")) (is (isogram/isogram? "subdermatoglyphic")) (is (isogram/isogram? "thumbscrew-japingly")) (is (isogram/isogram? "Hjelmqvist-Gryb-Zock-Pfund-Wax")) (is (isogram/iso...
null
https://raw.githubusercontent.com/exercism/babashka/7375f1938ff95b242320313eaeedb8eca31a1b5b/exercises/practice/isogram/test/isogram_test.clj
clojure
(ns isogram-test (:require [clojure.test :refer [deftest is]] isogram)) (deftest test-isograms (is (isogram/isogram? "duplicates")) (is (isogram/isogram? "subdermatoglyphic")) (is (isogram/isogram? "thumbscrew-japingly")) (is (isogram/isogram? "Hjelmqvist-Gryb-Zock-Pfund-Wax")) (is (isogram/iso...
772bdc5e4d4e8ebdd346b8ed469f392151deee9f72112b58b013654b8f4ac827
kupl/LearnML
patch.ml
type formula = | True | False | Not of formula | AndAlso of (formula * formula) | OrElse of (formula * formula) | Imply of (formula * formula) | Equal of (exp * exp) and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp) let rec cal (exp : exp) : int = match exp with | Num x -> x | Plus...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub11/patch.ml
ocaml
type formula = | True | False | Not of formula | AndAlso of (formula * formula) | OrElse of (formula * formula) | Imply of (formula * formula) | Equal of (exp * exp) and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp) let rec cal (exp : exp) : int = match exp with | Num x -> x | Plus...
98fd945be39b6ea3714bf16708b8b66fad14d581e0deeb3b5c692c59396bc81b
potetm/tire-iron
nested.cljs
(ns com.potetm.browser-client.nested) (def my-js-obj #js {}) (def my-clj-map {}) (defn my-fn [] "nested!")
null
https://raw.githubusercontent.com/potetm/tire-iron/f26e3f68c137ea10e42645ea2977e9c755558b08/src/dev/browser/com/potetm/browser_client/nested.cljs
clojure
(ns com.potetm.browser-client.nested) (def my-js-obj #js {}) (def my-clj-map {}) (defn my-fn [] "nested!")
ae6c3496b806d06a8d0fe85ed16e33142aa3f86d1988b8a2f154396607475a02
chicken-mobile/chicken-sdl2-android-builder
rect.scm
;; chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2 ;; Copyright © 2013 , 2015 - 2016 . ;; 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...
null
https://raw.githubusercontent.com/chicken-mobile/chicken-sdl2-android-builder/90ef1f0ff667737736f1932e204d29ae615a00c4/eggs/sdl2/lib/sdl2/rect.scm
scheme
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. - Redistributio...
chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2 Copyright © 2013 , 2015 - 2016 . " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT COPYRIGHT HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT N...
5322df33b543263f96a73b51e1369774056ff644640a6f4e074104cb237be394
kadena-io/chainweaver
OAuth.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE RecursiveDo # # LANGUAGE ScopedTypeVariables # # LANGUAGE Templat...
null
https://raw.githubusercontent.com/kadena-io/chainweaver/3ea0bb317c07ddf954d4ebf24b33d1be7d5f9c45/frontend/src/Frontend/OAuth.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # | OAuth token manager. * Types and Classes * Creation ^ Currently available OAuth tokens, will be stored to local storage and restored from there on application startup. ^ Authorization failed with some error. Required to get acc...
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE LambdaCase # # LANGUAGE RecursiveDo # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # module Frontend.OAuth OAuthCfg (..) , HasOAuthCfg (...
3323afa4326465257820441cb0d291d7f46ea026959d28ef1691a18a2d753ff6
gergo-/ldrgen
generate.mli
(**************************************************************************) (* *) , a generator of random C programs Copyright ( C ) 2017 - 2013 , < > (* ...
null
https://raw.githubusercontent.com/gergo-/ldrgen/bb0682945196ec07e52ea3faa40a5334010d86a9/generate.mli
ocaml
************************************************************************ This program is free software: you can redistribute it and/or modify (at your option) any later...
, a generator of random C programs Copyright ( C ) 2017 - 2013 , < > it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the G...
5840a12a9fc1c9bd9b2dd9d1c821ea595049ae413e391d67411ee76dfaef0f56
ocaml/dune
exn.mli
(** Exceptions *) type t = exn external raise : exn -> _ = "%raise" external raise_notrace : exn -> _ = "%raise_notrace" external reraise : exn -> _ = "%reraise" val protect : f:(unit -> 'a) -> finally:(unit -> unit) -> 'a val protectx : 'a -> f:('a -> 'b) -> finally:('a -> unit) -> 'b val pp_uncaught : backtrac...
null
https://raw.githubusercontent.com/ocaml/dune/714626f4d408e5c71c24ba91d0d520588702ec52/otherlibs/stdune/src/exn.mli
ocaml
* Exceptions
type t = exn external raise : exn -> _ = "%raise" external raise_notrace : exn -> _ = "%raise_notrace" external reraise : exn -> _ = "%reraise" val protect : f:(unit -> 'a) -> finally:(unit -> unit) -> 'a val protectx : 'a -> f:('a -> 'b) -> finally:('a -> unit) -> 'b val pp_uncaught : backtrace:string -> Format...
51b63dc2e8635d5d1bddaf4dd8a655ba258eccf6be38c7420f9d222637651abe
mirage/charrua
dhcp_client.mli
type t (** we expect all serialization and deserialization to happen through Cstruct.t *) val pp : Format.formatter -> t -> unit val create : ?requests : Dhcp_wire.option_code list -> Cstruct.uint32 -> Macaddr.t -> (t * Dhcp_wire.pkt) * [ create xid mac ] returns a pair of [ t , buffer ] . [ t ] represents the curr...
null
https://raw.githubusercontent.com/mirage/charrua/72d3e7fbfcd500488ae9300186c1a5cb301e62b2/client/dhcp_client.mli
ocaml
* we expect all serialization and deserialization to happen through Cstruct.t * [lease t] will return [Some lease] if [t] has succeeded in * completing a lease transaction with some server. * Note that the library has no sense of the passage of time, so expiration * is not considered; there is no guarantee that [So...
type t val pp : Format.formatter -> t -> unit val create : ?requests : Dhcp_wire.option_code list -> Cstruct.uint32 -> Macaddr.t -> (t * Dhcp_wire.pkt) * [ create xid mac ] returns a pair of [ t , buffer ] . [ t ] represents the current * state of the client in the lease transaction , and [ buffer ] is the sugge...
117063ec53fd1477d42b1c872212b37956ef934e26bc1bde1f818483a6003549
scicloj/metamorph.ml
preprocessing.clj
(ns scicloj.metamorph.ml.preprocessing (:require [tablecloth.api :as tc] [tech.v3.dataset.math :as std-math])) (defn- preprocessor ([columns-selector fit-fn transform-fn context-key options] (preprocessor columns-selector :name fit-fn transform-fn context-key options)) ([columns-selector meta-field...
null
https://raw.githubusercontent.com/scicloj/metamorph.ml/795ac6b0618a510e91ca3e0c5c9a01523e32d827/src/scicloj/metamorph/ml/preprocessing.clj
clojure
(ns scicloj.metamorph.ml.preprocessing (:require [tablecloth.api :as tc] [tech.v3.dataset.math :as std-math])) (defn- preprocessor ([columns-selector fit-fn transform-fn context-key options] (preprocessor columns-selector :name fit-fn transform-fn context-key options)) ([columns-selector meta-field...
377cee5e3d394c6f43015937d3427c807e220fafcec60c69af3459d4e5055481
lemmaandrew/CodingBatHaskell
withoutX2.hs
From Given a string , if one or both of the first 2 chars is ' x ' , return the string without those ' x ' chars , and otherwise return the string unchanged . This is a little harder than it looks . Given a string, if one or both of the first 2 chars is 'x', return the string without those 'x' chars, and ot...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/String-1/withoutX2.hs
haskell
From Given a string , if one or both of the first 2 chars is ' x ' , return the string without those ' x ' chars , and otherwise return the string unchanged . This is a little harder than it looks . Given a string, if one or both of the first 2 chars is 'x', return the string without those 'x' chars, and ot...
ca98cb99fd1ec1147270e7cd44d0e1e44148522a93fc167ae1141abd17f8e826
justinkirby/emetric
emetric_cmd_info.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2011 %%% @end %%% This source file is subject to the New BSD License . You should have received %%% a copy of the New BSD license with this software. If not, it can be %%% retrieved from: -license.php %%%---------------...
null
https://raw.githubusercontent.com/justinkirby/emetric/6310f8f74a787100eb9d6356d2beffabc91fda1e/src/emetric_cmd_info.erl
erlang
------------------------------------------------------------------- @end a copy of the New BSD license with this software. If not, it can be retrieved from: -license.php -------------------------------------------------------------------
@author < > ( C ) 2011 This source file is subject to the New BSD License . You should have received -module(emetric_cmd_info). -behaviour(emetric_command). -export([command_help/0, deps/0, run/0 ]). command_help()-> {"info",[],"Display the status and/or result of executed commands"}. deps()...
d361f6d4a336ba679d1fedd86194091b1b33e92887d907cfd68c40df3818cb5f
j-mie6/ParsleyHaskell
Optimiser.hs
-- This module doesn't exist yet (technically) module Parsley.Internal.Backend.Optimiser (optimise) where import Data.GADT.Compare (geq) import Data.Typeable ((:~:)(Refl)) import Parsley.Internal.Backend.Machine import Parsley.Internal.Common.Indexed -- We'll come back here later ;) ...
null
https://raw.githubusercontent.com/j-mie6/ParsleyHaskell/045ab78ed7af0cbb52cf8b42b6aeef5dd7f91ab2/parsley-core/src/ghc/Parsley/Internal/Backend/Optimiser.hs
haskell
This module doesn't exist yet (technically) We'll come back here later ;)
module Parsley.Internal.Backend.Optimiser (optimise) where import Data.GADT.Compare (geq) import Data.Typeable ((:~:)(Refl)) import Parsley.Internal.Backend.Machine import Parsley.Internal.Common.Indexed optimise :: Instr o (Fix4 (Instr o)) xs n r a -> Fix4 (Instr o) xs n r a optimis...
04187eeea7197a8736f11552f0684c8631f5b1de533ad560ebf427cbf2c69a5a
clojure-lsp/clojure-lsp
test_helper_test.clj
(ns clojure-lsp.test-helper-test (:require [clojure-lsp.test-helper :as h] [clojure.test :refer [deftest is]])) (deftest changes->code-test (is (= (h/code "(foo)" "(something)") (#'h/results->doc (h/code "(foo)" "(bar)") [{:loc "something" :range {:row 2 :col 2 :end-r...
null
https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/26bdd3ccf2276df2b54a4ddde95d6530af46c743/lib/test/clojure_lsp/test_helper_test.clj
clojure
(ns clojure-lsp.test-helper-test (:require [clojure-lsp.test-helper :as h] [clojure.test :refer [deftest is]])) (deftest changes->code-test (is (= (h/code "(foo)" "(something)") (#'h/results->doc (h/code "(foo)" "(bar)") [{:loc "something" :range {:row 2 :col 2 :end-r...
6ad2133e4a70296a5cab17af6bf37be716f1b2d22a210e22e825405149c0e771
eliascotto/tryclojure
core.cljs
(ns app.core (:require [reagent.core :as r] [reagent.dom :as rdom] [reitit.frontend.controllers :as rfc] [reitit.frontend.easy :as rfe] [reitit.core :as reitit] [app.env :refer [DEBUG]] [app.views.home :as home] [app.views.not-found :as not-found] [app.views.common :refer [header footer]] ...
null
https://raw.githubusercontent.com/eliascotto/tryclojure/9bfff379f2d8d455531de864634dcaed7e5d1ea7/src/app/core.cljs
clojure
Atom for route matching ------------------------- Router ------------------------- ------------------------- -------------------------
(ns app.core (:require [reagent.core :as r] [reagent.dom :as rdom] [reitit.frontend.controllers :as rfc] [reitit.frontend.easy :as rfe] [reitit.core :as reitit] [app.env :refer [DEBUG]] [app.views.home :as home] [app.views.not-found :as not-found] [app.views.common :refer [header footer]] ...
f873c8799beb82e4ab0ad748e7f8053a7a7c8483e00ce17d77669c9575986f44
ChrisPenner/lens-filesystem
Combinators.hs
# LANGUAGE LambdaCase # {-# LANGUAGE RankNTypes #-} module Control.Lens.FileSystem.Internal.Combinators where import Control.Lens import Control.Lens.Action import Control.Lens.Action.Internal import Control.Applicative -- | If a given fold fails (e.g. with an exception), recover and simply return 0 elements -- rathe...
null
https://raw.githubusercontent.com/ChrisPenner/lens-filesystem/3819273ba384146d77a2c27dcf8373a76b0059b8/src/Control/Lens/FileSystem/Internal/Combinators.hs
haskell
# LANGUAGE RankNTypes # | If a given fold fails (e.g. with an exception), recover and simply return 0 elements rather than crashing. | Try the given fold, if it throws an exception then return the input as the output instead | Try the given fold, if it throws an exception then use the given handler to compute a re...
# LANGUAGE LambdaCase # module Control.Lens.FileSystem.Internal.Combinators where import Control.Lens import Control.Lens.Action import Control.Lens.Action.Internal import Control.Applicative recovering :: (Monad m, Alternative m, Monoid r, Effective m r f) => Over' p f s a -> Over' p f s a recovering fld f s = effec...
b285583fb041f627e7ca7216b2c6accb244e81ea80f7aa1a7162c01300e096d3
paurkedal/ocaml-caqti
caqti_error.ml
Copyright ( C ) 2017 - -2022 Petter A. Urkedal < > * * This library is free software ; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or ( at your * option ) any la...
null
https://raw.githubusercontent.com/paurkedal/ocaml-caqti/601723929a52326ed98e01c63dafd2db20ea5f52/caqti/lib/caqti_error.ml
ocaml
Error Cause Driver We don't want to expose any DB password in error messages. Load Call Retrieve Common
Copyright ( C ) 2017 - -2022 Petter A. Urkedal < > * * This library is free software ; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or ( at your * option ) any la...
6e937645ef2bd86d8c0675b4f7dfe0b556a28cbad9e1b4e5e41fc61ed8ffc98d
lipas-liikuntapaikat/lipas
runner.cljs
(ns lipas.ui.runner (:require [doo.runner :refer-macros [doo-tests]] [lipas.ui.core-test])) (doo-tests 'lipas.ui.core-test)
null
https://raw.githubusercontent.com/lipas-liikuntapaikat/lipas/f60185b597d2a7fca5480b392cd33187bccfb34a/webapp/test/cljs/lipas/runner.cljs
clojure
(ns lipas.ui.runner (:require [doo.runner :refer-macros [doo-tests]] [lipas.ui.core-test])) (doo-tests 'lipas.ui.core-test)
19d1dcd1e649b2f0401786032f43b2f1ceeec429b13e8dd1ec611679f1d1d7b3
oscoin/oscoin
Extended.hs
| Drop - in replacement for " Test . Tasty . HUnit " . -- -- * Assertion are lifted to 'MonadIO' -- * Equality operators '@=?' and '@?=' display pretty diffs. -- module Test.Tasty.HUnit.Extended ( HUnit.testCase , HUnit.testCaseInfo , HUnit.testCaseSteps , HUnit.Assertion , assertFailure , as...
null
https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/test/Test/Tasty/HUnit/Extended.hs
haskell
* Assertion are lifted to 'MonadIO' * Equality operators '@=?' and '@?=' display pretty diffs.
| Drop - in replacement for " Test . Tasty . HUnit " . module Test.Tasty.HUnit.Extended ( HUnit.testCase , HUnit.testCaseInfo , HUnit.testCaseSteps , HUnit.Assertion , assertFailure , assertBool , assertEqual , (@?=) , (@=?) ) where import Oscoin.Prelude import qua...
fc6dd95274fe45c7e565a91ad1f8d03625c43d57e414cb6c24f6a4b5d4a28c18
static-analysis-engineering/codehawk
bCHARMLoopStructure.ml
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Co...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/8f49bb5b93bd4925b16ee8e31650c2a9080310aa/CodeHawk/CHB/bchlibarm32/bCHARMLoopStructure.ml
ocaml
chutil bchlib bchlibarm32
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Co...
6e6dc0867668964f96c7e428a097cc1cc51e9e796f8e667a5fbf903a682d3cf7
jwiegley/notes
Free.hs
module Free where import Control.Monad.Free data Commands = Foo | Bar String deriving Show type Program = Free ((,) Commands) () foo :: Program foo = Free (Foo, Pure ()) bar :: String -> Program bar str = Free (Bar str, Pure ()) compile :: Program -> [Commands] compile (Pure ()) = [] compile (Fr...
null
https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/Free.hs
haskell
module Free where import Control.Monad.Free data Commands = Foo | Bar String deriving Show type Program = Free ((,) Commands) () foo :: Program foo = Free (Foo, Pure ()) bar :: String -> Program bar str = Free (Bar str, Pure ()) compile :: Program -> [Commands] compile (Pure ()) = [] compile (Fr...
70657cfbd8c069bcebc11de67926c2da105a1fc55cc93aefe2d2b374e9df5eb4
Lovesan/clave
format-context.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- Copyright ( C ) 2017 , < lovesan.ru at gmail.com > ;;; 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, inclu...
null
https://raw.githubusercontent.com/Lovesan/clave/3b08ed4c4cb3fa885739355821f73bbfd75a2a7d/src/format-context.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to do...
Copyright ( C ) 2017 , < lovesan.ru at gmail.com > files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KI...
9262dde6773eacdbaa574ec240a97a20a6b2bd0b95549794e7481b7c42361bc8
Neuromancer42/ministgwasm
Util.hs
module Compiler.Util where import Data.Char import LLVM.AST import LLVM.AST.AddrSpace import qualified Language.MiniStg as STG int :: Type int = IntegerType 64 intptr :: Type intptr = PointerType int (AddrSpace 0) intintfunc :: Type intintfunc = FunctionType int [int] False intintfptr :: Type intintfptr = PointerT...
null
https://raw.githubusercontent.com/Neuromancer42/ministgwasm/89d7c8e1b25e407f29b5bf4565d6c45067e15ff8/src/Compiler/Util.hs
haskell
| referer tag, refer to an evaled value either a direct literal or an indirect construction | referer tag, refer to an evaled construction (directly) | referer tag, refer to an unevaled primitive expression | referer tag, refer to an unevaled function application | referee tag, it's unvaluated, either a function...
module Compiler.Util where import Data.Char import LLVM.AST import LLVM.AST.AddrSpace import qualified Language.MiniStg as STG int :: Type int = IntegerType 64 intptr :: Type intptr = PointerType int (AddrSpace 0) intintfunc :: Type intintfunc = FunctionType int [int] False intintfptr :: Type intintfptr = PointerT...
96c2fcbc3ec6e51feb457456d259c84ca408e5e1bbe115af859d3e7f1f10adb9
zadean/xqerl
method_text_SUITE.erl
-module('method_text_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['Serialization-text-1'/1]). -export(['Serialization-text-2'/1]). -export(['Serializ...
null
https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/ser/method_text_SUITE.erl
erlang
-module('method_text_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['Serialization-text-1'/1]). -export(['Serialization-text-2'/1]). -export(['Serializ...
f7edb68b537ab6bd0533751ec643154ce8afec28736f0efe7165b968efe604de
clash-lang/clash-compiler
GenericBitPack.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE UndecidableInstances # module GenericBitPack where import GenericBitPackTypes import Clash.Prelude import Clash.Explicit.Testbench topEntity :: ( FooProduct U1 U2 , FooSum , FooSum , FooSum , FooSum , FooSP1 U1 U2 ,...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/eb48e7e1d2e1ad0a6bc386a6f1d6a0396b5308c8/tests/shouldwork/BitVector/GenericBitPack.hs
haskell
# LANGUAGE DeriveAnyClass # # NOINLINE topEntity # -DMAX_TUPLE_SIZE=12, which considerably improves compilation speed of clash-prelude
# LANGUAGE DeriveGeneric # # LANGUAGE UndecidableInstances # module GenericBitPack where import GenericBitPackTypes import Clash.Prelude import Clash.Explicit.Testbench topEntity :: ( FooProduct U1 U2 , FooSum , FooSum , FooSum , FooSum , FooSP1 U1 U2 , FooSP1 U1 U2 , FooSP2 U1 U...
644d4d2455ff06b50636d7ee3cce8d147e9ec5290908cd2f83063a24aea7ecd5
jeffshrager/biobike
utils.lisp
Copyright ( c ) 2002 - 2003 by and ; All rights reserved . ;;; This software is made avilable for EDUCATIONAL PURPOSES ;;; ONLY, and WITHOUT ANY WARRANTY, express or implied, of ;;; its merchantability or fitness for a particular purpose. Utilities for BioLisp lessons LSETQ gives the length instead of the...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/OriginalCode/utils.lisp
lisp
All rights reserved . This software is made avilable for EDUCATIONAL PURPOSES ONLY, and WITHOUT ANY WARRANTY, express or implied, of its merchantability or fitness for a particular purpose. setting long strings. `(length (setq ,var ,value))) It gives you back both the type of the object, and the length. If it...
Utilities for BioLisp lessons LSETQ gives the length instead of the value , and is good for This is the original version in the first lesson : ( ( var value ) This is a better version , contributed by JP Massar . (defun dwim-lsetq-func (x) (cond ((listp x) (list 'list (length x))) ((string...
359cbdb43673a01d09061e0a5f1e2538e329a368a4eade01b00f1a24b7c65a0b
takikawa/tr-pfds
delay.rkt
#lang typed/racket ;; basic delay and force implementations for typed/racket based on lambda + box ;; used in okasaki data structure implementations (provide Promiseof delay force) ;; - Outer box is for memoization - Inner box is so TR can distinguished a forced promise from an unforced one ;; I would have used...
null
https://raw.githubusercontent.com/takikawa/tr-pfds/1630af681e6bef5e75503649100b7f0d32a2e9fc/pfds/delay.rkt
racket
basic delay and force implementations for typed/racket based on lambda + box used in okasaki data structure implementations - Outer box is for memoization I would have used a struct like Prom instead of the inner box, but TR cannnot distinguish structs from procedures?
#lang typed/racket (provide Promiseof delay force) - Inner box is so TR can distinguished a forced promise from an unforced one (define-type (Promiseof A) (Boxof (U (-> (Boxof A)) (Boxof A)))) (define-syntax-rule (delay e) (box (λ () (box e)))) (: force : (All (A) ((Promiseof A) -> A))) (define (force b) (le...
187fdc1255b102edd6261a9d066ea1433b4ab955b90f8a474eb5a83a77c856fd
jaspervdj/number-six
Remind.hs
-------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} module NumberSix.Handlers.Remind ( handler ) where -------------------------------------------------------------------------------- import Control.Applicative ((<$>)) import ...
null
https://raw.githubusercontent.com/jaspervdj/number-six/1aba681786bd85bd20f79406c681ea581b982cd6/src/NumberSix/Handlers/Remind.hs
haskell
------------------------------------------------------------------------------ # LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----------------------------------------------------...
module NumberSix.Handlers.Remind ( handler ) where import Control.Applicative ((<$>)) import Control.Monad (forM_) import Control.Monad.Trans (liftIO) import Data.Text (Text) import qualified Database.SQLite.Simple as Sqlite import ...
4c5be3ec8194a4e96a9bf7396c906790f419cf6e2c5bf98cdbbda6260a122239
ocaml-flambda/ocaml-jst
datarepr.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/1bb6c797df7c63ddae1fc2e6f403a0ee9896cc8e/typing/datarepr.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 Compute constructor and label descriptions from type declarations , determining their representati...
6d949240e7ac14c1c8061bf64399b1fb1c2093738675941b1fc7429f514ac574
ygmpkk/house
WindowCrossCall_12.hs
-- #hide ----------------------------------------------------------------------------- -- | -- Module : OS.WindowCrossCall_12 Copyright : ( c ) 2002 -- License : BSD-style -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -- OS.WindowCrossCall_12 collects all the cro...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/ObjectIO/Graphics/UI/ObjectIO/OS/WindowCrossCall_12.hs
haskell
#hide --------------------------------------------------------------------------- | Module : OS.WindowCrossCall_12 License : BSD-style Maintainer : Stability : provisional Portability : portable OS.WindowCrossCall_12 collects all the cross call routines related to windows. ----------------...
Copyright : ( c ) 2002 module Graphics.UI.ObjectIO.OS.WindowCrossCall_12 where import Graphics.UI.ObjectIO.OS.ClCrossCall_12 import Graphics.UI.ObjectIO.OS.Cutil_12(newCString, peekCString, free, addr2int, int2addr) import Graphics.UI.ObjectIO.OS.Types(OSWindowPtr, OSPictContext) import Graphics.UI.ObjectI...
8ff648571a227060fc424692f15484bbc158b76e6f44e1b918d9deeac35a3b63
f-me/carma-public
Model.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE Rank2Types #-} # LANGUAGE ScopedTypeVariables # module Data.Model ( Ident(..), IdentI , Model(..) , ParentInfo(..) , ModelInfo(..), mkModelInfo, mkModelInfo' , Field(..), FF, F, EF, PK , FOpt , FieldDesc(..) Field accessor introspecti...
null
https://raw.githubusercontent.com/f-me/carma-public/82a9f44f7d919e54daa4114aa08dfec58b01009b/carma-models/src/Data/Model.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE GADTs # # LANGUAGE Rank2Types # Existential field accessors and introspection ^ Sort by this field. This existential type allows to decide in runtime wether model has parent or not. It is also allows to use this parent: after pattern-matching on ExParnent the `Model p` insta...
# LANGUAGE ScopedTypeVariables # module Data.Model ( Ident(..), IdentI , Model(..) , ParentInfo(..) , ModelInfo(..), mkModelInfo, mkModelInfo' , Field(..), FF, F, EF, PK , FOpt , FieldDesc(..) Field accessor introspection , buildFieldDesc, fieldName, fieldDesc, fieldType , FA(..), fieldNameE, field...
546812c1f51119f490a4d65fc90acc4622b5ab39f38af0ba0372f7ae9fcf1d1e
camlp5/camlp5
pr_ro.ml
(* camlp5r *) (* pr_ro.ml,v *) Copyright ( c ) INRIA 2007 - 2017 #directory "."; #load "pa_macro.cmo"; #load "q_MLast.cmo"; #load "pa_extfun.cmo"; #load "pa_extprint.cmo"; #load "pa_pprintf.cmo"; (* Pretty printing extension for objects and labels *) open Pcaml; open Prtools; open Printf; open Pretty; open Mlsynta...
null
https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/etc/pr_ro.ml
ocaml
camlp5r pr_ro.ml,v Pretty printing extension for objects and labels Heuristic : I don't like to print it horizontally when alone in a line.
Copyright ( c ) INRIA 2007 - 2017 #directory "."; #load "pa_macro.cmo"; #load "q_MLast.cmo"; #load "pa_extfun.cmo"; #load "pa_extprint.cmo"; #load "pa_pprintf.cmo"; open Pcaml; open Prtools; open Printf; open Pretty; open Mlsyntax.Revised; value not_impl name pc x = let desc = if Obj.tag (Obj.repr x) = Obj....
5fa20308288afd994c0a35f8ded90cdef7081e3e25b7ef5326c7d11b2a14781c
ghc/ghc
OldList.hs
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude , ScopedTypeVariables , MagicHash , BangPatterns # MagicHash, BangPatterns #-} ----------------------------------------------------------------------------- -- | -- Module : Data.List Copyright : ( c ) The University o...
null
https://raw.githubusercontent.com/ghc/ghc/a5afc8ab3c5518aebf8823ed418d404853929147/libraries/base/Data/OldList.hs
haskell
--------------------------------------------------------------------------- | Module : Data.List License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : stable Portability : portable --------------------------------------------------------------------------- * Basi...
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude , ScopedTypeVariables , MagicHash , BangPatterns # MagicHash, BangPatterns #-} Copyright : ( c ) The University of Glasgow 2001 Operations on lists . module Data.OldList ( (++) , head , last , tail , ...
5d57a3b0ee04f969a54d88e93d3dcb6f39932b6d226728701a48432664ffe29d
ntoronto/pict3d
draw-pass.rkt
#lang typed/racket/base (require racket/match racket/unsafe/ops typed/opengl (except-in typed/opengl/ffi cast ->) "../../math.rkt" "../../utils.rkt" "../../gl.rkt" "../../ffi.rkt" "../../utils.rkt" "../utils.rkt" "../shader.rkt" ...
null
https://raw.githubusercontent.com/ntoronto/pict3d/09283c9d930c63b6a6a3f2caa43e029222091bdb/pict3d/private/engine/draw/draw-pass.rkt
racket
=================================================================================================== Write-only Don't care if the entire buffer is invalidated; we're overwriting everything Can't use this with multiple calls to this function per frame Can help a bit GL_MAP_UNSYNCHRONIZED_BIT =======================...
#lang typed/racket/base (require racket/match racket/unsafe/ops typed/opengl (except-in typed/opengl/ffi cast ->) "../../math.rkt" "../../utils.rkt" "../../gl.rkt" "../../ffi.rkt" "../../utils.rkt" "../utils.rkt" "../shader.rkt" ...
71c3db40a6ac0ee6b8f259eb169f71f29a160b77e1f2dcf98ea0cec147a0cbe0
lilactown/advent-2019
day2.clj
(ns advent-2019.day2) (def ops {99 :halt 1 :add 2 :multiply}) (defn parameters "Takes a program and address of an opcode. Returns a vector of the first parameter, second parameter and the result address" [program address] (let [param1-address (get program (+ 1 address)) param2-add...
null
https://raw.githubusercontent.com/lilactown/advent-2019/ebf36a60ea0dd642496227101b0c64359d6c0208/src/advent_2019/day2.clj
clojure
explodes 😬 let's debug 👍 👍 👍 fix when opcode is `nil` return the memory, and the current noun and verb in a vector
(ns advent-2019.day2) (def ops {99 :halt 1 :add 2 :multiply}) (defn parameters "Takes a program and address of an opcode. Returns a vector of the first parameter, second parameter and the result address" [program address] (let [param1-address (get program (+ 1 address)) param2-add...
8ba7db5542e4decf66864e8b301c15d990958d15b2003ccccf264249070d8b52
ComputerScienceHouse/csh-eval
ProfilePhoto.hs
| Module : CSH.Eval . Frontend . Home Description : The route handler for the home page Copyright : , , , Computer Science House 2015 License : MIT Maintainer : Stability : Provisional Portability : POSIX DOCUMENT THIS ! Module : CSH.Eval.Frontend.Home Description : The...
null
https://raw.githubusercontent.com/ComputerScienceHouse/csh-eval/d2d4bac07bfbfcdb58aa01694d422f326bd3d414/src/CSH/Eval/Frontend/ProfilePhoto.hs
haskell
# LANGUAGE QuasiQuotes # # LANGUAGE TypeFamilies # # LANGUAGE OverloadedStrings # # LANGUAGE ViewPatterns #
| Module : CSH.Eval . Frontend . Home Description : The route handler for the home page Copyright : , , , Computer Science House 2015 License : MIT Maintainer : Stability : Provisional Portability : POSIX DOCUMENT THIS ! Module : CSH.Eval.Frontend.Home Description : The...
d726af036dbfa1cd08f82369e5ae11f1db388a296f0e7d8e7299a3467b89c410
DanielG/ghc-mod
GhcMod.hs
| The ghc - mod library . module GhcMod ( -- * Cradle Cradle(..) , Project(..) , findCradle -- * Options , Options(..) , LineSeparator(..) , OutputStyle(..) , FileMapping(..) , defaultOptions -- * Logging , GmLogLevel , increaseLogLevel , decreaseLogLevel , gmSetLogLevel , gmLog -...
null
https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/GhcMod.hs
haskell
* Cradle * Options * Logging * Types * Monad Types * SymbolDb * Output * FileMapping
| The ghc - mod library . module GhcMod ( Cradle(..) , Project(..) , findCradle , Options(..) , LineSeparator(..) , OutputStyle(..) , FileMapping(..) , defaultOptions , GmLogLevel , increaseLogLevel , decreaseLogLevel , gmSetLogLevel , gmLog , ModuleString , Expression(..) , GhcPkgD...
63b379e7acb85b208936e873b7504b77dba4ed4fa0e3d3555f763705e8d0bcec
srid/neuron
Scheme.hs
{-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE TemplateHaskell # # LANGUAGE NoImplicitPrelude # -- TODO: Simplify or eliminate this module, now that date IDs are gone. module Neuron.Zettelkasten.ID.Scheme ( nextAvailableZettelID, genVal, ...
null
https://raw.githubusercontent.com/srid/neuron/1f127b8343dbe05e057688988b289066df1cdedb/src/Neuron/Zettelkasten/ID/Scheme.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # TODO: Simplify or eliminate this module, now that date IDs are gone. | The scheme to use when generating new IDs | Random IDs (default) | Custom ID (specified by the user) | Produce a value that is required ahead to run an ID scheme. This ...
# LANGUAGE LambdaCase # # LANGUAGE TemplateHaskell # # LANGUAGE NoImplicitPrelude # module Neuron.Zettelkasten.ID.Scheme ( nextAvailableZettelID, genVal, IDScheme (..), IDConflict (..), ) where import Control.Monad.Except import Data.GADT.Compare.TH import Data.GADT.Show.TH import qualified Data.Set a...
b0c472b9726c1486adf4904c0ca6b8abddbb4e41d8d390af91c551a427fe2d8e
Netflix/mantis-mql
optimization.clj
; Copyright 2019 Netflix , 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 unde...
null
https://raw.githubusercontent.com/Netflix/mantis-mql/94600fc687afd380e6a063806a5f0dd0be218f34/mql-jvm/src/main/clojure/io/mantisrx/mql/jvm/optimization.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing pe...
Copyright 2019 Netflix , Inc. distributed under the License is distributed on an " AS IS " BASIS , (ns io.mantisrx.mql.jvm.optimization "Query optimization functions, the objective of this namespace is to take a parse tree from the parser and produce a higher performing but equivalent tree. Note that...
9ff6e1249c5f73a9167e73daae7c4d2e32ac627b52343d10231584a64fb0639b
quek/paiprolog
tutor.lisp
;;; -*- Mode: Lisp; Syntax: Common-Lisp -*- Code for Paradigms of AI Programming Copyright ( c ) 1996 PAIP TUTOR (requires "auxfns") (defvar *chapters* '() "List of chapter structures, one per chapter.") (defun do-examples (chapters &optional (stream *standard-output*)) "Run examples from one or more chap...
null
https://raw.githubusercontent.com/quek/paiprolog/012d6bb255d8af7f1c8b1d061dcd8a474fb3b57a/tutor.lisp
lisp
-*- Mode: Lisp; Syntax: Common-Lisp -*- If given a chapter, just return it. print out what's happening unless INTERFACE is nil. To avoid NCONC problems Return nil if there is a unexpected result: could be more mathematically sophisticated GUI Implementation is the window in which the examples will be displayed....
Code for Paradigms of AI Programming Copyright ( c ) 1996 PAIP TUTOR (requires "auxfns") (defvar *chapters* '() "List of chapter structures, one per chapter.") (defun do-examples (chapters &optional (stream *standard-output*)) "Run examples from one or more chapters and sum the number of errors. If al...
f16a9a8347e3f4be462607616a8e601c7e2603f160c33ef159ebef044d991d41
diagrams/diagrams-pgf
PGF.hs
# LANGUAGE TypeFamilies # ----------------------------------------------------------------------------- -- | -- Module : Diagrams.Backend.PGF Copyright : ( c ) 2015 -- License : BSD-style (see LICENSE) -- Maintainer : -- A full - featured PGF backend for diagrams producing PGF code suitable ...
null
https://raw.githubusercontent.com/diagrams/diagrams-pgf/da500cd576a9b85da79fda9bfa49cfc3e3b9325f/src/Diagrams/Backend/PGF.hs
haskell
--------------------------------------------------------------------------- | Module : Diagrams.Backend.PGF License : BSD-style (see LICENSE) Maintainer : ".tex" or ".pdf" file; * You can use the most flexible 'renderDia' function to access the resulting PGF code directly in memory as a byt...
# LANGUAGE TypeFamilies # Copyright : ( c ) 2015 A full - featured PGF backend for diagrams producing PGF code suitable for LaTeX , ConTeXt or plain consumption . To invoke the PGF backend , you have a number of options . * You can use ' renderPGF ' or ' renderPGF '' to render a ' Diagram ' to a Th...
8afdd2bb4f7972c83701b4470f0095a4f48f328325b9340e16bb56f4b6010761
elaforge/karya
Soundboard.hs
Copyright 2017 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt # LANGUAGE RecordWildCards # module Ness.Soundboard where import Prelude hiding (String) import qualified Data.Map as Map import qualified Data.Text as Text import Global import Ness.Glo...
null
https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Ness/Soundboard.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt * instrument kg/m ^ Young's modulus ? ? ^ negative, from below strings ^ below frets | variation in baseboard profile, small positive kg/m * score
Copyright 2017 # LANGUAGE RecordWildCards # module Ness.Soundboard where import Prelude hiding (String) import qualified Data.Map as Map import qualified Data.Text as Text import Global import Ness.Global renderAll :: SamplingRate -> (Instrument, Score) -> (Text, Text) renderAll sr (instrument, score) = (re...
4292fc4239c5d1519a02b80e9d5efce75137f4db32f2584232d0f92cbedb372f
distrap/lambdadrive
PWMTest.hs
module Main where import Ivory.Tower.Config import Ivory.OS.FreeRTOS.Tower.STM32 import LDrive.Platforms import LDrive.Tests.PWM (app) main :: IO () main = compileTowerSTM32FreeRTOS testplatform_stm32 p $ app (stm32config_clock . testplatform_stm32) testplatform_pwm testplatform_leds...
null
https://raw.githubusercontent.com/distrap/lambdadrive/2bbf6b173fbc1c6d1f809ee4f95ec0bf737d7064/test/PWMTest.hs
haskell
module Main where import Ivory.Tower.Config import Ivory.OS.FreeRTOS.Tower.STM32 import LDrive.Platforms import LDrive.Tests.PWM (app) main :: IO () main = compileTowerSTM32FreeRTOS testplatform_stm32 p $ app (stm32config_clock . testplatform_stm32) testplatform_pwm testplatform_leds...
a368dc9c7b49e762caf15e756ca26534a47f2c9bff38e0758722c23cdd1130b2
sile/erl-rtmpmsg
rtmpmsg_chunk_encode_tests.erl
%% coding: latin-1 -module(rtmpmsg_chunk_encode_tests). -include_lib("eunit/include/eunit.hrl"). -include("../include/internal/rtmpmsg_internal.hrl"). -define(FMT_0(ChunkIdLessThan64, TimestampLessThan4bytes, Type, StreamId, Data), (<<0:2, ChunkIdLessThan64:6, TimestampLessThan4bytes:24, (byte_size...
null
https://raw.githubusercontent.com/sile/erl-rtmpmsg/8ab84ef3cfe859d321f24d280b2959cd796156f2/test/rtmpmsg_chunk_encode_tests.erl
erlang
coding: latin-1 16#FFFFFF 以上の値 1小さい 16#FFFFFF 以上の差 16#FFFFFF ちょうどのケース 1小さい
-module(rtmpmsg_chunk_encode_tests). -include_lib("eunit/include/eunit.hrl"). -include("../include/internal/rtmpmsg_internal.hrl"). -define(FMT_0(ChunkIdLessThan64, TimestampLessThan4bytes, Type, StreamId, Data), (<<0:2, ChunkIdLessThan64:6, TimestampLessThan4bytes:24, (byte_size(Data)):24, Type:8,...
8f615172f495161c1f9af5c01686780aa5816c04e51da20e2379a29485601a19
fourmolu/fourmolu
contexts-four-out.hs
instance (Eq a) => Eq [a] where (==) _ _ = False instance ( Ord a , Ord b ) => Ord (a, b) where compare _ _ = GT instance (Show a, Show b) => Show ( a , b ) where showsPrec _ _ = showString ""
null
https://raw.githubusercontent.com/fourmolu/fourmolu/f47860f01cb3cac3b973c5df6ecbae48bbb4c295/data/examples/declaration/instance/contexts-four-out.hs
haskell
instance (Eq a) => Eq [a] where (==) _ _ = False instance ( Ord a , Ord b ) => Ord (a, b) where compare _ _ = GT instance (Show a, Show b) => Show ( a , b ) where showsPrec _ _ = showString ""
82ad3325608e32bcfb552deda6e8064357aabe77fbff5f0c696b56f1ba374ddb
binghe/cl-net-snmp
portable-threads.lisp
;;;; -*- Mode:Common-Lisp; Package:PORTABLE-THREADS; Syntax:common-lisp -*- ;;;; *-* File: /usr/local/gbbopen/source/tools/portable-threads.lisp *-* ;;;; *-* Edited-By: cork *-* * - * Last - Edit : We d Nov 6 06:13:49 2013 * - * ;;;; *-* Machine: phoenix.corkills.org *-* ;;;; **************************************...
null
https://raw.githubusercontent.com/binghe/cl-net-snmp/3cf053bce75734097f0d7e2245a53fa0c45f5e05/vendor/portable-threads.lisp
lisp
-*- Mode:Common-Lisp; Package:PORTABLE-THREADS; Syntax:common-lisp -*- *-* File: /usr/local/gbbopen/source/tools/portable-threads.lisp *-* *-* Edited-By: cork *-* *-* Machine: phoenix.corkills.org *-* ************************************************************************** **************************************...
* - * Last - Edit : We d Nov 6 06:13:49 2013 * - * * Portable Threads ( Multiprocessing ) Interface Written by : Copyright ( C ) 2003 - 2013 , < > Developed and supported by the GBBopen Project ( ) and donated to the CL Gardeners portable threads initiative ( ) . ( Licenced under ...
21605da3189557cf6ee5e399529470e3c2f9a37feba014f5011859c35aa494af
takeoutweight/shade
Events.hs
module Shade.Core.Events ( EventProperties(..) , ModifierKeys(..) , MouseEvent(..) , KeyboardEvent(..) , ChangeEvent(..) , FocusEvent(..) ) where import Shade.Core.Internal.Events
null
https://raw.githubusercontent.com/takeoutweight/shade/844050839a52692c095401a874b0cd61f0f665bd/shade-core/src/Shade/Core/Events.hs
haskell
module Shade.Core.Events ( EventProperties(..) , ModifierKeys(..) , MouseEvent(..) , KeyboardEvent(..) , ChangeEvent(..) , FocusEvent(..) ) where import Shade.Core.Internal.Events
2aa432a77c64d43c9490db587551878253f232f90d752dd6ea36598f273c6419
mirage/ocaml-rpc
rpc_empty_module.ml
THe clang toolchain does n't like archives with no elements , * see * see -rpc/issues/44 *)
null
https://raw.githubusercontent.com/mirage/ocaml-rpc/fdbf7f5c3e4f0c75837f0a96d5d4d6458805fd57/src/lib/rpc_empty_module.ml
ocaml
THe clang toolchain does n't like archives with no elements , * see * see -rpc/issues/44 *)
56fe9ac3944b9283c47f92a630f154308812f706720f4d4e18d919e59bfdb617
facebook/infer
bufferOverrunSemantics.mli
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/2e3b33f21214653742967e5e1ab3235cc6d43e41/infer/src/bufferoverrun/bufferOverrunSemantics.mli
ocaml
* Check if an expression is a stack variable such as [n$0] or local variable for C array * Evalute an expression * [eval_locs exp mem] is like [eval exp mem |> Val.get_all_locs] but takes some shortcuts to avoid computing useless and/or problematic intermediate values * Return the array value of the input expres...
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
40d87c494d56b5fddd480cde02808ad2c98ed255dff572affe9b5e1996a1f88c
okuoku/nausicaa
enums.sps
Copyright ( c ) 2008 ;;; ;;;This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation ; either version 2 of the ;;;License, or (at your option) any later version. ;;; ;;;This library...
null
https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/tests/r6rs/run/enums.sps
scheme
This library is free software; you can redistribute it and/or modify either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR ...
Copyright ( c ) 2008 it under the terms of the GNU Library General Public License as Library General Public License for more details . You should have received a copy of the GNU Library General Public Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 U...
c2207f2b51af63cbdeb702bd12881c0b51c0f19577ab47e6f727fa85cef52b60
jserot/fsml
event.ml
(**********************************************************************) (* *) This file is part of the FSML library (* github.com/jserot/fsml *) (* ...
null
https://raw.githubusercontent.com/jserot/fsml/9e3e04acbbb1cb1700fa9d4a0497f35ad4f70796/src/lib/event.ml
ocaml
******************************************************************** github.com/jserot/fsml ...
This file is part of the FSML library Copyright ( c ) 2020 - present , . All rights reserved . type t = Expr.ident * Expr.e_val [@@deriving show {with_path=false}] let to_string a = match a with | (id, v) -> id ^ ":=" ^ Expr.string_of_value v
2ba74fe58881987b4ea674cfb86e644da4ddb76104b88ac3a9c8fc60b4d082c7
acl2/acl2
let-vars-in-term.lisp
; A utility to gather the let-bound vars in a term ; Copyright ( C ) 2008 - 2011 and Stanford University Copyright ( C ) 2013 - 2023 Kestrel Institute ; License : A 3 - clause BSD license . See the file books/3BSD - mod.txt . ; Author : ( ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/acl2/acl2/4a7cd3dee752dfbf8e390f67de6a1d2e6f604f7e/books/kestrel/terms-light/let-vars-in-term.lisp
lisp
A utility to gather the let-bound vars in a term We use the term "let var" to mean a variable bound in a lambda that is not trivially bound (that is, that is not bound to itself). Trivial bindings often arise because lambdas in ACL2 must be closed. Gather all the vars that are bound in lambdas in TERM, except...
Copyright ( C ) 2008 - 2011 and Stanford University Copyright ( C ) 2013 - 2023 Kestrel Institute License : A 3 - clause BSD license . See the file books/3BSD - mod.txt . Author : ( ) (in-package "ACL2") (include-book "non-trivial-formals") (include-book "tools/flag" :dir :system) (local (include-book ...
827d30a0eb6dbfc58ea7b97b9f1b896f5eb638438f06469d9e49670def0f7b85
pallet/pallet-vmfest
service.clj
;; you should not try to load this namespace if no vboxj*.jar is in ;; the classpath. (require 'vmfest.virtualbox.version) (let [vbox-load-exception (Exception. (str "No VirtualBox library loaded. This namespace can only be " "referred to *after* a vmfest provider is initialized or if " ...
null
https://raw.githubusercontent.com/pallet/pallet-vmfest/b0cef2030063ca02ff86daa754d870c13186d695/src/pallet/compute/vmfest/service.clj
clojure
you should not try to load this namespace if no vboxj*.jar is in the classpath. needs to be before vmfest feature predicates fallback os family translation data. This should be removed once everyone is using metadata in their images. :rhel "RedHat" names of tags used to tag the VMs once created gui, headless or...
(require 'vmfest.virtualbox.version) (let [vbox-load-exception (Exception. (str "No VirtualBox library loaded. This namespace can only be " "referred to *after* a vmfest provider is initialized or if " "a vboxjws.jar or vboxjxpcom.jar library is in the classpath."))] (when (= :err...
3966a7852280ec6e7a932d9983baebc8dea0399736fd86901d2cf78b64c6a973
kingcons/advent-of-code
day02.lisp
(mgl-pax:define-package :aoc.2021.02 (:nicknames :2021.02) (:use :cl :aoc.util :mgl-pax)) (in-package :2021.02) (defsummary (:title "Dive!") "**Part 1** - Plotting the Course" (plot-course function) "**Part 2** - One Does Not Simply Dive" (plot-course-aim function)) (defun build-data (&optional input) ...
null
https://raw.githubusercontent.com/kingcons/advent-of-code/ef8dfb86dda085f5f733c9909aedde476ea498e2/src/2021/day02.lisp
lisp
(mgl-pax:define-package :aoc.2021.02 (:nicknames :2021.02) (:use :cl :aoc.util :mgl-pax)) (in-package :2021.02) (defsummary (:title "Dive!") "**Part 1** - Plotting the Course" (plot-course function) "**Part 2** - One Does Not Simply Dive" (plot-course-aim function)) (defun build-data (&optional input) ...
a0212e507ff78ab943a68cd7fe68b3ec1ad3eea350aed09226ce5e369343ffc3
rpav/cl-interval
sdot.lisp
(in-package :interval-test) (defun sdot-aa-tree (tree &optional (filename "tree.dot")) (when tree (with-open-file (stream filename :direction :output :if-exists :supersede) (s-dot:s-dot->dot stream `(s-dot::graph () ,@(sdot-node (interval::tree-r...
null
https://raw.githubusercontent.com/rpav/cl-interval/2ffd7990e23533f200dc6b1b3521c5ca808e9c23/t/sdot.lisp
lisp
(in-package :interval-test) (defun sdot-aa-tree (tree &optional (filename "tree.dot")) (when tree (with-open-file (stream filename :direction :output :if-exists :supersede) (s-dot:s-dot->dot stream `(s-dot::graph () ,@(sdot-node (interval::tree-r...
dbdf4ee757a32bafdf1d8ba3f33200e1b8e978b3b4532efe9426eb6cfd4b99d5
peak6/mmd_core
p6dmap.erl
Copyright 2011 PEAK6 Investments , L.P. %% 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 d...
null
https://raw.githubusercontent.com/peak6/mmd_core/f90469ea9eac8cd607aa6ec5b9ad6ff003a35572/src/p6dmap.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 2011 PEAK6 Investments , L.P. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(p6dmap). -compile([export_all]). -include("p6core.hrl"). -include("dmap.hrl"). ensure(Name) -> case lists:member(Name,al...
cb9c94d6d6f20dbc9e4f51403464ab11b07c6b288f9852f2b9b5bc6717496dbb
dizzyd/retest
retest_config.erl
-*- tab - width : 4;erlang - indent - level : 4;indent - tabs - mode : nil -*- %% ex: ts=4 sw=4 et %% ------------------------------------------------------------------- %% %% retest: Testing Framework %% Copyright ( c ) 2010 ( ) %% %% Permission is hereby granted, free of charge, to any person obtaining a copy ...
null
https://raw.githubusercontent.com/dizzyd/retest/6b33038bd4df4aab1dc15bb59076512ba8fbb113/src/retest_config.erl
erlang
ex: ts=4 sw=4 et ------------------------------------------------------------------- retest: Testing Framework 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, distrib...
-*- tab - width : 4;erlang - indent - level : 4;indent - tabs - mode : nil -*- Copyright ( c ) 2010 ( ) 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 . ...
1ecaf57f588312ba801253d6c348d2396e8ebeeb461cadc7bd83f19a6d428036
routineco/ocaml-nanoid
versions.ml
module Intf = struct (** Random bytes generator *) module type RNG = sig (** [random_bytes size] returns a buffer and a offset at which [size] fresh random bytes are readable. *) val random_bytes : int -> bytes * int end (** Nano ID generator *) module type S = sig * [ nanoid ? size ( ) ] gen...
null
https://raw.githubusercontent.com/routineco/ocaml-nanoid/c407ea9edd5be88a1f74c10eae0db4dc5debe185/lib/src/os/versions.ml
ocaml
* Random bytes generator * [random_bytes size] returns a buffer and a offset at which [size] fresh random bytes are readable. * Nano ID generator * [pseudo_seeded seed] is a [RNG] module that generates pseudo random numbers based on the given [seed]. It is subject to the same limitations as {!Cry...
module Intf = struct module type RNG = sig val random_bytes : int -> bytes * int end module type S = sig * [ nanoid ? size ( ) ] generates a random Nano ID of size [ size ] , which defaults to 21 . defaults to 21. *) val nanoid : ?size:int -> unit -> string end end module type VERSIO...
1fe08069e9fc13b9f5f3c4162ae716cd806a95c5519d9deaf8c60ef9c38ea72a
yav/hobbit
Tree.hs
module Tree(Tree(..), Label(..), Forest, html) where data Label = String :? String deriving Show data Tree = Node [Label] Forest deriving Show type Forest = [Tree] open = "[+]" close = "[-]" label (txt :? "") = txt label (txt :? tip) = "<span title=" ++ show tip ++ ">" ++ txt ++ "</span>" tree_btn n = ...
null
https://raw.githubusercontent.com/yav/hobbit/31414ba1188f4b39620c2553b45b9e4d4aa40169/src/Utils/Tree.hs
haskell
module Tree(Tree(..), Label(..), Forest, html) where data Label = String :? String deriving Show data Tree = Node [Label] Forest deriving Show type Forest = [Tree] open = "[+]" close = "[-]" label (txt :? "") = txt label (txt :? tip) = "<span title=" ++ show tip ++ ">" ++ txt ++ "</span>" tree_btn n = ...
25cb662b6a73349b81e94e40a8e195392a487ad945367dd845d3b5cecf8e336a
savonet/ocaml-mm
graphics_test.ml
open Mm let show img = let width = Image.YUV420.width img in let height = Image.YUV420.height img in let img = Image.YUV420.to_int_image img in Graphics.open_graph ""; Graphics.resize_window width height; let img = Graphics.make_image img in Graphics.draw_image img 0 0; Graphics.synchronize (); Graph...
null
https://raw.githubusercontent.com/savonet/ocaml-mm/30fd98b44e4f567e55c65249713baae370878a39/examples/graphics_test.ml
ocaml
open Mm let show img = let width = Image.YUV420.width img in let height = Image.YUV420.height img in let img = Image.YUV420.to_int_image img in Graphics.open_graph ""; Graphics.resize_window width height; let img = Graphics.make_image img in Graphics.draw_image img 0 0; Graphics.synchronize (); Graph...
84c6a0b1bc3da46e213bb79be5922fe1d3e6bb02e219f9701339007347dabd11
static-analysis-engineering/codehawk
jCHPreSumTypeSerializer.mli
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Copy...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchpre/jCHPreSumTypeSerializer.mli
ocaml
jchlib jchpre
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Copy...
9e2a1d9b92d7e59d87d94ade74f1a4726e1de9c69736e9a9652fb8bc3581895f
VictorNicollet/Ohm
en.adlib.ml
| `ErrorPage_PoweredBy -> "This web site is powered by" | `ErrorPage_Error404_Title -> "404 Page not found" | `ErrorPage_Error404_Sorry -> "We cannot seem to locate the page you are looking for. We apologize for the inconvenience, and hope you will be able to find what you seek."
null
https://raw.githubusercontent.com/VictorNicollet/Ohm/ca90c162f6c49927c893114491f29d44aaf71feb/install/assets/errorPage/en.adlib.ml
ocaml
| `ErrorPage_PoweredBy -> "This web site is powered by" | `ErrorPage_Error404_Title -> "404 Page not found" | `ErrorPage_Error404_Sorry -> "We cannot seem to locate the page you are looking for. We apologize for the inconvenience, and hope you will be able to find what you seek."
816c1dbeb75be2d1215477c72876bc228ed3ccc72a12e03fad76c53dcf2e2d83
LispEngineer/aiband
random.clj
Copyright 2016 , Jr. symbolics _ at _ lisp.engineer ;; / ;; Aiband - The Artificial Intelligence Roguelike ;;;; Random utilities ;; For now, these are impure. Eventually I'll want to make a full random ;; monad with properly pure random stuff. (ns aiband.random (:require [aiband.v2d :refer :all :reloa...
null
https://raw.githubusercontent.com/LispEngineer/aiband/c29181401ba8767099aac52120651f99d36af7a3/Assets/aiband/random.clj
clojure
/ Random utilities For now, these are impure. Eventually I'll want to make a full random monad with properly pure random stuff. We specifically don't want update-val and update-state as we made better versions of these #include <stdint.h> uint64_t x; /* The state must be seeded with a nonzero value. */ // ...
Copyright 2016 , Jr. symbolics _ at _ lisp.engineer Aiband - The Artificial Intelligence Roguelike (ns aiband.random (:require [aiband.v2d :refer :all :reload true] [clojure.algo.monads :as µ :refer [domonad with-state-field fetch-val set-val]] [aiband.monads :as aµ...
20e3c4d07b7b321178df3fec7bcf3c9afd2ea23bef276a2ee0ad8a925a081c53
facebook/flow
file_key.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/d9917bafb64def6d5f01353d2a54ec1e31c40f56/src/parser/file_key.ml
ocaml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
ec57274115e0881d983987da3057714aedd8d7880123bd8c426572bbcd60fcb0
Perry961002/SICP
exe2.30-square-tree.scm
(define (square x) (* x x)) ;第一种定义 (define (square-tree items) (cond ((null? items) '()) ((not (pair? items)) (square items)) (else (cons (square-tree (car items)) (square-tree (cdr items)))))) ;第二种定义 (define (square-tree items) (map (lambda (x) (...
null
https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap2/exercise/exe2.30-square-tree.scm
scheme
第一种定义 第二种定义
(define (square x) (* x x)) (define (square-tree items) (cond ((null? items) '()) ((not (pair? items)) (square items)) (else (cons (square-tree (car items)) (square-tree (cdr items)))))) (define (square-tree items) (map (lambda (x) (if (pair? x) ...
af647c28f21d083904405943b104190cbf158bb85b8c9019b7e9bab93cb3d879
gleber/dstree
dstree_utils.erl
-module(dstree_utils). -export([shuffle/1, random_pick/2, cancel_timer/1, apply_after/4 ]). shuffle(List) -> shuffle(List, []). shuffle([], Acc) -> Acc; shuffle(List, Acc) -> {Leading, [H | T]} = lists:split(crypto:rand_uniform(0, length(List)), List), shuffle(Leading ++ T, [H | Acc]). r...
null
https://raw.githubusercontent.com/gleber/dstree/5eab708fa9a74e807c822e14b4d39759a3f2c200/src/dstree_utils.erl
erlang
-module(dstree_utils). -export([shuffle/1, random_pick/2, cancel_timer/1, apply_after/4 ]). shuffle(List) -> shuffle(List, []). shuffle([], Acc) -> Acc; shuffle(List, Acc) -> {Leading, [H | T]} = lists:split(crypto:rand_uniform(0, length(List)), List), shuffle(Leading ++ T, [H | Acc]). r...
b6db1f321756654a69294fec39be5212a3391bfed6a9ff4e9ef18909e5c23509
ptigwe/hs-flatris
Model.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveAnyClass #-} module Model where import Data.Aeson import Data.Aeson.Types import GHC.Generics import Grid import Miso import Miso.String (MisoString) import qualified Miso.String as S import System.Random import Tetromino data Model = Model { linesCleared :: Int , st...
null
https://raw.githubusercontent.com/ptigwe/hs-flatris/e428d3825a0cf60e4182f8e7c6de652fbc1f3360/src/Model.hs
haskell
# LANGUAGE DeriveAnyClass # Whether or not to perform the action Whether or not it is the currect time to act
# LANGUAGE DeriveGeneric # module Model where import Data.Aeson import Data.Aeson.Types import GHC.Generics import Grid import Miso import Miso.String (MisoString) import qualified Miso.String as S import System.Random import Tetromino data Model = Model { linesCleared :: Int , state :: State , score :: Int ...
664717edd24a2d131bd664014c2029cf241f1c5d4f79a676d4c301cfb32ca209
alexandergunnarson/quantum
reify.cljc
(ns quantum.test.core.macros.reify (:require [quantum.core.macros.reify :as ns])) (defn test:gen-reify-def [{:keys [sym ns-qualified-interface-name reify-body]}]) (defn test:gen-reify-body-raw [{:keys [ns-qualified-interface-name genned-method-name gen-interface-code-body-expanded]}]) (de...
null
https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/test/quantum/test/core/macros/reify.cljc
clojure
(ns quantum.test.core.macros.reify (:require [quantum.core.macros.reify :as ns])) (defn test:gen-reify-def [{:keys [sym ns-qualified-interface-name reify-body]}]) (defn test:gen-reify-body-raw [{:keys [ns-qualified-interface-name genned-method-name gen-interface-code-body-expanded]}]) (de...
4861404019eef86d3ae7974f94de5106078633ee4b43fde03d7c55655220397d
sangkilc/ofuzz
prob.ml
(* minimizer - delta debugging on a crash, seed pair *) * minimizer @author < sangkil.cha\@gmail.com > @since 2014 - 03 - 19 @author Sang Kil Cha <sangkil.cha\@gmail.com> @since 2014-03-19 *) Copyright ( c ) 2014 , All rights reserved . Redistribution and use in source and ...
null
https://raw.githubusercontent.com/sangkilc/ofuzz/ba53cc90cc06512eb90459a7159772d75ebe954f/src/prob.ml
ocaml
minimizer - delta debugging on a crash, seed pair
* minimizer @author < sangkil.cha\@gmail.com > @since 2014 - 03 - 19 @author Sang Kil Cha <sangkil.cha\@gmail.com> @since 2014-03-19 *) Copyright ( c ) 2014 , All rights reserved . Redistribution and use in source and binary forms , with or without modification , are perm...
49123a3c7e24f33ff14f5b2da175d3b8b5524a594255289eb5be43d208fb685c
pepeiborra/term
Var.hs
# LANGUAGE TypeFamilies # # LANGUAGE DeriveGeneric # module Data.Term.Var where import Control.Monad.Free import Control.Monad.Variant (Rename(..)) import Control.DeepSeq import Data.Term.Substitutions import qualified Data.Var.Family as Family import qualified Data.Set as Set import Debug.Hoed.Observe data Var = V...
null
https://raw.githubusercontent.com/pepeiborra/term/7644e0f8fbc81754fd5255602dd1f799adcd5938/Data/Term/Var.hs
haskell
# LANGUAGE TypeFamilies # # LANGUAGE DeriveGeneric # module Data.Term.Var where import Control.Monad.Free import Control.Monad.Variant (Rename(..)) import Control.DeepSeq import Data.Term.Substitutions import qualified Data.Var.Family as Family import qualified Data.Set as Set import Debug.Hoed.Observe data Var = V...
2ff27a081c81bd74ec90bc549b7b558eba094a0b4f7368db4d5156a3d3bd8478
pkamenarsky/replica
Spec.hs
# LANGUAGE StandaloneDeriving # module Main where import Data.Monoid import qualified Data.Text as T import Test.QuickCheck import Test.QuickCheck.Instances import Replica.VDOM import Replica.VDOM.Types instance Arbitrary EventOptions where arbitrary = EventOptio...
null
https://raw.githubusercontent.com/pkamenarsky/replica/b0422a7b5267bee613b08307ec44c6fadcaf1551/test/Spec.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
# LANGUAGE StandaloneDeriving # module Main where import Data.Monoid import qualified Data.Text as T import Test.QuickCheck import Test.QuickCheck.Instances import Replica.VDOM import Replica.VDOM.Types instance Arbitrary EventOptions where arbitrary = EventOptio...
8f83b98ce63272893043d4a002e50b5a5c9d66e7da34e77cd0718c070a5cee0b
HunterYIboHu/htdp2-solution
ex175-wc.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex175-wc) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-dec...
null
https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter2/Section11-more-on-list/ex175-wc.rkt
racket
about the language level of this file in a form that our tools can easily process. data difinitions - '() - (cons String LOS) - '() - (cons LOS LLS) FI(file informations) is (make-file-info Number Number Number) words and lines in the specific file. main function String -> FI consume the given file name and ...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex175-wc) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (require 2htdp/batch-io) 1String is a String whose len...
30313fb52ba7296518de23a2a7e2ab5c658da3f1d3c89b0100df764efa4ababc
parof/wstat
AbstractDomain.hs
module Interfaces.AbstractDomain where -- we have grouped all these operations in a single class due to haskell -- implementation's mechanism, -- if we modualize into multiple class this 'AbstractDomain' module, then -- for any both concrete and abstract domains we have to define each multiple -- instances, -- in conc...
null
https://raw.githubusercontent.com/parof/wstat/369cf5d1d92ef235049c29ad2f1cc6fd53747754/src/Interfaces/AbstractDomain.hs
haskell
we have grouped all these operations in a single class due to haskell implementation's mechanism, if we modualize into multiple class this 'AbstractDomain' module, then for any both concrete and abstract domains we have to define each multiple instances, in conclusion the former saved a lot of work --------------...
module Interfaces.AbstractDomain where class (Eq p, Show p) => AbstractDomain p where Poset subset :: p -> p -> Bool join :: p -> p -> p meet :: p -> p -> p Complete Lattice top :: p bottom :: p widen :: p -> p -> p...
e68f3e01ce7138a9b0c6a0bc1e0a5be138c401de1caacef1488aafc403a11a3b
rmculpepper/racket-http123
hpack.rkt
Copyright 2021 SPDX - License - Identifier : Apache-2.0 #lang racket/base (require racket/match racket/vector binaryio/reader binaryio/bitvector binaryio/prefixcode) (provide (all-defined-out)) ;; Reference: ;; - ;; Note on header field names: RFC 7541 says field names are ...
null
https://raw.githubusercontent.com/rmculpepper/racket-http123/2aecd4e7b487c29239b4f93fdd7f474429192057/http123-lib/private/hpack.rkt
racket
Reference: - Note on header field names: RFC 7541 says field names are treated as opaque sequences of octets. But HTTP/2 requires canonical form (lower-cased). This module assumes inputs are already in canonical form. TODO: - implement policies, limits - be smarter about indexing (eg, don't index huge value t...
Copyright 2021 SPDX - License - Identifier : Apache-2.0 #lang racket/base (require racket/match racket/vector binaryio/reader binaryio/bitvector binaryio/prefixcode) (provide (all-defined-out)) HeaderEntry = ( list Bytes Bytes ) | ( list Bytes Bytes ' never - add ) e...
e47c124923fe5b7ee846beda336a1fd6470dbf74738376284e84de8b670bc263
jesuswr/language-bender
Types.hs
{- Project wide common types -} module Utils.Types where type Name = String
null
https://raw.githubusercontent.com/jesuswr/language-bender/03bca9e18dfeb4db67190c9ff13c7983489394e7/language-bender/src/Utils/Types.hs
haskell
Project wide common types
module Utils.Types where type Name = String