_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
280e5d5dbd4d4e82e9e0859a7a7b0f3ee84fd2a168da95219a38b7df31919270
huangz1990/SICP-answers
test-63-tree-list-1.scm
(load "test-manager/load.scm") (load "63-tree-list-1.scm") (define-each-check (equal? (tree->list-1 (make-tree 7 (make-tree 3 (make-tree 1 '() '()) (make-tree 5 '() '())) ...
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/test-63-tree-list-1.scm
scheme
(load "test-manager/load.scm") (load "63-tree-list-1.scm") (define-each-check (equal? (tree->list-1 (make-tree 7 (make-tree 3 (make-tree 1 '() '()) (make-tree 5 '() '())) ...
6073e30f8dfd7b3965200d58aeed6bc6b2eb793588edd3dd5e210edd63455579
adolenc/cl-neovim
api-low-level.lisp
(in-package :cl-neovim-tests) (in-suite api-low-level-test-suite) (test manual-sync-calls "Test #'call/s (sync) manual calls" (is (= (nvim:call/s t "vim_eval" "3 + 2") 5)) (is (= (nvim:call/s nvim:*nvim-instance* "vim_eval" "3 + 2") 5)) (signals error (nvim:call/s nvim:*nvim-instance* "some_nonexistent_fn")) ...
null
https://raw.githubusercontent.com/adolenc/cl-neovim/7212d305206aaae331a3e2d0d2597b671cec01f4/t/api-low-level.lisp
lisp
(in-package :cl-neovim-tests) (in-suite api-low-level-test-suite) (test manual-sync-calls "Test #'call/s (sync) manual calls" (is (= (nvim:call/s t "vim_eval" "3 + 2") 5)) (is (= (nvim:call/s nvim:*nvim-instance* "vim_eval" "3 + 2") 5)) (signals error (nvim:call/s nvim:*nvim-instance* "some_nonexistent_fn")) ...
f1c085e7e85501a2d58b65054446edd0f26efad5544c204fba509849056a3878
hikettei/cl-waffe
figure.lisp
(in-package :cl-termgraph) (defparameter *dif* 1/16) (defparameter *positive-lines* `("⠒⠒" "⣠⣤" "⣠⣰" "⣠⣼" "⡜⡜" "⣼⡜" "⡇⡇")) (defparameter *negative-lines* `("⠒⠒" "⣤⣄" "⣆⣄" "⣧⣄" "⢣⢣" "⢣⣧" "⡇⡇")) (defgeneric plot (frame pallet)) (defmacro mbind (&rest args) `(multiple-value-bind ,@args)) (defclass figure-graph-fram...
null
https://raw.githubusercontent.com/hikettei/cl-waffe/a471a3cca5aa2aca049a04f8771d999f3dc013ca/source/cl-termgraph/figure.lisp
lisp
set as undefined 共通のheightでlistの値をnormalizeしておくこと descriptions an list of `(:color "name" max min) (if y-max (format result "~a_~C" y-max #\newline))
(in-package :cl-termgraph) (defparameter *dif* 1/16) (defparameter *positive-lines* `("⠒⠒" "⣠⣤" "⣠⣰" "⣠⣼" "⡜⡜" "⣼⡜" "⡇⡇")) (defparameter *negative-lines* `("⠒⠒" "⣤⣄" "⣆⣄" "⣧⣄" "⢣⢣" "⢣⣧" "⡇⡇")) (defgeneric plot (frame pallet)) (defmacro mbind (&rest args) `(multiple-value-bind ,@args)) (defclass figure-graph-fram...
f2967bc61e0fd333613f9b2a3ccf89a452e29b3600d3fc2ffbde8bfda62fa6d6
tomjridge/kv-hash
nv_map_ii.ml
(** NOTE this doesn't have a values file... it just combines partition and bucket *) open Util open Bucket_intf open Bucket_store_intf open Nv_map_ii_intf module Partition_ii = Partition.Partition_ii module Util_ = struct (** Create an initial n-way partition, with values provided by alloc *) let initial_par...
null
https://raw.githubusercontent.com/tomjridge/kv-hash/a07c202a7f228d2a09a655cf782e3eb1d9301ef6/src/nv_map_ii.ml
ocaml
* NOTE this doesn't have a values file... it just combines partition and bucket * Create an initial n-way partition, with values provided by alloc Runtime handle NOTE mutable abbrev FIXME sync partition for reopen FIXME if we open from an RO instance, some of the files may no longer exist, so we shou...
open Util open Bucket_intf open Bucket_store_intf open Nv_map_ii_intf module Partition_ii = Partition.Partition_ii module Util_ = struct let initial_partitioning ~alloc ~n = let stride = Int.max_int / n in Base.List.range ~stride ~start:`inclusive ~stop:`inclusive 0 ((n-1)*stride) |> fun ks -> List....
b3a8bf421439e4a247953cbac3e2ecec82c690febf5d702660b31dadcf17b5a8
imandra-ai/iex-auction-model
mechanical_markets.ml
open Helpers;; open Iex_model.Prelude;; open Iex_model.Price;; open Iex_model.Order;; open Iex_model.Priority;; open Iex_model.Fill;; open Iex_model.Clearing_price;; open Iex_model.Auction;; (**********************************************) (*** Mechanical Markets Blog Post Example ***) (*****************************...
null
https://raw.githubusercontent.com/imandra-ai/iex-auction-model/41436bd1506992c69188179a330cee1e5244222b/examples/mechanical_markets.ml
ocaml
******************************************** ** Mechanical Markets Blog Post Example ** ******************************************** -curious-feature-of-iex-auctions/ The auction goes ahead and results in a single fill Consider the following hidden buy order Run the auction again with the hidden bid on the con...
open Helpers;; open Iex_model.Prelude;; open Iex_model.Price;; open Iex_model.Order;; open Iex_model.Priority;; open Iex_model.Fill;; open Iex_model.Clearing_price;; open Iex_model.Auction;; This first example explores the behaviour discussed in the paragraph beginning : " My understanding is that a hidd...
8f80674608fd18f72f9189c88110f6c31c612188805b5276d32e08e686688fed
startalkIM/ejabberd
fast_xml.erl
%%%---------------------------------------------------------------------- %%% File : fxml_app.erl Author : < > %%% Purpose : Fast XML application Created : 1 May 2013 by < > %%% %%% Copyright ( C ) 2002 - 2019 ProcessOne , SARL . All Rights Reserved . %%% Licensed under the Apache License , Version 2...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/deps/fast_xml/src/fast_xml.erl
erlang
---------------------------------------------------------------------- File : fxml_app.erl Purpose : Fast XML application 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 W...
Author : < > Created : 1 May 2013 by < > Copyright ( C ) 2002 - 2019 ProcessOne , SARL . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(fast_xml). -behaviour(application). -expo...
5713c27feb2a08f250a27a6f515948c462a22d12e41fa6761dfeda9aa19bd8b1
OCamlPro/liquidity
liquidClientSigs.ml
module Liquidity = LiquidityLang module type LANG = sig module Source : sig * type const * ( \ * type expr * \ ) * type contract * type datatype * type loc_info * type location * * val unit : const * val tuple : const list - > const * val...
null
https://raw.githubusercontent.com/OCamlPro/liquidity/3578de34cf751f54b9e4c001a95625d2041b2962/tools/client/liquidClientSigs.ml
ocaml
type expr
module Liquidity = LiquidityLang module type LANG = sig module Source : sig * type const * ( \ * type expr * \ ) * type contract * type datatype * type loc_info * type location * * val unit : const * val tuple : const list - > const * val...
96798250574369c82d2331ee31058b2cbed408a31cca1b84cbdec0c7c321b409
glguy/5puzzle
Cube.hs
module Main where import Ersatz import Booleans import Linear import Select import SparseMap import Control.Applicative import Data.List (nub, permutations) import Data.Traversable (for) import Control.Monad import Data.Foldable(for_) import Prelude hiding ((&&), (||), not, all, any,or,not) data Piece = Piece Int Int...
null
https://raw.githubusercontent.com/glguy/5puzzle/4d86cf9fad3ec3f70c57a167417adea6a3f9f30b/Cube.hs
haskell
| Compute all the unique orientations of a piece along each | Compute a bitmap of the locations that a piece covers when placed at a particular location
module Main where import Ersatz import Booleans import Linear import Select import SparseMap import Control.Applicative import Data.List (nub, permutations) import Data.Traversable (for) import Control.Monad import Data.Foldable(for_) import Prelude hiding ((&&), (||), not, all, any,or,not) data Piece = Piece Int Int...
1585f702803970db6d358637dcda2afa9466da287bf41656b27afb0abd479708
ucsd-progsys/dsolve
dotprod2.ml
let dotprod v1 v2 = begin let sum = ref 0 in let i = ref 0 in let sz = size v1 in let rec loop = if !i < sz then (i := !i + 1; sum := (get v1 i) * (get v2 i) + !sum; loop) else () in loop; !sum end ;;
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/dotprod2.ml
ocaml
let dotprod v1 v2 = begin let sum = ref 0 in let i = ref 0 in let sz = size v1 in let rec loop = if !i < sz then (i := !i + 1; sum := (get v1 i) * (get v2 i) + !sum; loop) else () in loop; !sum end ;;
52a7d684ad630f33d44dd8619d468b3e4108e86e3c5490a0b64ab3f3cf9eb56e
arne-schroppe/dash
BuiltInDefinitions.hs
module Language.Dash.BuiltIn.BuiltInDefinitions ( builtInFunctions , builtInSymbols , bifStringConcatName , bifListConcatName , bifToStringName , bifStringConcatOperator , tupleSymbolName , recordSymbolName , listConsSymbolName , listEmptySymbolName , trueSymbolName , falseSymbolName , preamble , moduleOwner , errorS...
null
https://raw.githubusercontent.com/arne-schroppe/dash/82df755edc6555cba808539970ab6ff225c18b35/src/Language/Dash/BuiltIn/BuiltInDefinitions.hs
haskell
TODO prevent user from accessing these directly TODO should probably be 0 TODO instead of "special" handling for primops, we could (e.g. those with less than n opcodes, etc) index loop1: is index >= length? jmp to next next: loop2: jmp to done done: counter loop1: is index >= length? jmp to next next:
module Language.Dash.BuiltIn.BuiltInDefinitions ( builtInFunctions , builtInSymbols , bifStringConcatName , bifListConcatName , bifToStringName , bifStringConcatOperator , tupleSymbolName , recordSymbolName , listConsSymbolName , listEmptySymbolName , trueSymbolName , falseSymbolName , preamble , moduleOwner , errorS...
aa954085b9ba9ec6d44c52dddfcfa7589dbddafef21d5bb14a417d9e33413440
UCSD-PL/refscript
Lexer.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE NoMonomorphismRestriction # {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TupleSections # {-# LANGUAGE TypeSynonymInstances ...
null
https://raw.githubusercontent.com/UCSD-PL/refscript/884306fef72248ac41ecdbb928bbd7b06ca71bd4/src/Language/Rsc/Parser/Lexer.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeSynonymInstances # # LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE NoMonomorphismRestriction # # LANGUAGE TupleSections # module Language.Rsc.Parser.Lexer where import Prelude hiding (mapM) import Text.Parse...
d54447285e2101c7b150d91dc990976538b9bee8f199a746fd12b6d46135ffc8
Bodigrim/ntru
EES677EP1.hs
| NTRU cryptographic system using the EES677EP1 parameter set , for use at the 192 - bit security level . NTRU cryptographic system using the EES677EP1 parameter set, for use at the 192-bit security level. -} module Math.NTRU.EES677EP1 (keyGen, encrypt, decrypt) where import qualified Math.NTRU as NTRU | G...
null
https://raw.githubusercontent.com/Bodigrim/ntru/1974391559eb49ee1960db423b667867dfce946b/src/Math/NTRU/EES677EP1.hs
haskell
^ A list of ASCII values representing the message ^ A list of numbers representing the public key ^ A list of numbers representing the ciphertext ^ A list of numbers representing the private key ^ A list of numbers representing the public key ^ A list of numbers representing the ciphertext ^ A list of numbers re...
| NTRU cryptographic system using the EES677EP1 parameter set , for use at the 192 - bit security level . NTRU cryptographic system using the EES677EP1 parameter set, for use at the 192-bit security level. -} module Math.NTRU.EES677EP1 (keyGen, encrypt, decrypt) where import qualified Math.NTRU as NTRU | G...
fe1fb6c7cf64ad2df06b091e267227d111cd3acae58a1177a70f825749adb403
kevinlynx/ext-blog
drawer-dispatch.lisp
;;;; drawer-dispatcher.lisp ;;;; ;;;; This file is a part of ext-blog, a common lisp blog engine. ;;;; See file doc/LICENSE for license details. ;;;; Author : ( kevinlynx at gmail dot com ) (in-package #:ext-blog) (export '(render-page)) (defclass drawer-dispatcher() ()) (defgeneric render-page (blog theme route...
null
https://raw.githubusercontent.com/kevinlynx/ext-blog/4f6a6f0ab64f9384d53d41d1208ebaa7b9575534/src/drawer-dispatch.lisp
lisp
drawer-dispatcher.lisp This file is a part of ext-blog, a common lisp blog engine. See file doc/LICENSE for license details. the blog has not been initialized, so we use a temp theme. but if there's no :admin theme, it will crash.
Author : ( kevinlynx at gmail dot com ) (in-package #:ext-blog) (export '(render-page)) (defclass drawer-dispatcher() ()) (defgeneric render-page (blog theme route args) (:documentation "Render blog page by the blog theme")) (defun get-theme (blog data) (if blog (let ((type (getf data :type))) (c...
36d0966700d44169e445984e7e3a6238228c3e9978630a35c6685612bc544eda
ToTal/total
version.ml
let logo = " _______________ _ \n" ^ "|__ _____ __| | |\n" ^ " | | ___ | | __ _| |\n" ^ " | |/ _ \\| |/ _` | |\n" ^ " | | (_) | | (_| | |\n" ^ " |_|\\___/|_|\\__,_|_|\n" let logo_alt = " ____________________ _ _ \n" ^ " | __ ________ __(_) | |\n" ^ " ...
null
https://raw.githubusercontent.com/ToTal/total/fa9c677c9110afd5fb423a4fe24eafff2fd08507/version.ml
ocaml
let logo = " _______________ _ \n" ^ "|__ _____ __| | |\n" ^ " | | ___ | | __ _| |\n" ^ " | |/ _ \\| |/ _` | |\n" ^ " | | (_) | | (_| | |\n" ^ " |_|\\___/|_|\\__,_|_|\n" let logo_alt = " ____________________ _ _ \n" ^ " | __ ________ __(_) | |\n" ^ " ...
f40adda7cca1db590ef9d413dc946ac026f0b93ddf1938e5b93682b68b306412
modular-macros/ocaml-macros
cmi_format.mli
(**************************************************************************) (* *) (* OCaml *) (* *) (* ...
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/typing/cmi_format.mli
ocaml
************************************************************************ OCaml Fabrice L...
Copyright 2012 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the type pers_flags = | Rectypes | Deprecated of string | Opaque | Unsafe_string type cmi_infos = { cmi_name : string; cmi_sign : Types.signature_item list; ...
c55bd0b45dc7d86e98b23a46640e55fc7c08018a78867c7ccefef914e430cfa9
emmabastas/elm-embed
JavaScript.hs
{-# LANGUAGE OverloadedStrings #-} module Generate.JavaScript ( generate , generateForRepl , generateForReplEndpoint ) where import Prelude hiding (cycle, print) import qualified Data.ByteString.Builder as B import Data.Monoid ((<>)) import qualified Data.List as List import Data.Map ((!)) import qualified ...
null
https://raw.githubusercontent.com/emmabastas/elm-embed/c2c4f9dcc5c4f47480f728247ff7b4d0700d7476/compiler/src/Generate/JavaScript.hs
haskell
# LANGUAGE OverloadedStrings # GENERATE GENERATE FOR REPL GENERATE FOR REPL ENDPOINT ADD DEPENDENCIES GENERATE CYCLES GENERATE KERNEL GENERATE ENUM GENERATE BOX GENERATE PORTS GENERATE MANAGER MAIN EXPORTS
module Generate.JavaScript ( generate , generateForRepl , generateForReplEndpoint ) where import Prelude hiding (cycle, print) import qualified Data.ByteString.Builder as B import Data.Monoid ((<>)) import qualified Data.List as List import Data.Map ((!)) import qualified Data.Map as Map import qualified Da...
f21fb171a161cf18345fbbbbd63fb19df71e29bb2e16fe515f4256da23d44ec9
rescript-association/reanalyze
Noalloc.ml
let processCallee ~env ~funDef ~loc callee = match callee with | CL.Path.Pident id -> ( let id = CL.Ident.name id in match env |> Il.Env.find ~id with | Some (FunDef funDefCallee) -> funDef |> Il.FunDef.emit ~instr:(Il.Call funDefCallee.id) | _ -> Log_.warning ~count:false ~loc ~name:"No...
null
https://raw.githubusercontent.com/rescript-association/reanalyze/d3ef53812b412521253bc0597e98421dd9083c82/src/Noalloc.ml
ocaml
let processCallee ~env ~funDef ~loc callee = match callee with | CL.Path.Pident id -> ( let id = CL.Ident.name id in match env |> Il.Env.find ~id with | Some (FunDef funDefCallee) -> funDef |> Il.FunDef.emit ~instr:(Il.Call funDefCallee.id) | _ -> Log_.warning ~count:false ~loc ~name:"No...
3622987dc688d01c011ec3d61938d3782582faaba313af4b8d5d432a6f593539
abdulapopoola/SICPBook
Ex1.05.scm
Exercise 1.5 (define (p) (p)) (define (test x y) (if (= x 0) 0 y)) (test 0 (p)) Applicative order - this always evaluates the arguments first ;and generates results (i.e. primitives) to be passed into other expressions. As such , the evaluation of the p parameter will lead to an infinite loop . ;; ;...
null
https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%201/1.1/Ex1.05.scm
scheme
and generates results (i.e. primitives) to be passed into other expressions. Normal order - evaluation of arguments only occurs when they are needed never occurs because of the comparision with 0 and thus the result will be a 0.
Exercise 1.5 (define (p) (p)) (define (test x y) (if (= x 0) 0 y)) (test 0 (p)) Applicative order - this always evaluates the arguments first As such , the evaluation of the p parameter will lead to an infinite loop . As such , the evaluation of the p parameter ( which causes an infinite loop )
fee051eb06807aaeb888f30fe01734aa9a973d639bb4dba8d92d7619e1257675
gojek/ziggurat
batch_proto_deserializer.clj
(ns ziggurat.middleware.batch.batch-proto-deserializer (:require [ziggurat.middleware.default :refer [deserialize-message]])) (defn- deserialize-key-and-value [key-proto-class value-proto-class topic-entity flatten-protobuf-struct?] (fn [message] (let [key (:key message) value ...
null
https://raw.githubusercontent.com/gojek/ziggurat/f5e0822af8410ea79b7734ef2f41bc98fad3c17f/src/ziggurat/middleware/batch/batch_proto_deserializer.clj
clojure
(ns ziggurat.middleware.batch.batch-proto-deserializer (:require [ziggurat.middleware.default :refer [deserialize-message]])) (defn- deserialize-key-and-value [key-proto-class value-proto-class topic-entity flatten-protobuf-struct?] (fn [message] (let [key (:key message) value ...
b7496805692dd01ebdffa368dafd2ffe5ccec43793300d85ba109ff4dfdb94d6
erlcloud/erlcloud
erlcloud_s3_tests.erl
-*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*- -module(erlcloud_s3_tests). -include_lib("eunit/include/eunit.hrl"). -include("erlcloud.hrl"). -include("erlcloud_aws.hrl"). -include("erlcloud_s3_test_data.hrl"). %% Unit tests for s3. %% Currently only test error handling and retries. %%...
null
https://raw.githubusercontent.com/erlcloud/erlcloud/d1d60130929436b5524a0e70ae17f6da6a2a14b9/test/erlcloud_s3_tests.erl
erlang
Unit tests for s3. Currently only test error handling and retries. =================================================================== Test entry points =================================================================== Handle redirect by using location from error message. Handle redirect by using url from locati...
-*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*- -module(erlcloud_s3_tests). -include_lib("eunit/include/eunit.hrl"). -include("erlcloud.hrl"). -include("erlcloud_aws.hrl"). -include("erlcloud_s3_test_data.hrl"). operation_test_() -> {foreach, fun start/0, fun stop/1...
e3a5867f3a8e1eacd4475b93b08982f2415bb4e66e49bc4005e3bc1cdabc816c
pedestal/pedestal-app
tracking_map.cljs
Copyright 2013 Relevance , Inc. ; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( ) ; which can be found in the file epl-v10.html at the root of this distribution. ; ; By using this software in any fashion, you are agreeing to be bound by ; the terms of this licens...
null
https://raw.githubusercontent.com/pedestal/pedestal-app/509ab766a54921c0fbb2dd7c6a3cb20223b8e1a1/app/src/io/pedestal/app/data/tracking_map.cljs
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.
Copyright 2013 Relevance , Inc. Eclipse Public License 1.0 ( ) (ns io.pedestal.app.data.tracking-map (:require [io.pedestal.app.data.change :as chg])) (declare plain-map merge-when-tracking-map record-change) (deftype TrackingMap [basis map change-map] Object (toString [_] (pr-str map)) IWithMeta (...
8c941459252b4483c27a75f9cf50589c7d6818a5a0527fda7ee881bc67f950e1
jumarko/clojure-experiments
day_02.clj
(ns clojure-experiments.advent-of-code.advent-2022.day-02 " Input: " (:require [clojure-experiments.advent-of-code.advent-2022.utils :as utils] [clojure.string :as str])) (def input (->> (utils/read-input "02") (map #(str/split % #" ")))) Puzzle 1 (def mapping {"A" :rock "B" :paper...
null
https://raw.githubusercontent.com/jumarko/clojure-experiments/cee85d5a927d81983152ad9a8ff479466bc8ed34/src/clojure_experiments/advent_of_code/advent_2022/day_02.clj
clojure
first, try to get points for the outcome of a round => (:scissors :rock) => :lost => 0 ... but that isn't enough because we also need points for the shape we selected => (:scissors :rock) => [:scissors :lost] That's good - now ecanpsulate the logic in a function and run it for all the rounds just sanity check ...
(ns clojure-experiments.advent-of-code.advent-2022.day-02 " Input: " (:require [clojure-experiments.advent-of-code.advent-2022.utils :as utils] [clojure.string :as str])) (def input (->> (utils/read-input "02") (map #(str/split % #" ")))) Puzzle 1 (def mapping {"A" :rock "B" :paper...
d6f0f3c72709477e6efe057cc04f03c97bd15ef8307d122a338d19d5d3c22421
triffon/fp-2022-23
02.sum.rkt
#lang racket (require rackunit rackunit/text-ui) # # # Зад 2 Сумата на всички числа от ` l ` (define (sum l) 'тук) (define l1 '(1 2 3 4 5 6 7 8)) (define l2 '(0 (12 13) (21 22))) (run-tests (test-suite "sum tests" (check-eq? (sum '()) 0) (check-eq? (sum l1) 36) (check...
null
https://raw.githubusercontent.com/triffon/fp-2022-23/56690db370b1c838170e56a4d83bc5ed55d7a785/exercises/cs2/04.scheme.lists/02.sum.rkt
racket
#lang racket (require rackunit rackunit/text-ui) # # # Зад 2 Сумата на всички числа от ` l ` (define (sum l) 'тук) (define l1 '(1 2 3 4 5 6 7 8)) (define l2 '(0 (12 13) (21 22))) (run-tests (test-suite "sum tests" (check-eq? (sum '()) 0) (check-eq? (sum l1) 36) (check...
645a4926a9bf9e64158df9ffb809114c7f3ec6b69ae8899928b3e8b135279972
Octachron/codept
b.ml
type t open C
null
https://raw.githubusercontent.com/Octachron/codept/2d2a95fde3f67cdd0f5a1b68d8b8b47aefef9290/tests/complex/mixed/b.ml
ocaml
type t open C
f88a744048d5916f428bee480b213186a2123d51db17b4f2f8fb1081acee61b7
apache/dubbo-erlang
userOperator.erl
-module(userOperator). -include_lib("dubboerl/include/dubbo.hrl"). -include_lib("dubboerl/include/hessian.hrl"). -define(CURRENT_CLASS_NAME,<<"org.apache.dubbo.erlang.sample.service.facade.UserOperator"/utf8>>). -define(CURRENT_CLASS_VERSION,<<"0.0.0"/utf8>>). -include("dubbo_sample_service.hrl"). %% API -export...
null
https://raw.githubusercontent.com/apache/dubbo-erlang/24e0c1a9028b50d2e9e05e3fe26f4e3335384acc/samples/dubboerl_demo/apps/dubbo_sample_service/src/userOperator.erl
erlang
API behaviour
-module(userOperator). -include_lib("dubboerl/include/dubbo.hrl"). -include_lib("dubboerl/include/hessian.hrl"). -define(CURRENT_CLASS_NAME,<<"org.apache.dubbo.erlang.sample.service.facade.UserOperator"/utf8>>). -define(CURRENT_CLASS_VERSION,<<"0.0.0"/utf8>>). -include("dubbo_sample_service.hrl"). -export([ ...
81f886157eb9042545aeb3eb481de1f35b7bfc30e0c414d4687f5fafa230b91d
rtrusso/scp
sasm-util.scm
;; sasm-util.scm ;; ;; A command-line tool that is used to run the sasm analysis engine ;; on sasm source files and produce useful messages to the console. (need util/list) (need util/string) (need util/filesystem) (need util/io) (need sasm/sasm-machine) (need sasm/sasm-eval) (need sasm/sasm-interp-spec) (...
null
https://raw.githubusercontent.com/rtrusso/scp/2051e76df14bd36aef81aba519ffafa62b260f5c/src/sasm-util.scm
scheme
sasm-util.scm A command-line tool that is used to run the sasm analysis engine on sasm source files and produce useful messages to the console.
(need util/list) (need util/string) (need util/filesystem) (need util/io) (need sasm/sasm-machine) (need sasm/sasm-eval) (need sasm/sasm-interp-spec) (need sasm/sasm-tx) (need sasm/sasm-ast) (need sasm/sasm-visitor) (need sasm/sasm-analyze) (need sasm/sasm-parse) (need sasm/sasm-rewrite) (need sasm/sasm-...
553b296789367fdaba3222004eae771988592ab5bcf047a3aae02160def8ea10
Stratus3D/programming_erlang_exercises
erlang_tips.erl
-module(erlang_tips). -include_lib("stdlib/include/qlc.hrl"). -record(user, {name, email, password}). -record(tip, {url, description, date}). -record(abuse, {ip_address, num_visits}). -export([all_users/0, get_user/1, add_user/3, all_tips/0, get_tip/1, add_tip/3, all_abuse/0, get_abuse/1, add_abuse/2, start_...
null
https://raw.githubusercontent.com/Stratus3D/programming_erlang_exercises/e4fd01024812059d338facc20f551e7dff4dac7e/chapter_20/exercise_2/erlang_tips.erl
erlang
Change these if your node names are different =================================================================== Primary API =================================================================== Get all users in the user table Select a user from the user table by email address Create a user record and store it in t...
-module(erlang_tips). -include_lib("stdlib/include/qlc.hrl"). -record(user, {name, email, password}). -record(tip, {url, description, date}). -record(abuse, {ip_address, num_visits}). -export([all_users/0, get_user/1, add_user/3, all_tips/0, get_tip/1, add_tip/3, all_abuse/0, get_abuse/1, add_abuse/2, start_...
138cafe2e634c58c537754e853fa7037ec4181643601e1b55c898814b84061fe
realworldocaml/book
sexp_pretty_intf.ml
open! Base module type S = sig type sexp type 'a writer = Config.t -> 'a -> sexp -> unit (** [pp_formatter conf fmt sexp] will mutate the fmt with functions such as [set_formatter_tag_functions] *) val pp_formatter : Caml.Format.formatter writer val pp_formatter' : next:(unit -> sexp option) ...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/sexp_pretty/src/sexp_pretty_intf.ml
ocaml
* [pp_formatter conf fmt sexp] will mutate the fmt with functions such as [set_formatter_tag_functions] * Pretty-printing of S-expressions Contains a sexp with associated comments. Does not contain the "#|" "|#"; contains its indentation size.
open! Base module type S = sig type sexp type 'a writer = Config.t -> 'a -> sexp -> unit val pp_formatter : Caml.Format.formatter writer val pp_formatter' : next:(unit -> sexp option) -> Config.t -> Caml.Format.formatter -> unit val pp_buffer : Buffer.t writer val pp_out_channel : Caml....
61aaad0eb9e231e48c00733605b86f778fef55ee9cf944a3e12d13ed5ddc2904
rsnikhil/Forvis_RISCV-ISA-Spec
TestHeapSafety.hs
# LANGUAGE PartialTypeSignatures , ScopedTypeVariables , TupleSections , FlexibleInstances , MultiParamTypeClasses # module TestHeapSafety where From libraries import Control.Arrow (second, (***)) import Control.Exception.Base (assert) import Control.Monad.Reader import Control.Lens hiding (elements) import Data...
null
https://raw.githubusercontent.com/rsnikhil/Forvis_RISCV-ISA-Spec/0c5590a12f4b39644d0497fa6285ad5e33003dfc/micropolicies/TestHeapSafety.hs
haskell
From /src From . ---------------------------------------------------------------------------------- Printing verboseTracing = True value and tag of the current PC current instruction change in registers Change in memory l2, both assumed sorted by their keys and both representing parameter), and returns a list ...
# LANGUAGE PartialTypeSignatures , ScopedTypeVariables , TupleSections , FlexibleInstances , MultiParamTypeClasses # module TestHeapSafety where From libraries import Control.Arrow (second, (***)) import Control.Exception.Base (assert) import Control.Monad.Reader import Control.Lens hiding (elements) import Data...
11163f9d6d7b09da7f5aaddb4533c176514915a342a5f14c8d3a44bd74f38ad8
argp/bap
batScanf.mli
* BatScanf - Extended Scanf module * Copyright ( C ) 1996 * 2009 , LIFO , Universite d'Orleans * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation ...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batScanf.mli
ocaml
* The OCaml scanning facility is reminiscent of the corresponding C feature. However, it is also largely different, simpler, and yet more powerful: the formatted input functions are higher-order functionals and the parameter passing mechanism is just the regular function application not the variable ass...
* BatScanf - Extended Scanf module * Copyright ( C ) 1996 * 2009 , LIFO , Universite d'Orleans * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation ...
f3c810b5bd1f1bb3425fd9a29c977c42c2587b7ed391553ccb0dc69f71e95442
uw-unsat/serval-sosp19
serval-llvm.rkt
#lang racket/base (require racket/port serval/llvm/parse serval/llvm/print) (define m (bytes->module (port->bytes))) (print-module m)
null
https://raw.githubusercontent.com/uw-unsat/serval-sosp19/175c42660fad84b44e4c9f6f723fd3c9450d65d4/serval/serval/bin/serval-llvm.rkt
racket
#lang racket/base (require racket/port serval/llvm/parse serval/llvm/print) (define m (bytes->module (port->bytes))) (print-module m)
17c23da6afc7c1905e90113fd237afe514fc07b9b9ec62da2eddafb1a6b1ea90
adomokos/haskell-katas
Ex16_HofsFunctionApplicationSpec.hs
module Ex16_HofsFunctionApplicationSpec ( spec ) where import Test.Hspec main :: IO () main = hspec spec spec :: Spec spec = do describe "Function application with $" $ do it "let's get rid of parens" $ do pending double the list of 1 - 6 and sum its values 41 `shouldBe` 42 sqrt of 3 + 4 + ...
null
https://raw.githubusercontent.com/adomokos/haskell-katas/be06d23192e6aca4297814455247fc74814ccbf1/test/Ex16_HofsFunctionApplicationSpec.hs
haskell
module Ex16_HofsFunctionApplicationSpec ( spec ) where import Test.Hspec main :: IO () main = hspec spec spec :: Spec spec = do describe "Function application with $" $ do it "let's get rid of parens" $ do pending double the list of 1 - 6 and sum its values 41 `shouldBe` 42 sqrt of 3 + 4 + ...
5c6d8aaa5d8d7fe6606e65a403a2fc9e3c6c4412c715b250defa66595fa9bb0f
MyDataFlow/ttalk-server
rest_stream_response_sup.erl
%% Feel free to use, reuse and abuse the code in this file. @private -module(rest_stream_response_sup). -behaviour(supervisor). %% API. -export([start_link/0]). %% supervisor. -export([init/1]). %% API. -spec start_link() -> {ok, pid()}. start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). %% ...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/cowboy/examples/rest_stream_response/src/rest_stream_response_sup.erl
erlang
Feel free to use, reuse and abuse the code in this file. API. supervisor. API. supervisor.
@private -module(rest_stream_response_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -spec start_link() -> {ok, pid()}. start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). init([]) -> Procs = [], {ok, {{one_for_one, 10, 10}, Procs}}.
87b2370167c173962d3821256237ae2c5ad6aae7456cbeec50f59b0a4376ac89
fendor/hsimport
ModuleTest15.hs
{-# Language PatternGuards #-} module Blub ( blub , foo , bar ) where
null
https://raw.githubusercontent.com/fendor/hsimport/9be9918b06545cfd7282e4db08c2b88f1d8162cd/tests/inputFiles/ModuleTest15.hs
haskell
# Language PatternGuards #
module Blub ( blub , foo , bar ) where
daa21b39f5c1d6f3067727e421556592dffb7d851311fa1a1e893774aecbf31a
tanakh/Peggy
LeftRec.hs
module Text.Peggy.LeftRec ( removeLeftRecursion, ) where import Text.Peggy.Syntax -- Remove only direct left recursion -- TODO: indirect left recursion removeLeftRecursion :: Syntax -> Syntax removeLeftRecursion = concatMap remove where remove (Definition nont typ (Choice es)) | not $ null alphas = [ Defini...
null
https://raw.githubusercontent.com/tanakh/Peggy/78280548d137c9ada703de0e4c9af1cd3cb8f728/Text/Peggy/LeftRec.hs
haskell
Remove only direct left recursion TODO: indirect left recursion
module Text.Peggy.LeftRec ( removeLeftRecursion, ) where import Text.Peggy.Syntax removeLeftRecursion :: Syntax -> Syntax removeLeftRecursion = concatMap remove where remove (Definition nont typ (Choice es)) | not $ null alphas = [ Definition nont typ $ Choice [ Semantic (Sequence $ beta : [NonTermina...
7e49c121b626d58650fcdf23df04aa7217ad84898a5ef816e68e355fd028d61d
Odie/gd-edit
level.clj
(ns gd-edit.commands.level (:require [gd-edit.globals :as globals] [gd-edit.db-utils :as dbu] [gd-edit.printer :as printer] [gd-edit.level :refer :all] [clojure.data :refer [diff]] [gd-edit.utils :as u])) (defn fields-for--modify-character-level [characte...
null
https://raw.githubusercontent.com/Odie/gd-edit/d1ac46fd6eb89c9571199641d9cc2f95e68d139b/src/gd_edit/commands/level.clj
clojure
(ns gd-edit.commands.level (:require [gd-edit.globals :as globals] [gd-edit.db-utils :as dbu] [gd-edit.printer :as printer] [gd-edit.level :refer :all] [clojure.data :refer [diff]] [gd-edit.utils :as u])) (defn fields-for--modify-character-level [characte...
e2f850059f91107d185bcc915017ee76dc14951c1990bc02344b526cb880506a
bscarlet/llvm-general
FloatingPointPredicate.hs
# LANGUAGE MultiParamTypeClasses , TemplateHaskell # MultiParamTypeClasses, TemplateHaskell #-} module LLVM.General.Internal.FloatingPointPredicate where import LLVM.General.Internal.Coding import qualified LLVM.General.Internal.FFI.LLVMCTypes as FFI import qualified LLVM.General.AST.FloatingPointPr...
null
https://raw.githubusercontent.com/bscarlet/llvm-general/61fd03639063283e7dc617698265cc883baf0eec/llvm-general/src/LLVM/General/Internal/FloatingPointPredicate.hs
haskell
# LANGUAGE MultiParamTypeClasses , TemplateHaskell # MultiParamTypeClasses, TemplateHaskell #-} module LLVM.General.Internal.FloatingPointPredicate where import LLVM.General.Internal.Coding import qualified LLVM.General.Internal.FFI.LLVMCTypes as FFI import qualified LLVM.General.AST.FloatingPointPr...
445fe903afd053d22b1881edc639ec43d3dfc70993b0a564048ce2885843f02d
mbutterick/aoc-racket
star2.rkt
7491 a dec -511 if x >= -4 pq inc -45 if cfa == 7 vby dec 69 if tl < 1 yg dec 844 if v > -6 tl inc -756 if u != 9 l inc -267 if f == 0 hnd dec 74 if qcg < 9 pq inc 4 if f >= 0 pq dec -168 if u < 2 vby inc -778 if jus == 0 yg inc 676 if pq < 179 f dec 12 if u == 0 zo dec 347 if e == 0 q inc -934 if u >= -5 jus dec 40 ...
null
https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/2017/d08/star2.rkt
racket
7491 a dec -511 if x >= -4 pq inc -45 if cfa == 7 vby dec 69 if tl < 1 yg dec 844 if v > -6 tl inc -756 if u != 9 l inc -267 if f == 0 hnd dec 74 if qcg < 9 pq inc 4 if f >= 0 pq dec -168 if u < 2 vby inc -778 if jus == 0 yg inc 676 if pq < 179 f dec 12 if u == 0 zo dec 347 if e == 0 q inc -934 if u >= -5 jus dec 40 ...
abad38c664a681bd39647ed633e6d86ba2e329b2e3cb05c0bc7624809b39184f
zellige/zellige
MvtFeaturesSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Data.Geometry.Types.MvtFeaturesSpec where import qualified Data.Aeson as Aeson import qualified Data.HashMap.Strict as HashMapStrict import qualified Data.Scientific as Scientific import qualified Data.Sequence ...
null
https://raw.githubusercontent.com/zellige/zellige/87e6dab11ac4c1843009043580f14422a1d83ebf/test/Data/Geometry/Types/MvtFeaturesSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module Data.Geometry.Types.MvtFeaturesSpec where import qualified Data.Aeson as Aeson import qualified Data.HashMap.Strict as HashMapStrict import qualified Data.Scientific as Scientific import qualified Data.Sequence as Sequence import qualified Data...
bc74a80596df07e6a9c2d011e113499e610e71bd30d20b24142e4855718505b2
racket/pkg-build
pkg-list.rkt
#lang racket/base (require racket/cmdline pkg/lib) (define scope 'installation) (command-line #:once-each [("--user") "User scope" (set! scope 'user)]) (write (installed-pkg-names #:scope scope))
null
https://raw.githubusercontent.com/racket/pkg-build/31fea3651b501e2ad333cf6133527290abd2eed1/private/pkg-list.rkt
racket
#lang racket/base (require racket/cmdline pkg/lib) (define scope 'installation) (command-line #:once-each [("--user") "User scope" (set! scope 'user)]) (write (installed-pkg-names #:scope scope))
3a9bf0533d13bf2be9fc1c557e9b3d555dee771568a9de215ce09b98eb46fe24
input-output-hk/plutus-apps
Helpers.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE LambdaCase # # LANGUAGE TupleSections # module Helpers where import Control.Concurrent qualified as IO import Control.Concurrent.Async qualified as IO import Control.Monad (void, when) import Control.Monad.IO.Class (MonadIO, liftIO) import Data.Function ((&...
null
https://raw.githubusercontent.com/input-output-hk/plutus-apps/38979da68816ab84faf6bfec6d0e7b6d47af651a/marconi-chain-index/test-lib/Helpers.hs
haskell
| Start a testnet. of epochSlots is specific to each blockchain instance. This value era. | An empty transaction | Get [TxIn] and total value for an address. | Adapted from: -output-hk/cardano-node/blob/d15ff2b736452857612dd533c1ddeea2405a2630/cardano-cli/src/Cardano/CLI/Shelley/Run/Transaction.hs#L1105-L1112 -...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE LambdaCase # # LANGUAGE TupleSections # module Helpers where import Control.Concurrent qualified as IO import Control.Concurrent.Async qualified as IO import Control.Monad (void, when) import Control.Monad.IO.Class (MonadIO, liftIO) import Data.Function ((&...
93746270bab8c6f1f03018ac733e05612fc9f46405531ac9cd8fa8a89b95758e
timbertson/opam2nix
download.ml
type error = [ `download_failed of string ] let string_of_error (`download_failed desc) = "Download failed: " ^ desc let max_concurrency = 10 module Ctx = struct type t = unit Lwt_pool.t let init () = Curl.global_init Curl.CURLINIT_GLOBALALL; (* Pool is used only for concurrency limiting, * it doesn't actua...
null
https://raw.githubusercontent.com/timbertson/opam2nix/6f2fbdf3730d49bf8fadc22374a2e270bee9400d/src/download.ml
ocaml
Pool is used only for concurrency limiting, * it doesn't actually manage resources
type error = [ `download_failed of string ] let string_of_error (`download_failed desc) = "Download failed: " ^ desc let max_concurrency = 10 module Ctx = struct type t = unit Lwt_pool.t let init () = Curl.global_init Curl.CURLINIT_GLOBALALL; Lwt_pool.create max_concurrency ~dispose:(fun () -> Lwt.return_un...
b82c13009acf8d736e94c9724f3b742b0a70916eacf02a04146f69570cbcca97
AtnNn/haskell-rethinkdb
Functions.hs
# LANGUAGE FlexibleInstances , OverloadedStrings , GADTs # -- | ReQL Functions -- ReQL was designed for dynamic languages . Many operations take -- optional positional and named arguments. -- -- Optional named arguments can be added using `ex`, for example -- `upsert = ex insert ["conflict" := "update"]` -- -- For o...
null
https://raw.githubusercontent.com/AtnNn/haskell-rethinkdb/a62da54d2570d436815831bcc4136ab736fb23f6/Database/RethinkDB/Functions.hs
haskell
| ReQL Functions optional positional and named arguments. Optional named arguments can be added using `ex`, for example `upsert = ex insert ["conflict" := "update"]` For optional positional arguments this module defines an extra function if the functionality is not available otherwise. For example `argmax` fo...
# LANGUAGE FlexibleInstances , OverloadedStrings , GADTs # ReQL was designed for dynamic languages . Many operations take module Database.RethinkDB.Functions where import Data.Text (Text) import Control.Monad.State import Control.Applicative import Data.Maybe import Data.Default import Data.Monoid import Database...
d65edf20b6868fe295e22e2a5c7a18d65b133a0897dc05be646fc0ef74c36a72
ingolia-lab/RiboSeq
SVMLight.hs
{-# LANGUAGE BangPatterns #-} module Bio.RiboSeq.SVMLight where import Control.Monad import qualified Data.ByteString.Char8 as BS import Data.Char (isSpace) import Data.List import Data.Monoid import Numeric import System.Exit import System.FilePath import System.IO (IOMode(..), withFile) import System.Process im...
null
https://raw.githubusercontent.com/ingolia-lab/RiboSeq/a14390cd95528910a258434c7b84c787f5e1d119/src/Bio/RiboSeq/SVMLight.hs
haskell
# LANGUAGE BangPatterns # -z -v -c -w -j -b -i -p -t and -d, -g, -s, -r, -u -q -n -m -e -h -f -# -v runSVMClassifyWithScore :: RunSVMClassify -> IO ExitCode runSVMClassifyWithScore classify = bracket mkScoreTmp rmScoreTmp $ \scorename -> let classifyTmp = classify...
module Bio.RiboSeq.SVMLight where import Control.Monad import qualified Data.ByteString.Char8 as BS import Data.Char (isSpace) import Data.List import Data.Monoid import Numeric import System.Exit import System.FilePath import System.IO (IOMode(..), withFile) import System.Process import qualified Data.Vector.Unb...
b51870608c5ba0601a07cb02728a8df4123d8080be19261e782c2a0de95b583f
TorXakis/TorXakis
Boute.hs
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} ----------------------------------------...
null
https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/valexpr/src/Boute.hs
haskell
--------------------------------------------------------------------------- | Stability : experimental Portability : portable so as to satisfy the formula @ (for all ((m Int) (n Int)) (=> (distinct n 0) (let ((q (div m n)) (r (mod m n))) (and (= m (+ (* n q) r)) @ ----------------...
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} Module : Boute Division and Mo...
710cb14ed6a64a4954433ac757c0719e2ab7fe818bc50b09861d2f35537e02a9
Simre1/haskell-game
Strategy.hs
# OPTIONS_HADDOCK not - home # module Polysemy.Internal.Strategy where import Polysemy.Internal import Polysemy.Internal.Combinators import Polysemy.Internal.Tactics (Inspector(..)) data Strategy m f n z a where GetInitialState :: Strategy m f n z (f ()) HoistInterpretation :: (a -> n b) -> Strategy m f n ...
null
https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/polysemy/src/Polysemy/Internal/Strategy.hs
haskell
---------------------------------------------------------------------------- | 'Strategic' is an environment in which you're capable of explicitly threading higher-order effect states to the final monad. is extremely similar. ---------------------------------------------------------------------------- -------------...
# OPTIONS_HADDOCK not - home # module Polysemy.Internal.Strategy where import Polysemy.Internal import Polysemy.Internal.Combinators import Polysemy.Internal.Tactics (Inspector(..)) data Strategy m f n z a where GetInitialState :: Strategy m f n z (f ()) HoistInterpretation :: (a -> n b) -> Strategy m f n ...
25cac150efa07af92d1376399769cd9334d217111940a63a413ddd873539fc11
brownplt/Resugarer
lang-min-macros-cps.rkt
#lang racket (require redex) (require "resugar-redex.rkt") (require "lang-min.rkt") (define-macro Let [(Let x e b) (apply (lambda x b) e)]) (define-macro CpsM [(CpsM ($λ x y)) (lambda x (lambda k_ (! CpsT y k_)))] [(CpsM x) (begin x)]) (define-macro CpsT [(CpsT ($apply x y) k) (CpsT x (! lambda...
null
https://raw.githubusercontent.com/brownplt/Resugarer/1353b4309c101f0f1ac2df2cba7f3cba1f0a3a37/prototype/lang-min-macros-cps.rkt
racket
#lang racket (require redex) (require "resugar-redex.rkt") (require "lang-min.rkt") (define-macro Let [(Let x e b) (apply (lambda x b) e)]) (define-macro CpsM [(CpsM ($λ x y)) (lambda x (lambda k_ (! CpsT y k_)))] [(CpsM x) (begin x)]) (define-macro CpsT [(CpsT ($apply x y) k) (CpsT x (! lambda...
86b01500adec6e6d3b36c29b191bf5deab59d89fc440ba3c407115a4f0de2cb1
yoriyuki/Camomile
test_uCol.ml
$ I d : test - uCol.ml , v 1.13 2006/08/13 21:23:08 yori Exp $ (* Copyright 2002,2003,2004,2005,2006 Yamagata Yoriyuki *) open CamomileLibraryTest.Camomile open UPervasives open Blender open Printf open TestUColJapanese let rec lex_compare_aux i t1 t2 = if i >= UText.length t1 then if i >= UText.length t2 the...
null
https://raw.githubusercontent.com/yoriyuki/Camomile/d7d8843c88fae774f513610f8e09a613778e64b3/camomile-test/tester/test_uCol.ml
ocaml
Copyright 2002,2003,2004,2005,2006 Yamagata Yoriyuki
$ I d : test - uCol.ml , v 1.13 2006/08/13 21:23:08 yori Exp $ open CamomileLibraryTest.Camomile open UPervasives open Blender open Printf open TestUColJapanese let rec lex_compare_aux i t1 t2 = if i >= UText.length t1 then if i >= UText.length t2 then 0 else ~-1 else if i >= UText.length t2 then 1 else ...
c8a5026f033e31dba28302532e00794d8166397f0a1e81493034dc647f4b664e
ocaml-multicore/ocaml-tsan
includecore.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/typing/includecore.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Typedtree open Types type position = Errortrace.position = First | Second type primitive_mismatch...
1a68ab90b232ab5ca73fc34677fcf6a4cda98fd1aa4c07800b7a9aa05f2fe865
RyanHope/ACT-R
production-compilation-issues.lisp
(clear-all) (defvar *val1*) (defvar *val2*) (defvar *responses*) (defvar *start-time*) (defvar *times*) (defvar *exp-length*) (defvar *task-over*) (defparameter *model* t) (defparameter *result-matrix* (make-array '(4 4 4) :initial-contents '((("win" "lose" "draw" "lose") ("win" "lose" "draw" "lose") ("win" "lose" "d...
null
https://raw.githubusercontent.com/RyanHope/ACT-R/c65f3fe7057da0476281ad869c7963c84c0ad735/tutorial/unit7/production-compilation-issues.lisp
lisp
This is only safe for virtual and Environment windows because present-next-trial calls ACT-R commands. See docs/device-interaction-issues.doc for more details.
(clear-all) (defvar *val1*) (defvar *val2*) (defvar *responses*) (defvar *start-time*) (defvar *times*) (defvar *exp-length*) (defvar *task-over*) (defparameter *model* t) (defparameter *result-matrix* (make-array '(4 4 4) :initial-contents '((("win" "lose" "draw" "lose") ("win" "lose" "draw" "lose") ("win" "lose" "d...
56913715e62004d4a95390690b27516f7cb60f518f28975ce752509099ebbf28
o1-labs/ppx_version
versioned_bad_wrapped_module_structure.ml
module Foo = struct module Unwrapped = struct module Stable = struct module V1 = struct type t [@@deriving version {wrapped}] end end end end
null
https://raw.githubusercontent.com/o1-labs/ppx_version/74df914452b6ea324020fd4a8780ce196f1bf14a/test/versioned_bad_wrapped_module_structure.ml
ocaml
module Foo = struct module Unwrapped = struct module Stable = struct module V1 = struct type t [@@deriving version {wrapped}] end end end end
25d0852a52b32e12759e350b38ceef04ca000a06c17429c046c455867f0ae551
23Skidoo/ghc-parmake
ReadP.hs
----------------------------------------------------------------------------- -- | Module : Distribution . Compat . ReadP Copyright : ( c ) The University of Glasgow 2002 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Portability : portable -- This is a li...
null
https://raw.githubusercontent.com/23Skidoo/ghc-parmake/c4d7fb042f5138588fa54d0153be1aee93db3835/src/Distribution/Compat/ReadP.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Portability : portable It parses all alternatives in parallel, so it never keeps hold of the beginning of the input string, a common source of space leaks...
Module : Distribution . Compat . ReadP Copyright : ( c ) The University of Glasgow 2002 This is a library of parser combinators , originally written by . See also 's paper /Parallel This version of ReadP has been locally hacked to make it H98 , by < mailto: > module Distribution.Compat....
a02b5500edb3070d433cd51f0985a415d1c3298fa764129be58002b489d204c5
bscarlet/llvm-general
RMWOperation.hs
# LANGUAGE TemplateHaskell , MultiParamTypeClasses # TemplateHaskell, MultiParamTypeClasses #-} module LLVM.General.Internal.RMWOperation where import LLVM.General.AST.RMWOperation import qualified LLVM.General.Internal.FFI.LLVMCTypes as FFI import LLVM.General.Internal.Coding genCodingInstance [t...
null
https://raw.githubusercontent.com/bscarlet/llvm-general/61fd03639063283e7dc617698265cc883baf0eec/llvm-general/src/LLVM/General/Internal/RMWOperation.hs
haskell
# LANGUAGE TemplateHaskell , MultiParamTypeClasses # TemplateHaskell, MultiParamTypeClasses #-} module LLVM.General.Internal.RMWOperation where import LLVM.General.AST.RMWOperation import qualified LLVM.General.Internal.FFI.LLVMCTypes as FFI import LLVM.General.Internal.Coding genCodingInstance [t...
ae9e15564e55ab6bdea0c6d57ef1f99fb70406eef29d56516d9d924b64eeacfa
LambdaScientist/CLaSH-by-example
Sort.hs
-- {-# LANGUAGE ScopedTypeVariables #-} -- {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGU...
null
https://raw.githubusercontent.com/LambdaScientist/CLaSH-by-example/e783cd2f2408e67baf7f36c10398c27036a78ef3/CLaSHExamples/PolymophicCLaSHExample/Sort.hs
haskell
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UndecidableInstances #-} # LANGUAGE BangPatterns # # LANGUAGE DataKinds # # LANGUAGE GADTs # # LANGUAGE KindSignatures # # LANGUAGE MagicHash # # LANGUAGE PatternSynonyms # # LANGUAGE Rank2Types # # LAN...
# LANGUAGE TupleSections # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # # LANGUAGE ViewPatterns # # LANGUAGE Trustworthy # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE ExistentialQuantification # | Bitonic sorting network . See < > and < -flensburg.de/lang/algorithmen/sorti...
55571e0bee98685a66776c86add92594f1f5eaf3444b006e844a2299263250d2
xapi-project/xen-api
test_cpuid_helpers.ml
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
null
https://raw.githubusercontent.com/xapi-project/xen-api/47fae74032aa6ade0fc12e867c530eaf2a96bf75/ocaml/tests/test_cpuid_helpers.ml
ocaml
The following are counterintuitive, because intersection with the empty * set is treated as identity, and intersection is used in is_subset. * Since there are no empty feature sets in reality, these are artificial * scenarios. Below are the more common cases PV
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
54300db256eda6828a4737175505e981b5a79d2200e13a53bbd551beed6e3d39
fractalide/fractalide
trigger.rkt
#lang racket (require fractalide/modules/rkt/rkt-fbp/agent fractalide/modules/rkt/rkt-fbp/def) (require/edge ${cardano-wallet.wcreate}) (define-agent #:input '("data" "trigger") #:output '("out" "msg") (define msg (recv (input "data"))) (define text "") (send (output "msg") (cons 'init (list (co...
null
https://raw.githubusercontent.com/fractalide/fractalide/9c54ec2615fcc2a1f3363292d4eed2a0fcb9c3a5/modules/rkt/rkt-fbp/agents/cardano-wallet/wcreate/trigger.rkt
racket
#lang racket (require fractalide/modules/rkt/rkt-fbp/agent fractalide/modules/rkt/rkt-fbp/def) (require/edge ${cardano-wallet.wcreate}) (define-agent #:input '("data" "trigger") #:output '("out" "msg") (define msg (recv (input "data"))) (define text "") (send (output "msg") (cons 'init (list (co...
4e733d6b4808e14c802d0e4d14aedb0e22f9ac1d31daeae941ee1a1b10cebd66
digital-asset/ghc
unboxedsums9.hs
# LANGUAGE UnboxedSums , UnboxedTuples , MagicHash # module Main where type UbxBool = (# (# #) | (# #) #) # NOINLINE packBool # packBool :: UbxBool -> Bool packBool (# _ | #) = True packBool (# | _ #) = False # NOINLINE unpackBool # unpackBool :: Bool -> UbxBool unpackBool True = (# (# #) | #) unpackBool False = (...
null
https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/unboxedsums/unboxedsums9.hs
haskell
# NOINLINE showUbxBool #
# LANGUAGE UnboxedSums , UnboxedTuples , MagicHash # module Main where type UbxBool = (# (# #) | (# #) #) # NOINLINE packBool # packBool :: UbxBool -> Bool packBool (# _ | #) = True packBool (# | _ #) = False # NOINLINE unpackBool # unpackBool :: Bool -> UbxBool unpackBool True = (# (# #) | #) unpackBool False = (...
7eb4a50adb222ead33da2efa22cac8a7311763d25aa5debf53177e8474fc5932
xsc/claro
assertion.clj
(ns claro.resolution-with-batching.assertion (:require [claro.resolution-with-batching [muse :as muse] [urania :as urania] [claro :as claro]])) (let [fs {:muse muse/fetch-with-muse! :urania urania/fetch-with-urania! :claro claro/fetch-with-claro! :...
null
https://raw.githubusercontent.com/xsc/claro/16db75b7a775a14f3b656362e8ee4f65dd8b0d49/benchmarks/claro/resolution_with_batching/assertion.clj
clojure
(ns claro.resolution-with-batching.assertion (:require [claro.resolution-with-batching [muse :as muse] [urania :as urania] [claro :as claro]])) (let [fs {:muse muse/fetch-with-muse! :urania urania/fetch-with-urania! :claro claro/fetch-with-claro! :...
51070319f03844cf48ba6d8226f24e37b989af0046891ffb8998e4a75dc9e82c
argp/bap
batMap.mli
* BatMap - Additional map operations * Copyright ( C ) 1996 2009 , LIFO , Universite d'Orleans * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation ;...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batMap.mli
ocaml
* The type of the map keys. * The type of maps from type [key] to type ['a]. * The empty map. * Test whether a map is empty or not. * Return the number of bindings of a map. * [add x y m] returns a map containing the same bindings as [m], plus a binding of [x] to [y]. If [x] was already bound in [m], i...
* BatMap - Additional map operations * Copyright ( C ) 1996 2009 , LIFO , Universite d'Orleans * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation ;...
d20f355c9dd2f120fefe9cd4220725d483a95478c08b6eadd2e4373384106ce3
amuletml/amulet
TypeOverlay.hs
# LANGUAGE DeriveGeneric , OverloadedStrings , DuplicateRecordFields , FlexibleContexts , TypeFamilies # module AmuletLsp.Features.TypeOverlay ( OverlayData(OverlayData) , getTypeOverlay , resolveTypeOverlay ) where import Control.Lens hiding (List) import qualified Data.Text as T import Data.Aeson.Types impo...
null
https://raw.githubusercontent.com/amuletml/amulet/fcba0b7e198b8d354e95722bbe118bccc8483f4e/bin/AmuletLsp/Features/TypeOverlay.hs
haskell
| Get the unresolved type overlay for this program. The provided name is the unique "name" for this file. While we could | Resolve a type overlay, updating the lens with the type of the embedded variable.
# LANGUAGE DeriveGeneric , OverloadedStrings , DuplicateRecordFields , FlexibleContexts , TypeFamilies # module AmuletLsp.Features.TypeOverlay ( OverlayData(OverlayData) , getTypeOverlay , resolveTypeOverlay ) where import Control.Lens hiding (List) import qualified Data.Text as T import Data.Aeson.Types impo...
80eb16b1cf89901eb503b8cbbf50db46a9302541f4837ec9b8d737c93ed1c7bc
fetburner/Coq2SML
ccproof.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/plugins/cc/ccproof.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** This file uses the (non-compressed)...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Util open Names open Te...
f2a2b544fffb328c7cee2cf632d0acbb25eae4bdf3062b77df37e6acb04d6a3a
rvalentini/fix.core
field_generator.clj
(ns fix.generator.field-generator (:require [fix.parser.xml-parser :as parser] [taoensso.timbre :refer [info]])) (defn- extract-enums [value-tags] (let [result (map (fn [value-tag] {(get-in value-tag [:attrs :enum]) (get-in value-tag [:attrs :desc...
null
https://raw.githubusercontent.com/rvalentini/fix.core/bb4476842d0c876f8cced95b3e350cf64ce3ceae/src/fix/generator/field_generator.clj
clojure
(ns fix.generator.field-generator (:require [fix.parser.xml-parser :as parser] [taoensso.timbre :refer [info]])) (defn- extract-enums [value-tags] (let [result (map (fn [value-tag] {(get-in value-tag [:attrs :enum]) (get-in value-tag [:attrs :desc...
4e44fa421a03725e55c59a58f958b1be7002d1e05887e2930539fe2c4fb5a597
rems-project/cerberus
pp_prelude.ml
module P = PPrint let (!^) = P.(!^) let (^^) = P.(^^) let (^/^) = P.(^/^) let (^//^) = P.(^//^) let (^^^) x y = TODO , was : x ^^ P.space ^^ y if P.requirement y = 0 then x else x ^^ P.space ^^ y let comma_list f = P.separate_map ( P.comma ^^ P.space ) f let comma_list f xs = P.flow (P.comma...
null
https://raw.githubusercontent.com/rems-project/cerberus/dbfab2643ce6cedb54d2a52cbcb3673e03bfd161/util/pp_prelude.ml
ocaml
module P = PPrint let (!^) = P.(!^) let (^^) = P.(^^) let (^/^) = P.(^/^) let (^//^) = P.(^//^) let (^^^) x y = TODO , was : x ^^ P.space ^^ y if P.requirement y = 0 then x else x ^^ P.space ^^ y let comma_list f = P.separate_map ( P.comma ^^ P.space ) f let comma_list f xs = P.flow (P.comma...
9254949392a823877d66828a8f736f810aba67b8083eef41440ab08e099c02be
erlang/otp
id_transform_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2003 - 2022 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applic...
null
https://raw.githubusercontent.com/erlang/otp/eccc556e79f315d1f87c10fb46f2c4af50a63f20/lib/stdlib/test/id_transform_SUITE.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific l...
Copyright Ericsson AB 2003 - 2022 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(id_transform_SUITE). -author(''). -include_lib("kernel/include/file.hrl"). -export([all/0, suite/...
f839c5c7a74a2d60bff07197ae025109772742602a140defb76ce678f54be52c
silent-entertainment/claxiom
exporters.lisp
(in-package #:claxiom) (defmethod export-cell (format cell-language cell-type cell) (format t "~s~%" (list :default-cell format cell-language cell-type)) (list :exported format cell-language cell-type (mapcar #'car cell))) (defun export-cells (format book) (map-cells (lambda (cell) (export-cell fo...
null
https://raw.githubusercontent.com/silent-entertainment/claxiom/44c6122ec46859fd881772bfc24ca3a141fb153a/src/exporters.lisp
lisp
Default :lisp exporter Default :html exporter
(in-package #:claxiom) (defmethod export-cell (format cell-language cell-type cell) (format t "~s~%" (list :default-cell format cell-language cell-type)) (list :exported format cell-language cell-type (mapcar #'car cell))) (defun export-cells (format book) (map-cells (lambda (cell) (export-cell fo...
27b6d4aa5d3bc5dd5317cdb1fe2726a1956fe315efe03089590733c05bb25e8a
wooga/erlang_prelude
ep_lists_tests.erl
-module(ep_lists_tests). -include_lib("eunit/include/eunit.hrl"). -define(IT, ep_lists). find_first_test() -> List = [1, 2, 3, 4], Pred = fun (X) -> X < 4 andalso X =/= 1 end, False = fun (_) -> false end, ?assertEqual({value, 2}, ?IT:find_first(Pred, List)), ?assertEqual({value, 3}, ?IT:find_fir...
null
https://raw.githubusercontent.com/wooga/erlang_prelude/ce7e96ef58dee98e8f67232b21cd5aabc7963f2f/test/ep_lists_tests.erl
erlang
-module(ep_lists_tests). -include_lib("eunit/include/eunit.hrl"). -define(IT, ep_lists). find_first_test() -> List = [1, 2, 3, 4], Pred = fun (X) -> X < 4 andalso X =/= 1 end, False = fun (_) -> false end, ?assertEqual({value, 2}, ?IT:find_first(Pred, List)), ?assertEqual({value, 3}, ?IT:find_fir...
8ff69ebad677e6d2a585103dd1b20c72f396daca155e106c1ad26764d4588043
olsner/sedition
Interpret.hs
# LANGUAGE OverloadedStrings , CPP , TypeFamilies , NamedFieldPuns , RecordWildCards , ScopedTypeVariables # # OPTIONS_GHC -fwarn - incomplete - patterns # module Interpret (runProgram, inputListFile) where #define DEBUG 0 import Compiler.Hoopl as H hiding ((<*>)) import Control.Concurrent import Control.Exception ...
null
https://raw.githubusercontent.com/olsner/sedition/483e283289a84764eec71c39dd66b017b8b00bf8/Interpret.hs
haskell
thus block, but doesn't have to read the whole line. Read a fulle line like fileMaybeGetLine but don't consume the line returned until another call to fileMaybeGetLine. Output a string (without newline at the end) TODO Close files on exit so their buffers get flushed. Probably requires adding some shutdown code? ...
# LANGUAGE OverloadedStrings , CPP , TypeFamilies , NamedFieldPuns , RecordWildCards , ScopedTypeVariables # # OPTIONS_GHC -fwarn - incomplete - patterns # module Interpret (runProgram, inputListFile) where #define DEBUG 0 import Compiler.Hoopl as H hiding ((<*>)) import Control.Concurrent import Control.Exception ...
0886de6bebfcaaedaf6cf2ba0a5d38c73fa78b1ed36e9120959c52aa9d23a643
clojure/core.typed
rbt.clj
(ns clojure.core.typed.test.rbt (:refer-clojure :exclude [let]) (:require [clojure.core.typed :refer [ann print-env print-filterset ann-form defalias U IFn let Rec] :as t])) ;------------------------------- ; 'Normal' types ;------------------------------- (defalias...
null
https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/test/clojure/core/typed/test/rbt.clj
clojure
------------------------------- 'Normal' types ------------------------------- ------------------------------- 'Refinement' types ------------------------------- This is an implementation of red-black tree invariant checking. restore-right (Black (e,l,r)) >=> dict one of its children must be red. and the sam...
(ns clojure.core.typed.test.rbt (:refer-clojure :exclude [let]) (:require [clojure.core.typed :refer [ann print-env print-filterset ann-form defalias U IFn let Rec] :as t])) (defalias EntryT "The payload" '{:key Number :datum Number}) (defalias Empty "A ...
32d7e9151fd3664398d3cc07143ae9a76326f04f4c34651fac0042050863b265
siclait/6.824-cljlabs-2020
nocrash.clj
(ns map-reduce.plugin.nocrash (:require [clojure.string :as string] [map-reduce.plugin :as plugin])) (defn mapf [filename contents] [{:key "a" :value filename} {:key "b" :value (count filename)} {:key "c" :value (count contents)} {:key "d" :value "xyzzy"}]) (defn reducef [_ vs] (string/join "...
null
https://raw.githubusercontent.com/siclait/6.824-cljlabs-2020/0c7ad7ae07d7617b1eb7240080c65f1937ca8a2d/map-reduce/src/map_reduce/plugin/nocrash.clj
clojure
(ns map-reduce.plugin.nocrash (:require [clojure.string :as string] [map-reduce.plugin :as plugin])) (defn mapf [filename contents] [{:key "a" :value filename} {:key "b" :value (count filename)} {:key "c" :value (count contents)} {:key "d" :value "xyzzy"}]) (defn reducef [_ vs] (string/join "...
fb292d518d3abf2ede695805f9a504662f3fe6c3f226b3fe9c5c868b83fe8122
euslisp/EusLisp
kclgabriel.lsp
(defparameter re (make-array 1025 :initial-element 0.0)) (defparameter im (make-array 1025 :initial-element 0.0)) #+kcl (defmacro while (cond &rest body) `(do () ((not ,cond)) . ,body)) (defun fft (areal aimag) (let (ar ai i j k m n le le1 ip nv2 nm1 ur ui wr wi tr ti) (declare (type float ur ui ...
null
https://raw.githubusercontent.com/euslisp/EusLisp/5aa9241268257356a6ba2d7fbaf920a098cc18c4/contrib/bench/kclgabriel.lsp
lisp
(type float-vector ar ai) initialize interchange elements in bit-reversal order repeat butterflies do a butterfly PUZZLE (print k)
(defparameter re (make-array 1025 :initial-element 0.0)) (defparameter im (make-array 1025 :initial-element 0.0)) #+kcl (defmacro while (cond &rest body) `(do () ((not ,cond)) . ,body)) (defun fft (areal aimag) (let (ar ai i j k m n le le1 ip nv2 nm1 ur ui wr wi tr ti) (declare (type float ur ui ...
144c9461285d0bcb224ca42a423814b21aa66e8ab8dca0dbc7bedc1c282aff0d
lemmaandrew/CodingBatHaskell
groupSum6.hs
{- From Given an array of ints, is it possible to choose a group of some of the ints, beginning at the start index, such that the group sums to the given target? However, with the additional constraint that all 6's must be chosen. (No loops needed.) -} import Test.Hspec ( hspec, describe, it, shouldBe ) groupSum6 ...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Recursion-2/groupSum6.hs
haskell
From Given an array of ints, is it possible to choose a group of some of the ints, beginning at the start index, such that the group sums to the given target? However, with the additional constraint that all 6's must be chosen. (No loops needed.)
import Test.Hspec ( hspec, describe, it, shouldBe ) groupSum6 :: Int -> [Int] -> Int -> Bool groupSum6 start nums target = undefined main :: IO () main = hspec $ describe "Tests:" $ do it "True" $ groupSum6 0 [5,6,2] 8 `shouldBe` True it "False" $ groupSum6 0 [5,6,2] 9 `shouldBe` False i...
86b3537d2a12b315d0dcebde41a84436113c3c6ca05026c9504fd411ad57409e
fortytools/holumbus
IndexConfig.hs
# OPTIONS # -- ------------------------------------------------------------ module Hayoo.IndexConfig where import Data.Char.Properties.XMLCharProps import Hayoo.HackagePackage import Hayoo.Haddock import Hayoo.Signature import Holumbus.Crawler import Holu...
null
https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/Hayoo/HayooIndexer/Hayoo/IndexConfig.hs
haskell
------------------------------------------------------------ ------------------------------------------------------------ split module name at . TODO 2.8 version (`elem` ["type", "class", "data", "module"]) ----------------------------------------------------------------------------- ----------------------------...
# OPTIONS # module Hayoo.IndexConfig where import Data.Char.Properties.XMLCharProps import Hayoo.HackagePackage import Hayoo.Haddock import Hayoo.Signature import Holumbus.Crawler import Holumbus.Crawler.IndexerCore import Text.Regex.XMLSchema....
9068cff63e1a69184c77f4a41fd066bf45e30b0dc79398dc3578e5b19602b840
vituscze/norri
Compile.hs
| Allows the abstract syntax tree to be compiled into C++ template -- metaprogram. module Compiler.Compile ( -- * Module compiling compileModule , compileTopLevel -- * Top level entities compiling , compileType , compileDataDef , compileValDef -- * Expression compiling , ...
null
https://raw.githubusercontent.com/vituscze/norri/133aef0b42b2c5bdd789ce2fa2655aecfcb96424/src/Compiler/Compile.hs
haskell
metaprogram. * Module compiling * Top level entities compiling * Expression compiling | Left opening brace surrounded by newlines. | Right closing brace surrounded by newlines. | Print a @struct@ given its name and contents. struct s { int x; }; ^ Name of the @struct@. ^ Content of the @struct@. | Prin...
| Allows the abstract syntax tree to be compiled into C++ template module Compiler.Compile ( compileModule , compileTopLevel , compileType , compileDataDef , compileValDef , compileExpr ) where import Data.Char import Data.List import Compiler.AST import Utility lbrace :: St...
1475433469a86b6fd6fc008451e9afa829177d00f6525d85e16ba4bb68c41e6e
andgate/type-theory-compiler
Pretty.hs
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE LambdaCase , OverloadedStrings , FlexibleInstances , ViewPatterns # , OverloadedStrings , FlexibleInstances , ViewPatterns #-} module Language.STLC.Pretty where import Langua...
null
https://raw.githubusercontent.com/andgate/type-theory-compiler/a404f085d19a19b16ae8c26616707dc46707ea10/stlc/src/Language/STLC/Pretty.hs
haskell
--------------------------------------------------------------------- Helpers ---------------------------------------------------------------------
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE LambdaCase , OverloadedStrings , FlexibleInstances , ViewPatterns # , OverloadedStrings , FlexibleInstances , ViewPatterns #-} module Language.STLC.Pretty where import Langua...
ad2b8479be221ec1c596085ff22cd4cbd53b061e9b9c4eb9b8f55c464a780232
reasonml/reason
printer_maker.ml
open Reason_omp type parse_itype = [ `ML | `Reason | `Binary | `BinaryReason | `Auto ] type print_itype = [ `ML | `Reason | `Binary | `BinaryReason | `AST | `None ] exception Invalid_config of string module type PRINTER = sig type t val parse : use_stdin:bool -> parse_itype -...
null
https://raw.githubusercontent.com/reasonml/reason/4f6ff7616bfa699059d642a3d16d8905d83555f6/src/refmt/printer_maker.ml
ocaml
open Reason_omp type parse_itype = [ `ML | `Reason | `Binary | `BinaryReason | `Auto ] type print_itype = [ `ML | `Reason | `Binary | `BinaryReason | `AST | `None ] exception Invalid_config of string module type PRINTER = sig type t val parse : use_stdin:bool -> parse_itype -...
6bf7deb7b1895d1016bf0d3e730af5b39e42b58ba052487f3cda8c2a3756b23d
charleso/bantam
Login.hs
# LANGUAGE NoImplicitPrelude # module Bantam.Service.Api.Login ( Login (..) ) where import Bantam.Service.Data import P data Login m = Login { login :: Email -> Password -> m (Maybe SessionId) , getSession :: SessionId -> m (Maybe Email) , createAccount :: Email -> Password...
null
https://raw.githubusercontent.com/charleso/bantam/3af8d08f8e649cb5690815d17e6c79a3a9033d47/bantam-service/src/Bantam/Service/Api/Login.hs
haskell
# LANGUAGE NoImplicitPrelude # module Bantam.Service.Api.Login ( Login (..) ) where import Bantam.Service.Data import P data Login m = Login { login :: Email -> Password -> m (Maybe SessionId) , getSession :: SessionId -> m (Maybe Email) , createAccount :: Email -> Password...
8a7962db1fd39f070ae0f9d226659890781044b2e558a6d7b6b00cfe3332d3e6
TorXakis/TorXakis
Constant.hs
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} ----------------------------------------...
null
https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/txs-compiler/src/TorXakis/Compiler/ValExpr/Constant.hs
haskell
------------------------------------------------------------------------------ | Stability : experimental Portability : portable Compilation to 'TorXakis' @Constant@'s. ------------------------------------------------------------------------------ | Transform a constant declaration into a 'TorXakis' @Constan...
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} Module : TorXakis . Compiler ....
b131d94810c711965dd1bce4e03b13414db2fd30a7ec5d8937106ca05d41aa9d
walkie/Hagl
TicTacToe.hs
| An implementation of the game Tic Tac Toe . Try playing against the minimax algorithm by running in GHCi : > > > playTicTacToe Valid moves are the integers [ 0 .. 8 ] , where each integer names square of the board , starting in the upper left and proceeding in the order that you would read a book . T...
null
https://raw.githubusercontent.com/walkie/Hagl/ac1edda51c53d2b683c4ada3f1c3d4d14a285d38/src/Hagl/Example/TicTacToe.hs
haskell
* Game represetation. | Each square either has an X, an O, or is empty. | A move is indicated by a naming the index of the square to put your | The initial board. | The mark corresponding to each player. | Get a list of empty squares. | The player whose turn it is. | Player p marks square m. | True if the ga...
| An implementation of the game Tic Tac Toe . Try playing against the minimax algorithm by running in GHCi : > > > playTicTacToe Valid moves are the integers [ 0 .. 8 ] , where each integer names square of the board , starting in the upper left and proceeding in the order that you would read a book . T...
706ac8ee3a5a99ec69768ad2c0ae25de0896cb8f687ce47c7c2fe6546cdef70c
runeksvendsen/restful-payment-channel-server
Types.hs
# LANGUAGE TemplateHaskell # # LANGUAGE FlexibleInstances # # LANGUAGE RecordWildCards # # LANGUAGE OverloadedStrings , DataKinds , FlexibleContexts , LambdaCase , TypeOperators # module PayChanServer.Config.Types ( module PayChanServer.Config.Types , Config ) where import AppPrelude.Types.Orphans () ...
null
https://raw.githubusercontent.com/runeksvendsen/restful-payment-channel-server/0fe65eadccad5ef2b840714623ec407e509ad00b/src/PayChanServer/Config/Types.hs
haskell
import Servant.Server.Internal.Context (Context(EmptyContext, (:.))) - Tagged types { cDustLimit = BTC.getDustLimit , cSettlementPeriod = Tag.Tagged . fromIntegral $ Tag.unTagged settlePeriod' } Dummy function if debug is enabled Template Haskell magic
# LANGUAGE TemplateHaskell # # LANGUAGE FlexibleInstances # # LANGUAGE RecordWildCards # # LANGUAGE OverloadedStrings , DataKinds , FlexibleContexts , LambdaCase , TypeOperators # module PayChanServer.Config.Types ( module PayChanServer.Config.Types , Config ) where import AppPrelude.Types.Orphans () ...
54cf4ec43c919f955492551b6affc1ca265dd983a92ef8d84ecbc60c8d881a23
Metaxal/quickscript-extra
url2script.rkt
#lang racket/base License : [ Apache License , Version 2.0]( / licenses / LICENSE-2.0 ) or [ MIT license]( / licenses / MIT ) at your option . (require quickscript quickscript/base quickscript/utils racket/class racket/file racket/match racket/port ...
null
https://raw.githubusercontent.com/Metaxal/quickscript-extra/d07e75debd5952fce4cbdec3761d02a0a7baa281/scripts/url2script.rkt
racket
Do not keep trailing anchors We can extract the filename "" "" "" "" "" "" "" Any other kind of url, we assume a link to a raw file TODO: get-pure-port also handles files. This could be useful. To prevent CDN caching, add "?cachebust=<some-random-number>" at the end of the url (or "&cachebust=..."), just t...
#lang racket/base License : [ Apache License , Version 2.0]( / licenses / LICENSE-2.0 ) or [ MIT license]( / licenses / MIT ) at your option . (require quickscript quickscript/base quickscript/utils racket/class racket/file racket/match racket/port ...
5969118be270e6ecdf77354c681c4e10a9721bade788fe8cf78fb2625c78c758
clash-lang/clash-compiler
T1033.hs
module T1033 where import Clash.Explicit.Prelude import Clash.Prelude (HiddenClock, hasClock) import qualified Prelude as P # ANN topEntity ( Synthesize { t_name = " top " , t_inputs = [ PortName " wrong " ] , t_output = PortName " theOutput " } ) # (Synthesize { t_name = "t...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldfail/TopEntity/T1033.hs
haskell
module T1033 where import Clash.Explicit.Prelude import Clash.Prelude (HiddenClock, hasClock) import qualified Prelude as P # ANN topEntity ( Synthesize { t_name = " top " , t_inputs = [ PortName " wrong " ] , t_output = PortName " theOutput " } ) # (Synthesize { t_name = "t...
4ebb0d6beaabe20b40d1b6e948e192437fcf940bf253b5a312271061f83fe9e7
mzp/coq-ruby
cctac.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/contrib/cc/cctac.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 **********************************************************************
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * $ I d : cctac.mli 10637 2...
ec995a2987f770c36146231a911ecbac6d0301e891a7770c53cad4e7cef32591
brendanhay/terrafomo
DataSources.hs
-- This module is auto-generated. # LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # -- | Module : . PagerDuty . DataSources Copyright : ( c ) 2017 - 2018 License ...
null
https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-pagerduty/gen/Terrafomo/PagerDuty/DataSources.hs
haskell
This module is auto-generated. | Stability : auto-generated * pagerduty_escalation_policy * pagerduty_extension_schema * pagerduty_schedule * pagerduty_team * pagerduty_user * pagerduty_vendor ^ @name@ - (Required) s Text Expr s Text ^ The minimal/required arguments. ^ @name@ - (Required) s Text ...
# LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # Module : . PagerDuty . DataSources Copyright : ( c ) 2017 - 2018 License : Mozilla Public License , v. 2.0 ....
92ac734d1a2869e59a3aef0bbfd55536f953bbcfb0b6f241659edf0f8125deb3
masaomi-yamaguchi/synbit
LazyEnv.hs
# LANGUAGE UndecidableInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # {-# OPTIONS_GHC -Wunused-imports #-} module Synthesis.LazyEnv ( Env , empty , singleton , lookup , insert , insertAll , insertAll' , lookup' , foldrE ...
null
https://raw.githubusercontent.com/masaomi-yamaguchi/synbit/4553ae090dfcda4965a16b09130c1d6874b5a849/src/Synthesis/LazyEnv.hs
haskell
# OPTIONS_GHC -Wunused-imports #
# LANGUAGE UndecidableInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # module Synthesis.LazyEnv ( Env , empty , singleton , lookup , insert , insertAll , insertAll' , lookup' , foldrE , toList , fromList , selec...
99c7767a24b2f82706eabb13f2ca09cfdd1286843750ee4e3d94944a82ae13e4
craigfe/sink
sink_kernel.ml
(** The canonical definitions of various standard types: *) let ( >> ) f g x = g (f x) type empty = | type ('a, 'b) either = Left of 'a | Right of 'b let absurd : type a. empty -> a = function _ -> .
null
https://raw.githubusercontent.com/craigfe/sink/c5431edfa1b06f1a09845a481c4afcb3e92f0667/src/sink/sink_kernel.ml
ocaml
* The canonical definitions of various standard types:
let ( >> ) f g x = g (f x) type empty = | type ('a, 'b) either = Left of 'a | Right of 'b let absurd : type a. empty -> a = function _ -> .
8722fc192068d6ce5532a640da599127ed709b1f48cd6924bd808ae4362bf001
josephwilk/functions-as-patterns
seq.clj
(ns functions-as-patterns.seq (:require [functions-as-patterns.color :as color] [functions-as-patterns.core :refer :all])) (def doc-dir (str (clojure.string/replace (:out (clojure.java.shell/sh "pwd")) "\n" "") "/doc" )) ;;Get shorter ;;;distinct filter remove take-nth for (render doc-dir (distinct (concat (...
null
https://raw.githubusercontent.com/josephwilk/functions-as-patterns/a0ef526b2f8b44755d49dd252c78afef67d5c282/src/functions_as_patterns/seq.clj
clojure
Get shorter distinct filter remove take-nth for The pattern is more the fn than the filter/remove Get longer Tail-items Head-items take take-while butlast drop-last for Change flatten group-by partition partition-all partition-by split-at split-with filter remove replace shuffle Rearrange reverse sort sort-by compare P...
(ns functions-as-patterns.seq (:require [functions-as-patterns.color :as color] [functions-as-patterns.core :refer :all])) (def doc-dir (str (clojure.string/replace (:out (clojure.java.shell/sh "pwd")) "\n" "") "/doc" )) (render doc-dir (distinct (concat (take 2 (color/color-seq 2 color/rgb-highlight-color))...
1fb0946cc3ece8bfbff2040f59714ea3c2984293e63eed2a06cea441c4275299
sarabander/p2pu-sicp
Ex1.33.scm
Depends on 1.20 , 1.21 , 1.28 (define (filtered-accumulate filter combiner null-value term a next b) (define (iter a result) (if (> a b) result (iter (next a) (combiner (if (filter a) (term a) null-value) result)))) (iter a null...
null
https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/1.3/Ex1.33.scm
scheme
test a. with exhaustive prime test b. #t
Depends on 1.20 , 1.21 , 1.28 (define (filtered-accumulate filter combiner null-value term a next b) (define (iter a result) (if (> a b) result (iter (next a) (combiner (if (filter a) (term a) null-value) result)))) (iter a null...
3310de140adb0cf7df50918d7b5dfc9a500f28cee5fae079bd1397cfc4f6438f
nuttycom/aftok
Types.hs
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE ExplicitForAll #-} # LANGUAGE TemplateHaskell # module Aftok.Payments.Types where import Aftok.Billing ( Billable, Billable', BillableId, requestExpiryPeriod, ) import Aftok.Currency (Currency (..), ...
null
https://raw.githubusercontent.com/nuttycom/aftok/58feefe675cea908cf10619cc88ca4770152e82e/lib/Aftok/Payments/Types.hs
haskell
# LANGUAGE DeriveTraversable # # LANGUAGE ExplicitForAll # billing information payout date (billing date) timestamp of payment request creation
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE TemplateHaskell # module Aftok.Payments.Types where import Aftok.Billing ( Billable, Billable', BillableId, requestExpiryPeriod, ) import Aftok.Currency (Currency (..), Currency' (..)) import Aftok.Currency.Bitcoin (Satoshi) import qual...
6db440d22279f8a38e6faf67f86c22d8218b929f00d8dad67ec105d2be55d2cc
Ptival/recursion-schemes-examples
Histoparamorphisms.hs
# LANGUAGE LambdaCase # -- | module Histoparamorphisms where import Control.Comonad.Cofree import Data.Functor.Foldable import Numeric.Natural import Prelude hiding (lookup) import Histomorphisms.Natural (changeAlgebraHelper) histoPara :: (Corecursive t, Recursive t) => (Base t (Cofree ((,) t) a)...
null
https://raw.githubusercontent.com/Ptival/recursion-schemes-examples/bd2a506d38887e9b5d4f2afc435fc7bddf12a92e/lib/Histoparamorphisms.hs
haskell
| | DOES NOT WORK
# LANGUAGE LambdaCase # module Histoparamorphisms where import Control.Comonad.Cofree import Data.Functor.Foldable import Numeric.Natural import Prelude hiding (lookup) import Histomorphisms.Natural (changeAlgebraHelper) histoPara :: (Corecursive t, Recursive t) => (Base t (Cofree ((,) t) a) -> a...
96564a4828f420078625a418b0f14eb686bc85469547050f4962eb6a0184304f
weavejester/fact
core.clj
Copyright ( c ) . All rights reserved . The use and distribution terms for this software are covered by the Eclipse ;; Public License 1.0 (-1.0.php) which ;; can be found in the file epl-v10.html at the root of this distribution. By ;; using this software in any fashion, you are agreeing to be bound by the ;; ter...
null
https://raw.githubusercontent.com/weavejester/fact/0b413fbf06ce7f8a582d0217e5feff8c4288f03e/src/fact/core.clj
clojure
Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. fact.core: The core functionality of F...
Copyright ( c ) . All rights reserved . The use and distribution terms for this software are covered by the Eclipse (ns fact.core (:import clojure.lang.IFn) (:import java.util.regex.Pattern) (:import java.io.FileNotFoundException)) (defstruct fact-info :doc :test :pending? :params :data) (def...
ae129fe21f7a67a5f09d2e8230c5659e996a74e86090f8dce1c81a33dd3c616b
liyang/thyme
Human.hs
# LANGUAGE CPP # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE ViewPatterns # #include "thyme.h" #if HLINT #include "cabal_macros.h" #endif -- | Vague textual descriptions of time durations. module Data.Thyme.Format.Human ( humanTimeDiff , humanTimeDiffs , humanRelTime , humanRel...
null
https://raw.githubusercontent.com/liyang/thyme/c0dcc251ff4f843672987c80b73ec4808bc009e4/src/Data/Thyme/Format/Human.hs
haskell
| Vague textual descriptions of time durations. | Display 'DiffTime' or 'NominalDiffTime' in a human-readable form. | Display 'DiffTime' or 'NominalDiffTime' in a human-readable form. # ANN humanTimeDiffs "HLint: ignore Use fromMaybe" # | Display one 'UTCTime' relative to another, in a human-readable form. | Displ...
# LANGUAGE CPP # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE ViewPatterns # #include "thyme.h" #if HLINT #include "cabal_macros.h" #endif module Data.Thyme.Format.Human ( humanTimeDiff , humanTimeDiffs , humanRelTime , humanRelTimes ) where import Prelude #if !MIN_VERSION_...
1b31f19586fb025f2e5ef72a5a440ed52ff75a3b12fd93b24e5cf954b7566b6d
Fuuzetsu/h-booru
Gelbooru.hs
# LANGUAGE DataKinds # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE UnicodeSyntax # {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : HBooru.Parsers.Gelbooru Copyright : ( c ) 2013 - 2014 -- License : GPL-3 -- -- Maintainer : -- Stability : experimental -- --...
null
https://raw.githubusercontent.com/Fuuzetsu/h-booru/55167fd0f329b377a377aac4d30ff99f096457f1/src/HBooru/Parsers/Gelbooru.hs
haskell
# OPTIONS_HADDOCK show-extensions # | Module : HBooru.Parsers.Gelbooru License : GPL-3 Maintainer : Stability : experimental Module for parsing content from </ Gelbooru>. | We use this type and its 'Site' instance to distinguish between various parsers.
# LANGUAGE DataKinds # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE UnicodeSyntax # Copyright : ( c ) 2013 - 2014 module HBooru.Parsers.Gelbooru where import Data.List import HBooru.Parsers.FieldParsers import HBooru.Types import Text.XML.HXT.Core hiding (mkName) | Record used f...
89b9e322b7add7ffad431471fdf9ba7d7d7b22db7f5da0f1b6722f807970804f
backtracking/ocamlgraph
fixpoint.mli
(**************************************************************************) (* *) : a generic graph library for OCaml Copyright ( C ) 2004 - 2010 , and (* ...
null
https://raw.githubusercontent.com/backtracking/ocamlgraph/1c028af097339ca8bc379436f7bd9477fa3a49cd/src/fixpoint.mli
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
: a generic graph library for OCaml Copyright ( C ) 2004 - 2010 , and modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking Copyrig...
0d88145624d9d74d490667f470f8c2cebab545c5a007e381972c85a86095022f
jvranish/TheExperiment
Lexer.hs
module Language.TheExperiment.Parser.Lexer where import Data.Char import Text.Parsec import Text.Parsec.Expr import qualified Text.Parsec.Token as T import Control.Monad import qualified Control.Monad.Trans.State as S import Language.TheExperiment.AST.Expression type ParserOperator = Operator String Operators (S.S...
null
https://raw.githubusercontent.com/jvranish/TheExperiment/54ca832d2f62a928a992b4c23dadf9653d13a5a7/src/Language/TheExperiment/Parser/Lexer.hs
haskell
module Language.TheExperiment.Parser.Lexer where import Data.Char import Text.Parsec import Text.Parsec.Expr import qualified Text.Parsec.Token as T import Control.Monad import qualified Control.Monad.Trans.State as S import Language.TheExperiment.AST.Expression type ParserOperator = Operator String Operators (S.S...
44b8f5db69b6dadd9489e09d146bc9666b02459e30c9a6d912b1e7d835002a98
informatimago/lisp
invoice.lisp
-*- mode : lisp ; coding : utf-8 -*- ;;;;**************************************************************************** FILE : invoices.lisp ;;;;LANGUAGE: Common-Lisp ;;;;SYSTEM: Common-Lisp USER - INTERFACE : Common - Lisp ;;;;DESCRIPTION ;;;; ;;;; This package exports clas...
null
https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/common-lisp/invoice/invoice.lisp
lisp
coding : utf-8 -*- **************************************************************************** LANGUAGE: Common-Lisp SYSTEM: Common-Lisp DESCRIPTION This package exports classes and functions used for accounting: invoices, customers/providers, movements, taxes... Currencies are han...
FILE : invoices.lisp USER - INTERFACE : Common - Lisp < PJB > < > MODIFICATIONS 2004 - 10 - 17 < PJB > Completed conversion to Common - Lisp . 2004 - 10 - 11 < PJB > Converted to Common - Lisp from emacs lisp . 2002 - 09 - 09 < PJB > Added generate - invoice . ? ? < PJ...
a10da1c4a5e771a139ec35cdbd3136316ac173fd8c5de225091a9ad043cbc0e2
mhuebert/yawn
env.cljc
(ns yawn.env (:require [clojure.walk :as walk] #?@(:clj [[net.cgrand.macrovich :as macros]] :cljs [[applied-science.js-interop :as j] yawn.react])) #?(:cljs (:require-macros yawn.env [net.cgrand.macrovich :as macros]))) (defn merge-opt...
null
https://raw.githubusercontent.com/mhuebert/yawn/4491c133b12dedd2aaff7c810833a2f7840a5cd2/src/main/yawn/env.cljc
clojure
(ns yawn.env (:require [clojure.walk :as walk] #?@(:clj [[net.cgrand.macrovich :as macros]] :cljs [[applied-science.js-interop :as j] yawn.react])) #?(:cljs (:require-macros yawn.env [net.cgrand.macrovich :as macros]))) (defn merge-opt...
58d0796a5e458f6bd04d5a16d808e78b99cb42d432ce92d9d176f8a74128c3ca
haskell/lsp
Replay.hs
-- | A testing tool for replaying captured client logs back to a server, -- and validating that the server output matches up with another log. module Language.LSP.Test.Replay ( -- replaySession ) where import Prelude hiding (id) import Control.Concurrent import Control.Monad.IO.Class ...
null
https://raw.githubusercontent.com/haskell/lsp/6fbe0669f1b79f3623181d1fc89c156f9f65011d/lsp-test/src/Language/LSP/Test/Replay.hs
haskell
| A testing tool for replaying captured client logs back to a server, and validating that the server output matches up with another log. replaySession | Replays a captured client output and makes sure it matches up with an expected response . The session directory should have a captured session file in it nam...
module Language.LSP.Test.Replay ) where import Prelude hiding (id) import Control.Concurrent import Control.Monad.IO.Class import qualified Data.ByteString.Lazy.Char8 as B import qualified Data.Text as T import Language.LSP.Types import Languag...
f8e4af1c991b903104c91ee6da969b6cfd0271b7c19f19d97e32a71a600c3ef7
tsloughter/kuberl
kuberl_v1_replica_set_list.erl
-module(kuberl_v1_replica_set_list). -export([encode/1]). -export_type([kuberl_v1_replica_set_list/0]). -type kuberl_v1_replica_set_list() :: #{ 'apiVersion' => binary(), 'items' := list(), 'kind' => binary(), 'metadata' => kuberl_v1_list_meta:kuberl_v1_list_meta() }. encode(#{ 'apiVer...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_replica_set_list.erl
erlang
-module(kuberl_v1_replica_set_list). -export([encode/1]). -export_type([kuberl_v1_replica_set_list/0]). -type kuberl_v1_replica_set_list() :: #{ 'apiVersion' => binary(), 'items' := list(), 'kind' => binary(), 'metadata' => kuberl_v1_list_meta:kuberl_v1_list_meta() }. encode(#{ 'apiVer...
16ed4b9b98842bbaf9e33296524b5a15da343281cf8375751544e0ed79b6ad3f
GNOME/aisleriot
spiderette.scm
; AisleRiot - spiderette.scm Copyright ( C ) 2001 < > ; ; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ; (at your option) any later version. ; ; This ...
null
https://raw.githubusercontent.com/GNOME/aisleriot/5ab7f90d8a196f1fcfe5a552cef4a4c1a4b5ac39/games/spiderette.scm
scheme
AisleRiot - spiderette.scm This program is free software: you can redistribute it and/or modify (at your option) any later version. 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. ...
Copyright ( C ) 2001 < > it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (use-modules (aisleriot interface) (aisleriot api)) (primitive-load-path "spide...
c18587b7be20e5e9548998920c6b23c6c4171c2f39acbd9725f536669c071952
icicle-lang/disorder.hs-ambiata
Property.hs
# LANGUAGE CPP # module Disorder.Core.Property ( (=/=) , (~~~) , (###) , (.^.) , (<=>) , (=\\=) , failWith , neg ) where import Data.AEq (AEq) import qualified Data.AEq as AEQ import Data.List ((\\)) import Data.Text ...
null
https://raw.githubusercontent.com/icicle-lang/disorder.hs-ambiata/0068d9a0dd9aea45e772fb664cf4e7e71636dbe5/disorder-core/src/Disorder/Core/Property.hs
haskell
| Approximately-equal property for floats and things that look like floats. | Approximately-equal property for floats, which also verifies that | Allows you to negate a property and provide a string to hopefully give some clue as to what went wrong. Sorry cant think of a more helpful thing to say... Can't chang...
# LANGUAGE CPP # module Disorder.Core.Property ( (=/=) , (~~~) , (###) , (.^.) , (<=>) , (=\\=) , failWith , neg ) where import Data.AEq (AEq) import qualified Data.AEq as AEQ import Data.List ((\\)) import Data.Text ...