_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
d2c14ab84a1023a2f22dc4d1df5638fb3868087d26931f660519d727c0b5b9ef
alephcloud/hs-aws-lambda
UploadFunction.hs
Copyright ( c ) 2013 - 2014 PivotCloud , Inc. -- Aws . Lambda . Commands . UploadFunction -- -- Please feel free to contact us at with any -- contributions, additions, or other feedback; we would love to hear from -- you. -- Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may -- not use...
null
https://raw.githubusercontent.com/alephcloud/hs-aws-lambda/df10334bf419384db254d71da06c801849571c1e/src/Aws/Lambda/Commands/UploadFunction.hs
haskell
Please feel free to contact us at with any contributions, additions, or other feedback; we would love to hear from you. 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 WARRANTIES OR COND...
Copyright ( c ) 2013 - 2014 PivotCloud , Inc. Aws . Lambda . Commands . UploadFunction Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may distributed under the License is distributed on an " AS IS " BASIS , WITHOUT # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving ...
f2b010d3f7b496e8056906515506ef6d22ca01498f167389f22cf7265800fee3
wargrey/graphics
misc.rkt
#lang typed/racket/base (provide (all-defined-out)) (require racket/fixnum) (require racket/math) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define-type HSB->RGB (-> Flonum Flonum Flonum (Values Flonum Flonum Flonum))) (define-type RGB->HSB (-> Flonum Flonum ...
null
https://raw.githubusercontent.com/wargrey/graphics/33ef0325b50cbed3358e56c5c432522c11a348de/colorspace/misc.rkt
racket
#lang typed/racket/base (provide (all-defined-out)) (require racket/fixnum) (require racket/math) (define-type HSB->RGB (-> Flonum Flonum Flonum (Values Flonum Flonum Flonum))) (define-type RGB->HSB (-> Flonum Flonum Flonum (Values Flonum Flonum Flonum))) (define gamut->byte : (-> Flonum Byte) (λ [r] (min (max (exa...
62f30bdddea768a5eabd9999f311a9f4654cefcc07a950e98f65e45ad2243c5d
kupl/FixML
sub2.ml
type heap = EMPTY | NODE of rank * value * heap * heap and rank = int and value = int exception EmptyHeap let rank h = match h with | EMPTY -> -1 | NODE(r,_,_,_) -> r let shake (x,lh,rh) = if (rank lh) >= (rank rh) then NODE(rank rh+1, x, lh, rh) else NODE(rank lh+1, x, rh, lh) let rec merge (h...
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/priority_queue/priority_queue/submissions/sub2.ml
ocaml
type heap = EMPTY | NODE of rank * value * heap * heap and rank = int and value = int exception EmptyHeap let rank h = match h with | EMPTY -> -1 | NODE(r,_,_,_) -> r let shake (x,lh,rh) = if (rank lh) >= (rank rh) then NODE(rank rh+1, x, lh, rh) else NODE(rank lh+1, x, rh, lh) let rec merge (h...
f5edd3cfd7ee5a8c9adfa149a62ea67be58716d54233352ae720c8c15e16fe73
fendor/hsimport
ModuleTest20.hs
{-# Language PatternGuards #-} module Blub ( blub , foo , bar ) where import Ugah.Foo import Control.Applicative import Ugah.Blub ddd f :: Int -> Int f = (+ 3)
null
https://raw.githubusercontent.com/fendor/hsimport/9be9918b06545cfd7282e4db08c2b88f1d8162cd/tests/inputFiles/ModuleTest20.hs
haskell
# Language PatternGuards #
module Blub ( blub , foo , bar ) where import Ugah.Foo import Control.Applicative import Ugah.Blub ddd f :: Int -> Int f = (+ 3)
e263eb60af7bda93eec151175dbf923ba03bc5c3475551f1f8525afb53286e73
ucsd-progsys/liquidhaskell
Sumk.hs
{-@ LIQUID "--expect-any-error" @-} module Sumk () where import Language.Haskell.Liquid.Prelude m = choose 0 bot = choose 0 dsum ranjit jhala k = if (ranjit `leq` 0) then k jhala else dsum (ranjit `minus` 1) (ranjit `plus` jhala) k prop0 = dsum m bot (\x -> liquidAssertB ((m `plus` bot) `leq` x)) prop...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/Sumk.hs
haskell
@ LIQUID "--expect-any-error" @
module Sumk () where import Language.Haskell.Liquid.Prelude m = choose 0 bot = choose 0 dsum ranjit jhala k = if (ranjit `leq` 0) then k jhala else dsum (ranjit `minus` 1) (ranjit `plus` jhala) k prop0 = dsum m bot (\x -> liquidAssertB ((m `plus` bot) `leq` x)) prop1 = liquidAssertB (1 `leq` 0)
7d22c5eb863686a8f323c2d69112a4fc073c2131efe87aa884f66abf3a0f7943
exercism/haskell
Person.hs
module Person ( Address (..) , Born (..) , Name (..) , Person (..) , bornStreet , renameStreets , setBirthMonth , setCurrentStreet ) where import Data.Time.Calendar (Day) data Person = Person { _name :: Name , _born :: Born , _address :: Address...
null
https://raw.githubusercontent.com/exercism/haskell/2b98084efc7d5ab098975c462f7977ee19c2fd29/exercises/practice/lens-person/src/Person.hs
haskell
module Person ( Address (..) , Born (..) , Name (..) , Person (..) , bornStreet , renameStreets , setBirthMonth , setCurrentStreet ) where import Data.Time.Calendar (Day) data Person = Person { _name :: Name , _born :: Born , _address :: Address...
05bda06c596fb2cb097965afa85191a096e9a3216dc1a8dc0367c76f9c2fd594
vikram/lisplibraries
english.lisp
-*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*- ;; See the file LICENCE for licence information. (in-package #:cl-l10n) (defparameter *english-plural-overrides* (read-key->value-text-file-into-hashtable (merge-pathnames (make-pathname :directory '(:relative "languages") ...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/ucw-boxset/dependencies/cl-l10n/languages/english.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 -*- See the file LICENCE for licence information. /~damian/papers/HTML/Plurals.html
(in-package #:cl-l10n) (defparameter *english-plural-overrides* (read-key->value-text-file-into-hashtable (merge-pathnames (make-pathname :directory '(:relative "languages") :name "english-plural-overrides" :type "text") (a...
80be8257416fdab307adb883191f89cc86baae04412b1c2342f03c3bf778b988
garrigue/lablgtk
gdk.ml
(**************************************************************************) (* Lablgtk *) (* *) (* This program is free software; you can redistribute it *) and/or ...
null
https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/src/gdk.ml
ocaml
************************************************************************ Lablgtk This program is free software; you can redistribute it comes with the library. ...
and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation version 2 , with the exception described in file COPYING which GNU Library General Public License for more details . You should have r...
9553aa4c06c6af20a7f1c96bbaf42ccea0bcd99cf80e206f1b87ec57788992c5
oliyh/martian
test_runner.cljs
(ns martian.test-runner (:require [martian.re-frame-test] [figwheel.main.testing :refer [run-tests-async]])) (defn -main [& args] (run-tests-async 5000))
null
https://raw.githubusercontent.com/oliyh/martian/c20d3fad47709ecfc0493e2fb607d5b56ea3193d/re-frame/test/martian/test_runner.cljs
clojure
(ns martian.test-runner (:require [martian.re-frame-test] [figwheel.main.testing :refer [run-tests-async]])) (defn -main [& args] (run-tests-async 5000))
9b096c1200d2d6294e26d56a27b17482d20f4f5153bfed1ba5e5e2262ac61e5c
gojek/ziggurat
timestamp_transformer_test.clj
(ns ziggurat.timestamp-transformer-test (:require [clojure.test :refer [deftest is testing]] [ziggurat.metrics :as metrics] [ziggurat.timestamp-transformer :refer [create]] [ziggurat.util.time :refer [get-current-time-in-millis get-timestamp-from-record]]) (:import [org.apache.ka...
null
https://raw.githubusercontent.com/gojek/ziggurat/f5e0822af8410ea79b7734ef2f41bc98fad3c17f/test/ziggurat/timestamp_transformer_test.clj
clojure
(ns ziggurat.timestamp-transformer-test (:require [clojure.test :refer [deftest is testing]] [ziggurat.metrics :as metrics] [ziggurat.timestamp-transformer :refer [create]] [ziggurat.util.time :refer [get-current-time-in-millis get-timestamp-from-record]]) (:import [org.apache.ka...
382d2f9f3ffa3eaa3f99d8137c54758a7d2a9ccccb3331ad34112edfc3522498
tezos/tezos-mirror
main.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/c50423992947f9d3bf33f91ec8000f3a0a70bc2d/src/proto_016_PtMumbai/lib_protocol/main.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETH...
677b5a75926581973a8eb28b34a9ef46003150241460f5655245940fb9bf7e51
racket/gui
mrtop.rkt
#lang racket/base (require racket/class racket/list (prefix-in wx: "kernel.rkt") "lock.rkt" "helper.rkt" "const.rkt" "check.rkt" "wx.rkt" "wxtop.rkt" "wxpanel.rkt" "wxitem.rkt" "mrwindow.rkt" "mrcontainer.rkt" ...
null
https://raw.githubusercontent.com/racket/gui/29fb0323b1a6172547d7d0422599137cc65256c3/gui-lib/mred/private/mrtop.rkt
racket
supports status line for inherited keywords each can be #f for inherited inits for inherited keywords each can be #f for inherited inits so create the root frame, show it , and hide it.
#lang racket/base (require racket/class racket/list (prefix-in wx: "kernel.rkt") "lock.rkt" "helper.rkt" "const.rkt" "check.rkt" "wx.rkt" "wxtop.rkt" "wxpanel.rkt" "wxitem.rkt" "mrwindow.rkt" "mrcontainer.rkt" ...
0b4c8c31200fcd688a21fa3dca9bd61510b1ece0a1c6a12e022b3dff3fc9fe95
backtracking/mlpost
metaPath.ml
(**************************************************************************) (* *) Copyright ( C ) Johannes Kanig , , and (* *) (* This software is f...
null
https://raw.githubusercontent.com/backtracking/mlpost/bd4305289fd64d531b9f42d64dd641d72ab82fd5/src/metaPath.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
Copyright ( C ) Johannes Kanig , , and modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking module S = Point open Types module BaseDefs = struct type direction = Types.direction let vec = m...
88cc2fba7c14f711997a5f4fa7705af7b6675dc582fdf9be3a35edfe087f460d
dnadales/sandbox
CloudFilesExceptions.hs
# LANGUAGE DeriveFunctor # -- | How do we deal with fatal errors at the IO layer? -- module CloudFilesExceptions where import Control.Monad.Free | Consider the files DSL again , assume we want to deal with two kinds -- of errors: -- -- - A file that we want to list does not exist -- - The connection...
null
https://raw.githubusercontent.com/dnadales/sandbox/401c4f0fac5f8044fb6e2e443bacddce6f135b4b/free-monads/src/CloudFilesExceptions.hs
haskell
| How do we deal with fatal errors at the IO layer? of errors: - A file that we want to list does not exist - The connection with the server is refused dependent on the implementation (we might not be using the network at all in our interpreter). So the question is how do we encode the error handling log...
# LANGUAGE DeriveFunctor # module CloudFilesExceptions where import Control.Monad.Free | Consider the files DSL again , assume we want to deal with two kinds The first kind of errors seem to be specific to the domain logic , so it could be encoded in the DSL . The second kind of error seems to be fa...
9073005da18d622ce464658a6d7e91c2cae17ada461fe788c4e8e430cb308471
walmartlabs/lacinia
tracing.clj
Copyright ( c ) 2020 - present Walmart , 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 dist...
null
https://raw.githubusercontent.com/walmartlabs/lacinia/88bf46f197bfed645d7767fcfe2bfa39e8b00b27/src/com/walmartlabs/lacinia/tracing.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright ( c ) 2020 - present Walmart , Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) distributed under the License is distributed on an " AS IS " BASIS , (ns com.walmartlabs.lacinia.tracing "Support for tracing of requests, as per the [Apollo tracing specification](-tracing)." ...
c7cfe139ba47d2a2f41f22ab3678fd15e5243ddce87d6ca6a94c2379d879e0d6
thierry-martinez/stdcompat
printexc.mli
type t = exn = .. val to_string : exn -> string val print : ('a -> 'b) -> 'a -> 'b val catch : ('a -> 'b) -> 'a -> 'b val print_backtrace : out_channel -> unit val get_backtrace : unit -> string val record_backtrace : bool -> unit val backtrace_status : unit -> bool val register_printer : (exn -> string option) -> unit...
null
https://raw.githubusercontent.com/thierry-martinez/stdcompat/83d786cdb17fae0caadf5c342e283c3dcfee2279/interfaces/4.08/printexc.mli
ocaml
type t = exn = .. val to_string : exn -> string val print : ('a -> 'b) -> 'a -> 'b val catch : ('a -> 'b) -> 'a -> 'b val print_backtrace : out_channel -> unit val get_backtrace : unit -> string val record_backtrace : bool -> unit val backtrace_status : unit -> bool val register_printer : (exn -> string option) -> unit...
afee2f8f7fd30bd419dcf1c6254c56af54cb1628c10a0ce366b1284b23e5c077
vereis/jarlang
dict.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2000 - 2016 . All Rights Reserved . %% 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 applic...
null
https://raw.githubusercontent.com/vereis/jarlang/72105b79c1861aa6c4f51c3b50ba695338aafba4/src/erl/lib/stdlib/dict.erl
erlang
%CopyrightBegin% 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 l...
Copyright Ericsson AB 2000 - 2016 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , We use the dynamic hashing techniques by Per - as described in " The Design and Implementation of Dynamic Hash...
b48c0f7870a926e017b91c287e084b01beb68fc31deea97f66df5c48c4540d6b
lehins/Color
HSI.hs
# LANGUAGE DataKinds # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PatternSynonyms # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAG...
null
https://raw.githubusercontent.com/lehins/Color/8f17d4d17dc9b899af702f54b69d49f3a5752e7b/Color/src/Graphics/Color/Space/RGB/Alternative/HSI.hs
haskell
# LANGUAGE DeriveTraversable # | License : BSD3 Stability : experimental Portability : non-portable # COMPLETE ColorHSI # | Constructor for @HSI@ with alpha channel. # COMPLETE ColorH360SI #
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PatternSynonyms # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # # LANGUAGE Undecid...
7356ddaccc7348eb33e58642c8f5918cc4f39b3aa798c4c01495bfa9af3f1ba0
guildhall/guile-haunt
utils.scm
Haunt --- Static site generator for GNU Copyright © 2015 < > Copyright © 2012 , 2013 , 2014 < > ;;; This file is part of Haunt . ;;; Haunt 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 ; eit...
null
https://raw.githubusercontent.com/guildhall/guile-haunt/c67e8e924c664ae4035862cc7b439cd7ec4bcef6/haunt/utils.scm
scheme
you can redistribute it and/or modify it either version 3 of the License , or (at your option) any later version. WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Commentary: Miscellaneous u...
Haunt --- Static site generator for GNU Copyright © 2015 < > Copyright © 2012 , 2013 , 2014 < > This file is part of Haunt . under the terms of the GNU General Public License as published by Haunt is distributed in the hope that it will be useful , but You should have received a copy of the GNU Gen...
5b4b59021af07b2efe8215bd334be96d63b3a68d51f5297dee1f0203feb16ab9
nikomatsakis/a-mir-formality
borrow-check.rkt
#lang racket (require redex/reduction-semantics "grammar.rkt" "../check/prove-goal.rkt" "borrow-check/initialization-check.rkt" "borrow-check/initialization-infer.rkt" "borrow-check/loan-check.rkt" ) (provide borrow-check ) (define-judgment-form formalit...
null
https://raw.githubusercontent.com/nikomatsakis/a-mir-formality/bc951e21bff2bae1ccab8cc05b2b39cfb6365bfd/racket-src/body/borrow-check.rkt
racket
#lang racket (require redex/reduction-semantics "grammar.rkt" "../check/prove-goal.rkt" "borrow-check/initialization-check.rkt" "borrow-check/initialization-infer.rkt" "borrow-check/loan-check.rkt" ) (provide borrow-check ) (define-judgment-form formalit...
dc7d0af24b920997352fc09e2e32e7168dccab154659418167cdd2d5654a7dce
takikawa/racket-ppa
racket-tests.rkt
; Surface syntax for check-expect & friends in Racket-like languages. #lang racket/base (provide check-expect ;; syntax : (check-expect <expression> <expression>) check-random ;; syntax : (check-random <expression> <expression>) check-within ;; syntax : (check-within <expression> <expression> <expres...
null
https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/htdp-lib/test-engine/racket-tests.rkt
racket
Surface syntax for check-expect & friends in Racket-like languages. syntax : (check-expect <expression> <expression>) syntax : (check-random <expression> <expression>) syntax : (check-within <expression> <expression> <expression>) syntax : (check-member-of <expression> <expression>) syntax : (check-range <express...
#lang racket/base test-execute test-silence test test-engine-is-using-error-display-handler?) (require lang/private/teachprims racket/match htdp/error (for-syntax racket/base test-engine/test-engine (only-in test-engine/test-markup get-rewritten...
12c5a74917711fc727e4f1e3e2706e2c2794fc1965a1f2a60517d8e9e5e969c9
TrustInSoft/tis-kernel
mark_noresults.ml
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/value/utils/mark_noresults.ml
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of Frama - C. Copyright ( C ) 2007 - 2015 ...
881de50d61b55bf8f6a4eecb4c9fa401636f31db5404690aa1d09bedf02dd508
chris-emerson/rest_demo
project.clj
(defproject rest-demo "0.1.0-SNAPSHOT" :description "An example Clojure REST API Implementation" :url "/@functionalhuman/building-a-rest-api-in-clojure-3a1e1ae096e" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[org.clojure/clojure "1.10.0"] ...
null
https://raw.githubusercontent.com/chris-emerson/rest_demo/e28d0e94d544afd049a98563b0df2736513c67ad/project.clj
clojure
Our Http library for client/server
(defproject rest-demo "0.1.0-SNAPSHOT" :description "An example Clojure REST API Implementation" :url "/@functionalhuman/building-a-rest-api-in-clojure-3a1e1ae096e" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[org.clojure/clojure "1.10.0"] ...
cad64e7487f193eb15c99ad5b64e9f67131ab5a4d3a72bc227b4e2d4fc627ee2
craigfe/progress
readme.ml
open Progress let bar color message = let total = 1_000_000_000L in let open Line.Using_int64 in list [ rpad 16 (constf " %s" message) ; bytes ; bytes_per_sec ; bar ~color ~style:`UTF8 total ; percentage_of total ++ const " " ] |> Multi.line let main () = let layout = let open Mu...
null
https://raw.githubusercontent.com/craigfe/progress/d7129b772d05c5589b8807630031155a6aeb27f0/examples/readme.ml
ocaml
Configure a [Logs] reporter that behaves properly with concurrent progress bar rendering.
open Progress let bar color message = let total = 1_000_000_000L in let open Line.Using_int64 in list [ rpad 16 (constf " %s" message) ; bytes ; bytes_per_sec ; bar ~color ~style:`UTF8 total ; percentage_of total ++ const " " ] |> Multi.line let main () = let layout = let open Mu...
04ae242f3d279a4e9dc6049fb95e0227da53ca4e14e4c415b20522867f174def
dnikolovv/haskell-tic-tac-toe
Api.hs
# LANGUAGE ScopedTypeVariables # module Api ( Api , server ) where import App import Auth import ClassyPrelude import Commands import Control.Monad.Catch (MonadThrow, throwM) import Data.Has (Has) import Data.Maybe import qualified Data.UUID as U import qualified Data.UUID.V4 as U import Domain import qualified ...
null
https://raw.githubusercontent.com/dnikolovv/haskell-tic-tac-toe/d8282dfcd73a07d49a86312a1f7f7275dadabc3a/src/Api.hs
haskell
TODO: Validate who is accepting/declining the invitation
# LANGUAGE ScopedTypeVariables # module Api ( Api , server ) where import App import Auth import ClassyPrelude import Commands import Control.Monad.Catch (MonadThrow, throwM) import Data.Has (Has) import Data.Maybe import qualified Data.UUID as U import qualified Data.UUID.V4 as U import Domain import qualified ...
28839932ab030e6c6eaef4f4ab33ef3a7eba648c0924755650e31e7c24ec2797
Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library
SetupIntentNextActionVerifyWithMicrodeposits.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 SetupIntentNextActionVerifyWithMicrodeposits module StripeAPI.Types.SetupIn...
null
https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/SetupIntentNextActionVerifyWithMicrodeposits.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | Contains the types generated from the schema SetupIntentNextActionVerifyWithMicrodeposits | Defines the object schema located at @components.schemas.setup_intent_next_action_verify_with_microdeposits@ in the specification. | hosted_verification_url: The URL fo...
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . module StripeAPI.Types.SetupIntentNextActionVerifyWithMicrodeposits where import qualified Control.Monad.Fail import qualified Data.Aeson import qualified Data.Aeson as Data.Aeson.Encodin...
66d024da8d0afa84207e0f8c8f7ffe8e2d1fd71803923cc404701bd09d9241dc
fakedata-haskell/fakedata
TextSpec.hs
# LANGUAGE ScopedTypeVariables # module TextSpec where import Data.Text (Text) import qualified Data.Text as T import Faker hiding (defaultFakerSettings) import qualified Faker.Address as FA import qualified Faker.Ancient as AN import qualified Faker.App as AP import qualified Faker.Appliance as AP import qualified F...
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/ea938c38845b274e28abe7f4e8e342f491e83c89/test/TextSpec.hs
haskell
copied from -fakedata/blob/d342c6eb5aeb9990bb36ede1d1f08becc7d71e16/src/Hedgehog/Gen/Faker.hs made it work for quickeck instead of hedgehog. who needs side affects anyway? Select a value 'Fake' program in 'Gen'.
# LANGUAGE ScopedTypeVariables # module TextSpec where import Data.Text (Text) import qualified Data.Text as T import Faker hiding (defaultFakerSettings) import qualified Faker.Address as FA import qualified Faker.Ancient as AN import qualified Faker.App as AP import qualified Faker.Appliance as AP import qualified F...
ab3005155c69234c445b5a195e1a369fb27d0334a4a0e391a3d1787d6e237ff9
WorksHub/client
core.cljs
(ns wh.pages.core (:require [bidi.bidi :as bidi] [cljs.loader :as loader] [clojure.string :as str] [pushy.core :as pushy] [re-frame.core :refer [reg-fx reg-sub reg-event-db reg-event-fx dispatch dispatch-sync]] [re-frame.db :refer [app-db]] [wh.c...
null
https://raw.githubusercontent.com/WorksHub/client/4b704cbc825738a2faa05a382641b683d6e4ca37/client/src/wh/pages/core.cljs
clojure
If you came here looking for 'scroll-to-top' functionality, be aware that although we're setting `scrollTop` of `documentElement`, it's the `onscroll` event of `js/window` that is triggered when a scroll happens e.g `wh.blogs.learn.events/on-page-load`. e.g `wh.search.events/on-page-browser-nav`. Set curr...
(ns wh.pages.core (:require [bidi.bidi :as bidi] [cljs.loader :as loader] [clojure.string :as str] [pushy.core :as pushy] [re-frame.core :refer [reg-fx reg-sub reg-event-db reg-event-fx dispatch dispatch-sync]] [re-frame.db :refer [app-db]] [wh.c...
feae17db411636ad09f60511835aceb581cd89e8834e820d6bac0b481f22baff
NorfairKing/sydtest
Def.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # module Test.Syd.Wai.Def where import Network.HTTP.Client as HTTP import Network.Socket (PortNumber) import Network.Wai as Wai import Network.Wai.Handler.W...
null
https://raw.githubusercontent.com/NorfairKing/sydtest/22a7421ba635a18b1bfa750e64c8db5ee8842e5a/sydtest-wai/src/Test/Syd/Wai/Def.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes # | Run a given 'Wai.Application' around every test. This provides a 'WaiClient ()' which contains the port of the running application. | Run a given 'Wai.Application', as built by the given action, around every test. This function doesn't set up the 'HTTP.Manager' like 'w...
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # module Test.Syd.Wai.Def where import Network.HTTP.Client as HTTP import Network.Socket (PortNumber) import Network.Wai as Wai import Network.Wai.Handler.Warp as Warp import Test.Syd import Test.Syd.Wai.Cli...
3c0cee1a90787578c34fda76e3fc658218d23f17c6db834b6d3d422eb8be26bd
marigold-dev/deku
producer.mli
open Deku_concepts open Deku_protocol type producer type t = producer val encoding : producer Data_encoding.t val empty : producer val incoming_operation : operation:Operation.Signed.t -> producer -> producer val incoming_tezos_operation : tezos_operation:Tezos_operation.t -> producer -> producer (* TODO: n log n...
null
https://raw.githubusercontent.com/marigold-dev/deku/cdf82852196b55f755f40850515580be4fd9a3fa/deku-p/src/core/consensus/producer.mli
ocaml
TODO: n log n
open Deku_concepts open Deku_protocol type producer type t = producer val encoding : producer Data_encoding.t val empty : producer val incoming_operation : operation:Operation.Signed.t -> producer -> producer val incoming_tezos_operation : tezos_operation:Tezos_operation.t -> producer -> producer val clean : re...
bb82419f02dac9c136c235dbe56a7dd17c57d17ccd56515c164576e3ce312aaa
zinid/conf
conf.erl
%%%------------------------------------------------------------------- @author < > %%% 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...
null
https://raw.githubusercontent.com/zinid/conf/8f6b94df3584f63fbc6b241ac4ea0740a2e658fb/src/conf.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 o...
@author < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(conf). -behaviour(application). -export([start/0]). -export([stop/0]). -export([load_file/1]). -export([reload_file/0]). -export([reload_file/1]). -ex...
82bda09c56532f1942ddec5df5067a8c82579edde9b7999a4655af430b950b30
ninenines/ct_helper
ct_helper_error_h.erl
Copyright ( c ) 2014 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS A...
null
https://raw.githubusercontent.com/ninenines/ct_helper/478aa272708ed4ad282ca02bed41a5320330e8af/src/ct_helper_error_h.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2014 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(ct_helper_error_h). -behaviour(gen_event). -export(...
f93b37c3a1d914655b679b90a69845912483d6256cfb2f574732b3d00e024d1e
binaryage/chromex
echo_private.cljs
(ns chromex.app.echo-private (:require-macros [chromex.app.echo-private :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn set-offer-info* [config id offer-info] (gen-wrap :function ::...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/apps_private/chromex/app/echo_private.cljs
clojure
(ns chromex.app.echo-private (:require-macros [chromex.app.echo-private :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn set-offer-info* [config id offer-info] (gen-wrap :function ::...
62e9ae001621923099d49987705553ce21abedd0c26b82dae921d4a8d37a00f7
vii/cl-irregsexp
cl-irregsexp.lisp
#.(macrolet ((r (x) x `,x)) (r (let ((*debug-io* (make-string-output-stream)) (*standard-output* (make-string-output-stream))) (asdf:operate 'asdf:load-op :cl-irregsexp)))) (defun slurp-file (name) (with-open-file (s name :element-type '(unsigned-byte 8)) (let ((buf (cl-irregsexp.bytestrings:mak...
null
https://raw.githubusercontent.com/vii/cl-irregsexp/cc23512d3fe2880c5df47fa96d47b352c3d5b73a/bench/cl-irregsexp.lisp
lisp
#.(macrolet ((r (x) x `,x)) (r (let ((*debug-io* (make-string-output-stream)) (*standard-output* (make-string-output-stream))) (asdf:operate 'asdf:load-op :cl-irregsexp)))) (defun slurp-file (name) (with-open-file (s name :element-type '(unsigned-byte 8)) (let ((buf (cl-irregsexp.bytestrings:mak...
cf64e7742496eacf0635d317fa4414f11f467cfa803fc3920c3b12adeafbb8fa
wilkerlucio/pathom-viz-connector
pathom2.clj
(ns com.wsscode.pathom-viz.connector.demos.pathom2 (:require [com.wsscode.pathom.viz.ws-connector.core :as p.connector] [com.wsscode.pathom.core :as p] [com.wsscode.pathom.connect :as pc] [com.wsscode.pathom3.connect.indexes :as pci] [clojure.set :as set]) (:import (j...
null
https://raw.githubusercontent.com/wilkerlucio/pathom-viz-connector/d95371ef5039849e031e3bad39748d8ac8bb1cf0/examples/com/wsscode/pathom_viz/connector/demos/pathom2.clj
clojure
(ns com.wsscode.pathom-viz.connector.demos.pathom2 (:require [com.wsscode.pathom.viz.ws-connector.core :as p.connector] [com.wsscode.pathom.core :as p] [com.wsscode.pathom.connect :as pc] [com.wsscode.pathom3.connect.indexes :as pci] [clojure.set :as set]) (:import (j...
e2bf096cae51929cdb14bbf3e01981c5cbaccbcbdb457236b0f9f94058c0ccd3
faylang/fay
Benchmarks.hs
# LANGUAGE NoImplicitPrelude # | The benchmarks suite . This code is written in . Which may skew -- results, but probably not. -- -- There's a set of benchmarks in main that are run, or you can choose -- to run just one. -- -- For a given benchmark it will run them a few times then calculate the mean , min , and...
null
https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/src/Benchmarks.hs
haskell
results, but probably not. There's a set of benchmarks in main that are run, or you can choose to run just one. For a given benchmark it will run them a few times then calculate accurate enough picture of the performance differences, for the kind of speed differences that we care about at present. Run me like...
# LANGUAGE NoImplicitPrelude # | The benchmarks suite . This code is written in . Which may skew the mean , min , and stddev of them , which should give an module Benchmarks where import FFI import Prelude main :: Fay () main = do sumBenchmark lengthBenchmark queensBenchmark sumBe...
5e653b0ae802f01ce02513d8128de0ec28901780c1ff893c9df0507efa6344f2
huangz1990/SICP-answers
p214-exchange.scm
;;; p214-exchange.scm (define (exchange account1 account2) (let ((difference (- (account1 'balance) (account2 'balance)))) ((account1 'withdraw) difference) ((account2 'deposit) difference)))
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp3/code/p214-exchange.scm
scheme
p214-exchange.scm
(define (exchange account1 account2) (let ((difference (- (account1 'balance) (account2 'balance)))) ((account1 'withdraw) difference) ((account2 'deposit) difference)))
5a9b232addb2a6a55f38f501b4ef3e5ae690c4de0568a4dd31e889ee7c0e7151
jordanthayer/ocaml-search
scanalyzer_main.ml
* The main program for the scanalyzer domain . @author eaburns @since 2011 - 02 - 28 @author eaburns @since 2011-02-28 *) open Printf let verb = ref Verb.always let limit = ref [] let other_args = ref [ "pad... apparently" ] let run_algorithm ?(limit=[]) alg inst = let (sol_opt, e, g, p, q,...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/scanalyzer/scanalyzer_main.ml
ocaml
* [parse_args ()] parses the arguments. * [algorithm_by_name ()] gets the algorithm (arg count and function) by its name.
* The main program for the scanalyzer domain . @author eaburns @since 2011 - 02 - 28 @author eaburns @since 2011-02-28 *) open Printf let verb = ref Verb.always let limit = ref [] let other_args = ref [ "pad... apparently" ] let run_algorithm ?(limit=[]) alg inst = let (sol_opt, e, g, p, q,...
46cfa99f36a6cad7f9bc3a27443d744540daabe3f344688f675ecb5c4ad3515b
iloveponies/training-day
project.clj
(defproject training-day "1.0.0-SNAPSHOT" :dependencies [[org.clojure/clojure "1.10.0"] [iloveponies.tests/training-day "0.2.0-SNAPSHOT"]] :profiles {:dev {:plugins [[lein-midje "3.2.1"]]}})
null
https://raw.githubusercontent.com/iloveponies/training-day/fa692c550965ab9a3e6205a8a4a30071581bb6cc/project.clj
clojure
(defproject training-day "1.0.0-SNAPSHOT" :dependencies [[org.clojure/clojure "1.10.0"] [iloveponies.tests/training-day "0.2.0-SNAPSHOT"]] :profiles {:dev {:plugins [[lein-midje "3.2.1"]]}})
ba465342276683f02e47c85fa630282533b24226be52869b6b7509e4627275ff
links-lang/links
lens_map.mli
module type OrderedShow = sig type t [@@deriving show] include Map.OrderedType with type t := t end module type S = Lens_map_intf.S module Make (Ord : OrderedShow) : S with type key = Ord.t
null
https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/lens/lens_map.mli
ocaml
module type OrderedShow = sig type t [@@deriving show] include Map.OrderedType with type t := t end module type S = Lens_map_intf.S module Make (Ord : OrderedShow) : S with type key = Ord.t
b4af331e3de0c348e1a85d45672212105020f02b3f73fc022d531186da88098a
bhauman/advent-of-clojure
day14.clj
(ns advent-2015.day14 (:require [clojure.java.io :as io] [clojure.string :as string])) (def prob14 (line-seq (io/reader (io/resource "2015/prob14")))) (defn line-to-data [line] (map read-string (re-seq #"\d+" line))) (def reindeer (map line-to-data prob14)) (defn traveled [[speed travel restt] seconds] ...
null
https://raw.githubusercontent.com/bhauman/advent-of-clojure/856763baf45bf7bf452ffd304dc1b89f9bc879a6/src/advent-2015/day14.clj
clojure
(ns advent-2015.day14 (:require [clojure.java.io :as io] [clojure.string :as string])) (def prob14 (line-seq (io/reader (io/resource "2015/prob14")))) (defn line-to-data [line] (map read-string (re-seq #"\d+" line))) (def reindeer (map line-to-data prob14)) (defn traveled [[speed travel restt] seconds] ...
e9959c5218906523e7a1b45142006c60a0f1daa360c5677be140ab72abb98907
janestreet/hardcaml
cyclesim.ml
open Base include Cyclesim_intf types defined in Cyclesim0 . module Port_list = Cyclesim0.Port_list module Private = Cyclesim0.Private module Digest = Cyclesim0.Digest type t_port_list = Cyclesim0.t_port_list type ('i, 'o) t = ('i, 'o) Cyclesim0.t [@@deriving sexp_of] let internal_ports = Cyclesim0.internal_ports...
null
https://raw.githubusercontent.com/janestreet/hardcaml/a9b1880ca2fb1a566eac66d935cacf344ec76b13/src/cyclesim.ml
ocaml
compilation interfaces
open Base include Cyclesim_intf types defined in Cyclesim0 . module Port_list = Cyclesim0.Port_list module Private = Cyclesim0.Private module Digest = Cyclesim0.Digest type t_port_list = Cyclesim0.t_port_list type ('i, 'o) t = ('i, 'o) Cyclesim0.t [@@deriving sexp_of] let internal_ports = Cyclesim0.internal_ports...
e2f9c9de8e0d907bd29d3e2855204c7dd51d87186c89870eae539cbd1a53c924
Enecuum/Node
IO.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE GADTs #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # {-# LANGUAGE TypeOperators #-} {-# LANGUAGE DataKinds #-} # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE TypeFamilies #-} {-# LANGU...
null
https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/src/Enecuum/Core/HGraph/Interpreters/IO.hs
haskell
# LANGUAGE GADTs # # LANGUAGE FlexibleContexts # # LANGUAGE TypeOperators # # LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE ScopedTypeVariables # | The interpreter of the language describing the action on graphs. create a new node get node by hash...
# LANGUAGE NoImplicitPrelude # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # OPTIONS_GHC -fno - warn - orphans # module Enecuum.Core.HGraph.Interpreters.IO ( interpretHGraphLIO , runHGraphLIO , runHGraphIO ) where import Universum import Data...
11f9e411923eb1e52f875147534fdde48ba4cf7107943ff0fce99f2fe8ef7ca1
mirage/irmin
irmin_mirage_git.ml
* Copyright ( c ) 2013 - 2022 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND...
null
https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin-mirage/git/irmin_mirage_git.ml
ocaml
XXX(samoht): always return the 'last modified' on the underlying storage layer, not for the current batch. get the tree origin no transaction is needed Someting weird happened, retring
* Copyright ( c ) 2013 - 2022 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND...
8a658fab26cca6502a2a9f6c12b056b276c5411e9955124a7b2e66efb68c0b46
mfikes/coal-mine
problem_110.cljc
(ns coal-mine.problem-110 (:require [coal-mine.checks :refer [defcheck-110] :rename {defcheck-110 defcheck}] [clojure.test])) (defn run-tests [] (clojure.test/run-tests 'coal-mine.problem-110)) (defn -main [] (run-tests)) #?(:cljs (set! *main-cli-fn* -main))
null
https://raw.githubusercontent.com/mfikes/coal-mine/0961d085b37f4e59489a8cf6a2b8fef0a698d8fb/src/coal_mine/problem_110.cljc
clojure
(ns coal-mine.problem-110 (:require [coal-mine.checks :refer [defcheck-110] :rename {defcheck-110 defcheck}] [clojure.test])) (defn run-tests [] (clojure.test/run-tests 'coal-mine.problem-110)) (defn -main [] (run-tests)) #?(:cljs (set! *main-cli-fn* -main))
aaa9124b1988ab17c2ea2914721f633638745211335295ee33d0f144b077d401
SimulaVR/godot-haskell
VisualScriptSwitch.hs
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.VisualScriptSwitch () where import Data.Coerce import Forei...
null
https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/VisualScriptSwitch.hs
haskell
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.VisualScriptSwitch () where import Data.Coerce import Forei...
1a53e0a08f6ee619dd9ef3bd0c4513f70fa6277031cf06af31393b33670d4dc2
BnMcGn/clath
bottom.lisp
(in-package :clath) (defparameter *callback-extension* "callback/") (defparameter *login-extension* "login/") ;;Because north supports oauth 1.0a (defparameter *callback-extension-north* "callback1a/") (defparameter *login-extension-north* "login1a/") (defvar *server-url*) (defparameter *clath-version* "0.1") (defun...
null
https://raw.githubusercontent.com/BnMcGn/clath/8e1787a9819386dceea45b45f753b81c28a5f575/bottom.lisp
lisp
Because north supports oauth 1.0a For now Try again. Maybe there is an update... FIXME: Endpoint discovery only done on startup. Should look at spec and see if it should happen more frequently. FIXME: Audit me: this number is probably correct/random enough, because the public *probably* never sees it. Should get a know...
(in-package :clath) (defparameter *callback-extension* "callback/") (defparameter *login-extension* "login/") (defparameter *callback-extension-north* "callback1a/") (defparameter *login-extension-north* "login1a/") (defvar *server-url*) (defparameter *clath-version* "0.1") (defun user-agent (provider) "Some provi...
40a02c3f5b8171ba22ded59a3d6430d42677ed04979b319dd2782255ae8e6236
racket/typed-racket
top-level-begin.rkt
#lang racket ;; Test various (begin ...)s at the top-level. In ;; particular, avoid a (begin) regression. (define ns (make-base-namespace)) (eval '(require typed/racket) ns) (eval '(begin) ns) (eval '(begin 1 2) ns) (eval '(begin (+ 1 2) 5 3 "foo") ns)
null
https://raw.githubusercontent.com/racket/typed-racket/0236151e3b95d6d39276353cb5005197843e16e4/typed-racket-test/succeed/top-level-begin.rkt
racket
Test various (begin ...)s at the top-level. In particular, avoid a (begin) regression.
#lang racket (define ns (make-base-namespace)) (eval '(require typed/racket) ns) (eval '(begin) ns) (eval '(begin 1 2) ns) (eval '(begin (+ 1 2) 5 3 "foo") ns)
eb1794dafd373dcb225d5babd4fe513461a6e3e8197549cb11dcdc62a60798fe
tdrhq/easy-macros
run-circleci.lisp
(load "~/quicklisp/setup.lisp") (push #P "./" asdf:*central-registry*) (ql:quickload :quick-patch) (quick-patch:register "-matchers.git" "master") (quick-patch:checkout-all "build/quick-patch-oss/") (ql:quickload :easy-macros/tests) (unless (fiveam:run-all-tests) (uiop:quit 1)) (uiop:quit 0...
null
https://raw.githubusercontent.com/tdrhq/easy-macros/8b6e994f405f78bce24128b117cff9d3212a3c85/run-circleci.lisp
lisp
(load "~/quicklisp/setup.lisp") (push #P "./" asdf:*central-registry*) (ql:quickload :quick-patch) (quick-patch:register "-matchers.git" "master") (quick-patch:checkout-all "build/quick-patch-oss/") (ql:quickload :easy-macros/tests) (unless (fiveam:run-all-tests) (uiop:quit 1)) (uiop:quit 0...
73f93d112ce7ae20956727a118047ab884ef031e3d7f42532b2dee211ecdf799
strise/gintonic
helpers.ml
external readFileSync: name: string -> (_ [@bs.as "utf8"]) -> string = "readFileSync" [@@bs.module "fs"]
null
https://raw.githubusercontent.com/strise/gintonic/25c0ebc4f492cac40f71de8dee4565f0d89bfa4b/packages/gintonic/__tests__/helpers.ml
ocaml
external readFileSync: name: string -> (_ [@bs.as "utf8"]) -> string = "readFileSync" [@@bs.module "fs"]
11f474de95711ec58a4e81248b9108e231bb7ca7bd52dd83582cfb243a2d2e89
scrintal/heroicons-reagent
building_office_2.cljs
(ns com.scrintal.heroicons.outline.building-office-2) (defn render [] [:svg {:xmlns "" :fill "none" :viewBox "0 0 24 24" :strokeWidth "1.5" :stroke "currentColor" :aria-hidden "true"} [:path {:strokeLinecap "round" :strokeLinejoin "roun...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/building_office_2.cljs
clojure
(ns com.scrintal.heroicons.outline.building-office-2) (defn render [] [:svg {:xmlns "" :fill "none" :viewBox "0 0 24 24" :strokeWidth "1.5" :stroke "currentColor" :aria-hidden "true"} [:path {:strokeLinecap "round" :strokeLinejoin "roun...
2b38b9f4743aba5679deebb5b62840f03a2b4a5515410868b311806cd1334cf5
clojure-interop/java-jdk
Style.clj
(ns javax.swing.text.Style "A collection of attributes to associate with an element in a document. Since these are typically used to associate character and paragraph styles with the element, operations for this are provided. Other customized attributes that get associated with the element will effectively b...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/text/Style.clj
clojure
(ns javax.swing.text.Style "A collection of attributes to associate with an element in a document. Since these are typically used to associate character and paragraph styles with the element, operations for this are provided. Other customized attributes that get associated with the element will effectively b...
ce783b7ccd55b07449d1aa6322f01d58daf13fe7b1723e1241451150859b2b2b
jsa-aerial/DMM
oct_19_2016_experiment.clj
(ns dmm.examples.oct-19-2016-experiment (:require [dmm.core :as dc :refer [v-accum v-identity down-movement up-movement rec-map-sum]])) ; trying to build a very small network to reproduce the essence of Project Fluid Aug 27 , 2016 experiment (def init-matrix...
null
https://raw.githubusercontent.com/jsa-aerial/DMM/2baf47aaab227e8e1e0af64c187acf2384d205c5/examples/dmm/oct_19_2016_experiment.clj
clojure
trying to build a very small network to reproduce the essence of (def init-output {v-accum {:self {:single init-matrix}}}) accum to (var accum), and from identity to (var identity) also the difference here is that we are using iter-apply-fns to run network steps and that we actually re-run the network from the s...
(ns dmm.examples.oct-19-2016-experiment (:require [dmm.core :as dc :refer [v-accum v-identity down-movement up-movement rec-map-sum]])) Project Fluid Aug 27 , 2016 experiment (def init-matrix {v-accum {:self {:accum {v-accum {:self {:single 1}}}}}}) (def ...
de2ad071520e6cd1df24813a7947eb9e260c95ed851e207ba280fa72c001b70f
tsloughter/kuberl
kuberl_v1beta1_job_template_spec.erl
-module(kuberl_v1beta1_job_template_spec). -export([encode/1]). -export_type([kuberl_v1beta1_job_template_spec/0]). -type kuberl_v1beta1_job_template_spec() :: #{ 'metadata' => kuberl_v1_object_meta:kuberl_v1_object_meta(), 'spec' => kuberl_v1_job_spec:kuberl_v1_job_spec() }. encode(#{ 'metadata' :=...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1beta1_job_template_spec.erl
erlang
-module(kuberl_v1beta1_job_template_spec). -export([encode/1]). -export_type([kuberl_v1beta1_job_template_spec/0]). -type kuberl_v1beta1_job_template_spec() :: #{ 'metadata' => kuberl_v1_object_meta:kuberl_v1_object_meta(), 'spec' => kuberl_v1_job_spec:kuberl_v1_job_spec() }. encode(#{ 'metadata' :=...
3ab2cea8aca1ea33f48ee8e36a3e6742725d2431ae9c51561a0d4c3855fb14e0
rob7hunter/lawnelephant
settings-localhost.scm
(require (planet "settings.scm" ("vegashacker" "leftparen.plt" 5 (= 1)))) (setting-set! *PORT* 8765) ;; use #f if you want to listen to all incoming IPs: (setting-set! *LISTEN_IP* "127.0.0.1") (setting-set! *WEB_APP_URL* ":8765/") ;;(setting-set! *ALLOW_DEFINE_DEBUG* #t)
null
https://raw.githubusercontent.com/rob7hunter/lawnelephant/9d3fdec5568e8f7a2165009debfd7a7075e750b3/settings-localhost.scm
scheme
use #f if you want to listen to all incoming IPs: (setting-set! *ALLOW_DEFINE_DEBUG* #t)
(require (planet "settings.scm" ("vegashacker" "leftparen.plt" 5 (= 1)))) (setting-set! *PORT* 8765) (setting-set! *LISTEN_IP* "127.0.0.1") (setting-set! *WEB_APP_URL* ":8765/")
8e75455445da6516e735824a23a240eba1c08897e8be618e08fa05ee87ecc8f5
clojure-quant/infra-guix
alacritty.scm
(define-module (awb99 home alacritty) #:use-module (guix gexp) #:use-module (guix packages) #:use-module (gnu home services) #:use-module (gnu home-services terminals)) (define-public alacritty-services (list (service home-alacritty-service-type (home-alacritty-configuration (config `((window . ((dynamic_tit...
null
https://raw.githubusercontent.com/clojure-quant/infra-guix/e98de1ab81bb0d68cdd4f1971ebd73d0b2cc7414/modules/awb99/home/alacritty.scm
scheme
((key . C) (mods . Control) (action . Copy))
(define-module (awb99 home alacritty) #:use-module (guix gexp) #:use-module (guix packages) #:use-module (gnu home services) #:use-module (gnu home-services terminals)) (define-public alacritty-services (list (service home-alacritty-service-type (home-alacritty-configuration (config `((window . ((dynamic_tit...
547b1f83c8957761f99b904fdd7c8a4c3155b66f4e65c22ae9f3b3854938a3a9
Simspace/postgresql-tx
Unsafe.hs
module Database.PostgreSQL.Tx.Unsafe ( -- * Introduction -- $intro -- ** Operations unsafeRunIOInTxM , unsafeWithRunInIOTxM -- ** For adaptor libraries , unsafeUnTxM , unsafeRunTxM , unsafeMkTxM , unsafeMksTxM , unsafeLookupTxEnvIO , unsafeMkTxException ) where import Database.Po...
null
https://raw.githubusercontent.com/Simspace/postgresql-tx/6769f10a4b928aa37c47ffa5f89f0fa3a9c6fc01/src/Database/PostgreSQL/Tx/Unsafe.hs
haskell
* Introduction $intro ** Operations ** For adaptor libraries $intro @postgresql-tx@ discourages performing arbitrary 'IO' within a database transaction, but sometimes performing this 'IO' is necessary. This module provides operations and infrastructure for performing "unsafe" 'IO' actions within 'TxM' or a sp...
module Database.PostgreSQL.Tx.Unsafe unsafeRunIOInTxM , unsafeWithRunInIOTxM , unsafeUnTxM , unsafeRunTxM , unsafeMkTxM , unsafeMksTxM , unsafeLookupTxEnvIO , unsafeMkTxException ) where import Database.PostgreSQL.Tx.Internal provides are prefixed with @unsafe*@. These two factors serve as ...
e6da88c890cc0f5a499845ccc4745175e9930dbc5d2b918fb010c5f99487a581
GaloisInc/semmc
Components.hs
module SemMC.Architecture.ARM.Components ( -- * Parsing Parser ) where import Text.Megaparsec import Text . . import Text . . . type Parser = Parsec String String
null
https://raw.githubusercontent.com/GaloisInc/semmc/4dc4439720b3b0de8812a68f8156dc89da76da57/semmc-arm/src/SemMC/Architecture/ARM/Components.hs
haskell
* Parsing
module SemMC.Architecture.ARM.Components ( Parser ) where import Text.Megaparsec import Text . . import Text . . . type Parser = Parsec String String
99754f9737f4c9f6c3317f65ee1b417a8e22ff0a8ad1bc46e4d67e80bfe47a0a
froggey/Mezzano
ata.lisp
Legacy PCI ATA disk driver (defpackage :mezzano.supervisor.ata (:use :cl) (:local-nicknames (:sup :mezzano.supervisor) (:pci :mezzano.supervisor.pci) (:sys.int :mezzano.internals)) (:export #:read-ata-string ;; Bits in registers. #:+ata-dev+ ...
null
https://raw.githubusercontent.com/froggey/Mezzano/8c95a9729bb7b8db8c086976dbac04bedbc26995/supervisor/ata.lisp
lisp
Bits in registers. Commands. read/write read write read/write read/write read/write read/write read/write read write read write write write write set to read, clear to write. Device bits. Status bits. Device Control bits. Error bits. Commands. FIXME: Depends on the granularity of the timer, as d...
Legacy PCI ATA disk driver (defpackage :mezzano.supervisor.ata (:use :cl) (:local-nicknames (:sup :mezzano.supervisor) (:pci :mezzano.supervisor.pci) (:sys.int :mezzano.internals)) (:export #:read-ata-string #:+ata-dev+ #:+ata-lba+ #:+ata...
cdfc163993d4f0672f4b034681153f369081ace13ed11f8a7aff756cdff7d223
craigfe/progress
config.ml
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — Copyright ( c ) 2020–2021 < > Distributed under the MIT license . See terms at the end of this file . — — — — — — — — — — — — — — — — — — — — — — — — —...
null
https://raw.githubusercontent.com/craigfe/progress/d7129b772d05c5589b8807630031155a6aeb27f0/src/progress/engine/config.ml
ocaml
NOTE: changes here should be reflected in the doc-strings. We avoid using [Format.err_formatter] directly since [Fmt] uses physical equality to share configuration options. Merge two ['a option]s with a left [Some] taking priority
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — Copyright ( c ) 2020–2021 < > Distributed under the MIT license . See terms at the end of this file . — — — — — — — — — — — — — — — — — — — — — — — — —...
ab73618d68e8c4028ac83558c167e4e95b090adbe8f2129dd41f55a3d9d4d1bb
IUCompilerCourse/public-student-support-code
type-check-Cvec.rkt
#lang racket (require "utilities.rkt") (require "type-check-Cvar.rkt") (require "type-check-Cif.rkt") (require "type-check-Cwhile.rkt") (require "type-check-Lvec.rkt") (provide type-check-Cvec type-check-Cvec-mixin) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; type - check - Cvec ...
null
https://raw.githubusercontent.com/IUCompilerCourse/public-student-support-code/de33d84247885ea309db456cc8086a12c8cdd067/type-check-Cvec.rkt
racket
#lang racket (require "utilities.rkt") (require "type-check-Cvar.rkt") (require "type-check-Cif.rkt") (require "type-check-Cwhile.rkt") (require "type-check-Lvec.rkt") (provide type-check-Cvec type-check-Cvec-mixin) type - check - Cvec (define (type-check-Cvec-mixin super-class) (class super-class (super-new)...
bffd5844cd0d63c7da7e4a57c574b423dcd6fab4c674921508f259c9455da34e
yuriy-chumak/ol
time.scm
; (define-library (scheme time) (version 1.0) (license MIT/LGPL3) (keywords (scheme time)) (description " Scheme time library.") (import (scheme core)) (export current-jiffy current-second jiffies-per-second ) (begin (define (current-jiffy) ...
null
https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/libraries/scheme/time.scm
scheme
(define-library (scheme time) (version 1.0) (license MIT/LGPL3) (keywords (scheme time)) (description " Scheme time library.") (import (scheme core)) (export current-jiffy current-second jiffies-per-second ) (begin (define (current-jiffy) ...
cf1c1039cc4c1ab1efce9e60641191056b60dcada40c1ae0e9ea9d5e7192ab2b
lemmaandrew/CodingBatHaskell
doubleChar.hs
From Given a string , return a string where for every char in the original , there are two chars . Given a string, return a string where for every char in the original, there are two chars. -} import Test.Hspec ( hspec, describe, it, shouldBe ) doubleChar :: String -> String doubleChar str = undefined mai...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/String-2/doubleChar.hs
haskell
TThheerree\"" $
From Given a string , return a string where for every char in the original , there are two chars . Given a string, return a string where for every char in the original, there are two chars. -} import Test.Hspec ( hspec, describe, it, shouldBe ) doubleChar :: String -> String doubleChar str = undefined mai...
651346cf2dc022daf24d9c9053ce39994e76ba6a239869d62d587dc4ccc2daa9
pbv/codex
Utils.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # module Codex.Tester.Utils ( match , withTemp, withTempDir , assert , fileExists , removeFileIfExists , cleanupFiles , chmod , readable, executable, writeable , runCompiler , safeExec , unsafeExec , ...
null
https://raw.githubusercontent.com/pbv/codex/1a5a81965b12f834b436e2165c07120360aded99/src/Codex/Tester/Utils.hs
haskell
# LANGUAGE OverloadedStrings # | match a piece of text | aquire and release temporary files and directories | remove files if they exist, silently ignore otherwise | run a compiler (possibly under a safe sandbox) | safeExec with text input/output ^ command ^ optional working directory ^ comand line arguments ^...
# LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # module Codex.Tester.Utils ( match , withTemp, withTempDir , assert , fileExists , removeFileIfExists , cleanupFiles , chmod , readable, executable, writeable , runCompiler , safeExec , unsafeExec , getMetaArgs , parseArgs , globP...
2c5530dea192bb4a58a939fa568c1adaf2d2b27d8b182fd2542ce2922ea31e18
scravy/bed-and-breakfast
Sugar.hs
# LANGUAGE Haskell2010 , TemplateHaskell # module Numeric.Matrix.Sugar ( iMatrix, dMatrix ) where import Numeric.Matrix import Language.Haskell.TH import Language.Haskell.TH.Quote import Data.Data import Data.Complex import Data.Ratio type ReadM a = String -> Matrix a iMatrix = QuasiQuoter ...
null
https://raw.githubusercontent.com/scravy/bed-and-breakfast/e900464394bb13edeb7a439ec758f059dc4712db/src/Numeric/Matrix/Sugar.hs
haskell
# LANGUAGE Haskell2010 , TemplateHaskell # module Numeric.Matrix.Sugar ( iMatrix, dMatrix ) where import Numeric.Matrix import Language.Haskell.TH import Language.Haskell.TH.Quote import Data.Data import Data.Complex import Data.Ratio type ReadM a = String -> Matrix a iMatrix = QuasiQuoter ...
f66509b0f278811f1cc4d1a94ca93299b203202893fdba4f84af1da74b074740
denisidoro/rosebud
graphite.clj
(ns rosebud.logic.graphite (:require [clojure.string :as str])) (defn kw->str [kw] (-> kw str (subs 1) (str/replace #"[/\.]" "_"))) (defn any->str [x] (if (keyword? x) (kw->str x) x)) (defn kv->str [[k v]] (str (any->str k) "=" (any->str v))) (defn one-line ([path amount ti...
null
https://raw.githubusercontent.com/denisidoro/rosebud/90385528d9a75a0e17803df487a4f6cfb87e981c/server/src/rosebud/logic/graphite.clj
clojure
TODO: use interpolated value
(ns rosebud.logic.graphite (:require [clojure.string :as str])) (defn kw->str [kw] (-> kw str (subs 1) (str/replace #"[/\.]" "_"))) (defn any->str [x] (if (keyword? x) (kw->str x) x)) (defn kv->str [[k v]] (str (any->str k) "=" (any->str v))) (defn one-line ([path amount ti...
4af65a3875258192bb07f3a5c6e8c0b24fcf187bdfcf7dee1f085d11c3d4063b
input-output-hk/rscoin-haskell
Update.hs
# LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TupleSections # {-# LANGUAGE TypeSynonymInstances ...
null
https://raw.githubusercontent.com/input-output-hk/rscoin-haskell/109d8f6f226e9d0b360fcaac14c5a90da112a810/test/Test/RSCoin/Pure/Update.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeSynonymInstances #
# LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TupleSections # | WIP module Test.RSCoin.Pure.Update ( Update (..) , execUpdate , runUpdate , execUpdateS...
03ae7018b0539addd408e163823fcd0a4bd6147352c5868a5fd5523b4dec3095
mfussenegger/mkjson
bench.hs
{-# LANGUAGE OverloadedStrings #-} import Criterion.Main import Data.Aeson (Value (..)) import Expr (Expr (..)) import Fake (eval, runFakeT) import Control.Monad (replicateM) exec :: Expr -> IO Value exec expr = runFakeT (Just 1) (eval expr) execRepeat...
null
https://raw.githubusercontent.com/mfussenegger/mkjson/a5fdcf81431a57906d2c55091f605e3ddf1f7448/benchmarks/bench.hs
haskell
# LANGUAGE OverloadedStrings #
import Criterion.Main import Data.Aeson (Value (..)) import Expr (Expr (..)) import Fake (eval, runFakeT) import Control.Monad (replicateM) exec :: Expr -> IO Value exec expr = runFakeT (Just 1) (eval expr) execRepeated :: Int -> Expr -> IO [Value] exe...
5a2a692a776524e7e7fcb47931c33d1eb7055317ca9ccfc48f6cd294dd3addc6
nunchaku-inria/nunchaku
TypeCheck.ml
(* This file is free software, part of nunchaku. See file "license" for more details. *) (** {1 Type Checking of a problem} *) module TI = TermInner module Stmt = Statement let section = Utils.Section.(make ~parent:root "ty_check") exception Error of string let () = Printexc.register_printer (function |...
null
https://raw.githubusercontent.com/nunchaku-inria/nunchaku/16f33db3f5e92beecfb679a13329063b194f753d/src/core/TypeCheck.ml
ocaml
This file is free software, part of nunchaku. See file "license" for more details. * {1 Type Checking of a problem} check that [ty = prop] check that [ty_a = ty_b] check invariants recursively, return type of term id: a_1->a_2->tau, where tau inductive; select-id-i: tau->a_i type of [pi a:type. body] is [typ...
module TI = TermInner module Stmt = Statement let section = Utils.Section.(make ~parent:root "ty_check") exception Error of string let () = Printexc.register_printer (function | Error msg -> Some (Utils.err_sprintf "@[broken invariant:@ %s@]" msg) | _ -> None) let error_ msg = raise (Error msg) l...
193859ae39cedea166b3eb61696ec6b228afb200f64455d7a0e4d8d998342f15
metaocaml/ber-metaocaml
pr5689.ml
(* TEST * expect *) type inkind = [ `Link | `Nonlink ] type _ inline_t = | Text: string -> [< inkind > `Nonlink ] inline_t | Bold: 'a inline_t list -> 'a inline_t | Link: string -> [< inkind > `Link ] inline_t | Mref: string * [ `Nonlink ] inline_t list -> [< inkind > `Link ] inline_t ;; let uppercase...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-gadts/pr5689.ml
ocaml
TEST * expect OK Bad
type inkind = [ `Link | `Nonlink ] type _ inline_t = | Text: string -> [< inkind > `Nonlink ] inline_t | Bold: 'a inline_t list -> 'a inline_t | Link: string -> [< inkind > `Link ] inline_t | Mref: string * [ `Nonlink ] inline_t list -> [< inkind > `Link ] inline_t ;; let uppercase seq = let rec proce...
87ee2381dee6041031c5addc223fb613ca23c82abe7bd8b965cba071f4706428
theodormoroianu/SecondYearCourses
HaskellChurch_20210415162050.hs
{-# LANGUAGE RankNTypes #-} module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = show $ cIf b True False The boolean constant true always chooses the ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurch_20210415162050.hs
haskell
# LANGUAGE RankNTypes # The boolean negation switches the alternatives The boolean conjunction can be built as a conditional The boolean disjunction can be built as a conditional a pair is a way to compute something based on the values contained within the pair. a function to be applied on the values, it will apply i...
module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = show $ cIf b True False The boolean constant true always chooses the first alternative cTrue :: C...
b69f3d8150d66364c83e9e45a5bf2a73018359c1eaf4b3c3c2a0c5c9a8f605f9
kompendium-ano/factom-haskell-client
FactoidBalance.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # {-# LANGUAGE TypeOperators #-} module Factom.RPC.Types.FactoidBalance where import Control.Applicative import Control...
null
https://raw.githubusercontent.com/kompendium-ano/factom-haskell-client/87a73bb9079859f6223f8259da0dc9da568d1233/src/Factom/RPC/Types/FactoidBalance.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards # # LANGUAGE TypeOperators # ------------------------------------------------------------------------------
# LANGUAGE DeriveGeneric # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # module Factom.RPC.Types.FactoidBalance where import Control.Applicative import Control.Monad (forM_, join, mzero) import Data.Aeson (FromJSON (..), ...
4fbc8d5a8a78b897c27962f793b74e7e94ee97cc9f7ef79266d1c61c79e11514
FranklinChen/learn-you-some-erlang
ppool_serv.erl
-module(ppool_serv). -behaviour(gen_server). -export([start/4, start_link/4, run/2, sync_queue/2, async_queue/2, stop/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, code_change/3, terminate/2]). %% The friendly supervisor is started dynamically! -define(SPEC(MFA), {worker_sup, ...
null
https://raw.githubusercontent.com/FranklinChen/learn-you-some-erlang/878c8bc2011a12862fe72dd7fdc6c921348c79d6/ppool-1.0/src/ppool_serv.erl
erlang
The friendly supervisor is started dynamically! Gen server but alas, this would be calling the supervisor while it waits for us! Not our responsibility
-module(ppool_serv). -behaviour(gen_server). -export([start/4, start_link/4, run/2, sync_queue/2, async_queue/2, stop/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, code_change/3, terminate/2]). -define(SPEC(MFA), {worker_sup, {ppool_worker_sup, start_link, [MFA]}, ...
aea7308cb7ef66e38535abb61988c9647cc3cc205ccae8eaccd990ee6f5e12cf
gedge-platform/gedge-platform
rabbit_mgmt_reset_handler.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% %% When management extensions are enabled and/or ...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_management/src/rabbit_mgmt_reset_handler.erl
erlang
When management extensions are enabled and/or disabled at runtime, the management web dispatch mechanism needs to be reset. This event handler deals with responding to 'plugins_changed' events for management extensions, forcing a reset when necessary. --------------------------------------------------------------...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_mgmt_reset_handler). -include_lib("rab...
59b62a126b54dddec82bb7ae893bf50200ed7905d1b9bba83aa752938e5033a0
weavejester/inquest
core.clj
(ns inquest.core "Functions to add monitoring to existing vars." (:require [medley.core :refer [dissoc-in]])) (def ^:private reporters (atom {})) (defn- make-report [key map] (into {:time (System/nanoTime) :thread (.getId (Thread/currentThread)) :key key} map)) (defn- dispatch! [...
null
https://raw.githubusercontent.com/weavejester/inquest/74955b7213dccdb5cf99390f80bbd5879cb770c1/src/inquest/core.clj
clojure
(ns inquest.core "Functions to add monitoring to existing vars." (:require [medley.core :refer [dissoc-in]])) (def ^:private reporters (atom {})) (defn- make-report [key map] (into {:time (System/nanoTime) :thread (.getId (Thread/currentThread)) :key key} map)) (defn- dispatch! [...
9b93c8f6a01ef508cbd210781d310ca62424a188ae8b286d1e0edb61c8efa0a0
typedclojure/typedclojure
hset_utils.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/typedclojure/typedclojure/45556897356f3c9cbc7b1b6b4df263086a9d5803/typed/clj.checker/src/typed/cljc/checker/hset_utils.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 typed.cljc.checker.hset-utils) (def valid-fixed? (some-fn string? symbol? keyword? nil? number? char? boolean?))
61ad73bdb1dcecc93f6502c1ed1930c9f7ae9a10675bde0fde15cf49226dcf89
grin-compiler/ghc-wpc-sample-programs
Ops.hs
| Module : . . Ops Description : Parser for operators and fixity declarations . License : : The Idris Community . Module : Idris.Parser.Ops Description : Parser for operators and fixity declarations. License : BSD3 Maintainer : The Idris Community. -} # LANGUAGE ConstraintKinds , F...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/idris-1.3.3/src/Idris/Parser/Ops.hs
haskell
| Creates table for fixity declarations to build expression parser using pre-build and user-defined operator/fixity declarations flatten application | Operator without fixity (throws an error) | Calculates table for fixity declarations | Parses a function used as an operator -- enclosed in backticks @ Backtick...
| Module : . . Ops Description : Parser for operators and fixity declarations . License : : The Idris Community . Module : Idris.Parser.Ops Description : Parser for operators and fixity declarations. License : BSD3 Maintainer : The Idris Community. -} # LANGUAGE ConstraintKinds , F...
3f71ac56ad037e5380421673986996ba1233f4883855c016bdc20123a447c314
Factual/sosueme
txt.clj
(ns sosueme.txt (:import [java.io StringWriter]) (:require [clojure.pprint :as pprint])) (defn pretty "Uses Clojure's pprint to return a prettily formatted String representation of o, including line breaks for readability." [o] (let [w (StringWriter.)] (pprint/pprint o w)(.toString w)))
null
https://raw.githubusercontent.com/Factual/sosueme/1c2e9b7eb4df8ae67012dc2a398b4ec63c9bd6cd/src/sosueme/txt.clj
clojure
(ns sosueme.txt (:import [java.io StringWriter]) (:require [clojure.pprint :as pprint])) (defn pretty "Uses Clojure's pprint to return a prettily formatted String representation of o, including line breaks for readability." [o] (let [w (StringWriter.)] (pprint/pprint o w)(.toString w)))
d07b0e1f16addc1d4f5b15201ef8e2c8e2c08d6f7fa29ec9e7b5ec92f05a004a
4clojure/4clojure
api.clj
(ns foreclojure.api (:require [cheshire.core :as json]) (:use [foreclojure.ring :only [wrap-json wrap-debug]] [foreclojure.utils :only [as-int]] [compojure.core :only [routes GET]] [somnium.congomongo :only [fetch-one]] [useful.map :only [update-each]]...
null
https://raw.githubusercontent.com/4clojure/4clojure/25dec057d9d6871ce52aee9e2c3de7efdab14373/src/foreclojure/api.clj
clojure
(ns foreclojure.api (:require [cheshire.core :as json]) (:use [foreclojure.ring :only [wrap-json wrap-debug]] [foreclojure.utils :only [as-int]] [compojure.core :only [routes GET]] [somnium.congomongo :only [fetch-one]] [useful.map :only [update-each]]...
01410d1ca3cd48381e6e49114a9121cb824ff98cd87718b661faa25701d47a36
amnh/poy5
dictionary.ml
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2011 , , , Ward Wheeler and the American Museum of Natural History . (* *) (* This program is free softwa...
null
https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/parser/dictionary.ml
ocaml
This program is free software; you can redistribute it and/or modify (at your option) any later version. This progra...
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2011 , , , Ward Wheeler and the American Museum of Natural History . it under the terms of the GNU General Public License as published by the Free Software Foundation ; ...
2a04dd5781c99989d62796770c1b93a219cedab939c735b1cadede4266ca5958
shentufoundation/deepsea
StmCompile.ml
open AST open Ascii open BinInt open BinNums open Compiled open Datatypes open EVM open ExprCompile open Integers open List0 open LowValues open Maps0 open MemoryModel open Monad open Nat0 open OptErrMonad open PeanoNat open StmtExpressionless open String0 (** val assign_stack_compiled : nat -> compiled **) let assig...
null
https://raw.githubusercontent.com/shentufoundation/deepsea/970576a97c8992655ed2f173f576502d73b827e1/src/backend/extraction/StmCompile.ml
ocaml
* val assign_stack_compiled : nat -> compiled * * val code_return : label -> compiled * * val cleanup : ret_type -> label -> compiled * * val push_event_args : nat -> compiled *
open AST open Ascii open BinInt open BinNums open Compiled open Datatypes open EVM open ExprCompile open Integers open List0 open LowValues open Maps0 open MemoryModel open Monad open Nat0 open OptErrMonad open PeanoNat open StmtExpressionless open String0 let assign_stack_compiled required_index = match Nat.leb re...
b12b9959bf9954b08e0fd88a7995814d7fbc434570e7695ae9e84025a2cce6cb
softwarelanguageslab/maf
R5RS_scp1_all-but-interval-3.scm
; Changes: * removed : 0 * added : 1 * swaps : 1 ; * negated predicates: 0 * swapped branches : 1 ; * calls to id fun: 0 (letrec ((all-but-interval (lambda (lst min max) (letrec ((aux (lambda (last-smaller-cons aux-lst) (if (null? aux-lst...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_all-but-interval-3.scm
scheme
Changes: * negated predicates: 0 * calls to id fun: 0
* removed : 0 * added : 1 * swaps : 1 * swapped branches : 1 (letrec ((all-but-interval (lambda (lst min max) (letrec ((aux (lambda (last-smaller-cons aux-lst) (if (null? aux-lst) (set-cdr! ...
24ebf265308a8c32bf0e8cec2a95a572cb68b48e1de844d6006c6adf0df50a33
metosin/tilakone
schema_test.clj
(ns tilakone.schema-test (:require [clojure.test :refer :all] [testit.core :refer :all] [tilakone.core :as tk :refer [_]] [tilakone.schema :as s])) ;; ;; Tests: ;; (deftest validate-states-test (fact "valid states data" (s/validate-states [{::tk/name :a ...
null
https://raw.githubusercontent.com/metosin/tilakone/a6dd133557dbb5d64d9f4ef87e2ab073b3d86761/modules/schema/test/tilakone/schema_test.clj
clojure
Tests:
(ns tilakone.schema-test (:require [clojure.test :refer :all] [testit.core :refer :all] [tilakone.core :as tk :refer [_]] [tilakone.schema :as s])) (deftest validate-states-test (fact "valid states data" (s/validate-states [{::tk/name :a ::...
f83917fec750b76ea1bf3d3aaf61447cfd7a1f021187d53139bf77367fd7d227
haskell-suite/haskell-src-exts
OptionsPragma.hs
{-# OPTIONS -fno-warn-orphans #-}
null
https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/OptionsPragma.hs
haskell
# OPTIONS -fno-warn-orphans #
f059560dd69313ba39400f95af8370bd70ece197dc986bbb7ebf0a5a2092a02b
openweb-nl/open-bank-mark
transaction_service.clj
(ns nl.openweb.graphql-endpoint.transaction-service (:require [com.stuartsierra.component :as component] [clojurewerkz.money.amounts :as ma] [clojurewerkz.money.currencies :as cu] [clojurewerkz.money.format :as fo] [next.jdbc :as j] [next.jdbc.sql :as sql] ...
null
https://raw.githubusercontent.com/openweb-nl/open-bank-mark/786c940dafb39c36fdbcae736fe893af9c00ef17/graphql-endpoint/src/nl/openweb/graphql_endpoint/transaction_service.clj
clojure
(ns nl.openweb.graphql-endpoint.transaction-service (:require [com.stuartsierra.component :as component] [clojurewerkz.money.amounts :as ma] [clojurewerkz.money.currencies :as cu] [clojurewerkz.money.format :as fo] [next.jdbc :as j] [next.jdbc.sql :as sql] ...
8dd01e5059e0cd35a9809911f41a18e3cad9991fed218ee091b2da0ebf6e1f9c
adzerk-oss/boot-test
test.clj
(ns adzerk.boot-test.test (:use clojure.test)) (deftest have-you-tried (is (= 1 1)))
null
https://raw.githubusercontent.com/adzerk-oss/boot-test/a74ea6b7d3f26209cdc820f9f9dcfd951292aff3/src/adzerk/boot_test/test.clj
clojure
(ns adzerk.boot-test.test (:use clojure.test)) (deftest have-you-tried (is (= 1 1)))
620c48fecb05d5190e859f0bf00529d5afce37f0f96973180135d58ff53649ab
clojure-interop/google-cloud-clients
TenantServiceStubSettings.clj
(ns com.google.cloud.talent.v4beta1.stub.TenantServiceStubSettings "Settings class to configure an instance of TenantServiceStub. The default instance has everything set to sensible defaults: The default service address (jobs.googleapis.com) and default port (443) are used. Credentials are acquired autom...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.talent/src/com/google/cloud/talent/v4beta1/stub/TenantServiceStubSettings.clj
clojure
"
(ns com.google.cloud.talent.v4beta1.stub.TenantServiceStubSettings "Settings class to configure an instance of TenantServiceStub. The default instance has everything set to sensible defaults: The default service address (jobs.googleapis.com) and default port (443) are used. Credentials are acquired autom...
c3f2e6fd8e9982f4901f13938b01ddf0049fafaaa0bfa2d6396abc12c9e06f65
xh4/web-toolkit
header-field.lisp
(in-package :http) (defgeneric header-field-name-match-p (header-field name)) (defclass header-field (field) ((name :initarg :name :initform nil :accessor header-field-name) (value :initarg :value :initform nil :accessor header-field-value))) (defmethod print-object ((header-field header...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/http/header-field.lisp
lisp
(in-package :http) (defgeneric header-field-name-match-p (header-field name)) (defclass header-field (field) ((name :initarg :name :initform nil :accessor header-field-name) (value :initarg :value :initform nil :accessor header-field-value))) (defmethod print-object ((header-field header...
2329b8a376cf7ea8b338030527d009597affb2b43baeccbd7d91c9a088f1b11b
craigl64/clim-ccl
cloe-implementation.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*- ;;; Support for the shared class DC. (defclass cloe-window-stream (window-stream) ((window :initarg :window) (move-pending :initform nil) (event-width) (event-height) (event-left) (e...
null
https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/cloe/cloe-implementation.lisp
lisp
Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*- Support for the shared class DC. new, helps refresh changed to fix the scrolling problem Does this want to be an :after method? Will the primary method on window-stream ever want to do anything else? Scrolling support. d...
(defclass cloe-window-stream (window-stream) ((window :initarg :window) (move-pending :initform nil) (event-width) (event-height) (event-left) (event-top) (margin-width) (margin-height) (h-scroll-pos :initform nil) (v-scroll-pos :initform nil) (pending-scrolls :initform (mak...
bc0ecfccff4bd3d7e14d4da27c0a11b05087186c02e3ba96133234440c8d718e
lassik/upscheme
perf.scm
(load "test.scm") (display "colorgraph: ") (load "tcolor.scm") (display "fib(34): ") (assert (equal? (time (fib 34)) 5702887)) (display "yfib(32): ") (assert (equal? (time (yfib 32)) 2178309)) (display "sort: ") (set! r (map-int (lambda (x) (mod (+ (* x 9421) 12345) 1024)) 1000)) (time (simple-sort r)) (display "ex...
null
https://raw.githubusercontent.com/lassik/upscheme/61935bd866acb18902199bc4bc4cdd1760aa1ffc/scheme-tests/perf.scm
scheme
(load "test.scm") (display "colorgraph: ") (load "tcolor.scm") (display "fib(34): ") (assert (equal? (time (fib 34)) 5702887)) (display "yfib(32): ") (assert (equal? (time (yfib 32)) 2178309)) (display "sort: ") (set! r (map-int (lambda (x) (mod (+ (* x 9421) 12345) 1024)) 1000)) (time (simple-sort r)) (display "ex...
02e6fa776ac3e20c814d87677458b01930df2e8162fddcab06e72b3020ac9f5a
fujita-y/ypsilon
graphs.scm
GRAPHS -- Obtained from . ;;; ==== util.ss ==== Fold over list elements , associating to the left . (define fold (lambda (lst folder state) ( assert ( list ? lst ) ; lst) ; (assert (procedure? folder) ; folder) (do ((lst lst (cdr lst)) ...
null
https://raw.githubusercontent.com/fujita-y/ypsilon/820aa1b0258eb1854172c7909aef7462bb0e2adb/bench/gambit-benchmarks/graphs.scm
scheme
==== util.ss ==== lst) (assert (procedure? folder) folder) Given the size of a vector and a procedure which and return the vector. (assert (and (integer? size) (exact? size) (>= size 0)) size) (assert (procedure? f) f) (ass...
GRAPHS -- Obtained from . Fold over list elements , associating to the left . (define fold (lambda (lst folder state) ( assert ( list ? lst ) (do ((lst lst (cdr lst)) (state state (folder (car lst) state))) ...
0902434140be41eebbc39b87f3effe63de9d2c68cca8774560b46ec3155e01a1
schwering/golog
Car.hs
module RSTC.Car where import Data.Ix import System.IO.Unsafe data Lane = LeftLane | RightLane deriving (Eq, Enum, Show) data Car = A | B | C | D | E | F | G | H deriving (Bounded, Enum, Eq, Ix, Ord, Show) cars :: [Car] --cars = [B .. H] --cars = [D,H] cars = [B,D,H] debug :: (Show a) => a -> a debug x = unsafePer...
null
https://raw.githubusercontent.com/schwering/golog/e5a0dba9598d616762271b5bef9fd51a53c1f829/plan-recog/src/RSTC/Car.hs
haskell
cars = [B .. H] cars = [D,H]
module RSTC.Car where import Data.Ix import System.IO.Unsafe data Lane = LeftLane | RightLane deriving (Eq, Enum, Show) data Car = A | B | C | D | E | F | G | H deriving (Bounded, Enum, Eq, Ix, Ord, Show) cars :: [Car] cars = [B,D,H] debug :: (Show a) => a -> a debug x = unsafePerformIO (do putStrLn (show x) ...
462f0033365d36a1f6264e7cfffa443254ed00fb95feaa01a10b3c28bf712214
lucasdicioccio/deptrack-project
Networking.hs
# LANGUAGE DataKinds # {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} module Devops.Networking ( Interface (..) , interfaceName , ConfiguredInterface (..) , configuredInterface...
null
https://raw.githubusercontent.com/lucasdicioccio/deptrack-project/cd3d59a796815af8ae8db32c47b1e1cdc209ac71/deptrack-devops-recipes/src/Devops/Networking.hs
haskell
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # # LANGUAGE DeriveTraversable # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # | An IP-Addressing plan for a local subnet tree. Currently assumes a "/24" prefix. from/to Port exposing a given service of type a. | A remote host. | A val...
# LANGUAGE DataKinds # module Devops.Networking ( Interface (..) , interfaceName , ConfiguredInterface (..) , configuredInterface , IpNetString , Port , MacAddressString , HostString , Bridge , bridge , Tap , tap , BridgedInterface , bridgedInterface , ipForwarding , nating , Index , A...
23fc136391810b3204868e3482fe5d526d6bca7948e0a9e686a0fc8e54685a35
e-bigmoon/haskell-blog
Tips6.hs
#!/usr/bin/env stack stack repl --resolver lts-15.4 --package shakespeare --package yesod --package shakespeare --package yesod -} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} # LANGUAGE TemplateHaskell # {-# LANGUAGE TypeFamilies #-} import Text.Julius import Ye...
null
https://raw.githubusercontent.com/e-bigmoon/haskell-blog/5c9e7c25f31ea6856c5d333e8e991dbceab21c56/sample-code/yesod/tips/Tips6.hs
haskell
resolver lts-15.4 package shakespeare package yesod package shakespeare package yesod # LANGUAGE OverloadedStrings # # LANGUAGE QuasiQuotes # # LANGUAGE TypeFamilies # Safe Safe Safe Unsafe Unsafe :3000/check2?p="></form>XSS" :3000/check5?p='),alert(document.cookie)//
#!/usr/bin/env stack -} # LANGUAGE TemplateHaskell # import Text.Julius import Yesod data App = App mkYesod "App" [parseRoutes| |] instance Yesod App :3000 / check1?p=<script > alert(document.cookie)</script > getCheck1R :: Handler Html getCheck1R = defaultLayout $ do mParam <- lookupGetParam "p" [whamle...
d5bbf53b70e237bd4891ab6a66b221dd2d3f282cfc36701f95c43617010a09c6
dariusf/ppx_debug
pp.ml
open Ppxlib let pexpr = Pprintast.expression let pstr = Pprintast.structure let debug_pexpr fmt { pexp_desc; _ } = let name = match pexp_desc with | Pexp_ident _ -> "Pexp_ident" | Pexp_constant _ -> "Pexp_constant" | Pexp_let (_, _, _) -> "Pexp_let" | Pexp_function _ -> "Pexp_function" | Pex...
null
https://raw.githubusercontent.com/dariusf/ppx_debug/4709e74d37672aee3f774e713b188fd986563137/ppx_debug_common/pp.ml
ocaml
open Ppxlib let pexpr = Pprintast.expression let pstr = Pprintast.structure let debug_pexpr fmt { pexp_desc; _ } = let name = match pexp_desc with | Pexp_ident _ -> "Pexp_ident" | Pexp_constant _ -> "Pexp_constant" | Pexp_let (_, _, _) -> "Pexp_let" | Pexp_function _ -> "Pexp_function" | Pex...
4d820339a9259b5310e3ea5eba5076d27090e75eb037e880d32c4fb0720a4b0a
ghc/packages-Cabal
multi-target.test.hs
import Test.Cabal.Prelude main = cabalTest $ withSourceCopy $ do cwd <- fmap testCurrentDir getTestEnv cabal "v2-sdist" ["a", "b"] shouldExist $ cwd </> "dist-newstyle/sdist/a-0.1.tar.gz" shouldExist $ cwd </> "dist-newstyle/sdist/b-0.1.tar.gz"
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/NewSdist/MultiTarget/multi-target.test.hs
haskell
import Test.Cabal.Prelude main = cabalTest $ withSourceCopy $ do cwd <- fmap testCurrentDir getTestEnv cabal "v2-sdist" ["a", "b"] shouldExist $ cwd </> "dist-newstyle/sdist/a-0.1.tar.gz" shouldExist $ cwd </> "dist-newstyle/sdist/b-0.1.tar.gz"
c12c999ca7f93e45c68b50fa69762a8b0e3cfc1c538890cf87ee4a594ec6116e
hercules-ci/legacy-old-hercules
OAuth.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} module Hercules.OAuth ( AuthState(..) , AuthCode(..) , authCallback ) where import Control.Monad.Except.Extra import Data.Aeson import Data.ByteString.Lazy (fromStrict, toStrict) import Data.Text i...
null
https://raw.githubusercontent.com/hercules-ci/legacy-old-hercules/db10eb399a64355cdcbba0e18beb1514588772e9/backend/src/Hercules/OAuth.hs
haskell
# LANGUAGE OverloadedStrings # Extract the state Can we handle this authenticator Get the access token for this user Get the user info with the token Return to the frontend ^ An error message ^ This user's token
# LANGUAGE LambdaCase # module Hercules.OAuth ( AuthState(..) , AuthCode(..) , authCallback ) where import Control.Monad.Except.Extra import Data.Aeson import Data.ByteString.Lazy (fromStrict, toStrict) import Data.Text import Data.Text.Encoding ...
434e34e98bfc5e6dc04fc26085ec4e61d21cdd7b6fbdba31f6a4a40f663cd3cb
ryanpbrewster/haskell
template.hs
import System.Environment (getArgs) main = do args <- getArgs txt <- readFile (head args) putStr $ solveProblem txt wordsBy pred s = wordsBy' pred $ dropWhile pred s where wordsBy' _ [] = [] wordsBy' pred s = let (f,r) = break pred s in f:wordsBy' pred (dropWhi...
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/CodeEval/template.hs
haskell
import System.Environment (getArgs) main = do args <- getArgs txt <- readFile (head args) putStr $ solveProblem txt wordsBy pred s = wordsBy' pred $ dropWhile pred s where wordsBy' _ [] = [] wordsBy' pred s = let (f,r) = break pred s in f:wordsBy' pred (dropWhi...
7ad8dc81e3f814f86e0d4371d4b319ae06830aafc456bc4ae470628f7f763c31
OCamlPro/typerex-lint
plugin_typedtree.polymorphic_function.1.ml
type t = A of int let _ = (A 3) = (A 4)
null
https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/tools/ocp-lint-doc/examples/plugin_typedtree.polymorphic_function.1.ml
ocaml
type t = A of int let _ = (A 3) = (A 4)
4a3ff34b0e115d9d3abc4af760061eaf0adf6c3953565178999f941f9d4e8aac
rabbitmq/rabbitmq-mqtt
rabbit_mqtt.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_mqtt). -behaviour(application). -...
null
https://raw.githubusercontent.com/rabbitmq/rabbitmq-mqtt/817971bfec4461630a2ef7e27d4fa9f4c4fb8ff9/src/rabbit_mqtt.erl
erlang
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_mqtt). -behaviour(application). -export...