_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
cbd19349c5e2df34c16d2bf8947c94e1b491553b2acfe582cc51bd42c937d1d8
privet-kitty/cl-competitive
2d-rolling-hash.lisp
(defpackage :cp/test/2d-rolling-hash (:use :cl :fiveam :cp/2d-rolling-hash) (:import-from :cp/test/base #:base-suite)) (in-package :cp/test/2d-rolling-hash) (in-suite base-suite) (5am:test 2d-rolling-hash (declare (notinline rhash2d-matrix-hash)) (let ((rhash (make-rhash2d #2a((1 0 2 3) ...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/test/2d-rolling-hash.lisp
lisp
(defpackage :cp/test/2d-rolling-hash (:use :cl :fiveam :cp/2d-rolling-hash) (:import-from :cp/test/base #:base-suite)) (in-package :cp/test/2d-rolling-hash) (in-suite base-suite) (5am:test 2d-rolling-hash (declare (notinline rhash2d-matrix-hash)) (let ((rhash (make-rhash2d #2a((1 0 2 3) ...
68e40373c5e03f5b06e351796b8615e9e5b8d972659027a0707022238c08113a
FreeProving/free-compiler
FlattenExprPass.hs
-- | This module contains a compiler pass that transforms all expressions from -- function declarations into a flat form. An expression is "flat" if all -- function and constructors are only applied to variables. -- -- = Examples -- = = Example 1 -- -- The following function does contain functions, which ar...
null
https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/src/lib/FreeC/Pass/FlattenExprPass.hs
haskell
| This module contains a compiler pass that transforms all expressions from function declarations into a flat form. An expression is "flat" if all function and constructors are only applied to variables. = Examples The following function does contain functions, which are applied on other function cal...
= = Example 1 = = Example 2 For every function or constructor applications @f e₁ … eₙ@ where All applications of functions and constructors have the form @f x₁ where @f@ is a function or constructor and @x₁ , … , xₙ@ are variables . module FreeC.Pass.FlattenExprPass ( flattenExprPass , flatten...
bfaddc43b12a673e128aeab56a22029d4ff80e6ba6711dd0dc3b043a2d96f427
smallmelon/sdzmmo
pt_20.erl
%%%----------------------------------- %%% @Module : pt_20 @Author : xyao %%% @Email : @Created : 2010.04.29 @Description : 20战斗信息 %%%----------------------------------- -module(pt_20). -export([read/2, write/2]). %% %%客户端 -> 服务端 ---------------------------- %% 人打怪 read(20001, <<Id:32, Sid:32>>) -> {o...
null
https://raw.githubusercontent.com/smallmelon/sdzmmo/254ff430481de474527c0e96202c63fb0d2c29d2/src/proto/pt_20.erl
erlang
----------------------------------- @Module : pt_20 @Email : ----------------------------------- 客户端 -> 服务端 ---------------------------- 复活 使用辅助技能 服务端 -> 客户端 ------------------------------------ {ok, pt:pack(20002, Data)};
@Author : xyao @Created : 2010.04.29 @Description : 20战斗信息 -module(pt_20). -export([read/2, write/2]). 人打怪 read(20001, <<Id:32, Sid:32>>) -> {ok, [Id, Sid]}; 人打人 read(20002, <<Id:32, Sid:32>>) -> {ok, [Id, Sid]}; read(20004, _) -> {ok, <<>>}; read(20006, <<Id:32, Sid:32>>) -> {ok, [Id, Sid]...
a521b33dad417b92e9c8a4e01e2af1fac8a20a1df080b8036697d7d7a2cf65ea
mrkkrp/megaparsec
LexerSpec.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE MultiWayIf #-} # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # module Text.Megaparsec.Char.LexerSpec (spec) where import Control.Monad import qualified Data.CaseInsensitive as CI import Data.Char hiding (ord) import Data.List (isInfixOf) import Data.Maybe import Data.Sc...
null
https://raw.githubusercontent.com/mrkkrp/megaparsec/d5556790fa5d3f59efcd5a64b43669b9762ff277/megaparsec-tests/tests/Text/Megaparsec/Char/LexerSpec.hs
haskell
# LANGUAGE MultiWayIf # Rare tricky cases we don't want to deal with. -------------------------------------------------------------------------- Helpers
# LANGUAGE FlexibleContexts # # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # module Text.Megaparsec.Char.LexerSpec (spec) where import Control.Monad import qualified Data.CaseInsensitive as CI import Data.Char hiding (ord) import Data.List (isInfixOf) import Data.Maybe import Data.Scientific (Scientific, fromFl...
a445e69e65f36c02d1043795aa9b15e753c74d0f2c464921c987004e35f7d42e
graninas/Functional-Design-and-Architecture
DeviceDefinitions.hs
module Andromeda.Assets.DeviceDefinitions where import Andromeda.Hardware import Andromeda.Assets.Vendors.AAA.Components type Boosters = (Controller, Controller) lBooster :: DeviceName lBooster = DeviceName "left booster" rBooster :: DeviceName rBooster = DeviceName "right booster" lBoosterController :: Controller...
null
https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/b6a78f80a2a2e0b913bcab1d2279fc137a90db4c/Second-Edition-Manning-Publications/BookSamples/CH08/Section8p1/src/Andromeda/Assets/DeviceDefinitions.hs
haskell
module Andromeda.Assets.DeviceDefinitions where import Andromeda.Hardware import Andromeda.Assets.Vendors.AAA.Components type Boosters = (Controller, Controller) lBooster :: DeviceName lBooster = DeviceName "left booster" rBooster :: DeviceName rBooster = DeviceName "right booster" lBoosterController :: Controller...
5ae712d19b4e3665596668607ac7864d15039aba2c00b8572cae98e6c788de14
kowainik/piece-of-cake-slayer
Log.hs
-- | Logging action for the project. Currently just logs the output to terminal. module Piece.Effects.Log ( WithLog , mainLogAction , runAppAsHandler , runAppLogIO , runAppLogIO_ ) where import CakeSlayer.Error (ErrorWithSource (..)) import Colog (LogAction, Message, Msg (..), Severity, filte...
null
https://raw.githubusercontent.com/kowainik/piece-of-cake-slayer/98c44dae5cf8ffce896292beb042c315800ed0ae/src/Piece/Effects/Log.hs
haskell
| Logging action for the project. Currently just logs the output to terminal. -------------------------------------------------------------------------- Application runners with runners -------------------------------------------------------------------------- | Runs application as servant 'Handler'. | Runs applica...
module Piece.Effects.Log ( WithLog , mainLogAction , runAppAsHandler , runAppLogIO , runAppLogIO_ ) where import CakeSlayer.Error (ErrorWithSource (..)) import Colog (LogAction, Message, Msg (..), Severity, filterBySeverity, log, pattern E, richMessageAction) import Control.Mona...
6bf095043c97cf66ed79936863d2c2ad77f751da1689cf0bac0df4bcb2345197
deadpendency/deadpendency
HackageDeprecation.hs
module DF.Effect.FetchRegistryRepoInfo.Backend.LanguageRegistryFiles.Hackage.HackageDeprecation ( HackageDeprecation (..), fetchPackageDeprecation, ) where import Common.Model.Dependency.DependencyName import Common.Model.Dependency.Registry.RegistryAlivenessStatus import DF.Effect.FetchRegistryRepoInfo.Backen...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/dependency-fetcher/src/DF/Effect/FetchRegistryRepoInfo/Backend/LanguageRegistryFiles/Hackage/HackageDeprecation.hs
haskell
{"in-favour-of":["Cabal"],"is-deprecated":true} {"in-favour-of":[],"is-deprecated":false}
module DF.Effect.FetchRegistryRepoInfo.Backend.LanguageRegistryFiles.Hackage.HackageDeprecation ( HackageDeprecation (..), fetchPackageDeprecation, ) where import Common.Model.Dependency.DependencyName import Common.Model.Dependency.Registry.RegistryAlivenessStatus import DF.Effect.FetchRegistryRepoInfo.Backen...
3d60aa3defeb1cd0a95e67855b294d0137ce502a2e7b8edba4b2101a679bb1bf
fireflowerr/sudoku.hs
Bindings.hs
# LANGUAGE ForeignFunctionInterface # # LANGUAGE BlockArguments # {-# LANGUAGE ScopedTypeVariables #-} module Sudoku.Internal.Bindings where import Data.GI.Base.BasicTypes import Data.IORef import Foreign.C.String import Foreign.ForeignPtr import Foreign.Ptr import GI.Pango.Objects.FontMap import Unsaf...
null
https://raw.githubusercontent.com/fireflowerr/sudoku.hs/8c91a8214e009f2b81115d449cef62e6c459053c/src/Sudoku/Internal/Bindings.hs
haskell
# LANGUAGE ScopedTypeVariables # enable loading custom font into widgets
# LANGUAGE ForeignFunctionInterface # # LANGUAGE BlockArguments # module Sudoku.Internal.Bindings where import Data.GI.Base.BasicTypes import Data.IORef import Foreign.C.String import Foreign.ForeignPtr import Foreign.Ptr import GI.Pango.Objects.FontMap import Unsafe.Coerce import qualified Data.Text as T ...
aef23db316f599ea6e9e71f9666a487d75bbbc296729c81dbd5f25e38feb1ee1
jlongster/genetic-canvas
entry.scm
;;;; ;;;; This is the main entry point of the program, ;;;; letting Gambit take control over the main() setup ;;;; since it does a bunch of special things such ;;;; as initializing its VM, configuring interrupts, and more. ;;;; It especially handles cross-platform main() procedures. ;;;; ;;;; Control is immediately pas...
null
https://raw.githubusercontent.com/jlongster/genetic-canvas/2592e48ddbd168a819ca6ca330a6f8af6ffc37aa/app/entry.scm
scheme
This is the main entry point of the program, letting Gambit take control over the main() setup since it does a bunch of special things such as initializing its VM, configuring interrupts, and more. It especially handles cross-platform main() procedures. Control is immediately passed to the Cocoa world. Define...
(c-declare "#include \"cocoa.h\"") (define (gambit-entry) ((c-lambda (scheme-object) void "cocoa_entry") (command-line))) (gambit-entry)
3e880a5b0a30ae14d086e9808356c70bd5bc9a82e714e0d96f4dddd39f514ef9
facebookarchive/pfff
labels.mli
val bar: int -> string -> unit val foo: label1:int -> string -> unit
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/tests/ml/visual/labels.mli
ocaml
val bar: int -> string -> unit val foo: label1:int -> string -> unit
ec229933c212e326f1421caec939168f74dcd67f95cee2af8ee4b30d58307e05
fetburner/Coq2SML
coq_micromega.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/micromega/coq_micromega.ml
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 _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * : A reflexive tactic using ...
3e5fcf49aa0690e08f3d6405141475722cf0c62bd1a53b89ac35947fae60eb37
v-kolesnikov/sicp
1_41.clj
(ns sicp.chapter01.1-41) (defn double-func [g] (fn [x] (g (g x))))
null
https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/src/sicp/chapter01/1_41.clj
clojure
(ns sicp.chapter01.1-41) (defn double-func [g] (fn [x] (g (g x))))
fa72882fd5db5cc998eea9d549627fee1bc0625fbdef55531474c43c0975def2
openmusic-project/openmusic
print.lisp
;========================================================================= OpenMusic : Visual Programming Language for Music Composition ; Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France . ; This file is part of the OpenMusic environment sources ; OpenMusic is free software : you ...
null
https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/kernel/graphics/print.lisp
lisp
========================================================================= (at your option) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ======...
OpenMusic : Visual Programming Language for Music Composition Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France . This file is part of the OpenMusic environment sources OpenMusic is free software : you can redistribute it and/or modify it under the terms of the GNU General Public ...
4fde3a4b0ec9c965be75379e9274fa1df3b766b5f55066c540a356e9027590ec
re-ops/re-cog
file.clj
(ns re-cog.resources.file "File resources" (:require [clojure.core.strint :refer (<<)] [re-cog.common.resources :refer (run-)] [re-cog.common.functions :refer (require-functions)] [re-cog.common.defs :refer (def-serial)])) (require-functions) (def-serial directory "Directory resource: (directory...
null
https://raw.githubusercontent.com/re-ops/re-cog/e75481231bff80b1d3d3ba178968bd3128c91d78/src/re_cog/resources/file.clj
clojure
create remove" touch a file delete a file create a new symlink apply a template and create a file: change file/folder ownership using user/group change file/folder ownership recursively append line remove all lines equal to bar from the file remove lines using a function replace lines equal to bar with foo
(ns re-cog.resources.file "File resources" (:require [clojure.core.strint :refer (<<)] [re-cog.common.resources :refer (run-)] [re-cog.common.functions :refer (require-functions)] [re-cog.common.defs :refer (def-serial)])) (require-functions) (def-serial directory "Directory resource: [dest state]...
c2f2902131227a807d6de5dbffae6fabdeb4b1305bc8c23b70a685d18511360b
BranchTaken/Hemlock
test_pp.ml
open! Basis.Rudiments open! Basis open I64 let test () = let rec fn = function | [] -> () | x :: xs' -> begin File.Fmt.stdout |> fmt ~alt:true ~zpad:true ~width:64L ~radix:Radix.Bin ~pretty:true x |> Fmt.fmt " " |> fmt ~alt:true ~radix:Radix.Oct ~pretty:true x |> Fmt.f...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/i64/test_pp.ml
ocaml
open! Basis.Rudiments open! Basis open I64 let test () = let rec fn = function | [] -> () | x :: xs' -> begin File.Fmt.stdout |> fmt ~alt:true ~zpad:true ~width:64L ~radix:Radix.Bin ~pretty:true x |> Fmt.fmt " " |> fmt ~alt:true ~radix:Radix.Oct ~pretty:true x |> Fmt.f...
3c767607e2da64ead828c224f5917302409e1a2f3933c8b611330669c2dee9b7
timoore/lpsg
macros.lisp
;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- (in-package #:lpsg) (defmacro with-allocator ((allocator &rest allocator-args) &body body) "Bind @cl:param(allocator) to an allocator created with @cl:param(allocator-args) in @cl:param(body). The allocator is opened before and closed after executing @cl:param(body)" ...
null
https://raw.githubusercontent.com/timoore/lpsg/af2dcddb9d95c350a25e24da1f7dc53ce6d0f22b/lpsg/macros.lisp
lisp
-*- Mode: Lisp; indent-tabs-mode: nil -*- Hair for keeping the correct order of evaluation of macro keyword arguments. Standard setf values for the alist place
(in-package #:lpsg) (defmacro with-allocator ((allocator &rest allocator-args) &body body) "Bind @cl:param(allocator) to an allocator created with @cl:param(allocator-args) in @cl:param(body). The allocator is opened before and closed after executing @cl:param(body)" (multiple-value-bind (forms declarations) ...
494bef5f48a225f5294a892737b1f4c7df20e8b2f34886ce2181d3f46552bc83
janestreet/bin_prot
bench_numbers.ml
open Bin_prot These benchmarks are not supposed to show the performances of individual functions . For instance some bench run the benched function more times than other . These benchmarks are only intended to check performances regression . When one changes bin_prot , they should check that the resu...
null
https://raw.githubusercontent.com/janestreet/bin_prot/754fd507eb94fbf88f633aed7cec672e7259d180/bench/bench_numbers.ml
ocaml
open Bin_prot These benchmarks are not supposed to show the performances of individual functions . For instance some bench run the benched function more times than other . These benchmarks are only intended to check performances regression . When one changes bin_prot , they should check that the resu...
288fa807fb17dfe1978aea6ba960f883ed353e043de084dae16ccb98b1d39f1a
wedesoft/sfsim25
t_ray.clj
(ns sfsim25.t-ray (:require [midje.sweet :refer :all] [sfsim25.conftest :refer (roughly-matrix)] [clojure.core.matrix :refer (matrix mget)] [sfsim25.ray :refer :all])) (facts "Integrate over a ray" (integral-ray #:sfsim25.ray{:origin (matrix [2 3 5]) :direction (matrix [1 0 0])}...
null
https://raw.githubusercontent.com/wedesoft/sfsim25/e7a54dc9308c8c002a17edf5352cca75cd519bc4/test/sfsim25/t_ray.clj
clojure
(ns sfsim25.t-ray (:require [midje.sweet :refer :all] [sfsim25.conftest :refer (roughly-matrix)] [clojure.core.matrix :refer (matrix mget)] [sfsim25.ray :refer :all])) (facts "Integrate over a ray" (integral-ray #:sfsim25.ray{:origin (matrix [2 3 5]) :direction (matrix [1 0 0])}...
ff498450da0f88992c84415c495c2a4731343b933e7437e32bce68c30a87b4f9
brendanhay/amazonka
DescribedServer.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # Derived fr...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-transfer/gen/Amazonka/Transfer/Types/DescribedServer.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Module : Amazonka.Transfer.Types.DescribedServer Stability : auto-generated | Describes the properties of a file transfer protocol-enabled server that was specified. /See:/ 'newDescribedServer' smart constructor. certificate. Required when @Protoco...
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # Derived from AWS service descriptions , licensed under Apache 2.0 . Co...
e703db6e8b1116788c48ccd8332fa60fbcc096fee28687ab6e63b64017d7b79c
TyOverby/mono
bonsai_web_ui_partial_render_table.mli
open! Core open! Bonsai_web module For_testing : sig module Table_body = Table_body.For_testing type t = { body : Table_body.t } end module Focus : sig module By_row : sig type 'k t = { focused : 'k option ; unfocus : unit Effect.t ; focus_up : unit Effect.t ; focus_down : unit Effe...
null
https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-bonsai/web_ui/partial_render_table/src/bonsai_web_ui_partial_render_table.mli
ocaml
* There are a few ways to specify the columns on a partial render, table, and they each have their own tradeoffs and capibilities. You can not mix-and-match column kinds. Read the doc comments for each of the submodules to learn more. * Dynamic_cells is a column-specification format with the...
open! Core open! Bonsai_web module For_testing : sig module Table_body = Table_body.For_testing type t = { body : Table_body.t } end module Focus : sig module By_row : sig type 'k t = { focused : 'k option ; unfocus : unit Effect.t ; focus_up : unit Effect.t ; focus_down : unit Effe...
2ca99f0fbe2ac03ecf760b4e8313a110c6c5b6c54d1d3649cfbdc004def42d50
INRIA/zelus
run.ml
(* Higher-order operator to apply a stream of stream functions *) open Ztypes type 'a mem = { mutable m: 'a } type 'a instance = I: { s : 's; t : 's -> 'a } -> 'a instance [ irun(f , x ) ] takes two streams [ f : ' a -D- > ' b ] and [ x : ' a ] (* and computes [f(0)(x)] *) let irun = let alloc () = { m = None }...
null
https://raw.githubusercontent.com/INRIA/zelus/685428574b0f9100ad5a41bbaa416cd7a2506d5e/lib/std/run.ml
ocaml
Higher-order operator to apply a stream of stream functions and computes [f(0)(x)]
open Ztypes type 'a mem = { mutable m: 'a } type 'a instance = I: { s : 's; t : 's -> 'a } -> 'a instance [ irun(f , x ) ] takes two streams [ f : ' a -D- > ' b ] and [ x : ' a ] let irun = let alloc () = { m = None } in let step self (f, x) = let I { s; t } = match self.m with | None -> let...
6c546abdb47513d0f7f3723838c193c9b58345495b40824bf11890942dae997f
kelamg/HtDP2e-workthrough
ex310.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex310) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Intertwined-Data/ex310.rkt
racket
about the language level of this file in a form that our tools can easily process. Oldest Generation: Middle Generation: Youngest Generation: FT -> Boolean does an-ftree contain a child structure with "blue" in the eyes field FT -> N produces the number of of child structs in the tree
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex310) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (require 2htdp/abstraction) (define-struct no-parent ...
9fb1ea2651442690e89582009f1c942edc690d56e38f9043d1a69f26a2a0c5d8
ruricolist/FXML
node.lisp
;;; -*- show-trailing-whitespace: t; indent-tabs: nil -*- Copyright ( c ) 2007 . All rights reserved . ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; * Redistributions of source code must retain t...
null
https://raw.githubusercontent.com/ruricolist/FXML/a0e73bb48ef03adea94a55986cc27f522074c8e1/stp/node.lisp
lisp
-*- show-trailing-whitespace: t; indent-tabs: nil -*- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the follo...
Copyright ( c ) 2007 . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , (in-package :fxml.stp.impl) (defvar *check-uri-syntax* nil "If true (the default), a warning is issued if a string specified ...
aa6e60fa3f3e77b3cfd70dd84c1d51e8210b807a31f5b05ed609a9f05cd43756
bomberstudios/mtasc
extHashtbl.mli
* ExtHashtbl - extra functions over hashtables . * Copyright ( C ) 2003 * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation ; either * version 2.1 of the License , o...
null
https://raw.githubusercontent.com/bomberstudios/mtasc/d7c2441310248776aa89d60f9c8f98d539bfe8de/src/extlib-dev/extHashtbl.mli
ocaml
* Extra functions over hashtables. * The wrapper module * The type of a hashtable. * Return an enumeration of all the keys of a hashtable. If the key is in the Hashtable multiple times, all occurrences will be returned. * Return an enumeration of all the values of a hashtable. * Return an enumeration of...
* ExtHashtbl - extra functions over hashtables . * Copyright ( C ) 2003 * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation ; either * version 2.1 of the License , o...
08efce02436b94c291a68b0d693be07757de9341a8e67e3f3d1c5cc78238cf36
b0-system/b0caml
b0caml_main.ml
--------------------------------------------------------------------------- Copyright ( c ) 2019 The b0caml programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c...
null
https://raw.githubusercontent.com/b0-system/b0caml/6627cebe525575275b20c274f505d4c8dfd0ccd6/src/b0caml_main.ml
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2019 The b0caml programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c...
7701b338b903d9e29ac3f5bb8c7843b9a36079f7d2bbce90ac3f187662df8ff9
DaMSL/K3
Common.hs
# LANGUAGE ViewPatterns # module Language.K3.Codegen.CPP.Materialization.Common where import Control.Arrow import Data.Hashable import Language.K3.Core.Annotation import Language.K3.Core.Common import Language.K3.Core.Expression import Language.K3.Core.Type rollLambdaChain :: K3 Expression -> ([(Identifier, K3 Expr...
null
https://raw.githubusercontent.com/DaMSL/K3/51749157844e76ae79dba619116fc5ad9d685643/src/Language/K3/Codegen/CPP/Materialization/Common.hs
haskell
# LANGUAGE ViewPatterns # module Language.K3.Codegen.CPP.Materialization.Common where import Control.Arrow import Data.Hashable import Language.K3.Core.Annotation import Language.K3.Core.Common import Language.K3.Core.Expression import Language.K3.Core.Type rollLambdaChain :: K3 Expression -> ([(Identifier, K3 Expr...
dda0e3a9eb055f82b65ba6f8a52ce7fa57e1c4354815ff12cc5384eb3a096de9
monadbobo/ocaml-core
core_int.ml
open Sexplib.Std open Bin_prot.Std open Common module T = struct type t = int with bin_io, sexp According to estokes , if i = j then 0 else if i < j then -1 else 1 is only slightly faster , so we 've decided to stick with Pervasives.compare if i = j then 0 else if i < j then -1 else 1 ...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/core_int.ml
ocaml
* float division of integers
open Sexplib.Std open Bin_prot.Std open Common module T = struct type t = int with bin_io, sexp According to estokes , if i = j then 0 else if i < j then -1 else 1 is only slightly faster , so we 've decided to stick with Pervasives.compare if i = j then 0 else if i < j then -1 else 1 ...
ca144956697ecccc897133da50b66c865d8caec965adfb9fd0c8a10a0ec06db4
ghc/packages-base
Functor.hs
# LANGUAGE Trustworthy # ----------------------------------------------------------------------------- -- | -- Module : Data.Functor Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stability : provisional -- Po...
null
https://raw.githubusercontent.com/ghc/packages-base/52c0b09036c36f1ed928663abb2f295fd36a88bb/Data/Functor.hs
haskell
--------------------------------------------------------------------------- | Module : Data.Functor License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : provisional Portability : portable 'map' function on lists. | An infix synonym for 'fmap'. | Flipped versio...
# LANGUAGE Trustworthy # Copyright : ( c ) The University of Glasgow 2001 Functors : uniform action over a parameterized type , generalizing the module Data.Functor ( Functor(fmap), (<$), ($>), (<$>), void, ) where import Control.Monad import GHC.Base (Functor(..)) inf...
973558f227a4c200b45875eb19e86ac9c28d7699e1e1a9845b79ce9da3a1e70f
yellowbean/clojucture
project.clj
(defproject clojucture "0.0.6-SNAPSHOT" :description "a clojure library for modelling & analysis structure products (CLO/MBS/ABS)" :url "/" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [ [org.clojure/clojure "1.10.1"] [tech.tablesaw/tabl...
null
https://raw.githubusercontent.com/yellowbean/clojucture/3ad99e06ecd9e5c478f653df4afbd69991cd4964/project.clj
clojure
-collections4
(defproject clojucture "0.0.6-SNAPSHOT" :description "a clojure library for modelling & analysis structure products (CLO/MBS/ABS)" :url "/" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [ [org.clojure/clojure "1.10.1"] [tech.tablesaw/tabl...
8ac56ef05784105410e14d6b54fbffe23f2d72766a9e96dab2f541d08bb662d9
morpheusgraphql/morpheus-graphql
EntitiesApp.hs
# LANGUAGE DataKinds # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # OPTIONS_GHC -Wno - orphans # module Feature.NamedResolvers.EntitiesApp ( entitiesApp, ) where import Control.Monad.Except import Data.M...
null
https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/1d3ab7e3bc723e29ef8bd2a0c818a03ae82ce8ad/morpheus-graphql-server/test/Feature/NamedResolvers/EntitiesApp.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # OPTIONS_GHC -Wno - orphans # module Feature.NamedResolvers.EntitiesApp ( entitiesApp, ) where import Control.Monad.Except import Data.M...
a9ad7e6376a398fd36cf6e1f7bc9968f55b29983bc1747b9b4dff3c90145c986
Breezeemr/hitch
graph.cljc
(ns hitch.graph #?(:clj (:import (clojure.lang ILookup))) (:require [hitch.oldprotocols :as oldproto] [hitch.tracking.halt :as halt :refer [maybe-halt]])) (def ^:dynamic *execution-mode* true) (def ^:dynamic *tx-manager* nil) ;(declare apply-effects invalidate-nodes normalize-tx! schedule-actions...
null
https://raw.githubusercontent.com/Breezeemr/hitch/79efea3cbf601a56060237fd9add2c0b68024a03/src/hitch/graph.cljc
clojure
(declare apply-effects invalidate-nodes normalize-tx! schedule-actions) (prn "notify" selector-changed val) (declare apply-effects invalidate-nodes normalize-tx! schedule-actions) (prn "notify" selector-changed val) Or even whether something weaker is ok.
(ns hitch.graph #?(:clj (:import (clojure.lang ILookup))) (:require [hitch.oldprotocols :as oldproto] [hitch.tracking.halt :as halt :refer [maybe-halt]])) (def ^:dynamic *execution-mode* true) (def ^:dynamic *tx-manager* nil) (deftype Hook [graph selector cb] oldproto/ExternalDependent (-chan...
9d3e83004edb3ee0d4135fa9eeab6236bda81b56e6ef453b030f3b51c7c5bd2e
mikeplus64/Greg
Greg.hs
module Greg where import Greg.Simple import Greg.IRC (connect) import Greg.Types (Command, Message, Bot (..)) import Data.Text (Text) import Control.Concurrent import Control.Monad -- | Simplest way to get a bot up and running. This function logs to stdout with ' Greg.Simple.monitor ' , and makes a small IRC...
null
https://raw.githubusercontent.com/mikeplus64/Greg/bb3d5af691eed895e330cb3e5425e43419b0244c/src/Greg.hs
haskell
| Simplest way to get a bot up and running. to send messages to the channel, using 'Greg.Simple.client' ^ Path to config ^ available commands ^ Message handler (for messages other than commands)
module Greg where import Greg.Simple import Greg.IRC (connect) import Greg.Types (Command, Message, Bot (..)) import Data.Text (Text) import Control.Concurrent import Control.Monad This function logs to stdout with ' Greg.Simple.monitor ' , and makes a small IRC client that you can type into -> IO () g...
841afaab7f948c26ba00fe3faae5dc79a4c18ddffc57b2dc262fa1db29caed93
rems-project/lem
reporting.ml
(**************************************************************************) (* Lem *) (* *) , University of Cambridge , INRIA Paris -...
null
https://raw.githubusercontent.com/rems-project/lem/a839114e468119d9ac0868d7dc53eae7f3cc3a6c/src/reporting.ml
ocaml
************************************************************************ Lem ...
, University of Cambridge , INRIA Paris - Rocquencourt , University of Cambridge , University of Cambridge , University of Cambridge ( while working on Lem ) ...
c6d17d4ea44210973a8124322875f8c9785ce21568d76cf05b58bb00299ba9ec
ashinn/alschemist
bwt.scm
(define (block-sort str) (let* ((s (string-append "\x02;" str "\x03;")) (table (sort (map (lambda (i) (string-append (substring s i) (substring s 0 i))) (iota (string-length s)))))) (list->string (...
null
https://raw.githubusercontent.com/ashinn/alschemist/13d7105c1291a881b8d8d69c8e60e045428c04b1/chibi/coding/bwt.scm
scheme
(define (block-sort str) (let* ((s (string-append "\x02;" str "\x03;")) (table (sort (map (lambda (i) (string-append (substring s i) (substring s 0 i))) (iota (string-length s)))))) (list->string (...
0a8cf1ceb72a43d975e99ca286d272a5c6d97d4092116bef848afe35e42e6c59
ygmpkk/house
Items.hs
-- #hide ----------------------------------------------------------------------------- -- | -- Module : Menu.Items Copyright : ( c ) 2002 -- License : BSD-style -- -- Maintainer : -- Stability : provisional -- Portability : portable -- --------------------------------------------------------...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/ObjectIO/Graphics/UI/ObjectIO/Menu/Items.hs
haskell
#hide --------------------------------------------------------------------------- | Module : Menu.Items License : BSD-style Maintainer : Stability : provisional Portability : portable --------------------------------------------------------------------------- Removing menu elements from (su...
Copyright : ( c ) 2002 module Graphics.UI.ObjectIO.Menu.Items ( addMenusItems, addMenuRadioItems , removeMenusItems, removeMenusIndexItems ) where import Graphics.UI.ObjectIO.Id import Graphics.UI.ObjectIO.CommonDef import Graphics.UI.ObjectIO.Process.IOState import Graphics.UI.ObjectIO.StdMenuEle...
01b84394db3fa00641c5009d17a546b09dbf575f76acd0066bffeb085a6a0721
protojure/protoc-plugin
service.clj
Copyright © 2019 State Street Bank and Trust Company . All rights reserved ;; SPDX - License - Identifier : Apache-2.0 (ns hello.service (:require [io.pedestal.http :as http] [io.pedestal.http.route :as route] [io.pedestal.http.body-params :as body-params] [ring.util.respons...
null
https://raw.githubusercontent.com/protojure/protoc-plugin/d14311c67cb21656a3ae8b8cbe3d742b8ad7e1af/examples/hello/src/hello/service.clj
clojure
-- PROTOC-GEN-CLOJURE -- -- PROTOC-GEN-CLOJURE -- Implement our "Greeter" service interface. The compiler generates a defprotocol (addressbook/Greeter, in this case), and it is our job to define an implementation of every function within it. These will be invoked whenever a request arrives, similarly to if we ...
Copyright © 2019 State Street Bank and Trust Company . All rights reserved SPDX - License - Identifier : Apache-2.0 (ns hello.service (:require [io.pedestal.http :as http] [io.pedestal.http.route :as route] [io.pedestal.http.body-params :as body-params] [ring.util.response :...
768dc54f920496d7673beeecb77467b64ed08fa77d5189d4a57d4c23cd28c83d
passivsystems/protean
docprobe.clj
(ns protean.core.command.docprobe "Building probes and handling persisting/presenting raw results." (:require [clojure.string :as stg] [clojure.java.io :refer [file]] [io.aviso.ansi :as aa] [me.rossputin.diskops :as dsk] [silk.cli.api :as silk] [protean.co...
null
https://raw.githubusercontent.com/passivsystems/protean/5e9a9a83428899a42c45af019c86bd961d890f92/src/protean/core/command/docprobe.clj
clojure
============================================================================= Helper functions ============================================================================= ============================================================================= Probe config ==================================================...
(ns protean.core.command.docprobe "Building probes and handling persisting/presenting raw results." (:require [clojure.string :as stg] [clojure.java.io :refer [file]] [io.aviso.ansi :as aa] [me.rossputin.diskops :as dsk] [silk.cli.api :as silk] [protean.co...
58ad701369466170256ba6db4fd9098711d33763582d22e2eec9cdd0e76557e5
juhp/koji-tool
Install.hs
# LANGUAGE CPP # SPDX - License - Identifier : BSD-3 - Clause module Install ( Select(..), Request(..), installCmd, ExistingStrategy(..), PkgMgr(..), knownHubs, Yes(..), installArgs ) where import Control.Monad.Extra import Data.List.Extra import Data.Either (partitionEithers) import Data.Maybe i...
null
https://raw.githubusercontent.com/juhp/koji-tool/a4f58bfc5ade75c3fadcc69172803c47fa67e793/src/Install.hs
haskell
^ include, add, exclude FIXME --include devel, --exclude * FIXME support enterprise builds FIXME --arch (including src) debuginfo FIXME --delete after installing FIXME way to install selected packages using default dnf repo instead check - remote - time really needed ? kojiGetBuildRPMs huburl nvr bid >>= mapM...
# LANGUAGE CPP # SPDX - License - Identifier : BSD-3 - Clause module Install ( Select(..), Request(..), installCmd, ExistingStrategy(..), PkgMgr(..), knownHubs, Yes(..), installArgs ) where import Control.Monad.Extra import Data.List.Extra import Data.Either (partitionEithers) import Data.Maybe i...
c27d0fef73fb941853f4eae958e7dd3ef33eaa26284eee81f78be3bae272ec80
iu-parfunc/lvars
PureMap.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE NamedFieldPuns # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGE Trustworthy #-} # LANGUAGE TypeFamilies # { - # LANGUAGE MultiParamTypeClasses # - } {-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstanc...
null
https://raw.githubusercontent.com/iu-parfunc/lvars/78e73c96a929aa75aa4f991d42b2f677849e433a/src/lvish/Data/LVar/PureMap.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE RankNTypes # # LANGUAGE Trustworthy # # LANGUAGE DataKinds # {-# LANGUAGE FlexibleContexts #-} # LANGUAGE ConstraintKinds # * Basic operations * Generic routines and convenient aliases * Iteration and callbacks * Quasi-deterministic operati...
# LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # { - # LANGUAGE MultiParamTypeClasses # - } # LANGUAGE FlexibleInstances # # LANGUAGE CPP # # OPTIONS_GHC -fno - warn - name - shadowing # | This module provides finite maps that only grow . ...
7e585a9106619f058849269229fdd7d437cbc6f48568b67a42c9edce04e9f450
stoychoX/File-System
Driver.hs
module Driver where import FileSystem(FileSystem(..)) import Data.Char(toLower) import Parser(parseCmd, getNextDir, wordParser, eofParser) import MyStack(push, pop, top) import ChangingDirections (changeDir, changeEntity) import Predicates ( isNameOfFolder, isNameOfFile, isFilePath, validName ) import Adding (add...
null
https://raw.githubusercontent.com/stoychoX/File-System/ebeb06650fe32632539ef0cb9e983e9db7ae929f/Driver.hs
haskell
this should never happen
module Driver where import FileSystem(FileSystem(..)) import Data.Char(toLower) import Parser(parseCmd, getNextDir, wordParser, eofParser) import MyStack(push, pop, top) import ChangingDirections (changeDir, changeEntity) import Predicates ( isNameOfFolder, isNameOfFile, isFilePath, validName ) import Adding (add...
3cb6f66a7d8c41bd20dc0b09ab758a79922b051c9590e2a5dd4a9d82acc9411a
puppetlabs/puppetdb
facts_test.clj
(ns puppetlabs.puppetdb.facts-test (:require [puppetlabs.puppetdb.facts :refer [factpath-to-string facts-schema normalize-facts str->num string-to-factpath unencode-path-segment]] [clojure.test :refer :all] [schema.core :as s])) (deftest test-s...
null
https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/test/puppetlabs/puppetdb/facts_test.clj
clojure
(ns puppetlabs.puppetdb.facts-test (:require [puppetlabs.puppetdb.facts :refer [factpath-to-string facts-schema normalize-facts str->num string-to-factpath unencode-path-segment]] [clojure.test :refer :all] [schema.core :as s])) (deftest test-s...
c69a07fbabdc60b59da77c977a8acf4b9d079168157925261445016aea7d6e57
evturn/haskellbook
09.05-enum-from-to.hs
eftBool :: Bool -> Bool -> [Bool] eftBool True False = [] eftBool True True = [True] eftBool False True = [False, True] eftBool False False = [False] eftOrd :: Ordering -> Ordering -> [Ordering] eftOrd LT LT = [LT] eftOrd LT EQ = [LT, EQ] eftOrd LT GT = [LT, EQ, GT] eftOrd EQ EQ = [EQ] eftOrd EQ GT = [EQ, GT] eftO...
null
https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/09/09.05-enum-from-to.hs
haskell
eftBool :: Bool -> Bool -> [Bool] eftBool True False = [] eftBool True True = [True] eftBool False True = [False, True] eftBool False False = [False] eftOrd :: Ordering -> Ordering -> [Ordering] eftOrd LT LT = [LT] eftOrd LT EQ = [LT, EQ] eftOrd LT GT = [LT, EQ, GT] eftOrd EQ EQ = [EQ] eftOrd EQ GT = [EQ, GT] eftO...
bcb90ecb49eac15b66b2dde410e8814d84df66b6ae1f643b6dcac1306c908c59
LambdaHack/LambdaHack
Time.hs
{-# LANGUAGE DeriveFunctor, GeneralizedNewtypeDeriving #-} -- | Game time and speed. module Game.LambdaHack.Common.Time ( Time, timeTicks , timeZero, timeEpsilon, timeClip, timeTurn, timeSecond, clipsInTurn , absoluteTimeAdd, absoluteTimeSubtract, absoluteTimeNegate , timeFit, timeFitUp, timeRecent5 , Delta(....
null
https://raw.githubusercontent.com/LambdaHack/LambdaHack/76239193cb5250ac461f527f51443656506d547f/engine-src/Game/LambdaHack/Common/Time.hs
haskell
# LANGUAGE DeriveFunctor, GeneralizedNewtypeDeriving # | Game time and speed. * Internal operations | Game time in ticks. The time dimension. | The smallest unit of time. Should not be exported and used elsewhere, because the proportion of turn to tick is an implementation detail. The significance of this detail ...
module Game.LambdaHack.Common.Time ( Time, timeTicks , timeZero, timeEpsilon, timeClip, timeTurn, timeSecond, clipsInTurn , absoluteTimeAdd, absoluteTimeSubtract, absoluteTimeNegate , timeFit, timeFitUp, timeRecent5 , Delta(..), timeShift, timeDeltaToFrom, timeDeltaAdd, timeDeltaSubtract , timeDeltaReverse,...
ee69a4a76f1e258b743db202d52d05bb6a53895b8fcda4e7cf235aef43f2f449
dmitryvk/sbcl-win32-threads
parse-defmacro-errors.lisp
error - handling machinery for PARSE - DEFMACRO , separated from PARSE - DEFMACRO code itself because the happy path can be handled ;;;; earlier in the bootstrap sequence than DEFINE-CONDITION can be This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is...
null
https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/parse-defmacro-errors.lisp
lisp
earlier in the bootstrap sequence than DEFINE-CONDITION can be more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. Set up appropriate prettying and indentation on STREAM, print some boilerplate...
error - handling machinery for PARSE - DEFMACRO , separated from PARSE - DEFMACRO code itself because the happy path can be handled This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released...
b11800f971b08c93d46195ca2c78e779aaa4480c532ad4bbd838233aa4f6a732
ocaml-flambda/ocaml-jst
odoc_man.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/5bf2820278c58f6715dcfaf6fa61e09a9b0d8db3/ocamldoc/odoc_man.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 2001 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Odoc_info open Value open Type open Extension open Exception open Class open Module open Search let ma...
460efdaa2e49fae696b75f327853ce2224d679cf435c28f82ba45fd144c53e59
byron-network/byron-dex
API.hs
module Middleware.API where import Middleware.Dex.Types (ActivateForm, CoinSet (CoinSet), CreateCancelOrderParams (CreateCancelOrderParams), CreateLiquidityOrderParams (CreateLiquidityOrderParams), ...
null
https://raw.githubusercontent.com/byron-network/byron-dex/f234181c96ff50111f516292557359467a35962a/middleware/src/Middleware/API.hs
haskell
module Middleware.API where import Middleware.Dex.Types (ActivateForm, CoinSet (CoinSet), CreateCancelOrderParams (CreateCancelOrderParams), CreateLiquidityOrderParams (CreateLiquidityOrderParams), ...
f8f231f6c4441fd4a20b9912ecb916c713cecacc89220c419eeb014722e81012
elm/package.elm-lang.org
Legacy.hs
# OPTIONS_GHC -Wall # {-# LANGUAGE OverloadedStrings #-} module Legacy ( Version , getElmVersion , serve ) where import Control.Monad.Trans (liftIO) import qualified Data.Binary as Binary import qualified Data.ByteString as BS import qualified Data.ByteString.UTF8 as BS_UTF8 import qualified Data.List as Li...
null
https://raw.githubusercontent.com/elm/package.elm-lang.org/d4d5a997a5d9d6622694c488e6a3ae9f537da761/src/backend/Legacy.hs
haskell
# LANGUAGE OverloadedStrings # GET ELM VERSION SERVE SERVE /versions SERVE /permissions SERVE /description AND /documentation SERVE /all-packages HELPERS
# OPTIONS_GHC -Wall # module Legacy ( Version , getElmVersion , serve ) where import Control.Monad.Trans (liftIO) import qualified Data.Binary as Binary import qualified Data.ByteString as BS import qualified Data.ByteString.UTF8 as BS_UTF8 import qualified Data.List as List import qualified Data.Set as Set...
86e19125d7bc001cb6d15a8322c57df9be279321c1a4cf14e8b3485a568a5460
budu/lobos
www.clj
Copyright ( c ) . All rights reserved . ; 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 ; lice...
null
https://raw.githubusercontent.com/budu/lobos/6704f285a7870e84a838fe2e63307730e9d89443/src/leiningen/www.clj
clojure
The use and distribution terms for this software are covered by the 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 ( c ) . All rights reserved . Eclipse Public License 1.0 which can be found in the file (ns leiningen.www "Creates this project website." (:use (hiccup core page-helpers) cljss.core)) (defmacro defpage [pname [title & [filename]] & body] `(defn ~pname [] {:filename ~(or filename (na...
1fbb99ca6164dc0554fbe3772ddb6b557c5ad648769803b5b7fabbb9978d5523
sweet-tooth-clojure/endpoint
harness_test.clj
(ns sweet-tooth.endpoint.test.harness-test (:require [clojure.test :refer [deftest is]] [sweet-tooth.endpoint.system :as es] [sweet-tooth.endpoint.test.harness :as eth] [integrant.core :as ig])) (defmethod ig/init-key ::a [_ opts] opts) (defmethod ig/init-key ::b [_ opts] opt...
null
https://raw.githubusercontent.com/sweet-tooth-clojure/endpoint/bafe8448b26aefa4b44d2bf7fe2f9c565cfad414/test/sweet_tooth/endpoint/test/harness_test.clj
clojure
don't know of a good way to test test helper failures yet :( don't know of a good way to test test helper failures yet :(
(ns sweet-tooth.endpoint.test.harness-test (:require [clojure.test :refer [deftest is]] [sweet-tooth.endpoint.system :as es] [sweet-tooth.endpoint.test.harness :as eth] [integrant.core :as ig])) (defmethod ig/init-key ::a [_ opts] opts) (defmethod ig/init-key ::b [_ opts] opt...
b51b88ca438b3c7791fa89711e88e8f93a49611eaee79d74b045f4b27bb96a54
ghcjs/jsaddle-dom
SVGFEImageElement.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.SVGFEImageElement (getPreserveAspectRatio, SVGFEImageElement(..), gTypeSVGFEImageElement) where impo...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/SVGFEImageElement.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.SVGFEImageElement (getPreserveAspectRatio, SVGFEImageElement(..), gTypeSVGFEImageElement) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral,...
281b004f928d6449b13bc62bc07dd3d3808f9b833070a97a8b285640a7facb03
mark-watson/loving-common-lisp
read-test-2.lisp
(defun read-test-2 () "using pathname, read a maximum of 1000 expresions from the file 'test.dat'" (let ((a-path-name (make-pathname :directory "testdata" :name "test.dat"))) (with-open-file (input-stream a-path-name :direction :input) (dotimes (i 1000) (let ((x (read input-stream nil nil))) ...
null
https://raw.githubusercontent.com/mark-watson/loving-common-lisp/32f6abf3d2e500baeffd15c085a502b03399a074/src/code_snippets_for_book/read-test-2.lisp
lisp
break out of the 'dotimes' loop
(defun read-test-2 () "using pathname, read a maximum of 1000 expresions from the file 'test.dat'" (let ((a-path-name (make-pathname :directory "testdata" :name "test.dat"))) (with-open-file (input-stream a-path-name :direction :input) (dotimes (i 1000) (let ((x (read input-stream nil nil))) ...
a1ec0052f48397eaa4fbba9c7e6a9644bb5f93729f021f1cd30bb5fb2561ab6b
conscell/hugs-android
ST.hs
module ST( module Data.STRef.Strict, module Data.Array.ST, module Control.Monad.ST, module Hugs.ST, ) where import Data.STRef.Strict import Data.Array.ST import Control.Monad.ST import Hugs.ST
null
https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/oldlib/ST.hs
haskell
module ST( module Data.STRef.Strict, module Data.Array.ST, module Control.Monad.ST, module Hugs.ST, ) where import Data.STRef.Strict import Data.Array.ST import Control.Monad.ST import Hugs.ST
49e1b72c36cf43bff032fda6cd22c9d26126eec2a3233a12f3031b8db8e99b3a
brendanhay/terrafomo
Provider.hs
-- This module is auto-generated. # LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # OPTIONS_GHC -fno - warn - unused - imports # -- | Module : . Lailgun . Provider Copyright : ( c ) 2017 - 2018 License : Mozilla Public License , v. 2.0 . Maintai...
null
https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-mailgun/gen/Terrafomo/Lailgun/Provider.hs
haskell
This module is auto-generated. | Stability : auto-generated * Lailgun Specific Aliases * Lailgun Configuration ^ @api_key@ - (Required) ^ The minimal/required arguments.
# LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # OPTIONS_GHC -fno - warn - unused - imports # Module : . Lailgun . Provider Copyright : ( c ) 2017 - 2018 License : Mozilla Public License , v. 2.0 . Maintainer : < brendan.g.hay+ > Portabil...
6f54e8ebe9df076d05f5b636298ea45240141d63eb8f72c2d3c6d28229d1b714
IvanRublev/year_progress_bot
notifyer.erl
-module(notifyer). -export([evaluate_send_progress/1]). -compile([{parse_transform, lager_transform}]). evaluate_send_progress(BatchSpec) -> {H, M} = date:time(), if ((H >= 11) and (M >= 30) or (H >= 12)) -> send_progress(BatchSpec, date:now(), #{}); true -> ok end. send_progress({BatchSi...
null
https://raw.githubusercontent.com/IvanRublev/year_progress_bot/c3e85a5598d768933d5fb676c74d92fa8033cf60/apps/year_progress_bot/src/notifyer.erl
erlang
-module(notifyer). -export([evaluate_send_progress/1]). -compile([{parse_transform, lager_transform}]). evaluate_send_progress(BatchSpec) -> {H, M} = date:time(), if ((H >= 11) and (M >= 30) or (H >= 12)) -> send_progress(BatchSpec, date:now(), #{}); true -> ok end. send_progress({BatchSi...
348bf767e861904206cea8112e8829322b5d134db33ad3cf7296bc92da863720
music-suite/music-suite
UseMTL.hs
# LANGUAGE GeneralizedNewtypeDeriving , , DeriveTraversable # import Control.Applicative import Data.Functor.Identity import Control.Monad.Writer.Class import Control.Monad.Reader.Class import Control.Monad.State.Class import Control . Monad . RWST import Control . . List . Class import Control.Monad.Writer impo...
null
https://raw.githubusercontent.com/music-suite/music-suite/7f01fd62334c66418043b7a2d662af127f98685d/sketch/UseMTL.hs
haskell
type WriterT w m a = m (a, w) type ListT m a = m [a] Note MUST be a commutative Monoid as per below RUNTIME: id RUNTIME: id See -things-i-dont-understand-about-monads/ -list-0.7/docs/Control-Monad-Sequence.html -2.2.1/docs/Control-Monad-List.html MonadWriter Duration actually not needed (or simply deriv...
# LANGUAGE GeneralizedNewtypeDeriving , , DeriveTraversable # import Control.Applicative import Data.Functor.Identity import Control.Monad.Writer.Class import Control.Monad.Reader.Class import Control.Monad.State.Class import Control . Monad . RWST import Control . . List . Class import Control.Monad.Writer impo...
b76a8c5bc198a7df630187ca7c83be747fe2f1d7ca3dae1e22b378afbd6552b3
xh4/web-toolkit
callbacks.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; ;;; callbacks.lisp --- Tests on callbacks. ;;; Copyright ( C ) 2005 - 2006 , loliveira(@)common - lisp.net > ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated documentation files ( the " Sof...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/cffi_0.20.1/tests/callbacks.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- callbacks.lisp --- Tests on callbacks. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, subl...
Copyright ( C ) 2005 - 2006 , loliveira(@)common - lisp.net > files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY ...
bae4480bfe30e11dbb4b728a58ac10a59568c97a79e794825316dbb7b6b238c7
DeathKing/Hit-DataStructure-On-Scheme
graph-matrix.scm
(load "../library/graph-basic.scm") (load "../library/matrix.scm") (load "../library/matrix-extend.scm") ;;; MAKE-GRAPH: make a graph present by adjance-matrix. vertexs : a list of vertex ;;; edges: a list of edge (define (make-graph vertexs edges) (let* ((s (length vertexs)) (m (make-matrix s s 0))) ...
null
https://raw.githubusercontent.com/DeathKing/Hit-DataStructure-On-Scheme/11677e3c6053d6c5b37cf0509885f74ab5c2bab9/library/graph-matrix.scm
scheme
MAKE-GRAPH: make a graph present by adjance-matrix. edges: a list of edge graph: the graph VERTEX-NEIGHBORS: find all the neibors of a vertex vi: the index of vertex v graph: the graph VERTEX-ADJACENT: check whether the vertex u and v are adjancent ui: the index of vertex u vi: the index of ve...
(load "../library/graph-basic.scm") (load "../library/matrix.scm") (load "../library/matrix-extend.scm") vertexs : a list of vertex (define (make-graph vertexs edges) (let* ((s (length vertexs)) (m (make-matrix s s 0))) (do ((es edges (cdr es))) ((null? es) m) (let ((e (car es))) ...
b6afe1e1e48066d98e80cc720d5c3222535559202e2c6fac7bf51d9ca9b0a22a
ahrefs/devkit
idn.mli
* Punycode & IDN module type CONV = sig val upoints : string -> int array val ustring : int array -> string end module Make(CONV : CONV) : sig exception Bad_input exception Overflow * { 1 punycode conversion } val encode : string -> string val decode : string -> string * { 1 IDN conversion } val enc...
null
https://raw.githubusercontent.com/ahrefs/devkit/559c2df8f6eacb091e0eac38f508c45b6567bdd8/idn.mli
ocaml
* Punycode & IDN module type CONV = sig val upoints : string -> int array val ustring : int array -> string end module Make(CONV : CONV) : sig exception Bad_input exception Overflow * { 1 punycode conversion } val encode : string -> string val decode : string -> string * { 1 IDN conversion } val enc...
f42138d9f9e08d412e4bc2408e2d4ecf0c79fa7e53ae86fe60659e287d2d0d71
metaocaml/ber-metaocaml
test_stdlabels.ml
(* TEST flags += " -nolabels " *) module A : module type of Array = ArrayLabels module B : module type of Bytes = BytesLabels module L : module type of List = ListLabels module S : module type of String = StringLabels module M : module type of struct include Map end [@remove_aliases] = MoreLabels.Map module Se ...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/lib-stdlabels/test_stdlabels.ml
ocaml
TEST flags += " -nolabels " For we will have following error: Error: Signature mismatch: ... Type declarations do not match: type statistics = Hashtbl.statistics is not included in type statistics = { num_bindings : int; num_buckets :...
module A : module type of Array = ArrayLabels module B : module type of Bytes = BytesLabels module L : module type of List = ListLabels module S : module type of String = StringLabels module M : module type of struct include Map end [@remove_aliases] = MoreLabels.Map module Se : module type of struct include Set e...
062561cd7ecfaec8a4d07fbd7e3ebdd159a6889c743561d8e865708100656893
gheber/kenzo
coalgebras.lisp
COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS (IN-PACKAGE #:cat-8) (PROVIDE "coalgebras") (DEFVAR *CLGB-LIST*) (SETF *CLGB-LIS...
null
https://raw.githubusercontent.com/gheber/kenzo/48e2ea398b80f39d3b5954157a7df57e07a362d7/src/kenzo-8/coalgebras.lisp
lisp
COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS COALGEBRAS (IN-PACKAGE #:cat-8) (PROVIDE "coalgebras") (DEFVAR *CLGB-LIST*) (SETF *CLGB-LIS...
96f3f68facc75fef40029193b65d1f2a10a0897126f7a352fef61b72f8f2ccbb
gwathlobal/CotD
init-normal-building-types.lisp
(in-package :cotd) ;;===================== Houses ;;===================== (set-building-type (make-building :id +building-city-house-1+ :grid-dim '(2 . 2) :act-dim '(9 . 9) :type +building-type-house+ :func #'(lambda (x y z template-level terrains) ...
null
https://raw.githubusercontent.com/gwathlobal/CotD/d01ef486cc1d3b21d2ad670ebdb443e957290aa2/src/buildings/init-normal-building-types.lisp
lisp
===================== ===================== ===================== ===================== ===================== ===================== populate the area with trees, leaving the border untouched place a large birch tree place grass around trees find a place to position citizens populate the area with trees, ...
(in-package :cotd) Houses (set-building-type (make-building :id +building-city-house-1+ :grid-dim '(2 . 2) :act-dim '(9 . 9) :type +building-type-house+ :func #'(lambda (x y z template-level terrains) (let ((build-template-z-2 (lis...
d7f81b60de8452295d5ab5a5fb9bd5f845570958f237b37cb199bd76c4f75e65
amnh/PCG
Range.hs
----------------------------------------------------------------------------- -- | -- Module : Bio.Character.Encodable.Ranged Copyright : ( c ) 2015 - 2021 Ward Wheeler -- License : BSD-style -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -- -------------------------...
null
https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/utility/src/Data/Range.hs
haskell
--------------------------------------------------------------------------- | Module : Bio.Character.Encodable.Ranged License : BSD-style Maintainer : Stability : provisional Portability : portable --------------------------------------------------------------------------- # LANGUAGE DeriveAn...
Copyright : ( c ) 2015 - 2021 Ward Wheeler # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # module Data.Range ( Bound() , Range() , Ranged(..) , fromTuple , fromTupleWithPrecision , lowerBound , upperBound , precision * Set - like operations on...
b5fc70abec7762b47682fcc0212777e49d1dec21929ae87e80ad22b1c59a0b52
haroldcarr/learn-haskell-coq-ml-etc
Wiki_haskell_org_all_about_monads.hs
# OPTIONS_GHC -fno - warn - missing - signatures # # OPTIONS_GHC -fno - warn - type - defaults # # OPTIONS_GHC -fno - warn - unused - do - bind # FlexibleContexts for getRan ' # LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} {- :set -XOverloadedStrings ...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/monads/wiki-haskell-org_all-about-monads/src/Wiki_haskell_org_all_about_monads.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE PackageImports # :set -XOverloadedStrings ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- the type of monad m return is a type constructor that creates monad inst...
# OPTIONS_GHC -fno - warn - missing - signatures # # OPTIONS_GHC -fno - warn - type - defaults # # OPTIONS_GHC -fno - warn - unused - do - bind # FlexibleContexts for getRan ' # LANGUAGE FlexibleContexts # Created : 2015 Aug 15 ( Sat ) 09:41:08 by . Last Modified : 2018 Jun 17 ( Sun ) 11:33...
80b63b74644a6d9ecfe134db76e6138c3a5f8982ac298c257a027b42bee89725
argp/bap
ast_mapper.ml
Apply a mapping to all expressions in a program . @author @author Thanassis *) open Ast open Ast_visitor class type map = object method exp : exp -> exp method stmt : stmt -> stmt method prog : program -> program method cfg : Cfg.AST.G.t -> Cfg.AST.G.t end let map_e f = let visitor = object(...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/ast_mapper.ml
ocaml
Apply a mapping to all expressions in a program . @author @author Thanassis *) open Ast open Ast_visitor class type map = object method exp : exp -> exp method stmt : stmt -> stmt method prog : program -> program method cfg : Cfg.AST.G.t -> Cfg.AST.G.t end let map_e f = let visitor = object(...
be70b6663676ad8cfe89dc7f77d40c6cf2750b1ef33a41b18b62e340b897c91a
noloop/cacau
list-test.lisp
(in-package #:noloop.cacau-test) (r-test :test-list-reporter (lambda (r-done) (defsuite :suite-1 () (let ((x 0)) (defbefore-all "Before-all Suite-1" () (setf x 1)) (deftest "Test-1" () (eql-p x 1)) (deftest "Test-2" ((:async done)) (incf x) (funcall done (lambda () (eql...
null
https://raw.githubusercontent.com/noloop/cacau/ba0fb36a284ded884f1dab0bd3f0f41ec14e3038/t/reporter/list-test.lisp
lisp
31;43m<=> Cacau <=> 31mError message:
(in-package #:noloop.cacau-test) (r-test :test-list-reporter (lambda (r-done) (defsuite :suite-1 () (let ((x 0)) (defbefore-all "Before-all Suite-1" () (setf x 1)) (deftest "Test-1" () (eql-p x 1)) (deftest "Test-2" ((:async done)) (incf x) (funcall done (lambda () (eql...
56d077abab82ee92c3e74e268db45556cbb025db826e1885da630bcf4041fa2f
mzp/coq-ruby
refl_tauto.ml
(************************************************************************) 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/rtauto/refl_tauto.ml
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 : refl_tauto.ml 104...
0d7cfe09866568630b3600352478199cc93f4b17853c2bcb91e3f8f033bbc3f3
apache/couchdb-setup
setup_sup.erl
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not % use this file except in compliance with the License. You may obtain a copy of % the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " AS ...
null
https://raw.githubusercontent.com/apache/couchdb-setup/9fd7f448065b4eb29910c9e14d1ac89af589e3c1/src/setup_sup.erl
erlang
use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations u...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(setup_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000...
23963ce22078c134f025ff8b304bcdab4a3ad901ea3e80912bfbb208df72a5b9
brendanhay/terrafomo
DataSources.hs
-- This module is auto-generated. # LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # -- | Module : . Consul . DataSources Copyright : ( c ) 2017 - 2018 License ...
null
https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-consul/gen/Terrafomo/Consul/DataSources.hs
haskell
This module is auto-generated. | Stability : auto-generated * consul_agent_config * consul_agent_self * consul_catalog_nodes * consul_catalog_service * consul_catalog_services * consul_key_prefix * consul_keys * consul_nodes * consul_service * consul_services | The main @consul_agent_config@ datasource...
# LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # Module : . Consul . DataSources Copyright : ( c ) 2017 - 2018 License : Mozilla Public License , v. 2.0 . ...
f223eef5b170ef19860e697c90c33f0bc3d7ef53e27854e088d6cf0711136183
3b/3bil
ctests.lisp
(in-package :avm2-compiler) ;;; trying to set up something resembling automated regression tests, ;;; with minimum effort to write a test... (defparameter *side-effect-fun* nil) (defmacro def-tests (name (&key) &body tests) (let ((good (gensym "good")) (bad (gensym "bad")) (errors (gensym "err")) ...
null
https://raw.githubusercontent.com/3b/3bil/c852181848bedf476373e901869ca29471f926ee/test/ctests.lisp
lisp
trying to set up something resembling automated regression tests, with minimum effort to write a test... don't bother running tests on host, just assert the return T todo: more types as needed do (ftrace i) defun with side effects for tests to scoping tests fixme: intern symbols (catch 'a (throw 'a 'thrown-a)) (...
(in-package :avm2-compiler) (defparameter *side-effect-fun* nil) (defmacro def-tests (name (&key) &body tests) (let ((good (gensym "good")) (bad (gensym "bad")) (errors (gensym "err")) (side (gensym "side")) (calls '((call0 (f) (let ((r (funcall f))) (side-effect ...
22c9247959d160e89bac97a1c1975cd8c9ff248bbfa69d4cf8312746ff03915c
mfikes/fifth-postulate
ns346.cljs
(ns fifth-postulate.ns346) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns346.cljs
clojure
(ns fifth-postulate.ns346) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
9ba989a350831be0c50c0cb59a2c9fbcb388f9fe0f45cf41412e1d5e85670fab
vindarel/cl-readline
package.lisp
;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp -*- ;;; ;;; Package definition for cl-readline, bindings to GNU Readline library. ;;; Copyright © 2015–2018 ;;; ;;; cl-readline 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 Softw...
null
https://raw.githubusercontent.com/vindarel/cl-readline/64fb9472cbefe570a79bc799c5d0dc11b1087f65/package.lisp
lisp
-*- Mode: Lisp; Syntax: ANSI-Common-Lisp -*- Package definition for cl-readline, bindings to GNU Readline library. cl-readline is free software: you can redistribute it and/or modify it option) any later version. cl-readline is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without ...
Copyright © 2015–2018 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 You should have received a copy of the GNU General Public License along (defpackage :cl-readline (:nicknames :rl) (:use #:common-li...
41613380dc1882039b21f821fa3f73901e4c4f6e6d12971c95629f8acc425384
openbadgefactory/salava
test_utils.clj
(ns salava.core.test-utils (:require [clojure.test] [clj-http.client :as client] [clojure.tools.logging :refer [*logger-factory*]] [clojure.tools.logging.impl :refer [disabled-logger-factory]] [clj-http.cookies :as cookies] [ring.mock.request :as mock] ...
null
https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/clj/salava/core/test_utils.clj
clojure
(ns salava.core.test-utils (:require [clojure.test] [clj-http.client :as client] [clojure.tools.logging :refer [*logger-factory*]] [clojure.tools.logging.impl :refer [disabled-logger-factory]] [clj-http.cookies :as cookies] [ring.mock.request :as mock] ...
4f1e660c04f0a4527efefe8bc56d4934bad283c68c410cebca76e68879608676
soegaard/pyffi
test-module.rkt
#lang racket/base (require pyffi) (require (for-syntax racket/base syntax/parse racket/syntax)) (initialize) (finish-initialization) (import-into-python 'pygments) (import-into-python 'pygments.lexers) (import-into-python 'pygments.formatters) (define pygments (python->racket (get 'pygmen...
null
https://raw.githubusercontent.com/soegaard/pyffi/8d03a48b636d5a8b74e94f45ef0a4e7220cb4a08/pyffi-tests/tests/test-module.rkt
racket
(dict-keys (module-dict pygments)) (void (dict-values (module-dict pygments))) (dict-size (module-dict pygments)) (dict-new) (dict-proxy-new (dict-new)) (dict-values d) (module-functions pygments.lexers) (module-functions pygments.formatters)
#lang racket/base (require pyffi) (require (for-syntax racket/base syntax/parse racket/syntax)) (initialize) (finish-initialization) (import-into-python 'pygments) (import-into-python 'pygments.lexers) (import-into-python 'pygments.formatters) (define pygments (python->racket (get 'pygmen...
669f79b2aade76d1dc78327d12ce563045d9da68db8b3c5423dc4b55ed7911b6
racket/plai
classic-error.rkt
#lang plai/mutator This is ` classic ' in that it caught many bugs in copying collectors that students wrote for CS173 , Fall 2007 . (allocator-setup "../good-collectors/good-collector.rkt" 28) 'trash 'junk after GC , alpha beta are copied but the cons references them in the old semispace (define my-pair (cons 'al...
null
https://raw.githubusercontent.com/racket/plai/164f3b763116fcfa7bd827be511650e71fa04319/plai-lib/tests/gc/good-mutators/classic-error.rkt
racket
we have room for our-pair, but 'refuse forces a semi-space swap that exposes the memory corruption (if one exists)
#lang plai/mutator This is ` classic ' in that it caught many bugs in copying collectors that students wrote for CS173 , Fall 2007 . (allocator-setup "../good-collectors/good-collector.rkt" 28) 'trash 'junk after GC , alpha beta are copied but the cons references them in the old semispace (define my-pair (cons 'al...
5b9fbd2ac040072836676d1527a1c5e1374c51d25d3e494619ccf1c4e9cf88b0
theosotr/buildfs
make_fault.mli
* Copyright ( c ) 2018 - 2020 * * 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 , version 3 . * * This program is distributed in the hope that it will be useful , but ...
null
https://raw.githubusercontent.com/theosotr/buildfs/3cd287da0d1184934c1bcd28d301f2545196f44b/src/build/make_fault.mli
ocaml
* Copyright ( c ) 2018 - 2020 * * 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 , version 3 . * * This program is distributed in the hope that it will be useful , but ...
3aff31cddd955638c3b829a13b25760dae4ff53d49104592fa38817e06aa4bac
zcaudate/hara
watch_test.clj
(ns hara.core.base.watch-test (:use hara.test) (:require [hara.core.base.watch :as watch]) (:refer-clojure :exclude [get set])) ^{:refer hara.core.base.watch/wrap-select :added "3.0"} (fact "enables operating on a given key" ((watch/wrap-select (fn [_ _ p n] (+ p n)) ...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/core/base/watch_test.clj
clojure
options can be given to either transform the current input as well as to only execute the callback if there is a difference. change in :a does not affect watch change in :b does
(ns hara.core.base.watch-test (:use hara.test) (:require [hara.core.base.watch :as watch]) (:refer-clojure :exclude [get set])) ^{:refer hara.core.base.watch/wrap-select :added "3.0"} (fact "enables operating on a given key" ((watch/wrap-select (fn [_ _ p n] (+ p n)) ...
fe0a46766adbd3b78f3ccb762e4c9359dd65b26be344469d6a3f550f6aa05729
ludwigpacifici/saumon
alcotest_testable.ml
open Alcotest open Saumon let ast_literal = testable Ast.pp_literal Ast.equal_literal let ast_program = testable Ast.Program.pp Ast.Program.equal let scanner_error = testable Scanner.pp_error Scanner.equal_error let token = testable Token.pp Token.equal let value = testable Value.pp Value.equal let value_error = testa...
null
https://raw.githubusercontent.com/ludwigpacifici/saumon/e8a05216ffae5a58ce3ceed5ae3e989b81930ed5/test/unit-tests/alcotest_testable.ml
ocaml
open Alcotest open Saumon let ast_literal = testable Ast.pp_literal Ast.equal_literal let ast_program = testable Ast.Program.pp Ast.Program.equal let scanner_error = testable Scanner.pp_error Scanner.equal_error let token = testable Token.pp Token.equal let value = testable Value.pp Value.equal let value_error = testa...
eaf1b9f9a26ed14e45328be46b91256e98cbcf5d81562e87e56e2022fb114512
helium/helium-packet-router
hpr_skf_stream_worker.erl
%%%------------------------------------------------------------------- %% @doc %% === Config Service Session Key Filter Worker === %% %% Same as `hpr_route_stream_worker' but for Session Key Filters. %% Go see the other module for some notes about failure modes. %% %% @end %%%-------------------------------------------...
null
https://raw.githubusercontent.com/helium/helium-packet-router/b1ad09295b48c0e49a5ff66ff5adb948ece21d3b/src/grpc/iot_config/hpr_skf_stream_worker.erl
erlang
------------------------------------------------------------------- @doc === Config Service Session Key Filter Worker === Same as `hpr_route_stream_worker' but for Session Key Filters. Go see the other module for some notes about failure modes. @end ---------------------------------------------------------------...
-module(hpr_skf_stream_worker). -behaviour(gen_server). -include("hpr.hrl"). -export([ start_link/1 ]). gen_server Function Exports -export([ init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2 ]). -ifdef(TEST). -define(BACKOFF_MIN, timer:seconds(1)). -else. -define(BACKOFF_M...
4543a0fd4c5d6e8c5d9deed0d8303a0d0008c191fb6ce134065b9382dc4127f0
chef/chef-server
chef_index_test_utils.erl
-module(chef_index_test_utils). read_file(File) -> file:read_file(filename(File)). filename(File) -> filename:join([".", "apps", "chef_index", "test", File]). start_stats_hero() -> application:set_env(stats_hero, estatsd_host, "localhost"), application:set_env(stats_hero, estatsd_port, dumb_random_po...
null
https://raw.githubusercontent.com/chef/chef-server/c9aa9a63fca77597181881eb4d36859db11edfa6/src/oc_erchef/apps/chef_index/test/chef_index_test_utils.erl
erlang
-module(chef_index_test_utils). read_file(File) -> file:read_file(filename(File)). filename(File) -> filename:join([".", "apps", "chef_index", "test", File]). start_stats_hero() -> application:set_env(stats_hero, estatsd_host, "localhost"), application:set_env(stats_hero, estatsd_port, dumb_random_po...
73e8e84053c537d8cac3353d6854382a75af65c7120b28f1609c032365ca68e1
jeffshrager/biobike
common-datatypes.lisp
;; Copyright ( c ) 2005 , Gigamonkeys Consulting All rights reserved . ;; (in-package :com.gigamonkeys.binary-data.common-datatypes) (define-binary-type unsigned-integer (bytes bits-per-byte) (:reader (in) (loop with value = 0 for low-bit downfrom (* bits-per-byte (1- bytes)) to 0 by bits-per-byte do ...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/ThirdParty/monkeylib/binary-data/common-datatypes.lisp
lisp
Strings ISO-8859-1 strings particular byte ordering as indicated by the BOM value. is in bytesty. On the write side, since we don't have any way of knowing what BOM was used to read the string we just pick one. This does mean roundtrip transparency could be broken.
Copyright ( c ) 2005 , Gigamonkeys Consulting All rights reserved . (in-package :com.gigamonkeys.binary-data.common-datatypes) (define-binary-type unsigned-integer (bytes bits-per-byte) (:reader (in) (loop with value = 0 for low-bit downfrom (* bits-per-byte (1- bytes)) to 0 by bits-per-byte do ...
d52b0697216e39087c5b631234fbdfa8391009a782ac99893e0d9eeec67c654e
hopv/MoCHi
omegaInterface.ml
Temporary Implementation of Interface to Omega Calculator ( oc ) (* To use functions in this module, you need to install omega calculator and set Environment.omega to the installation path. *) (* type: CEGAR_syntax.var list -> CEGAR_syntax.var list -> CEGAR_syntax.t list -> CEGAR_syntax.t -> bool xs: univer...
null
https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/src/omegaInterface.ml
ocaml
To use functions in this module, you need to install omega calculator and set Environment.omega to the installation path. type: CEGAR_syntax.var list -> CEGAR_syntax.var list -> CEGAR_syntax.t list -> CEGAR_syntax.t -> bool xs: universally quantified variables ys: existentially quantified variables cond...
Temporary Implementation of Interface to Omega Calculator ( oc ) open Util open CEGAR_syntax exception Unknown module Debug = Debug.Make(struct let check = Flag.Debug.make_check __MODULE__ end) let rec print_conj print fm xs = match xs with | [] -> () | [x] -> print fm x | x::xs -> Format.fprintf f...
0bc698d8e0d8b966610225ad417c0006ae2390e4f6e759d4aa431bda00327f8e
purescript/purescript
Imports.hs
module Language.PureScript.Ide.Filter.Imports where import Protolude hiding (isPrefixOf) import Language.PureScript.Ide.Types import Language.PureScript.Ide.Imports import qualified Language.PureScript as P matchImport :: Maybe P.ModuleName -> P.ModuleName -> IdeDeclarationAnn -> Impo...
null
https://raw.githubusercontent.com/purescript/purescript/3b6630592e82ca039d8adec3ad4c8e1dbf0f53e3/src/Language/PureScript/Ide/Filter/Imports.hs
haskell
Can this occur? (..) or explicitly lists constructor
module Language.PureScript.Ide.Filter.Imports where import Protolude hiding (isPrefixOf) import Language.PureScript.Ide.Types import Language.PureScript.Ide.Imports import qualified Language.PureScript as P matchImport :: Maybe P.ModuleName -> P.ModuleName -> IdeDeclarationAnn -> Impo...
0135ecf3b2ef292129879e8f4604777ecf79cec74ebdbf80f25db49520f8d84a
mooreryan/ocaml_python_bindgen
hello.ml
open! Base open Gen_ml_and_mli_lib let () = Py.initialize () let thing = Or_error.ok_exn @@ Thing.create ~name:"Ryan" () let () = assert (String.("Ryan" = Thing.name thing)) let orange = Or_error.ok_exn @@ Orange.create ~flavor:"Sooo good!" () let () = assert (String.("Sooo good!" = Orange.flavor orange))
null
https://raw.githubusercontent.com/mooreryan/ocaml_python_bindgen/2d8439c9c7ad3ec00264644cdb62687529a2f2a2/examples/gen_ml_and_mli/bin/hello.ml
ocaml
open! Base open Gen_ml_and_mli_lib let () = Py.initialize () let thing = Or_error.ok_exn @@ Thing.create ~name:"Ryan" () let () = assert (String.("Ryan" = Thing.name thing)) let orange = Or_error.ok_exn @@ Orange.create ~flavor:"Sooo good!" () let () = assert (String.("Sooo good!" = Orange.flavor orange))
ddde4058d678de1cba90ce7fbac94a06be76c977f3a6e0fcd8c9264b73e28ad0
ijvcms/chuanqi_dev
vip_boss_config.erl
%%%------------------------------------------------------------------- @author zhengsiying %%% @doc %%% 自动生成文件,不要手动修改 %%% @end Created : 2016/10/12 %%%------------------------------------------------------------------- -module(vip_boss_config). -include("common.hrl"). -include("config.hrl"). -compile([export_al...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/config/vip_boss_config.erl
erlang
------------------------------------------------------------------- @doc 自动生成文件,不要手动修改 @end -------------------------------------------------------------------
@author zhengsiying Created : 2016/10/12 -module(vip_boss_config). -include("common.hrl"). -include("config.hrl"). -compile([export_all]). get_list_conf() -> [ vip_boss_config:get(X) || X <- get_list() ]. get_list() -> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]. get(1) -> #vip_boss_con...
06c43983f98f689cf2909500ec6a7e6bbb38924e957faae6775029b6b55b8b02
input-output-hk/ouroboros-network
Mempool.hs
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingVia #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeFamilies # # OPTIONS_GHC -Wno - orphans # module Ouroboros.Consensus.ByronSpec.Ledger.Mempool ( -- * Type family...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/999f250358b875746bdc92838a3f60bd62010a53/ouroboros-consensus-byronspec/src/Ouroboros/Consensus/ByronSpec/Ledger/Mempool.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # * Type family instances Dummy values, as these are not used in practice.
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeFamilies # # OPTIONS_GHC -Wno - orphans # module Ouroboros.Consensus.ByronSpec.Ledger.Mempool ( GenTx (..) , Validated (..) ) where import Codec.Serialise import GHC.Generics (Generic) import NoThunks.Class (A...
450a54f8a8b8517f931731c2dcc93f9e06f0b27916f998acb7c38d113ec30460
zadean/xqerl
fn_root_SUITE.erl
-module('fn_root_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['fn-root-1'/1]). -export(['fn-root-2'/1]). -export(['fn-root-3'/1]). -export(['fn-root-...
null
https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/fn/fn_root_SUITE.erl
erlang
-module('fn_root_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['fn-root-1'/1]). -export(['fn-root-2'/1]). -export(['fn-root-3'/1]). -export(['fn-root-...
5479866a489e1685c41b4c77ab4785695f51bbdd4869a4c41f51d075161b3379
cmr-exchange/cmr-client
core.clj
(ns cmr.client.http.core "A Clojure HTTP client API for use by the CMR service clients." (:require [cmr.client.common.util :as util] [cmr.client.http.impl :as impl] [cmr.client.http.protocol :as api] [potemkin :refer [import-vars]]) (:import (cmr.client.http.impl HTTPClientData)) (:refer-clojure :ex...
null
https://raw.githubusercontent.com/cmr-exchange/cmr-client/0b4dd4114e3b5ed28fc5b57db0f8dcd8773c1c14/src/clj/cmr/client/http/core.clj
clojure
Protocols &tc. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Implementation ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
(ns cmr.client.http.core "A Clojure HTTP client API for use by the CMR service clients." (:require [cmr.client.common.util :as util] [cmr.client.http.impl :as impl] [cmr.client.http.protocol :as api] [potemkin :refer [import-vars]]) (:import (cmr.client.http.impl HTTPClientData)) (:refer-clojure :ex...
4d6e72c3801457df4f83a8fb5489668dab152af02da46988980dac3d44a68f8a
yallop/ocaml-ctypes
functions.ml
* Copyright ( c ) 2014 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2014 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) (* Foreign function bindings ...
null
https://raw.githubusercontent.com/yallop/ocaml-ctypes/52ff621f47dbc1ee5a90c30af0ae0474549946b4/tests/test-views/stubs/functions.ml
ocaml
Foreign function bindings for the views tests.
* Copyright ( c ) 2014 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2014 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) open Ctypes module Stubs (F...
afc948d7cb9f15281b18162761e7ce9abe5bdb394b0d7509cc3418217c74b1e2
RBornat/jape
proviso.mli
Copyright ( C ) 2003 - 19 This file is part of the proof engine , which is part of . 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 ver...
null
https://raw.githubusercontent.com/RBornat/jape/afe9f207e89e965636b43ef8fad38fd1f69737ae/distrib/camlengine/proviso.mli
ocaml
Copyright ( C ) 2003 - 19 This file is part of the proof engine , which is part of . 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 ver...
73f5896a988b5b277ba3317e751c2cdf050bc484260a68bf6d82ebcce8e52fac
informatimago/lisp
source-form.lisp
-*- coding : utf-8 -*- ;;;;************************************************************************** FILE : source-form.lisp ;;;;LANGUAGE: Common-Lisp ;;;;SYSTEM: Common-Lisp USER - INTERFACE : ;;;;DESCRIPTION ;;;; ;;;; This package exports functions to parse and manipul...
null
https://raw.githubusercontent.com/informatimago/lisp/6e4ef5480c7c03613eda423fb9d265d7ef466954/common-lisp/lisp-sexp/source-form.lisp
lisp
************************************************************************** LANGUAGE: Common-Lisp SYSTEM: Common-Lisp DESCRIPTION This package exports functions to parse and manipulate Common Lisp sources as lisp forms (such as in macros). parameters from ...
-*- coding : utf-8 -*- FILE : source-form.lisp USER - INTERFACE : < PJB > < > MODIFICATIONS 2021 - 06 - 09 < PJB > Added remove - whole - parameter and remove - environment - parameter . 2016 - 01 - 16 < PJB > Added parameter - parameter - list and make - parameter - list . ...
c1ab3fa4f5a5b16fd255cc976372529335a30a2e2bc13a008eb138c7f9561777
input-output-hk/cardano-wallet
TypesSpec.hs
# LANGUAGE DataKinds # # LANGUAGE DerivingVia # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeApplications # # OPTIONS_GHC -fn...
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet/7b541e0b11fdd69b30d94104dbd5fa633ff1d5c3/lib/wallet/test/unit/Cardano/Wallet/Primitive/TypesSpec.hs
haskell
Extra hand-crafted tests The value of 'fromFlatSlot' is undefined when applied to a value that is higher than the maximum value of 'flatSlot' for that epoch length. Therefore, the roundtrip property only holds when the flat slot value is less than or equal to this maximum. For flat slot values that are higher ...
# LANGUAGE DataKinds # # LANGUAGE DerivingVia # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeApplications # # OPTIONS_GHC -fn...
e967f6ea31082eef625c9010dcc0340695f7f8bea2748abf0c2b677faefa9d9f
lisp/de.setf.xml
namespace.lisp
-*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*- (in-package :xml-query-data-model) (setq xml-query-data-model:*namespace* (xml-query-data-model:defnamespace "#" (:use) (:ni...
null
https://raw.githubusercontent.com/lisp/de.setf.xml/827681c969342096c3b95735d84b447befa69fa6/namespaces/lsdis-cs-uga-edu/projects/semdis/opus/namespace.lisp
lisp
Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*- (xqdm:find-namespace "#" :if-does-not-exist :load)
(in-package :xml-query-data-model) (setq xml-query-data-model:*namespace* (xml-query-data-model:defnamespace "#" (:use) (:nicknames) (:export) (:docu...
dd5cb589d8ca3ae6997903489e5d1cb2d5b6b9d6e4d164cffe183a5ca3e3340c
cardmagic/lucash
fname.scm
;;; Code for processing Unix file names. Copyright ( c ) 1992 by ( ) . ;;; See file COPYING We adhere to file name rules , plus we treat files beginning with ;;; ~ as absolute paths. Relevant bits of CScheme : pathnm sfile unxdir unxpar unxprm unxpth (define (file-name-directory? fname) Note ! "...
null
https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scsh/fname.scm
scheme
Code for processing Unix file names. See file COPYING ~ as absolute paths. and file-name (root). "" -> "." Trim trailing slashes. No slash. Trim slashes. Returns FNAME's directory component in *directory form.* Insert slashes *between* elts of PATHLIST. special case for pathlist = '("") Absolute path not re...
Copyright ( c ) 1992 by ( ) . We adhere to file name rules , plus we treat files beginning with Relevant bits of CScheme : pathnm sfile unxdir unxpar unxprm unxpth (define (file-name-directory? fname) Note ! " " is directory ( cwd ) (char=? #\/ (string-ref fname (- (string-length fname) 1)...
22d9038167cfb1e957181fefcbc80e946d7c15efb11c1769f446d647b3e55c5d
WeiDUorg/weidu
smutil.ml
(* smutil.ml *) (* some random utilities I think should be built in to the language *) open BatteriesInit let isEmpty (lst: 'a list) : bool = begin match lst with | _ :: _ -> false | _ -> true end let isNotEmpty (lst: 'a list) : bool = begin (not (isEmpty lst)) end let isNone (o: 'a option) : bool = begin ...
null
https://raw.githubusercontent.com/WeiDUorg/weidu/a4048b11e6904f39ea1f956a36018e5d9a6e8e5c/elkhound/smutil.ml
ocaml
smutil.ml some random utilities I think should be built in to the language true if 'o' is a Some, and it equals (==) 'v'
open BatteriesInit let isEmpty (lst: 'a list) : bool = begin match lst with | _ :: _ -> false | _ -> true end let isNotEmpty (lst: 'a list) : bool = begin (not (isEmpty lst)) end let isNone (o: 'a option) : bool = begin match o with | None -> true | _ -> false end let isSome (o: 'a option) : bool = be...
2338504f758e9c02b5209b310f57d2ba0627de001cb95186148c396e3e83c24a
kappelmann/eidi2_repetitorium_tum
ha9_sol.ml
open Ha9_angabe Hilfsfunktion , die verwendet werden kann , um eine Datei nach Benutzung immer sicher zu schließen immer sicher zu schließen *) let protect ~f ~finally = try let result = f () in finally (); result with ex -> finally (); raise ex let read_csv (init : 'a) (setters : 'a setter list) (fil...
null
https://raw.githubusercontent.com/kappelmann/eidi2_repetitorium_tum/1d16bbc498487a85960e0d83152249eb13944611/additional_exercises/2016_17/Blatt%209%20L%C3%B6sungen/ocaml/ha9_sol.ml
ocaml
Der jeweilige Setter wird auf seine Spalte angewendet. Es folgt der Stamm.
open Ha9_angabe Hilfsfunktion , die verwendet werden kann , um eine Datei nach Benutzung immer sicher zu schließen immer sicher zu schließen *) let protect ~f ~finally = try let result = f () in finally (); result with ex -> finally (); raise ex let read_csv (init : 'a) (setters : 'a setter list) (fil...
f04d72811c092fd6a42c282e6aded7247269db6f62044fe28be4b2a3a30dcc47
ar-nelson/schemepunk
flexvectors-body2.scm
(define flexvector-unfold (case-lambda ((p f g seed) (define fv (flexvector)) (assume (procedure? p)) (assume (procedure? f)) (assume (procedure? g)) (do ((seed seed (g seed))) ((p seed) fv) (flexvector-add-back! fv (f seed)))) ((p f g . seeds) (define fv (flexvecto...
null
https://raw.githubusercontent.com/ar-nelson/schemepunk/e2840d3c445933528aaf0a36ec72b053ec5016ce/polyfills/flexvectors-body2.scm
scheme
(define flexvector-unfold (case-lambda ((p f g seed) (define fv (flexvector)) (assume (procedure? p)) (assume (procedure? f)) (assume (procedure? g)) (do ((seed seed (g seed))) ((p seed) fv) (flexvector-add-back! fv (f seed)))) ((p f g . seeds) (define fv (flexvecto...
99b4e4f6ab2dabc8c61567e3d9a5379eed646fc57677bd9bf6937c3913fea0ec
5HT/ant
Serialise.ml
open XNum; open Types; open Unicode.Types; open Unicode.SymbolTable; (* serialise *) type ser_data = { stream : IO.ostream; num_syms : mutable int; anon_syms : mutable SymbolMap.t int }; value empty_sym = string_to_symbol [| |]; value write_symbol data sym = do { let str = symbol_to_string sym; let l...
null
https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/VM/Private/Serialise.ml
ocaml
serialise Special treatment of anonymous symbols. unserialise
open XNum; open Types; open Unicode.Types; open Unicode.SymbolTable; type ser_data = { stream : IO.ostream; num_syms : mutable int; anon_syms : mutable SymbolMap.t int }; value empty_sym = string_to_symbol [| |]; value write_symbol data sym = do { let str = symbol_to_string sym; let len = Array.lengt...
4603ff70a811ff9ad5a32c17aa82aa8a730afd7f00836b629ca1babaae8f75e4
yutopp/rill
main.ml
* Copyright 2020 - . * * Distributed under the Boost Software License , Version 1.0 . * ( See accompanying file LICENSE_1_0.txt or copy at * ) * Copyright yutopp 2020 - . * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * ) *) ...
null
https://raw.githubusercontent.com/yutopp/rill/375b67c03ab2087d0a2a833bd9e80f3e51e2694f/rillc/bin/tool/compile/main.ml
ocaml
* Copyright 2020 - . * * Distributed under the Boost Software License , Version 1.0 . * ( See accompanying file LICENSE_1_0.txt or copy at * ) * Copyright yutopp 2020 - . * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * ) *) ...
402593909d169c342e22d69dca236c326de19279943180f43579f3ffb84cae79
gnarroway/hato
middleware.clj
(ns hato.middleware "Adapted from -http" (:require [clojure.edn :as edn] [clojure.java.io :as io] [clojure.string :as str] [clojure.walk :refer [prewalk]] [hato.multipart :as multipart] [hato.conversion :as conversion]) (:import (hato.conversion DefaultDecoder) (java.util Base64) (j...
null
https://raw.githubusercontent.com/gnarroway/hato/711c6e88ecab39bf0e14156aa933fd3036e5182d/src/hato/middleware.clj
clojure
Cheshire is an optional dependency, so we check for it at compile time. Transit is an optional dependency, so check at compile time. explicitly handle case where stream is empty Statuses for which hato will not throw an exception Multimethods for coercing body type to the :as key This weirdness is because HTT...
(ns hato.middleware "Adapted from -http" (:require [clojure.edn :as edn] [clojure.java.io :as io] [clojure.string :as str] [clojure.walk :refer [prewalk]] [hato.multipart :as multipart] [hato.conversion :as conversion]) (:import (hato.conversion DefaultDecoder) (java.util Base64) (j...
f7c28e8262bfdd90152c5f6269bc088f11c107bde9bce9805afacba9901e8eb4
runtimeverification/haskell-backend
PredicatePattern.hs
# LANGUAGE UndecidableInstances # | Copyright : ( c ) Runtime Verification , 2020 - 2021 License : BSD-3 - Clause Copyright : (c) Runtime Verification, 2020-2021 License : BSD-3-Clause -} module Kore.Attribute.PredicatePattern ( PredicatePattern (PredicatePattern, freeVariables), -- simpl...
null
https://raw.githubusercontent.com/runtimeverification/haskell-backend/fae73ac06cc9bcf8e24b0bdd2f07069610277d58/kore/src/Kore/Attribute/PredicatePattern.hs
haskell
simplified is excluded on purpose * Re-exports | @Pattern@ are the attributes of a pattern collected during verification. Checks whether the pattern is simplified relative to the given side condition. Checks whether the pattern is simplified relative to some side condition. Checks whether the pattern is simplif...
# LANGUAGE UndecidableInstances # | Copyright : ( c ) Runtime Verification , 2020 - 2021 License : BSD-3 - Clause Copyright : (c) Runtime Verification, 2020-2021 License : BSD-3-Clause -} module Kore.Attribute.PredicatePattern ( PredicatePattern (PredicatePattern, freeVariables), simplifi...