_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
63905e39b2939d564e5e54490d9b25be184b4e28b9db7ca9dce27104c1813241
sealchain-project/sealchain
Types.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE ExistentialQuantification # # LANGUAGE RecordWildCards # module Pos.Infra.Network.Types ( -- * Network configuration NetworkConfig (..) , NodeName (..) -- * Topology , StaticPeers(..) , Topology(..) -- ** D...
null
https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/infra/src/Pos/Infra/Network/Types.hs
haskell
* Network configuration * Topology ** Derived information * Queue initialization * Constructing peers * DNS support * Helpers * Re-exports ** from .DnsDomains ** from time-warp ** other ------------------------------------------------------------------------------ Network configuration --------------------...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE ExistentialQuantification # # LANGUAGE RecordWildCards # module Pos.Infra.Network.Types NetworkConfig (..) , NodeName (..) , StaticPeers(..) , Topology(..) , SubscriptionWorker(..) , topologyNodeType , topo...
4b6cd11200a8c6c6abdaf99f63933e56d398fb6c6004efc1caa3ec377e81f30d
mathinstitut/goemaxima
noun_arith.lisp
Customize Maxima 's tex ( ) function . 21 Oct 2005 . ;; Useful files: ;; \Maxima-5.9.0\share\maxima\5.9.0\share\utils\mactex-utilities.lisp \Maxima-5.9.0\share\maxima\5.9.0\src\mactex.lisp (defprop $noun+ tex-mplus tex) (defprop $noun+ ("+") texsym) (defprop $noun+ 100. tex-lbp) (defprop $noun+ 100. tex-rbp...
null
https://raw.githubusercontent.com/mathinstitut/goemaxima/b944242ecc58c514dcf57f759fb5ac9d1b333142/stack/2021010100/maxima/noun_arith.lisp
lisp
Useful files: \Maxima-5.9.0\share\maxima\5.9.0\share\utils\mactex-utilities.lisp dunno about this
Customize Maxima 's tex ( ) function . 21 Oct 2005 . \Maxima-5.9.0\share\maxima\5.9.0\src\mactex.lisp (defprop $noun+ tex-mplus tex) (defprop $noun+ ("+") texsym) (defprop $noun+ 100. tex-lbp) (defprop $noun+ 100. tex-rbp) (defprop $noun- tex-prefix tex) (defprop $noun- ("-") texsym) (defprop $noun- 100. te...
b5095e5b4010b1a897bbda3996b381d623f408a49d02a15881eece6e71ab11af
gregtatcam/imaplet-lwt
regex.mli
* Copyright ( c ) 2013 - 2014 < > * * 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/gregtatcam/imaplet-lwt/d7b51253e79cffa97e98ab899ed833cd7cb44bb6/lib/commands/regex.mli
ocaml
* Copyright ( c ) 2013 - 2014 < > * * 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...
4dc444f241a7ce23da95790c8c66a25898e8a8a87f204a65855ccdf2db04debb
clojure-interop/google-cloud-clients
HttpMethod.clj
(ns com.google.cloud.storage.HttpMethod "Http method supported by Storage service." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.storage HttpMethod])) (def *-get "Static Constant. type: com.google.cloud.storage.HttpMethod" HttpMethod/GET) (def *-head "Static Constant. ...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.storage/src/com/google/cloud/storage/HttpMethod.clj
clojure
(ns com.google.cloud.storage.HttpMethod "Http method supported by Storage service." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.storage HttpMethod])) (def *-get "Static Constant. type: com.google.cloud.storage.HttpMethod" HttpMethod/GET) (def *-head "Static Constant. ...
8d942a96bcc4ad666b0789cce177cedfd734c79833a4ae6dcfeb388f2b0107de
webyrd/untitled-relational-interpreter-book
mitscheme-slatex-src.scm
(scmxlate-postprocess (define *scheme-command-name* "scheme") (load "dialects/make-echo-script.scm") )
null
https://raw.githubusercontent.com/webyrd/untitled-relational-interpreter-book/247e29afd224586c39c1983e042524c7cc9fe17b/latex/slatex/dialects/mitscheme-slatex-src.scm
scheme
(scmxlate-postprocess (define *scheme-command-name* "scheme") (load "dialects/make-echo-script.scm") )
c3d0a1c9f42819917d976c1b45ceffa2d21f38170aca688dc3e3cdc654acd5e2
bosco/p2p
network.erl
%%% These are functions to start a peer network and run a supervisor -module(network). -export([create_supervisor/1, supervisor_start/1]). -include("p2p.hrl"). %%% Spawns a bunch of nodes to make up a p2p network %%% Be careful because if you create_peers too fast they won't have time to pull down a Known_peers lis...
null
https://raw.githubusercontent.com/bosco/p2p/54e5d4261777057a5d0e04040b1861e9b276fc0d/network.erl
erlang
These are functions to start a peer network and run a supervisor Spawns a bunch of nodes to make up a p2p network Be careful because if you create_peers too fast they won't and you'll end up with poor connectivity Creates a network with a supervisor We do this traceroute ourselves rather than using closest_in_ne...
-module(network). -export([create_supervisor/1, supervisor_start/1]). -include("p2p.hrl"). have time to pull down a Known_peers list from their Peer create_network(N) -> Ids = peer:create_peer(nil), timer:sleep(100), create_network(N - 1, [Ids]). create_network(0, Results) -> Results; create_network(N, Results)...
1d1f834ca341a25cc6ee0ef741b2be7011b7a594e032b13bcf3e4e78297e4b2a
archimag/cl-closure-template
defpackage.lisp
;;;; defpackage.lisp ;;;; ;;;; This file is part of the cl-closure-template library, released under Lisp-LGPL. ;;;; See file COPYING for details. ;;;; Author : < > (defpackage #:closure-template.parser (:use #:cl #:iter #:esrap) (:export #:*uglify* #:parse-template #:parse-expression ...
null
https://raw.githubusercontent.com/archimag/cl-closure-template/f1983aa525045691e128027d2a2d74831c873d6e/src/parser/defpackage.lisp
lisp
defpackage.lisp This file is part of the cl-closure-template library, released under Lisp-LGPL. See file COPYING for details. utils expression commands template namespace user print directives
Author : < > (defpackage #:closure-template.parser (:use #:cl #:iter #:esrap) (:export #:*uglify* #:parse-template #:parse-expression #:closure-template-parse #:not-equal #:lispify-name #:lispify-string #:add-possible-function ...
ccb74924bad4633bc3f6ece7b9e20f3102f2076391e7cdb751465945feab0c43
albertoruiz/easyVision
Vision.hs
{-# OPTIONS #-} ----------------------------------------------------------------------------- | Module : Vision Copyright : ( c ) 2006 - 10 License : GPL Maintainer : ( aruiz at um dot es ) Stability : provisional Algorithms for geometric computer vision . Module ...
null
https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/packages/geometry/src/Vision.hs
haskell
# OPTIONS # --------------------------------------------------------------------------- ---------------------------------------------------------------------------
| Module : Vision Copyright : ( c ) 2006 - 10 License : GPL Maintainer : ( aruiz at um dot es ) Stability : provisional Algorithms for geometric computer vision . Module : Vision Copyright : (c) Alberto Ruiz 2006-10 License : GPL Maintainer : Alberto...
5adf79c89b6a0483b2cc47c0e450a3e77fdaa3d088c82290f9b53f21025e1245
BoeingX/haskell-programming-from-first-principles
QueueBenchmark.hs
module BasicLibraries.ChapterExercises.QueueBenchmark ( benchmarks ) where import Criterion import Data.Sequence import BasicLibraries.ChapterExercises.Queue listQueueBench :: Int -> [Int] listQueueBench n = foldr go [] [1..2*n] where go x acc | even x = x : acc | otherwise = init acc ...
null
https://raw.githubusercontent.com/BoeingX/haskell-programming-from-first-principles/ffb637f536597f552a4e4567fee848ed27f3ba74/benchmark/BasicLibraries/ChapterExercises/QueueBenchmark.hs
haskell
module BasicLibraries.ChapterExercises.QueueBenchmark ( benchmarks ) where import Criterion import Data.Sequence import BasicLibraries.ChapterExercises.Queue listQueueBench :: Int -> [Int] listQueueBench n = foldr go [] [1..2*n] where go x acc | even x = x : acc | otherwise = init acc ...
6a42e81e6f8170fd88fc06ca814dc67ee6ee79f664ba41bb1fcccfc1d90b4736
tfeb/tfeb-lisp-hax
test-slog-run.lisp
;;;; Run the tests for slog ;;; (in-package :org.tfeb.hax.slog/test) (test "org.tfeb.hax.slog" :report 'summary)
null
https://raw.githubusercontent.com/tfeb/tfeb-lisp-hax/c9dadf5c52fffd5a00a7201352f34f76ebf07896/test/test-slog-run.lisp
lisp
Run the tests for slog
(in-package :org.tfeb.hax.slog/test) (test "org.tfeb.hax.slog" :report 'summary)
70e4bb577e4cf3f3f67c6b6c948875205eaa1e06f7870eb4509bd68d36b7e6a9
kitnil/dotfiles
desktop.scm
(use-modules (gnu)) (use-service-modules desktop dbus networking xorg) (use-package-modules avahi suckless xdisorg) (list (screen-locker-service slock) (screen-locker-service xlockmore "xlock") (udisks-service) ;; (service upower-service-type) (service accountsservice-service-type) (serv...
null
https://raw.githubusercontent.com/kitnil/dotfiles/55000d4f42db1e81be47ef31c72d746763670370/dotfiles/guixsd/desktop.scm
scheme
(service upower-service-type)
(use-modules (gnu)) (use-service-modules desktop dbus networking xorg) (use-package-modules avahi suckless xdisorg) (list (screen-locker-service slock) (screen-locker-service xlockmore "xlock") (udisks-service) (service accountsservice-service-type) (service colord-service-type) (geoclue...
35822d384eec23ae0ed1855bf9a0a31baa8069857e16a08edffda8984cac1075
conal/TypeCompose
Pair.hs
# LANGUAGE FlexibleContexts , Rank2Types , TypeOperators , UndecidableInstances , CPP # # OPTIONS_GHC -Wall # #if __GLASGOW_HASKELL__ < 610 {-# OPTIONS_GHC -frewrite-rules #-} #else # OPTIONS_GHC -fenable - rewrite - rules # #endif ---------------------------------------------------------------------- -- | -- Module ...
null
https://raw.githubusercontent.com/conal/TypeCompose/daf13efa6e6b37960de98146bab4a061462fc22b/src/Data/Pair.hs
haskell
# OPTIONS_GHC -frewrite-rules # -------------------------------------------------------------------- | Module : Data.Pair License : BSD3 Maintainer : Stability : experimental Pair-related type constructor classes. @category-extras@ package, but it does not require a 'Functor' superclass. T...
# LANGUAGE FlexibleContexts , Rank2Types , TypeOperators , UndecidableInstances , CPP # # OPTIONS_GHC -Wall # #if __GLASGOW_HASKELL__ < 610 #else # OPTIONS_GHC -fenable - rewrite - rules # #endif Copyright : ( c ) Conal Elliott 2007 Portability : GHC This module is similar to @Control . Functor . Pair@ in...
4cbe3252a4a0e5986c66db350061c3a14b244058e1f41b9cb3958c59a9093c79
lichenscript/lichenscript
parser.ml
* Copyright 2022 * * Licensed under the Apache License , Version 2.0 ( the " License " ) ; * you may not use this file except in compliance with the License . * You may obtain a copy of the License at * * -2.0 * * Unless required by applicable law or agreed to in writing , software ...
null
https://raw.githubusercontent.com/lichenscript/lichenscript/dac3134b319c8c82f2c49d5a3cc459e5a9c254eb/lib/parsing/parser.ml
ocaml
* Relaxed params * * () => {} * (): unit => {} * (a: string, b: i32) => () * (a: string, b: i32) : () => {} * (Init {}) * (1 + 1) import_tail_with_spec None do NOT support modifier currently let name = header.id.pident_name in class is a getter is a method called get { } let left = reinterpr...
* Copyright 2022 * * Licensed under the Apache License , Version 2.0 ( the " License " ) ; * you may not use this file except in compliance with the License . * You may obtain a copy of the License at * * -2.0 * * Unless required by applicable law or agreed to in writing , software ...
69bdaad68036ccfb569170d347533bd876d19f2aedf947211327d0c60134cd83
tatut/ripley
hash_route.clj
(ns ripley.live.hash-route "A live component for reacting to changes in the window location hash." (:require [ripley.html :as h] [ripley.impl.dynamic :as dynamic] [ripley.live.protocols :as p])) (defn on-hash-change "Output script that calls a callback function when the window location ...
null
https://raw.githubusercontent.com/tatut/ripley/649112e521a3ecb76fa888e7747bceb80aa88584/src/ripley/live/hash_route.clj
clojure
Immediately send an update, if hash isn't empty
(ns ripley.live.hash-route "A live component for reacting to changes in the window location hash." (:require [ripley.html :as h] [ripley.impl.dynamic :as dynamic] [ripley.live.protocols :as p])) (defn on-hash-change "Output script that calls a callback function when the window location ...
c38366e7200bd7ce6ced6f055aa658f1c34f314d557c936497c2ece68c80b6f5
boxer-project/boxer-sunrise
evalmacs.lisp
-*- Syntax : Common - lisp ; Base : 10 ; Package : EVAL -*- ;;;; ;;;; Boxer Copyright 1985 - 2022 and the Estate of Edward H. Lay ;;;; Portions of this code may be copyright 1982 - 1985 Massachusetts Institute of Technology . Those portions may be used for any purpose , including ...
null
https://raw.githubusercontent.com/boxer-project/boxer-sunrise/92f2c44520726a2174106fe4a9474c8af361f9ee/src/evaluator/evalmacs.lisp
lisp
Base : 10 ; Package : EVAL -*- Boxer Licensed under the 3-Clause BSD license. You may not use this file except in compliance with this license. -3-Clause +-Data--+ This file is part of the | BOXER | system ...
Copyright 1985 - 2022 and the Estate of Edward H. Lay Portions of this code may be copyright 1982 - 1985 Massachusetts Institute of Technology . Those portions may be used for any purpose , including commercial ones , providing that notice of MIT copyright is retained . Modification H...
30356af039cb90a24b3ddd570a5fa1a268c56fa503ba80910cc03f20219c64bd
haskell/filepath
Types.hs
module System.OsString.Types ( WindowsString , PosixString , PlatformString , WindowsChar , PosixChar , PlatformChar , OsString , OsChar ) where import System.OsString.Internal.Types
null
https://raw.githubusercontent.com/haskell/filepath/8366ecedc473c42aae13af38fbb3aa4131917aa0/System/OsString/Types.hs
haskell
module System.OsString.Types ( WindowsString , PosixString , PlatformString , WindowsChar , PosixChar , PlatformChar , OsString , OsChar ) where import System.OsString.Internal.Types
a9dc9b115f44492d5e32def83c63cb3ac477c9839dde93b3fd3f268ae2d7ab78
davebryson/beepbeep
blog_example_sup.erl
-module(blog_example_sup). -behaviour(supervisor). %% External exports -export([start_link/0, upgrade/0]). %% supervisor callbacks -export([init/1]). ( ) - > ServerRet %% @doc API for starting the supervisor. start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). @spec upgrade ( ) - > ok %...
null
https://raw.githubusercontent.com/davebryson/beepbeep/62db46d268c6cb6ad86345562b3c77f8ff070b27/example/blog/src/blog_example_sup.erl
erlang
External exports supervisor callbacks @doc API for starting the supervisor. @doc Add processes if necessary. @doc supervisor callback. (except the BlogDb) will cause something to break. Setup the database here so it's supervised
-module(blog_example_sup). -behaviour(supervisor). -export([start_link/0, upgrade/0]). -export([init/1]). ( ) - > ServerRet start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). @spec upgrade ( ) - > ok upgrade() -> {ok, {_, Specs}} = init([]), Old = sets:from_list( [...
48bd91592ce5466b25805f97b4d0b70de67212432815f36f64f87f4209bdd081
ChrisPenner/eve
Async.hs
# language FlexibleInstances # # language MultiParamTypeClasses # # language ExistentialQuantification # {-# language ScopedTypeVariables #-} module Eve.Internal.Async ( dispatchActionAsync , asyncActionProvider ) where import Eve.Internal.Actions import Eve.Internal.AppState import Eve.Internal.States import ...
null
https://raw.githubusercontent.com/ChrisPenner/eve/6081b1ff13229b93e5e5a4505fd23aa0a25c96b1/src/Eve/Internal/Async.hs
haskell
# language ScopedTypeVariables # | Dispatch an action which is generated by some IO. Note that state of the application may have changed between calling 'dispatchActionAsync' and running the resulting 'Action' 'asyncEventProvider' is simpler to use, however 'asyncActionProvider' provides more power and expressivi...
# language FlexibleInstances # # language MultiParamTypeClasses # # language ExistentialQuantification # module Eve.Internal.Async ( dispatchActionAsync , asyncActionProvider ) where import Eve.Internal.Actions import Eve.Internal.AppState import Eve.Internal.States import Control.Concurrent import Control.Mon...
e64cc9dc6b9670cf17da92e2f987beeabc092910321c6c364612aea1791da207
FundingCircle/fc4-framework
svg.clj
(ns fc4.integrations.structurizr.express.renderer.svg (:require [clojure.data.xml :as xml :refer [element]] [clojure.string :as str :refer [join split]])) (defn cleanup "Accepts an SVG document generated by Structurizr Express as a String; cleans up the SVG to make it more likely to be valid and more...
null
https://raw.githubusercontent.com/FundingCircle/fc4-framework/674af39e7edb2cbfd3e1941e6abe80fd87d93bed/src/fc4/integrations/structurizr/express/renderer/svg.clj
clojure
cleans up the SVG to make HTML entities are not available in SVG was causing rendering issues
(ns fc4.integrations.structurizr.express.renderer.svg (:require [clojure.data.xml :as xml :refer [element]] [clojure.string :as str :refer [join split]])) (defn cleanup it more likely to be valid and more likely to render as expected." [s] (-> s (defn- parse-viewbox "Accepts an SVG root elem; re...
697a9d2aeff47e9869592eebbc7fb6e3f5a7a2378f2568d495fa1ffa23eb311c
stevana/property-based-testing-stateful-systems-tutorial
ServiceTest.hs
# LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE OverloadedStrings #-} module Part03.ServiceTest (module Part03.ServiceTest) where import Control.Concurrent import Control.Concurrent.Async import Control.Concurrent.STM import Control.Monad import qualified Data.ByteString.Char8 as ...
null
https://raw.githubusercontent.com/stevana/property-based-testing-stateful-systems-tutorial/56771f02177c4e2032c28ad1bea8508d8dc0f5f5/src/Part03/ServiceTest.hs
haskell
# LANGUAGE OverloadedStrings # part. ---------------------------------------------------------------------- ---------------------------------------------------------------------- ---------------------------------------------------------------------- Finally we can write our integration tests between the queue and the...
# LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # module Part03.ServiceTest (module Part03.ServiceTest) where import Control.Concurrent import Control.Concurrent.Async import Control.Concurrent.STM import Control.Monad import qualified Data.ByteString.Char8 as BS8 import Data.ByteString.Lazy (By...
66dd3f0e1e08ce35dc5fe46629f12339d64032176032f4f33b4aeb3948ebfa6b
GianlucaGuarini/fortytwo
Password.hs
module FortyTwo.Renderers.Password (renderPassword, hideLetters) where import FortyTwo.Constants (passwordHiddenChar) -- | Print the password value to the user hiding it renderPassword :: String -> IO () renderPassword letters = putStr $ hideLetters letters -- | Hide any string replacing its letters with the passwor...
null
https://raw.githubusercontent.com/GianlucaGuarini/fortytwo/6d8d801f85e1dd993ee4cae6490a638872a14b47/src/FortyTwo/Renderers/Password.hs
haskell
| Print the password value to the user hiding it | Hide any string replacing its letters with the passwordHiddenChar
module FortyTwo.Renderers.Password (renderPassword, hideLetters) where import FortyTwo.Constants (passwordHiddenChar) renderPassword :: String -> IO () renderPassword letters = putStr $ hideLetters letters hideLetters :: String -> String hideLetters letters = [passwordHiddenChar | _ <- letters]
56366c55b82ae50e8f4e97a158d7d2b45a2f8f8db638c56df5f1c31f1de15d5c
SquidDev/urn
set.lisp
(import test ()) (import data/set ()) (describe "A set" (it "looks like a set" (affirm (= (type (make-set)) "set"))) (it "has a function which checks if something is a set" (affirm (= (set? (make-set)) true) (= (set? 23) false))) (it "can be pretty printed" (affirm (= "«hash-set:...
null
https://raw.githubusercontent.com/SquidDev/urn/6e6717cf1376b0950e569e3771cb7e287aed291d/tests/lib/data/set.lisp
lisp
(import test ()) (import data/set ()) (describe "A set" (it "looks like a set" (affirm (= (type (make-set)) "set"))) (it "has a function which checks if something is a set" (affirm (= (set? (make-set)) true) (= (set? 23) false))) (it "can be pretty printed" (affirm (= "«hash-set:...
7d7716502f761d23e93a2fe22ec0f1a3da6b34a46bff4e8e600e97e8a4dfeaa7
weblocks-framework/weblocks-stores
perec.lisp
(defpackage #:weblocks-perec (:use :cl :weblocks-stores) (:documentation "A driver for weblocks backend store API that connects to cl-perec.")) (in-package :weblocks-perec) (weblocks-stores:register-store-type :perec) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Initialization/finalization ;;; ;;;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/weblocks-framework/weblocks-stores/4231ae1f99b991b35b782c5eeeb7b775c62b9574/src/store/perec/perec.lisp
lisp
Initialization/finalization ;;; (print (hu.dwim.rdbms:list-views)) Transactions ;;; Creating and deleting persistent objects ;;; Querying persistent objects ;;;
(defpackage #:weblocks-perec (:use :cl :weblocks-stores) (:documentation "A driver for weblocks backend store API that connects to cl-perec.")) (in-package :weblocks-perec) (weblocks-stores:register-store-type :perec) (defmethod open-store ((store-type (eql :perec)) &rest args) (setf hu.dwim.perec:*databas...
c7d21497ad855841eb3006f2e3c75c11a1fd0bd1ea02d460643b6b77ca825b8b
reasonml-old/bs-containers
barray_slice.mli
(* This file is free software, part of containers. See file "license" for more details. *) (** {1 Array Slice} *) type 'a sequence = ('a -> unit) -> unit type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist] type 'a gen = unit -> 'a option type 'a equal = 'a -> 'a -> bool type 'a ord = 'a -> 'a -> int type 'a rand...
null
https://raw.githubusercontent.com/reasonml-old/bs-containers/dfd1360dc74ede57c09e9f9d837ce59285af6fd2/src/barray_slice.mli
ocaml
This file is free software, part of containers. See file "license" for more details. * {1 Array Slice} * Array slice, containing elements of type ['a] * Create a slice from given offset and length.. @raise Invalid_argument if the slice isn't valid * Slice that covers the full array * Underlying array (shared)...
type 'a sequence = ('a -> unit) -> unit type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist] type 'a gen = unit -> 'a option type 'a equal = 'a -> 'a -> bool type 'a ord = 'a -> 'a -> int type 'a random_gen = Random.State.t -> 'a type 'a printer = Format.formatter -> 'a -> unit type 'a t val empty : 'a t val e...
db8e2932bfdf3cbc2d01659f431b16c6ff428a055f0911e6e2cf28e024af0f9c
janestreet/bonsai
test_bonsai_web_ui_search_bar.ml
open! Core open Virtual_dom open Bonsai.Let_syntax module Item = Int type t = { handle : (Vdom.Node.t, Nothing.t) Bonsai_web_test.Handle.t ; choices_var : int list Bonsai.Var.t } let initial_choices = [ 1; 2; 3; 40; 100; 1000 ] let create ?max_query_results ?additional_query_results_on_click ...
null
https://raw.githubusercontent.com/janestreet/bonsai/4baeedc75bf73a0915e04dc02d8a49b78779e9b0/web_ui/search_bar/test/test_bonsai_web_ui_search_bar.ml
ocaml
Note that the search contents are maintained No updates while the search box is focused Selecting an item resets the number of query results to show.
open! Core open Virtual_dom open Bonsai.Let_syntax module Item = Int type t = { handle : (Vdom.Node.t, Nothing.t) Bonsai_web_test.Handle.t ; choices_var : int list Bonsai.Var.t } let initial_choices = [ 1; 2; 3; 40; 100; 1000 ] let create ?max_query_results ?additional_query_results_on_click ...
ba6c05de1e5a61b2348696c426b3a386c622f85d02f897c1f0581f20ef7a5c90
mirage/irmin
blob_log.ml
* Copyright ( c ) 2020 < > * Copyright ( c ) 2020 Anirudh Sunder Raj < > * * 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/irmin/51203d03a74a2aeca5d417b7324e8d9d18399116/src/irmin-containers/blob_log.ml
ocaml
* Copyright ( c ) 2020 < > * Copyright ( c ) 2020 Anirudh Sunder Raj < > * * 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 . * ...
dafe50a5586f54f76e7857f97a9c0ad062c6647d59f553a1540e5af332da21ba
ocsigen/eliom
eliom_types.client.ml
include Eliom_types_base
null
https://raw.githubusercontent.com/ocsigen/eliom/c3e0eea5bef02e0af3942b6d27585add95d01d6c/src/lib/eliom_types.client.ml
ocaml
include Eliom_types_base
de8155a837531b810648f48180a8bbf60f0a5ae17c7b83f804190ed0dae50ae9
TyOverby/mono
braid.ml
open! Core include Braid_intf include High module Var = struct type 'a t = 'a Value.t let read = Fn.id end let var a = High.const_node a module type Universe = Braid_intf.Universe with module Value := Value with module Var := Var let compile t = let mid, mid_lookup, res = High.Expert.lower t in let low, ...
null
https://raw.githubusercontent.com/TyOverby/mono/3dd53ea345f8fec9acfc44dbe721e64f126000af/lib/braid/src/braid.ml
ocaml
unreachable because [set] can only be called on a var, which is created by [const_node]
open! Core include Braid_intf include High module Var = struct type 'a t = 'a Value.t let read = Fn.id end let var a = High.const_node a module type Universe = Braid_intf.Universe with module Value := Value with module Var := Var let compile t = let mid, mid_lookup, res = High.Expert.lower t in let low, ...
ff61aa6ffe292ea5682e68c32ad8022b2a0333ed238070a9329f715d7637d0bd
hansroland/reflex-dom-inbits
range02.hs
{-# LANGUAGE OverloadedStrings #-} import Reflex.Dom import qualified Data.Text as T main :: IO () main = mainWidget bodyElement bodyElement :: MonadWidget t m => m () bodyElement = do el "h2" $ text "Range Input" rg <- rangeInput $ def & attributes .~ constDyn ("min" =: "-100") el "p" blank display ...
null
https://raw.githubusercontent.com/hansroland/reflex-dom-inbits/3bf4ccf43aa45c5df7d3ce42dae38955f657ca33/src/range02.hs
haskell
# LANGUAGE OverloadedStrings #
import Reflex.Dom import qualified Data.Text as T main :: IO () main = mainWidget bodyElement bodyElement :: MonadWidget t m => m () bodyElement = do el "h2" $ text "Range Input" rg <- rangeInput $ def & attributes .~ constDyn ("min" =: "-100") el "p" blank display $ _rangeInput_value rg return (...
88f72b9a3c3ee70306a873cd5eb58bb7b4957998e56de2b7663db16e7bca061d
pqwy/ocaml-papi
papi.mli
Copyright ( c ) 2019 . All rights reserved . See LICENSE.md See LICENSE.md *) * Performance Application Programming Interface ( PAPI ) bindings . This module binds [ < papi.h > ] . provides portable access to hardware performance counters . For more information , see the { { : /}homepa...
null
https://raw.githubusercontent.com/pqwy/ocaml-papi/d594fb51b7f3c7304b9eb2cb349ffd70e4a2c40b/src/papi.mli
ocaml
* {1 Errors} * PAPI errors. See the header file [papi.h] for descriptions of errors. * PAPI errors are signalled by raising [Error ((err, fname))], where [fname] is the name of the failing function. * [pp_error ppf err] pretty-prints [err] on [ppf]. * {1 Initialisation} * Releases PAPI state by calling [P...
Copyright ( c ) 2019 . All rights reserved . See LICENSE.md See LICENSE.md *) * Performance Application Programming Interface ( PAPI ) bindings . This module binds [ < papi.h > ] . provides portable access to hardware performance counters . For more information , see the { { : /}homepa...
d8cb8b6a107236f14b7518f526e42cae520ac3146abb6250f4006c619cbb5b72
vseloved/cl-parsec
package.lisp
CL - PARSEC package definition (defpackage :cl-parsec (:use :common-lisp :rutils.usr) (:nicknames :parsec) (:export )) ;;; end
null
https://raw.githubusercontent.com/vseloved/cl-parsec/f86660cc7d372df598d2a8348040a4b53c90631f/package.lisp
lisp
end
CL - PARSEC package definition (defpackage :cl-parsec (:use :common-lisp :rutils.usr) (:nicknames :parsec) (:export ))
f19643cd66baeedeec9820af3957af0bbfb5ca46123b3f3ddea6a547de470dc5
siraben/haoc-2021
day10.hs
import Criterion.Main import Data.List badness :: [Char] -> (Int, [Char]) badness s = go s [] where go ('(' : r) s = go r (')' : s) go ('{' : r) s = go r ('}' : s) go ('[' : r) s = go r (']' : s) go ('<' : r) s = go r ('>' : s) go (a : r) (b : s) | a == b = go r s go (')' : r) a = (3, a) ...
null
https://raw.githubusercontent.com/siraben/haoc-2021/0a1a7486470afcf90bc6e69894372147163b54d8/day10.hs
haskell
import Criterion.Main import Data.List badness :: [Char] -> (Int, [Char]) badness s = go s [] where go ('(' : r) s = go r (')' : s) go ('{' : r) s = go r ('}' : s) go ('[' : r) s = go r (']' : s) go ('<' : r) s = go r ('>' : s) go (a : r) (b : s) | a == b = go r s go (')' : r) a = (3, a) ...
60d176a31dcde9e67d05b7903626e47fc9d6920edb18fe0f307bd6641f154bd3
brawnski/git-annex
Git.hs
git repository handling - - This is written to be completely independant of git - annex and should be - suitable for other uses . - - Copyright 2010,2011 < > - - Licensed under the GNU GPL version 3 or higher . - - This is written to be completely independant of git-annex and should be -...
null
https://raw.githubusercontent.com/brawnski/git-annex/8b847517a810d384a79178124b9766141b89bc17/Git.hs
haskell
remoteName holds the name used for this repo in remotes Local Repo constructor, requires an absolute path to the repo be - specified. Git always looks for "dir.git" in preference to to "dir", even if dir ends in a "/". When dir == "foo/.git", git looks for "foo/.git/.git", and failing that, uses "foo" as the r...
git repository handling - - This is written to be completely independant of git - annex and should be - suitable for other uses . - - Copyright 2010,2011 < > - - Licensed under the GNU GPL version 3 or higher . - - This is written to be completely independant of git-annex and should be -...
70ef25f246f7382591f029e07804972c339b72cefb60986dde0596e9a577eb89
mukul-rathi/bolt
pprint_fir.mli
* This module pretty prints the serialisable frontend IR of a Bolt program val pprint_program : Format.formatter -> Frontend_ir.program -> unit
null
https://raw.githubusercontent.com/mukul-rathi/bolt/1faf19d698852fdb6af2ee005a5f036ee1c76503/src/frontend/ir_gen/pprint_fir.mli
ocaml
* This module pretty prints the serialisable frontend IR of a Bolt program val pprint_program : Format.formatter -> Frontend_ir.program -> unit
14df815d75c2fbaade8d7cfec423a10992e9f109f0c5aa8834217687503affb0
shentufoundation/deepsea
Decimal.mli
type uint = | Nil | D0 of uint | D1 of uint | D2 of uint | D3 of uint | D4 of uint | D5 of uint | D6 of uint | D7 of uint | D8 of uint | D9 of uint
null
https://raw.githubusercontent.com/shentufoundation/deepsea/970576a97c8992655ed2f173f576502d73b827e1/src/backend/extraction/Decimal.mli
ocaml
type uint = | Nil | D0 of uint | D1 of uint | D2 of uint | D3 of uint | D4 of uint | D5 of uint | D6 of uint | D7 of uint | D8 of uint | D9 of uint
c25bc887ba4b832e65567efb9e2a5f8e18e17e1c2b89219734ab812f4c972825
lvaruzza/cl-randist
chisq.lisp
(in-package :randist) (declaim (optimize (speed 3) (debug 0) (safety 1))) / * The distribution has the form ) dx = ( 1/(2*Gamma(nu/2 ) ) ) ( x/2)^(nu/2 - 1 ) exp(-x/2 ) dx ;; for x = 0 ... +infty */ ;; double ;; gsl_ran_chisq (const gsl_rng * r, const double nu) ;; { double = 2 * gsl_ran_gamma ( r...
null
https://raw.githubusercontent.com/lvaruzza/cl-randist/413204fa2b9e7f0431c0bc45367304af937494ff/chisq.lisp
lisp
for x = 0 ... +infty */ double gsl_ran_chisq (const gsl_rng * r, const double nu) { }
(in-package :randist) (declaim (optimize (speed 3) (debug 0) (safety 1))) / * The distribution has the form ) dx = ( 1/(2*Gamma(nu/2 ) ) ) ( x/2)^(nu/2 - 1 ) exp(-x/2 ) dx (declaim (ftype (function (double-float) double-float) random-chi-square) (inline random-chi-square)) (defun random-chi-square (n...
63c6561f71483dc7cc66896a38a277134e327b2d21b971e7db89bebd70b90482
juspay/atlas
Status.hs
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
null
https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/public-transport-bap/src/Domain/Action/UI/Status.hs
haskell
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
522f6ee9914614875986cc4b11d4321317ff667d7de1adc03182a215c1de2b63
ConsenSysMesh/Fae
Escrow3.hs
import Blockchain.Fae.Transactions.TX$txID import Control.Monad (unless) body :: EscrowID EType -> FaeTX () body eID = do us <- signer "self" newContract (Restricted us eID) data Restricted a = Restricted PublicKey a deriving (Generic) instance (ContractVal a) => ContractName (Restricted a) where type ArgType (R...
null
https://raw.githubusercontent.com/ConsenSysMesh/Fae/3ff023f70fa403e9cef80045907e415ccd88d7e8/documentation/tutorial/tutorial-2/Escrow3.hs
haskell
import Blockchain.Fae.Transactions.TX$txID import Control.Monad (unless) body :: EscrowID EType -> FaeTX () body eID = do us <- signer "self" newContract (Restricted us eID) data Restricted a = Restricted PublicKey a deriving (Generic) instance (ContractVal a) => ContractName (Restricted a) where type ArgType (R...
364abcd430698a32328ee90629ef844eccbc3b8aecdcbbda76c9a0a67c8121e7
stchang/macrotypes
stlc+sub.rkt
#lang s-exp macrotypes/typecheck (extends "stlc+lit.rkt" #:except #%datum +) (reuse Bool String add1 #:from "ext-stlc.rkt") (require (prefix-in ext: (only-in "ext-stlc.rkt" #%datum)) (only-in "ext-stlc.rkt" current-join) (for-meta 2 racket/base syntax/parse racket/syntax)) ;; Simply-Typed Lambda Calc...
null
https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/macrotypes-example/macrotypes/examples/stlc%2Bsub.rkt
racket
Simply-Typed Lambda Calculus, plus subtyping Types: Type relations: - sub? - Any <: Top - Nat <: Int - → Terms: - terms from stlc+lit.rkt, except redefined: datum and + - also * Other: sub? current-sub? need this because recursive calls made with unexpanded types (printf "t1 = ~a\n" (syntax->datum...
#lang s-exp macrotypes/typecheck (extends "stlc+lit.rkt" #:except #%datum +) (reuse Bool String add1 #:from "ext-stlc.rkt") (require (prefix-in ext: (only-in "ext-stlc.rkt" #%datum)) (only-in "ext-stlc.rkt" current-join) (for-meta 2 racket/base syntax/parse racket/syntax)) - types from and stlc+lit...
33209d92a971d46ae2d80d275d361c6c3412381474e5258337dafc889716f915
rtoy/ansi-cl-tests
make-echo-stream.lsp
;-*- Mode: Lisp -*- Author : Created : Thu Feb 12 04:34:42 2004 ;;;; Contains: Tests of MAKE-ECHO-STREAM (in-package :cl-test) (deftest make-echo-stream.1 (let* ((is (make-string-input-stream "foo")) (os (make-string-output-stream)) (s (make-echo-stream is os))) (values (re...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/make-echo-stream.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of MAKE-ECHO-STREAM Tests of READ-BYTE on echo streams unread-char + echo streams is tested in unread-char.lsp Add tests for clear-input, file-position(?) Also, add tests for output operations (since echo-streams are bidirectional) Error tests
Author : Created : Thu Feb 12 04:34:42 2004 (in-package :cl-test) (deftest make-echo-stream.1 (let* ((is (make-string-input-stream "foo")) (os (make-string-output-stream)) (s (make-echo-stream is os))) (values (read-char s) (get-output-stream-string os))) #\f "f") (deft...
64dd9b930e9c1b4410a205054c8d95dc72d6c30ea7f8f3090fbef742e0749226
reactive-systems/syfco
Full.hs
----------------------------------------------------------------------------- -- | -- Module : Writer.Formats.Full License : MIT ( see the LICENSE file ) Maintainer : ( ) -- Returns a specification in full TLSF . -- ----------------------------------------------------------------------------- ...
null
https://raw.githubusercontent.com/reactive-systems/syfco/0f0f6a6fff7960d8a0cbb120587984183fa7fc0e/src/lib/Writer/Formats/Full.hs
haskell
--------------------------------------------------------------------------- | Module : Writer.Formats.Full --------------------------------------------------------------------------- --------------------------------------------------------------------------- ---------------------------------------------------...
License : MIT ( see the LICENSE file ) Maintainer : ( ) Returns a specification in full TLSF . module Writer.Formats.Full where import Config import Data.Error import Data.Binding import Data.Expression import Data.SymbolTable import Data.Specification import Data.List import Data.Array as A ...
9cd70fed281a283b93c77aaa5dbd78f6223c21576dabffe9aa18525ea27562dc
k3nn7/algoliasearch-client-erlang
algolia_transport.erl
-module(algolia_transport). -export([make_transport/2, handle_response/1, make_request_builder/2]). -define(readHosts, [ "~s-dsn.algolia.net", "~s-1.algolianet.com", "~s-2.algolianet.com", "~s-3.algolianet.com" ]). -define(writeHosts, [ "~s.algolia.net", "~s-1.algolianet.com", "~s-2.algolianet.com", ...
null
https://raw.githubusercontent.com/k3nn7/algoliasearch-client-erlang/640f3da5161975a77f45f563ebab22edbf1fb021/src/algolia_transport.erl
erlang
-module(algolia_transport). -export([make_transport/2, handle_response/1, make_request_builder/2]). -define(readHosts, [ "~s-dsn.algolia.net", "~s-1.algolianet.com", "~s-2.algolianet.com", "~s-3.algolianet.com" ]). -define(writeHosts, [ "~s.algolia.net", "~s-1.algolianet.com", "~s-2.algolianet.com", ...
a4bb27f6c62a7efc5d36a4fd7d016658535b5bfb1f9da2886f5744c7290e802f
fourmolu/fourmolu
input.hs
{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2...
null
https://raw.githubusercontent.com/fourmolu/fourmolu/f47860f01cb3cac3b973c5df6ecbae48bbb4c295/data/fourmolu/let-style/input.hs
haskell
- should be the same in every option - - pure let expressions - a comment - do-block - - list comprehension -
let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = a = 1 in a + 2 let_multi = let a = 1 ...
b768895ab3c6f92a2e693375256cab0920ad483a48f1a4005080c5e74c585dd2
exercism/common-lisp
example.lisp
(defpackage :matching-brackets (:use :cl) (:export :pairedp)) (in-package :matching-brackets) (defparameter +bracket-lookup+ '((#\( . #\)) (#\{ . #\}) (#\[ . #\]))) (defun eliminate-pairs (tracker bracket) (let ((match (rassoc bracket +bracket-lookup+))) (if (and tracker match (char= (car match) (car track...
null
https://raw.githubusercontent.com/exercism/common-lisp/1cc6aa661054b0797ffe05689a68656aa1e343f7/exercises/practice/matching-brackets/.meta/example.lisp
lisp
(defpackage :matching-brackets (:use :cl) (:export :pairedp)) (in-package :matching-brackets) (defparameter +bracket-lookup+ '((#\( . #\)) (#\{ . #\}) (#\[ . #\]))) (defun eliminate-pairs (tracker bracket) (let ((match (rassoc bracket +bracket-lookup+))) (if (and tracker match (char= (car match) (car track...
3d6b682f232b1f04d3f868ed1884ca75accc0376e563d8424d4cbe6ad30885f6
pirapira/coq2rust
cStack.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/lib/cStack.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Extended interface for OCaml stack...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * type 'a t exception Empty *...
1d47a3d56dabda436d5b27b0434bba725db8cd291c2ee837533298bf08ca5349
YoshikuniJujo/test_haskell
FixLoop.hs
# , LambdaCase # # OPTIONS_GHC -Wall -fno - warn - tabs # module FixLoop where import Control.Monad.Fix import Data.Bool fixLoopFoo :: [String] -> IO () fixLoopFoo = fix \loop -> \case [] -> pure (); m : ms -> putStrLn m >> loop ms
null
https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/6936295b79cdf7cf6312a0cc2a39e855bb17614e/tribial/tribial-trials/src/FixLoop.hs
haskell
# , LambdaCase # # OPTIONS_GHC -Wall -fno - warn - tabs # module FixLoop where import Control.Monad.Fix import Data.Bool fixLoopFoo :: [String] -> IO () fixLoopFoo = fix \loop -> \case [] -> pure (); m : ms -> putStrLn m >> loop ms
8e3aa3423d99c73d7d4e67f86646a5fe2ceff8519bfb230955b0256d78528c92
lockie/racket-sdl2
main.rkt
#lang racket/base (require ffi/unsafe ffi/unsafe/define sdl2 sdl2/private/lib-path) (provide (except-out (all-defined-out) define-sdl2-image)) (define-ffi-definer define-sdl2-image (ffi-lib (lib-path "image") '("0" #f))) (define-sdl2-image IMG_Linked_Version (_fun -> _SDL_version*)) (define _IMG_InitFlag...
null
https://raw.githubusercontent.com/lockie/racket-sdl2/a25bfa28e32c60f8219eb712255fa5b07e3a8ad5/image/main.rkt
racket
#lang racket/base (require ffi/unsafe ffi/unsafe/define sdl2 sdl2/private/lib-path) (provide (except-out (all-defined-out) define-sdl2-image)) (define-ffi-definer define-sdl2-image (ffi-lib (lib-path "image") '("0" #f))) (define-sdl2-image IMG_Linked_Version (_fun -> _SDL_version*)) (define _IMG_InitFlag...
8f7572c0e2b59a452adf9d6871d70f1a9d98138a403c8e9f254b60694f3f50dc
facebookarchive/pfff
layer_coverage.ml
* * Copyright ( C ) 2010 Facebook * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file licens...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/h_program-lang/layer_coverage.ml
ocaml
*************************************************************************** Prelude *************************************************************************** *************************************************************************** Types **************************************************************************...
* * Copyright ( C ) 2010 Facebook * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file licens...
e49592b74c8ed434ea229f53945d869fa5550f2b04d3409ff1c33fc0484ba40b
pentlandedge/s4607
s4607_tests.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright 2016 Pentland Edge Ltd. %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not %% use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Un...
null
https://raw.githubusercontent.com/pentlandedge/s4607/b3cdae404ac5bd50419f33259dfa62af9d1a8d60/test/s4607_tests.erl
erlang
use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Copyright 2016 Pentland Edge Ltd. Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(s4607_tests). -include_lib("eunit/include/eunit.hrl"). -export([east_fortune_packet_list/0]). s4607_test_() -...
4074d799e57d01d5a880f15fd0a26316139408c0091c9872f9b2ed8ee6ce5c8d
fimad/prometheus-haskell
Registry.hs
# LANGUAGE ExistentialQuantification # module Prometheus.Registry ( register , registerIO , unsafeRegister , unsafeRegisterIO , collectMetrics , unregisterAll ) where import Prometheus.Metric import Control.Applicative ((<$>)) import Control.Monad.IO.Class import System.IO.Unsafe (unsafePerformIO) impor...
null
https://raw.githubusercontent.com/fimad/prometheus-haskell/4e2c2f1da1f891e9de3ce5a5260ae92882a9f35e/prometheus-client/src/Prometheus/Registry.hs
haskell
$setup >>> :module +Prometheus >>> unregisterAll | A 'Registry' is a list of all registered metrics, currently represented by their sampling functions. | Registers a metric with the global metric registry. | Registers a metric with the global metric registry. | Registers a metric with the global metric registry...
# LANGUAGE ExistentialQuantification # module Prometheus.Registry ( register , registerIO , unsafeRegister , unsafeRegisterIO , collectMetrics , unregisterAll ) where import Prometheus.Metric import Control.Applicative ((<$>)) import Control.Monad.IO.Class import System.IO.Unsafe (unsafePerformIO) impor...
1457724a8e79b039f670d3a3f9a1b5dd6dfa0fde19b3399a3feeb91d587662fc
bwo/monads
test_tree.clj
(ns monads.test-tree (:require [monads.examples.treenumber :as tn] [monads.state :as s] [monads.list :as l] [monads.error :as e] [monads.maybe :as m] [monads.reader :as r] [monads.types :as t]) (:use [expectations :exclude [fail]] [mona...
null
https://raw.githubusercontent.com/bwo/monads/a3fdfa1414dc6efae39ea289022f14449119da89/test/monads/test_tree.clj
clojure
if we just (expect numbered ...), expectations complains: in expected, not actual: null in actual, not expected: null useful!
(ns monads.test-tree (:require [monads.examples.treenumber :as tn] [monads.state :as s] [monads.list :as l] [monads.error :as e] [monads.maybe :as m] [monads.reader :as r] [monads.types :as t]) (:use [expectations :exclude [fail]] [mona...
eded49f0fe2ed52e357caff637c509b6ca681af44b485620168660c9ef050820
bcc32/advent-of-code
game.ml
open! Core open! Async open! Import type t = { init : bool array ; step : (bool * bool * bool * bool * bool, bool) Hashtbl.t } [@@deriving sexp_of] let read () = let%bind contents = Reader.file_contents "input" in let lines = String.split_lines contents in let initial_state, lines = match lines with ...
null
https://raw.githubusercontent.com/bcc32/advent-of-code/653c0f130e2fb2f599d4e76804e02af54c9bb19f/2018/12/game.ml
ocaml
open! Core open! Async open! Import type t = { init : bool array ; step : (bool * bool * bool * bool * bool, bool) Hashtbl.t } [@@deriving sexp_of] let read () = let%bind contents = Reader.file_contents "input" in let lines = String.split_lines contents in let initial_state, lines = match lines with ...
d3a55384e18b55ed98ac87b33cbac2717b8d74a3f2f5828069ba09b60e2010fc
dryewo/cyrus
user.clj
(ns user (:require [clojure.java.javadoc :refer [javadoc]] [clojure.pprint :refer [pprint]] [clojure.reflect :refer [reflect]] [clojure.repl :refer [apropos dir doc find-doc pst source]] [clojure.tools.namespace.repl :refer [refresh-all] :as repl] [clojure.t...
null
https://raw.githubusercontent.com/dryewo/cyrus/880c842e0baa11887854ec3d912c044a2a500449/resources/leiningen/new/cyrus/dev/user.clj
clojure
(ns user (:require [clojure.java.javadoc :refer [javadoc]] [clojure.pprint :refer [pprint]] [clojure.reflect :refer [reflect]] [clojure.repl :refer [apropos dir doc find-doc pst source]] [clojure.tools.namespace.repl :refer [refresh-all] :as repl] [clojure.t...
af66f149aa82c4897d2de9b91f3dfb77e0efc61fe83e8753abea2b3a0a031daa
dnlkrgr/hsreduce
Merge.hs
module Merge.Merge (hsmerge) where import qualified Data.Text as T import qualified Data.Text.IO as TIO import Data.Maybe import qualified Data.Map as M import Data.IORef import Control.Monad import qualified Data.List.NonEmpty as NE import Control.Monad.Random import Data.Generics.Uniplate.Data import Data.Hashabl...
null
https://raw.githubusercontent.com/dnlkrgr/hsreduce/8f66fdee036f8639053067572b55d9a64359d22c/src/Merge/Merge.hs
haskell
get imports rename module -- built-in things our operator / function / variable something external using my unit id shouldn't be a problem because we're just printing these names and not checking later from which module the names come internal external internal ***********************************************...
module Merge.Merge (hsmerge) where import qualified Data.Text as T import qualified Data.Text.IO as TIO import Data.Maybe import qualified Data.Map as M import Data.IORef import Control.Monad import qualified Data.List.NonEmpty as NE import Control.Monad.Random import Data.Generics.Uniplate.Data import Data.Hashabl...
3558c86aeabdb80779a1713f80cecdb48decc78f3aaf212da691879450da2023
samply/blaze
data_readers.clj
{blaze/hash blaze.fhir.hash/from-hex blaze/hash-prefix blaze.fhir.hash/prefix-from-hex blaze/field-name blaze.fhir.spec.type.json/field-name fhir/boolean blaze.fhir.spec.type/boolean fhir/integer blaze.fhir.spec.type/integer fhir/long blaze.fhir.spec.type/long fhir/string blaze.fhir.spec.type/string fhir/decimal...
null
https://raw.githubusercontent.com/samply/blaze/693d07d8fbf9ac4e11af6684978e108bbd193780/modules/fhir-structure/resources/data_readers.clj
clojure
{blaze/hash blaze.fhir.hash/from-hex blaze/hash-prefix blaze.fhir.hash/prefix-from-hex blaze/field-name blaze.fhir.spec.type.json/field-name fhir/boolean blaze.fhir.spec.type/boolean fhir/integer blaze.fhir.spec.type/integer fhir/long blaze.fhir.spec.type/long fhir/string blaze.fhir.spec.type/string fhir/decimal...
772f3007567f3b95d0b4e88a89b3f8cb3c1ec09e85e06ac1298e47c16dfeae8b
tweag/asterius
traceEvent.hs
import Data.Word import Debug.Trace main = do traceEventIO "testing" see # 3874 traceEventIO $ replicate (maxSize + 1) 'A' maxSize :: Int maxSize = fromIntegral (maxBound :: Word16)
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/rts/traceEvent.hs
haskell
import Data.Word import Debug.Trace main = do traceEventIO "testing" see # 3874 traceEventIO $ replicate (maxSize + 1) 'A' maxSize :: Int maxSize = fromIntegral (maxBound :: Word16)
16b6b134e2985188e444637483126c4f1c3d10a1dccde9e9b0ccccdfe0d50f4e
pedestal/pedestal
jetty_test.clj
This test file is a port of the official Ring jetty - adapter test that works with Pedestal interceptors . The original version is ;; here: ;; -clojure/ring/blob/master/ring-jetty-adapter/test/ring/adapter/test/jetty.clj (ns io.pedestal.http.jetty-test (:use clojure.test io.pedestal.http.jetty) (:req...
null
https://raw.githubusercontent.com/pedestal/pedestal/53bfe70143a22cdfd2f0d183023334a199c9e9a2/tests/test/io/pedestal/http/jetty_test.clj
clojure
here: ----------------- !!! CAUTION !!! Using this macro creates a full service which introduces many interceptors into the interceptor chain. This doesn't isolate the service as well as `with-server`. Prefer `with-server` unless you're testing something that requires routes/service-map/etc. ---------------...
This test file is a port of the official Ring jetty - adapter test that works with Pedestal interceptors . The original version is -clojure/ring/blob/master/ring-jetty-adapter/test/ring/adapter/test/jetty.clj (ns io.pedestal.http.jetty-test (:use clojure.test io.pedestal.http.jetty) (:require [clj-ht...
9404ffac691b5e6bdcce5d12a7f7c72ab9ca0138bfebf2998748ebed01a39ed1
haskell-gi/haskell-gi
Documentation.hs
-- | Parsing of documentation nodes. module Data.GI.GIR.Documentation ( Documentation(..) , queryDocumentation ) where import Data.Text (Text) import Text.XML (Element) import Data.GI.GIR.XMLUtils (firstChildWithLocalName, getElementContent, lookupAttr) -- | Documentation for...
null
https://raw.githubusercontent.com/haskell-gi/haskell-gi/bff8f3b92bf2594ea3d6745c346a8de594fc3709/lib/Data/GI/GIR/Documentation.hs
haskell
| Parsing of documentation nodes. | Documentation for a given element. The documentation text is typically encoded in the gtk-doc format, see -doc-manual/ . This can be parsed | Parse the documentation node for the given element of the GIR file.
module Data.GI.GIR.Documentation ( Documentation(..) , queryDocumentation ) where import Data.Text (Text) import Text.XML (Element) import Data.GI.GIR.XMLUtils (firstChildWithLocalName, getElementContent, lookupAttr) with ` Data . GI.GIR.parseGtkDoc ` . data Documentation =...
8e932bc7e72e196fad92d8d20dec47ceced57c0f265096bedc9195cf495dc487
fused-effects/diffused-effects
Throw.hs
module Effect.Throw ( -- * Throw effect Throw(..) , throwError -- * Re-exports , Algebra , Has , run ) where import Algebra import Effect.Throw.Internal (Throw(..)) throwError :: Has (Throw e) m => e -> m a throwError = send . Throw
null
https://raw.githubusercontent.com/fused-effects/diffused-effects/83e070da3232d9a909e06d775f3f245eabb70a84/src/Effect/Throw.hs
haskell
* Throw effect * Re-exports
module Effect.Throw Throw(..) , throwError , Algebra , Has , run ) where import Algebra import Effect.Throw.Internal (Throw(..)) throwError :: Has (Throw e) m => e -> m a throwError = send . Throw
46eae15bb0845109695fbde2154e332fef74bda520253d11db2cc42f564c306e
outpace/remote
service.cljc
(ns outpace.remote.service #?(:clj (:require [clojure.walk :as walk] [clojure.core.async :as async :refer [go]] [clj-http.client :as http] [clojure.string :as string])) #?@(:cljs [(:require [cljs-http.client :as http] [cljs.core.asyn...
null
https://raw.githubusercontent.com/outpace/remote/107383eff7efaf55bca871b0fc1652a2eb9a8292/src/outpace/remote/service.cljc
clojure
--------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- Service construction ---------------------------------------------------------------------
(ns outpace.remote.service #?(:clj (:require [clojure.walk :as walk] [clojure.core.async :as async :refer [go]] [clj-http.client :as http] [clojure.string :as string])) #?@(:cljs [(:require [cljs-http.client :as http] [cljs.core.asyn...
56cea003bf98867402ef032a94af1a34a318fdeac081e757b8734b19fbb4f203
iu-parfunc/lvars
CtrieMap.hs
# LANGUAGE InstanceSigs # # LANGUAGE BangPatterns # {-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # {-# LANGUAGE MagicHash ...
null
https://raw.githubusercontent.com/iu-parfunc/lvars/78e73c96a929aa75aa4f991d42b2f677849e433a/src/lvish/Data/LVar/CtrieMap.hs
haskell
# LANGUAGE CPP # # LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE MagicHash # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE Trustworthy # * The type and its basic operations * ...
# LANGUAGE InstanceSigs # # LANGUAGE BangPatterns # # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # # LANGUAGE TypeFamilies # | This module provides finite maps that only grow . It is based on a /Ctr...
851f0a8b0dd746d1a073fc3aae0671fcb776b3a9b700ef21e296255db055e0e1
bittide/bittide-hardware
Topology.hs
SPDX - FileCopyrightText : 2022 Google LLC -- SPDX - License - Identifier : Apache-2.0 # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # -- | This module defines the top entity for simulation, where every -- non-empty topology is supported. The top entity can be simulated -- using 'simulate'. module Bitt...
null
https://raw.githubusercontent.com/bittide/bittide-hardware/c0d45b7c64451b4897a9a91dddd75add99340a28/elastic-buffer-sim/src/Bittide/Topology.hs
haskell
| This module defines the top entity for simulation, where every non-empty topology is supported. The top entity can be simulated using 'simulate'. | The entity to be simulated consisting of the tunable clock generators, the elastic buffers, the stability checkers, and the clock controls, wired according to th...
SPDX - FileCopyrightText : 2022 Google LLC SPDX - License - Identifier : Apache-2.0 # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # module Bittide.Topology ( simulationEntity , simulate , allStable ) where import Clash.Prelude hiding (simulate) import Clash.Signal.Internal ( Signal(..) , Clo...
a298593e8b882465e8a5582cc5d8b237894ef3ac886cdd35441733ce5a0b4ba9
dschrempf/elynx
Parallel.hs
-- | -- Module : ELynx.Tree.Parallel -- Description : Evaluation strategies for trees Copyright : 2021 License : GPL-3.0 - or - later -- -- Maintainer : -- Stability : unstable -- Portability : portable -- Creation date : Mon Sep 7 13:36:45 2020 . -- Parallel evaluation up to a giv...
null
https://raw.githubusercontent.com/dschrempf/elynx/bf5f0b353b5e2f74d29058fc86ea6723133cab5c/elynx-tree/src/ELynx/Tree/Parallel.hs
haskell
| Module : ELynx.Tree.Parallel Description : Evaluation strategies for trees Maintainer : Stability : unstable Portability : portable node, and so on. The layer to which a node belongs should not be confused with the 'depth' of a tree. | Parallel evaluation strategy for a tree into normal fo...
Copyright : 2021 License : GPL-3.0 - or - later Creation date : Mon Sep 7 13:36:45 2020 . Parallel evaluation up to a given layer . By convention layer 0 only has one element : the root node . The layer 1 includes the daughter nodes of the root module ELynx.Tree.Parallel ( parTree, parBr...
f7139481ba3602bf1140b3ad321e9af1800abf17da1c590ce4e27fd1f132face
rbardou/clap
clap.mli
(**********************************************************************************) MIT License (* *) Copyright ( c ) 2020 (* ...
null
https://raw.githubusercontent.com/rbardou/clap/e670f729b2656b8d2eaf20fa5b7349bf9266d6c2/src/clap.mli
ocaml
******************************************************************************** Permission is hereby granted, free of charge, to any person obtaining a copy...
MIT License Copyright ( c ) 2020 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 Softwa...
731c66fb116fb1e545314cff8915ec079aa7288158420831736fba9b1d55e9c5
ku-fpg/kansas-lava
Trace.hs
{-# LANGUAGE GADTs, KindSignatures, RankNTypes #-} module Control.Monad.Trans.Trace where import Control.Monad.Trans.Class import Control.Monad.IO.Class import Control.Monad Monad transformer data TraceT :: * -> (* -> *) -> * -> * where Event :: m (e,a) -> TraceT e m a NonEvent :...
null
https://raw.githubusercontent.com/ku-fpg/kansas-lava/cc0be29bd8392b57060c3c11e7f3b799a6d437e1/Control/Monad/Trans/Trace.hs
haskell
# LANGUAGE GADTs, KindSignatures, RankNTypes #
module Control.Monad.Trans.Trace where import Control.Monad.Trans.Class import Control.Monad.IO.Class import Control.Monad Monad transformer data TraceT :: * -> (* -> *) -> * -> * where Event :: m (e,a) -> TraceT e m a NonEvent :: m a -> TraceT e m...
d96c4035f89a32bd2b751560c508a49278ac384f720b825f086538cccd848f31
skanev/playground
43.scm
SICP exercise 4.43 ; ; Use the amb evaluator to solve the following puzzle: ; father has a yacht and so has each of his four friends . Colonel , Mr. , Sir , and Dr. . Each of the five also has one daughter and each has named his yacht after a daughter of one of the others . Sir 's yacht is t...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/04/43.scm
scheme
Use the amb evaluator to solve the following puzzle: Mr. the Rosalind . The , owned by Colonel father? The rest of the interpreter.
SICP exercise 4.43 father has a yacht and so has each of his four friends . Colonel , Mr. , Sir , and Dr. . Each of the five also has one daughter and each has named his yacht after a daughter of one of the others . Sir 's yacht is the , Mr. , is named after Sir 's daughter . 's fat...
3cf67289a7cca5fb0a63c3654a21207205dfeda77a09fdbf6449ac303cc6104c
qfpl/reflex-tutorial
Posts.hs
{-# LANGUAGE OverloadedStrings #-} module Posts ( posts ) where import GHCJS.DOM.Types (JSM) import Posts.Event (eventPostExamples) import Posts.Behavior (behaviorPostExamples) import Posts.Dynamic (dynamicPostExamples) import Posts.RecursiveDo (recursiveDoPostExamples) import Posts.Dom (domPostExamples) import...
null
https://raw.githubusercontent.com/qfpl/reflex-tutorial/07c1e6fab387cbeedd031630ba6a5cd946cc612e/code/basics/src/Posts.hs
haskell
# LANGUAGE OverloadedStrings #
module Posts ( posts ) where import GHCJS.DOM.Types (JSM) import Posts.Event (eventPostExamples) import Posts.Behavior (behaviorPostExamples) import Posts.Dynamic (dynamicPostExamples) import Posts.RecursiveDo (recursiveDoPostExamples) import Posts.Dom (domPostExamples) import Posts.Switch (switchPostExamples) ...
fdad3d462382aa54b0748d2ed973399a6dc547848caf7ccebccdc07551e26ae1
stuart-robinson/clojure-serverless-demo
views.cljs
(ns clojure-serverless-demo.views (:require [re-frame.core :as re-frame] [clojure-serverless-demo.subs :as subs] [clojure-serverless-demo.events :as events] [reagent.core :as r])) (defn user-message-input [] (let [message (r/atom "") ok-click (fn [event] ...
null
https://raw.githubusercontent.com/stuart-robinson/clojure-serverless-demo/d8d046bd79ccfe3dcea8823e8eddc3cb78a9f732/src/cljs/clojure_serverless_demo/views.cljs
clojure
(ns clojure-serverless-demo.views (:require [re-frame.core :as re-frame] [clojure-serverless-demo.subs :as subs] [clojure-serverless-demo.events :as events] [reagent.core :as r])) (defn user-message-input [] (let [message (r/atom "") ok-click (fn [event] ...
e9ae51666088cea6099ddfe4e0aa849c9ac9b62eb09e67177b0d092c1978ab2e
calyau/maxima
trans1.lisp
-*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; The data in this file contains enhancments. ;;;;; ;;; ;;;;; ...
null
https://raw.githubusercontent.com/calyau/maxima/9352a3f5c22b9b5d0b367fddeb0185c53d7f4d02/src/trans1.lisp
lisp
Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; The data in this file contains enhancments. ;;;;; ;;;;; ; ; ; ; All rights reserved ;;;;; ; ; ; ; Ma...
(in-package :maxima) This file handles System FSUBR translation properties that were not handled in TRANSL . (macsyma-module trans1) (defun quoted-symbolp (form) (and (consp form) (eq 'quote (car form)) (symbolp (cadr form)))) (def%tr $apply (form) (let* ((fun (dtranslate (cadr form))) (mode (c...
00b12e00f0317be27560284d9aad95bc3a3190bf3d5e9ee14ae124b04a7ed147
ml4tp/tcoq
libnames.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/library/libnames.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * FIXME: ought to be in Names.dir_pa...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Util open Pp open Loc op...
4017ada29e9e25854d8f76dddab8badc338f96a3bcef534969c6c85f189b68a6
PacktPublishing/HaskellCookbook
Main.hs
module Main where import Data.Functor import Control.Applicative import Control.Monad newtype StateT s m a = StateT { runStateT :: s -> m (a, s) } instance Functor m => Functor (StateT s m) where fmap f (StateT func) = let stateFunc s = (\(xa,xs) -> (f xa, xs)) <$> func s in StateT stateF...
null
https://raw.githubusercontent.com/PacktPublishing/HaskellCookbook/27e146b6d91c008a7b1d06eda4ea63fe8a8cdb04/Ch_5-More_about_monads/state-monad-trans/src/Main.hs
haskell
Use the applicative instance of the embedded applicative to induce both x as well as state s into it. m (f :: a -> b, s) m (a, s) Convert m (f :: a -> b, s) to m (f :: (a, s) -> (b, s) ) m (a, s) Implement get and put
module Main where import Data.Functor import Control.Applicative import Control.Monad newtype StateT s m a = StateT { runStateT :: s -> m (a, s) } instance Functor m => Functor (StateT s m) where fmap f (StateT func) = let stateFunc s = (\(xa,xs) -> (f xa, xs)) <$> func s in StateT stateF...
175760fcf6eadb734fd40e48596a1cf32c3a95e07c0352b8921ee6066da61c8e
gsakkas/rite
2987.ml
let rec app l1 l2 = match l1 with | [] -> l2 | h::t -> h :: (app t l2);; let rec digitsOfInt n = if n >= 10 then app digitsOfInt (n / 10) [n mod 10] else [n];; fix let rec app l1 l2 = match l1 with | [ ] - > l2 | h::t - > h : : ( app t l2 ) ; ; let rec digitsOfInt n = if n > = 10 then app ( digitsOfIn...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14/2987.ml
ocaml
let rec app l1 l2 = match l1 with | [] -> l2 | h::t -> h :: (app t l2);; let rec digitsOfInt n = if n >= 10 then app digitsOfInt (n / 10) [n mod 10] else [n];; fix let rec app l1 l2 = match l1 with | [ ] - > l2 | h::t - > h : : ( app t l2 ) ; ; let rec digitsOfInt n = if n > = 10 then app ( digitsOfIn...
bbc0a8caf6a12e19fa4bb5068117cecc7dbc9bda9ecd7587cadf2289d0a1268d
velveteer/crossed
nav.cljs
(ns app.components.nav (:require-macros [app.logging :refer [log]] [reagent.ratom :refer [reaction]]) (:require [app.routes :as routes] [re-frame.core :refer [dispatch subscribe]])) (defn user-avatar [user score] (fn [user score] [:div.mw3.absolute.top-1.right-1 [:div.avat...
null
https://raw.githubusercontent.com/velveteer/crossed/ebcd4260060bfb46ba1da4f722799239ad61d30c/src/app/components/nav.cljs
clojure
(ns app.components.nav (:require-macros [app.logging :refer [log]] [reagent.ratom :refer [reaction]]) (:require [app.routes :as routes] [re-frame.core :refer [dispatch subscribe]])) (defn user-avatar [user score] (fn [user score] [:div.mw3.absolute.top-1.right-1 [:div.avat...
895d45b569386846ef6a37f94f29a6db898495bbf22c87b67b9c0a83e476c1b7
Ramarren/cl-parser-combinators
test-expression.lisp
(in-package :parser-combinators-tests) (defsuite* (expression-test :in parser-combinators-tests)) ;;; parser for basic +-*/ arithmetic with subexpressions and negation (def-cached-parser unary-minus? (mdo (char? #\-) (result (curry #'list '-)))) (defun expr-arith? () (expression? (nat*) `((,(unar...
null
https://raw.githubusercontent.com/Ramarren/cl-parser-combinators/9c7569a4f6af5e60c0d3a51d9c15c16d1714c845/test-expression.lisp
lisp
parser for basic +-*/ arithmetic with subexpressions and negation
(in-package :parser-combinators-tests) (defsuite* (expression-test :in parser-combinators-tests)) (def-cached-parser unary-minus? (mdo (char? #\-) (result (curry #'list '-)))) (defun expr-arith? () (expression? (nat*) `((,(unary-minus?) :unary) (,(factor-op?) :left) ...
7626c1c81bdbefaf9471061456bdf9e284d159e7f0b585a4bb56d7929dd0ed4a
runeksvendsen/bitcoin-payment-channel
Client.hs
module PaymentChannel.Client ( validFundingInfo , channelWithInitialPayment , createPayment , createPaymentCapped , createClosingPayment , getRefundBitcoinTx , RefundTx ) where import PaymentChannel.Server (getSignedSettlementTx) import PaymentChannel.Internal.Payment import PaymentChannel.I...
null
https://raw.githubusercontent.com/runeksvendsen/bitcoin-payment-channel/3d2ee56c027571d1a86092c317640e5eae7adde3/src/PaymentChannel/Client.hs
haskell
^ Invalid funding output or dusty funding amount ^ Insufficient funding value to pay server-defined "open price" ^ Client private key. Its corresponding public key was provided to server when fetching 'RBPCP.FundingInfo' ^ Channel expiration date (was also provided to the server when fetching 'RBPCP.FundingInfo') ...
module PaymentChannel.Client ( validFundingInfo , channelWithInitialPayment , createPayment , createPaymentCapped , createClosingPayment , getRefundBitcoinTx , RefundTx ) where import PaymentChannel.Server (getSignedSettlementTx) import PaymentChannel.Internal.Payment import PaymentChannel.I...
f907bf9250d89ab20decce92a2e4a54e66011ef1fe013e74bbb298cba4c5d50a
mpenet/tape
cycle_listener.clj
(ns qbits.tape.cycle-listener (:refer-clojure :exclude [cycle]) (:require [clojure.java.io :as io] [clojure.tools.logging :as log] [clojure.string :as str]) (:import (net.openhft.chronicle.queue.impl StoreFileListener) (net.openhft.chronicle.queue RollCycle RollCycles) ...
null
https://raw.githubusercontent.com/mpenet/tape/615293e2d9eeaac36b5024f9ca1efc80169ac75c/src/qbits/tape/cycle_listener.clj
clojure
finally delete file we just compressed gzip everything after N drop all gzip files after N
(ns qbits.tape.cycle-listener (:refer-clojure :exclude [cycle]) (:require [clojure.java.io :as io] [clojure.tools.logging :as log] [clojure.string :as str]) (:import (net.openhft.chronicle.queue.impl StoreFileListener) (net.openhft.chronicle.queue RollCycle RollCycles) ...
c94bfbfa1ef916c55a5b651c8d5f0c32e90774ea0bbb97d1c38a5751810f411b
ghadishayban/pex
project.clj
(defproject com.champbacon/pex "0.0.1-SNAPSHOT" :description "a data-driven parsing library" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.7.0"]] :java-source-paths ["src-java"])
null
https://raw.githubusercontent.com/ghadishayban/pex/aa3255f6aa9086ca867d0ff401b8bbb2a306d86c/project.clj
clojure
(defproject com.champbacon/pex "0.0.1-SNAPSHOT" :description "a data-driven parsing library" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.7.0"]] :java-source-paths ["src-java"])
3cecb4c8ff0386d2038f2e40f501dc2bed228d5ed90848466c19849842867c54
inria-parkas/sundialsml
nvector_serial_top.ml
(* Automatically generated file - don't edit! See the Makefile. *) Sundials_top.install_printers [ "Nvector_serial.pp"; ];;
null
https://raw.githubusercontent.com/inria-parkas/sundialsml/0c46b0c6c067677af6ef8006260b9e697cc0562b/src/nvectors/nvector_serial_top.ml
ocaml
Automatically generated file - don't edit! See the Makefile.
Sundials_top.install_printers [ "Nvector_serial.pp"; ];;
3693bb2284a7fe2978b1a9a76e477a27a7934ed15d9e9e93cb922cb7677f128d
yi-editor/yi
Copy.hs
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | Module : Yi . . Vim . Ex . Commands . Copy -- License : GPL-2 -- Maintainer : -- Stability : experimental -- Portability : portable -- -- :copy ex command to copy selection to the clipboard. module Yi.Keymap.Vim.Ex.C...
null
https://raw.githubusercontent.com/yi-editor/yi/58c239e3a77cef8f4f77e94677bd6a295f585f5f/yi-keymap-vim/src/Yi/Keymap/Vim/Ex/Commands/Copy.hs
haskell
# LANGUAGE OverloadedStrings # # OPTIONS_HADDOCK show-extensions # | License : GPL-2 Maintainer : Stability : experimental Portability : portable :copy ex command to copy selection to the clipboard.
Module : Yi . . Vim . Ex . Commands . Copy module Yi.Keymap.Vim.Ex.Commands.Copy (parse) where import Control.Monad (void) import qualified Data.Attoparsec.Text as P (match, string) import Data.Monoid ((<>)) import Yi.Editor ...
fc4a1bf73a9d59a42b33e2210ac41c0363c951adf55cf8510cbc225349820fd8
UU-ComputerScience/uhc
Storable.hs
# LANGUAGE NoImplicitPrelude , CPP # # OPTIONS_GHC -XNoImplicitPrelude # # EXCLUDE_IF_TARGET js # {-# EXCLUDE_IF_TARGET cr #-} ----------------------------------------------------------------------------- -- | -- Module : Foreign.Storable Copyright : ( c ) The FFI task force 2001 -- License : see lib...
null
https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/ehclib/uhcbase/Foreign/Storable.hs
haskell
# EXCLUDE_IF_TARGET cr # --------------------------------------------------------------------------- | Module : Foreign.Storable License : see libraries/base/LICENSE Stability : provisional Portability : portable The module "Foreign.Storable" provides most elementary support for marshalling and...
# LANGUAGE NoImplicitPrelude , CPP # # OPTIONS_GHC -XNoImplicitPrelude # # EXCLUDE_IF_TARGET js # Copyright : ( c ) The FFI task force 2001 Maintainer : Foreign Function Interface ( FFI ) , and will normally be imported via module Foreign.Storable ( Storable( ) where #ifdef __NHC__ i...
ba7485e44b184f67889dda75eb7c887517162e2f31a7cbc10f03d8507dff59e3
clojure-interop/java-jdk
core.clj
(ns javax.xml.bind.core (:refer-clojure :only [require comment defn ->]) (:import )) (require '[javax.xml.bind.Binder]) (require '[javax.xml.bind.DataBindingException]) (require '[javax.xml.bind.DatatypeConverter]) (require '[javax.xml.bind.DatatypeConverterInterface]) (require '[javax.xml.bind.Element]) (require ...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/bind/core.clj
clojure
(ns javax.xml.bind.core (:refer-clojure :only [require comment defn ->]) (:import )) (require '[javax.xml.bind.Binder]) (require '[javax.xml.bind.DataBindingException]) (require '[javax.xml.bind.DatatypeConverter]) (require '[javax.xml.bind.DatatypeConverterInterface]) (require '[javax.xml.bind.Element]) (require ...
8503d262e55fbc8ef5c689155f1ef13d7f6ac0ddf6d82ba41051ded3946ef282
tweag/linear-base
Main.hs
module Main where import Test.Foreign (foreignGCTests) import Test.Generic (genericTests) import Test.Quicksort (quickSortTests) import Test.Tasty main :: IO () main = defaultMain allTests allTests :: TestTree allTests = testGroup "All tests" [ foreignGCTests, quickSortTests, genericTests ]...
null
https://raw.githubusercontent.com/tweag/linear-base/6d973b280d0d8d028cb5a1066ee30c2d0420a75e/examples/Main.hs
haskell
module Main where import Test.Foreign (foreignGCTests) import Test.Generic (genericTests) import Test.Quicksort (quickSortTests) import Test.Tasty main :: IO () main = defaultMain allTests allTests :: TestTree allTests = testGroup "All tests" [ foreignGCTests, quickSortTests, genericTests ]...
808d44e7d423df8c25cca9c0af77b8ab8ea719f694423e986fb8469ca80a3ff5
rudolph-miller/dyna
overview.lisp
(defvar *dyna* (make-dyna :credentials (cons (asdf::getenv "AWS_ACCESS_KEY") (asdf::getenv "AWS_SECRET_KEY")) :region "ap-northeast-1")) (defclass thread () ((forum-name :key-type :hash :attr-name "ForumName" :initar...
null
https://raw.githubusercontent.com/rudolph-miller/dyna/d8cf27bc7428e3ac578ed704ff72de98582d89e0/examples/overview.lisp
lisp
=> T => T
(defvar *dyna* (make-dyna :credentials (cons (asdf::getenv "AWS_ACCESS_KEY") (asdf::getenv "AWS_SECRET_KEY")) :region "ap-northeast-1")) (defclass thread () ((forum-name :key-type :hash :attr-name "ForumName" :initar...
b7dc2546cd86e9990122fc38f4d93a1d23e7b3146648ecff0574c72d2e3b0c28
lehins/massiv
Mutable.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleContexts # # LANGUAGE MonoLocalBinds # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Test.Massiv.Array.Mutable ( -- * Spec for safe Mutable instance mutableSpec, prop_GenerateArray, prop_iMapiMapM, prop_Sh...
null
https://raw.githubusercontent.com/lehins/massiv/67a920d4403f210d0bfdad1acc4bec208d80a588/massiv-test/src/Test/Massiv/Array/Mutable.hs
haskell
# LANGUAGE RankNTypes # * Spec for safe Mutable instance * Atomic ops spec Fun Word Word -> ArrTiny D ix Word -> Property TODO: Improve runtime speed! increase the outer most dimension, just so the structure doesn't change Make sure we can write into the newly allocated area | Try to write many e...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleContexts # # LANGUAGE MonoLocalBinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Test.Massiv.Array.Mutable ( mutableSpec, prop_GenerateArray, prop_iMapiMapM, prop_Shrink, prop_GrowShrink, prop_unfoldrList, prop_unfoldrReverse...
5ac99c3e3322429b036e2d7d50d3604d9e254c4edcad4599e3b21826b60fbd8f
pokepay/aws-sdk-lisp
api.lisp
;; DO NOT EDIT: File is generated by AWS-SDK/GENERATOR. (common-lisp:defpackage #:aws-sdk/services/cur/api (:use) (:nicknames #:aws/cur) (:import-from #:aws-sdk/generator/shape) (:import-from #:aws-sdk/generator/operation) (:import-from #:aws-sdk/api) (:import-from #:aws-sdk/request) (:import-from #:aws-...
null
https://raw.githubusercontent.com/pokepay/aws-sdk-lisp/ad9a8f9294a9799cef5f4d85e0cd34eca418be24/services/cur/api.lisp
lisp
DO NOT EDIT: File is generated by AWS-SDK/GENERATOR.
(common-lisp:defpackage #:aws-sdk/services/cur/api (:use) (:nicknames #:aws/cur) (:import-from #:aws-sdk/generator/shape) (:import-from #:aws-sdk/generator/operation) (:import-from #:aws-sdk/api) (:import-from #:aws-sdk/request) (:import-from #:aws-sdk/error)) (common-lisp:in-package #:aws-sdk/services/c...
2a8f3b7c3bb71e716d056f70261881b295d28b4268d0f7e6c5cd908ef5a9d268
ninenines/cowboy
rfc8297_SUITE.erl
Copyright ( c ) 2018 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS A...
null
https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/test/rfc8297_SUITE.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2018 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(rfc8297_SUITE). -compile(export_all). -compile(nowar...
9a8511bdcf3a6dc9b5c679c166f32873254abb20c59392aff525abba3cd5f2b1
theodormoroianu/SecondYearCourses
lab9_rezolvat_20201210145337.hs
import Prelude hiding (lookup) import qualified Data.List as List class Collection c where empty :: c key value singleton :: key -> value -> c key value insert:: Ord key => key -> value -> c key value -> c key value lookup:: Ord key => key -> c key value -> Maybe value delete :: Ord key => ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/lab9/.history/lab9_rezolvat_20201210145337.hs
haskell
fromList list = insertInto empty list where elemente cu cheia mai mica cheia elementului elemente cu cheia mai mare (Element k1 v1) /= (Element k2 v2) = k2 /= k1 get_lista_elemente :: BTree key value-> [Element key value] get_lista_elemente BEmpty = []
import Prelude hiding (lookup) import qualified Data.List as List class Collection c where empty :: c key value singleton :: key -> value -> c key value insert:: Ord key => key -> value -> c key value -> c key value lookup:: Ord key => key -> c key value -> Maybe value delete :: Ord key => ...
cdef98a5d22d80d923f693d79446d28a83259a512a93204bede6466f589c36e0
geneweb/geneweb
test_utils.ml
open Geneweb open OUnit2 open Def let mutil_contains _ = let str = "foo bar" in let test t b1 = assert_equal b1 (Mutil.contains str t) in test "foo" true; test "baz" false; test "foo_b" false; test "foo b" true; test "foo__b" false; test "bar__" false; test "r" true; test "" true let mutil_start_w...
null
https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/test/test_utils.ml
ocaml
open Geneweb open OUnit2 open Def let mutil_contains _ = let str = "foo bar" in let test t b1 = assert_equal b1 (Mutil.contains str t) in test "foo" true; test "baz" false; test "foo_b" false; test "foo b" true; test "foo__b" false; test "bar__" false; test "r" true; test "" true let mutil_start_w...
adc674b9dbe06e623c758525563be67af0c44cf77171747f0db5b702ffba9bd8
zotonic/zotonic
filter_escape_check.erl
@author < > 2021 %% @doc Ensure a value is properly escaped. Copyright 2021 %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by app...
null
https://raw.githubusercontent.com/zotonic/zotonic/34bf02fc072daf3492af1173d2845143fc027dfa/apps/zotonic_mod_base/src/filters/filter_escape_check.erl
erlang
@doc Ensure a value is properly escaped. you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licens...
@author < > 2021 Copyright 2021 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(filter_escape_check). -export([ escape_check/ 2]). -include_lib("zotonic_core/include/zotonic.hrl"). escape_check(unde...
83b27259a43cce9b45ff9a3682278849cadc69417cc26166f185c13a74d193a6
nomaddo/loop
main.ml
open Batteries let dump_ast ast = Format.printf "%s@." (Ast.show ast) let dump_tast tast = Format.printf "%s@." (Typed_ast.show (fun fmt e -> ()) tast) let dump_ila top = Format.printf "%a@." Dump.dump top let dump_ilb top = Format.printf "%a@." Ilb_dump.dump top let typ anonymous = let mod_name = Fi...
null
https://raw.githubusercontent.com/nomaddo/loop/cd2204208b67b7e1f386b730c953404482ca36d6/driver/main.ml
ocaml
try with | _ as exn -> begin let (x, y, z) = ! Lexer.loc in raise exn end
open Batteries let dump_ast ast = Format.printf "%s@." (Ast.show ast) let dump_tast tast = Format.printf "%s@." (Typed_ast.show (fun fmt e -> ()) tast) let dump_ila top = Format.printf "%a@." Dump.dump top let dump_ilb top = Format.printf "%a@." Ilb_dump.dump top let typ anonymous = let mod_name = Fi...
ba66a80eb186ea73295e62f37c96222acb16a72a96c00e7af813c2f85d60a63e
juspay/atlas
Order.hs
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
null
https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/parking-bap/src/Core/Confirm/Order.hs
haskell
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
34f2e28e1f55693c6fa912c90a7a76aa4111de11dbd794ac5907a10b5d149791
tachukao/ocaml-mlir
affine_map.ml
open Ctypes module Bindings (F : FOREIGN) = struct open F (* Gets the context that the given affine map was created with *) let context = foreign "mlirAffineMapGetContext" (Typs.AffineMap.t @-> returning Typs.Context.t) (* Checks whether an affine map is null. *) let is_null = foreign "mlirAffineMapIs...
null
https://raw.githubusercontent.com/tachukao/ocaml-mlir/0e65403c994b16c3e01a55e61b4df7f5a1728af3/src/stubs/affine_map.ml
ocaml
Gets the context that the given affine map was created with Checks whether an affine map is null. Prints an affine map by sending chunks of the string representation and * forwarding `userData to `callback`. Note that the callback may be called * several times with consecutive chunks of the string. Prints ...
open Ctypes module Bindings (F : FOREIGN) = struct open F let context = foreign "mlirAffineMapGetContext" (Typs.AffineMap.t @-> returning Typs.Context.t) let is_null = foreign "mlirAffineMapIsNull" (Typs.AffineMap.t @-> returning bool) Checks if two affine maps are equal . let equal = foreign "ml...
deb11937d98c818a4c41d41876ff4c529e016b9c4cb678ffd13c7170fd9a3d4d
puzza007/openpoker
bot.erl
Copyright ( C ) 2005 Wager Labs , SA %%% This file is part of OpenPoker . %%% OpenPoker 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 your option ) any l...
null
https://raw.githubusercontent.com/puzza007/openpoker/bbd7158c81ba869f9f04ac7295c9fb7ea099a9d2/src/bot.erl
erlang
modify it under the terms of the GNU General Public This program 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 GNU General Public License for more details. License along with this ...
Copyright ( C ) 2005 Wager Labs , SA This file is part of OpenPoker . OpenPoker is free software ; you can redistribute it and/or License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Gene...
88e69b12d6e69a50eab7683c9a4b0f664f7643a97fc1c4a7adf3afecdc425715
quietfanatic/neskell
ASM6502.hs
module ASM6502 where import Prelude hiding (and) import qualified Prelude (and) import Data.Word import Data.Int import qualified Data.Bits as B import qualified Data.Sequence as S import Assembler import ASM import Text.Printf type ASM6502 a = ASM Word16 a type Section6502 a = Section Word16 a type ASMblage6502 = A...
null
https://raw.githubusercontent.com/quietfanatic/neskell/63ebd4316959ab95c8b2a4aea21eb114340a39c0/lib/ASM6502.hs
haskell
case (size of argument type) of This last case will lead to an infinite loop if the argument depends on the size of the generated op. Fortunately, arguments with >* >* * >*) :: Integral a => Word8 -> a -> ASM6502 () ) :: Integral a => a -> Word8 -> ASM6502 () ) = flip (-->*) >*) :: (Integral a, Integral b) => a -...
module ASM6502 where import Prelude hiding (and) import qualified Prelude (and) import Data.Word import Data.Int import qualified Data.Bits as B import qualified Data.Sequence as S import Assembler import ASM import Text.Printf type ASM6502 a = ASM Word16 a type Section6502 a = Section Word16 a type ASMblage6502 = A...
7e15e4324cc60b5c455fd4e2ffa90d17c646a153156345473164b566940b7da8
NorfairKing/the-notes
FirstOrderLogic.hs
module Logic.FirstOrderLogic where import Notes import qualified Prelude as P (map) import Functions.Application.Macro import Sets.Basics.Terms import Logic.AbstractLogic.Macro import Logic.AbstractLogic.Terms import Logic.Prop...
null
https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Logic/FirstOrderLogic.hs
haskell
, Implies "Job(H, M)" "M(H)"
module Logic.FirstOrderLogic where import Notes import qualified Prelude as P (map) import Functions.Application.Macro import Sets.Basics.Terms import Logic.AbstractLogic.Macro import Logic.AbstractLogic.Terms import Logic.Prop...
84e5a98c9d37e1dad1345942f56daa1c174c7c129ff1667f38c43f312e9116a0
unisonweb/unison
NormalizedConstraints.hs
module Unison.PatternMatchCoverage.NormalizedConstraints ( NormalizedConstraints (..), VarInfo (..), VarConstraints (..), EffectInfo (..), markDirty, emptyNormalizedConstraints, updateF, ConstraintUpdate (..), expectCanon, declVar, prettyNormalizedConstraints, prettyDnf, ...
null
https://raw.githubusercontent.com/unisonweb/unison/61b65bfe5b16df10d2ba9ba05afecfaffc016d0b/parser-typechecker/src/Unison/PatternMatchCoverage/NormalizedConstraints.hs
haskell
Each variable may be associated with a number of constraints constraints are normalized into disjunctive normal form and each each other. details. However, the refinement type is inhabited as far as our inhabitation checker is concerned.) solution, and it is easy to expand and print these solutions. | Const...
module Unison.PatternMatchCoverage.NormalizedConstraints ( NormalizedConstraints (..), VarInfo (..), VarConstraints (..), EffectInfo (..), markDirty, emptyNormalizedConstraints, updateF, ConstraintUpdate (..), expectCanon, declVar, prettyNormalizedConstraints, prettyDnf, ...
170076abec2e33394a14f8eeb2843cc529ead10ea4a755dfdd65c9cf2ecd91ca
pat227/ocaml-db-model
uint64_extended.mli
Unfortunately Uint64 module does not define sexp converters , so we have to . module Uint64 = Uint64 module Uint64_extended : sig type t = Uint64.t type uint64 = t val zero : uint64 val one : uint64 val add : uint64 -> uint64 -> uint64 val sub : uint64 -> uint64 -> uint64 val mul : uint64 -> uint64 -> uin...
null
https://raw.githubusercontent.com/pat227/ocaml-db-model/4983f6136027d47a4571b42f34296ab44978b761/src/lib/uint64_extended.mli
ocaml
Unfortunately Uint64 module does not define sexp converters , so we have to . module Uint64 = Uint64 module Uint64_extended : sig type t = Uint64.t type uint64 = t val zero : uint64 val one : uint64 val add : uint64 -> uint64 -> uint64 val sub : uint64 -> uint64 -> uint64 val mul : uint64 -> uint64 -> uin...
d41d93a35a74c36adadc4aa930b87d3b7bc312df623133cf5e831b5a127b3246
Zilliqa/scilla
Accept.ml
This file is part of scilla . Copyright ( c ) 2018 - present Zilliqa Research Pvt . Ltd. scilla 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 you...
null
https://raw.githubusercontent.com/Zilliqa/scilla/8880cadf4c317415dc808fce004e5e06a33492d0/src/base/Accept.ml
ocaml
Warning level to use when contract has code paths with potentially * no accept statement. Warning level to use when contract has code paths with potentially * multiple accept statements. * Collects a set of names of constants that unfold to [Uint128 0]. * Collects a list of the [_amount] fields from [Message...
This file is part of scilla . Copyright ( c ) 2018 - present Zilliqa Research Pvt . Ltd. scilla 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 you...
3cd142f5670e489d3df2af16cf780b68959e98ab02de9e507acaa8d4af358762
CardanoSolutions/ogmios
Metrics.hs
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 /. # LANGUAGE DerivingVia # Mildly safe here and " necessary " because of ekg 's internal store . When register values to sample from ' '...
null
https://raw.githubusercontent.com/CardanoSolutions/ogmios/317c826d9d0388cb7efaf61a34085fc7c1b12b06/server/src/Ogmios/App/Metrics.hs
haskell
to an opaque 'Ekg.Value'. Then, when reading back from the store, we get that same opaque 'Ekg.Value' sum-type. * Metrics * Sensors * Sampler * Logging Sensors | An interface for capturing application metrics and measuring all sort of things that are application-specific. | Initialize new application sensor...
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 /. # LANGUAGE DerivingVia # Mildly safe here and " necessary " because of ekg 's internal store . When register values to sample from ' '...
7ea3a3fcf337e03ce3082e1c20fca9f97760cf24edc616ad68315bce36420be2
cyverse-archive/DiscoveryEnvironmentBackend
gen_query.clj
(ns clj-jargon.gen-query (:require [clojure.string :as string]) (:import [org.irods.jargon.core.query IRODSGenQuery] [org.irods.jargon.core.query RodsGenQueryEnum] [org.irods.jargon.core.query IRODSQueryResultRow] [org.irods.jargon.core.pub IRODSGenQueryExecutor])) (defn result-row...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/libs/clj-jargon/src/clj_jargon/gen_query.clj
clojure
(ns clj-jargon.gen-query (:require [clojure.string :as string]) (:import [org.irods.jargon.core.query IRODSGenQuery] [org.irods.jargon.core.query RodsGenQueryEnum] [org.irods.jargon.core.query IRODSQueryResultRow] [org.irods.jargon.core.pub IRODSGenQueryExecutor])) (defn result-row...