_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
51312cbf981a732423caa4a1694e679beaf2ffb21a56bef112f5e6599f370ab1
DSiSc/why3
loc.mli
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University (* ...
null
https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/util/loc.mli
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University General Public License version 2.1 , with the special exception open Format * { 2 Lexing locations } val current_offset : int ref val reloc : Lexing.position -> Lexing...
ace9d53ce6181ea12a3aba5f0eced2c0c8154dbdefdbc8adc44b1f8b2151204c
patricoferris/ocaml-multicore-monorepo
test_hmac.ml
open OUnit2 open Test_common open Mirage_crypto This is from RFC 2022 ( MD5 / SHA1 ) and 4231 ( SHA2 ) let hex = Cstruct.of_hex let inputs = [ (* Test Case 0 *) ( hex ("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b" ^ "0b0b0b0b"), hex "4869205468657265" ); (* "Hi There" *) Test Case 1 " ...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/mirage-crypto/tests/test_hmac.ml
ocaml
Test Case 0 "Hi There" "what do ya want " "for nothing?" "tion" "e Key - Hash Key" "This is a test u" "sing a larger th" "an block-size ke" "y and a larger t" "han block-size d" "ds to be hashed " "before being use" "gorithm." "e Key - Hash Key" "e Key and Larger" truncated thingy tru...
open OUnit2 open Test_common open Mirage_crypto This is from RFC 2022 ( MD5 / SHA1 ) and 4231 ( SHA2 ) let hex = Cstruct.of_hex let inputs = [ ( hex ("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b" ^ "0b0b0b0b"), Test Case 1 " " Test Case 2 ( hex ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ^ "aaaaaaaa"),...
790b1a67f6e7a6e4168a72b52dee5cbcbc6682bc023ca6f85b612bd81b396408
clj-kafka/franzy
partitioners.clj
(ns franzy.clients.producer.partitioners "Partitioners used to partition topic partitions. Partitioners should implement the `Partitioner` interface directly to be used with Kafka configurations." (:require [franzy.clients.partitions :as partitions] [franzy.clients.cluster :as cluster]) (:import (o...
null
https://raw.githubusercontent.com/clj-kafka/franzy/6c2e2e65ad137d2bcbc04ff6e671f97ea8c0e380/core/src/franzy/clients/producer/partitioners.clj
clojure
(ns franzy.clients.producer.partitioners "Partitioners used to partition topic partitions. Partitioners should implement the `Partitioner` interface directly to be used with Kafka configurations." (:require [franzy.clients.partitions :as partitions] [franzy.clients.cluster :as cluster]) (:import (o...
cb6e5573936e41593b3509ea0714a17d807eb675136456f540f5ab86e59042dd
cartazio/tlaps
newversion.ml
* Copyright ( C ) 2012 INRIA and Microsoft Corporation * Copyright (C) 2012 INRIA and Microsoft Corporation *) open Printf open Scanf Change the following two lines for a new version let major = 1 let minor = 4 (* The rest of the file has no magic numbers *) let same_version = ref false let loud = ref ...
null
https://raw.githubusercontent.com/cartazio/tlaps/562a34c066b636da7b921ae30fc5eacf83608280/tools/newversion.ml
ocaml
The rest of the file has no magic numbers AUTOMATICALLY GENERATED by tools/newversion.ml \ -- DO NOT EDIT AUTOMATICALLY GENERATED by tools/newversion.ml \ -- DO NOT EDIT
* Copyright ( C ) 2012 INRIA and Microsoft Corporation * Copyright (C) 2012 INRIA and Microsoft Corporation *) open Printf open Scanf Change the following two lines for a new version let major = 1 let minor = 4 let same_version = ref false let loud = ref true let release = ref false let rv_exists = Sys...
a15aa67632ca55458b62319f0fffd98514b5bb0aae1a37d880a35833a0c88bb8
chenyukang/eopl
data-structures.scm
(module data-structures (lib "eopl.ss" "eopl") (require "lang.scm") ; for expression? (require "store.scm") ; for reference? (provide (all-defined)) ; too many things to list ;;;;;;;;;;;;;;;; expressed values ;;;;;;;;;;;;;;;; ;;; an expressed value is ei...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/base/chapter4/explicit-refs/data-structures.scm
scheme
for expression? for reference? too many things to list expressed values ;;;;;;;;;;;;;;;; an expressed value is either a number, a boolean, a procval, or a reference. extractors: procedures ;;;;;;;;;;;;;;;; env->list : Env -> List used for pretty-printing and debugging expval->printable : ExpVal ->...
(module data-structures (lib "eopl.ss" "eopl") (define-datatype expval expval? (num-val (value number?)) (bool-val (boolean boolean?)) (proc-val (proc proc?)) (ref-val (ref reference?)) ) (define expval->num (lambda (v) (cases expval ...
8aef3b8d32de737b032be9016dafa35c3a495413a2373b98475f1f3661474652
ocaml-gospel/gospel
neg2.mli
type 'a t = 'a * int val f : int t -> int @ r = f a ensures match a with | x , 0i - > true | 1i , x - > false ensures match a with | x, 0i -> true | 1i, x -> false *) { gospel_expected| [ 125 ] File " neg2.mli " , line 6 , characters 6 - 63 : 6 |...
null
https://raw.githubusercontent.com/ocaml-gospel/gospel/79841c510baeb396d9a695ae33b290899188380b/test/patterns/negative/neg2.mli
ocaml
type 'a t = 'a * int val f : int t -> int @ r = f a ensures match a with | x , 0i - > true | 1i , x - > false ensures match a with | x, 0i -> true | 1i, x -> false *) { gospel_expected| [ 125 ] File " neg2.mli " , line 6 , characters 6 - 63 : 6 |...
1fffbc27b1298b44a8db1a39bf4dd37cb1faa5f2c3dc7d36e1af9816ea6f88d0
Clojure2D/clojure2d-examples
moving_sphere.clj
(ns rt4.the-rest-of-your-life.ch06a.moving-sphere (:require [rt4.the-rest-of-your-life.ch06a.hittable :as hittable] [rt4.the-rest-of-your-life.ch06a.interval :as interval] [rt4.the-rest-of-your-life.ch06a.ray :as ray] [fastmath.core :as m] [fastmath.vector :as v] ...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/f47e1655902cc6bf1590aaecc144ac274ed3af66/src/rt4/the_rest_of_your_life/ch06a/moving_sphere.clj
clojure
(ns rt4.the-rest-of-your-life.ch06a.moving-sphere (:require [rt4.the-rest-of-your-life.ch06a.hittable :as hittable] [rt4.the-rest-of-your-life.ch06a.interval :as interval] [rt4.the-rest-of-your-life.ch06a.ray :as ray] [fastmath.core :as m] [fastmath.vector :as v] ...
0f0381334ac583868ba8b67d0cf45855acd378aefc840b628f39ad23224dfdec
workframers/garamond
version_test.clj
(ns garamond.version-test (:require [clojure.test :refer :all] [garamond.version :as ver :refer [increment]]) (:import (com.github.zafarkhaja.semver Version))) (defn v [s] (Version/valueOf s)) (deftest inc-test (testing "Basics" (is (= (v "1.2.4") (increment (v "1.2.3") :patch)) ...
null
https://raw.githubusercontent.com/workframers/garamond/a5077bc99d5f6e303735505068d5363d3b2cc00c/test/garamond/version_test.clj
clojure
(ns garamond.version-test (:require [clojure.test :refer :all] [garamond.version :as ver :refer [increment]]) (:import (com.github.zafarkhaja.semver Version))) (defn v [s] (Version/valueOf s)) (deftest inc-test (testing "Basics" (is (= (v "1.2.4") (increment (v "1.2.3") :patch)) ...
b54a3295df86b30972d10d3bccec51121b8e3acd722c218864dc4f85ddc8d119
jiangpengnju/htdp2e
exercises-and-projects.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname exercises-and-projects) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t const...
null
https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/abstraction/using-abstractions/exercises-and-projects.rkt
racket
about the language level of this file in a form that our tools can easily process.
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname exercises-and-projects) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
4441bb00548e9f396fcb3c71bd3797c504fa139058fe332abd20195c01cdf194
brendanhay/gogol
Log.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-partners/gen/Gogol/Partners/ClientMessages/Log.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated /See:/ </ Google Partners API Reference> for @partners.clientMessages.log@. * Resource ** Constructing a Request /See:/ 'newPartnersClientMessagesLog' smart constructor. | V1 error format. | OAuth access token. | Multipart...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
e069e9a5adfa76dbd331a8a8ae91ceb7ce883ea6f1c8c6ab253c08727e9aae72
krdlab/hs-twitter-client
Main.hs
{-# LANGUAGE OverloadedStrings, RecordWildCards #-} module Main where import System.Environment (getArgs) import System.Locale (defaultTimeLocale) import Data.Time (parseTime, getCurrentTimeZone, utcToZonedTime) import Data.ByteString ...
null
https://raw.githubusercontent.com/krdlab/hs-twitter-client/6434b24792278fce468c4141f68924ab2fe12277/Main.hs
haskell
# LANGUAGE OverloadedStrings, RecordWildCards # userstream を取得しつづける -- parser 自分のステータスを更新する
module Main where import System.Environment (getArgs) import System.Locale (defaultTimeLocale) import Data.Time (parseTime, getCurrentTimeZone, utcToZonedTime) import Data.ByteString (ByteString) import Data.ByteString.Char8 ...
44abd369de83e61bbfb56a819a35c54be88beb3bc73b9954078dad28ff64dacf
Frama-C/Frama-C-snapshot
mem_exec.ml
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/value/engine/mem_exec.ml
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
f839c74ee188ffcfe391eaf1c33304e13b242bdc5f51456e5739712883e02e4d
EasyCrypt/easycrypt
ecPhlEager.mli
(* -------------------------------------------------------------------- *) open EcUtils open EcParsetree open EcFol open EcCoreGoal.FApi (* -------------------------------------------------------------------- *) val t_eager_seq : codepos1 -> codepos1 -> form -> EcIdent.t -> backward val t_eager_if : backward ...
null
https://raw.githubusercontent.com/EasyCrypt/easycrypt/f87695472e70c313ef2966e20979b1afcc2e543e/src/phl/ecPhlEager.mli
ocaml
-------------------------------------------------------------------- -------------------------------------------------------------------- -------------------------------------------------------------------- --------------------------------------------------------------------
open EcUtils open EcParsetree open EcFol open EcCoreGoal.FApi val t_eager_seq : codepos1 -> codepos1 -> form -> EcIdent.t -> backward val t_eager_if : backward val t_eager_while : EcIdent.t -> backward val t_eager_fun_def : backward val t_eager_fun_abs : EcFol.form -> EcIdent.t -> backward val t_eager_call ...
c6ceba167d145827a5a2e7ef807bcbe020d971298727b09c0eb9f805fbdc9949
rtoy/ansi-cl-tests
string-left-trim.lsp
;-*- Mode: Lisp -*- Author : Created : Fri Oct 4 04:57:41 2002 ;;;; Contains: Tests for STRING-LEFT-TRIM (in-package :cl-test) (deftest string-left-trim.1 (let* ((s (copy-seq "abcdaba")) (s2 (string-left-trim "ab" s))) (values s s2)) "abcdaba" "cdaba") (deftest string-left-trim.2 ...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/string-left-trim.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests for STRING-LEFT-TRIM Test that trimming is case sensitive Error cases
Author : Created : Fri Oct 4 04:57:41 2002 (in-package :cl-test) (deftest string-left-trim.1 (let* ((s (copy-seq "abcdaba")) (s2 (string-left-trim "ab" s))) (values s s2)) "abcdaba" "cdaba") (deftest string-left-trim.2 (let* ((s (copy-seq "abcdaba")) (s2 (string-left-trim '...
f861a716565082a48d257d8efe13befc0c1a48b2d48bcb53e1225e54b1b151aa
smanek/trivial-lisp-webapp
functions.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; ;;; functions.lisp --- High-level interface to foreign functions. ;;; Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2005 - 2007 , ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated...
null
https://raw.githubusercontent.com/smanek/trivial-lisp-webapp/36816c17ea378822e02a123c1be960fd9ce3e29d/aux/cffi_0.10.5/src/functions.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- functions.lisp --- High-level interface to foreign functions. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, pu...
Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2005 - 2007 , files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOU...
c1aab7a50fe417761df8885c9fffef515a16667774043349ff02e02bb84eba00
argp/bap
BatListFull.ml
(** Opening this module will put a more tail-recursive List module into scope. *) (** A complete list module that uses Batteries functions when possible. Why is this not in batteries itself? *) module List = struct include List include BatList end
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/BatListFull.ml
ocaml
* Opening this module will put a more tail-recursive List module into scope. * A complete list module that uses Batteries functions when possible. Why is this not in batteries itself?
module List = struct include List include BatList end
c3a8eaa02e998b4114e10affbdd41d43a41f9fd255b1fa52433371102800498f
nh2/network-house
ICMP.hs
module Net.ICMP where -- Internet Control Message Protocol -- import Net.Bits import Net.Utils import Net.Packet import Net.PacketParsing data Packet = EchoRequest EchoMsg | EchoReply EchoMsg | Other { type_ :: !MessageType, code :: !Word8, chksum :: !Word16, content :: U...
null
https://raw.githubusercontent.com/nh2/network-house/f31b6af230069f21928aae2b7242eb2c53e4d678/Net/ICMP.hs
haskell
Internet Control Message Protocol XXX : Assuming only Echo messages XXX: Assuming only Echo messages icmpUnparse (Other ...) = dependent type , the type determines the shape of code & content ------------------------------------------------------------------------------ Destination unreachable ------------...
module Net.ICMP where import Net.Bits import Net.Utils import Net.Packet import Net.PacketParsing data Packet = EchoRequest EchoMsg | EchoReply EchoMsg | Other { type_ :: !MessageType, code :: !Word8, chksum :: !Word16, content :: UArray Int Word8 } deriving Sho...
8bb40cccc58f73c9e0559c7e7f751516d9aac6291edeee2f7afc3c075c0714e6
glguy/advent
01.hs
{-# Language QuasiQuotes #-} | Module : Main Description : Day 1 solution Copyright : ( c ) , 2019 License : ISC Maintainer : < > Compute fuel costs for a rocket . Module : Main Description : Day 1 solution Copyright : (c) Eric Mertens, 2019 License : ISC Maintainer : ...
null
https://raw.githubusercontent.com/glguy/advent/7ab9f9e47208fd5720e36bac33fee2b78d4ec50b/solutions/src/2019/01.hs
haskell
# Language QuasiQuotes # | >>> :main | Compute fuel cost given a mass. | Compute fuel cost given a mass.
| Module : Main Description : Day 1 solution Copyright : ( c ) , 2019 License : ISC Maintainer : < > Compute fuel costs for a rocket . Module : Main Description : Day 1 solution Copyright : (c) Eric Mertens, 2019 License : ISC Maintainer : <> Compute fuel costs for ...
3ef1fe9476b0ed18b683601de7f952ae3698313982491ec19399bebcb33b0b4a
ocsigen/js_of_ocaml
lwt_js_events.ml
Js_of_ocaml library * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * 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 ...
null
https://raw.githubusercontent.com/ocsigen/js_of_ocaml/9ea685219b3210f73dcf48c66a19b79ed8a3fa19/lib/lwt/lwt_js_events.ml
ocaml
true because we do not want to prevent default -> the user can use the preventDefault function above. Using Lwt.fail as default, to be polymorphic In the case it has been cancelled during the previous handler, ...
Js_of_ocaml library * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * 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 ...
232ecff6e346a7da3acfedea8fd1bf9295213934d8bfa154c06a57bde2c658ee
ska80/thinlisp
c-func.lisp
(in-package "TLI") ;;;; Module C-FUNC Copyright ( c ) 1999 - 2001 The ThinLisp Group Copyright ( c ) 1995 Gensym Corporation . ;;; All rights reserved. This file is part of ThinLisp . ThinLisp is open source ; you can redistribute it and/or modify it under the terms of the ThinLisp License as published by...
null
https://raw.githubusercontent.com/ska80/thinlisp/173573a723256d901887f1cbc26d5403025879ca/tlt/lisp/c-func.lisp
lisp
Module C-FUNC All rights reserved. you can redistribute it and/or modify it either version 1 or ( at your option ) any later version . WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. C Functions This module implements structures and operations on C...
(in-package "TLI") Copyright ( c ) 1999 - 2001 The ThinLisp Group Copyright ( c ) 1995 Gensym Corporation . This file is part of ThinLisp . under the terms of the ThinLisp License as published by the ThinLisp ThinLisp is distributed in the hope that it will be useful , but For additional information s...
7d06e626083191cc6f4c45236f240f78138eb3dacf491b87ca619d2a91ba75d3
haskell-game/tiny-games-hs
snake-lemma-clean.hs
#!/usr/bin/env -S stack script --resolver=lts-20 --package ansi-terminal-game import Import type State = ( [Coords] -- ^ Snake body , Coords -- ^ Current direction , Coords -- ^ Next food ^ , Int -- ^ Score ) state0 :: State state0 = ([(12, x) | x <- [10..16]], (0,-1), (16,21), 99, 0) ...
null
https://raw.githubusercontent.com/haskell-game/tiny-games-hs/fe407ed6f920717ce3e725483b39a05596b1cf11/hackage/snake-lemma/snake-lemma-clean.hs
haskell
resolver=lts-20 --package ansi-terminal-game ^ Snake body ^ Current direction ^ Next food ^ Score
import Import type State = ^ ) state0 :: State state0 = ([(12, x) | x <- [10..16]], (0,-1), (16,21), 99, 0) main = playGame $ Game 12 state0 logic draw end end ((p@(y, x):snake), _, _, _, _) = y < 2 || y > 23 || x < 1 || x > 39 || p `elem` snake logic :: GEnv -> State -> Event -> State logic _ (snake@((y, x...
cd13fb6674a2652467bacbe4cdf96d50853e9dc88fc8db7c3153e423f1d12487
karamellpelle/grid
GridData.hs
grid is a game written in Haskell Copyright ( C ) 2018 -- -- This file is part of grid. -- -- grid is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or -- (at your optio...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/Game/Grid/GridData.hs
haskell
This file is part of grid. grid is free software: you can redistribute it and/or modify (at your option) any later version. grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN...
grid is a game written in Haskell Copyright ( C ) 2018 it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License module Game.Grid.GridData ( #ifdef GRID_FANC...
97939482c1a31ff00aa7199fd2840aa84fe596da4e840604855b364d0e706bc5
jrh13/hol-light
qbf.ml
(* ====================================================== *) (* Squolem proof reconstruction *) ( c ) Copyright , 2010 - 11 (* ====================================================== *) set_jrh_lexer;; let show_progress = ref false;; let show_timing = ref false;; let d...
null
https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/QBF/qbf.ml
ocaml
====================================================== Squolem proof reconstruction ====================================================== * all variables, i.e, variables in a formula and auxiliary variables from extensions * quantifiers prefix in bottom-up ordering * quantifiers must ...
( c ) Copyright , 2010 - 11 set_jrh_lexer;; let show_progress = ref false;; let show_timing = ref false;; let delete_qbf_tempfiles = ref true;; type quantifier = Existential of term | Universal of term;; let make_variable index = if index <= 0 then failwith "Variable of index 0 or lesser i...
3f25788fb18fa8239c29b2873bf0970568bdec787c19b9db0cb5f9ed2d7d909c
input-output-hk/cardano-sl
Lang.hs
-- | Language. module Lang ( module Lang.Value , module Lang.Argument , module Lang.Command , module Lang.DisplayError , module Lang.Interpreter , module Lang.Lexer , module Lang.Name , module Lang.Parser , module Lang.Syntax ) where import ...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/auxx/src/Lang.hs
haskell
| Language.
module Lang ( module Lang.Value , module Lang.Argument , module Lang.Command , module Lang.DisplayError , module Lang.Interpreter , module Lang.Lexer , module Lang.Name , module Lang.Parser , module Lang.Syntax ) where import Lang.Argumen...
b018f0c65256db96e32c62cb3e65c2ccb14eb6022bb78c09759a9af9d61a198e
pschachte/wybe
AliasAnalysis.hs
-- File : AliasAnalysis.hs Author : , Zed(Zijun ) Purpose : analysis for a single module Copyright : ( c ) 2018 - 2019 . All rights reserved . License : Licensed under terms of the MIT license . See the file -- : LICENSE in the root directory of this project. # LANGUAGE Lamb...
null
https://raw.githubusercontent.com/pschachte/wybe/7914ff3bd3649fb22b3e6d884f46ef95f6effb0d/src/AliasAnalysis.hs
haskell
File : AliasAnalysis.hs : LICENSE in the root directory of this project. The "AliasMap" records the relation between parameters of each procedure. for variables, it can be added to and removed from the map during analysis. something outside the procedure scope ("AliasByParam" / "MaybeAliasByParam")....
Author : , Zed(Zijun ) Purpose : analysis for a single module Copyright : ( c ) 2018 - 2019 . All rights reserved . License : Licensed under terms of the MIT license . See the file # LANGUAGE LambdaCase # module AliasAnalysis ( AliasMapLocal, AliasMapLocalItem(..), aliasSccBottomUp, c...
c8a6684ac32a148996f8e54740cbd4904ca726dc93348a4ad192904f0f559ad1
mark-watson/loving-common-lisp
rdf.lisp
(in-package #:kgcreator) (let ((*rdf-nodes-hash*)) (defun rdf-from-files (output-file-path text-and-meta-pairs) (setf *rdf-nodes-hash* (make-hash-table :test #'equal :size 200)) (print (list "==> rdf-from-files" output-file-path text-and-meta-pairs )) (with-open-file (str output-file-path ...
null
https://raw.githubusercontent.com/mark-watson/loving-common-lisp/32f6abf3d2e500baeffd15c085a502b03399a074/src/kgcreator/rdf.lisp
lisp
TBD parse JSON start code for rdf-from-files (output-file-path text-and-meta-pairs)
(in-package #:kgcreator) (let ((*rdf-nodes-hash*)) (defun rdf-from-files (output-file-path text-and-meta-pairs) (setf *rdf-nodes-hash* (make-hash-table :test #'equal :size 200)) (print (list "==> rdf-from-files" output-file-path text-and-meta-pairs )) (with-open-file (str output-file-path ...
d545501b656485d6b780e98491df8a564ad8c045f15a2960c4f645f4f5a7f8c1
omnyway-labs/chromex-shadow-template
background.cljs
(ns {{namespace}}.background (:require-macros [chromex.support :refer [runonce]]) (:require [{{namespace}}.background.core :as core])) (runonce (core/init!))
null
https://raw.githubusercontent.com/omnyway-labs/chromex-shadow-template/1a4569ad6024803186fabc4389307a13a769d96b/resources/clj/new/chromex_shadow_template/src/background/chromex_shadow_template/background.cljs
clojure
(ns {{namespace}}.background (:require-macros [chromex.support :refer [runonce]]) (:require [{{namespace}}.background.core :as core])) (runonce (core/init!))
2cead0ac8763a65c64dc77b085b5029ec7baf01b52786267048f7462c4074a1a
haskell-lisp/yale-haskell
ie-utils.scm
;;; This file contains utilities, globals, and macros used by the ;;; import-export system. used by the fixpoint iteration ;;; A group is a collection of related symbols. It is represented by a list of ( name , def ) pairs . The first element is the head ;;; of the group; the group is entered in the export ta...
null
https://raw.githubusercontent.com/haskell-lisp/yale-haskell/4e987026148fe65c323afbc93cd560c07bf06b3f/import-export/ie-utils.scm
scheme
This file contains utilities, globals, and macros used by the import-export system. A group is a collection of related symbols. It is represented of the group; the group is entered in the export table under the head. Data types and classes have the constructors or methods in the tail of the group. name of the ...
used by the fixpoint iteration by a list of ( name , def ) pairs . The first element is the head name of the head only . Groups for vars and synonyms have only the (tuple-2-1 (car x))) (tuple-2-2 (car x))) (define (make-group name entry . others) (if (null? others) (list (cons name entry)) ...
a9dce7446c964f05c88abb1b139f111b5c786c595b5ebf90fc6ed44e0ab94eba
vans163/ComSat
comsat_proxy_http.erl
-module(comsat_proxy_http). -compile(export_all).
null
https://raw.githubusercontent.com/vans163/ComSat/dd35515b6902586ef84d4572fe50fcd5bb4585b5/src/proxy/comsat_proxy_http.erl
erlang
-module(comsat_proxy_http). -compile(export_all).
d55cc165c93a82ecbe812d6e8c9fcac994404811b89b63b7e8dfb01f25009ea6
pgj/mirage-kfreebsd
time.ml
Lightweight thread library for * Module Lwt_mirage , based on Lwt_unix * Copyright ( C ) 2005 - 2008 * Laboratoire PPS - CNRS Université Paris Diderot * 2009 * Copyright ( C ) 2010 Anil Madhavapeddy * Copyright ( C ) 2012 * * This program is free software ; you c...
null
https://raw.githubusercontent.com/pgj/mirage-kfreebsd/0ff5b2cd7ab0975e3f2ee1bd89f8e5dbf028b102/packages/mirage-platform/lib/time.ml
ocaml
Lightweight thread library for * Module Lwt_mirage , based on Lwt_unix * Copyright ( C ) 2005 - 2008 * Laboratoire PPS - CNRS Université Paris Diderot * 2009 * Copyright ( C ) 2010 Anil Madhavapeddy * Copyright ( C ) 2012 * * This program is free software ; you c...
a794ac3568f24195fd558fc7c2edf07f155bdcdbe62f9cd7f1677536957ba810
inconvergent/cl-veq
array-print.lisp
(in-package :veq) (defun $print (a &key (dim 1) (start 0) n (s t)) (declare (simple-array a) (pos-int dim) (fixnum start)) "pretty print n, or all, rows from vector array of dim. start at row (start 0). negative start counts backwards from the last row use s to overrid output stream." (let* ((max-ind (length a)...
null
https://raw.githubusercontent.com/inconvergent/cl-veq/04386c4019e1f7a6824fc97640458232f426c32d/src/array-print.lisp
lisp
(in-package :veq) (defun $print (a &key (dim 1) (start 0) n (s t)) (declare (simple-array a) (pos-int dim) (fixnum start)) "pretty print n, or all, rows from vector array of dim. start at row (start 0). negative start counts backwards from the last row use s to overrid output stream." (let* ((max-ind (length a)...
a80e9977b725d8491927b567dc72aba16dd0f690b2e78017c5cb69bfd0a37f6d
bondy-io/bondy
bondy_cache.erl
%% ============================================================================= %% bondy_cache.erl - %% Copyright ( c ) 2016 - 2022 Leapsight . 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. %% ...
null
https://raw.githubusercontent.com/bondy-io/bondy/a1267e7e5526db24f278e12315020753f3168b44/apps/bondy/src/bondy_cache.erl
erlang
============================================================================= bondy_cache.erl - 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 COND...
Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(bondy_cache). -export([get/2]). -export([put/3]). -export([put/4]). -export([remove/2]). -spec ge...
661afc583961a0fa8ea9a3e8ebc2a451de82734eed5c45ce563bf8d4ff9d5329
achirkin/qua-kit
ExerciseEditor.hs
{-# OPTIONS_HADDOCK hide, prune #-} # LANGUAGE RecordWildCards # module Handler.Mooc.Admin.ExerciseEditor ( getAdminExerciseEditorR , getExerciseEditR , postAdminExercisesR , putAdminExerciseR , getExerciseImgR , getExerciseGeometryR , postExerciseAttachCriterionR , postExerciseDetachCri...
null
https://raw.githubusercontent.com/achirkin/qua-kit/9f859e2078d5f059fb87b2f6baabcde7170d4e95/apps/hs/qua-server/src/Handler/Mooc/Admin/ExerciseEditor.hs
haskell
# OPTIONS_HADDOCK hide, prune # update optionally update image, geometry files: create change links to use `onclick` so they work in reflex renderer: | renders data from supplied exercise or default values | render edit GUI
# LANGUAGE RecordWildCards # module Handler.Mooc.Admin.ExerciseEditor ( getAdminExerciseEditorR , getExerciseEditR , postAdminExercisesR , putAdminExerciseR , getExerciseImgR , getExerciseGeometryR , postExerciseAttachCriterionR , postExerciseDetachCriterionR ) where import Import h...
c96b6591ff0c5bba7ce18ec00609529f0c27d07c4ce82f82d356a18b811362bf
Javran/advent-of-code
Fixpoint.hs
module Javran.AdventOfCode.Fixpoint ( findFix, ) where import qualified Data.Containers as C import qualified Data.HashMap.Strict as HM import Data.Hashable import qualified Data.IntMap.Strict as IM import qualified Data.Map.Strict as M Fixpoint finding util . Use ` iterate ` to generate an infinite list o...
null
https://raw.githubusercontent.com/Javran/advent-of-code/676ef13c2f9d341cf7de0f383335a1cf577bd73d/src/Javran/AdventOfCode/Fixpoint.hs
haskell
return value indicates that current value `x`, tagged `j`, has been seen before with another tag `i`. # SPECIALIZE findFix :: Ord k => M.Map k Int -> [(Int, k)] -> ((Int, Int), (k, M.Map k Int)) # # SPECIALIZE findFix :: IM.IntMap Int -> [(Int, Int)] -> ((Int, Int), (Int, IM.IntMap Int)) #
module Javran.AdventOfCode.Fixpoint ( findFix, ) where import qualified Data.Containers as C import qualified Data.HashMap.Strict as HM import Data.Hashable import qualified Data.IntMap.Strict as IM import qualified Data.Map.Strict as M Fixpoint finding util . Use ` iterate ` to generate an infinite list o...
c5d8793981d71d125566ac1798020354a5ed416b65b69b434a3a42d54ed9e7f3
gwathlobal/CotD
window-main-menu.lisp
(in-package :cotd) (defclass main-menu-window (window) ((cur-sel :initform 0 :accessor main-menu-window/cur-sel :type fixnum) (menu-items :initform () :accessor main-meni-window/menu-items :type list) (menu-strs :initform () :accessor main-menu-window/menu-strs :type list) (menu-funcs :initform () :ac...
null
https://raw.githubusercontent.com/gwathlobal/CotD/d01ef486cc1d3b21d2ad670ebdb443e957290aa2/src/windows/window-main-menu.lisp
lisp
drawing selection list escape - quit enter - select
(in-package :cotd) (defclass main-menu-window (window) ((cur-sel :initform 0 :accessor main-menu-window/cur-sel :type fixnum) (menu-items :initform () :accessor main-meni-window/menu-items :type list) (menu-strs :initform () :accessor main-menu-window/menu-strs :type list) (menu-funcs :initform () :ac...
e1943978a9fd347737cc79fe9b00523c8b916f88cd0548f1216b0d3789d5d95d
mchakravarty/lazy-lambda
Random.hs
module Random where import System.Random import System.IO.Unsafe randomNums :: (Random a, Num a) => [a] randomNums = unsafePerformIO $ randoms <$> newStdGen
null
https://raw.githubusercontent.com/mchakravarty/lazy-lambda/ccdde0d3e54525ef580d483a28562985519224aa/LazyLambda.hsproj/Random.hs
haskell
module Random where import System.Random import System.IO.Unsafe randomNums :: (Random a, Num a) => [a] randomNums = unsafePerformIO $ randoms <$> newStdGen
eea311b402d31a367843c0f262aac874d3081a64716d9c2879ffe8d1f45f8628
coccinelle/coccinelle
comment_annotater_c.ml
* * Copyright ( C ) 2010 , University of Copenhagen DIKU and INRIA . * Copyright ( C ) 2009 , University of Urbana Champaign . * * This program is free software ; you can redistribute it and/or * modify it under the terms of the GNU General Public License ( GPL ) * version 2 as published by the...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/parsing_c/comment_annotater_c.ml
ocaml
*************************************************************************** Prelude *************************************************************************** A trimmed down version of my comment_annotater of CComment. In CComment * I was also trying to associate the comment to the relevant entity, not * just the...
* * Copyright ( C ) 2010 , University of Copenhagen DIKU and INRIA . * Copyright ( C ) 2009 , University of Urbana Champaign . * * This program is free software ; you can redistribute it and/or * modify it under the terms of the GNU General Public License ( GPL ) * version 2 as published by the...
91bd5e26058e6d87c1d2db2c0bb6057433fa272c807163b3a6c6c955834703e8
UnixJunkie/dokeysto
utls.ml
type filename = string let with_in_file (fn: filename) (f: in_channel -> 'a): 'a = let input = open_in_bin fn in let res = f input in close_in input; res let with_out_file (fn: filename) (f: out_channel -> 'a): 'a = let output = open_out_bin fn in let res = f output in close_out output; res (* marsha...
null
https://raw.githubusercontent.com/UnixJunkie/dokeysto/48b0486769d127f60d523cce89db001179ced92b/src/utls.ml
ocaml
marshal x to file unmarshal x from file
type filename = string let with_in_file (fn: filename) (f: in_channel -> 'a): 'a = let input = open_in_bin fn in let res = f input in close_in input; res let with_out_file (fn: filename) (f: out_channel -> 'a): 'a = let output = open_out_bin fn in let res = f output in close_out output; res let save ...
62efb55041395d1ac7c8d885234b22694e2e4a31bdc50cca34e5c67f745984eb
anurudhp/CPHaskell
a.hs
import Control.Arrow ((>>>)) import qualified Data.ByteString.Lazy.Char8 as C import Data.Maybe (fromMaybe) chunksOf :: Int -> [a] -> [[a]] chunksOf _ [] = [] chunksOf k xs = let (hs, ts) = splitAt k xs in hs : chunksOf k ts main :: IO () main = interact $ lines >>> drop 1 >>> chunksOf 4 >>> map (drop 1 >>> map (word...
null
https://raw.githubusercontent.com/anurudhp/CPHaskell/67a55ab34c0365d42fb092c2378bc3972186970c/contests/codeforces/1547/a.hs
haskell
import Control.Arrow ((>>>)) import qualified Data.ByteString.Lazy.Char8 as C import Data.Maybe (fromMaybe) chunksOf :: Int -> [a] -> [[a]] chunksOf _ [] = [] chunksOf k xs = let (hs, ts) = splitAt k xs in hs : chunksOf k ts main :: IO () main = interact $ lines >>> drop 1 >>> chunksOf 4 >>> map (drop 1 >>> map (word...
630499d4dd85d47460ff33cd6d9e5b89ec3b3334a5c70e88a0b01f8a29339a7d
YoshikuniJujo/funpaala
growable1.hs
class Growable g where grow :: g -> Maybe g add :: g -> g -> g growingSum :: g -> g growingSum g = case grow g of Just g' -> g `add` growingSum g' Nothing -> g instance Growable Integer where grow n | n < 100 = Just $ n + 1 | otherwise = Nothing add = (+) growingSum n = (100 - n + 1) * (100 + n) `div` 2
null
https://raw.githubusercontent.com/YoshikuniJujo/funpaala/5366130826da0e6b1180992dfff94c4a634cda99/samples/26_type_class/growable1.hs
haskell
class Growable g where grow :: g -> Maybe g add :: g -> g -> g growingSum :: g -> g growingSum g = case grow g of Just g' -> g `add` growingSum g' Nothing -> g instance Growable Integer where grow n | n < 100 = Just $ n + 1 | otherwise = Nothing add = (+) growingSum n = (100 - n + 1) * (100 + n) `div` 2
17d716d604ff36d5b80d8653de03af4d7af6705cd4dff655ff973083b3032a85
aiya000/haskell-examples
Calc.hs
import qualified Data.Char as C calc :: String -> Int calc expr = let zero = C.ord '0' in foldl1 (\ac n -> if numIsOperator n then numToOperator n $ ac-zero else ac (n-zero)) $ strToIntList expr where numToOperator i = let a = (C.ord '+') b = (C.ord '-') c = (C.ord '*') ...
null
https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Room/Program/Calc.hs
haskell
import qualified Data.Char as C calc :: String -> Int calc expr = let zero = C.ord '0' in foldl1 (\ac n -> if numIsOperator n then numToOperator n $ ac-zero else ac (n-zero)) $ strToIntList expr where numToOperator i = let a = (C.ord '+') b = (C.ord '-') c = (C.ord '*') ...
772ac2a41c6ee95b66033a0ae90006a25577b46c66fd5560cfc8c57eca59bf8e
jwiegley/categorical
NonDet.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE PartialTypeSignatures # # LANGUAGE PatternSynonyms # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriv...
null
https://raw.githubusercontent.com/jwiegley/categorical/dc2b5e55a3c953db97d035b6c7768d46de23e9f9/src/Categorical/NonDet.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes # # OPTIONS_GHC -fplugin=ConCat.Plugin # # OPTIONS_GHC -fsimpl-tick-factor=1000 # # OPTIONS_GHC -fexpose-all-unfoldings # # OPTIONS_GHC -Wno-name-shadowing # # OPTIONS_GHC -Wno-unused-local-binds # # OPTIONS_GHC -Wno-unused-imports # # OPTIONS_GHC -Wno-name-shadowing # # OPTIONS...
# LANGUAGE DataKinds # # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PartialTypeSignatures # # LANGUAGE PatternSynonyms # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TupleSections # # LANGUAGE TypeApp...
35f37b022457026de2f34fcd7da27b5b4a3978a6d4174fb95dbc3e3507a03be4
dgiot/dgiot
dgiot_bridge_loader.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. 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...
null
https://raw.githubusercontent.com/dgiot/dgiot/a6b816a094b1c9bd024ce40b8142375a0f0289d8/apps/dgiot_bridge/src/dgiot_bridge_loader.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 ...
Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(dgiot_bridge_loader). -author("kenneth"). -include_lib("dgiot/include/logger.hrl"). -i...
653059763a9124154a4c471db69e6d3652ba990903aa3f168f1a76e2472bc4b6
danidiaz/really-small-backpack-example
Siggy.hs
module Bar.Siggy where barRequiresThis :: Int barRequiresThis = 0
null
https://raw.githubusercontent.com/danidiaz/really-small-backpack-example/50c50649c46a7f06f2eadde106f3502320931fdd/lesson4-signature-thinning/lib-impl/Bar/Siggy.hs
haskell
module Bar.Siggy where barRequiresThis :: Int barRequiresThis = 0
7c59bb0cb27257757934b88d8337730790a05b1d9cdb56d4b93243322765d31a
HugoPeters1024/hs-sleuth
DecodeUtf8.hs
# LANGUAGE ForeignFunctionInterface # # OPTIONS_GHC -fno - warn - deprecations # | Test decoding of UTF-8 -- -- Tested in this benchmark: -- * Decoding bytes using UTF-8 -- -- In some tests: -- -- * Taking the length of the result -- -- * Taking the init of the result -- -- The latter are used for testing stream f...
null
https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/91aa2806ea71b7a26add3801383b3133200971a5/test-project/text-nofusion/benchmarks/haskell/Benchmarks/DecodeUtf8.hs
haskell
Tested in this benchmark: In some tests: * Taking the length of the result * Taking the init of the result The latter are used for testing stream fusion.
# LANGUAGE ForeignFunctionInterface # # OPTIONS_GHC -fno - warn - deprecations # | Test decoding of UTF-8 * Decoding bytes using UTF-8 module Benchmarks.DecodeUtf8 ( initEnv , benchmark , benchmarkASCII ) where import Data.ByteString.Lazy.Internal (ByteString(..)) import Test.Tasty.Bench import qu...
3a532076f324e7b452e77445425743ec5c100995a975ca44e846ee678034414e
kongeor/evolduo-app
news.clj
(ns evolduo-app.controllers.news (:require [evolduo-app.model.news :as model] [evolduo-app.request :as req] [evolduo-app.response :as r] [evolduo-app.schemas :as schemas] [evolduo-app.views.news :as view])) (defn news-list [req] (r/render-html view/news-list req)) ...
null
https://raw.githubusercontent.com/kongeor/evolduo-app/e97e389e3ce7edf06a4e6fc0ad4de8a273ef229f/src/evolduo_app/controllers/news.clj
clojure
(ns evolduo-app.controllers.news (:require [evolduo-app.model.news :as model] [evolduo-app.request :as req] [evolduo-app.response :as r] [evolduo-app.schemas :as schemas] [evolduo-app.views.news :as view])) (defn news-list [req] (r/render-html view/news-list req)) ...
2a341748083edc9ba3d82a91010c05c323ab4d2b67178690b7f6a847b95ae9fa
LightAndLight/sized-hkts
Main.hs
module Main where import Control.Monad (when) import Data.Foldable (for_) import qualified Data.Text as Text (pack) import qualified Data.Text.IO as Text (readFile) import qualified Data.Text.Lazy.IO as Lazy (writeFile) import qualified System.Directory as Directory import System.FilePath ((<.>)) import qualified Syst...
null
https://raw.githubusercontent.com/LightAndLight/sized-hkts/d12fedb34e7ea82be66f200e9ecf7fcf611cce53/examples/Main.hs
haskell
module Main where import Control.Monad (when) import Data.Foldable (for_) import qualified Data.Text as Text (pack) import qualified Data.Text.IO as Text (readFile) import qualified Data.Text.Lazy.IO as Lazy (writeFile) import qualified System.Directory as Directory import System.FilePath ((<.>)) import qualified Syst...
6b970a2c06f2e0ba758962c191ea92014072cc812dee32f073d7c9f33debcb93
ndmitchell/catch
Back.hs
module Analyse.Back(backs) where import Yhc.Core import Analyse.Req import Analyse.Info import Data.Proposition import Data.Maybe type Property = CoreFuncName -> Constraint -> IO (PropReq Int) backs :: Property -> PropReq CoreExpr -> IO (PropReq CoreVarName) backs prop x = do info <- getInfo res <...
null
https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/catch_1/Analyse/Back.hs
haskell
module Analyse.Back(backs) where import Yhc.Core import Analyse.Req import Analyse.Info import Data.Proposition import Data.Maybe type Property = CoreFuncName -> Constraint -> IO (PropReq Int) backs :: Property -> PropReq CoreExpr -> IO (PropReq CoreVarName) backs prop x = do info <- getInfo res <...
7c7d1500011cc7590544d155640c3fa5260367f6ab919355dbf492563aa347fb
thheller/code-splitting-clojurescript
app.cljs
(ns demo.app (:require ["react" :as react] [reagent.core :as r] [demo.env :as env] [demo.util :refer (lazy-component)])) (defonce root-el (js/document.getElementById "root")) (def product-detail (lazy-component demo.components.product-detail/root)) (def product-listing (lazy-component demo.component...
null
https://raw.githubusercontent.com/thheller/code-splitting-clojurescript/c9e1e9340c45969f3fc5b515fb9d095f28595c24/src/main/demo/app.cljs
clojure
(ns demo.app (:require ["react" :as react] [reagent.core :as r] [demo.env :as env] [demo.util :refer (lazy-component)])) (defonce root-el (js/document.getElementById "root")) (def product-detail (lazy-component demo.components.product-detail/root)) (def product-listing (lazy-component demo.component...
aa564e6d2fcf486039a1dafd5daa31d9ad5ac827a467aa0f91e534598f4a7724
Chris00/root1d
difficult.ml
Some functions for which roots are difficult to compute . Inspired from examples in , R. ( 1973 ) Algorithms for Minimization without Derivatives . Englewood Cliffs , NJ : Prentice - Hall . from examples in Brent, R. (1973) Algorithms for Minimization without Derivatives. Englewood Cliffs, NJ: Pren...
null
https://raw.githubusercontent.com/Chris00/root1d/1add2ff1bdf3bddbbcaebb41346d92c150600db1/tests/difficult.ml
ocaml
cont. extension
Some functions for which roots are difficult to compute . Inspired from examples in , R. ( 1973 ) Algorithms for Minimization without Derivatives . Englewood Cliffs , NJ : Prentice - Hall . from examples in Brent, R. (1973) Algorithms for Minimization without Derivatives. Englewood Cliffs, NJ: Pren...
6fb076b4cad0d546c9ac2179c7d318756bfa08737988b616586d99535aacdb54
Heasummn/Crab-ML
multiTable.mli
open Batteries type 'a t = (Symbol.t, 'a) MultiMap.t val lookup : Symbol.t -> 'a t -> 'a BatSet.t option val add : Symbol.t -> 'a -> 'a t -> 'a t val of_list : (Symbol.t * 'a) list -> 'a t
null
https://raw.githubusercontent.com/Heasummn/Crab-ML/45a79373a620878b9c24464a7e009ecf3ea7f908/src/CrabEnv/multiTable.mli
ocaml
open Batteries type 'a t = (Symbol.t, 'a) MultiMap.t val lookup : Symbol.t -> 'a t -> 'a BatSet.t option val add : Symbol.t -> 'a -> 'a t -> 'a t val of_list : (Symbol.t * 'a) list -> 'a t
7afbe60256bd0df75de8247ce6ec68271cdab3db16111dd63b0eb1fad6d8a228
BillHallahan/G2
Test33.hs
module Combined (f) where @ f : : { x : Int | 0 < = x & & x < = 2 } - > { x : Int | -6 < = x & & x < = 0 } @ f :: Int -> Int f x = n x n :: Int -> Int n x | x == 2 = r | otherwise = -2 r :: Int r = -5
null
https://raw.githubusercontent.com/BillHallahan/G2/21c648d38c380041a9036d0e375ec1d54120f6b4/tests_lh/test_files/Pos/Test33.hs
haskell
module Combined (f) where @ f : : { x : Int | 0 < = x & & x < = 2 } - > { x : Int | -6 < = x & & x < = 0 } @ f :: Int -> Int f x = n x n :: Int -> Int n x | x == 2 = r | otherwise = -2 r :: Int r = -5
e45ca236fd60dc8c7f2230ba456ddcc1aec024a819a34bd782410b2d31e3e974
clojure/core.typed
ann_form.clj
Copyright ( c ) , contributors . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;...
null
https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/src/clojure/core/typed/checker/check/special/ann_form.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) , contributors . (ns clojure.core.typed.checker.check.special.ann-form (:require [clojure.core.typed.util-vars :as vs] [clojure.core.typed.ast-utils :as ast-u] [clojure.core.typed.checker.object-rep :as obj] [clojure.core.typed.checker.jvm.parse-unparse ...
7026699f3d54461654b9ed1b912151ff1b54b88f5acfa0df536271e2f1b02c16
eponai/sulolive
database.cljc
(ns eponai.common.database (:require [taoensso.timbre :refer [error debug trace info warn]] [clojure.string :as str] [clojure.set :as set] [clojure.walk :as walk] [datascript.db] [om.next :as om] #?(:clj [datomic.api :as datomic]) [datascript.core :as datascript] [inflections.c...
null
https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/src/eponai/common/database.cljc
clojure
Implement the protocols If there's a singular version of s, it's not empty and s starts with it, then we can replace s with the singular version. Otherwise, join both. the entities it matches anyway. Adds where-clauses last because we want to filter all we can before we start scanning the [e a v]s The :vaet ind...
(ns eponai.common.database (:require [taoensso.timbre :refer [error debug trace info warn]] [clojure.string :as str] [clojure.set :as set] [clojure.walk :as walk] [datascript.db] [om.next :as om] #?(:clj [datomic.api :as datomic]) [datascript.core :as datascript] [inflections.c...
ca03085b6f38e449acf2393642b10215b2c8ae441cd744dadb785a41f93e0d69
rtrusso/scp
disp2.scm
(display 3628) (newline)
null
https://raw.githubusercontent.com/rtrusso/scp/2051e76df14bd36aef81aba519ffafa62b260f5c/src/tests/disp2.scm
scheme
(display 3628) (newline)
1b74918aac5815ee4ad2addc59770c548afc9c3b6dc83b99dd364b0a3ecf7caa
emirozer/beamwhale
linux.erl
-module(linux). -compile(export_all). sys_unshare() -> % kernel/fork.c 272. %% linux/sched.h clone_vm() -> hex_to_int(<<"0x00000100">>). % set if VM shared between processes clone_fs() -> hex_to_int(<<"0x00000200">>). % set if fs info shared between processes clone_files() -> hex_to_int(<<"0x00000400">>). % ...
null
https://raw.githubusercontent.com/emirozer/beamwhale/1824910de0cb5cdac929a9000e049339eb95418d/src/linux.erl
erlang
kernel/fork.c linux/sched.h set if VM shared between processes set if fs info shared between processes set if open files shared between processes set if signal handlers and blocked signals shared set if we want to let tracing continue on the child too set if we want to have the same parent as the cloner Same t...
-module(linux). -compile(export_all). 272. set if the parent wants the child to wake it up on create a new TLS for the child New cgroup namespace New ipc namespace Ignore suid and sgid bits Alter flags of a mounted FS Allow mandatory locks on an FS ms_bind() -> 4096. ms_move() -> 8192. ms_rec()...
d28dcb2b9be28d83c0ac69f178890f95d67ce200ad4f93f68864c45d2663c3ab
PrecursorApp/precursor
team.cljs
(ns frontend.team (:require [frontend.db :as db] [frontend.sente :as sente] [frontend.utils :as utils])) (defn setup-team-db [app-state] (db/setup-listener! (:team-db @app-state) "team-listener" (:comms @app-state) :team/tran...
null
https://raw.githubusercontent.com/PrecursorApp/precursor/30202e40365f6883c4767e423d6299f0d13dc528/src-cljs/frontend/team.cljs
clojure
(ns frontend.team (:require [frontend.db :as db] [frontend.sente :as sente] [frontend.utils :as utils])) (defn setup-team-db [app-state] (db/setup-listener! (:team-db @app-state) "team-listener" (:comms @app-state) :team/tran...
6e42e350b4f1b065e5c0e1f7b2d2ff402c5fce0cd0213f2457aad4a4eda7389f
carp-lang/Carp
Reify.hs
# LANGUAGE FlexibleInstances # -- | Module Reify provides a typeclass and instances for turning internal compiler types and data into corresponding representations in the Carp language . module Reify where import Info import Obj import System.FilePath import Types | The Reifiable class ranges over internal Carp ...
null
https://raw.githubusercontent.com/carp-lang/Carp/e1943b29a9a47f4da38136d2c4434adf85f22a95/src/Reify.hs
haskell
| Module Reify provides a typeclass and instances for turning internal compiler types and data into Show on strings results in a symbol that includes quotes "" This function is the same as symbol, for string literals. Types
# LANGUAGE FlexibleInstances # corresponding representations in the Carp language . module Reify where import Info import Obj import System.FilePath import Types | The Reifiable class ranges over internal Carp compiler types that may have corresponding representations in Carp itself . class Reifiable a where ...
30af39a79d2a6b7cbb07f4d2f04f57829ab620aacf8e713aa480e5c4c5c65b12
wdebeaum/step
umbrella.lisp
;;;; ;;;; w::umbrella ;;;; (define-words :pos W::n :words ( (w::umbrella (senses ( LF - PARENT ONT::attire ) (LF-PARENT ONT::personal-item) (meta-data :origin caloy3 :entry-date 20070330 :change-date nil :comments nil) (TEMPL count-PRED-TEMPL) ) ) ) ))
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/umbrella.lisp
lisp
w::umbrella
(define-words :pos W::n :words ( (w::umbrella (senses ( LF - PARENT ONT::attire ) (LF-PARENT ONT::personal-item) (meta-data :origin caloy3 :entry-date 20070330 :change-date nil :comments nil) (TEMPL count-PRED-TEMPL) ) ) ) ))
1ff2ed530554a2abe4d0c183d5a412428592b64485a3301b7bbc86e6fb044b10
BinaryAnalysisPlatform/bap
bap_project.mli
open Bap_knowledge open Bap_core_theory open Core_kernel[@@warning "-D"] open Regular.Std open Bap_future.Std open Bap_types.Std open Bap_image_std open Bap_disasm_std open Bap_sema.Std type t type project = t type library type pass [@@deriving sexp_of] type input type state [@@deriving bin_io] type second = float va...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/14847778f45dc6174d72a51ecc89fd27195becdf/lib/bap/bap_project.mli
ocaml
open Bap_knowledge open Bap_core_theory open Core_kernel[@@warning "-D"] open Regular.Std open Bap_future.Std open Bap_types.Std open Bap_image_std open Bap_disasm_std open Bap_sema.Std type t type project = t type library type pass [@@deriving sexp_of] type input type state [@@deriving bin_io] type second = float va...
ec9266911234c3cfa40013eb93e3c020bf5462f8572d59a94e818692d8f4be13
ceramic/ceramic
window.lisp
(in-package :cl-user) (defpackage ceramic-test.window (:use :cl :fiveam) (:import-from :ceramic.driver :*driver*) (:export :window)) (in-package :ceramic-test.window) (def-suite window :description "Window tests.") (in-suite window) (test window (finishes (ceramic.driver:start *driver*))...
null
https://raw.githubusercontent.com/ceramic/ceramic/5d81e2bd954440a6adebde31fac9c730a698c74b/t/window.lisp
lisp
(in-package :cl-user) (defpackage ceramic-test.window (:use :cl :fiveam) (:import-from :ceramic.driver :*driver*) (:export :window)) (in-package :ceramic-test.window) (def-suite window :description "Window tests.") (in-suite window) (test window (finishes (ceramic.driver:start *driver*))...
6ead340c8466c16c52e04c73ae9efee3ba1f43bb5ed97561c52006eb141a9e6b
fortytools/holumbus
FileHandlingTest.hs
-- ---------------------------------------------------------------------------- | Module : Copyright : Copyright ( C ) 2008 License : MIT Maintainer : ( ) Stability : experimental Portability : portable Version : 0.1 Module : Copyright : Copyright (C) 2...
null
https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/storage/Examples/Utils/Filehandling/FileHandlingTest.hs
haskell
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
| Module : Copyright : Copyright ( C ) 2008 License : MIT Maintainer : ( ) Stability : experimental Portability : portable Version : 0.1 Module : Copyright : Copyright (C) 2008 Stefan Schmidt License : MIT Maintainer : Stefan Schmidt () Stabil...
e4f6b5b885bb3dbd0af028a1921700976b1facc48b85512a5d39a4ae97bbc297
KULeuven-CS/CPL
examples.rkt
#lang eopl (require "syntax.rkt") (require "CHECKED.rkt") (require "checker.rkt") unpair(x y pair(1 , 2 ) x ) (define pair1 (a-program (unpair-exp 'x 'y (pair-exp (const-exp 1) (const-exp 2)) (var-exp 'x)))) (define (test p) (begin (display "PROGRAM:\n") (display (program->string p)) (display "\n...
null
https://raw.githubusercontent.com/KULeuven-CS/CPL/0c62cca832edc43218ac63c4e8233e3c3f05d20a/chapter7/CHECKED-PAIRS/examples.rkt
racket
#lang eopl (require "syntax.rkt") (require "CHECKED.rkt") (require "checker.rkt") unpair(x y pair(1 , 2 ) x ) (define pair1 (a-program (unpair-exp 'x 'y (pair-exp (const-exp 1) (const-exp 2)) (var-exp 'x)))) (define (test p) (begin (display "PROGRAM:\n") (display (program->string p)) (display "\n...
5ecc3115434082265b6e761a403edac12fa6fef99e473239b0d1bbb8de6d6778
zxymike93/SICP
325.rkt
#lang sicp (define (make-table) (list '*table*)) (define (assoc key records) (cond [(not (pair? records)) #f] [(equal? key (caar records)) (car records)] [else (assoc key (cdr records))])) (define (lookup table keys) (let ([record (assoc (car keys) (cdr table))]) (c...
null
https://raw.githubusercontent.com/zxymike93/SICP/9d8e84d6a185bf4d7f28c414fc3359741384beb5/chapter3/325.rkt
racket
tests
#lang sicp (define (make-table) (list '*table*)) (define (assoc key records) (cond [(not (pair? records)) #f] [(equal? key (caar records)) (car records)] [else (assoc key (cdr records))])) (define (lookup table keys) (let ([record (assoc (car keys) (cdr table))]) (c...
fa0010810e030137b3bbd8c2f4d3c0fcb9d30c0d9b28e2ce8a25fa913ae9d9aa
xtdb/xtdb
dashboards.clj
(ns dashboards (:require [clojure.walk :as w] [clojure.string :as str]) (:import [software.amazon.awscdk.core App Stack$Builder Environment$Builder RemovalPolicy Duration] [software.amazon.awscdk.services.cloudwatch Dashboard$Builder GraphWidget$Builder AlarmWidget$Bui...
null
https://raw.githubusercontent.com/xtdb/xtdb/e2f51ed99fc2716faa8ad254c0b18166c937b134/bench/cdk/src/dashboards.clj
clojure
default label metric as time
(ns dashboards (:require [clojure.walk :as w] [clojure.string :as str]) (:import [software.amazon.awscdk.core App Stack$Builder Environment$Builder RemovalPolicy Duration] [software.amazon.awscdk.services.cloudwatch Dashboard$Builder GraphWidget$Builder AlarmWidget$Bui...
ff68e2f25139664feb2879193ad07e8fec151b515d6dcdd1e9634cb3789667b7
blamario/grampa
Issue23.hs
# LANGUAGE TemplateHaskell # module Issue23 (test) where import Data.Functor.Identity import Data.Functor.Classes import qualified Rank2 import qualified Rank2.TH import Test.Tasty (TestTree) import Test.Tasty.HUnit (testCase, assertEqual) data Stm r = Unit | ExpStmt (r Int) (Exp r) data Exp r = Nil | Cons (r Bool)...
null
https://raw.githubusercontent.com/blamario/grampa/e2a082dacdbc38da54742f75ce13d0a95009741b/rank2classes/test/Issue23.hs
haskell
# LANGUAGE TemplateHaskell # module Issue23 (test) where import Data.Functor.Identity import Data.Functor.Classes import qualified Rank2 import qualified Rank2.TH import Test.Tasty (TestTree) import Test.Tasty.HUnit (testCase, assertEqual) data Stm r = Unit | ExpStmt (r Int) (Exp r) data Exp r = Nil | Cons (r Bool)...
0922e08f602ede0042aa6684d2c5b196813abe80b5bbfe0639a46e7c78a7325d
OdonataResearchLLC/weyl
quotient-fields.lisp
-*- Mode : Lisp ; Package : ; ; Lowercase : T ; Syntax : Common - Lisp -*- ;;; =========================================================================== ;;; Quotient Field Routines ;;; =========================================================================== ( c ) Copyright 1989 , 1993 Cornell University...
null
https://raw.githubusercontent.com/OdonataResearchLLC/weyl/299898c075795a7fb0b06907e6db13158e06b686/quotient-fields.lisp
lisp
Package : ; ; Lowercase : T ; Syntax : Common - Lisp -*- =========================================================================== Quotient Field Routines =========================================================================== the functions they call are defined. (make-rational-numbers)) (get-rati...
( c ) Copyright 1989 , 1993 Cornell University quotient - fields.lisp , v 1.10 1995/05/24 17:42:10 rz Exp (in-package :weyli) DELETE ( make::adjust - version - numbers " 1.10 " ) (defgeneric make-quotient-field (field) (:documentation "The purpose of this method is unknown.") (:method ((ring field)) r...
1a1ff756dbb37bf29d6770c9e28c5bd83cfa358eeca215919f7b5073f8b15ef0
jspahrsummers/ScrumBut
Settings.hs
-- | Settings are centralized, as much as possible, into this file. This -- includes database connection settings, static file locations, etc. In addition , you can configure a number of different aspects of Yesod by overriding methods in the Yesod typeclass . That instance is declared in the Foundation.hs file ....
null
https://raw.githubusercontent.com/jspahrsummers/ScrumBut/4e2a8dce520b713c4c618c085123075b5b7bed4d/Settings.hs
haskell
| Settings are centralized, as much as possible, into this file. This includes database connection settings, static file locations, etc. | Runtime settings to configure this application. These settings can be loaded from various sources: defaults, environment variables, config files, theoretically even a database....
In addition , you can configure a number of different aspects of Yesod by overriding methods in the Yesod typeclass . That instance is declared in the Foundation.hs file . module Settings where import ClassyPrelude.Yesod import Control.Exception (throw) import Data.Aeson (Result (..), ...
90f7157b77108c547d3faf3c0aa2c1276fb5f4b88fb92d5f16c265cf006277ec
gotthardp/lorawan-server
lorawan_admin_connections.erl
% Copyright ( c ) 2016 - 2019 < > % All rights reserved. Distributed under the terms of the MIT License . See the LICENSE file . % -module(lorawan_admin_connections). -export([init/2]). -export([allowed_methods/2]). -export([is_authorized/2]). -export([forbidden/2]). -export([content_types_provided/2]). -export...
null
https://raw.githubusercontent.com/gotthardp/lorawan-server/1a5c0f2f4d8238a54a326c57a5eb0e6015821b1d/src/lorawan_admin_connections.erl
erlang
All rights reserved. end of file
Copyright ( c ) 2016 - 2019 < > Distributed under the terms of the MIT License . See the LICENSE file . -module(lorawan_admin_connections). -export([init/2]). -export([allowed_methods/2]). -export([is_authorized/2]). -export([forbidden/2]). -export([content_types_provided/2]). -export([content_types_accepted/2]...
7c5ec77af65675c0e9c537cd687ee607293b3327ba77ff06267c28a84ebd3615
jafingerhut/cljol
project.clj
(defproject cljol "0.3.0" :description "Analyze Java objects in memory using the Java Object Layout library" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :source-paths ["src/clj"] :dependencies [[org.clojure/clojure "1.10.1"] [com.fingerhutpress.cljol_jvm_sup...
null
https://raw.githubusercontent.com/jafingerhut/cljol/2b0eb2b6ec3197434ede3adbd0a13d4b53c06dd0/project.clj
clojure
"-XX:+PrintGC" "-XX:+PrintGCDetails" "-Djol.tryWithSudo=true"
(defproject cljol "0.3.0" :description "Analyze Java objects in memory using the Java Object Layout library" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :source-paths ["src/clj"] :dependencies [[org.clojure/clojure "1.10.1"] [com.fingerhutpress.cljol_jvm_sup...
b73fa76e8f3d5d11b05349f4b5cba15428398a98d329315da99d3901f818a053
shayan-najd/NativeMetaprogramming
T11947a.hs
# LANGUAGE TypeApplications , ScopedTypeVariables # module T11947 where theFloatDigits :: forall a. RealFloat a => Int -- The type is ambiguous, despite potential defaulting theFloatDigits = floatDigits (undefined @_ @a)
null
https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_fail/T11947a.hs
haskell
The type is ambiguous, despite potential defaulting
# LANGUAGE TypeApplications , ScopedTypeVariables # module T11947 where theFloatDigits :: forall a. RealFloat a => Int theFloatDigits = floatDigits (undefined @_ @a)
1816ac82dad800f2897c3d94150df6410c5c2e44b3806300279ed2b17cf84c04
fulcro-legacy/fulcro-incubator
spec_helpers.cljc
(ns fulcro.incubator.spec-helpers "A (temporary) port of ghostwheel without deps, and with clj support. Do NOT use this. New versions of ghostwheel are sufficient, and there is no need for this anymore." #?(:cljs (:require-macros fulcro.incubator.spec-helpers)) (:require [cljs.env] [clojure.test] ...
null
https://raw.githubusercontent.com/fulcro-legacy/fulcro-incubator/72885fcc944e16bf98aa42b5d1e518c0ce4574db/src/main/fulcro/incubator/spec_helpers.cljc
clojure
It doesn't actually matter what these are bound to, they are stripped by the macros they're used in and never end up in the final code. This is just so they can be used without '=> cannot be resolved' errors in the IDE. These are lifted straight from clojure.core.specs.alpha, because it didn't seem possible to acc...
(ns fulcro.incubator.spec-helpers "A (temporary) port of ghostwheel without deps, and with clj support. Do NOT use this. New versions of ghostwheel are sufficient, and there is no need for this anymore." #?(:cljs (:require-macros fulcro.incubator.spec-helpers)) (:require [cljs.env] [clojure.test] ...
e4ab140ac7bc329547082832b364077ce62a56c20ac5a59737469085b186ce7b
spwhitton/consfigurator
pgp.lisp
(in-package :consfigurator/tests) (named-readtables:in-readtable :consfigurator) (in-consfig "consfigurator/tests") (defun populate-data-pgp () "Invoked by test runner before data source is registered." (data.pgp:set-data *test-pgp-file* "_secrets" "test" "this is a sekrit") (data.pgp:set-data *test-pgp-file* "h...
null
https://raw.githubusercontent.com/spwhitton/consfigurator/0f9255e48f1b51e2a61f2b327c74a4b1ca0416ca/tests/data/pgp.lisp
lisp
(in-package :consfigurator/tests) (named-readtables:in-readtable :consfigurator) (in-consfig "consfigurator/tests") (defun populate-data-pgp () "Invoked by test runner before data source is registered." (data.pgp:set-data *test-pgp-file* "_secrets" "test" "this is a sekrit") (data.pgp:set-data *test-pgp-file* "h...
08e35e9a11d71619b6e883bff6506f029dbf0f74eeb4e820859fea8f3205f7e7
jixiuf/helloerlang
count_char.erl
-module(count_char). -export([file/0]). -include_lib("eunit/include/eunit.hrl"). file()-> io:format("count char in a file .~n",[]), case file:open("count_char.erl",[read,raw,binary]) of {ok,Fh}-> scan_file(Fh,0,file:read(Fh,1024)); {error,Reason}-> io:format("fail to ope...
null
https://raw.githubusercontent.com/jixiuf/helloerlang/3960eb4237b026f98edf35d6064539259a816d58/io/count_char.erl
erlang
return the size of a file return {ok,Count} ,or {error,Reason} eunit:test([count_char]). count_char:file()
-module(count_char). -export([file/0]). -include_lib("eunit/include/eunit.hrl"). file()-> io:format("count char in a file .~n",[]), case file:open("count_char.erl",[read,raw,binary]) of {ok,Fh}-> scan_file(Fh,0,file:read(Fh,1024)); {error,Reason}-> io:format("fail to ope...
5fb87768117ef104316af8235023e677d09af7dab06713b965f8ae814440e7c6
coingaming/lnd-client
Verrpc_Fields.hs
This file was auto - generated from / verrpc.proto by the proto - lens - protoc program . # LANGUAGE ScopedTypeVariables , DataKinds , TypeFamilies , UndecidableInstances , GeneralizedNewtypeDeriving , MultiParamTypeClasses , FlexibleContexts , FlexibleInstances , PatternSynonyms , MagicHash , NoImplicitPrelude , Ba...
null
https://raw.githubusercontent.com/coingaming/lnd-client/ea507c6c5b1faf643fc68decf033b6ed93785ba4/src/Proto/Verrpc/Verrpc_Fields.hs
haskell
# OPTIONS_GHC -Wno-unused-imports# # OPTIONS_GHC -Wno-duplicate-exports#
This file was auto - generated from / verrpc.proto by the proto - lens - protoc program . # LANGUAGE ScopedTypeVariables , DataKinds , TypeFamilies , UndecidableInstances , GeneralizedNewtypeDeriving , MultiParamTypeClasses , FlexibleContexts , FlexibleInstances , PatternSynonyms , MagicHash , NoImplicitPrelude , Ba...
12af4d911b48d2df28eacca33e0c534b3075664c88891f5919e79f3c10f585f0
iij/lmq
lmq_hook_invalid.erl
-module(lmq_hook_invalid). -export([init/1, hooks/0, activate/1, deactivate/1]). -export([custom_hook/2]). init([]) -> ok. hooks() -> [custom_hook]. activate([N]) -> {ok, N}. deactivate(N) -> true = is_integer(N), ok. custom_hook(N, State) -> N + State.
null
https://raw.githubusercontent.com/iij/lmq/3f01c555af973a07a3f2b22ff95a2bc1c7930bc2/test/lmq_hook_invalid.erl
erlang
-module(lmq_hook_invalid). -export([init/1, hooks/0, activate/1, deactivate/1]). -export([custom_hook/2]). init([]) -> ok. hooks() -> [custom_hook]. activate([N]) -> {ok, N}. deactivate(N) -> true = is_integer(N), ok. custom_hook(N, State) -> N + State.
1cc453a14d117c9fe78a91d8a8c9d1d6c16f2a8d7816c0097541bd4f90d39740
co-log/co-log-polysemy
Main.hs
module Main (main) where import Prelude hiding (log) import Polysemy (Member, Sem, runM) import Colog.Core.IO (logStringStdout) import Colog.Polysemy (Log, log, runLogAction) example :: Member (Log String) r => Sem r () example = do log @String "First message..." log @String "Second message..." main :: IO...
null
https://raw.githubusercontent.com/co-log/co-log-polysemy/15d0f7472fe7f74541177e09feb67f0bc0ae9e86/example/Main.hs
haskell
module Main (main) where import Prelude hiding (log) import Polysemy (Member, Sem, runM) import Colog.Core.IO (logStringStdout) import Colog.Polysemy (Log, log, runLogAction) example :: Member (Log String) r => Sem r () example = do log @String "First message..." log @String "Second message..." main :: IO...
2cc12b1302ee729c70fee060542b8fbd652079e8adeb8a4c2d60159085046875
kenkeiras/EPC
tests.erl
-module(tests). -export([test/0]). try_to_install() -> try epc_dba:install([node()]) of ok -> ok catch _:{badmatch, {error, {_, {already_exists, _}}}} -> ok end. test1()-> master:getImages(["/"]). test()-> web_lib:init(), master:init(), indexer:start(), phash:start(),...
null
https://raw.githubusercontent.com/kenkeiras/EPC/1e903475e1e597fd602158df45c5805a764333bf/src/tests.erl
erlang
-module(tests). -export([test/0]). try_to_install() -> try epc_dba:install([node()]) of ok -> ok catch _:{badmatch, {error, {_, {already_exists, _}}}} -> ok end. test1()-> master:getImages(["/"]). test()-> web_lib:init(), master:init(), indexer:start(), phash:start(),...
afee85423cdaf2db576554c9b9adeb024db84f0c73dab80aeaef1196e3e039fd
BinRoot/Haskell-Data-Analysis-Cookbook
Main.hs
import Network.HTTP import Control.Concurrent (threadDelay) import qualified Data.Text as T url = "" latest :: IO String latest = simpleHTTP (getRequest url) >>= getResponseBody -- Polling a web server doWork str = length $ T.breakOnAll (T.pack "imgur.com/") (T.pack str) poll :: IO a poll = do body ...
null
https://raw.githubusercontent.com/BinRoot/Haskell-Data-Analysis-Cookbook/f8c46987d78f4a6c1828b353c5f906b9314c2ef9/Ch10/Code04_poll/Main.hs
haskell
Polling a web server
import Network.HTTP import Control.Concurrent (threadDelay) import qualified Data.Text as T url = "" latest :: IO String latest = simpleHTTP (getRequest url) >>= getResponseBody doWork str = length $ T.breakOnAll (T.pack "imgur.com/") (T.pack str) poll :: IO a poll = do body <- latest print $ doWo...
72d7bfb2c21f106e4b77ed260e63aae9bcb075eb888659a554dcb80706678e36
bguthrie/crane
cluster.clj
(ns crane.cluster (:use clojure.contrib.seq-utils) (:use clojure.contrib.shell-out) (:use clojure.contrib.duck-streams) (:use clojure.contrib.java-utils) (:use crane.ssh2) (:use crane.ec2) (:use crane.config) (:import java.io.File) (:import java.util.ArrayList)) (defn cluster-master [cluster-name] (str clu...
null
https://raw.githubusercontent.com/bguthrie/crane/03c07427788e0a5c4fededc445e0f6cc946530c6/src/crane/cluster.clj
clojure
(ns crane.cluster (:use clojure.contrib.seq-utils) (:use clojure.contrib.shell-out) (:use clojure.contrib.duck-streams) (:use clojure.contrib.java-utils) (:use crane.ssh2) (:use crane.ec2) (:use crane.config) (:import java.io.File) (:import java.util.ArrayList)) (defn cluster-master [cluster-name] (str clu...
92e3e889d1c34a0ed5ff4753aaa8addc49bcdd6043fb0e4e6407967a08de8e57
flambard/cl-erlang-term
bops-tests.lisp
(in-package :erlang-term-test) (in-suite bops) (test unsigned-integer-to-bytes (is (equalp #() (unsigned-integer-to-bytes 0 0))) (is (equalp #(0) (unsigned-integer-to-bytes 0 1))) (is (equalp #(0 0 0 0) (unsigned-integer-to-bytes 0 4))) (is (equalp #(0 0 0 45) (unsigned-integer-to-bytes 45 4))) (is (equalp ...
null
https://raw.githubusercontent.com/flambard/cl-erlang-term/8e4da084107c2a6a3778856fe554dc37e9bc46bb/test/bops-tests.lisp
lisp
(in-package :erlang-term-test) (in-suite bops) (test unsigned-integer-to-bytes (is (equalp #() (unsigned-integer-to-bytes 0 0))) (is (equalp #(0) (unsigned-integer-to-bytes 0 1))) (is (equalp #(0 0 0 0) (unsigned-integer-to-bytes 0 4))) (is (equalp #(0 0 0 45) (unsigned-integer-to-bytes 45 4))) (is (equalp ...
dbb2091af31293fccae7d008f5c638c757b331e8663814fa3c3b059541a0bbb4
mirage/ocaml-github
github_cookie_jar.ml
* Copyright ( c ) 2012 Anil Madhavapeddy < > * Copyright ( c ) 2013 < > * * 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 . * ...
null
https://raw.githubusercontent.com/mirage/ocaml-github/429b8751c45d958644bf0e64452bf9b0460955ba/unix/github_cookie_jar.ml
ocaml
Save an authentication token to disk, under the [name] * file in the jar Delete an authentication token from disk, given the [name] in the jar Read a JSON auth file in and parse it Retrieve all the cookies
* Copyright ( c ) 2012 Anil Madhavapeddy < > * Copyright ( c ) 2013 < > * * 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 . * ...
ae787b1978fbd6761695ab604c5a27664c07ac4302492eea3e160da7076fc977
Breezeemr/hitch
protocol.cljc
(ns hitch.protocol "Fundamental selector types and protocols. A Selector is a deftype/defrecord whose combination of type and properties describes a value. A Selector's value is *calculated* (not *described*) from any combination of the following: the Selector's own properties, its own (optional) private sta...
null
https://raw.githubusercontent.com/Breezeemr/hitch/79efea3cbf601a56060237fd9add2c0b68024a03/src/hitch/protocol.cljc
clojure
(We will talk about parents later.) parents. these This is the selector-value map. function or nil). We will talk about effects later. You may return an effect here, but this Selector doesn't need it. No properties initialize feed commands collect result TODO Graph TODO Effects must be determined entirely ...
(ns hitch.protocol "Fundamental selector types and protocols. A Selector is a deftype/defrecord whose combination of type and properties describes a value. A Selector's value is *calculated* (not *described*) from any combination of the following: the Selector's own properties, its own (optional) private sta...
6e53c4aa45fba3f5cef50e7c77c6ff2b7e6682d29ab2586a652c90f4929882cd
ghc/testsuite
WarnMinimalFail1.hs
module WarnMinimalFail1 where global :: Int global = 0 {-# MINIMAL global #-} -- invalid, should only be used inside a class declaration
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/warnings/minimal/WarnMinimalFail1.hs
haskell
# MINIMAL global # invalid, should only be used inside a class declaration
module WarnMinimalFail1 where global :: Int global = 0
b2db9eef19977ac04f808b3fecd90aafea8754737b8e23de24d670bb88598f18
sylphbio/pontiff
external-link.scm
(module external-link () (import scheme) (import chicken.base) (import chicken.type) (import chicken.string) (import chicken.format) (import lmdb-ht) (define (main) (define db (db-open "test")) (db-close db) (db-delete-database "test") (exit 0)) (main) )
null
https://raw.githubusercontent.com/sylphbio/pontiff/8af6c1932e687b5f4219d2c649c1aa4bb92d543a/test/data/external-link/src/external-link.scm
scheme
(module external-link () (import scheme) (import chicken.base) (import chicken.type) (import chicken.string) (import chicken.format) (import lmdb-ht) (define (main) (define db (db-open "test")) (db-close db) (db-delete-database "test") (exit 0)) (main) )
69f16abd95a45b1ff4a901e352ee54258584a6f764a7a1e315deca0c79898f65
tanakh/Peggy
Main.hs
# LANGUAGE TemplateHaskell , QuasiQuotes , FlexibleContexts # module Main (main) where import Text.Peggy genParser [] [peggy| -- Simple Arithmetic Expression Parser top :: Double = expr expr :: Double = expr "+" fact { $1 + $2 } / expr "-" fact { $1 - $2 } / fact fact :: Double = fact "*" term { $1 * $2 }...
null
https://raw.githubusercontent.com/tanakh/Peggy/78280548d137c9ada703de0e4c9af1cd3cb8f728/example/Main.hs
haskell
Simple Arithmetic Expression Parser
# LANGUAGE TemplateHaskell , QuasiQuotes , FlexibleContexts # module Main (main) where import Text.Peggy genParser [] [peggy| top :: Double = expr expr :: Double = expr "+" fact { $1 + $2 } / expr "-" fact { $1 - $2 } / fact fact :: Double = fact "*" term { $1 * $2 } / fact "/" term { $1 / $2 } / term...
3e3a97a90cc3e0cc93c44cd1ee32e750c428550967373d9bac5e47e4070a0007
tonsky/advent-of-code
core.clj
(ns advent-of-code.core (:require [clj-async-profiler.core :as prof])) (defn abs ^long [^long x] (if (< x 0) (- x) x)) (defmacro cond+ [& clauses] (when-some [[test expr & rest] clauses] (case test :do `(do ~expr (cond+ ~@rest)) :let `(let ~expr (cond+ ~@rest)) :some `(or ~e...
null
https://raw.githubusercontent.com/tonsky/advent-of-code/684c17575b8a3b239363ec6834cd2f825bb3ae29/src/advent_of_code/core.clj
clojure
(ns advent-of-code.core (:require [clj-async-profiler.core :as prof])) (defn abs ^long [^long x] (if (< x 0) (- x) x)) (defmacro cond+ [& clauses] (when-some [[test expr & rest] clauses] (case test :do `(do ~expr (cond+ ~@rest)) :let `(let ~expr (cond+ ~@rest)) :some `(or ~e...
22c43bd28a90cee31fae44286599b4423c8cb92a66aee04a1bb0c2ea8cb7dcd8
naoiwata/sicp
ex3.64.scm
;; ;; @author naoiwata SICP Chapter3 Exercise 3.64 . ;; ; ------------------------------------------------------------------------ ; solution ; ------------------------------------------------------------------------ (add-load-path "./pages/" :relative) (load "stream.scm") (define (stream-limit streams tolerance...
null
https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter3/ex3.64.scm
scheme
@author naoiwata ------------------------------------------------------------------------ solution ------------------------------------------------------------------------ ------------------------------------------------------------------------ test -------------------------------------------------------------...
SICP Chapter3 Exercise 3.64 . (add-load-path "./pages/" :relative) (load "stream.scm") (define (stream-limit streams tolerance) (let ((s1 (stream-car streams)) (s2 (stream-car (stream-cdr streams)))) (if (< (abs (- s1 s2)) tolerance) s2 (stream-limit (stream-cdr streams) tolerance...
47a278044128cf66f48c8f310da91f4e17da3b9b79e205597f025e490130aada
isovector/talks
Diagram.hs
# LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE TypeApplications # # LANGUAGE FlexibleInstances # # OPTIONS_GHC -Wno - orphans # # OPTIONS_GHC -Wno - type - defaults # module Diagram where import NonNaive hiding (scale) import Diagrams.Prelude hiding (atLeast, E) import...
null
https://raw.githubusercontent.com/isovector/talks/95c82908731c3ed7b0e97ef46430d9693b51bc62/quadtrees/src/Diagram.hs
haskell
# LANGUAGE GADTs # [ red , green, blue, yellow, orange, purple, aquamarine, aqua, brown, teal, pink ]
# LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE TypeApplications # # LANGUAGE FlexibleInstances # # OPTIONS_GHC -Wno - orphans # # OPTIONS_GHC -Wno - type - defaults # module Diagram where import NonNaive hiding (scale) import Diagrams.Prelude hiding (atLeast, E) import Diagrams.Backend.Raste...
3ee9295a398fbfdbbaf1436f3095d7877abb25997187f28c0c8a647cc8f3af68
ucsd-progsys/liquidhaskell
RG.hs
{-@ LIQUID "--expect-any-error" @-} module RG where import Data.IORef as R Liquid Rely - Guarantee References / RG - Haskell This is an embedding of a slightly simplified rely - guarantee reference system . ( See " Rely - Guarantee References for Refinement Types over Mutable Data , " by , , and ...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/RG.hs
haskell
@ LIQUID "--expect-any-error" @ Testing / debugging function @ proves_nothing :: x:a -> y:a -> {v:a | (v = y)} @ TODO: e2 is a hack to sidestep the inference of false for r, it forces r to be inhabited. TODO: full spec, fix pf type {- modifyRGRef' :: forall <p :: a -> Bool, r :: a -> a -> Bool >. ...
module RG where import Data.IORef as R Liquid Rely - Guarantee References / RG - Haskell This is an embedding of a slightly simplified rely - guarantee reference system . ( See " Rely - Guarantee References for Refinement Types over Mutable Data , " by , , and , PLDI'13 . I promise to never us...
0eccb42a8734760c0dc0474de30f627f4c222b8648059f0c4b207b32ff78556e
manuel-serrano/hop
scheme-test.scm
;*=====================================================================*/ * serrano / prgm / project / hop / hop / js2scheme / scheme - test.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/manuel-serrano/hop/cbb98da5c9ea8e6e3836f0a5908e5bf782419683/js2scheme/scheme-test.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * Scheme test code generation */ *===========================...
* serrano / prgm / project / hop / hop / js2scheme / scheme - test.scm * / * Author : * / * Creation : Mon Aug 21 07:41:17 2017 * / * Last change : Fri Feb 11 09:15:00 2022 ( serrano ) * / * Co...
cb657c0923b75b54a45bc92e45a43aa9b80e3e8587dd819477dc6cae1d72ff54
ff-notes/ron
Main.hs
{-# OPTIONS -Wno-orphans #-} {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE NamedFieldPuns # # LANGUAGE StandaloneDeriving # import RON.Prelude import Control.DeepSeq (NFData, force) import Control.Exception (evaluate) import Criterion (bench, nf) import Criterion.Main (...
null
https://raw.githubusercontent.com/ff-notes/ron/dab18abe80f64eee8da51166b3fa9328e08067c1/ron/bench/Main.hs
haskell
# OPTIONS -Wno-orphans # # LANGUAGE DeriveAnyClass #
# LANGUAGE NamedFieldPuns # # LANGUAGE StandaloneDeriving # import RON.Prelude import Control.DeepSeq (NFData, force) import Control.Exception (evaluate) import Criterion (bench, nf) import Criterion.Main (defaultConfig, defaultMainWith) import Criterion.Ty...
444933512835e8567a3e53fe297a76e9189a808292eedf66e1a2e2881f2792de
ghc/packages-Cabal
String.hs
module Distribution.Utils.String ( -- * Encode to/from UTF8 decodeStringUtf8 , encodeStringUtf8 ) where import Data.Word import Data.Bits import Data.Char (chr,ord) -- | Decode 'String' from UTF8-encoded octets. -- Invalid data in the UTF8 stream ( this includes code - points @U+D800@ through @U...
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/Cabal/Distribution/Utils/String.hs
haskell
* Encode to/from UTF8 | Decode 'String' from UTF8-encoded octets. See also 'encodeStringUtf8' | Encode 'String' to a list of UTF8-encoded octets Code-points in the @U+D800@-@U+DFFF@ range will be encoded See also 'decodeUtf8'
module Distribution.Utils.String decodeStringUtf8 , encodeStringUtf8 ) where import Data.Word import Data.Bits import Data.Char (chr,ord) Invalid data in the UTF8 stream ( this includes code - points @U+D800@ through @U+DFFF@ ) will be decoded as the replacement character ( @U+FFFD@ ) . decodeString...
35dc5dfcdfd43aa8deab67419b0c2c9c897d6b6e33892faa8c6df1eab457d147
jwiegley/notes
FreeMonad_.hs
module Main where import Control.Monad.Free hackrilege_to :: Functor m => Free m (Free m a) -> Free m a hackrilege_to (Pure (Pure x)) = Pure x hackrilege_to (Pure (Free x)) = Free x hackrilege_to (Free x) = Free (fmap hackrilege_to x) hackrilege_from :: Functor m => Free m a -> Free m (Free m a) hackrilege_from (Pur...
null
https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/FreeMonad_.hs
haskell
module Main where import Control.Monad.Free hackrilege_to :: Functor m => Free m (Free m a) -> Free m a hackrilege_to (Pure (Pure x)) = Pure x hackrilege_to (Pure (Free x)) = Free x hackrilege_to (Free x) = Free (fmap hackrilege_to x) hackrilege_from :: Functor m => Free m a -> Free m (Free m a) hackrilege_from (Pur...
406f73bf92de5ae2c5cdefc67b675bd4912a52d8ec077b330573712bc8d18c6b
spartango/CS153
test_framework.ml
open Pretty_print (* Tests types, verbose tests give a message alongside success value *) type test = Verbose_Test of string * (unit -> bool * string) | Test of string * (unit -> bool) (* Makes a test that expects a particular value from the target fucntion *) let mk_expect_test (f : unit -> 'a) (expected : 'a) (name...
null
https://raw.githubusercontent.com/spartango/CS153/16faf133889f1b287cb95c1ea1245d76c1d8db49/ps1/test_framework.ml
ocaml
Tests types, verbose tests give a message alongside success value Makes a test that expects a particular value from the target fucntion Makes a test that expects a particular value from f, and prints differences * it fails to match that value Runs a single test Runs a set of tests together under a set name, g...
open Pretty_print type test = Verbose_Test of string * (unit -> bool * string) | Test of string * (unit -> bool) let mk_expect_test (f : unit -> 'a) (expected : 'a) (name : string) : test = let t_test = fun () -> (f ()) = expected in Test(name, t_test) let mk_verbose_expect_test (f : unit -> 'a) (expected :...
ea0da0070c20baafe03d9dc260923494fbdc4aa56adb3c0f1cb4ebf0b00f0f4c
ocaml-multicore/tezos
test_ticket_balance_key.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 , < > (* ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_balance_key.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 , < > 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 , WHETHER IN AN A...
5b2a8dc8a54dc33d539d38d8a03cfbe065e6a701d2de3b20fd167d601a9281b3
mathematical-systems/clml
custom.lisp
-*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*- ;; See the file LICENCE for licence information. (in-package :cl-store) (defun setup-special-floats () (flet ((short-float-values () (list (cons #.excl::*infinity-single* +short-float-inf+) (cons #.excl::*negative-infinity...
null
https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/addons/cl-store/allegrocl/custom.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 -*- See the file LICENCE for licence information.
(in-package :cl-store) (defun setup-special-floats () (flet ((short-float-values () (list (cons #.excl::*infinity-single* +short-float-inf+) (cons #.excl::*negative-infinity-single* +short-float-neg-inf+) (cons #.excl::*nan-single* +short-float-nan+))) (single-f...
a0799aae757f894d397cf68b32d52b6d54206b848e615f458fd0493f3557c3c4
koka-lang/koka
Highlight.hs
------------------------------------------------------------------------------ Copyright 2012 - 2021 , Microsoft Research , . -- -- This is free software; you can redistribute it and/or modify it under the terms of the Apache License , Version 2.0 . A copy of the License can be -- found in the LICENSE file at the...
null
https://raw.githubusercontent.com/koka-lang/koka/1dbac9cc7675465d0c9c8d2e9ac6ac92aed153c1/src/Syntax/Highlight.hs
haskell
---------------------------------------------------------------------------- This is free software; you can redistribute it and/or modify it under the found in the LICENSE file at the root of this distribution. --------------------------------------------------------------------------- Syntax coloring --------...
Copyright 2012 - 2021 , Microsoft Research , . terms of the Apache License , Version 2.0 . A copy of the License can be module Syntax.Highlight( Context(..), Nesting(..), Token(..), TokenComment(..) , highlight , highlightPrint , highlightInput ...
e9040d084e832685d930ac557ec3053539f4385f88b7a155e9840bc04330d424
reanimate/reanimate
Ease.hs
{-| Easing functions modify the rate of change in animations. More examples can be seen here: </>. -} module Reanimate.Ease ( Signal , constantS , fromToS , reverseS , curveS , powerS , bellS , oscillateS , cubicBezierS ) where -- | Signals are time-varying variables. Signals can be composed us...
null
https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/src/Reanimate/Ease.hs
haskell
| Easing functions modify the rate of change in animations. More examples can be seen here: </>. | Signals are time-varying variables. Signals can be composed using function composition. | Constant signal. Example: @ @ <<docs/gifs/doc_constantS.gif>> | Signal with new starting and end values. ...
module Reanimate.Ease ( Signal , constantS , fromToS , reverseS , curveS , powerS , bellS , oscillateS , cubicBezierS ) where type Signal = Double -> Double ' Reanimate.signalA ' ( ' constantS ' 0.5 ) ' Reanimate . Builtin . Documentation.drawProgress ' constantS :: Double -> Signal constantS = ...
6114b0c107a74f9ad26f1cc6a1d63bc9923cf2b9ef9a9b27ecb8d2aabbc3a53f
NorfairKing/validity
Map.hs
# OPTIONS_GHC -fno - warn - orphans # module Data.GenValidity.Map ( genMapOf, shrinkMapOf, ) where import Data.GenValidity import Data.Map (Map) import qualified Data.Map as M import Data.Validity.Map () import Test.QuickCheck instance (Show k, Ord k, GenValid k, GenValid v) => GenValid (Map k v) where gen...
null
https://raw.githubusercontent.com/NorfairKing/validity/2e9198bdaaa8c80a5dbe2b7b860b5c26558c6374/genvalidity-containers/src/Data/GenValidity/Map.hs
haskell
# OPTIONS_GHC -fno - warn - orphans # module Data.GenValidity.Map ( genMapOf, shrinkMapOf, ) where import Data.GenValidity import Data.Map (Map) import qualified Data.Map as M import Data.Validity.Map () import Test.QuickCheck instance (Show k, Ord k, GenValid k, GenValid v) => GenValid (Map k v) where gen...