_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
48cfa22f6aad9e6e7b6f6f4d89f7d4632d2a7d4b1d1208cc31e4b28f942e221a
leksah/leksah
PackageFlags.hs
# LANGUAGE DeriveGeneric # # LANGUAGE RecordWildCards # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE LambdaCase # --------------------------------...
null
https://raw.githubusercontent.com/leksah/leksah/ec95f33af27fea09cba140d7cddd010935a2cf52/src-gtk/IDE/Pane/PackageFlags.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE TypeSynonymInstances # # LANGUAGE OverloadedStrings # --------------------------------------------------------------------------- License : GNU-GPL Maintainer : <maintainer at leksah.org> Stability : provisional Portability : portable | Pane for saving, res...
# LANGUAGE DeriveGeneric # # LANGUAGE RecordWildCards # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE LambdaCase # Module : IDE.Pane . PackageFlags Copyright : ( c ) , module IDE.Pane.PackageFlags ( readFlags , writeFlags , ...
45f543b8a6144fea760c1c39f2d70a2c0873bc2590e0dc915eaed342249b2d46
poitin/Distiller
Main.hs
module Main ( main ) where import Exception import Term import Trans import Text.ParserCombinators.Parsec import Debug.Trace import System.Directory import System.IO import Control.Monad import Data.List import System.Exit import System.Process data Command = Load String | Prog | Term ...
null
https://raw.githubusercontent.com/poitin/Distiller/38022fe3f336a57516695d4e1a45d67a5ee4f54d/src/Main.hs
haskell
Entry point for main program
module Main ( main ) where import Exception import Term import Trans import Text.ParserCombinators.Parsec import Debug.Trace import System.Directory import System.IO import Control.Monad import Data.List import System.Exit import System.Process data Command = Load String | Prog | Term ...
7901e32565bdd5e3dd49926e72fefd895ad62a4bc542d7454d60fa4d1ae96d63
cxphoe/SICP-solutions
2.34.rkt
(load "sequence_operation.rkt") (define (horner-eval x coefficient-sequence) (accumulate (lambda (this-coeff higher-terms) (+ this-coeff (* x higher-terms))) 0 coefficient-sequence)) (horner-eval 2 (list 1 3 0 5 0 1))
null
https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%202-Building%20Abstractions%20with%20Data/2.Hierarchical%20Data%20and%20the%20Closure%20Property/2.34.rkt
racket
(load "sequence_operation.rkt") (define (horner-eval x coefficient-sequence) (accumulate (lambda (this-coeff higher-terms) (+ this-coeff (* x higher-terms))) 0 coefficient-sequence)) (horner-eval 2 (list 1 3 0 5 0 1))
dbadb5a7ff3134acf12a301cf1d687a9463bc8cf380fa7dcc8e3d59f1ed7adf0
lehins/primal
ArraySpec.hs
# LANGUAGE FlexibleContexts # # LANGUAGE RecordWildCards # # OPTIONS_GHC -Wno - orphans # module Test.Primal.ArraySpec (spec, impreciseExpectedException, ExpectedException(..)) where import Primal.Array import Primal.Exception import Primal.Eval import Primal.Foreign (IsList(..)) import Primal.Mutable.Freeze import Pr...
null
https://raw.githubusercontent.com/lehins/primal/c620bfd4f2a6475f1c12183fbe8138cf29ab1dad/primal/tests/Test/Primal/ArraySpec.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE RecordWildCards # # OPTIONS_GHC -Wno - orphans # module Test.Primal.ArraySpec (spec, impreciseExpectedException, ExpectedException(..)) where import Primal.Array import Primal.Exception import Primal.Eval import Primal.Foreign (IsList(..)) import Primal.Mutable.Freeze import Pr...
cfee825997034f10a3e10bc41046dfaef466993d5b3db5fbb649e478913f6bc5
pirapira/coq2rust
declare.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/library/declare.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Declaration of local constructions...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Libnames open...
f6250d96600342b3053aa51dd24dfb8b8fb51604d69e961b1c9e8b4602b290cc
stevebleazard/ocaml-jsonxt
writer_stream.ml
module type Intf = sig type t val create_encoder' : add_char:(char -> unit) -> add_string:(string -> unit) -> incr:int -> eol:string -> t val create_encoder : add_char:(char -> unit) -> add_string:(string -> unit) -> t val create_encoder_hum : add_char:(char -> unit) ...
null
https://raw.githubusercontent.com/stevebleazard/ocaml-jsonxt/fe982b6087dd76ca003d8fbc19ae9a519f54b828/lib/writer_stream.ml
ocaml
module type Intf = sig type t val create_encoder' : add_char:(char -> unit) -> add_string:(string -> unit) -> incr:int -> eol:string -> t val create_encoder : add_char:(char -> unit) -> add_string:(string -> unit) -> t val create_encoder_hum : add_char:(char -> unit) ...
538b5f78d9aa158f9c6644191007eeb20b6fef6d3fbf46a1612502c8a1ac6e77
skanev/playground
13-tests.scm
(require rackunit rackunit/text-ui) (require eopl) (load-relative "../13.scm") (define eopl-1.13-tests (test-suite "Tests for EOPL exercise 1.13" (check-equal? (subst 'z 'a '(a b a ((c a) d a (f a)) g a)) '(z b z ((c z) d z (f z)) g z)) )) (exit (run-tests eopl-1.13-tests))
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/01/tests/13-tests.scm
scheme
(require rackunit rackunit/text-ui) (require eopl) (load-relative "../13.scm") (define eopl-1.13-tests (test-suite "Tests for EOPL exercise 1.13" (check-equal? (subst 'z 'a '(a b a ((c a) d a (f a)) g a)) '(z b z ((c z) d z (f z)) g z)) )) (exit (run-tests eopl-1.13-tests))
12705bbf6a57d6244a6f7614cc933161b9ae79d3636f8710a4be7ad36d08983b
facundoolano/advenjure-example
room_map.cljc
(ns example.room-map (:require [advenjure.rooms :as room] [advenjure.utils :as utils] [example.common :refer [wallet]] [example.bedroom :refer [bedroom attic]] [example.living :refer [living]] [example.hallway :refer [hallway]])) ;; final room, nothing but...
null
https://raw.githubusercontent.com/facundoolano/advenjure-example/5810fbfaa09ed06802a64539d4856254c072ac8f/src/example/room_map.cljc
clojure
final room, nothing but a description some conditions to leave rooms define a room map and then set the connections between rooms
(ns example.room-map (:require [advenjure.rooms :as room] [advenjure.utils :as utils] [example.common :refer [wallet]] [example.bedroom :refer [bedroom attic]] [example.living :refer [living]] [example.hallway :refer [hallway]])) (def outside (room/make "O...
cbf13ec10d6397f5119cc0a84136b9f48aaf4641b2fa6bff84f5e7f7907f7942
carl-eastlund/dracula
dracula-drscheme-frame.rkt
#lang racket/gui (require drscheme/tool framework "dracula-interfaces.rkt" "executable-path.rkt") (provide dracula-drscheme-frame^ dracula-drscheme-frame@) (define-signature dracula-drscheme-frame^ (dracula-drscheme-frame-mixin)) (define-unit dracula-drscheme-frame@ (import d...
null
https://raw.githubusercontent.com/carl-eastlund/dracula/a937f4b40463779246e3544e4021c53744a33847/drscheme/dracula-drscheme-frame.rkt
racket
METHODS
#lang racket/gui (require drscheme/tool framework "dracula-interfaces.rkt" "executable-path.rkt") (provide dracula-drscheme-frame^ dracula-drscheme-frame@) (define-signature dracula-drscheme-frame^ (dracula-drscheme-frame-mixin)) (define-unit dracula-drscheme-frame@ (import d...
33deded1527c45f1ff811ca08e3fb348b561075306e8b6c333942540b75dfe35
mfelleisen/7GUI
should-be-racket.rkt
#lang racket (provide => when* unless* and*) TODO make them more like the real thing ;; --------------------------------------------------------------------------------------------------- (require syntax/parse/define (for-syntax syntax/parse)) (module+ test (require rackunit)) ;; --------------------------...
null
https://raw.githubusercontent.com/mfelleisen/7GUI/e3631e78ab12306ad81b560443913afa4b156dec/should-be-racket.rkt
racket
--------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------- ok ok
#lang racket (provide => when* unless* and*) TODO make them more like the real thing (require syntax/parse/define (for-syntax syntax/parse)) (module+ test (require rackunit)) (define-syntax => (lambda (stx) (raise-syntax-error '=> "used out of context"))) (define-simple-macro (when* condition:expr (~lit...
34a1dba4ae4bd7ae052850bb1e5289a03a83a5a662d7f3d3f3158c5a2f648d3b
okuoku/nausicaa
test-irregex-gauche.scm
derived from Gauche 's regex tests (use srfi-1 test) (load "irregex.scm") (load "irregex-utils.scm") (define-syntax let1 (syntax-rules () ((let1 var val body ...) (let ((var val)) body ...)))) (define rxmatch irregex-search) (define (rxmatch-start m . o) (irregex-match-start-index m (if ...
null
https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/src/foreign/irregex-0.8.1/test-irregex-gauche.scm
scheme
------------------------------------------------------------------------- (test-section "simple meta") ------------------------------------------------------------------------- (test-section "anchors") positions that couldn't possibly match. This seems a little strange to me, so I'm commenting out these tests. (tes...
derived from Gauche 's regex tests (use srfi-1 test) (load "irregex.scm") (load "irregex-utils.scm") (define-syntax let1 (syntax-rules () ((let1 var val body ...) (let ((var val)) body ...)))) (define rxmatch irregex-search) (define (rxmatch-start m . o) (irregex-match-start-index m (if ...
63c407174c6416b487ff800f47073eb6bc49e8ef50256d5cec61a93786d67606
testedminds/edgewise
reader.clj
(in-ns 'edgewise.edgelist) (require '[edgewise.core :refer :all]) (defn- line->edge [g csv-dyad] (let [[outv inv] (clojure.string/split csv-dyad #",")] (add-edge g outv inv))) (defn edgelist->g "Read the edges of g from a csv file in the form label1,label2." [file] (with-open [r (clojure.java.io/reader...
null
https://raw.githubusercontent.com/testedminds/edgewise/0fb64c718e6a8e70eda87b77677a6679770569d1/src/edgewise/edgelist/reader.clj
clojure
(in-ns 'edgewise.edgelist) (require '[edgewise.core :refer :all]) (defn- line->edge [g csv-dyad] (let [[outv inv] (clojure.string/split csv-dyad #",")] (add-edge g outv inv))) (defn edgelist->g "Read the edges of g from a csv file in the form label1,label2." [file] (with-open [r (clojure.java.io/reader...
5291b9b0abae6a8d2c04bb1bd7d7b322bf60734b96f997912b9b8fec1477a8e2
stevenvar/OMicroB
mcuConnection.mli
open Avr open ArduboyPins include AvrPins with type register := register with type bit := bit with type 'a pin := 'a pin
null
https://raw.githubusercontent.com/stevenvar/OMicroB/99a2e781f9511137090aaba3c09e2e920c0dbc77/targets/avr/arduboy/mcuConnection.mli
ocaml
open Avr open ArduboyPins include AvrPins with type register := register with type bit := bit with type 'a pin := 'a pin
f7515ecf2965279fc095d2ff2567e94386d9e014259c2406e5f5dc4818a020a0
joshvera/effects
Fresh.hs
# LANGUAGE FlexibleContexts # module Tests.Fresh where import Control.Monad import Control.Monad.Effect import Control.Monad.Effect.Fresh makeFresh :: Effects r => Int -> Eff r Int makeFresh n = runFresh 0 (liftM last (replicateM n fresh)) testFresh :: Int -> Int testFresh = run . makeFresh
null
https://raw.githubusercontent.com/joshvera/effects/b2693454131dc7c00d2cf45bea69c17b986f0ea5/tests/Tests/Fresh.hs
haskell
# LANGUAGE FlexibleContexts # module Tests.Fresh where import Control.Monad import Control.Monad.Effect import Control.Monad.Effect.Fresh makeFresh :: Effects r => Int -> Eff r Int makeFresh n = runFresh 0 (liftM last (replicateM n fresh)) testFresh :: Int -> Int testFresh = run . makeFresh
efcd7a5a92bc144dd75022356b23435628f1409a37209013c1c05ac2b9180f9e
satos---jp/mincaml_self_hosting
lexing.ml
まず各々の正規表現をNFAにする 。 あとはそれをデータとしてよしなに 。 まず各々の正規表現をNFAにする。 あとはそれをデータとしてよしなに。 *) open Nfa type lexbuf = (unit -> char) * (int -> unit) let from_channel ch = if ch = stdin then ( let rs = ref [] in let np = ref 0 in let f _ = (if List.length (!rs) <= !np then let c = read_char () in print_stri...
null
https://raw.githubusercontent.com/satos---jp/mincaml_self_hosting/5fdf8b5083437d7607a924142eea52d9b1de0439/lib/ml/lexing.ml
ocaml
まず各々の正規表現をNFAにする 。 あとはそれをデータとしてよしなに 。 まず各々の正規表現をNFAにする。 あとはそれをデータとしてよしなに。 *) open Nfa type lexbuf = (unit -> char) * (int -> unit) let from_channel ch = if ch = stdin then ( let rs = ref [] in let np = ref 0 in let f _ = (if List.length (!rs) <= !np then let c = read_char () in print_stri...
84d2636daa07451118862489ccef6443960cddc31705bae3bd49dfd5e067ab79
SumitPadhiyar/confuzz
lwt_sequence.mli
This file is part of Lwt , released under the MIT license . See LICENSE.md for details , or visit . details, or visit . *) (** Mutable sequence of elements (deprecated) *) (** A sequence is an object holding a list of elements which support the following operations: - adding an element to the le...
null
https://raw.githubusercontent.com/SumitPadhiyar/confuzz/7d6b2af51d7135025f9ed1e013a9ae0940f3663e/src/core/lwt_sequence.mli
ocaml
* Mutable sequence of elements (deprecated) * A sequence is an object holding a list of elements which support the following operations: - adding an element to the left or the right in time and space O(1) - taking an element from the left or the right in time and space O(1) - removing a previously add...
This file is part of Lwt , released under the MIT license . See LICENSE.md for details , or visit . details, or visit . *) [@@@ocaml.deprecated " Use package lwt-dllist. See -dllist"] type 'a t type 'a node * Type of a node holding one value of type [ ' a ] in a sequence val get : 'a node -> 'a ...
40d5f2892a8918294e607c0d6de7f93bce1bb73d1b8b333b0d2c4a125006b310
JonasDuregard/BNFC-meta
CFtoAlex2.hs
BNF Converter : Alex 2.0 Generator Copyright ( C ) 2004 Author : This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at ...
null
https://raw.githubusercontent.com/JonasDuregard/BNFC-meta/1526a2fbd7b01d374ebe2e49f78494f46d7472b8/Language/LBNF/CFtoAlex2.hs
haskell
----------------------------------------------------------------- | License : GPL (see COPYING for details) Stability : alpha Portability : Haskell98 Hacked version of @CFtoAlex@ to cope with Alex2. ----------------------------------------------------------------- tokens consisting of special symbols...
BNF Converter : Alex 2.0 Generator Copyright ( C ) 2004 Author : This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at ...
2acc9d8fe1c44f9680604b24383d87cf462767befae0b07632acf86e48721ef9
joneshf/open-source
Hardcoded.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE KindSignatures # # LANGUAGE ScopedTypeVariables # | Module : . Item . Hardcoded Description : Provides a way to hard code a value in JSOn Copyright : ( c ) , 2017 License : BSD3 Maintainer : Stability ...
null
https://raw.githubusercontent.com/joneshf/open-source/e3412fc68c654d89a8d3af4e12ac19c70e3055ec/packages/rollbar-hs/src/Rollbar/Item/Hardcoded.hs
haskell
| This is basically 'Data.Proxy' with the variable restricted to 'Symbol'. It's mostly useful so a value can be insert into a JSON blob easily.
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE KindSignatures # # LANGUAGE ScopedTypeVariables # | Module : . Item . Hardcoded Description : Provides a way to hard code a value in JSOn Copyright : ( c ) , 2017 License : BSD3 Maintainer : Stability ...
1bba308baf0e41ecfd65f0481180607397c51668b9c539649614865387f04c67
bytekid/mkbtt
selectionStrategyAux.ml
Copyright 2010 * GNU Lesser General Public License * * This file is part of MKBtt . * * 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 (...
null
https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mascott/src/selectionStrategyAux.ml
ocaml
** SUBMODULES ********************************************************* ** OPENS ************************************************************** ** GLOBALS ************************************************************ ** FUNCTIONS ********************************************************** auxiliary function returning ...
Copyright 2010 * GNU Lesser General Public License * * This file is part of MKBtt . * * 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 (...
4bf0a504ddb977e4a1197b40db30ab9f65a9a85b0cee5fca196c321177035435
ocaml/oasis2opam
Utils.ml
(***************************************************************************) OASIS2OPAM : Convert OASIS metadata to OPAM package descriptions (* *) Copyright ( C ) 2013 - 2015 , (* ...
null
https://raw.githubusercontent.com/ocaml/oasis2opam/7ae191d2f0505947e7dba12be1007bc1c0debc3e/src/Utils.ml
ocaml
************************************************************************* This library is free software; you can redistribute it and/or modify your option) any later...
OASIS2OPAM : Convert OASIS metadata to OPAM package descriptions Copyright ( C ) 2013 - 2015 , it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the License , or ( at You should have received a ...
4358dbbdf60fd81a450d1a82b34c7e576cd22556ba3f7fa9278685711aad5b46
defaultxr/thundersnow
keyboard-gui.lisp
;;;; keyboard-gui.lisp - a simple interface to trigger synths from your keyboard or the gui. (in-package #:thundersnow/keyboard-gui) (defclass keyboard-gui-pane (application-pane) () (:default-initargs :name 'keyboard-gui :display-function 'draw-keyboard-gui :display-time :command-loop :default-view ...
null
https://raw.githubusercontent.com/defaultxr/thundersnow/b00e338803932728263f8f34853b238152010ec7/src/keyboard-gui.lisp
lisp
keyboard-gui.lisp - a simple interface to trigger synths from your keyboard or the gui. draw the vertical grid lines and beat numbers at the bottom draw the horizontal grid lines and note names on the side draw the notes (events) make sure we don't lose our current scroll location after we redraw (declare (ignora...
(in-package #:thundersnow/keyboard-gui) (defclass keyboard-gui-pane (application-pane) () (:default-initargs :name 'keyboard-gui :display-function 'draw-keyboard-gui :display-time :command-loop :default-view +graphical-view+ :foreground +white+ :background (theme-color :background))) (defun dr...
87d27ca86d7977233e15806d5a45317c51ab0894059f84acaecd16e8b3efb79a
fragnix/fragnix
System.Posix.Process.ByteString.hs
{-# LANGUAGE Haskell2010 #-} {-# LINE 1 "dist/dist-sandbox-261cd265/build/System/Posix/Process/ByteString.hs" #-} # LINE 1 " System / Posix / Process / ByteString.hsc " # # LINE 2 " System / Posix / Process / ByteString.hsc " # {-# LANGUAGE Safe #-} # LINE 6 " System / Posix / Process / ByteString.hsc " # ----------...
null
https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/scotty/System.Posix.Process.ByteString.hs
haskell
# LANGUAGE Haskell2010 # # LINE 1 "dist/dist-sandbox-261cd265/build/System/Posix/Process/ByteString.hs" # # LANGUAGE Safe # --------------------------------------------------------------------------- | License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : provisional Portab...
# LINE 1 " System / Posix / Process / ByteString.hsc " # # LINE 2 " System / Posix / Process / ByteString.hsc " # # LINE 6 " System / Posix / Process / ByteString.hsc " # Module : System . . Process . ByteString Copyright : ( c ) The University of Glasgow 2002 module System.Posix.Process.ByteStrin...
809d87eccea5d17179a368262510f6fa8fe0768296b7e445409704d9ba66809d
mirage/irmin
async.ml
* Copyright ( c ) 2022 - 2022 Tarides < > * * 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...
null
https://raw.githubusercontent.com/mirage/irmin/2b43c925158ea14a2a91601dcb0704fda948f39f/src/irmin-pack/unix/async.ml
ocaml
* [Exit] is a stack of PIDs that will be killed [at_exit]. Use [Unix._exit] to avoid calling [at_exit] hooks. Child process is still running.
* Copyright ( c ) 2022 - 2022 Tarides < > * * 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...
8c0b988c7facad7c13ca2acefafcceb504b8a707314af0d9a4adc613504c144f
GlideAngle/flare-timing
Parse.hs
module Main (main) where import Test.Tasty (TestTree, testGroup, defaultMain) import Test.Tasty.SmallCheck as SC import Test.SmallCheck.Series as SC import Test.Tasty.QuickCheck as QC import Test.Tasty.HUnit as HU ((@?=), testCase) import Data.List.Split (split, dropBlanks, dropDelims, oneOf, chunksOf) import Text.Ra...
null
https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/kml/test-suite-parse/Parse.hs
haskell
WARNING: Failing test. quickcheck - replay ' 1 TFGenR 00000002137B7589000000000001E848000000000000E21F000002878F6B1480 0 12 4 0 ' to reproduce .
module Main (main) where import Test.Tasty (TestTree, testGroup, defaultMain) import Test.Tasty.SmallCheck as SC import Test.SmallCheck.Series as SC import Test.Tasty.QuickCheck as QC import Test.Tasty.HUnit as HU ((@?=), testCase) import Data.List.Split (split, dropBlanks, dropDelims, oneOf, chunksOf) import Text.Ra...
da43bde06c0c9e8c6bf00ee0537461c35c7b1b9ec913ea25cb2dd1dde14403a2
staples-sparx/kits
statistics.clj
(ns ^{:doc "Statistical calculation functions"} kits.statistics (:import (umontreal.iro.lecuyer.probdist StudentDist))) (defn- variance [summed-squares sum n] "Calculate sample variance given the sum of the squares of each datapoint, the sum, and the count." (/ (- summed-squares (/ (Math/pow sum 2) ...
null
https://raw.githubusercontent.com/staples-sparx/kits/66ae99bce83e8fd1248cc5c0da1f23673f221073/src/clojure/kits/statistics.clj
clojure
not enough data NOTE: the sum of the squares of binary datapoints = sum of datapoints
(ns ^{:doc "Statistical calculation functions"} kits.statistics (:import (umontreal.iro.lecuyer.probdist StudentDist))) (defn- variance [summed-squares sum n] "Calculate sample variance given the sum of the squares of each datapoint, the sum, and the count." (/ (- summed-squares (/ (Math/pow sum 2) ...
91a6b038b933891ec611e1ee62f08115917d00099a984bc2cbb790e5627468e5
bevuta/pepa
upload.cljs
(ns pepa.api.upload (:require [cljs.core.async :as async :refer [<!]] [pepa.api :refer [xhr-request!]]) (:require-macros [cljs.core.async.macros :refer [go]])) (def allowed-file-type? #{"application/pdf"}) (defn ^:private drop-valid? [event] (some #{"Files"} (array-seq event.dataTransfer.types))) (...
null
https://raw.githubusercontent.com/bevuta/pepa/0a9991de0fd1714515ca3def645aec30e21cd671/src-cljs/pepa/api/upload.cljs
clojure
no timeout no timeout
(ns pepa.api.upload (:require [cljs.core.async :as async :refer [<!]] [pepa.api :refer [xhr-request!]]) (:require-macros [cljs.core.async.macros :refer [go]])) (def allowed-file-type? #{"application/pdf"}) (defn ^:private drop-valid? [event] (some #{"Files"} (array-seq event.dataTransfer.types))) (...
03af90ba5c230b694c97e43e5eea991ab2024c3e7f6e46e11f298d665dbf55b4
bobzhang/fan
macrotest.ml
DEFINE A = 42; DEFINE B = 51; IFDEF A THEN let a_should_be_present = B + 2; print_int (a_should_be_present + 1); ENDIF; print_int (a_should_be_present + 2); IFNDEF C THEN print_int (a_should_be_present + 3); ENDIF; IFNDEF C THEN print_int (a_should_be_present + 4); ELSE print_int (c_should_not_be_present ...
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/testr/macros/macrotest.ml
ocaml
pouet;
DEFINE A = 42; DEFINE B = 51; IFDEF A THEN let a_should_be_present = B + 2; print_int (a_should_be_present + 1); ENDIF; print_int (a_should_be_present + 2); IFNDEF C THEN print_int (a_should_be_present + 3); ENDIF; IFNDEF C THEN print_int (a_should_be_present + 4); ELSE print_int (c_should_not_be_present ...
b003dd8bb9d396e5dd872713304726c3b3e2730389f3765255a63ac9d0493331
natefaubion/purescript-cst
Convert.hs
# LANGUAGE TypeApplications # module Language.PureScript.CST.Convert ( convertKind , convertType , convertExpr , convertBinder , convertDeclaration , convertModule , sourcePos , sourceSpan , comment , comments ) where import Prelude import Data.Bifunctor (bimap, first) import Data.Foldable (fold...
null
https://raw.githubusercontent.com/natefaubion/purescript-cst/1df669eb45b36008d25b72b33627ede7fd47e345/src/Language/PureScript/CST/Convert.hs
haskell
TODO: fix forall in the compiler The existing parser builds variables in reverse order expr@(ExprWhere _ (Where a _ bs)) -> do
# LANGUAGE TypeApplications # module Language.PureScript.CST.Convert ( convertKind , convertType , convertExpr , convertBinder , convertDeclaration , convertModule , sourcePos , sourceSpan , comment , comments ) where import Prelude import Data.Bifunctor (bimap, first) import Data.Foldable (fold...
63628e8a7ec9ca6ed8dfee1d11e5ed2a7d0711b73fc5b9a8d76ee708bab2fb4c
binsec/binsec
loader_pe.mli
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2022 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/loader/loader_pe.mli
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2022 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
44f551042ef6b104174fb02b88da719b0cd371aedc41050f07ae1c78dd3b6d8e
Trattue/oktade
Class.hs
-- | -- Module: Data.Oktade.Classfile.Class -- License: Apache-2.0 -- -- Types and functions for parsing and unparsing the class data of classfiles. module Data.Oktade.Classfile.Class ( -- * Class Class (..), ) where import Data.Oktade.Classfile.Class.AccessFlags (AccessFlags) import Data.Oktade.Classfile.Clas...
null
https://raw.githubusercontent.com/Trattue/oktade/95026501d01c6ffba6ad0e1318b20d47830a7d76/src/Data/Oktade/Classfile/Class.hs
haskell
| Module: Data.Oktade.Classfile.Class License: Apache-2.0 Types and functions for parsing and unparsing the class data of classfiles. * Class ------------------------------------------------------------------------------ Class ------------------------------------------------------------------------------ | Abst...
module Data.Oktade.Classfile.Class Class (..), ) where import Data.Oktade.Classfile.Class.AccessFlags (AccessFlags) import Data.Oktade.Classfile.Class.Attributes (Attributes) import Data.Oktade.Classfile.Class.Fields (Fields) import Data.Oktade.Classfile.Class.Interfaces (Interfaces) import Data.Oktade.Classfile...
45bcc36ca37563dbaefd8b30133ce98e02a4acd3676ffee89ccca52bc676ba84
nponeccop/HNC
Compiler.hs
# OPTIONS_GHC -fno - warn - unused - matches # module SPL.Compiler (P (..), compile, remove_cdebug, remove_ctyped, res) where import SPL.Types import SPL.Parser2 hiding (P (..), res) import SPL.Code hiding (res) import qualified Data.Map as M import SPL.Lib.Bignum (lib) import SPL.Lib.Str (lib) data P = P C | N Int [...
null
https://raw.githubusercontent.com/nponeccop/HNC/d8447009a04c56ae2cba4c7c179e39384085ea00/SPL/Compiler.hs
haskell
ft = "TT [T \"string\", " -- ++"TT [" ++"T \""++type_name++"\"" ++"T \""++type_name++"\", "
# OPTIONS_GHC -fno - warn - unused - matches # module SPL.Compiler (P (..), compile, remove_cdebug, remove_ctyped, res) where import SPL.Types import SPL.Parser2 hiding (P (..), res) import SPL.Code hiding (res) import qualified Data.Map as M import SPL.Lib.Bignum (lib) import SPL.Lib.Str (lib) data P = P C | N Int [...
ad4b2f97d952dd26ac89a0171e2f49413587419880c07fa8b5fe0b8fc0d3e2c5
YoEight/eventstore
Control.hs
# LANGUAGE CPP # {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # -------------------------------------------------------------------------------- -- | -- Module : Database.EventStore.Internal.Control Copyright : ( ...
null
https://raw.githubusercontent.com/YoEight/eventstore/8ca0f72acfc85b97de0a1862d38ee6e9f2ae2e4c/Database/EventStore/Internal/Control.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE GADTs # ------------------------------------------------------------------------------ | Module : Database.EventStore.Internal.Control License : (see the file LICENSE) Stability : provisional Portability : non-portable ----------------------...
# LANGUAGE CPP # # LANGUAGE GeneralizedNewtypeDeriving # Copyright : ( C ) 2014 Maintainer : < > module Database.EventStore.Internal.Control ( EventStore , runEventStore , getSettings , freshUUID , Pub(..) , Sub(..) , Hub , Subscribe , Publish , asPub , asSub ...
f0dadbc3417691bebf2d1cd39eec9e933f370a2a56db0e5c93b77613150819de
why-not-try-calmer/feedo
Backend.hs
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # module Backend where import Broker (HasCache (withCache)) import Control.Concurrent import Control.Concurrent.Async (forConcurrently) import Control.Monad.Reader import qualified Data.HashMap.Strict as HMS import Data.List (foldl') import Data.Maybe (fromMaybe) im...
null
https://raw.githubusercontent.com/why-not-try-calmer/feedo/d598f56ab371872dd04842063ef6ba01227f8ce5/src/Backend.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # module Backend where import Broker (HasCache (withCache)) import Control.Concurrent import Control.Concurrent.Async (forConcurrently) import Control.Monad.Reader import qualified Data.HashMap.Strict as HMS import Data.List (foldl') import Data.Maybe (fromMaybe) im...
99346efd61c0c49fd66408edc2ca2d187a3c88c5790a2a6abab669215f2041de
Clozure/ccl-tests
slot-makunbound.lsp
;-*- Mode: Lisp -*- Author : Created : Sat May 10 14:39:01 2003 Contains : Tests for SLOT - MAKUNBOUND (in-package :cl-test) ;;; This function is heavily tested in other files as well (defclass slot-makunbound-class-01 () (a (b :allocation :instance) (c :allocation :class) (d :type fixnum...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/slot-makunbound.lsp
lisp
-*- Mode: Lisp -*- This function is heavily tested in other files as well Order of evaluation test(s) Error cases
Author : Created : Sat May 10 14:39:01 2003 Contains : Tests for SLOT - MAKUNBOUND (in-package :cl-test) (defclass slot-makunbound-class-01 () (a (b :allocation :instance) (c :allocation :class) (d :type fixnum) (e :type t) (f :type cons))) (deftest slot-makunbound.1 (loop for slot-n...
ccd038cf3ab022b2c073a7e86924ced9ec9780ab4815052a422e760061924f85
rumuki/rumuki-server
RemoteTransferSpec.hs
module Handler.RemoteTransferSpec (spec) where import Data.HashMap.Strict ((!)) import Network.HTTP.Client.Internal (Response (..)) import Network.HTTP.Types (status404) import TestImport spec :: Spec spec = testGet >> testDelete testGet :: Spec test...
null
https://raw.githubusercontent.com/rumuki/rumuki-server/59798656e9eb440a2344223850dbd1f9f77060ca/test/Handler/RemoteTransferSpec.hs
haskell
module Handler.RemoteTransferSpec (spec) where import Data.HashMap.Strict ((!)) import Network.HTTP.Client.Internal (Response (..)) import Network.HTTP.Types (status404) import TestImport spec :: Spec spec = testGet >> testDelete testGet :: Spec test...
1942c30011419706a2df2f353d9754cac2b2c7f395311a69fcf75e8f4a230dd9
mokus0/xdr
TH.hs
# LANGUAGE TemplateHaskell , QuasiQuotes # -- |Simple test module that should compile and yield the following signature -- or something equivalent. -- data Boolean = FALSE | TRUE | answer : : a = > a random : : a = > a -- boolean :: Fmt Boolean -- booleans :: Fmt [Boolean] fileNotFound : : a = > a -- rando...
null
https://raw.githubusercontent.com/mokus0/xdr/ba0e7a1b2db99516190dc1074ff584590470a36a/tests/TH.hs
haskell
|Simple test module that should compile and yield the following signature or something equivalent. boolean :: Fmt Boolean booleans :: Fmt [Boolean] randomBooleans :: Fmt [Boolean] state :: Fmt String blah :: Fmt String blahs :: Fmt [String] hungry :: String full :: String achoo :: Fmt Int64 foo :: String ...
# LANGUAGE TemplateHaskell , QuasiQuotes # data Boolean = FALSE | TRUE | answer : : a = > a random : : a = > a fileNotFound : : a = > a numBlahs : : a = > a module TH where import Data.Binary.Get (runGet) import Data.Binary.Put (runPut) import Codec.Binary.XDR.Format import Codec.Binary.XDR.QQ import Da...
1904fe32bdc9be622d850bd6846a94488c53c165b809c03384c617b59e176822
awakesecurity/spectacle
Main.hs
module Main (main) where import Test.Tasty (TestTree, defaultMain, testGroup) import qualified Test.Control.Comonad.Tape import qualified Test.Language.Spectacle.Interaction -- --------------------------------------------------------------------------------------------------------------------- main :: IO () main = ...
null
https://raw.githubusercontent.com/awakesecurity/spectacle/70501d0dc8b7fbefe1b52afff405c65e663fbf4e/test/unit-tests/Main.hs
haskell
---------------------------------------------------------------------------------------------------------------------
module Main (main) where import Test.Tasty (TestTree, defaultMain, testGroup) import qualified Test.Control.Comonad.Tape import qualified Test.Language.Spectacle.Interaction main :: IO () main = defaultMain unitTestTree unitTestTree :: TestTree unitTestTree = testGroup "Unit Tests" [ Test.Control.Comonad...
a018a2a36e522300fcece321df33f04ecd9dfffecdb84ecf6129f0cb78295006
naoiwata/sicp
ex3.24.scm
;; ;; @author naoiwata SICP Chapter3 Exercise 3.24 . ;; (define (make-table same-key?) (define (assoc-same same-key? key records) (cond ((null? records) #f) ((same-key? key (caar records)) (car records)) (else (assoc-same same-key? key (cdr records))))) (let ((...
null
https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter3/ex3.24.scm
scheme
@author naoiwata test memo #f #t END
SICP Chapter3 Exercise 3.24 . (define (make-table same-key?) (define (assoc-same same-key? key records) (cond ((null? records) #f) ((same-key? key (caar records)) (car records)) (else (assoc-same same-key? key (cdr records))))) (let ((local-table (list '*table*...
7b0602675f015e9884e6f29a4eaee8afdf923cc3a277852689e558a261f788ec
ocaml/omd
omd.ml
(* The document model *) include Ast.Impl Helper functions for construction document AST module Ctor = Ast_constructors.Impl (* Table of contents *) let headers = Toc.headers let toc = Toc.toc (* Conversion *) let parse_inline defs s = Parser.inline defs (Parser.P.of_string s) let parse_inlines (md, defs) : d...
null
https://raw.githubusercontent.com/ocaml/omd/e4b21f4ed2a51410d6eafa1bf6ed4d07c9c9731b/src/omd.ml
ocaml
The document model Table of contents Conversion
include Ast.Impl Helper functions for construction document AST module Ctor = Ast_constructors.Impl let headers = Toc.headers let toc = Toc.toc let parse_inline defs s = Parser.inline defs (Parser.P.of_string s) let parse_inlines (md, defs) : doc = let defs = let f (def : attributes Parser.link_def) = ...
45d9ce2c13aaf7ce17294260246cbbb38d1a3ec6ceaf1f892d5b232093a0e16d
silky/fashion
Canny.hs
# LANGUAGE PackageImports , BangPatterns , QuasiQuotes , PatternGuards , MagicHash , ScopedTypeVariables , TypeFamilies # MagicHash, ScopedTypeVariables, TypeFamilies #-} module Canny where import Data.List import Data.Word import Data.Int import Control.Monad import System.Environment im...
null
https://raw.githubusercontent.com/silky/fashion/2b01d1e5c385fe99e8e54f5828114551e9c8e309/Contour-Maps/src/Canny.hs
haskell
Constants ------------------------------------------------------------------ ----------------------------------------------------------------------------- | RGB to greyscale conversion. | Separable Gaussian blur in the X direction. | Separable Gaussian blur in the Y direction. | Compute gradient in the X direction...
# LANGUAGE PackageImports , BangPatterns , QuasiQuotes , PatternGuards , MagicHash , ScopedTypeVariables , TypeFamilies # MagicHash, ScopedTypeVariables, TypeFamilies #-} module Canny where import Data.List import Data.Word import Data.Int import Control.Monad import System.Environment im...
62ed8101c1c6abfb91bef15baf4d436156a3a48daed428d9096c3fc95402a844
ghcjs/ghcjs-dom
NodeIterator.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.NodeIterator (js_nextNode, nextNode, nextNode_, nextNodeUnsafe, nextNodeUncheck...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/NodeIterator.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/NodeIterator.pointerBeforeReferenceNode Mozilla NodeIterator.pointerBeforeReferenceNode documentation>
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.NodeIterator (js_nextNode, nextNode, nextNode_, nextNodeUnsafe, nextNodeUnchecked, js_previousNode, previousNode, previousNode_, previousNodeUnsafe, previousNodeUnchecked...
3be75b8a4dc7604aca61cc1edbf6b7aa0aaf6c55e96c2518d566e4f43f135784
bmeurer/ocamljit2
a.ml
let a = B.b
null
https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/ocamlbuild/test/test6/a.ml
ocaml
let a = B.b
f0598c403a0b42a88c4ea5ec258a9b93c07206c03eaed7ccbc43f44bdd613cbc
TrustInSoft/tis-kernel
pdgMarks.ml
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/pdg_types/pdgMarks.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 ...
66622ad6b7291ac07857852a7166e2fa09e4aa016306045f5e949f87604700b7
evturn/haskellbook
write-the-function.hs
1 . i :: a -> a i = id 2 . c :: a -> b -> a c x y = x 3 . c'' :: b -> a -> b c'' = c 4 . c' :: a -> b -> b c' x y = y 5 . r :: [a] -> [a] r xs = reverse xs -- or -- r xs = id xs 6 . co :: (b -> c) -> (a -> b) -> a -> c co f g x = f . g $ x 7 . a :: (a -> c) -> a -> a a f x = x 8 . a' :: (a -> b) ...
null
https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/05/chapter-exercises/write-the-function.hs
haskell
or r xs = id xs
1 . i :: a -> a i = id 2 . c :: a -> b -> a c x y = x 3 . c'' :: b -> a -> b c'' = c 4 . c' :: a -> b -> b c' x y = y 5 . r :: [a] -> [a] r xs = reverse xs 6 . co :: (b -> c) -> (a -> b) -> a -> c co f g x = f . g $ x 7 . a :: (a -> c) -> a -> a a f x = x 8 . a' :: (a -> b) -> a -> b a' f x = f x...
c7b59dfd56be4b693f9427846d521bfda7387fae9d9b1eb6a8281da631b41f9a
msdevanms/emqttd_plugin_kafka_bridge
emqttd_plugin_kafka_bridge.erl
%%%----------------------------------------------------------------------------- Copyright ( c ) 2016 Rui< > , 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...
null
https://raw.githubusercontent.com/msdevanms/emqttd_plugin_kafka_bridge/f5805d565c2c9624134178959f02f35d46d6da37/src/emqttd_plugin_kafka_bridge.erl
erlang
----------------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnishe...
Copyright ( c ) 2016 Rui< > , All Rights Reserved . in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF AN...
d409373c4366f07874d7ab4a1b2600e7cb6197d56dc15e6b6d6905e6aaaa96f3
kumarshantanu/lein-servlet
project.clj
(defproject lein-servlet/parent "0.0.0" :description "Housekeeping project for lein-servlet" :url "-servlet" :plugins [[lein-sub "0.3.0"]] :sub ["adapter-jetty7" "adapter-jetty8" "adapter-jetty9" "adapter-tomcat7" "adapter-tomcat8" "lein-template" "plugin"] :eva...
null
https://raw.githubusercontent.com/kumarshantanu/lein-servlet/2be06155a677eba1c5a812d28499cd5b23535414/project.clj
clojure
(defproject lein-servlet/parent "0.0.0" :description "Housekeeping project for lein-servlet" :url "-servlet" :plugins [[lein-sub "0.3.0"]] :sub ["adapter-jetty7" "adapter-jetty8" "adapter-jetty9" "adapter-tomcat7" "adapter-tomcat8" "lein-template" "plugin"] :eva...
0ece06bd1869409003dec05cc4649fcbe970d26d47503084c3991f2717ca12a9
ocaml-ppx/ocaml-syntax-shims
shims.406.ml
let nolabel = Asttypes.Nolabel let error_of_exn exn = match Location.error_of_exn exn with | Some (`Ok exn) -> Some exn | Some `Already_displayed -> None | None -> None
null
https://raw.githubusercontent.com/ocaml-ppx/ocaml-syntax-shims/38a6dd23543d9c4c3678fc6741962832fd539877/src/shims.406.ml
ocaml
let nolabel = Asttypes.Nolabel let error_of_exn exn = match Location.error_of_exn exn with | Some (`Ok exn) -> Some exn | Some `Already_displayed -> None | None -> None
f8ad15b2e236221253da308da6f97d0e9c0c06000602a8190310bf50514336e5
exoscale/clojure-kubernetes-client
v1_container_image.clj
(ns clojure-kubernetes-client.specs.v1-container-image (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] ) (:import (java.io File))) (declare v1-container-image-data v1-container-image) (def v1-container-image-data { (ds/req :names) (s/coll-of string?) (ds/opt :siz...
null
https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_container_image.clj
clojure
(ns clojure-kubernetes-client.specs.v1-container-image (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] ) (:import (java.io File))) (declare v1-container-image-data v1-container-image) (def v1-container-image-data { (ds/req :names) (s/coll-of string?) (ds/opt :siz...
56b1e6e81be90563e5ef58627ac15d75a9831bfec401e79a4379c9d27c270844
prg-titech/baccaml
ack.ml
;; let rec ack x y = if x <= 0 then y + 1 else if y <= 0 then ack (x - 1) 1 else ack (x - 1) (ack x (y - 1)) in print_int (ack 3 3)
null
https://raw.githubusercontent.com/prg-titech/baccaml/a3b95e996a995b5004ca897a4b6419edfee590aa/etc/example/ack.ml
ocaml
;; let rec ack x y = if x <= 0 then y + 1 else if y <= 0 then ack (x - 1) 1 else ack (x - 1) (ack x (y - 1)) in print_int (ack 3 3)
d13b453e98057de9f89ce5345da69b0ebdba0bfc6ba3cac4fe7fec59aae44415
hasktorch/ffi-experimental
Context.hs
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # module ATen.Unmanaged.Type.Context where import qualified Language.C.Inline.Cpp as C import...
null
https://raw.githubusercontent.com/hasktorch/ffi-experimental/54192297742221c4d50398586ba8d187451f9ee0/ffi/src/ATen/Unmanaged/Type/Context.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # module ATen.Unmanaged.Type.Context where import qualified Language.C.Inline.Cpp as C import qualified Language.C.Inline.Cpp.Ex...
e2ef896c2ccf8335b209629aa7fba821949f82bd7d0d9dcaa8f4668d091f9a17
skanev/playground
45-tests.scm
(require rackunit rackunit/text-ui) (define (below a b) (list 'below a b)) (define (beside a b) (list 'beside a b)) (load "../45.scm") (define sicp-2.45-tests (test-suite "Tests for SICP exercise 2.45" (check-equal? (up-split 'a 1) '(below a (beside a a))) (check-equal? (up-split 'a...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/02/tests/45-tests.scm
scheme
(require rackunit rackunit/text-ui) (define (below a b) (list 'below a b)) (define (beside a b) (list 'beside a b)) (load "../45.scm") (define sicp-2.45-tests (test-suite "Tests for SICP exercise 2.45" (check-equal? (up-split 'a 1) '(below a (beside a a))) (check-equal? (up-split 'a...
735a921b6a5bd942783b908b517be1b4801a8cf9c963f62161aaeb34012b2d92
mirage/irmin
store_properties.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/store_properties.ml
ocaml
* 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...
9a13339b2055fae8e965647ff1870a91b0ab5165d8acf39b8004469c968eff3b
GracielaUSB/graciela
Operator.hs
{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} module Language.Graciela.Parser.Operator ( Un (..) , Bin (..) -- * unary operators , uMinus, not -- * arithmetic operators , power, times, div, mod, plus, bMinus, max, min -- * boolean operators , o...
null
https://raw.githubusercontent.com/GracielaUSB/graciela/db69c8b225d6172aaa0ff90a67f4a997e4d8a0c6/src/Haskell/Language/Graciela/Parser/Operator.hs
haskell
# LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # * unary operators * arithmetic operators * boolean operators * comparison operators * membership operators * functor operators * functor relation operators * multiset operators * sequence concatenation operator * func...
module Language.Graciela.Parser.Operator ( Un (..) , Bin (..) , uMinus, not , power, times, div, mod, plus, bMinus, max, min , or, and, implies, consequent, beq , bne, lt, le, gt, ge, aeq, ane , elem, notElem , intersect, difference, union , ssubset, ssuperset, subset, superset , multisum , conca...
d82abacc20633d246b72a4205bb529a1e1beb1c1b995dc1b4305d30b694c22df
softwarelanguageslab/maf
nbody-processed.scm
Changes : use vectors instead of lists to represent pts . ( The original version " test / R5RS / WeiChenRompf2019 / / nbody - processed.scm " uses vectors -- also added a print to the end of this file . ) (define (foldl f base lst) (foldl-aux f base lst)) (define (foldl-aux f base lst) (if (null? lst) base ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/44c2bcf6d14b766625e44b7647473b02648fcb03/test/changes/scheme/nbody-processed.scm
scheme
================================================================ Expansion Theorems ================================================================ ================================================================== Shifting lemmas ============================================...
Changes : use vectors instead of lists to represent pts . ( The original version " test / R5RS / WeiChenRompf2019 / / nbody - processed.scm " uses vectors -- also added a print to the end of this file . ) (define (foldl f base lst) (foldl-aux f base lst)) (define (foldl-aux f base lst) (if (null? lst) base ...
2304a207ecc1d863855700b23396ede34643835ec46f3d5a3121b22831017eea
elastic/eui-cljs
icon_check_in_circle_filled.cljs
(ns eui.icon-check-in-circle-filled (:require ["@elastic/eui/lib/components/icon/assets/checkInCircleFilled.js" :as eui])) (def checkInCircleFilled eui/icon)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_check_in_circle_filled.cljs
clojure
(ns eui.icon-check-in-circle-filled (:require ["@elastic/eui/lib/components/icon/assets/checkInCircleFilled.js" :as eui])) (def checkInCircleFilled eui/icon)
ee3a531f01956508eccc2ae3225ad83152a97afe01450544eb1f0dc8ba9f3e03
modular-macros/ocaml-macros
test.ml
( c ) cf . let report_err exn = match exn with | Sys_error msg -> Format.printf "@[I/O error:@ %s@]@." msg | x -> match Location.error_of_exn x with | Some err -> Format.printf "@[%a@]@." Location.report_error err | None -> raise x let remove...
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/parsetree/test.ml
ocaml
( c ) cf . let report_err exn = match exn with | Sys_error msg -> Format.printf "@[I/O error:@ %s@]@." msg | x -> match Location.error_of_exn x with | Some err -> Format.printf "@[%a@]@." Location.report_error err | None -> raise x let remove...
d32c58dc1782d7a9f66a48a029a443924fba081d337cf3836f0f56171ee6c9b7
racket/racket7
api-taint.rkt
#lang racket/base (require "syntax.rkt" "to-list.rkt" "scope.rkt" "taint-dispatch.rkt" (rename-in "taint.rkt" [syntax-tainted? raw:syntax-tainted?] [syntax-arm raw:syntax-arm] [syntax-disarm raw:syntax-disarm] ...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/syntax/api-taint.rkt
racket
Provides public versions of taint-related syntax functions ---------------------------------------- ----------------------------------------
#lang racket/base (require "syntax.rkt" "to-list.rkt" "scope.rkt" "taint-dispatch.rkt" (rename-in "taint.rkt" [syntax-tainted? raw:syntax-tainted?] [syntax-arm raw:syntax-arm] [syntax-disarm raw:syntax-disarm] ...
d4bbee1cde112ba514f788009def48ec83f56675ec93be5bac5b7f21219ff2f6
dparis/gen-phzr
physics.cljs
(ns phzr.physics (:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]] [phzr.impl.extend :as ex] [cljsjs.phaser])) (defn ->Physics "The Physics Manager is responsible for looking after all of the running physics systems. Phaser supports 4 physics systems: Arcade Physics, P2, N...
null
https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/physics.cljs
clojure
(ns phzr.physics (:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]] [phzr.impl.extend :as ex] [cljsjs.phaser])) (defn ->Physics "The Physics Manager is responsible for looking after all of the running physics systems. Phaser supports 4 physics systems: Arcade Physics, P2, N...
f3586afbfa027450a985352474a09cd7fd666d0150a8cefbc0056ab2e304d642
arclanguage/Clamp
disk.lisp
(in-package :clamp) (use-syntax :clamp) (defvar savers* (table) "A table containing the save functions.") (mac fromdisk (var file init load save) "Define a variable which if unbound, its value will be taken from FILE if it exists. If it does not exist, it is found by calling LOAD on the file. The variable can...
null
https://raw.githubusercontent.com/arclanguage/Clamp/9f165b057a109564cd0e836cf611d1e81e43cb12/src/disk.lisp
lisp
(in-package :clamp) (use-syntax :clamp) (defvar savers* (table) "A table containing the save functions.") (mac fromdisk (var file init load save) "Define a variable which if unbound, its value will be taken from FILE if it exists. If it does not exist, it is found by calling LOAD on the file. The variable can...
0e789ccdedf76c7634ef27dafa29c880d08fe75d753521906169136602dba39e
typedclojure/typedclojure
trampoline.clj
(ns clojure.core.typed.test.trampoline (:require [typed.clojure :as t])) (declare funb) (t/ann-many [t/Num -> (t/Rec [f] (t/U t/Num [-> (t/U t/Num f)]))] funa funb) (defn funa [n] (if (= n 0) 0 #(funb (dec n)))) (defn funb [n] (if (= n 0) 0 #(funa (dec n))))...
null
https://raw.githubusercontent.com/typedclojure/typedclojure/5fd7cdf7941c6e7d1dd5df88bf44474fa35e1fca/typed/clj.checker/test/clojure/core/typed/test/trampoline.clj
clojure
(ns clojure.core.typed.test.trampoline (:require [typed.clojure :as t])) (declare funb) (t/ann-many [t/Num -> (t/Rec [f] (t/U t/Num [-> (t/U t/Num f)]))] funa funb) (defn funa [n] (if (= n 0) 0 #(funb (dec n)))) (defn funb [n] (if (= n 0) 0 #(funa (dec n))))...
2e36056f9db4decb412d87dff242e25b481465203588f6231cfc5bffbf8a067c
herd/herdtools7
command.mli
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/650450b67eff7f9f3f24b94f42d321a640e64033/internal/lib/command.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...
1ee014fb8708e6562fc7bb5b261292a8b456f9b977b0ec2d803a6fcb4e898270
ocaml/dune
types.ml
open Import module Id = struct module T = struct type t = Sexp.t let equal = Poly.equal let compare = Poly.compare let to_dyn s = Sexp.to_dyn s end include T let make s = s let to_sexp t = t let sexp = Conv.sexp let gen f = Conv.field "id" (f sexp) let required_field = gen Conv...
null
https://raw.githubusercontent.com/ocaml/dune/20a1f1023b04284ad12b0a83fdf57a6ae4faa354/otherlibs/dune-rpc/private/types.ml
ocaml
cwong: Should we even still include this?
open Import module Id = struct module T = struct type t = Sexp.t let equal = Poly.equal let compare = Poly.compare let to_dyn s = Sexp.to_dyn s end include T let make s = s let to_sexp t = t let sexp = Conv.sexp let gen f = Conv.field "id" (f sexp) let required_field = gen Conv...
748704650e848f2b09ced2220c1f448754f80812b7f584577d189bb8bb551fd1
janestreet/lwt-async
main.ml
Lightweight thread library for * Module Main * Copyright ( C ) 2009 * * 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 , with linking exceptions ; * either ve...
null
https://raw.githubusercontent.com/janestreet/lwt-async/c738e6202c1c7409e079e513c7bdf469f7f9984c/tests/react/main.ml
ocaml
Lightweight thread library for * Module Main * Copyright ( C ) 2009 * * 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 , with linking exceptions ; * either ve...
2e71640bd596fb390c42cd8c86ef9df20b32d528e42095ca9525d889a984f641
gpwwjr/LISA
deffacts.lisp
This file is part of LISA , the Lisp - based Intelligent Software ;;; Agents platform. Copyright ( C ) 2000 ( ) ;;; This library is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either versi...
null
https://raw.githubusercontent.com/gpwwjr/LISA/bc7f54b3a9b901d5648d7e9de358e29d3b794c78/src/core/deffacts.lisp
lisp
Agents platform. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License either version 2.1 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FI...
This file is part of LISA , the Lisp - based Intelligent Software Copyright ( C ) 2000 ( ) of the License , or ( at your option ) any later version . GNU Lesser General Public License for more details . You should have received a copy of the GNU Lesser General Public License Foundation , Inc. , 59 T...
590e4cb97da63a07fc33801b44f7e9b09e574dd728b87fe80e8f5f80d00eba4d
simplex-chat/simplex-chat
ChatTests.hs
module ChatTests where import ChatTests.Direct import ChatTests.Files import ChatTests.Groups import ChatTests.Profiles import Test.Hspec chatTests :: SpecWith FilePath chatTests = do chatDirectTests chatGroupTests chatFileTests chatProfileTests
null
https://raw.githubusercontent.com/simplex-chat/simplex-chat/c8fae0ec4390c40675ac9f9aa9924d5da87edbb2/tests/ChatTests.hs
haskell
module ChatTests where import ChatTests.Direct import ChatTests.Files import ChatTests.Groups import ChatTests.Profiles import Test.Hspec chatTests :: SpecWith FilePath chatTests = do chatDirectTests chatGroupTests chatFileTests chatProfileTests
cb9dc81419e6c5745d58ab11254e9dc7e41c6c8ce35e29df050742114f6c46b7
spurious/sagittarius-scheme-mirror
%3a45.scm
-*- mode : scheme ; coding : utf-8 ; -*- (library (srfi :45) (export :all) (import (srfi :45 lazy)))
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/srfi/%253a45.scm
scheme
coding : utf-8 ; -*-
(library (srfi :45) (export :all) (import (srfi :45 lazy)))
675c6d9529b51ffda2e15c49e3f88068ec4b35d0af8426287eeee853c7ae64d9
CloudI/cloudi_core
cloudi_core_i_logger_output.erl
-*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*- ex : set utf-8 sts=4 ts=4 sw=4 et nomod : %%% %%%------------------------------------------------------------------------ %%% @doc %%% ==CloudI Logger Formatter Output Initialization== %%% @end %%% MIT License %%% C...
null
https://raw.githubusercontent.com/CloudI/cloudi_core/1b6c6d2aeb3565a7fd2265185a892b20b8aeccec/src/cloudi_core_i_logger_output.erl
erlang
------------------------------------------------------------------------ @doc ==CloudI Logger Formatter Output Initialization== @end Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modif...
-*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*- ex : set utf-8 sts=4 ts=4 sw=4 et nomod : MIT License Copyright ( c ) 2014 - 2020 < mjtruog at protonmail dot com > to deal in the Software without restriction , including without limitation and/or sell copies...
3a60c3fc4df9d8a03ccbf18abfc4a0bc32f800f336c218f35de19099c00a03c9
may-liu/qtalk
cyrsasl.erl
%%%---------------------------------------------------------------------- %%% File : cyrsasl.erl Author : < > %%% Purpose : Cyrus SASL-like library Created : 8 Mar 2003 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne %%% %%% This program is free software; you can redistribute it a...
null
https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/cyrsasl.erl
erlang
---------------------------------------------------------------------- File : cyrsasl.erl Purpose : Cyrus SASL-like library This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHO...
Author : < > Created : 8 Mar 2003 by < > ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License along ...
a30600b7e459c8483dcba134e9b10de83ac702d24a267324c7f4e7783f499fdf
ntoronto/drbayes
parameterized-expansion.rkt
#lang racket/base (require (for-syntax racket/base syntax/id-table) racket/stxparam "../untyped-utils.rkt") (provide define-dispatcher-parameter define-dispatcher-id define-dispatcher define-parameterized-syntax dispatcher-set! dispat...
null
https://raw.githubusercontent.com/ntoronto/drbayes/e59eb7c7867118bf4c77ca903e133c7530e612a3/drbayes/private/language/parameterized-expansion.rkt
racket
#lang racket/base (require (for-syntax racket/base syntax/id-table) racket/stxparam "../untyped-utils.rkt") (provide define-dispatcher-parameter define-dispatcher-id define-dispatcher define-parameterized-syntax dispatcher-set! dispat...
392290399e6a3a976bd93c910bb4a59c35117c9131b623c5a5f9609e94b2bf21
paf31/dovetail
Math.hs
# LANGUAGE BlockArguments # # LANGUAGE ImportQualifiedPost # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE ViewPatterns # module Dovetail.Core.Math where import Data.Foldable (fold) import Dovetail import Dovetail.Evaluate (builtIn) e...
null
https://raw.githubusercontent.com/paf31/dovetail/60e00e247b643ad9c05e4137396ffddedcd8bcb6/dovetail-core/src/Dovetail/Core/Math.hs
haskell
# LANGUAGE OverloadedStrings # abs :: Number -> Number ceil :: Number -> Number cos :: Radians -> Number exp :: Number -> Number floor :: Number -> Number imul :: Int -> Int -> Int log :: Number -> Number max :: Number -> Number -> Number min :: Number -> Number -> Number pow :: Number -> Number -> Number ...
# LANGUAGE BlockArguments # # LANGUAGE ImportQualifiedPost # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE ViewPatterns # module Dovetail.Core.Math where import Data.Foldable (fold) import Dovetail import Dovetail.Evaluate (builtIn) env :: forall ctx. Env ctx env = do ...
c7fcfe845e118b89ed9ea002124c2069da9a0f8cc3218a9c9fd3585f5fec59b9
Deducteam/Dedukti
files_legacy.mli
open Kernel open Parsers type files_error = | ModuleNotFound of Basic.mident | MultipleModules of string * string list | ObjectFileNotFound of Basic.mident exception Files_error of files_error (** [add_path p] add the [p] to the load path *) val add_path : string -> unit (** [get_path ()] returns all the path...
null
https://raw.githubusercontent.com/Deducteam/Dedukti/abbe11318189c32ae236671ccd8dcf3c89525065/api/files_legacy.mli
ocaml
* [add_path p] add the [p] to the load path * [get_path ()] returns all the paths in the load path * [object_file_of_input] returns the filename associated to the input * [get_file md] returns the path associated to module [md]
open Kernel open Parsers type files_error = | ModuleNotFound of Basic.mident | MultipleModules of string * string list | ObjectFileNotFound of Basic.mident exception Files_error of files_error val add_path : string -> unit val get_path : unit -> string list * [ get_find_object_file lc md ] returns the path a...
5ef998876bc0bc60a6b524c8aa40b1fc719eacf48ea849b84d0368516dd8cbaa
JustusAdam/language-haskell
T0108.hs
SYNTAX TEST " source.haskell " " Correct support for ' signature ' " signature M where -- <--------- keyword.other.signature.haskell f = do let signature = Some value -- ^^^^^^^^^ - keyword.other.signature.haskell return 0 where signature = more testing -- ^^^^^^^^^ - keyword.other...
null
https://raw.githubusercontent.com/JustusAdam/language-haskell/c9ee1b3ee166c44db9ce350920ba502fcc868245/test/tickets/T0108.hs
haskell
<--------- keyword.other.signature.haskell ^^^^^^^^^ - keyword.other.signature.haskell ^^^^^^^^^ - keyword.other.signature.haskell
SYNTAX TEST " source.haskell " " Correct support for ' signature ' " signature M where f = do let signature = Some value return 0 where signature = more testing
dab421e01562d98569193ebeb82fb25443a0cfd3fcd10824dde001b4c1d29746
wesen/ruinwesen
gd.lisp
(in-package :md) (declaim (optimize speed)) ;;; XXX memory leak!!! (defvar *created-images* nil) (defmacro my-create-image (&rest args) `(let ((img (create-image ,@args))) (push img *created-images*) img)) (defmacro my-create-image-from-file (&rest args) `(let ((img (create-image-from-file ,@args))) ...
null
https://raw.githubusercontent.com/wesen/ruinwesen/9f3ccea85425cf46b57e76144b3114ca342bad0f/md-uw/src/gd.lisp
lisp
XXX memory leak!!! utf fuckup note fields note len numeric values XXX false trigs and mutes for kit track XXX XXX end handling, infinity symbol
(in-package :md) (declaim (optimize speed)) (defvar *created-images* nil) (defmacro my-create-image (&rest args) `(let ((img (create-image ,@args))) (push img *created-images*) img)) (defmacro my-create-image-from-file (&rest args) `(let ((img (create-image-from-file ,@args))) (push img *created...
8c06775124b7aff120586f86481355e2d1e72993a272b5a7c9f6073a4c2595e0
Wikia/vignette
user.clj
(ns user (:require [aws.sdk.s3 :as s3] [cheshire.core :refer :all] [clojure.java.io :as io] [clojure.java.shell :refer [sh]] [clojure.tools.namespace.repl :as nrepl] [clojure.tools.trace :refer :all] [clout.core :as c] [midje.repl :re...
null
https://raw.githubusercontent.com/Wikia/vignette/4797aeffc0a01dcfe1e1f661b2d2649d44ddb1d0/dev/user.clj
clojure
(load-file "dev/user.clj")
(ns user (:require [aws.sdk.s3 :as s3] [cheshire.core :refer :all] [clojure.java.io :as io] [clojure.java.shell :refer [sh]] [clojure.tools.namespace.repl :as nrepl] [clojure.tools.trace :refer :all] [clout.core :as c] [midje.repl :re...
d8ef01e901d1ce0ce87ffa5785bef6fe86b01fd668ffa67227e0488fc2daa3c4
Helium4Haskell/helium
Sections.hs
module Sections where data Expr = Num Int | Expr :+: Expr | (:-) Int deriving Show main = ( [ (+1) 2 , (+(-3)) 2 , (+(-1)) 3 , (+(3*2)) 7 , (1+) 2 , (3-) 2 , (1-) 3 , ((3*2)+) 7 , (20 `mod`) 3 , (`m...
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/correct/Sections.hs
haskell
module Sections where data Expr = Num Int | Expr :+: Expr | (:-) Int deriving Show main = ( [ (+1) 2 , (+(-3)) 2 , (+(-1)) 3 , (+(3*2)) 7 , (1+) 2 , (3-) 2 , (1-) 3 , ((3*2)+) 7 , (20 `mod`) 3 , (`m...
0d78f0b497182965f2b442988ca767609dd6308370c39025c869a8307f037f53
lojic/LearningRacket
prob-002a.rkt
#lang racket ;; ---------------------------------------------------------------------- Problem 2 : Even Fibonacci numbers ;; ;; Each new term in the Fibonacci sequence is generated by adding the previous two terms . By starting with 1 and 2 , the first 10 terms ;; will be: 1 , 2 , 3 , 5 , 8 , 13 , 21 , 34 , 5...
null
https://raw.githubusercontent.com/lojic/LearningRacket/eb0e75b0e16d3e0a91b8fa6612e2678a9e12e8c7/project-euler/prob-002a.rkt
racket
---------------------------------------------------------------------- Each new term in the Fibonacci sequence is generated by adding the will be: By considering the terms in the Fibonacci sequence whose values do ---------------------------------------------------------------------- This approach sacrifices th...
#lang racket Problem 2 : Even Fibonacci numbers previous two terms . By starting with 1 and 2 , the first 10 terms 1 , 2 , 3 , 5 , 8 , 13 , 21 , 34 , 55 , 89 , ... not exceed four million , find the sum of the even - valued terms . Answer : 4613732 (define (sum-even-fibs max) (let fibs ([f1 1] [f2 2]...
4a596cf79aab192b893cf717d8a504d2b0d04db8608bf9b1694b5248eac1b176
facebook/flow
reason.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/95b167abfb0c84213e10339ab40381f9f86a4442/src/common/reason.ml
ocaml
Eventually, trace information should be printed out only in verbose mode, since Flow reports all errors it finds and the trace for every error can get quite detailed dependening on how far apart the "source" and "sink" are and how convoluted the flow between them is. TODO String literals should not be able ...
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
b9cf97d99a7b0d174096bc904b6cd6b99cf0258a29378d0a87ece3e90f1a2e09
mbutterick/typesetting
exceptions.rkt
#lang hyphenate/private/exception-prep arc-min-ute as-so-ciate as-so-ciates dec-li-na-tion dis-tri-bu-tion law-yer law-yer-ing law-yer-ly law-yered law-yers oblig-a-tory oki-na oki-nas phil-an-thropic present presents project projects re-ci-pro-ci-ty re-cog-ni-zance real-ly ref-or-ma-tion ret-ri-bu-tion ta-ble ty-pog-r...
null
https://raw.githubusercontent.com/mbutterick/typesetting/8eedb97bb64cb2ff0cd9646eb1b0e46b67f1af44/hyphenate/hyphenate/us/exceptions.rkt
racket
#lang hyphenate/private/exception-prep arc-min-ute as-so-ciate as-so-ciates dec-li-na-tion dis-tri-bu-tion law-yer law-yer-ing law-yer-ly law-yered law-yers oblig-a-tory oki-na oki-nas phil-an-thropic present presents project projects re-ci-pro-ci-ty re-cog-ni-zance real-ly ref-or-ma-tion ret-ri-bu-tion ta-ble ty-pog-r...
959eaae7c051c91005054b05f92739a42cf1b60e1c4048b41900fae61b804433
fizruk/lxc
LXC.hs
----------------------------------------------------------------------------- -- | -- Module : System.LXC Copyright : ( c ) 2014 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : -- Create , control and manage LXC containers through Haskell API . You can get more info about at...
null
https://raw.githubusercontent.com/fizruk/lxc/9ba6e29c59bb78ef2b3b94a338c0b7a6776e53bb/src/System/LXC.hs
haskell
--------------------------------------------------------------------------- | Module : System.LXC License : BSD-style (see the file LICENSE) Maintainer : Most of container-related functions (e.g. 'start', 'attach', 'destroy') perform in 'System.LXC.Container.LXC' monad. To run @'System.LXC.Contai...
Copyright : ( c ) 2014 Create , control and manage LXC containers through Haskell API . You can get more info about at < > and < > . let containerName = ( Container " container - name " configPath ) You can start using Haskell LXC API bindings similar to a command line tool from GHCi : > > > let ...
1fea27e41970a66c9cac6d837cf637a4a7fef4f2c90e204f08354d2bfb2b43af
waxeye-org/waxeye
code.rkt
;; Waxeye Parser Generator ;; www.waxeye.org Copyright ( C ) 2008 - 2010 Orlando Hill Licensed under the MIT license . See ' LICENSE ' for details . #lang racket/base (require (only-in racket/list make-list) "version.rkt") (provide (all-defined-out)) (define *default-header* (list (string-append "Gener...
null
https://raw.githubusercontent.com/waxeye-org/waxeye/723da0475fc0c8e3dd43da46665ef7c62734857b/src/waxeye/code.rkt
racket
Waxeye Parser Generator www.waxeye.org Constructs the indentation string
Copyright ( C ) 2008 - 2010 Orlando Hill Licensed under the MIT license . See ' LICENSE ' for details . #lang racket/base (require (only-in racket/list make-list) "version.rkt") (provide (all-defined-out)) (define *default-header* (list (string-append "Generated by the Waxeye Parser Generator - version...
616c0328190c5f8a9db126e3ab6d530963abb7cfae4920e35da09ee9e6fc58d3
bloomberg/ppx_string_interpolation
interpolation_parser.ml
type token = Plain string , does not start with % and contain $ | Format of string (* String, which starts with % and is treated as prinf-like format string *) | Expression of string (* Expression to interpolate; contains both '(' and ')' *) | Variable of string (* Name of variable, does not contain '(' and ')'...
null
https://raw.githubusercontent.com/bloomberg/ppx_string_interpolation/8040004ad3437cfe6c533e474a2cd9d5bb5421f8/src/interpolation_parser.ml
ocaml
String, which starts with % and is treated as prinf-like format string Expression to interpolate; contains both '(' and ')' Name of variable, does not contain '(' and ')' Just a single '$' char, which comes from '$$' in raw string TODO: take into account comments/strings of both syntaxes, which can contain par...
type token = Plain string , does not start with % and contain $ Just a single ' % ' char , which comes from ' % % ' in raw string let token_to_string = function | String s -> s | Format s -> "`" ^ s ^ "`" | DollarChar -> "$" | PercentChar -> "%" | Expression e -> "{" ^ e ^ "}" | Var...
82b050e5da91a299c5712bc3a0893f3c5546ffb151b5b990fe7ab92c123d89c9
rururu/r4f-pro
basic.clj
(ns world.basic (:import (java.awt Color Dimension) (javax.swing JPanel JFrame) (java.awt.event KeyListener KeyEvent))) (def FIGURES (volatile! {})) (defn draw-figure [[id func] g] (func g)) (defn draw-world [g] (doseq [fig (seq @FIGURES)] (draw-figure fig g))) (defn quit [controls] (.dispose (:frame ...
null
https://raw.githubusercontent.com/rururu/r4f-pro/c472b902049f620e25b36a197a42f07f5796620d/src/clojure/world/basic.clj
clojure
(ns world.basic (:import (java.awt Color Dimension) (javax.swing JPanel JFrame) (java.awt.event KeyListener KeyEvent))) (def FIGURES (volatile! {})) (defn draw-figure [[id func] g] (func g)) (defn draw-world [g] (doseq [fig (seq @FIGURES)] (draw-figure fig g))) (defn quit [controls] (.dispose (:frame ...
46c0f39527b2eb7cd647df9205a706c582ef592cfa4bfde3393a05b44acaced9
danieljharvey/mimsa
Bindings.hs
# LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE OverloadedStrings #-} module Language.Mimsa.Types.Store.Bindings where import qualified Data.Aeson as JSON import Data.Map.Strict (Map) import qualified Data.Map.Strict as M import qualified Data.Text as T import Language.Mimsa.Core ...
null
https://raw.githubusercontent.com/danieljharvey/mimsa/e6b177dd2c38e8a67d6e27063ca600406b3e6b56/compiler/src/Language/Mimsa/Types/Store/Bindings.hs
haskell
# LANGUAGE OverloadedStrings # a list of names to hashes
# LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # module Language.Mimsa.Types.Store.Bindings where import qualified Data.Aeson as JSON import Data.Map.Strict (Map) import qualified Data.Map.Strict as M import qualified Data.Text as T import Language.Mimsa.Core import Language.Mimsa.Types.Store.E...
a8d16587b8ed29762ccb759e58f67d017e5c066001ee5c08c7d7d365ab30379c
LaurentMazare/ocaml-torch
cifar_train.ml
Training various models on the CIFAR-10 dataset . The dataset can be downloaded from /~kriz/cifar.html , files should be placed in the data/ directory . The resnet model reaches ~92.5 % accuracy . The dataset can be downloaded from /~kriz/cifar.html, files should be placed in the data/ direc...
null
https://raw.githubusercontent.com/LaurentMazare/ocaml-torch/a82b906a22c7c23138af16fab497a08e5167d249/examples/cifar/cifar_train.ml
ocaml
Compute the cross-entropy loss. Compute the validation error.
Training various models on the CIFAR-10 dataset . The dataset can be downloaded from /~kriz/cifar.html , files should be placed in the data/ directory . The resnet model reaches ~92.5 % accuracy . The dataset can be downloaded from /~kriz/cifar.html, files should be placed in the data/ direc...
9f1221ddebe4108281a4fe0999ccdef93494d390a38e5101387ee829b0849c9b
ayazhafiz/plts
talc.ml
let lex = Lexing.from_string ~with_positions:true let parse_term s = lex s |> fun s -> Parser.toplevel_term Lexer.read s [] module type Lang = sig type term type ty val string_of_term : term -> string val string_of_ty : ty -> string end module type Lower = sig include Lang type source type value ...
null
https://raw.githubusercontent.com/ayazhafiz/plts/725b7fd0d4bd65e15f12cc1fec80fa7402dec167/TAL/talc.ml
ocaml
let lex = Lexing.from_string ~with_positions:true let parse_term s = lex s |> fun s -> Parser.toplevel_term Lexer.read s [] module type Lang = sig type term type ty val string_of_term : term -> string val string_of_ty : ty -> string end module type Lower = sig include Lang type source type value ...
a4d6028baa2c8b6a8344aaf11aafd71b4b905bc4d0518f4b5a3a9516a8fd06ca
abdulapopoola/SICPBook
Ex2.30.scm
#lang planet neil/sicp (define (square x) (* x x)) (define (square-tree tree) (cond ((null? tree) nil) ((pair? tree) (cons (square-tree (car tree)) (square-tree (cdr tree)))) (else (square tree)))) (square-tree (list 1 (list 2 (list 3 4) 5) (list 6 7))) ;;Usi...
null
https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%202/2.2/Ex2.30.scm
scheme
Using map and recursion
#lang planet neil/sicp (define (square x) (* x x)) (define (square-tree tree) (cond ((null? tree) nil) ((pair? tree) (cons (square-tree (car tree)) (square-tree (cdr tree)))) (else (square tree)))) (square-tree (list 1 (list 2 (list 3 4) 5) (list 6 7))) (defi...
891b66a6c392841984cb402a4bb11ec7f5b1065a74ab93d76d098653543ae482
thheller/shadow-cljsjs
en_ie.cljs
(ns cljsjs.moment.locale.en-ie (:require ["moment/locale/en-ie"]))
null
https://raw.githubusercontent.com/thheller/shadow-cljsjs/eaf350d29d45adb85c0753dff77e276e7925a744/src/main/cljsjs/moment/locale/en_ie.cljs
clojure
(ns cljsjs.moment.locale.en-ie (:require ["moment/locale/en-ie"]))
a1c1e5c4c2a863f48909c1a5a5169d16fd30ea5a77a4f491383c3c95c9bb2b3c
geremih/xcljb
res.clj
This file is automatically generated . DO NOT MODIFY . (clojure.core/ns xcljb.gen.res (:require xcljb.conn-ext xcljb.gen.res-types)) (def -XCLJB {:minor-version 0, :major-version 1, :header "res", :extension-multiword false, :extension-name "Res", :extension-xname "X-Resource"}) (clojure.core/defn q...
null
https://raw.githubusercontent.com/geremih/xcljb/59e9ff795bf00595a3d46231a7bb4ec976852396/src/xcljb/gen/res.clj
clojure
Manually written.
This file is automatically generated . DO NOT MODIFY . (clojure.core/ns xcljb.gen.res (:require xcljb.conn-ext xcljb.gen.res-types)) (def -XCLJB {:minor-version 0, :major-version 1, :header "res", :extension-multiword false, :extension-name "Res", :extension-xname "X-Resource"}) (clojure.core/defn q...
cdda0b256c5b628428b7e68b57617319131c32c153f8e95f9824f65dcb957e57
rcherrueau/APE
examples.rkt
#lang reader "../lang.rkt" ;; Type def (class X) (class Y) (class Unit) (class Engine) ;; Prog (class Driver #;... ) ;; ;; Check duplicated class declaration ;; (class Driver) (class Pair {m n} (field [fst : m/X]) (field [snd : n/Y]) ;; ;; Check unknown context parameter ;; (field [foo : x/Y]) ;; ;; Che...
null
https://raw.githubusercontent.com/rcherrueau/APE/8b5302709000bd043b64d46d55642acb34ce5ba7/racket/CPN98/examples/examples.rkt
racket
Type def Prog ... ) ;; Check duplicated class declaration (class Driver) ;; Check unknown context parameter (field [foo : x/Y]) ;; Check unknown context parameter + wrong number (field [foo : x/Y{n}]) ;; Check wrong number of context parameters (field [Foo : n/Y{n}]) ;; Check unknown context parameter (fiel...
#lang reader "../lang.rkt" (class X) (class Y) (class Unit) (class Engine) (class Pair {m n} (field [fst : m/X]) (field [snd : n/Y]) ) (class Intermediate (field [p1 : rep/Pair{rep world}]) (field [p2 : Pair{rep world}]) (field [p3 : Unit]) (field [p4 : Engine]) (def (a → rep/Pair{rep world})...
a46e460cfbeecaa0adc652e965da8054200a7dfa9c41e445563f2e63928e19ec
orx/ocaml-orx
orx_types_stubgen.ml
let prefix = "orx_stub" let prologue = {| #include <orx.h> |} let () = print_endline prologue; Cstubs.Types.write_c Format.std_formatter (module Orx_types_bindings.Bindings)
null
https://raw.githubusercontent.com/orx/ocaml-orx/50691d680f369b04c964d9f4b10050f9ffc4173f/src/types/stubgen/orx_types_stubgen.ml
ocaml
let prefix = "orx_stub" let prologue = {| #include <orx.h> |} let () = print_endline prologue; Cstubs.Types.write_c Format.std_formatter (module Orx_types_bindings.Bindings)
aa3e9fc398ac757c33de857af9ba4a993bf08c0f7deb2a654c4cef138a19a1de
2600hz/kazoo
kz_transactions.erl
%%%----------------------------------------------------------------------------- ( C ) 2013 - 2020 , 2600Hz %%% @doc @author 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 /. %%% %%% @end...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_transactions/src/kz_transactions.erl
erlang
----------------------------------------------------------------------------- @doc @end ----------------------------------------------------------------------------- ------------------------------------------------------------------------------ @doc fetch last transactions from From to To @end --------------------...
( C ) 2013 - 2020 , 2600Hz @author 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 /. -module(kz_transactions). -export([fetch/1 ,fetch/2 ,fetch/3 ]). -export([leg...
91f15d8a7eeb32b2f00c7a1ea69d26c3a22a216a58e584016b66f9f577382f8b
GaloisInc/tower
Threads.hs
{-# LANGUAGE MultiWayIf #-} -- -- Map the Tower AST into the AADL AST. -- ( c ) 2014 Galois , Inc. -- module Tower.AADL.Threads ( HMap , ActiveThreads(..) , PassiveThreads(..) , HasInit(..) , emptyHMap , fromHMap , toPassiveThreads , toActiveThreads ) where import Prelude () import Data.Monoid i...
null
https://raw.githubusercontent.com/GaloisInc/tower/a43f5e36c6443472ea2dc15bbd49faf8643a6f87/tower-aadl/src/Tower/AADL/Threads.hs
haskell
# LANGUAGE MultiWayIf # Map the Tower AST into the AADL AST. -------------------------------------- Handler unique names that come from either periodic or external threads. meaningful for AADL (notably, distinguishing active and passive threads). From external or periodic threads --------------------------------...
( c ) 2014 Galois , Inc. module Tower.AADL.Threads ( HMap , ActiveThreads(..) , PassiveThreads(..) , HasInit(..) , emptyHMap , fromHMap , toPassiveThreads , toActiveThreads ) where import Prelude () import Data.Monoid import Prelude.Compat hiding (init) import Data.Maybe (isJust) import Data.Lis...
8183863745f336df43ed464c3ff486202c70ed2943e4ec1162a7daea0a889904
fp-works/2019-winter-Haskell-school
Party.hs
# OPTIONS_GHC -fno - warn - orphans # module Party where import Data.List (sort) import Data.Tree (Tree (Node, rootLabel, subForest)) import Employee -- ex1 glCons :: Employee -> GuestList -> GuestList glCons e gl = GL (e:el) (f + glf) where Emp { empFun = f } = e GL el glf = g...
null
https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week8/zehua/src/Party.hs
haskell
ex1 ex2 treeFold f (Node l sf) = f l (map (treeFold f) sf) ex3 ex4 ex5
# OPTIONS_GHC -fno - warn - orphans # module Party where import Data.List (sort) import Data.Tree (Tree (Node, rootLabel, subForest)) import Employee glCons :: Employee -> GuestList -> GuestList glCons e gl = GL (e:el) (f + glf) where Emp { empFun = f } = e GL el glf = gl ins...
b85d8477dc0e5e03e96dbe2e00bfebfc58c193ab5416cd3d0e9ca6991faa18aa
janestreet/learn-ocaml-workshop
snake_graphics.mli
open! Base (** This module handles the graphics for the game. We have implemented this for you so you don't need to change anything here, but feel free to look around and once you have the game, feel free to alter this file to make things fancier! *) (** [init_exn] fails if called twice. *) val init_exn :...
null
https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/03-snake/lib/snake_graphics.mli
ocaml
* This module handles the graphics for the game. We have implemented this for you so you don't need to change anything here, but feel free to look around and once you have the game, feel free to alter this file to make things fancier! * [init_exn] fails if called twice. * [render] renders the entire playi...
open! Base val init_exn : unit -> Game.t val render : Game.t -> unit val read_key : unit -> char option
7d23a76c5c237644d6b5d5071547adffd1d5819851ed5341a1bd9f9a174bffb8
nasa/Common-Metadata-Repository
granule.clj
(ns cmr.metadata.proxy.concepts.granule (:require [clojure.string :as string] [cmr.exchange.common.results.core :as results] [cmr.exchange.common.results.errors :as errors] [cmr.exchange.common.util :as util] [cmr.exchange.query.util :as query-util] [cmr.http.kit.request :as request] [cmr.http.ki...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/3215ee6945cb1fa82499c3c3d74841c3284eec6e/other/cmr-exchange/metadata-proxy/src/cmr/metadata/proxy/concepts/granule.clj
clojure
(ns cmr.metadata.proxy.concepts.granule (:require [clojure.string :as string] [cmr.exchange.common.results.core :as results] [cmr.exchange.common.results.errors :as errors] [cmr.exchange.common.util :as util] [cmr.exchange.query.util :as query-util] [cmr.http.kit.request :as request] [cmr.http.ki...
926228de7e5c1181fa2acfd72e53d5abefa34b6fd2809373429bca67b40522c5
berke/aurochs
ansi.ml
(* Ansi *) open Pffpsf;; let black = 0;; let red = 1;; let green = 2;; let yellow = 3;; let blue = 4;; let magenta = 5;; let cyan = 6;; let white = 7;; let foreground = [| "\027[30m"; "\027[31m"; "\027[32m"; "\027[33m"; "\027[34m"; "\027[35m"; "\027[36m"; "\027[37m"; |];; let backgr...
null
https://raw.githubusercontent.com/berke/aurochs/637bdc0d4682772837f9e44112212e7f20ab96ff/util/ansi.ml
ocaml
Ansi
open Pffpsf;; let black = 0;; let red = 1;; let green = 2;; let yellow = 3;; let blue = 4;; let magenta = 5;; let cyan = 6;; let white = 7;; let foreground = [| "\027[30m"; "\027[31m"; "\027[32m"; "\027[33m"; "\027[34m"; "\027[35m"; "\027[36m"; "\027[37m"; |];; let background = [| ...
899825eeb29e53082ffe5c862e977c83b026bebb89b8320bb8a5d2f219409846
fujimura/hi
Template.hs
module Hi.Template ( isTemplate , readTemplates , untemplate ) where import Hi.Directory (inTemporaryDirectory) import qualified Hi.Git as Git import Hi.Types import Control.Applicative ((<$>)) import qualified Data.ByteString as BS (readFil...
null
https://raw.githubusercontent.com/fujimura/hi/a55cf5ee87e3607f398a08aeb078f5ef63e6f4c5/src/Hi/Template.hs
haskell
It seems to be an file path Not looks like a file path True >>> isTemplate "NotATemplate.hs" False | Remove \".template\" from 'FilePath'
module Hi.Template ( isTemplate , readTemplates , untemplate ) where import Hi.Directory (inTemporaryDirectory) import qualified Hi.Git as Git import Hi.Types import Control.Applicative ((<$>)) import qualified Data.ByteString as BS (readFil...
d95fafdcffeb845f217e47985e196e3382a24fa66392384061674d64b504f8b1
haskell-grpc-native/http2-client
Exceptions.hs
module Network.HTTP2.Client.Exceptions ( ClientIO , ClientError(..) , runClientIO , module Control.Monad.Except ) where import Control.Exception (Exception) import Control.Monad.Except (ExceptT, runExceptT, throwError, lift) type ClientIO = ExceptT ClientError IO runClientIO :: Clien...
null
https://raw.githubusercontent.com/haskell-grpc-native/http2-client/046b1f23ea547b75f1a3dc3d878603968bff4fb4/src/Network/HTTP2/Client/Exceptions.hs
haskell
| A set of errors as observed from the client. ^ We received a TCP end-of-stream and there will be no further read-IOs possible on the connection.
module Network.HTTP2.Client.Exceptions ( ClientIO , ClientError(..) , runClientIO , module Control.Monad.Except ) where import Control.Exception (Exception) import Control.Monad.Except (ExceptT, runExceptT, throwError, lift) type ClientIO = ExceptT ClientError IO runClientIO :: Clien...
43f62e420d541013e786762225ebf5c8fe9a3a5b65557d2cab0e278608a0ae80
zerg000000/realworld
backend.clj
(ns opinionated.components.auth.backend (:require [integrant.core :as ig] [buddy.auth.backends :as backends])) (defmethod ig/init-key :opinionated.components.auth/backend [_ options] (assoc options :backend (backends/jws {:secret (:secret options)})))
null
https://raw.githubusercontent.com/zerg000000/realworld/4465651f1aeb4559735b7756214b1717ab04aad7/src/opinionated/components/auth/backend.clj
clojure
(ns opinionated.components.auth.backend (:require [integrant.core :as ig] [buddy.auth.backends :as backends])) (defmethod ig/init-key :opinionated.components.auth/backend [_ options] (assoc options :backend (backends/jws {:secret (:secret options)})))
50ef3c2c4e7a468b97b6270f3df92e0b9c18c925c8d340839fe732322dcb5024
obsidiansystems/beam-automigrate
Validity.hs
{-# LANGUAGE MultiWayIf #-} # LANGUAGE ViewPatterns # module Database.Beam.AutoMigrate.Validity ( -- * Types Reason (..), ApplyFailed, ValidationFailed, -- * Applying edits to a 'Schema' applyEdits, -- * Validing a 'Schema' validateSchema, validateSchemaTables, validateSchemaEnu...
null
https://raw.githubusercontent.com/obsidiansystems/beam-automigrate/2eae891814b0523c6c839a666eed19218985a89f/src/Database/Beam/AutoMigrate/Validity.hs
haskell
# LANGUAGE MultiWayIf # * Types * Applying edits to a 'Schema' * Validing a 'Schema' | Simple type that allows us to talk about \"qualified entities\" like columns, which name might not be unique globally (for which we need the 'TableName' to disambiguate things). | The 'Table' we were trying to edit didn't exist...
# LANGUAGE ViewPatterns # module Database.Beam.AutoMigrate.Validity Reason (..), ApplyFailed, ValidationFailed, applyEdits, validateSchema, validateSchemaTables, validateSchemaEnums, validateTableConstraint, validateColumn, ) where import Control.Monad import Control.Monad.Exce...