_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
d80d051614eaea2bcd2dd8fa11e60d2378d64ddb36c2fcbbeb074a0548d90859
lspitzner/brittany
Test171.hs
import VeryLongModuleNameThatCouldEvenCauseAnEmptyBindingListToExpandIntoMultipleLine ( )
null
https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test171.hs
haskell
import VeryLongModuleNameThatCouldEvenCauseAnEmptyBindingListToExpandIntoMultipleLine ( )
fd2695c1610955ff6cd732484082952eb794ec26f6e26285e53d9d4a9357e42d
eltex-ecss/chronica
chronica_disk_log_1.erl
%%%------------------------------------------------------------------- -*- coding : utf-8 -*- @author ( C ) 2015 , Eltex , Novosibirsk , Russia %%% @doc %%% %%% @end Software distributed under the License is distributed on an " AS IS " %%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See %...
null
https://raw.githubusercontent.com/eltex-ecss/chronica/bdc9f37797cd74215a02aabedf03b09005e9b21f/src/chronica_disk_log_1.erl
erlang
------------------------------------------------------------------- @doc @end basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. ------------------------------------------------------------------- logged it...
-*- coding : utf-8 -*- @author ( C ) 2015 , Eltex , Novosibirsk , Russia Software distributed under the License is distributed on an " AS IS " Current module based on disk_log distributed by Ericsson AB -module(chronica_disk_log_1). -include("chronica_int.hrl"). -include_lib("pt_scripts/include/pt_macro.h...
caf34dc0dbf247768e8de89eb38103bf3a15a82c7912dc3153f76bdf6f5bfd00
exoscale/clostack
payload.clj
(ns clostack.payload "Functions to work with appropriate cloudstack payloads." (:require [clj-time.format :as f] [clj-time.core :as t] [clojure.string :as s] [clostack.date :refer [expires-args]] [clostack.signature :as sig] [clostack.util...
null
https://raw.githubusercontent.com/exoscale/clostack/551865988fdb540cb3c6fb901ab84283a63dfdd6/src/clostack/payload.clj
clojure
(ns clostack.payload "Functions to work with appropriate cloudstack payloads." (:require [clj-time.format :as f] [clj-time.core :as t] [clojure.string :as s] [clostack.date :refer [expires-args]] [clostack.signature :as sig] [clostack.util...
da6a3dbe7b7b8198b79f9e24a4c597cf12661c106b14ea41cef797485a189454
ntrocado/cl-collider-examples
6-2.lisp
(defparameter *a* (bus-audio)) (defparameter *c* (bus-control)) ;; at the repl: (busnum *a*) (busnum *c*) ;;; any argument of a synth can be mapped to by control buses: (defsynth map-example ((freq 440)) (out.ar 0 (sin-osc.ar freq 0 0.1))) (defparameter *g* (synth 'map-example)) (control-set (busnum *c*) 6...
null
https://raw.githubusercontent.com/ntrocado/cl-collider-examples/67eec426ea45f5423eefd9391d9a7e8ba41f8b51/nick-collins-tutorial/6-2.lisp
lisp
at the repl: any argument of a synth can be mapped to by control buses: here is an additional example
(defparameter *a* (bus-audio)) (defparameter *c* (bus-control)) (busnum *a*) (busnum *c*) (defsynth map-example ((freq 440)) (out.ar 0 (sin-osc.ar freq 0 0.1))) (defparameter *g* (synth 'map-example)) (control-set (busnum *c*) 660) (map-bus *g* :freq *c*) (control-set (busnum *c*) 770) (defparameter *h* (...
85c99376c3440613658386ed13dd3d1c10fb6674ea17f244e355f6ea1c7cad54
janestreet/universe
types.mli
open! Core open! Async module Window : sig type t = Nvim_internal.Types.Window.t include Sexpable.S with type t := t include Hashable.S with type t := t include Comparable.S with type t := t val of_msgpack : Msgpack.t -> t Or_error.t val to_msgpack : t -> Msgpack.t end module Buf : sig type t = Nvim_i...
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/vcaml/src/types.mli
ocaml
open! Core open! Async module Window : sig type t = Nvim_internal.Types.Window.t include Sexpable.S with type t := t include Hashable.S with type t := t include Comparable.S with type t := t val of_msgpack : Msgpack.t -> t Or_error.t val to_msgpack : t -> Msgpack.t end module Buf : sig type t = Nvim_i...
f3e2ac571e25827d26161f4c74120fd59010046a87839345af4e16e03aff1bc8
EFanZh/EOPL-Exercises
exercise-2.14.rkt
#lang eopl Exercise 2.14 [ ★ ★ ] Extend the representation of the preceding exercise to include a third procedure that implements has - binding ? ( see exercise 2.9 ) . (define report-no-binding-found (lambda (search-var) (eopl:error 'apply-env "No binding for ~s" search-var))) (define empty-env (lambda ...
null
https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/solutions/exercise-2.14.rkt
racket
#lang eopl Exercise 2.14 [ ★ ★ ] Extend the representation of the preceding exercise to include a third procedure that implements has - binding ? ( see exercise 2.9 ) . (define report-no-binding-found (lambda (search-var) (eopl:error 'apply-env "No binding for ~s" search-var))) (define empty-env (lambda ...
6596978b444d923866cd77377be4685706ede8a949d96b4656fac9d817190253
Frama-C/Frama-C-snapshot
history.ml
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/gui/history.ml
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
7f7486bd7b00ba43746016260e76ba75c9d36a6b7335fcaa646ce05e255aeba0
avsm/melange
ssh_channel.mli
exception Bad_access class channel : packet_size:int32 -> initial_window:int32 -> channel:int32 -> Ssh_env_t.t -> object val mutable automaton : Ssh_server_channel.t val mutable close : bool val mutable exit_status : int option val mutable interactive : bool val mutable other_channel : int...
null
https://raw.githubusercontent.com/avsm/melange/e92240e6dc8a440cafa91488a1fc367e2ba57de1/lib/ssh/ssh_channel.mli
ocaml
exception Bad_access class channel : packet_size:int32 -> initial_window:int32 -> channel:int32 -> Ssh_env_t.t -> object val mutable automaton : Ssh_server_channel.t val mutable close : bool val mutable exit_status : int option val mutable interactive : bool val mutable other_channel : int...
1070c39a1fc5206942d7756ff826a2e15da1c709f881f6c309afa4613f9447c6
racket/racklog
racklog.rkt
#lang racket/base (require (for-syntax racket/base racket/list syntax/kerncase) racket/list racket/contract racket/stxparam "control.rkt" "unify.rkt") 1989 , revised Feb. 1993 , Mar. 1997 (define-syntax %let (syntax-rules () ...
null
https://raw.githubusercontent.com/racket/racklog/89e983ec7d2df0ed919e6630403b0f4d0393728e/racklog.rkt
racket
Base case (all lists empty) Call and recur basically inlined cut-fail XXX Add contracts in theses macro expansions
#lang racket/base (require (for-syntax racket/base racket/list syntax/kerncase) racket/list racket/contract racket/stxparam "control.rkt" "unify.rkt") 1989 , revised Feb. 1993 , Mar. 1997 (define-syntax %let (syntax-rules () ...
ec3e9151aaf6f75171d1169b2b87a42582cf1ddae0f3cb3af8646b0738fef908
sgbj/MaximaSharp
amatrix.lisp
amatrix.lisp -- implement Maxima matrix via underlying Lisp array copyright 2007 by I release this file under the terms of the GNU General Public License . (setf (get '$amatrix '$present) t) (declare-top (unspecial x)) (defun $amatrixmap (f &rest m) (let* ((nr ($nrows (car m))) (nc ($ncols (car m)...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/amatrix/amatrix.lisp
lisp
MIGHT WANT TO ENSURE THAT X HAS EXACTLY ONE ROW AND SAME NUMBER OF COLUMNS AS AA
amatrix.lisp -- implement Maxima matrix via underlying Lisp array copyright 2007 by I release this file under the terms of the GNU General Public License . (setf (get '$amatrix '$present) t) (declare-top (unspecial x)) (defun $amatrixmap (f &rest m) (let* ((nr ($nrows (car m))) (nc ($ncols (car m)...
a75b574cfc7b4d47b09b8dc23b78055e949fd869bd1010d6a9ce36038cbe55d3
erdos/uclj
core.clj
(ns uclj.core (:gen-class) (:import [clojure.lang Gateway Var LazySeq] [java.lang Number] [java.io StringWriter] [java.util.concurrent.atomic AtomicReferenceArray])) (set! *warn-on-reflection* true) (def namespaces-to-require '[[clojure.core] [clojure.core.async :as async] ...
null
https://raw.githubusercontent.com/erdos/uclj/8d7feec70392c8150568b854cd4f1b34620fb427/src/uclj/core.clj
clojure
clojure.data clojure.datafy Works like an inlined defmacro call: The expression in (template) calls will be the result of the macro expansion. You can include unquoted (ie.: ~() and ~@() ) forms in the expression so the evaluation result will be substituted can be used when evaluating unquoted subexpressions. Maps...
(ns uclj.core (:gen-class) (:import [clojure.lang Gateway Var LazySeq] [java.lang Number] [java.io StringWriter] [java.util.concurrent.atomic AtomicReferenceArray])) (set! *warn-on-reflection* true) (def namespaces-to-require '[[clojure.core] [clojure.core.async :as async] ...
e6bccaaf50791d17a684197904e19ed7cc56ca45995a6e93919a37e50013db66
audreyt/openafp
MCF.hs
module OpenAFP.Records.MCF ( module OpenAFP.Records.MCF.T, _MCF_T, ) where import OpenAFP.Types import OpenAFP.Records.MCF.T _MCF_T :: MCF_T _MCF_T = MCF_T []
null
https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/MCF.hs
haskell
module OpenAFP.Records.MCF ( module OpenAFP.Records.MCF.T, _MCF_T, ) where import OpenAFP.Types import OpenAFP.Records.MCF.T _MCF_T :: MCF_T _MCF_T = MCF_T []
9c26350b5b74c85607e568a4c0c47e002a45d1e95eaa1301763ae7fef189820f
xapi-project/xen-api
test_updateinfo.ml
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
null
https://raw.githubusercontent.com/xapi-project/xen-api/990d8e8555a374c5c82523d628316e87732071c1/ocaml/tests/test_updateinfo.ml
ocaml
( (installed_epoch, installed_version, installed_release) * * (inequality * (epoch, version * release)) ) no data node missing checksum missing location normal case No "updates" node No update in updateinfo.xml Missing update_type Missing id Missing summary Missing description Duplicate ...
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
ec20cad04124369584e996d0753878817e901d74d87cceb809f175681311a7e4
kelamg/HtDP2e-workthrough
ex174.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-reader.ss" "lang")((modname ex174) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Arbitrarily-Large-Data/ex174.rkt
racket
about the language level of this file in a form that our tools can easily process. 1String -> String 1String -> String (encode-letter s) converts 1Strings to their corresponding ASCII codes of ASCII code of the letter – '() String -> File encodes a text file n numerically each letter in a word in th...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex174) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (require 2htdp/batch-io) converts the given 1String to a 3 - l...
b421c0131c43a937f8f32d9629710fcd37f30c2c8164d10dae544e242d4cca65
janestreet/incr_map
incr_map_collate_test.ml
open! Core open Expect_test_helpers_core module Incr = Incremental.Make () open Incr_map_collate module Key = String (* "symbol" *) module Value = struct type t = int * float (* "size" and "price" *) [@@deriving sexp, bin_io, equal, compare] end module Concrete = Collated.Make_concrete (Key) (Value) module Order =...
null
https://raw.githubusercontent.com/janestreet/incr_map/b56e7d8b1299d77790e3bc72e2aeeca74afd04fe/collate/test/incr_map_collate_test.ml
ocaml
"symbol" "size" and "price" Make sure that our math works out This test is important, as the implementation stores a map keyed by 'k * 'v. It's crucial that it gets updated correctly - we got this wrong once already. Add entries with values that compares equal (but not keys, we don't want duplicates!...
open! Core open Expect_test_helpers_core module Incr = Incremental.Make () open Incr_map_collate module Value = struct end module Concrete = Collated.Make_concrete (Key) (Value) module Order = struct module T = struct type t = | By_symbol | By_symbol_reversed | By_price | By_price_rever...
aeb735d632d1afc813b5c0d343782af60ccffe0c226a8b74862e8a6fb1108c12
fortytools/holumbus
HashedIndex.hs
-- ------------------------------------------------------------ module Holumbus.Index.HashedIndex ( Document , Documents , SmallDocuments , Inverted , emptyInverted , removeDocIdsInverted , CompactInverted , emptyCompactInverted , inverted2compactInverted , HolumbusState ...
null
https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/Holumbus-Searchengine/src/Holumbus/Index/HashedIndex.hs
haskell
------------------------------------------------------------ ------------------------------------------------------------ -} ------------------------------------------------------------ -} ------------------------------------------------------------ {- remove "--" to coment out region -} --------------------...
module Holumbus.Index.HashedIndex ( Document , Documents , SmallDocuments , Inverted , emptyInverted , removeDocIdsInverted , CompactInverted , emptyCompactInverted , inverted2compactInverted , HolumbusState , HolumbusConfig , emptyHolumbusState , defragmentHolumb...
12c51c87e457e8f0eccffd862e7e57cc00538e43db4d7de839a9e5b58da0dc58
fpco/ide-backend
ModuleName.hs
----------------------------------------------------------------------------- -- | Module : Distribution . ModuleName Copyright : 2008 -- -- Maintainer : -- Portability : portable -- Data type for module names . All rights reserved . Redistribution and use in source and binary forms , wi...
null
https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/inputs/Cabal-1.14.0/Distribution/ModuleName.hs
haskell
--------------------------------------------------------------------------- | Maintainer : Portability : portable # DEPRECATED simple "use ModuleName.fromString instead" # This is just a convenience function intended for valid module strings. It is an error if it is used with a string that is not a valid m...
Module : Distribution . ModuleName Copyright : 2008 Data type for module names . 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...
50ef624edda46d04a1b5828fb0ea75c6317b07bb4bf69f22721edb4dff60f176
vseloved/rutils
anaphora.lisp
;;; see LICENSE file for permissions (cl:in-package #:rutils.anaphora) (named-readtables:in-readtable rutils-readtable) (eval-when (:compile-toplevel) (declaim #.+default-opts+)) (defmacro if-it (test then &optional else) "Like IF. IT is bound to TEST." `(let ((it ,test)) (if it ,then ,else))) (defmacro ...
null
https://raw.githubusercontent.com/vseloved/rutils/db3c3f4ae897025b5f0cd81042ca147da60ca0c5/core/anaphora.lisp
lisp
see LICENSE file for permissions
(cl:in-package #:rutils.anaphora) (named-readtables:in-readtable rutils-readtable) (eval-when (:compile-toplevel) (declaim #.+default-opts+)) (defmacro if-it (test then &optional else) "Like IF. IT is bound to TEST." `(let ((it ,test)) (if it ,then ,else))) (defmacro when-it (test &body body) "Like WHE...
98df024f6cbcd304edbc7ceebc40f02df0821f6692584d5637da93712b840a96
jtuple/riak_zab
riak_zab_app.erl
-module(riak_zab_app). -behaviour(application). %% Application callbacks -export([start/2, stop/1, full_stop/0, full_stop/1]). %% =================================================================== %% Application callbacks %% =================================================================== start(_StartType, _Sta...
null
https://raw.githubusercontent.com/jtuple/riak_zab/ebd54aa540cf65e49d6e0890005e714ee756914a/src/riak_zab_app.erl
erlang
Application callbacks =================================================================== Application callbacks =================================================================== @spec full_stop() -> ok @doc Stop the riak application and the calling process. we never do an application:stop because that makes it...
-module(riak_zab_app). -behaviour(application). -export([start/2, stop/1, full_stop/0, full_stop/1]). start(_StartType, _StartArgs) -> riak_core_util:start_app_deps(riak_zab), case riak_zab_sup:start_link() of {ok, Pid} -> ok = riak_core_ring_events:add_handler(riak_zab_ring_handler, []), ...
153e6e7f31955267e0dd2877c37b643e976a135b1765c113b54d7c1fd083c9f6
stumpwm/stumpwm
screen.lisp
Copyright ( C ) 2003 - 2008 ;; This file is part of stumpwm . ;; stumpwm is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 , or ( at your option ) ;; any later version. stumpwm is ...
null
https://raw.githubusercontent.com/stumpwm/stumpwm/ba45d916efb02b7a531d02268173625402d3e832/screen.lisp
lisp
you can redistribute it and/or modify either version 2 , or ( at your option ) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. along with this software; see the file COPY...
Copyright ( C ) 2003 - 2008 This file is part of stumpwm . it under the terms of the GNU General Public License as published by stumpwm is distributed in the hope that it will be useful , You should have received a copy of the GNU General Public License (in-package #:stumpwm) (export '(*default-bg-col...
ef9492e02349381e3555577f460a37a4cc32bdb22e3e9509874155ef9289345b
achirkin/vulkan
VK_EXT_display_surface_counter.hs
# OPTIONS_GHC -fno - warn - missing - pattern - synonym - signatures # # OPTIONS_GHC -fno - warn - orphans # # OPTIONS_HADDOCK not - home # {-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE ForeignFunctionInterface # {-# LANGUAGE MagicH...
null
https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_EXT_display_surface_counter.hs
haskell
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE MagicHash # # LANGUAGE PatternSynonyms # # LANGUAGE Strict # # LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns # | supported: @vulkan@ contact: @James Jones @cuba...
# OPTIONS_GHC -fno - warn - missing - pattern - synonym - signatures # # OPTIONS_GHC -fno - warn - orphans # # OPTIONS_HADDOCK not - home # # LANGUAGE FlexibleInstances # # LANGUAGE ForeignFunctionInterface # module Graphics.Vulkan.Ext.VK_EXT_display_surface_counter * Vulkan extension : @VK_EXT_display_surfac...
48b5a40e03024c52f94aa11ab29a320d46ed6187bace1c88288e0760b29c3f6a
RefactoringTools/HaRe
A4.hs
module Renaming.A4 where import Renaming.B4 import Renaming.C4 import Renaming.D4 main :: Tree Int ->Bool main t = isSame (sumSquares (fringe t)) (sumSquares (Renaming.B4.myFringe t)+sumSquares (Renaming.C4.myFringe t))
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/Renaming/A4.hs
haskell
module Renaming.A4 where import Renaming.B4 import Renaming.C4 import Renaming.D4 main :: Tree Int ->Bool main t = isSame (sumSquares (fringe t)) (sumSquares (Renaming.B4.myFringe t)+sumSquares (Renaming.C4.myFringe t))
79f440de6d2002f70d58fd722cd190fc792198e0a8e339a280453c940efb2de2
hanshuebner/bos
allocation.lisp
(in-package :bos.m2) (defpersistent-class allocation-area () ((active-p :accessor allocation-area-active-p :initarg :active-p) (left :reader allocation-area-left :initarg :left) (top :reader allocation-area-top :initarg :top) (width :reader allocation-area-width :initarg :width) (height :reader allocatio...
null
https://raw.githubusercontent.com/hanshuebner/bos/ab5944cc46f4a5ff5a08fd8aa4d228c0f9cfc771/m2/allocation.lisp
lisp
FIXME probably we dont need this and should rely on *rect-publisher* for y from top upto (1- (+ top height)) ? /~eppstein/161/960307.html
(in-package :bos.m2) (defpersistent-class allocation-area () ((active-p :accessor allocation-area-active-p :initarg :active-p) (left :reader allocation-area-left :initarg :left) (top :reader allocation-area-top :initarg :top) (width :reader allocation-area-width :initarg :width) (height :reader allocatio...
6b764ce4afce0d2af1b54983381a8317345edb2ee326bd309bf648735ae7b444
cjlarose/de-jong
editor.cljs
(ns de-jong.components.editor (:require [om.core :as om] [om.dom :as dom] [de-jong.points-calculator :refer [random-vals]] [de-jong.components.fa-icon :refer [fa-icon]] [de-jong.components.params-picker :refer [params-picker]] [de-jong.components.point-cloud...
null
https://raw.githubusercontent.com/cjlarose/de-jong/b627e46e3e3c42ca3fa3cf786218086211a1e6d7/src/de_jong/components/editor.cljs
clojure
(ns de-jong.components.editor (:require [om.core :as om] [om.dom :as dom] [de-jong.points-calculator :refer [random-vals]] [de-jong.components.fa-icon :refer [fa-icon]] [de-jong.components.params-picker :refer [params-picker]] [de-jong.components.point-cloud...
3bd0ced9c4e8a96b477e4d12abf42e0094ed3a2776ac441d32d73f47db62ad4e
kblake/erlang-chat-demo
page.erl
%% -*- mode: nitrogen -*- -module ([[[NAME]]]). -compile(export_all). -include_lib("nitrogen/include/wf.hrl"). -include("records.hrl"). main() -> #template { file="./site/templates/bare.html" }. title() -> "Hello from [[[NAME]]].erl!". body() -> [ #panel { style="margin: 50px 100px;", body=[ ...
null
https://raw.githubusercontent.com/kblake/erlang-chat-demo/6fd2fce12f2e059e25a24c9a84169b088710edaf/rel/overlay/site/.prototypes/page.erl
erlang
-*- mode: nitrogen -*-
-module ([[[NAME]]]). -compile(export_all). -include_lib("nitrogen/include/wf.hrl"). -include("records.hrl"). main() -> #template { file="./site/templates/bare.html" }. title() -> "Hello from [[[NAME]]].erl!". body() -> [ #panel { style="margin: 50px 100px;", body=[ #span { text="Hello from ...
9dc88c5d892ae988eeb00e11994a29d59f5f48063eacffc6f89be4fe4a8d2e94
rabeckett/Temporal-NetKAT
common.ml
(*******************************************************************) (* *) (* A collection of commonly useful functions *) (* *) (***************************************...
null
https://raw.githubusercontent.com/rabeckett/Temporal-NetKAT/829d1847c18d77f40501fe4d988eec6e7867c94d/src/common.ml
ocaml
***************************************************************** A collection of commonly useful functions ********************************************************...
open Bag module Option = struct let unwrap o = match o with | None -> failwith "unwrap" | Some v -> v let is_none o = match o with | None -> true | Some _ -> false let is_some o = match o with | None -> false | Some _ -> true let get o = match o with ...
dc919dba156fbc7222f9cd1c906cb6a3cec2bfc6f35f45602ff24dd12d985c21
sarabander/p2pu-sicp
2.77.scm
;; We will put here all the involved definitions (define (install-complex-package) ;; imported procedures from rectangular and polar packages (define (make-from-real-imag x y) ((get 'make-from-real-imag 'rectangular) x y)) (define (make-from-mag-ang r a) ((get 'make-from-mag-ang 'polar) r a)) ;; inter...
null
https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/2.5/2.77.scm
scheme
We will put here all the involved definitions imported procedures from rectangular and polar packages internal procedures interface to rest of the system added internal procedures interface to the rest of the system -------------------------------------------------- Starting with complex number z we want to fi...
(define (install-complex-package) (define (make-from-real-imag x y) ((get 'make-from-real-imag 'rectangular) x y)) (define (make-from-mag-ang r a) ((get 'make-from-mag-ang 'polar) r a)) (define (add-complex z1 z2) (make-from-real-imag (+ (real-part z1) (real-part z2)) (+ (imag-part z1) (imag-par...
2f994cc31d69c3f7dff0dc140d94f023d9ff7c1d09d682591d44eb7337732a66
andrewMacmurray/haskell-book-solutions
employees.hs
module Reports where data Employee = Coder | Manager | Veep | CEO deriving (Eq, Ord, Show) reportBoss :: Employee -> Employee -> IO () reportBoss e e' = putStrLn $ show e ++ " is the boss of " ++ show e' codersRuleCEOsDrool :: Employee -> Employee -> Ordering codersRuleCEOsDrool e e' = case (e, e') o...
null
https://raw.githubusercontent.com/andrewMacmurray/haskell-book-solutions/f4fd386187c03828d1736d9a43642ab4f0ec6462/src/ch7/employees.hs
haskell
module Reports where data Employee = Coder | Manager | Veep | CEO deriving (Eq, Ord, Show) reportBoss :: Employee -> Employee -> IO () reportBoss e e' = putStrLn $ show e ++ " is the boss of " ++ show e' codersRuleCEOsDrool :: Employee -> Employee -> Ordering codersRuleCEOsDrool e e' = case (e, e') o...
c3da450dc0d7e0c9dba537982c5630adb24679bf0c994fc70d6408c058240529
DavidAlphaFox/aiwiki
db_user.erl
-module(db_user). -include("include/model.hrl"). -export([select/1,create/3,auth/2,update/3]). select(Email) -> Email0 = ai_string:to_string(Email), MatchSpec = {#user{email = Email0, _ = '_'}, [],['$_']}, Fun = fun()-> mnesia:select(user,[MatchSpec]) end, case mnesia:transaction(Fun) of {a...
null
https://raw.githubusercontent.com/DavidAlphaFox/aiwiki/3a2a78668d4a708fda4af35430f25a69c4b91a7e/src/db/db_user.erl
erlang
-module(db_user). -include("include/model.hrl"). -export([select/1,create/3,auth/2,update/3]). select(Email) -> Email0 = ai_string:to_string(Email), MatchSpec = {#user{email = Email0, _ = '_'}, [],['$_']}, Fun = fun()-> mnesia:select(user,[MatchSpec]) end, case mnesia:transaction(Fun) of {a...
d1b83ee18f33737314f24ee6f258c9c5d153091c73fadf40837002d32b45d86f
agda/agda
TopSort.hs
module Agda.Utils.Graph.TopSort ( topSort ) where import Data.Set (Set) import qualified Data.Set as Set import qualified Data.Map as Map import qualified Agda.Utils.Graph.AdjacencyMap.Unidirectional as G NB : : Defined but not used mergeBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] mergeBy _ [] xs = xs merg...
null
https://raw.githubusercontent.com/agda/agda/e3bf58d8b2e95bc0481035756f44ddd9fe19b40d/src/full/Agda/Utils/Graph/TopSort.hs
haskell
| input: nodes, edges distance left to guarantee topological ordering. closure before sorting. Only the keys of these maps are used. acc: Already sorted nodes in reverse order paired with accumulated set of nodes that must come before it a must come before b
module Agda.Utils.Graph.TopSort ( topSort ) where import Data.Set (Set) import qualified Data.Set as Set import qualified Data.Map as Map import qualified Agda.Utils.Graph.AdjacencyMap.Unidirectional as G NB : : Defined but not used mergeBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] mergeBy _ [] xs = xs merg...
4b962ac368907a753cae0b8933813b45834473998d04ace47bc9e3e94f7fe97f
racketscript/racketscript
fact.rkt
#lang racket/base (provide factorial factorial/tail) (define (factorial n) (cond [(zero? n) 1] [else (* n (factorial (sub1 n)))])) (define (factorial/tail n a) (cond [(zero? n) a] [else (factorial/tail (sub1 n) (* n a))])) (displayln (factorial 0)) (displayln (factorial 5)) (displayln (factoria...
null
https://raw.githubusercontent.com/racketscript/racketscript/f94006d11338a674ae10f6bd83fc53e6806d07d8/tests/basic/fact.rkt
racket
#lang racket/base (provide factorial factorial/tail) (define (factorial n) (cond [(zero? n) 1] [else (* n (factorial (sub1 n)))])) (define (factorial/tail n a) (cond [(zero? n) a] [else (factorial/tail (sub1 n) (* n a))])) (displayln (factorial 0)) (displayln (factorial 5)) (displayln (factoria...
cf11dab38cc87a477109b45d502e20a4380aff09bfaa831de4095034e6d76a94
theam/tintin
Render.hs
module Tintin.Render where import Tintin.Core require Tintin.Capabilities.Logging require Tintin.Capabilities.Filesystem require Tintin.Capabilities.Process require Tintin.Domain.HtmlFile require Tintin.Domain.DocumentationFile require Tintin.Domain.Project require Tintin.Html.Templating require Tintin.Errors requir...
null
https://raw.githubusercontent.com/theam/tintin/4355dda4a4b3dfd8e8f5fe1764330f7f59bd25b1/src/Tintin/Render.hs
haskell
| Pair up each page with context (next and previous links) by alphabetical order, excluding index page. This function is a little more complicated than might be expected because the functionality is a little nuanced. It has to: sorting, /excluding/ the index page. pointing to the index /if it exists/. ...
module Tintin.Render where import Tintin.Core require Tintin.Capabilities.Logging require Tintin.Capabilities.Filesystem require Tintin.Capabilities.Process require Tintin.Domain.HtmlFile require Tintin.Domain.DocumentationFile require Tintin.Domain.Project require Tintin.Html.Templating require Tintin.Errors requir...
c1f7cffa926edf204bb10ca5de3ad7260a82208b7aa7e90751a2263bc1486fa0
ocaml-sf/learn-ocaml-corpus
master.ml
(* Basic constructor functions. *) (* BEGIN INCLUDE *) (* TO DO: Define [empty]. *) (* END INCLUDE *) (* BEGIN EXCLUDE let empty : 'a enum = fun _s -> Seq.empty END EXCLUDE *) let just (x : 'a) : 'a enum = (* BEGIN INCLUDE *) (* TO DO: Complete this definition. *) raise TODO (* END INCLUDE *) (* BE...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/enumerating_trees/master.ml
ocaml
Basic constructor functions. BEGIN INCLUDE TO DO: Define [empty]. END INCLUDE BEGIN EXCLUDE let empty : 'a enum = fun _s -> Seq.empty END EXCLUDE BEGIN INCLUDE TO DO: Complete this definition. END INCLUDE BEGIN EXCLUDE fun s -> if s = 0 then Seq.singleton x else Seq.empty END ...
let just (x : 'a) : 'a enum = raise TODO let pay (enum : 'a enum) : 'a enum = raise TODO if s = 0 then Seq.empty else enum (s-1) END EXCLUDE *) let sum (enum1 : 'a enum) (enum2 : 'a enum) : 'a enum = raise TODO BEGIN EXCLUDE fun s - > Seq.sum ( s ) ( enum2 s ) END EXCLUDE fun s ...
988fb24a28c568ad762f8c21f077a88a207b78f23c24450f58b37c47adc04ccd
zotonic/cowmachine
cowboy_middleware.erl
-module(cowboy_middleware). -export([execute/2]). %% @doc Call cowmachine to handle the request with the given controller. -spec execute(Req, Env) -> {ok, Req, Env} | {stop, Req} when Req::cowboy_req:req(), Env::cowboy_middleware:env(). execute(Req, Env) -> % Replace below with your own controller mod...
null
https://raw.githubusercontent.com/zotonic/cowmachine/ad592a3e70ccce87434e3555c58fa1664bfa00c6/examples/hello_world_rest/apps/main/src/cowboy_middleware.erl
erlang
@doc Call cowmachine to handle the request with the given controller. Replace below with your own controller module Set options for the cowmachine and handle the request Perform anything after well-formedness check of your request Examples are parsing the query args, or authentication
-module(cowboy_middleware). -export([execute/2]). -spec execute(Req, Env) -> {ok, Req, Env} | {stop, Req} when Req::cowboy_req:req(), Env::cowboy_middleware:env(). execute(Req, Env) -> Controller = mycontroller, Context = #{ controller => Controller, cowreq => Req, cowenv => Env ...
3ab0afc4f3f56f22cf9337f5ea8f49aa24928d264c66cdbb9a7e22bd7eeaf931
imdea-software/leap
TSLKExpression.mli
(***********************************************************************) (* *) LEAP (* *) , IMDEA ...
null
https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/theories/tslk/TSLKExpression.mli
ocaml
********************************************************************* ...
LEAP , IMDEA Software Institute Copyright 2011 IMDEA Software Institute Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compl...
36ee26f771cc984edb3fedf6144a74441a881ee637374517a65442fdf8b8617c
kazu-yamamoto/http3
ClientX.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE Strict #-} {-# LANGUAGE StrictData #-} module ClientX where import Control.Concurrent import Control.Monad import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as C8 import Network.HTTP.Types import Network.QUIC import ...
null
https://raw.githubusercontent.com/kazu-yamamoto/http3/93095e287a19982f0fc074325dadf789682534f2/util/ClientX.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE Strict # # LANGUAGE StrictData #
# LANGUAGE RecordWildCards # module ClientX where import Control.Concurrent import Control.Monad import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as C8 import Network.HTTP.Types import Network.QUIC import qualified UnliftIO.Exception as E import qualified Network.HQ.Client as HQ import qual...
3fe586842ab041e0b980431909d759383c3730bc932ba1be42932c5ea582e21f
input-output-hk/plutus-apps
MintingScript.hs
# LANGUAGE DataKinds # # LANGUAGE NoImplicitPrelude # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # {-# LANGUAGE TypeFamilies #-} module PlutusExample.PlutusVersion1.MintingScript ( apiExamplePlutusMintingScript , mintingScriptShortBs ) where import Prelude hiding (($)) import ...
null
https://raw.githubusercontent.com/input-output-hk/plutus-apps/c1269a7ab8806957cda93448a4637c485352cda5/plutus-example/src/PlutusExample/PlutusVersion1/MintingScript.hs
haskell
# LANGUAGE TypeFamilies # # INLINABLE mkPolicy #
# LANGUAGE DataKinds # # LANGUAGE NoImplicitPrelude # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # module PlutusExample.PlutusVersion1.MintingScript ( apiExamplePlutusMintingScript , mintingScriptShortBs ) where import Prelude hiding (($)) import Cardano.Api.Shelley (PlutusScript (...
3598725336a853cc622c19799a92bef05141e6249ac9e564ab370a979dcd2b78
janestreet/merlin-jst
lib.mli
val sqrt : float -> float [@@ocaml.deprecated "I am deprecated"]
null
https://raw.githubusercontent.com/janestreet/merlin-jst/0152b4e8ef1b7cd0ddee2873aa1860a971585391/tests/test-dirs/alerts.t/lib.mli
ocaml
val sqrt : float -> float [@@ocaml.deprecated "I am deprecated"]
4b44dd433602da6d58a0bf41ffea78cea6f160b86111782fb1f47890052183b7
kevinchevalier/kemulator
TraceProcessor.hs
module Main where import System.IO import Data.Array main :: IO () main = do lines <- lift lines $ readFile "trace.trace"
null
https://raw.githubusercontent.com/kevinchevalier/kemulator/f8bbaad5105f89006fbed8fe58a193fb5bfced8d/TraceProcessor/TraceProcessor.hs
haskell
module Main where import System.IO import Data.Array main :: IO () main = do lines <- lift lines $ readFile "trace.trace"
eeb072f032780ca625f29a1bd3ebb5eea34f2e5975f84bb20750c83179946e86
darrenldl/ocaml-SeqBox
show.ml
open Sbx_block open Stream_file open Int64_ops module Stats = struct type t = { bytes_processed : int64 ; meta_blocks_found : int64 ; start_time : float } let add_bytes_scanned (stats:t) ~(num:int64) : t = { bytes_processed = stats.bytes_processed <+> num ; meta...
null
https://raw.githubusercontent.com/darrenldl/ocaml-SeqBox/658c623db8745ae1d804c75880b29fb53435860f/src/show.ml
ocaml
report progress
open Sbx_block open Stream_file open Int64_ops module Stats = struct type t = { bytes_processed : int64 ; meta_blocks_found : int64 ; start_time : float } let add_bytes_scanned (stats:t) ~(num:int64) : t = { bytes_processed = stats.bytes_processed <+> num ; meta...
289e10caa757f677fbf23d8790041303bc8b7aecb12897e7e63dd6f39998ba87
mirage/irmin-watcher
polling.ml
--------------------------------------------------------------------------- Copyright ( c ) 2016 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) 2...
null
https://raw.githubusercontent.com/mirage/irmin-watcher/753084ba383ca5d1ea30b3bf89c8757a782d213c/src/polling.ml
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2016 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) 2...
e99819a1b9c1db5c47ee12e4c2bed5ab3ab8886feec06c5db505eaad40366057
pink-gorilla/webly
core.cljs
(ns modular.ws.core (:require [taoensso.timbre :refer-macros [debug info error]] [re-frame.core :as rf] [modular.ws.adapter :refer [ws-init! start-router!]] [modular.ws.ws :as ws])) (defonce c (atom nil)) (defn init-ws! [path port] (let [conn (ws-init! path port)] (reset! c conn) (start-router...
null
https://raw.githubusercontent.com/pink-gorilla/webly/9d6bbac341215d2c66d7bdcc658fb06334741c5f/websocket/src/modular/ws/core.cljs
clojure
(ns modular.ws.core (:require [taoensso.timbre :refer-macros [debug info error]] [re-frame.core :as rf] [modular.ws.adapter :refer [ws-init! start-router!]] [modular.ws.ws :as ws])) (defonce c (atom nil)) (defn init-ws! [path port] (let [conn (ws-init! path port)] (reset! c conn) (start-router...
86010ef8cd88cf055ef18429f3e3f3fd86261128cf0d0a63ea4a9a59d319e511
cyga/real-world-haskell
NiceFork.orig.hs
-- file: ch24/NiceFork.hs import Control.Concurrent import Control.Exception (Exception, try) import qualified Data.Map as M data ThreadStatus = Running | Finished -- terminated normally | Threw Exception -- killed by uncaught exception deriving (Eq, Sho...
null
https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch24/NiceFork.orig.hs
haskell
file: ch24/NiceFork.hs terminated normally killed by uncaught exception | Create a new thread manager. | Create a new managed thread. | Immediately return the status of a managed thread. | Block until a specific managed thread terminates. | Block until all managed threads terminate. file: ch24/NiceFork.hs fil...
import Control.Concurrent import Control.Exception (Exception, try) import qualified Data.Map as M data ThreadStatus = Running deriving (Eq, Show) newManager :: IO ThreadManager forkManaged :: ThreadManager -> IO () -> IO ThreadId getStatus :: ThreadManager -> ThreadId -> IO (Maybe ThreadStatus)...
77bc583008228dd000124a545a4aa4369d33d709bced0248d5a0acb990f772dd
camlspotter/ocamloscope.2
summary.ml
open Spotlib.Spot open Utils open List open Data open Outcometree open Data.DB let flatten_result xs : (int * DB.item * 'trace1 * 'trace2) list = concat_map (fun (s,itts) -> map (fun (i,t1,t2) -> s,i,t1,t2) itts) xs let item (_, i, _, _ : int * DB.item * 'trace1 * 'trace2) = i (* Give the item self as an alias i...
null
https://raw.githubusercontent.com/camlspotter/ocamloscope.2/49b5977a283cdd373021d41cb3620222351a2efe/summary.ml
ocaml
Give the item self as an alias if it has none predef XXX distributed by Ocaml thingies group by the aliases, then sort by the lowest distance XXX fsig. The value may be hidden by signature
open Spotlib.Spot open Utils open List open Data open Outcometree open Data.DB let flatten_result xs : (int * DB.item * 'trace1 * 'trace2) list = concat_map (fun (s,itts) -> map (fun (i,t1,t2) -> s,i,t1,t2) itts) xs let item (_, i, _, _ : int * DB.item * 'trace1 * 'trace2) = i let alias i = match i.alias with ...
97babfa848c3ead7cc9fec57b97096e5a8f0fbd1fbc99575b0985d5ed51d7131
clojure/core.typed
check_ns_clj.clj
Copyright ( c ) , contributors . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;...
null
https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/src/clojure/core/typed/checker/jvm/check_ns_clj.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) , contributors . (ns clojure.core.typed.checker.jvm.check-ns-clj (:require [clojure.core.typed.errors :as err] [clojure.core.typed.current-impl :as impl] [clojure.core.typed.checker.check-ns-common :as chk-ns])) (defn check-ns-info "Same as check-ns, but returns ...
8f21a319e167d684e06c96c44755ed5df35196a154b1cf0674d7ef2ede5a4313
webyrd/n-grams-for-synthesis
simple.scm
Copyright ( C ) ( 2017 ) . All Rights Reserved . ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;; restriction, including without limitation the rights to use, copy, ...
null
https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-157/examples/simple.scm
scheme
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 so, subject to the following conditions: ...
Copyright ( C ) ( 2017 ) . All Rights Reserved . 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 K...
a932063be7438a589743d04a2e1ab9bde5f0260369baaf36de192e22c88cd382
hypernumbers/hypernumbers
eunit_render.erl
-module(eunit_render). -include_lib("eunit/include/eunit.hrl"). %%-------------------- %% %% Tests %% %%-------------------- %% %% Render Test %% string_test_() -> Str = "This is a test:\n" ++ "$testFun()$ followed by $testData$ and unicode characters àèìòù", {ok, Compiled} = sgte:compile(Str), Res ...
null
https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/lib/sgte/test/src/eunit_render.erl
erlang
-------------------- Tests -------------------- Render Test error test test callable attribute test on a non existent file -------------------- -------------------- Template String
-module(eunit_render). -include_lib("eunit/include/eunit.hrl"). string_test_() -> Str = "This is a test:\n" ++ "$testFun()$ followed by $testData$ and unicode characters àèìòù", {ok, Compiled} = sgte:compile(Str), Res = sgte:render(Compiled, data()), ResultStr = [<<"This is a test:\n">>, ...
a83bd8218e4a450a3fe3ac7118cbd00ba1bf3eff0de24eb071cd93788f8745a5
teknql/systemic
internal_test.clj
(ns systemic.internal-test (:require [systemic.internal :as sut] [clojure.test :as t :refer [deftest testing is]])) (deftest extract-kwargs-test (testing "simple extraction" (is (= {:foo '((+ 1 2 3)) :bar '((println "Hello") (- 1 2 3))} (sut/extract-kwargs #{:foo :bar :baz} ...
null
https://raw.githubusercontent.com/teknql/systemic/216bc4ff4092ab6750ed43c94c716e5a11546ca1/test/systemic/internal_test.clj
clojure
(ns systemic.internal-test (:require [systemic.internal :as sut] [clojure.test :as t :refer [deftest testing is]])) (deftest extract-kwargs-test (testing "simple extraction" (is (= {:foo '((+ 1 2 3)) :bar '((println "Hello") (- 1 2 3))} (sut/extract-kwargs #{:foo :bar :baz} ...
5a0e4d155d394c409f0e99fc81a1cdb2bbbbfe30abcbaacbf1a7a851326dbe9b
DavidAlphaFox/RabbitMQ
rabbit_tracing_traces.erl
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WA...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-tracing/src/rabbit_tracing_traces.erl
erlang
compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -------------------------------------------------------------------- --------...
The contents of this file are subject to the Mozilla 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 " The Original Code is RabbitMQ . The Initial Developer of the Original Code is GoPivotal , Inc. ...
a7c4c61848784e7233430d3ea240108e15e202c24d749508b6e35b72a75a6cf2
janestreet/base
identifiable.ml
open! Import include Identifiable_intf module Make (T : Arg) = struct include T include Comparable.Make (T) include Pretty_printer.Register (T) let hashable : t Hashable.t = { hash; compare; sexp_of_t } end module Make_using_comparator (T : Arg_with_comparator) = struct include T include Comparable.Make_...
null
https://raw.githubusercontent.com/janestreet/base/d5c241f05d2cf9f80b947bceea45974233825aaa/src/identifiable.ml
ocaml
open! Import include Identifiable_intf module Make (T : Arg) = struct include T include Comparable.Make (T) include Pretty_printer.Register (T) let hashable : t Hashable.t = { hash; compare; sexp_of_t } end module Make_using_comparator (T : Arg_with_comparator) = struct include T include Comparable.Make_...
439401c42b3dcf5b70908b0361fe2c93bbcb29d71b1d4371a05c947849c7bbb2
clj-commons/rewrite-cljs
paredit_test.cljs
(ns rewrite-clj.paredit-test (:require [cljs.test :refer-macros [deftest is testing run-tests]] [rewrite-clj.zip :as z] [clojure.zip :as zz] [rewrite-clj.paredit :as pe])) ;; helper (defn move-n [loc f n] (->> loc (iterate f) (take n) last)) (deftest kill-to-end-of-sexpr (...
null
https://raw.githubusercontent.com/clj-commons/rewrite-cljs/5b0fdea43a6748519d0b0ad3d7eaa98aa541de35/test/rewrite_clj/paredit_test.cljs
clojure
helper at whitespace position at space at the end dill jalla dill jalla z/down
(ns rewrite-clj.paredit-test (:require [cljs.test :refer-macros [deftest is testing run-tests]] [rewrite-clj.zip :as z] [clojure.zip :as zz] [rewrite-clj.paredit :as pe])) (defn move-n [loc f n] (->> loc (iterate f) (take n) last)) (deftest kill-to-end-of-sexpr (let [res (...
e8d7233cd19793caa6cd7db0da5d40584809d2dc41374fd4a9fdf64ed57ef45c
ramalho/mac316
chapter-5.scm
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(planet plai/plai:1:3/lang/reader) The Little Schemer Chapter 5 . * Oh * : It 's Full of Stars ; pre-requisite (define atom? (lambda (x) ...
null
https://raw.githubusercontent.com/ramalho/mac316/4c925557064c788c4d29e3408a6b1d327386d98b/little-schemer/chapter-5.scm
scheme
about the language level of this file in a form that our tools can easily process. pre-requisite p.81 p.82 p.84 p.88 p.91 changed o= to = tests
The first three lines of this file were inserted by . They record metadata #reader(planet plai/plai:1:3/lang/reader) The Little Schemer Chapter 5 . * Oh * : It 's Full of Stars (define atom? (lambda (x) (and (not (pair? x)) (not (null? x))))) (define rember* (lambda (a l) (cond ((null? l) '...
cc3b12ff69eaac74cc0bc67febfe751a1ccdc51abfc225fd061cb7dabcd2a5bf
weavejester/haslett
test_runner.clj
(ns haslett.test-runner (:require [doo.core :as doo] [org.httpkit.server :as httpkit])) (def compiler-opts {:output-to "target/main.js" :output-dir "target" :main 'haslett.test-runner :optimizations :none}) (defn echo-handler [request] (httpkit/with-channel request channel (httpkit/on-r...
null
https://raw.githubusercontent.com/weavejester/haslett/910b7db9a0e97faa53d7b67750c0453af0e3ef95/test/haslett/test_runner.clj
clojure
(ns haslett.test-runner (:require [doo.core :as doo] [org.httpkit.server :as httpkit])) (def compiler-opts {:output-to "target/main.js" :output-dir "target" :main 'haslett.test-runner :optimizations :none}) (defn echo-handler [request] (httpkit/with-channel request channel (httpkit/on-r...
a087e470830677ee824cb2af606318bcaebc5fc4e369ffa80d60a8f92ed99735
distrap/gcodehs
Minimal.hs
import Data.GCode import Pipes import Pipes.Attoparsec as PA import qualified Pipes.Prelude as P import qualified Pipes.ByteString as B import Pipes.Safe import qualified System.IO as IO import qualified System.Environment as E bufsize = 1024 main :: IO () main = do file <- fmap Prelude.head E.getArgs IO.with...
null
https://raw.githubusercontent.com/distrap/gcodehs/8a8dbc66445cff4ce832bb56f42ef03b3215e235/examples/Minimal.hs
haskell
or >-> P.map ppGCodeLineCompact non-streaming version, will eat a lot of ram main = do file <- fmap Prelude.head getArgs f <- BS.readFile file case parseOnlyGCode f of Left err -> print err Right result -> BS.putStr $ BS.pack $ ppGCode result
import Data.GCode import Pipes import Pipes.Attoparsec as PA import qualified Pipes.Prelude as P import qualified Pipes.ByteString as B import Pipes.Safe import qualified System.IO as IO import qualified System.Environment as E bufsize = 1024 main :: IO () main = do file <- fmap Prelude.head E.getArgs IO.with...
f3daf5689d424d3b588eb2bdb536d1553ca7248a37a22bd8033f563950cdba00
willemdj/erlsom
erlsom_sax_latin9.erl
Copyright ( C ) 2006 - 2008 %%% This file is part of Erlsom . %%% Erlsom is free software : you can redistribute it and/or modify %%% it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later ...
null
https://raw.githubusercontent.com/willemdj/erlsom/b8b25d9b9f8676e114548792e9c01debf207926d/src/erlsom_sax_latin9.erl
erlang
it under the terms of the GNU Lesser General Public License as but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the </>. Author contact: ==================================================================== =============================...
Copyright ( C ) 2006 - 2008 This file is part of Erlsom . Erlsom is free software : you can redistribute it and/or modify published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . Erlsom is distributed in the hope that it will be useful , GN...
f0aa6539e3daa049c6e734506cafe57ff835b8247449e439775c75e4b4dc31d5
ucsd-progsys/nate
Insert.ml
(* -*- camlp4r -*- *) (****************************************************************************) (* *) (* Objective Caml *) (* ...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/camlp4/Camlp4/Struct/Grammar/Insert.ml
ocaml
-*- camlp4r -*- ************************************************************************** Objective Caml ...
Copyright 2006 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with the special Authors : * - Daniel de Rauglaudre : initial version * - : refactoring ...
fe46cefd3ba4acd89109d45104c0ce018a54827caa237580172fab7cb6605b53
diogoalexandrefranco/cl-strings
tests.lisp
(in-package :cl-strings) (prove:plan 20) (prove:subtest "ends-with" (prove:ok (ends-with "1" "1" :ignore-case t) "equal strings") (prove:ok (not (ends-with "1" "12" :ignore-case t)) "suffix lengthier than string") (prove:ok (not (ends-with "123" "12" :ignore-case t)) "different strings") (prove:ok (ends-with ...
null
https://raw.githubusercontent.com/diogoalexandrefranco/cl-strings/93ec4177fc51f403a9f1ef0a8933f36d917f2140/tests.lisp
lisp
(in-package :cl-strings) (prove:plan 20) (prove:subtest "ends-with" (prove:ok (ends-with "1" "1" :ignore-case t) "equal strings") (prove:ok (not (ends-with "1" "12" :ignore-case t)) "suffix lengthier than string") (prove:ok (not (ends-with "123" "12" :ignore-case t)) "different strings") (prove:ok (ends-with ...
407376d86004dbcecb5c003442af5f9c916147d7503589f8107dd9b95c072110
janestreet/hardcaml
rtl_attribute.ml
open Base module Value = struct type t = | Int of int | String of string | Bool of bool [@@deriving sexp_of] end type t = { name : string ; value : Value.t option } [@@deriving sexp_of] let create ?value name = { name; value } let name t = t.name let value t = t.value module Vivado = struct ...
null
https://raw.githubusercontent.com/janestreet/hardcaml/15727795c2bf922dd852cc0cd895a4ed1d9527e5/src/rtl_attribute.ml
ocaml
open Base module Value = struct type t = | Int of int | String of string | Bool of bool [@@deriving sexp_of] end type t = { name : string ; value : Value.t option } [@@deriving sexp_of] let create ?value name = { name; value } let name t = t.name let value t = t.value module Vivado = struct ...
b5fd8a49d409ae49588e54e3a58f1ad8578da54dcec85fc82be20b5c82344d04
flipstone/orville
ResourceT.hs
| Module : Database . Orville . PostgreSQL.Internal . : Flipstone Technology Partners 2016 - 2018 License : MIT ' Database . Orville . PostgreSQL.ResourceT ' provides ' ResourceT ' instance of the Orville typeclasses for situations where you might need it . In particular , if you are using the condui...
null
https://raw.githubusercontent.com/flipstone/orville/aee8d7a47ab3a7b442fdb274dbb5a95d687a23ce/orville-postgresql/src/Database/Orville/PostgreSQL/ResourceT.hs
haskell
| Module : Database . Orville . PostgreSQL.Internal . : Flipstone Technology Partners 2016 - 2018 License : MIT ' Database . Orville . PostgreSQL.ResourceT ' provides ' ResourceT ' instance of the Orville typeclasses for situations where you might need it . In particular , if you are using the condui...
e62bf759795cac8817373eda1147795b1e6372f7137ab0be3a921c1ee0acc483
jacekschae/learn-reagent-course-files
orders.cljs
(ns giggin.components.orders (:require [giggin.state :as state])) (defn orders [] [:aside [:div.order [:div.body (for [[id quant] @state/orders] [:div.item {:key id} [:div.img [:img {:src (get-in @state/gigs [id :img]) :alt (get-in @state/gigs [id :title])}]] ...
null
https://raw.githubusercontent.com/jacekschae/learn-reagent-course-files/bad40303c8e0a8526318a69fdf9c2d786b4240cb/increments/10-order-total/src/giggin/components/orders.cljs
clojure
(ns giggin.components.orders (:require [giggin.state :as state])) (defn orders [] [:aside [:div.order [:div.body (for [[id quant] @state/orders] [:div.item {:key id} [:div.img [:img {:src (get-in @state/gigs [id :img]) :alt (get-in @state/gigs [id :title])}]] ...
4f0759f4d1886f44618698cfce6f5e1183ba5d4225e93cc5f9c0c7d26c1d3610
unnohideyuki/bunny
sample126.hs
ADT : Algebraic Data Type data Direction = Up | Down -- deriving Show to_s Up = "Up" to_s Down = "Down" main = putStrLn $ to_s Down
null
https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample126.hs
haskell
deriving Show
ADT : Algebraic Data Type data Direction = Up | Down to_s Up = "Up" to_s Down = "Down" main = putStrLn $ to_s Down
b923f3e26d4b802a76c3c0a9b11edd3e61477a790ccd8a18b71bc83ee603b951
bsaleil/lc
triangl.scm.scm
;;------------------------------------------------------------------------------ Macros (##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body))) (def-macro (FLOATvector-const . lst) `',(list->f64vector lst)) (def-macro (FLOATvector? x) `(f64vector? ,x)) (def-macro (FLOATvector...
null
https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/tools/benchtimes/resultVMIL-lc-gsc-lc/LC5f64/triangl.scm.scm
scheme
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Gabriel benchmarks C benchmarks Other benchmarks
Macros (##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body))) (def-macro (FLOATvector-const . lst) `',(list->f64vector lst)) (def-macro (FLOATvector? x) `(f64vector? ,x)) (def-macro (FLOATvector . lst) `(f64vector ,@lst)) (def-macro (FLOATmake-vector n . init) `(make...
e4aa8b743e88970921868c68f80ff59b08e4f711263b4614d3ce40e383f2b4c8
mzp/coq-ruby
tlm.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/lib/tlm.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Tries. This module implements a dat...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : tlm.mli 5920 2004...
7bdc9d37a3133f33cab71643e5fed59cbf4c7ae119e961027673dc7d08708d16
bomberstudios/mtasc
genSwf.ml
* MTASC - MotionTwin ActionScript2 Compiler * Copyright ( c)2004 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , or * ( a...
null
https://raw.githubusercontent.com/bomberstudios/mtasc/d7c2441310248776aa89d60f9c8f98d539bfe8de/src/mtasc/genSwf.ml
ocaml
* only if 0 params * * calculated outside * * true, false, null * * true, false, null * myclass.prototype.__proto__ = superclass.prototype myclass.prototype.__constructor__ = superclass This function requires tons of helper functions which are all very different from the rest of the code for class generation, s...
* MTASC - MotionTwin ActionScript2 Compiler * Copyright ( c)2004 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , or * ( a...
2e12e58be8724480cdca9031390f586a67d22001473161f5ec44ed6c4f968f29
fumieval/mason
Builder.hs
# LANGUAGE MagicHash , CPP , UnboxedTuples # # LANGUAGE ForeignFunctionInterface # {-# LANGUAGE RankNTypes #-} # LANGUAGE LambdaCase # ---------------------------------------------------------------------------- -- | Module : Mason . Builder Copyright : ( c ) 2019- -- License : BSD3 -- Maintai...
null
https://raw.githubusercontent.com/fumieval/mason/33cc9a9b29426db2deebebd2361fbe349cc16a89/src/Mason/Builder.hs
haskell
# LANGUAGE RankNTypes # -------------------------------------------------------------------------- | License : BSD3 -------------------------------------------------------------------------- * Runners * Primitives * Bytes * Text * Primitive * Numeral * Variable-length encoding * Combinators * Advanced...
# LANGUAGE MagicHash , CPP , UnboxedTuples # # LANGUAGE ForeignFunctionInterface # # LANGUAGE LambdaCase # Module : Mason . Builder Copyright : ( c ) 2019- Maintainer : < > module Mason.Builder ( Builder , BuilderFor , Buildable , StrictByteStringBackend , toStrictByteString , La...
30ed5bcaef9f95906bd5eb33721c75d72f136328b420f0736582c5488697b054
Frama-C/Frama-C-snapshot
outputs.ml
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/inout/outputs.ml
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
a41663baed30f3f57787a6357f79ddfdc3474f383fdd7a7870d828f944a61c80
vasilisp/inez
id_for_scripts.ml
include (Id.Make ())
null
https://raw.githubusercontent.com/vasilisp/inez/3bbbbb82a12918c1557f5fb0b49a8c73ab8d6da1/frontend/id_for_scripts.ml
ocaml
include (Id.Make ())
d8559b6ccd2b33344c70a11037674dba535a220054b9222ebba020989be9ce81
jwiegley/notes
HPath.hs
module HPath where import Control.Applicative import Control.Lens import Filesystem | Monadic filtering for lens -- -- >>> "/tmp" ^!! act listDirectory.folded.files filteredM f = act (\x -> (,) <$> pure x <*> f x).filtered snd.to fst files = filteredM isFile directories = filteredM isDirectory contents = act lis...
null
https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/f719a3d41696d48f6005/hpath/HPath.hs
haskell
>>> "/tmp" ^!! act listDirectory.folded.files
module HPath where import Control.Applicative import Control.Lens import Filesystem | Monadic filtering for lens filteredM f = act (\x -> (,) <$> pure x <*> f x).filtered snd.to fst files = filteredM isFile directories = filteredM isDirectory contents = act listDirectory ofSize = undefined
ae74e49235fabcd70ba087dffbdd4601e7039c379437a4d2d080a19015fd1712
OCamlPro/liquidity
liquidPrinter.ml
(****************************************************************************) (* Liquidity *) (* *) Copyright ( C ) 2017 - 2020 OCamlPro SAS (* ...
null
https://raw.githubusercontent.com/OCamlPro/liquidity/3578de34cf751f54b9e4c001a95625d2041b2962/tools/liquidity/liquidPrinter.ml
ocaml
************************************************************************** Liquidity ...
Copyright ( C ) 2017 - 2020 OCamlPro SAS it under the terms of the GNU General Public License as published by ...
ae9a8f32b1edd286d5d8e7b8a406cdf51cf5fc097de8de9376c81b1ce13bb7a8
skanev/playground
03-tests.scm
(require rackunit rackunit/text-ui) (load "../03.scm") (define sicp-3.03-tests (test-suite "Tests for SICP exercise 3.03" (test-begin (let ((account (make-account 100 'secret))) (check-equal? ((account 'deposit 'secret) 0) 100) (check-equal? ((account 'deposit 'secret) 50) 150) ...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/tests/03-tests.scm
scheme
(require rackunit rackunit/text-ui) (load "../03.scm") (define sicp-3.03-tests (test-suite "Tests for SICP exercise 3.03" (test-begin (let ((account (make-account 100 'secret))) (check-equal? ((account 'deposit 'secret) 0) 100) (check-equal? ((account 'deposit 'secret) 50) 150) ...
82e1ff71cdea05ad3de7b8b5ad03ce1c567437e7212be9918e903051cd2921a2
arttuka/reagent-material-ui
button_base.cljs
(ns reagent-mui.material.button-base "Imports @mui/material/ButtonBase as a Reagent component. Original documentation is at -ui/api/button-base/ ." (:require [reagent.core :as r] ["@mui/material/ButtonBase" :as MuiButtonBase])) (def button-base (r/adapt-react-class (.-default MuiButtonBase)))
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/material/button_base.cljs
clojure
(ns reagent-mui.material.button-base "Imports @mui/material/ButtonBase as a Reagent component. Original documentation is at -ui/api/button-base/ ." (:require [reagent.core :as r] ["@mui/material/ButtonBase" :as MuiButtonBase])) (def button-base (r/adapt-react-class (.-default MuiButtonBase)))
e184a10e5a6bbdd1984c7f3c28351d33e7e23582552bf8570eaec090402d2a93
ElderEphemera/deriving-th
Internal.hs
# language PolyKinds # {-# language ScopedTypeVariables #-} # language TypeApplications # module DerivingTH.Internal ( deriveTH', deriveTHType', placeholder, Proxy(Proxy) ) where import DerivingTH.Class (DeriveTH(deriveTH, deriveTHType)) import Data.Proxy (Proxy(Proxy)) import Language.Haskell.TH deriveTH' ::...
null
https://raw.githubusercontent.com/ElderEphemera/deriving-th/8026f6c054738ae71728322bed3639ed72df65f8/src/DerivingTH/Internal.hs
haskell
# language ScopedTypeVariables #
# language PolyKinds # # language TypeApplications # module DerivingTH.Internal ( deriveTH', deriveTHType', placeholder, Proxy(Proxy) ) where import DerivingTH.Class (DeriveTH(deriveTH, deriveTHType)) import Data.Proxy (Proxy(Proxy)) import Language.Haskell.TH deriveTH' :: forall cls proxy. DeriveTH cls => pr...
a0373683df17d695c5b43889374e7dd6c95d4699c82b8706f147dfd81333398e
dm3/clojure.java-time
sugar.clj
(ns java-time.sugar (:require [clojure.string :as str] [java-time.core :as jt.c] [java-time.util :as jt.u])) (defmacro gen-sugar-fns [] (conj (map (fn [[day-name day-number]] `(defn ~(symbol (str day-name '?)) ~(str "Returns true if the given time entity wi...
null
https://raw.githubusercontent.com/dm3/clojure.java-time/6a56f6c144c296efded2872ebb127d4b2e05ec9c/src/java_time/sugar.clj
clojure
(ns java-time.sugar (:require [clojure.string :as str] [java-time.core :as jt.c] [java-time.util :as jt.u])) (defmacro gen-sugar-fns [] (conj (map (fn [[day-name day-number]] `(defn ~(symbol (str day-name '?)) ~(str "Returns true if the given time entity wi...
9ad953ef3ae879a990746ece8cf17b3181faa25fd1f7cfb46572d1a143985c33
tweag/lagoon
Conduit.hs
Copyright 2020 Pfizer Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -2.0 -- Unless required by applicable law or agreed to in writing, software distributed under th...
null
https://raw.githubusercontent.com/tweag/lagoon/2ef0440db810f4f45dbed160b369daf41d92bfa4/server/src/Lagoon/Server/Servant/Conduit.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permiss...
Copyright 2020 Pfizer Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , # LANGUAGE TypeFamilies # # OPTIONS_GHC -fno - warn - orphans # module Lagoon.Server.Servant.Conduit ( ServerStreamResponse(..) ) where im...
428d53f794794822263655b30210ff78d17f5f501e755070d26cfd23fefbadf9
sellout/quid-pro-quo
macros.lisp
(in-package #:quid-pro-quo) (defun ensure-contracted-function (function-name lambda-list) "This both ensures that the method combination is correct as well as that the correct version of STANDARD-GENERIC-FUNCTION is used (for some implementations, Closer-MOP's STANDARD-GENERIC-FUNCTION is different from CL'...
null
https://raw.githubusercontent.com/sellout/quid-pro-quo/c35156d5883efb15e21ad4db932a57e353f4d329/src/macros.lisp
lisp
CHANGE-CLASS here.
(in-package #:quid-pro-quo) (defun ensure-contracted-function (function-name lambda-list) "This both ensures that the method combination is correct as well as that the correct version of STANDARD-GENERIC-FUNCTION is used (for some implementations, Closer-MOP's STANDARD-GENERIC-FUNCTION is different from CL'...
61141837dd01b033ab33aec9aa51c424ec7ae6e9217f738b9c328588f74675ac
scrintal/heroicons-reagent
microphone.cljs
(ns com.scrintal.heroicons.outline.microphone) (defn render [] [:svg {:xmlns "" :fill "none" :viewBox "0 0 24 24" :strokeWidth "1.5" :stroke "currentColor" :aria-hidden "true"} [:path {:strokeLinecap "round" :strokeLinejoin "round" ...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/microphone.cljs
clojure
(ns com.scrintal.heroicons.outline.microphone) (defn render [] [:svg {:xmlns "" :fill "none" :viewBox "0 0 24 24" :strokeWidth "1.5" :stroke "currentColor" :aria-hidden "true"} [:path {:strokeLinecap "round" :strokeLinejoin "round" ...
9e5d8c8abdd409cbd7d8f0991547ae0d98151ba996f9fce7ee3985739c69ecf0
fukamachi/fast-websocket
constants.lisp
(in-package :cl-user) (defpackage fast-websocket.constants (:use :cl) (:import-from :alexandria #:plist-hash-table #:hash-table-keys) (:export #:+byte+ #:+fin+ #:+rsv1+ #:+rsv2+ #:+rsv3+ #:+opcode+ #:+mask+ ...
null
https://raw.githubusercontent.com/fukamachi/fast-websocket/24c0217e7c0d25b6ef6ab799452cba0b9fb58f44/src/constants.lisp
lisp
(in-package :cl-user) (defpackage fast-websocket.constants (:use :cl) (:import-from :alexandria #:plist-hash-table #:hash-table-keys) (:export #:+byte+ #:+fin+ #:+rsv1+ #:+rsv2+ #:+rsv3+ #:+opcode+ #:+mask+ ...
c113262439bbe0915d7de4533ae992b9c48601de5c8865cef8e0e877244d6d6e
Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library
DisputeEvidenceDetails.hs
{-# LANGUAGE MultiWayIf #-} CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . {-# LANGUAGE OverloadedStrings #-} -- | Contains the types generated from the schema DisputeEvidenceDetails module StripeAPI.Types.DisputeEvidenceDetails where ...
null
https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/DisputeEvidenceDetails.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | Contains the types generated from the schema DisputeEvidenceDetails | Defines the object schema located at @components.schemas.dispute_evidence_details@ in the specification. | due_by: Date by which evidence must be submitted in order to successfully challenge...
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . module StripeAPI.Types.DisputeEvidenceDetails where import qualified Control.Monad.Fail import qualified Data.Aeson import qualified Data.Aeson as Data.Aeson.Encoding.Internal import qual...
e47b906940264a21ec58855ed2b9e48afe0064e8b2108550eccb6583f4cf3c33
kuberlog/daemon-clj
time.clj
(ns daemon.utils.time) (defn parse-time-string-into-ms "Will convert time strings of the forms ss or mm:ss or hh:mm:ss or dd:hh:mm:ss" [time-string] Count the colons , that will tell you what the first numbers should be (apply + (map #(* (Integer/parseInt %1) %2) (reverse (clojure.string/split tim...
null
https://raw.githubusercontent.com/kuberlog/daemon-clj/904699d005ea2df3d86426d8aa1d3b030178e683/src/daemon/utils/time.clj
clojure
(ns daemon.utils.time) (defn parse-time-string-into-ms "Will convert time strings of the forms ss or mm:ss or hh:mm:ss or dd:hh:mm:ss" [time-string] Count the colons , that will tell you what the first numbers should be (apply + (map #(* (Integer/parseInt %1) %2) (reverse (clojure.string/split tim...
131cfb5bcab4bbdaaf88df543fc3edbe5394921e2b12f192d272464e21cd90e0
ocaml-multicore/domainslib
sum_par.ml
let num_domains = try int_of_string Sys.argv.(1) with _ -> 2 let n = try int_of_string Sys.argv.(2) with _ -> 100 module T = Domainslib.Task let _ = (* use parallel_for_reduce *) let p = T.setup_pool ~num_domains:(num_domains - 1) () in let sum = T.run p (fun _ -> T.parallel_for_reduce p (+) 0 ~chunk_size:(...
null
https://raw.githubusercontent.com/ocaml-multicore/domainslib/94abdda583bbdd2a08b9dcef8689a315fb48afb8/test/sum_par.ml
ocaml
use parallel_for_reduce explictly use empty pool and default chunk_size configured num_domains and default chunk_size
let num_domains = try int_of_string Sys.argv.(1) with _ -> 2 let n = try int_of_string Sys.argv.(2) with _ -> 100 module T = Domainslib.Task let _ = let p = T.setup_pool ~num_domains:(num_domains - 1) () in let sum = T.run p (fun _ -> T.parallel_for_reduce p (+) 0 ~chunk_size:(n/(4*num_domains)) ~start:0 ...
e305b2abb30daaf6ea6eecd0bf5a7aaac8aabe0ff94a2729a1e38cf459954900
draperlaboratory/VIBES
ppc_ops.ml
(***************************************************************************) (* *) Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc. (* *) (* This...
null
https://raw.githubusercontent.com/draperlaboratory/VIBES/ba4fe14a355617e8d07df59578f032aa9f1f27b2/tools/vibes-select/lib/ppc/ppc_ops.ml
ocaml
************************************************************************* This file is provided under the license found in the LICENSE file in the top-level director...
Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc. This research was developed with funding from the Defense Advanced Research Projects Agency ( DARPA ) . open Core module Ir = Vibes_ir.Types module Cond = struct type t = EQ | NE | LE | G...
634820ca9334d9a69893fcd351f13741b01b5d7c2e5bc9d17a21517330d1c96e
arcfide/oleg
input-parse.scm
;**************************************************************************** ; Simple Parsing of input ; ; The following simple functions surprisingly often suffice to parse ; an input stream. They either skip, or build and return tokens, ; according to inclusion or delimiting semantics. The list of characters to ...
null
https://raw.githubusercontent.com/arcfide/oleg/c6826870436925fd4c873c01d7fcc24a7a7f95dc/ssax/lib/input-parse.scm
scheme
**************************************************************************** Simple Parsing of input The following simple functions surprisingly often suffice to parse an input stream. They either skip, or build and return tokens, according to inclusion or delimiting semantics. The list of invocation of a funct...
characters to expect , include , or to break at may vary from one EOF is generally frowned on , and thrown up upon if encountered . ( characters to skip until , or break - characters ) may include an EOF error . The first argument is a port , which typically points to the From SRFI-13 , string - concatenat...
7f770c885385d8a8c041da1f7abbbb12a6797d2b574fccfdb06503a2dbf0e2c1
janegca/htdp2e
Exercise-015-StringFirst.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-reader.ss" "lang")((modname Exercise-015-StringFirst) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp")...
null
https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/01-FixedSizeData/Exercise-015-StringFirst.rkt
racket
about the language level of this file in a form that our tools can easily process. a non-empty string. Don’t worry about empty strings.
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname Exercise-015-StringFirst) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-...
047321cc2feb40efedb7f0b396ebcc7a2605aa5227f6308505cb5ce671eac1d5
coccinelle/coccinelle
parsing_hacks.ml
* * Copyright ( C ) 2010 , University of Copenhagen DIKU and INRIA . * Copyright ( C ) 2007 , 2008 Ecole des Mines de Nantes * * This program is free software ; you can redistribute it and/or * modify it under the terms of the GNU General Public License ( GPL ) * version 2 as published by the F...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/87350d742df39d847b15af39865329c2fe23460d/parsing_c/parsing_hacks.ml
ocaml
*************************************************************************** Some debugging functions *************************************************************************** In the following, there are some hardcoded names of types or macros * but they are not used by our heuristics! They are just here to * en...
* * Copyright ( C ) 2010 , University of Copenhagen DIKU and INRIA . * Copyright ( C ) 2007 , 2008 Ecole des Mines de Nantes * * This program is free software ; you can redistribute it and/or * modify it under the terms of the GNU General Public License ( GPL ) * version 2 as published by the F...
d36c37a5e1115b529a8d35fa58c0b13741765fb4c54b681fca1a753c19f47cde
jacekschae/learn-datomic-course-files
handlers.clj
(ns cheffy.recipe.handlers (:require [cheffy.recipe.db :as recipe-db] [cheffy.responses :as responses] [ring.util.response :as rr]) (:import (java.util UUID))) (defn list-all-recipes [{:keys [env claims] :as _request}] (let [account-id (:sub claims)] (rr/response (recipe-db/find-all...
null
https://raw.githubusercontent.com/jacekschae/learn-datomic-course-files/114a501f3e6caeabd08e3863600951df4bf7d4ba/increments/29-update-step/src/main/cheffy/recipe/handlers.clj
clojure
FIXME: recipe-db/transact-step FIXME: recipe-db/retract-step FIXME: recipe-db/transact-ingredient FIXME: recipe-db/transact-ingredient FIXME: recipe-db/retract-ingredient FIXME: recipe-db/favorite-recipe FIXME: recipe-db/unfavorite-recipe
(ns cheffy.recipe.handlers (:require [cheffy.recipe.db :as recipe-db] [cheffy.responses :as responses] [ring.util.response :as rr]) (:import (java.util UUID))) (defn list-all-recipes [{:keys [env claims] :as _request}] (let [account-id (:sub claims)] (rr/response (recipe-db/find-all...
3a2d9ba9e920937b0980a1bec9975f96435d99a37fd634561615d603d5576aed
freizl/hoauth2
Twitter.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # -- | [Twitter OAuth2 guide](-2-0/authorization-code) module Network.OAuth2.Provider.Twitter where import Data.Aeson import Data.Char (toLower) import Data.Map.Strict qualified ...
null
https://raw.githubusercontent.com/freizl/hoauth2/2337ba1affce5b60ee09e425988f15bc23e39147/hoauth2-providers/src/Network/OAuth2/Provider/Twitter.hs
haskell
# LANGUAGE OverloadedStrings # | [Twitter OAuth2 guide](-2-0/authorization-code)
# LANGUAGE DeriveGeneric # # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # module Network.OAuth2.Provider.Twitter where import Data.Aeson import Data.Char (toLower) import Data.Map.Strict qualified as Map import Data.Set qualified as Set import Data.Text.Lazy (Text) import GHC.Generics...
7d91a3c890034162e82f652ba171bc2780ee1cf0e797874711f34394ee52be6f
josefs/Gradualizer
send_fail.erl
-module(send_fail). -export([foo/2, bar/2]). -spec foo(any(), ok) -> nok. foo(X, Y) -> X ! Y. -spec bar(any(), ok) -> nok. bar(X, Y) -> A = X ! Y, A.
null
https://raw.githubusercontent.com/josefs/Gradualizer/00d907accacfc29a3241dc42c1cd6d00f7e3ca37/test/should_fail/send_fail.erl
erlang
-module(send_fail). -export([foo/2, bar/2]). -spec foo(any(), ok) -> nok. foo(X, Y) -> X ! Y. -spec bar(any(), ok) -> nok. bar(X, Y) -> A = X ! Y, A.
5fe3cb74e657a626e7dc43d9cf5f62f53227aee4463e08a8b55a3a8e1d737dce
herd/herdtools7
mySys.mli
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/9c7cb7d6be30430c8eed3313e6ed2e16ce8f3ad5/lib/mySys.mli
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2010 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
a7a39924d835e39daa8ebfa810beadb3dfd715743d78317b520bafb52ab9c4e0
elastic/eui-cljs
icon_play_filled.cljs
(ns eui.icon-play-filled (:require ["@elastic/eui/lib/components/icon/assets/playFilled.js" :as eui])) (def playFilled eui/icon)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_play_filled.cljs
clojure
(ns eui.icon-play-filled (:require ["@elastic/eui/lib/components/icon/assets/playFilled.js" :as eui])) (def playFilled eui/icon)
0b5d6f330d4b1a9c0b0390bb44e928749f79437c8a1deeb7a07ff5d898bd70f0
Slava/typescript-types-script
Main.hs
module Main where import qualified Data.Text.IO as T import Lib (parse) main :: IO () main = do input <- T.getContents parse input
null
https://raw.githubusercontent.com/Slava/typescript-types-script/8f419d96494c9ff14d5a4b39506827dbef847d9c/compiler/app/Main.hs
haskell
module Main where import qualified Data.Text.IO as T import Lib (parse) main :: IO () main = do input <- T.getContents parse input
bdab29fe61ccfcc6f7fa7305f6ea563bf867d9921b837bd278e950ab3aef1f8b
discus-lang/ddc
DaCon.hs
module DDC.Core.Discus.Convert.Type.DaCon (convertDaCon) where import DDC.Core.Discus.Convert.Type.Base import DDC.Core.Discus.Convert.Error import DDC.Core.Exp.Annot import DDC.Control.Check (throw) import qualified DDC.Core.Discus.Prim as E import qualified DDC.Core.Salt.Name...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core-discus/DDC/Core/Discus/Convert/Type/DaCon.hs
haskell
| Convert a data constructor definition. | Convert the name of a data constructor.
module DDC.Core.Discus.Convert.Type.DaCon (convertDaCon) where import DDC.Core.Discus.Convert.Type.Base import DDC.Core.Discus.Convert.Error import DDC.Core.Exp.Annot import DDC.Control.Check (throw) import qualified DDC.Core.Discus.Prim as E import qualified DDC.Core.Salt.Name...
493fe6808ec49fdca7ec10fac9ec9226381dcec2c62bd864505277c466d69219
carlosavieira/self-study
05.hs
myReverse :: [a] -> [a] myReverse [] = [] myReverse (x:xs) = (myReverse xs) ++ [x]
null
https://raw.githubusercontent.com/carlosavieira/self-study/c7f998875f34a9d3623ade6deb75980affad2047/programming/Haskell/99%20problems/solutions/05.hs
haskell
myReverse :: [a] -> [a] myReverse [] = [] myReverse (x:xs) = (myReverse xs) ++ [x]
e90f3f62fac1847dc6499771873a6b28f1477522f8fc59641a1c034671b1083f
rems-project/cerberus
fs_interface.mli
(****************************************************************************) Copyright ( c ) 2013 , 2014 , 2015 , , , , ( as part of the SibylFS project ) (* *) (* Permission to use, copy, modify, and/or d...
null
https://raw.githubusercontent.com/rems-project/cerberus/124c93f10cb4c235f6396adec82ebf9563daeb7e/sibylfs/original/fs_interface.mli
ocaml
************************************************************************** Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright no...
Copyright ( c ) 2013 , 2014 , 2015 , , , , ( as part of the SibylFS project ) THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL PROFITS , WHETHER IN AN ACTION OF CONTRACT , NEGLIGENCE OR OTHER TORTIOUS ACTION , ARISING OUT OF OR IN CONNE...
4e28106a885ce38b42c560170acd2c7e648e37bc08f3ed98c1d2ccaca5158783
gonzojive/elephant
RunIndexingTutorial.lisp
(asdf:operate 'asdf:load-op :elephant) (asdf:operate 'asdf:load-op :ele-bdb) (asdf:operate 'asdf:load-op :elephant-tests) (compile-file "indexing.lisp") (load "index-tutorial.lisp") (in-package "ELEPHANT-TUTORIAL") (defconstant KILO 1000) (defun test-generate-and-report-big (num name store-spec) (open-store store-s...
null
https://raw.githubusercontent.com/gonzojive/elephant/b29a012ab75ccea2fc7fc4f1e9d5e821f0bd60bf/tests/RunIndexingTutorial.lisp
lisp
(asdf:operate 'asdf:load-op :elephant) (asdf:operate 'asdf:load-op :ele-bdb) (asdf:operate 'asdf:load-op :elephant-tests) (compile-file "indexing.lisp") (load "index-tutorial.lisp") (in-package "ELEPHANT-TUTORIAL") (defconstant KILO 1000) (defun test-generate-and-report-big (num name store-spec) (open-store store-s...
126243529012afe2ec9b5683364e1b72a6ad15b35ecc9ee34c9e12aca5bfb38c
ocamllabs/ocaml-modular-implicits
mixing_value_closures_2.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet Ga...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/letrec/mixing_value_closures_2.ml
ocaml
********************************************************************* OCaml ...
, projet Gallium , INRIA Rocquencourt Copyright 2012 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . let test = let rec x = `A f and f = fu...
72eb8c30132427477ef0f2f73e024a8d299256338bb00f2e4d91a228010a8d5b
mpieva/biohazard-tools
expound.hs
# LANGUAGE ExistentialQuantification , Rank2Types # This is now supposed to read both Ensembl- and UCSC - style input , and - it had a very weird heuristic to convert them into each other . We - drop this shit now , the rules are : following the specification , all - coordinates are 0 - based half open i...
null
https://raw.githubusercontent.com/mpieva/biohazard-tools/93959b6ad0dde2a760559fe82853ab78497f0452/src/expound.hs
haskell
processes the summaries. request/upload each annotation set fork thread to upload all the input receive responses, print output Ask the server for an annotation set, upload it if necessary. Reads from network and passes it on, calling the continuation once for each "file".
# LANGUAGE ExistentialQuantification , Rank2Types # This is now supposed to read both Ensembl- and UCSC - style input , and - it had a very weird heuristic to convert them into each other . We - drop this shit now , the rules are : following the specification , all - coordinates are 0 - based half open i...
94501ea28ae3a94dbd933bbe684a86d5c5bad186fcffec89ce5c68d5e38f0ae4
ocaml-ppx/ocamlformat
loc_stack.ml
let _ = ( (* a *) ( (* b *) 2 )) let _ = ( (* before match *) match (* after match *) x with | _ -> 1 ) let _ = ( (* before try *) try (* after try *) x with | _ -> 1 ) let should_inline : Llvm.llvalue -> bool = fun llv -> match Llvm.use_begin llv with | Some use -> ( match Llvm.use_succ use w...
null
https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/3d1c992240f7d30bcb8151285274f44619dae197/test/passing/tests/loc_stack.ml
ocaml
a b before match after match before try after try CR-someday diml: maybe we should actually clear OCAMLPATH in other build contexts inline casts
let _ = let _ = ( | _ -> 1 ) let _ = ( | _ -> 1 ) let should_inline : Llvm.llvalue -> bool = fun llv -> match Llvm.use_begin llv with | Some use -> ( match Llvm.use_succ use with | Some _ -> ( If we are not in the default context , we can only use the OCAMLPATH variable if it is specifi...
b6724f78bc7a0340b91ce1fd86a34d0e1fe69c0aa9e5937d4a1afac537d1c340
facebook/infer
PulseBaseAddressAttributes.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/6693381318c30c5dccb543ffd12d5309759c5793/infer/src/pulse/PulseBaseAddressAttributes.mli
ocaml
* merge the attributes of all the variables that are equal according to [get_var_repr] and remove non-canonical variables in favor of their representative
* 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 ...
a52acab17db370e7cbc34e6662e898a001340405409cdd9345ef246c52c4cabb
ntoronto/drbayes
normal-normal.rkt
#lang typed/racket (require math/distributions math/statistics plot/typed) (provide normal-normal/lw) (: normal-normal/lw (Real Real (Listof Real) (Listof Real) -> Void)) (define (normal-normal/lw m s ys ss) (define d0 (normal-dist m s)) (define xs (sample d0 100000)) (define ws (map (λ: ([x ...
null
https://raw.githubusercontent.com/ntoronto/drbayes/e59eb7c7867118bf4c77ca903e133c7530e612a3/drbayes/tests/language-tests/normal-normal.rkt
racket
#lang typed/racket (require math/distributions math/statistics plot/typed) (provide normal-normal/lw) (: normal-normal/lw (Real Real (Listof Real) (Listof Real) -> Void)) (define (normal-normal/lw m s ys ss) (define d0 (normal-dist m s)) (define xs (sample d0 100000)) (define ws (map (λ: ([x ...
285eae1ba1213e8e680e8fb56596d228919690cb45af2f5addd1099973236176
mstksg/servant-validate
Spec.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE TypeApplications # {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fdefer-type-errors #-} import Test.Hspec (hspec, describe, it) import Test.ShouldNotTypecheck (shouldNotTypecheck) import Data.Proxy import Servant.API import ...
null
https://raw.githubusercontent.com/mstksg/servant-validate/2e24ec7ed8ffa469fc1fd753beb15532256f7ecf/test/Spec.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # # OPTIONS_GHC -fdefer-type-errors #
# LANGUAGE TypeApplications # import Test.Hspec (hspec, describe, it) import Test.ShouldNotTypecheck (shouldNotTypecheck) import Data.Proxy import Servant.API import Servant.Validate type TestApi = "hello" :> Get '[] () :<|> "ok" :> "bye" :> Get '[] () :<|> "o...