_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
8c67351b3316fdf7f7e95d1d6ddf64589750a85864ae2dd598f9a4da8ab5160f
travelping/ergw_aaa
ergw_aaa_static.erl
Copyright 2016 - 2019 Travelping GmbH < > %% This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . -module(ergw_aaa_st...
null
https://raw.githubusercontent.com/travelping/ergw_aaa/d52e29ac6abeff2fa6e7f3dd634a1efc3fdeb499/src/ergw_aaa_static.erl
erlang
This program is free software; you can redistribute it and/or =================================================================== API =================================================================== handle_response/6 =================================================================== Options Validation =========...
Copyright 2016 - 2019 Travelping GmbH < > modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . -module(ergw_aaa_static). -behaviour(ergw_aaa). AAA API -export([validate_handle...
a9dcbe7a191cf163e62b2dbc705dba2c062aa8725796035d7b42a26e95fc4cac
bsaleil/lc
nucleic.scm.scm
;;------------------------------------------------------------------------------ Macros (##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body))) (def-macro (FLOATvector-const . lst) `',(list->vector lst)) (def-macro (FLOATvector? x) `(vector? ,x)) (def-macro (FLOATvector . lst...
null
https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/tools/benchtimes/resultVMIL-lc-gsc-lc/LC5/nucleic.scm.scm
scheme
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Gabriel benchmarks C benchmarks Other benchmarks This program is a modified v...
Macros (##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body))) (def-macro (FLOATvector-const . lst) `',(list->vector lst)) (def-macro (FLOATvector? x) `(vector? ,x)) (def-macro (FLOATvector . lst) `(vector ,@lst)) (def-macro (FLOATmake-vector n . init) `(make-vector ,...
c117de28ce24a9897e0bb2a02901f8a1947b80d1bb56d99e419c0467ad656544
facebook/pyre-check
issue.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/pyre-check/bcbe47da04118b6ece778483b30c638685e2d570/source/interprocedural_analyses/taint/issue.ml
ocaml
Issue: implements the logic that matches sources against sinks, using the * current set of rules, and convert them into issues. * It also defines a handle that uniquely represents issues. Define how to group issue candidates for a given function. If all sources have the same base, we can remove sink flows that ...
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
f85a5bf67044733a9ba4f8233a41601e70af4dbef61d3cb8d497cad641c67b20
avsm/mirage-duniverse
tar_lwt_unix.mli
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED ...
null
https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/tar/unix/tar_lwt_unix.mli
ocaml
* Lwt_unix I/O for tar-formatted data * Return the header needed for a particular file on disk * Utility functions for operating over whole tar archives * List the contents of a tar to stdout * [extract dest] extract the contents of a tar. Apply 'dest' on each source filename to know the destination filename ...
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED ...
57c8030f5b049d4b576f1701c6d6fd01c8e7b9c3808ddbc74b30416be98eef80
spurious/sagittarius-scheme-mirror
enums.sps
#!r6rs (import (tests r6rs enums) (tests r6rs test) (rnrs io simple)) (display "Running tests for (rnrs enums)\n") (run-enums-tests) (report-test-results)
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/r6rs-test-suite/tests/r6rs/run/enums.sps
scheme
#!r6rs (import (tests r6rs enums) (tests r6rs test) (rnrs io simple)) (display "Running tests for (rnrs enums)\n") (run-enums-tests) (report-test-results)
ec82956c595f382405af766ab9c82adb254a5950ed258080adf243688a1ff2f9
dubrousky/mockmma
init2.lisp
for non - allegro CL systems . #+Allegro (excl::set-case-mode :case-sensitive-lower) (load "mma") (use-package :mma) (load "uconsalt") (load "parser") (load "stack1") (load "disp1") (load "eval") (load "poly") (load "rat1") (load "simp1") (load "pf") (load "match") (load "diffrat")
null
https://raw.githubusercontent.com/dubrousky/mockmma/036e7ba0773e43da50438a4f93774966cf82011f/init2.lisp
lisp
for non - allegro CL systems . #+Allegro (excl::set-case-mode :case-sensitive-lower) (load "mma") (use-package :mma) (load "uconsalt") (load "parser") (load "stack1") (load "disp1") (load "eval") (load "poly") (load "rat1") (load "simp1") (load "pf") (load "match") (load "diffrat")
549c17677f152fb8eea42889ca6162e47beb136f9851073dd6bd45fb88813d07
ocaml/ocaml-lsp
document_text_command.ml
open Import open Fiber.O let command_name = "ocamllsp/show-document-text" let command_run server store args = let uri = match args with | Some [ `String arg ] -> arg | _ -> assert false in let doc = Document_store.get store (Uri.t_of_yojson (`String uri)) |> Document.text in let uri, chan = ...
null
https://raw.githubusercontent.com/ocaml/ocaml-lsp/0d798b6a848f54cc4a09778335e42a4e0db3d4ef/ocaml-lsp-server/src/document_text_command.ml
ocaml
open Import open Fiber.O let command_name = "ocamllsp/show-document-text" let command_run server store args = let uri = match args with | Some [ `String arg ] -> arg | _ -> assert false in let doc = Document_store.get store (Uri.t_of_yojson (`String uri)) |> Document.text in let uri, chan = ...
1c7f564a0c2b6b376f2dbfbd26bd591884adf51130f23edc09af064340daa32f
acieroid/scala-am
icp_8_compiler.scm
;; ;;toegevoegd ;; (define true #t) (define false #f) (define (expand-clauses clauses) (if (null? clauses) 'false (let ((first (car clauses)) (rest (cdr clauses))) (if (cond-else-clause? first) (if (null? rest) (sequence->exp (cond-actions first)) ...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/icp/icp_8_compiler.scm
scheme
toegevoegd zie deel 1.1 p52 zie deel 1.1 p24 zie deel 1.1 p18 zie deel 1.1 p19 zie deel 1.1 p18 zie deel 1.1 p21 zie deel 1.1 p22 zie deel 1.1 p24 zie deel 1.1 p28 zie deel 1.1 p32 zie deel 1.1 p44 zie deel 1.1 p45 zie deel 1.1 p44 zie deel 1.1 p46 zie deel 1.1 p48 zie...
(define true #t) (define false #f) (define (expand-clauses clauses) (if (null? clauses) 'false (let ((first (car clauses)) (rest (cdr clauses))) (if (cond-else-clause? first) (if (null? rest) (sequence->exp (cond-actions first)) (error "ELS...
3010da1f7249fc30c3ce9c150245f630b7ff1652d7a5a97d8282bf81575c0c97
Mushy-pea/Game-Dangerous
AssmGplc.hs
Game : : Dangerous code by . You are free to use this software and view its source code . -- If you wish to redistribute it or use it as part of your own work, this is permitted as long as you acknowledge the work is by the abovementioned author. This is a development tool that generates bytecode from GPLC so...
null
https://raw.githubusercontent.com/Mushy-pea/Game-Dangerous/d11de34d655c28ced6fbe120d8acb955bebd7e2d/app/AssmGplc.hs
haskell
If you wish to redistribute it or use it as part of your own work, this is permitted as long as you acknowledge the work is by the abovementioned author. This function recognises the keywords that correspond to op - codes and is the beginning of the pipeline that transforms them and their arguments into bytecode. lo...
Game : : Dangerous code by . You are free to use this software and view its source code . This is a development tool that generates bytecode from GPLC source code . module Main where import System.IO import System.IO.Unsafe import System.Environment import Data.Maybe import Data.List.Split import Control.Ex...
849d34ea20ed455701f78a990b460f1b3a5d595b83c0746deb6e6f06b02935c3
divipp/lensref
DotPlugin.hs
#!/home/divip/bin/runhaskell module Main where import Numeric import Text.Pandoc import Text.Pandoc.Shared import Text.Pandoc.JSON import System.Process import Data.Maybe import Data.List -- from the utf8-string package on HackageDB: import Data.ByteString.Lazy.UTF8 (fromString) from the SHA package on HackageDB : i...
null
https://raw.githubusercontent.com/divipp/lensref/2f0b9a36ac8853780e2b09ad0769464dd3837dab/docs/DotPlugin.hs
haskell
from the utf8-string package on HackageDB: from package hint This plugin allows you to include a graphviz "dot" diagram in a document like this: ~~~ {.dot name="diagram1"} digraph G {Hello->World} ~~~ color c s = "\x1b[" ++ show c ++ "m" ++ s ++ "\x1b[0m" bars index button entry selected not active error...
#!/home/divip/bin/runhaskell module Main where import Numeric import Text.Pandoc import Text.Pandoc.Shared import Text.Pandoc.JSON import System.Process import Data.Maybe import Data.List import Data.ByteString.Lazy.UTF8 (fromString) from the SHA package on HackageDB : import Data.Digest.Pure.SHA import GHC.IO.Handl...
312f7d11c6b467783f02a9898854943158ac8eb7fedc265cd793d5da7c804370
xmonad/xmonad-contrib
CustomKeys.hs
-------------------------------------------------------------------- -- | -- Module : XMonad.Util.CustomKeys -- Description : Configure key bindings. Copyright : ( c ) 2007 -- License : BSD3-style (see LICENSE) -- -- Customized key bindings. -- See also " XMonad . Util . EZConfig " in xmonad - contri...
null
https://raw.githubusercontent.com/xmonad/xmonad-contrib/3058d1ca22d565b2fa93227fdde44d8626d6f75d/XMonad/Util/CustomKeys.hs
haskell
------------------------------------------------------------------ | Module : XMonad.Util.CustomKeys Description : Configure key bindings. License : BSD3-style (see LICENSE) Customized key bindings. ------------------------------------------------------------------ * Usage $usage $usage In @~\/.xmo...
Copyright : ( c ) 2007 See also " XMonad . Util . EZConfig " in xmonad - contrib . module XMonad.Util.CustomKeys ( customKeys , customKeysFrom ) where import XMonad import XMonad.Prelude ((<&>)) import Control.Monad.R...
b40854c8039b9fd3b3adf9b8567af2b610c5f2b7226bc8d6424b49adee6b5182
caisah/sicp-exercises-and-examples
unordered_lists.scm
(define (element-of-set? x set) (cond ((null? set) false) ((equal? x (car set)) true) (else (element-of-set? x (cdr set))))) (define (adjoin-set x set) (if (element-of-set? x set) set (cons x set))) (define (intersection-set set1 set2) (cond ((or (null? set1) (null? set2)) '()) ...
null
https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/2.3.3-representing_sets/unordered_lists.scm
scheme
(define (element-of-set? x set) (cond ((null? set) false) ((equal? x (car set)) true) (else (element-of-set? x (cdr set))))) (define (adjoin-set x set) (if (element-of-set? x set) set (cons x set))) (define (intersection-set set1 set2) (cond ((or (null? set1) (null? set2)) '()) ...
b24b292c630bf72a82ebf4d6044d31d74957e262d2a2f17582dcf43cd6dcf7dd
zwizwa/erl_tools
hs.erl
Convert Erlang type annotations to . %% FIXME: 1 . dump syntax to erlang term 2 . parse erlang in haskel and perform embedding there -module(hs). -export([parse/1,type/1,x/1]). parse(Str) -> {ok,Toks,_} = erl_scan:string(Str), {ok, Form} = erl_parse:parse_form(Toks), Form. x({attribute,_,type...
null
https://raw.githubusercontent.com/zwizwa/erl_tools/affd4060ab5b963e0cc8fcfd4a1ca5023aa518d3/src/hs.erl
erlang
FIXME: {atom(),_} is interpreted as a constructor for a new data type. Special case for single-constructor types. Other forms are treated as aliases. Unions are not allowed inside type nesting. Function specs Otherwise this is unit (). Same Base type conversion. type_name(nil) -> "[]";
Convert Erlang type annotations to . 1 . dump syntax to erlang term 2 . parse erlang in haskel and perform embedding there -module(hs). -export([parse/1,type/1,x/1]). parse(Str) -> {ok,Toks,_} = erl_scan:string(Str), {ok, Form} = erl_parse:parse_form(Toks), Form. x({attribute,_,type,{Name , T...
c245e5fa68e9f679f1e6f45d38e1ee8a90e085a8343aca84554182c89594fd08
stackbuilders/openssh-github-keys
OpensshGithubKeys.hs
-- | Module : System . OpensshGithubKeys Copyright : © 2015 - 2017 Stack Builders License : MIT -- -- Maintainer : -- Stability : experimental -- Portability : portable -- The module allows to fetch list of per - teammate SSH public keys given GitHub organization name and team name ...
null
https://raw.githubusercontent.com/stackbuilders/openssh-github-keys/627d201fc9d67311a19a0e7d925a6107564482d6/src/System/OpensshGithubKeys.hs
haskell
| Maintainer : Stability : experimental Portability : portable # LANGUAGE OverloadedStrings # ^ Team of interest in that organization ^ Username — SSH keys -------------------------------------------------------------------------- Helpers
Module : System . OpensshGithubKeys Copyright : © 2015 - 2017 Stack Builders License : MIT The module allows to fetch list of per - teammate SSH public keys given GitHub organization name and team name . # LANGUAGE CPP # # LANGUAGE RecordWildCards # module System.Openss...
a5775ecea89f91f12b21dd354a90819ebaa211c8ef4136035aa7e4e3b0404abe
areuu/ilcompiler
translate.ml
open ProgramBuilder let flow_binaryassign_op_to_progbuilder_binop (op : Flow_ast.Expression.Assignment.operator) = let res : binary_op = match op with PlusAssign -> Plus | MinusAssign -> Minus | MultAssign -> Mult | DivAssign -> Div | ModAssign -> Mod | BitXorAssign ...
null
https://raw.githubusercontent.com/areuu/ilcompiler/c6f0bc809fe165947b8c7004dc1ed94414038002/src/translate.ml
ocaml
Designed to be called on the statements of a function Handle the various types of literal Handle the various unary types Need to determine between computed delete, and named delete TODO: What other values go here? There are various different expression types, so pattern match on each time, and ccall the appropr...
open ProgramBuilder let flow_binaryassign_op_to_progbuilder_binop (op : Flow_ast.Expression.Assignment.operator) = let res : binary_op = match op with PlusAssign -> Plus | MinusAssign -> Minus | MultAssign -> Mult | DivAssign -> Div | ModAssign -> Mod | BitXorAssign ...
372b62aab38fb8337a71b50c4005a2c9d2fbc81df9eaa13eb68007d009e58715
tolysz/ghcjs-stack
Simple.hs
module Simple where -- | For hiding needles. data Haystack = Haystack
null
https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal/Cabal/tests/PackageTests/Haddock/Simple.hs
haskell
| For hiding needles.
module Simple where data Haystack = Haystack
76ed91da52ef4d7ae9d5b1bfa558fd78ecf777103642cd16b8660ada64c1d201
vseloved/rutils
packages.lisp
;;;;; RUTILSX package definitions ;;;;; see LICENSE file for permissions (cl:in-package :cl-user) (defpackage #:rutilsx.generators (:documentation "Python-like generators (yield) support.") (:use :common-lisp #:rtl) (:export #:doing #:force #:generated #:generated-item ...
null
https://raw.githubusercontent.com/vseloved/rutils/db3c3f4ae897025b5f0cd81042ca147da60ca0c5/contrib/packages.lisp
lisp
RUTILSX package definitions see LICENSE file for permissions
(cl:in-package :cl-user) (defpackage #:rutilsx.generators (:documentation "Python-like generators (yield) support.") (:use :common-lisp #:rtl) (:export #:doing #:force #:generated #:generated-item #:yield #:yield-to)) (defpackage #:rutilsx.readtable (:d...
9b53710c3cf5a5aadc393cc2dbbe7a9aa945f4e3c3ab56fcc3671c473433d268
carl-eastlund/dracula
module.rkt
#lang racket/base (require mzlib/etc racket/require (path-up "self/require.rkt") (cce-in require-provide) "keywords.rkt" "dynamic-rep.rkt" "../lang/defun.rkt" "../lang/do-check.rkt" "../lang/theorems.rkt" (for-syntax racket/base racket/list racket/match racket/block syntax/par...
null
https://raw.githubusercontent.com/carl-eastlund/dracula/a937f4b40463779246e3544e4021c53744a33847/modular/module.rkt
racket
#lang racket/base (require mzlib/etc racket/require (path-up "self/require.rkt") (cce-in require-provide) "keywords.rkt" "dynamic-rep.rkt" "../lang/defun.rkt" "../lang/do-check.rkt" "../lang/theorems.rkt" (for-syntax racket/base racket/list racket/match racket/block syntax/par...
bf2b3c989e898d5f2c755dea6378d449672bdfb7136449777bf356106d18e583
haskell/xhtml
Internals.hs
{-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : Text.XHtml.internals Copyright : ( c ) , and the Oregon Graduate Institute of Science and Technology , 1999 - 2001 , ( c ) , 2004 - 2006 -- Lice...
null
https://raw.githubusercontent.com/haskell/xhtml/6a9816582020a4bfcbeb23027b6c95ef028d45ed/Text/XHtml/Internals.hs
haskell
# OPTIONS_HADDOCK hide # --------------------------------------------------------------------------- | Module : Text.XHtml.internals License : BSD-style (see the file LICENSE) Stability : Stable Internals of the XHTML combinator library. --------------------------------------------------------------...
Copyright : ( c ) , and the Oregon Graduate Institute of Science and Technology , 1999 - 2001 , ( c ) , 2004 - 2006 Maintainer : < > Portability : Portable module Text.XHtml.Internals where import Data.Char import qualified Data.Semigroup as Sem import qualifi...
348bdfe1b5a248c77d4e94827a5583245a85d82058dccae119c62fb1b84e463f
ankushdas/Nomos
Infer.ml
module A = Ast module R = Arith module N = Normalize module S = Solver module C = Core module M = C.Map module PP = Pprint module F = NomosFlags module ClpS = S.Clp (S.Clp_std_options);; exception InferImpossible;; (************************************************************) (* Substituting potential variables for ...
null
https://raw.githubusercontent.com/ankushdas/Nomos/db678f3981e75a1b3310bb55f66009bb23430cb1/nomos/nomos-lib/Infer.ml
ocaml
********************************************************** Substituting potential variables for star in annotations ********************************************************** ****************************************** Substituting actual values for potential variables as well as mode variables **************...
module A = Ast module R = Arith module N = Normalize module S = Solver module C = Core module M = C.Map module PP = Pprint module F = NomosFlags module ClpS = S.Clp (S.Clp_std_options);; exception InferImpossible;; let vnum = ref 0;; let fresh () = let v = "_v" ^ string_of_int !vnum in let () = vnum := !vnum + 1...
58488f949eaa00a8be1ad13df53bf7677407219b93c25f9bda9d83fa0970b180
CSCfi/rems
category.cljs
(ns rems.administration.category (:require [re-frame.core :as rf] [rems.administration.administration :as administration] [rems.administration.components :refer [inline-info-field localized-info-field]] [rems.atoms :as atoms :refer [document-title]] [rems.collapsible :a...
null
https://raw.githubusercontent.com/CSCfi/rems/4d172447f68b16e47eca714b400dc04c21dd3d95/src/cljs/rems/administration/category.cljs
clojure
(ns rems.administration.category (:require [re-frame.core :as rf] [rems.administration.administration :as administration] [rems.administration.components :refer [inline-info-field localized-info-field]] [rems.atoms :as atoms :refer [document-title]] [rems.collapsible :a...
a339094fcd87b5f1f8ed2894f13ce5ff70a08320109741d917b214e0599e86ca
agentultra/adventure-engine
Keystroke.hs
| Module : . Widgets . Containers . Keystroke Copyright : ( c ) 2018 License : BSD-3 - Clause ( see the LICENSE file ) Maintainer : Stability : experimental Portability : non - portable Container which generates user provided events when combinations of keys occur . Using these e...
null
https://raw.githubusercontent.com/agentultra/adventure-engine/ad89279638acefa969f03a3ab973a66e62e20868/src/Adventure/GUI/Widgets/Keystroke.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE Strict # * Configuration * Constructors | Creates a keystroke container with a single node as child. | Creates a keystroke container with a single node as child. Accepts config, Main keys Function keys Other keys (numbers, letters, points, etc)
| Module : . Widgets . Containers . Keystroke Copyright : ( c ) 2018 License : BSD-3 - Clause ( see the LICENSE file ) Maintainer : Stability : experimental Portability : non - portable Container which generates user provided events when combinations of keys occur . Using these e...
e25887c7a92be3e1b84f9dc41516d597b5eb98df8a09bf629c6871fc25c5e0c7
OctopiChalmers/haski
Util.hs
{-# LANGUAGE GADTs #-} {-# LANGUAGE Rank2Types #-} # LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # # LANGUAGE QuantifiedConstraints # # LANGUAGE UndecidableInstances # module Haski.Util where import Control.Monad.State.Lazy (StateT, get, execState, modify) import Control.Monad (replicateM) import Has...
null
https://raw.githubusercontent.com/OctopiChalmers/haski/97835d6d90d0c82d29864db03955db0aaaf08c67/src/Haski/Util.hs
haskell
# LANGUAGE GADTs # # LANGUAGE Rank2Types # ------- Named ------- Name things, even dolphins do! ---- Ex ---- Consider types `Var a` and Exp a`, The type `Ex` (exists) allows us to say `Ex Var` and `Ex Exp` when we don't care about `a` (but only that there exists one) eliminate an existential quantification -----...
# LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # # LANGUAGE QuantifiedConstraints # # LANGUAGE UndecidableInstances # module Haski.Util where import Control.Monad.State.Lazy (StateT, get, execState, modify) import Control.Monad (replicateM) import Haski.Type type Name = String class Named a where ...
770fb3142de942448e7513106d8648d62abaf5783053909f02f747ee9c60bb8d
sbcl/sbcl
sxhash.lisp
that part of SXHASH logic which runs not only in the target Lisp but ;;;; in the cross-compilation host Lisp This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and relea...
null
https://raw.githubusercontent.com/sbcl/sbcl/dae890e6f92d6732eee0c0931772a4f368a14928/src/compiler/sxhash.lisp
lisp
in the cross-compilation host Lisp 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. CAUTION: transforms are selected in the *reverse* order of definition, FUN-INFO-TRANSFORMS, and of course ...
that part of SXHASH logic which runs not only in the target Lisp but 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 into the (in-package "SB-C") so define the most general firs...
15033cd5884f03738ef64cf6a87ac98b0be5a56c017e4a41095ec34f6b48fe9f
jaredly/belt
belt_Option.ml
let getExn = function | Some x -> x | None -> Js.Exn.raiseError "File \"\", line 28, characters 14-20" let mapWithDefaultU opt default f = match opt with | Some x -> f x | None -> default let mapWithDefault opt default f = mapWithDefaultU opt default (fun x -> f x) let mapU opt f = match opt with | Some x ...
null
https://raw.githubusercontent.com/jaredly/belt/4d07f859403fdbd3fbfc5a9547c6066d657a2131/belt/belt_Option.ml
ocaml
let getExn = function | Some x -> x | None -> Js.Exn.raiseError "File \"\", line 28, characters 14-20" let mapWithDefaultU opt default f = match opt with | Some x -> f x | None -> default let mapWithDefault opt default f = mapWithDefaultU opt default (fun x -> f x) let mapU opt f = match opt with | Some x ...
06bb400d99c070209da2f0017ba70ca21fb9fa87aedfdd3eebfe9da85848b9a9
discus-lang/ddc
Witness.hs
-- | Type checker for witness expressions. module DDC.Core.Check.Judge.Witness ( checkWitness , checkWitnessM , typeOfWitness , typeOfWiCon) where import DDC.Core.Exp.Annot.AnT import DDC.Core.Check.Error import DDC.Core.Check.Base import DDC.Core.Check.Judge.Kind import DDC.Type.Transfo...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Core/Check/Judge/Witness.hs
haskell
| Type checker for witness expressions. Wrappers -------------------------------------------------------------------- | Check a witness. If it's good, you get a new version with types attached to all the bound variables, as well as the type of the overall witness. If it's bad, you get a description of the...
module DDC.Core.Check.Judge.Witness ( checkWitness , checkWitnessM , typeOfWitness , typeOfWiCon) where import DDC.Core.Exp.Annot.AnT import DDC.Core.Check.Error import DDC.Core.Check.Base import DDC.Core.Check.Judge.Kind import DDC.Type.Transform.SubstituteT import qualified DDC.Core.En...
b16b828295aa63b9672a61f93a9b395dc2077415dc9982b44a72859ca22f6f5b
transient-haskell/transient-universe
MapReduce.hs
# LANGUAGE ExistentialQuantification , DeriveDataTypeable , FlexibleInstances , MultiParamTypeClasses , OverloadedStrings , CPP # , FlexibleInstances, MultiParamTypeClasses, OverloadedStrings, CPP #-} module Transient.MapReduce ( Distributable(..),distribute, getText, getUrl, getFile,textUrl, textFile, mapKeyB, m...
null
https://raw.githubusercontent.com/transient-haskell/transient-universe/7cfbbdfa8eefbea79f48ccb69bc1823ba9abc7ea/src/Transient/MapReduce.hs
haskell
v* internals dummy Transient.MapReduce module, import Data.Time.Clock # INLINE foldl # foldlIt' :: V.Unbox a => (b -> a -> b) -> b -> V.Vector a -> b foldlIt' f z0 xs= V.foldr f' id xs z0 where f' x k z = k $! f z x (V.foldl mf Nothing xs) where mf m y = Just (case m of ...
# LANGUAGE ExistentialQuantification , DeriveDataTypeable , FlexibleInstances , MultiParamTypeClasses , OverloadedStrings , CPP # , FlexibleInstances, MultiParamTypeClasses, OverloadedStrings, CPP #-} module Transient.MapReduce ( Distributable(..),distribute, getText, getUrl, getFile,textUrl, textFile, mapKeyB, m...
d8202941d18047a0cf95805a147ee93271442f6f8a5144c8bba6cd3f21b1d9e5
techascent/tvm-clj
random.clj
(ns tvm-clj.impl.fns.tvm.contrib.random (:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns])) (tvm-ns-fns/export-tvm-functions "tvm.contrib.random")
null
https://raw.githubusercontent.com/techascent/tvm-clj/1088845bd613b4ba14b00381ffe3cdbd3d8b639e/src/tvm_clj/impl/fns/tvm/contrib/random.clj
clojure
(ns tvm-clj.impl.fns.tvm.contrib.random (:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns])) (tvm-ns-fns/export-tvm-functions "tvm.contrib.random")
d1227315e2edc891a7a6d8c9c98df377344d04b1574ac4558022884997365c64
IBM/probzelus
mat.ml
* Copyright 2018 - 2020 IBM Corporation * * 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 writin...
null
https://raw.githubusercontent.com/IBM/probzelus/424b53146885cbe1502edb09f39cda8ec89fed08/zelus-libs/owl/mat.ml
ocaml
* Copyright 2018 - 2020 IBM Corporation * * 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 writin...
cf817320fd01178f2a18e89ae286e255ad683821c0f9819ef1bc0009beaa40ed
vim-erlang/vim-erlang
my_lib.erl
-module(my_lib).
null
https://raw.githubusercontent.com/vim-erlang/vim-erlang/84d245af205302406c764980aecc9638069769c8/test/fixture/errors/rebar_config_error/src/my_lib.erl
erlang
-module(my_lib).
dca2fd67f8f8e524b2b762a1e64f8c24241d07b5ae98f9bf4a82943fcf8239e5
klutometis/clrs
radix-sort.scm
(define (cardinality integer base) (loop ((for power (up-from 0)) (until (> (expt base power) integer))) => power)) (define (integer->digits integer base) (let ((cardinality (cardinality integer base))) (list-tabulate cardinality (lambda (i) (let* ((modulizer (expt base (- cardinality...
null
https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/8.3/radix-sort.scm
scheme
(define (cardinality integer base) (loop ((for power (up-from 0)) (until (> (expt base power) integer))) => power)) (define (integer->digits integer base) (let ((cardinality (cardinality integer base))) (list-tabulate cardinality (lambda (i) (let* ((modulizer (expt base (- cardinality...
e5a56109f931f874b178aa0fe0909972066bb6de6ba442c2fc1afaa9955009b0
ndmitchell/rattle
UI.hs
{-# LANGUAGE Rank2Types #-} module Development.Rattle.UI( UI, withUI, addUI, isControlledUI, RattleUI(..), ) where import System.Time.Extra import Control.Exception import Data.List.Extra import qualified System.Console.Terminal.Size as Terminal import Numeric.Extra import General.EscCodes import qualifi...
null
https://raw.githubusercontent.com/ndmitchell/rattle/ea9af0923bb8146c83ae54676f175d72ed737fc6/src/Development/Rattle/UI.hs
haskell
# LANGUAGE Rank2Types # | What UI should rattle show the user. | Show a series of lines for each command run | Show a few lines that change as commands run | Don't show commands ^ the traced items, in the order we display them, and relative start time ^ Number of lines we used last time around b <- check...
module Development.Rattle.UI( UI, withUI, addUI, isControlledUI, RattleUI(..), ) where import System.Time.Extra import Control.Exception import Data.List.Extra import qualified System.Console.Terminal.Size as Terminal import Numeric.Extra import General.EscCodes import qualified Data.ByteString.Char8 as ...
a1978945432936be003ebc0cbe8da9121dfa70db5dd8b325fed3e6379725d5cf
deg/re-frame-firebase
specs.cljc
Author : ( ) Copyright ( c ) 2017 , (ns com.degel.re-frame-firebase.specs (:require [clojure.spec.alpha :as s])) Database (s/def ::path (s/coll-of (s/or :string string? :keyword keyword?) :into [])) ;; Firestore (s/def ::path-collection (s/and ::path #(odd? (count %)))) (s/def ::path-document (s/and...
null
https://raw.githubusercontent.com/deg/re-frame-firebase/ed5eabb6caa404af3395e3c97cb59a7c4d302c6b/src/com/degel/re_frame_firebase/specs.cljc
clojure
Firestore
Author : ( ) Copyright ( c ) 2017 , (ns com.degel.re-frame-firebase.specs (:require [clojure.spec.alpha :as s])) Database (s/def ::path (s/coll-of (s/or :string string? :keyword keyword?) :into [])) (s/def ::path-collection (s/and ::path #(odd? (count %)))) (s/def ::path-document (s/and ::path #(eve...
55463a838c8f3f2f732706cce29b3764240ad5467eeed2c6ba33eb10e3c80fd1
cyverse-archive/DiscoveryEnvironmentBackend
callbacks.clj
(ns metadactyl.service.callbacks (:require [clojure.tools.logging :as log] [metadactyl.persistence.jobs :as jp] [metadactyl.service.apps :as apps] [metadactyl.util.service :as service])) (defn update-de-job-status [{{end-date :completion_date :keys [status uuid]} :state}] (ser...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/metadactyl-clj/src/metadactyl/service/callbacks.clj
clojure
(ns metadactyl.service.callbacks (:require [clojure.tools.logging :as log] [metadactyl.persistence.jobs :as jp] [metadactyl.service.apps :as apps] [metadactyl.util.service :as service])) (defn update-de-job-status [{{end-date :completion_date :keys [status uuid]} :state}] (ser...
d96e586a026d2620c57aac54f5e84987f445f897667232932997c40ba6b0f61d
threatgrid/ctia
store_service.clj
(ns ctia.store-service (:require [ctia.store-service-core :as core] [puppetlabs.trapperkeeper.core :as tk] [puppetlabs.trapperkeeper.services :refer [service-context]])) (defprotocol StoreService (all-stores [this] "Returns a map of current stores. See also: ctia.store-service.sche...
null
https://raw.githubusercontent.com/threatgrid/ctia/1c84e16a639abc242329dce8a87e415c6b166706/src/ctia/store_service.clj
clojure
(ns ctia.store-service (:require [ctia.store-service-core :as core] [puppetlabs.trapperkeeper.core :as tk] [puppetlabs.trapperkeeper.services :refer [service-context]])) (defprotocol StoreService (all-stores [this] "Returns a map of current stores. See also: ctia.store-service.sche...
2aed664291dba70cd059cfb3a394cf2bbdf20bee28cdaa778b45ea66e8a52d89
erszcz/learning
exprecs_example.erl
-module(exprecs_example). %-compile(export_all). -compile({parse_transform, exprecs}). -record(r, {a = 0 :: integer(), b = 0 :: integer(), c = 0 :: integer()}). -record(s,{a}). %-export_records([r,s]). -export_records([r]). -exprecs_prefix([operation]). -exprecs_fname([prefix, "_", record]). ...
null
https://raw.githubusercontent.com/erszcz/learning/b21c58a09598e2aa5fa8a6909a80c81dc6be1601/erlang-uwiger-exprecs/src/exprecs_example.erl
erlang
-compile(export_all). -export_records([r,s]).
-module(exprecs_example). -compile({parse_transform, exprecs}). -record(r, {a = 0 :: integer(), b = 0 :: integer(), c = 0 :: integer()}). -record(s,{a}). -export_records([r]). -exprecs_prefix([operation]). -exprecs_fname([prefix, "_", record]). -exprecs_vfname([fname, "__", version]). f() ->...
ab9fd90deff2ec6d9c2819c82c5eb1d2e4e743ce213ffd651e29688ddeee1dcc
janestreet/core
make_substring_intf.ml
open! Import module type Base = sig type t [@@deriving quickcheck] val create : int -> t val length : t -> int val blit : (t, t) Blit.blito val blit_to_bytes : (t, bytes) Blit.blito val blit_to_bigstring : (t, bigstring) Blit.blito val blit_from_string : (string, t) Blit.blito val blit_from_bigstring ...
null
https://raw.githubusercontent.com/janestreet/core/b0be1daa71b662bd38ef2bb406f7b3e70d63d05f/core/src/make_substring_intf.ml
ocaml
open! Import module type Base = sig type t [@@deriving quickcheck] val create : int -> t val length : t -> int val blit : (t, t) Blit.blito val blit_to_bytes : (t, bytes) Blit.blito val blit_to_bigstring : (t, bigstring) Blit.blito val blit_from_string : (string, t) Blit.blito val blit_from_bigstring ...
7ee96beb60d79fa6056ad0084403d96135564d229f104eebfdc651b891618da9
mfikes/fifth-postulate
ns133.cljs
(ns fifth-postulate.ns133) (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/ns133.cljs
clojure
(ns fifth-postulate.ns133) (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...
cc27f83c07ec7ede08c2f29e7a20a972a4058761a1f099b3e47fe3caba99ec4e
nervous-systems/kvlt
params.cljc
(ns kvlt.test.middleware.params (:require [kvlt.test.middleware.util :refer [mw-req]] [kvlt.middleware.params :as params] #? (:clj [clojure.test :refer [deftest is]] :cljs [cljs.test :refer-macros [deftest is]]) [kvlt.test.util #?(:clj :refer :cljs :refer-macros) [...
null
https://raw.githubusercontent.com/nervous-systems/kvlt/26fe43eb9de6d7cc7ad8a466953fa0ffe09889ca/test/kvlt/test/middleware/params.cljc
clojure
(ns kvlt.test.middleware.params (:require [kvlt.test.middleware.util :refer [mw-req]] [kvlt.middleware.params :as params] #? (:clj [clojure.test :refer [deftest is]] :cljs [cljs.test :refer-macros [deftest is]]) [kvlt.test.util #?(:clj :refer :cljs :refer-macros) [...
97642c087970e4b982856bf36c51f00c026489af10c880e97a15fd726549fca7
lispnik/cl-http
xml-attribute.lisp
;;; -*- Package: ("XML-PARSER") -*- ;;; this version ( C ) mecom gmbh 24.11.97 ;;; available only from the cl-http repository and NOT to be REdistributed ;;; in ANY form. see cl-xml.html. (in-package :xml-parser) (defMethod node-class ((node (eql 'attribute)) (name t) (value t)) *attribute-class*) (de...
null
https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/contrib/janderson/xml-1998-02-27/xml-attribute.lisp
lisp
-*- Package: ("XML-PARSER") -*- available only from the cl-http repository and NOT to be REdistributed in ANY form. see cl-xml.html. (let ((*xml-print-readably* t)) (print (make-instance 'xml-attribute :name 'test :content "ASDF")))
this version ( C ) mecom gmbh 24.11.97 (in-package :xml-parser) (defMethod node-class ((node (eql 'attribute)) (name t) (value t)) *attribute-class*) (defClass xml-attribute (xml-named-node) ((name :accessor xml-attribute.name) (content :accessor xml-attribute.value :type string))) (...
5e6528af8bbab9e0836adc637cea01c8adc99c86568fff20447ed8df839e5b0d
mwotton/roboservant
Server.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE TypeApplications # # LANGUAGE PolyKinds # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # modul...
null
https://raw.githubusercontent.com/mwotton/roboservant/c61d4868cc1a7a0bb5d8f1c3996305c82da13879/src/Roboservant/Server.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE GADTs # todo: how do we pull reifyServer out? reifyServer server = toReifiedApi server (Proxy @(Endpoints api))
# LANGUAGE TypeApplications # # LANGUAGE PolyKinds # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleContexts # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Roboservant.Server (fuzz, module Roboservant.Type...
e4d8a1685b1f185634d1937be28d04b09bd061c2f713b13f629631c14c4ece0c
Gbury/archsat
closure_test.ml
This file is free software , part of Archsat . See file " LICENSE " for more details . let section = Section.make "closure_test" (* Problem generation *) (* ************************************************************************ *) let chain = let config = Expr_test.Term.{ var = 0; meta = 0; } in let aux ty s...
null
https://raw.githubusercontent.com/Gbury/archsat/322fbefa4a58023ddafb3fa1a51f8199c25cde3d/src/test/closure_test.ml
ocaml
Problem generation ************************************************************************ Naive solving ************************************************************************ Checking Closure ************************************************************************
This file is free software , part of Archsat . See file " LICENSE " for more details . let section = Section.make "closure_test" let chain = let config = Expr_test.Term.{ var = 0; meta = 0; } in let aux ty self n = QCheck.Gen.( if n <= 0 then return [] else Misc_test.split_int n >>= fun (a, b) ...
3e597955a165610bf77e7c16e7576d5d6c583d1a06a4bc0d8f969159adf075c2
bobzhang/fan
state.ml
open Sigs_util let current_filters: (plugin_name* plugin) list ref = ref [] let reset_current_filters = function | () -> current_filters := [] let keep = ref true let id = ref 0 let reset = function | () -> (keep := true; current_filters := []) let gensym ?(pkg= "") = function | prefix -> let res = "...
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/cold/state.ml
ocaml
open Sigs_util let current_filters: (plugin_name* plugin) list ref = ref [] let reset_current_filters = function | () -> current_filters := [] let keep = ref true let id = ref 0 let reset = function | () -> (keep := true; current_filters := []) let gensym ?(pkg= "") = function | prefix -> let res = "...
637c8a5f838c9cfd3c4485e2eb141f842be28d87ae6dfab1c614fdfe09270d73
geneweb/geneweb
birthDeath.mli
val select_person : Config.config -> Gwdb.base -> (Gwdb.person -> Def.date option) -> bool -> (Gwdb.person * Def.dmy * Def.calendar) list * int * [ select_person conf base get_date find_oldest ] select 20 persons from the base according to the one of their date ( birth , death , marriage , specifi...
null
https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/lib/birthDeath.mli
ocaml
* Same as [select_person] but dealing with families * Returns person's death date (if exists)
val select_person : Config.config -> Gwdb.base -> (Gwdb.person -> Def.date option) -> bool -> (Gwdb.person * Def.dmy * Def.calendar) list * int * [ select_person conf base get_date find_oldest ] select 20 persons from the base according to the one of their date ( birth , death , marriage , specifi...
b6cb1db83db4ffd94f22c72fb2557ea8fb3806e0723c447c1fef8411485de675
fredrikt/yxa
mk_yxa_ssl_pkix_oid.erl
-module(mk_yxa_ssl_pkix_oid). -export([make/0]). -include("config.hrl"). -ifdef( HAS_OTP_PUB_KEY_HRL ). -define(PKIX_MODULES, ['OTP-PUB-KEY']). -else. -define(PKIX_MODULES, ['OTP-PKIX']). -endif. make() -> {ok, Fd} = file:open("yxa_ssl_pkix_oid.erl", [write]), io:fwrite(Fd, "%%% File: yxa_ssl_pkix_oid.erl\n...
null
https://raw.githubusercontent.com/fredrikt/yxa/85da46a999d083e6f00b5f156a634ca9be65645b/src/transportlayer/mk_yxa_ssl_pkix_oid.erl
erlang
Remove upper-bound (ub-) functions gen_all(Fd, AIds) -> Atoms = lists:sort([A || {A, _} <- AIds]), Ids = lists:sort([I || {_, I} <- AIds]), io:fwrite(Fd, "~s.\n\n", [ITxt]).
-module(mk_yxa_ssl_pkix_oid). -export([make/0]). -include("config.hrl"). -ifdef( HAS_OTP_PUB_KEY_HRL ). -define(PKIX_MODULES, ['OTP-PUB-KEY']). -else. -define(PKIX_MODULES, ['OTP-PKIX']). -endif. make() -> {ok, Fd} = file:open("yxa_ssl_pkix_oid.erl", [write]), io:fwrite(Fd, "%%% File: yxa_ssl_pkix_oid.erl\n...
99fbe5e3304e7f1aa4090a835800d48daf5e955c8cf4bef21f457ef868a237dd
stephenpascoe/hs-arrow
InputStream.hs
| Copyright : , and License : LGPL-2.1 Maintainer : ( ) /No description available in the introspection data./ Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria () /No description available in the introspection...
null
https://raw.githubusercontent.com/stephenpascoe/hs-arrow/86c7c452a8626b1d69a3cffd277078d455823271/gi-arrow/GI/Arrow/Objects/InputStream.hs
haskell
* Exported types * Properties ** inputStream #attr:inputStream# | /No description available in the introspection data./ # SOURCE # # SOURCE # | Memory-managed wrapper type. # OVERLAPPABLE # | A convenience alias for `Nothing` :: `Maybe` `InputStream`. VVV Prop "input-stream" Nullable: (Nothing,Nothing)
| Copyright : , and License : LGPL-2.1 Maintainer : ( ) /No description available in the introspection data./ Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria () /No description available in the introspection...
75a72c6fb2d189abff19ded84f384f79d926bef6ea72a4eaa83f7ce003e24fa8
kelamg/HtDP2e-workthrough
ex495.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 ex495) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Accumulators/ex495.rkt
racket
about the language level of this file in a form that our tools can easily process. [List-of N] -> N [List-of Number] ??? -> Number computes the sum of the numbers on alon accumulator a is the sum of the numbers
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex495) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) sums all the numbers in alon0 (check-expect (sum.v2 ...
3bd1c1bf9a0c3ec88c397cdfedc663c281e64621a1e83fae1fd6af0752b9dba3
input-output-hk/cardano-wallet
Tx.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE EmptyCase # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeApplications # -- | Copyright : © 2022 IOHK -...
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet/b058cffeee4979ee3ae30ea6539246ddca73f762/lib/wallet/src/Cardano/Wallet/Write/Tx.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes # | License: Apache-2.0 Module containing primitive types and functionality appropriate for constructing transactions. 'RecentEra'). Intended to be used by things like balanceTx, constructTx and wallet migration. * Eras ** RecentEra ** Helpers for cardano-api compatib...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE EmptyCase # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeApplications # Copyright : © 2022 IOHK Indented as a replacement to closer to the ledge...
4df08dacba5eb75a0d2adca7412be2927eb1cf3ae1fc15b57a74a5d64ab48732
soegaard/racket-stories
validation.rkt
#lang racket/base (provide (all-defined-out)) ;;; ;;; Validation ;;; ; This file contains functions that can be used to validate data submitted ; via forms, as well as functions that use the validation results. ; The validators all return `validation` structs: ; (struct validation (value validated? invalid? feedb...
null
https://raw.githubusercontent.com/soegaard/racket-stories/78f66867f213acecd646b0b757819391cee9c261/app-racket-stories/validation.rkt
racket
Validation This file contains functions that can be used to validate data submitted via forms, as well as functions that use the validation results. The validators all return `validation` structs: (struct validation (value validated? invalid? feedback) #:transparent) Here validated? is true, if the struct is...
#lang racket/base (provide (all-defined-out)) (require racket/match "def.rkt" "structs.rkt") Validators for the input fields in the " Submit new entry page " : (define (validate-url url) (define feedback "Enter an url that starts with http:// or https://") [#f (validation url #t #t feedback)]...
12abcd2836a3372c70337aa4a05dc87b976195620fbd3a59e752e89a5d8b1257
vbrankov/hdf5-ocaml
h5tb.mli
open Bigarray module Field_info : sig type t = { field_names : string array; field_sizes : int array; field_offsets : int array; type_size : int; } end (** A pointer to the data. *) module Data : sig type t val of_genarray : _ Genarray.t -> t val of_array1 : _ Array1.t -> t val of...
null
https://raw.githubusercontent.com/vbrankov/hdf5-ocaml/7abc763189767cd6c92620f29ce98f6ee23ba88f/src/raw/h5tb.mli
ocaml
* A pointer to the data.
open Bigarray module Field_info : sig type t = { field_names : string array; field_sizes : int array; field_offsets : int array; type_size : int; } end module Data : sig type t val of_genarray : _ Genarray.t -> t val of_array1 : _ Array1.t -> t val of_array2 : _ Array2.t -> t va...
79988d282d7dcae5dd38eafd55563ebe0af282835b996d454986df082a8c26df
webyrd/relational-parsing-with-derivatives
mk-lexer.scm
miniKanren version of ( a subset ) of code for ; a Scheme lexer, based on derivative parsing of regexp. 's original code can be found at ; -lexing-toolkit-based-on-regex-derivatives/ This file requires the miniKanren version of code for derivative ; parsing of regexp. ! shown in maino-3b : matchi...
null
https://raw.githubusercontent.com/webyrd/relational-parsing-with-derivatives/2b5fea523ed2b35fb1687954449ee75dc67e94dd/miniKanren-version/mk-lexer.scm
scheme
a Scheme lexer, based on derivative parsing of regexp. -lexing-toolkit-based-on-regex-derivatives/ parsing of regexp. What is the right way to solve this problem? I smell constraints for the character that constraints will help. This is an interesting problem! Regular language convenience operators Exactly n...
miniKanren version of ( a subset ) of code for 's original code can be found at This file requires the miniKanren version of code for derivative ! shown in maino-3b : matching is n't necessarily greedy In other words , Kleene star and Kleene plus do n't have ' maximum munch ' semantics : Inde...
a039ec862178037554fd574c9385ecc5ca72b876b98ebef1377a1fda30eb00d3
screenshotbot/screenshotbot-oss
remote-file.lisp
(defpackage :build-utils/remote-file (:use #:cl #:asdf) (:local-nicknames (#:a #:alexandria)) (:export #:remote-file)) (in-package :build-utils/remote-file) (defclass remote-file (asdf:system) ((url :initarg :url :reader url) (version :initarg :version :reader version) (rem...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/35f32a86e58221a371b1d38f58a67460a70521b4/src/build-utils/remote-file.lisp
lisp
(defpackage :build-utils/remote-file (:use #:cl #:asdf) (:local-nicknames (#:a #:alexandria)) (:export #:remote-file)) (in-package :build-utils/remote-file) (defclass remote-file (asdf:system) ((url :initarg :url :reader url) (version :initarg :version :reader version) (rem...
a909deb75cb49850630a905b473e31b2cdfbb34f66e05223f944e55223a0e3f6
amnh/poy5
mlModel.ml
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2014 , , , Ward Wheeler , and the American Museum of Natural History . (* *) (* This program is free softwa...
null
https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/mlModel.ml
ocaml
This program is free software; you can redistribute it and/or modify (at your option) any later version. This progra...
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2014 , , , Ward Wheeler , and the American Museum of Natural History . it under the terms of the GNU General Public License as published by the Free Software Foundation ; ...
c7f4d893ac507b2d51cb14f0b321377a12172c57a53f3825f3bcc83afaa96b47
retro/keechma-next-realworld-app
subscription.cljs
(ns keechma.next.controllers.subscription (:require [keechma.next.controller :as ctrl])) (derive :keechma/subscription :keechma/controller) (defmethod ctrl/derive-state :keechma/subscription [ctrl state deps-state] (if-let [derive-state (:keechma.subscription/derive-state ctrl)] (derive-state state deps-state...
null
https://raw.githubusercontent.com/retro/keechma-next-realworld-app/47a14f4f3f6d56be229cd82f7806d7397e559ebe/classes/production/realworld-2/keechma/next/controllers/subscription.cljs
clojure
(ns keechma.next.controllers.subscription (:require [keechma.next.controller :as ctrl])) (derive :keechma/subscription :keechma/controller) (defmethod ctrl/derive-state :keechma/subscription [ctrl state deps-state] (if-let [derive-state (:keechma.subscription/derive-state ctrl)] (derive-state state deps-state...
9131d7dc4710bf755cd91c6e50f2368bb7540a2a187b3b9f535da592f845bb22
everpeace/programming-erlang-code
lib_io_widget.erl
-module(lib_io_widget). -export([start/1, test/0, set_handler/2, set_prompt/2, set_title/2, insert_str/2]). start(Pid) -> gs:start(), spawn_link(fun() -> widget(Pid) end). set_title(Pid, Str) -> Pid ! {title, Str}. set_handler(Pid, Fun) -> Pid ! {handler, Fun}. set_prompt(Pid, Str) -> Pid ! {prompt, St...
null
https://raw.githubusercontent.com/everpeace/programming-erlang-code/8ef31aa13d15b41754dda225c50284915c29cb48/code/lib_io_widget.erl
erlang
this clobbers the line being input ... this could be fixed - hint
-module(lib_io_widget). -export([start/1, test/0, set_handler/2, set_prompt/2, set_title/2, insert_str/2]). start(Pid) -> gs:start(), spawn_link(fun() -> widget(Pid) end). set_title(Pid, Str) -> Pid ! {title, Str}. set_handler(Pid, Fun) -> Pid ! {handler, Fun}. set_prompt(Pid, Str) -> Pid ! {prompt, St...
0914c65309955bc7a582d4af35de2fdf4c8c30d17b4f558983f854ecb19b1fa4
samrocketman/home
text-neon-logo.scm
; Another neon-like logo Written by ; Released under GPL v.2 (define (script-fu-text-neon-logo text size font grow halogrow neon-color dazzle-color halo-color bg-color) (let* ( (old-fg (car (gimp-context-get-foreground))) (old-bg (car (gimp-context-get-bac...
null
https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/text-neon-logo.scm
scheme
Another neon-like logo Released under GPL v.2 Sets the layers. Enlarge or shrink the font before copying the layer. Background. Neon tubes. Outline. (gimp-layer-set-mode outline-layer SCREEN-MODE) (script-fu-register "script-fu-text-neon-logo" _"<Toolbox>/Xtns/Script-Fu/Logos/Neon Like Text..." "V...
Written by (define (script-fu-text-neon-logo text size font grow halogrow neon-color dazzle-color halo-color bg-color) (let* ( (old-fg (car (gimp-context-get-foreground))) (old-bg (car (gimp-context-get-background))) (img (car (gimp-image-new 256 256 RGB)))...
40890317e7c95df3c5d96522e469f17b32510f8e02365a2dbacc912bed3e9538
cacay/regexp
DFASpec.hs
{-# LANGUAGE GADTs #-} # LANGUAGE OverloadedLists # module RegExp.Internal.DFASpec where import Test.Hspec import Test.QuickCheck import Helpers import Data.Either(isRight) import RegExp.RegExp import RegExp.Internal.DFA import RegExp.Derivative(equivalent) import Data.GSet() spec :: Spec spec = do describe ...
null
https://raw.githubusercontent.com/cacay/regexp/25fd123edb00ce0dbd8b6fd6732a7aeca37e4a47/test/RegExp/Internal/DFASpec.hs
haskell
# LANGUAGE GADTs #
# LANGUAGE OverloadedLists # module RegExp.Internal.DFASpec where import Test.Hspec import Test.QuickCheck import Helpers import Data.Either(isRight) import RegExp.RegExp import RegExp.Internal.DFA import RegExp.Derivative(equivalent) import Data.GSet() spec :: Spec spec = do describe "regexp" $ do i...
69b07175f8d791dc6aff06f652a005d00dbe0857a663ad094631149e73c087c3
gonzojive/sbcl
ntrace.lisp
;;;; a tracing facility This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The software is in the public domain and is ;;;; provi...
null
https://raw.githubusercontent.com/gonzojive/sbcl/3210d8ed721541d5bba85cbf51831238990e33f1/src/code/ntrace.lisp
lisp
a tracing facility 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. FIXME: Why, oh why, doesn't the SB-DEBUG package use the SB-DI package? That would let us get rid of a whole lot of stupid...
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 into the ( SB- , not SB ! , since we 're built in warm load . ) (defvar *trace-values* nil #+sb-doc "This is bound to the retu...
7f4f77ce6ae6494f876132e4c0089e697f6bd35840884358e677b04826aa7ed2
michiakig/sicp
ex-1.06.scm
;;;; Structure and Interpretation of Computer Programs Chapter 1 Section 1 Elements of Programming Exercise 1.06 does n't see why if needs to be provided as a special form . ` ` Why ca n't I just define it as an ordinary procedure in terms of cond ? '' she asks . 's friend claims this can indeed be done ...
null
https://raw.githubusercontent.com/michiakig/sicp/1aa445f00b7895dbfaa29cf6984b825b4e5af492/ch1/ex-1.06.scm
scheme
Structure and Interpretation of Computer Programs A: Infinite loop, because of Scheme's applicative-order evaluation, (sqrt-iter (improve guess x) x) is evaluated before new-if is completely evaluated, resulting in an infinite loop.
Chapter 1 Section 1 Elements of Programming Exercise 1.06 does n't see why if needs to be provided as a special form . ` ` Why ca n't I just define it as an ordinary procedure in terms of cond ? '' she asks . 's friend claims this can indeed be done , and she defines a new version of if : (define (new-if...
c2b13856220c23137eeb0b1d773511429487b4add7d4dd04a0c031b2d98354f4
CyberCat-Institute/open-game-engine
Diagnostics.hs
# LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # # LANGUAGE TypeApplications # # LANGUAGE AllowAmbiguousTypes # module OpenGames.Eng...
null
https://raw.githubusercontent.com/CyberCat-Institute/open-game-engine/86031c42bf13178554c21cd7ab9e9d18f1ca6963/src/OpenGames/Engine/Diagnostics.hs
haskell
------------------------------------------------------ Diagnosticinformation and processesing of information for standard game-theoretic analysis Defining the necessary types for outputting information of a BayesianGame output string information for a subgame expressions containing information from several players ...
# LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # # LANGUAGE TypeApplications # # LANGUAGE AllowAmbiguousTypes # module OpenGames.Eng...
535ca9664b9caa59e706ed2fe844600e4532434d7c81fecd6e2de0ecef23308a
pedestal/pedestal-app
test.clj
Copyright 2013 Relevance , Inc. ; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( ) ; which can be found in the file epl-v10.html at the root of this distribution. ; ; By using this software in any fashion, you are agreeing to be bound by ; the terms of this licens...
null
https://raw.githubusercontent.com/pedestal/pedestal-app/509ab766a54921c0fbb2dd7c6a3cb20223b8e1a1/app/src/io/pedestal/app/util/test.clj
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. R...
Copyright 2013 Relevance , Inc. Eclipse Public License 1.0 ( ) (ns io.pedestal.app.util.test (:require [io.pedestal.app :as app] [io.pedestal.app.util.platform :as platform])) (defn run-sync! [app script & {:keys [begin timeout wait-for]}] (assert (or (nil? begin) (= begin :default...
178d28d4bc636f78c2fa21fcb51fcdf332668baedabf203c3dfd1b7f3ce479ea
bobzhang/fan
regress6.ml
let pos0 = -lb.lex_abs_pos;; (* if 0> 0 then begin end else begin end ;; *) let highlight_dumb ppf lb loc = for pos = 0 to end_pos do if c <> '\n' then begin if a then b end else begin end done
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/test/printer/regress6.ml
ocaml
if 0> 0 then begin end else begin end ;;
let pos0 = -lb.lex_abs_pos;; let highlight_dumb ppf lb loc = for pos = 0 to end_pos do if c <> '\n' then begin if a then b end else begin end done
0fcd83a16f9fdabb6ffd8a0a37e4d69dbcd26aab14e75efeb89b66f2aa60f38d
nitrogen/simple_bridge
yaws_simple_bridge.erl
% vim: ts=4 sw=4 et % Simple Bridge Copyright ( c ) 2008 - 2010 Copyright ( c ) 2011 - 2016 See MIT - LICENSE for licensing information . -module(yaws_simple_bridge). -behaviour(simple_bridge). %% REQUEST EXPORTS -include("simple_bridge.hrl"). -export ([ init/1, request_method/1, protocol/1, host/1,...
null
https://raw.githubusercontent.com/nitrogen/simple_bridge/0b33e15759b23050c151912374a68e18f2a3b83d/src/yaws_bridge_modules/yaws_simple_bridge.erl
erlang
vim: ts=4 sw=4 et Simple Bridge REQUEST EXPORTS RESPONSE EXPORTS REQUEST Get the other headers and format them to fit the paradigm we're using above RESPONSE Get vars... Assemble headers... Get the content type... Send the yaws response... Note: This section should only be entered in the event that a static...
Copyright ( c ) 2008 - 2010 Copyright ( c ) 2011 - 2016 See MIT - LICENSE for licensing information . -module(yaws_simple_bridge). -behaviour(simple_bridge). -include("simple_bridge.hrl"). -export ([ init/1, request_method/1, protocol/1, host/1, path/1, uri/1, peer_ip/1, peer_port/1, headers...
8a13ad349db510a01937fee54f481cb434fe3f7de5cddee5a7740d03665113a0
sylphbio/pontiff
run.scm
(module command.run (run) (import scheme) (import chicken.base) (import chicken.type) (import chicken.string) (import chicken.format) (import chicken.process) (import chicken.process-context) (import chicken.pathname) (import tabulae) (import ix) (import (prefix state state:)) (import util) (define (run argv) (de...
null
https://raw.githubusercontent.com/sylphbio/pontiff/8af6c1932e687b5f4219d2c649c1aa4bb92d543a/src/command/run.scm
scheme
(module command.run (run) (import scheme) (import chicken.base) (import chicken.type) (import chicken.string) (import chicken.format) (import chicken.process) (import chicken.process-context) (import chicken.pathname) (import tabulae) (import ix) (import (prefix state state:)) (import util) (define (run argv) (de...
a832addde7b9c6561d0c8feb0ed6c962066d6b23193f8b6c9ebde558333353b3
beoliver/clj-arangodb
cursor_test.clj
(ns clj-arangodb.arangodb.cursor-test (:require [clj-arangodb.arangodb.databases :as d] [clj-arangodb.arangodb.aql :as aql] [clj-arangodb.arangodb.adapter :as adapter] [clj-arangodb.arangodb.cursor :as cursor] [clj-arangodb.arangodb.helper :as h] [clojure.test :refer :all])) (deftest cursor-stats-t...
null
https://raw.githubusercontent.com/beoliver/clj-arangodb/a6b2c835278573e2fee3521c63917838e86703eb/test/clj_arangodb/arangodb/cursor_test.clj
clojure
(ns clj-arangodb.arangodb.cursor-test (:require [clj-arangodb.arangodb.databases :as d] [clj-arangodb.arangodb.aql :as aql] [clj-arangodb.arangodb.adapter :as adapter] [clj-arangodb.arangodb.cursor :as cursor] [clj-arangodb.arangodb.helper :as h] [clojure.test :refer :all])) (deftest cursor-stats-t...
d45b235c81f614645de3ca07bea928bc65a6e76c8b194299f84e290386f4ba59
processone/pkix
pkix_sup.erl
%%%------------------------------------------------------------------- Created : 22 Sep 2018 by < > %%% Copyright ( C ) 2002 - 2022 ProcessOne , SARL . All Rights Reserved . %%% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %%% you may not use this file except in compliance with the Lic...
null
https://raw.githubusercontent.com/processone/pkix/0368e4dc04817d6374e296ae0506a92fd8a8ccf7/src/pkix_sup.erl
erlang
------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Created : 22 Sep 2018 by < > Copyright ( C ) 2002 - 2022 ProcessOne , SARL . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(pkix_sup). -behaviour(supervisor). -export([start_link/0]). -e...
fd520edafa01fbba03143a3d86010a6732ec8dc6e26f3667a9002f04e22a396e
wireapp/wire-server
Event_conversation.hs
# LANGUAGE OverloadedLists # -- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , e...
null
https://raw.githubusercontent.com/wireapp/wire-server/9ab536b4c4915c9a0442c7643f8f78eb953a0217/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/Event_conversation.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTI...
# LANGUAGE OverloadedLists # Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along mo...
5b698091903f383666cdd4874bab2d09ef2b86fb50e5baeb76eba6c87fa1e523
a9032676/Codewars-Haskell
FoldingThroughAFixedPoint.hs
# LANGUAGE DeriveFunctor # # LANGUAGE LambdaCase # {-# LANGUAGE RankNTypes, ExistentialQuantification #-} module FoldingThroughAFixedPoint where import Control.Applicative Consider the two following types newtype Least f = Least (forall r . (f r -> r) -> r) data Greatest f = forall s . Greatest (s -> f ...
null
https://raw.githubusercontent.com/a9032676/Codewars-Haskell/6eccd81e9b6ae31b5c0a28ecc16b933f3abae1a5/src/FoldingThroughAFixedPoint.hs
haskell
# LANGUAGE RankNTypes, ExistentialQuantification # They each have a special non-recursive relationship with 'f' when it is a 'Functor' They each are closely tied to the notions of folding and unfolding as well It is the case that any "strictly positive" For instance, here is one for [] Then we can map into and ...
# LANGUAGE DeriveFunctor # # LANGUAGE LambdaCase # module FoldingThroughAFixedPoint where import Control.Applicative Consider the two following types newtype Least f = Least (forall r . (f r -> r) -> r) data Greatest f = forall s . Greatest (s -> f s) s unwrap :: Functor f => Greatest f -> f (Greatest ...
4da1efb49f148d3479ec60ffdf8780941a485e49727d83324e3ed41f0a9e544f
openmusic-project/openmusic
helpfiles.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 can redist...
null
https://raw.githubusercontent.com/openmusic-project/openmusic/e45fdac8079b7effd5a8271c21000f2b48344563/OPENMUSIC/code/kernel/doc/helpfiles.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 License ...
fd56df5ab2d17ee3577b5e2d1dfd3efc91b036dc0c1a0fd36c9c504219ccdd4e
patricoferris/ocaml-multicore-monorepo
log.ml
let () = Eio_main.run @@ fun env -> Dream.run env @@ Dream.logger @@ Dream.router [ Dream.get "/" (fun request -> Dream.log "Sending greeting to %s!" (Dream.client request); Dream.html "Good morning, world!"); Dream.get "/fail" (fun _ -> Dream.warning (fun log -> lo...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/dream/example/a-log/log.ml
ocaml
let () = Eio_main.run @@ fun env -> Dream.run env @@ Dream.logger @@ Dream.router [ Dream.get "/" (fun request -> Dream.log "Sending greeting to %s!" (Dream.client request); Dream.html "Good morning, world!"); Dream.get "/fail" (fun _ -> Dream.warning (fun log -> lo...
a17631c3bfc59be9ac24820a6c63f2541cc741da6808e68e5f41d75b127d179d
kazu-yamamoto/quic
Stream.hs
module Network.QUIC.Stream ( -- * Types Stream , streamId , streamConnection , newStream , TxStreamData(..) , Flow(..) , defaultFlow , StreamState(..) , RecvStreamQ(..) , RxStreamData(..) , Length , syncFinTx , waitFinTx -- * Misc , getTxStreamOffset , isTxStreamClosed , setTxStrea...
null
https://raw.githubusercontent.com/kazu-yamamoto/quic/6b9500c8057ac3d974a47543b74b5db11e29ecc0/Network/QUIC/Stream.hs
haskell
* Types * Misc * Table
module Network.QUIC.Stream ( Stream , streamId , streamConnection , newStream , TxStreamData(..) , Flow(..) , defaultFlow , StreamState(..) , RecvStreamQ(..) , RxStreamData(..) , Length , syncFinTx , waitFinTx , getTxStreamOffset , isTxStreamClosed , setTxStreamClosed , getRxStreamOf...
0eb101e6b6c1991b964b7b4b182a31b2e4a0d4dae9c488b85cd97099dc42ade1
scalaris-team/scalaris
rrepair_proto_sched_SUITE.erl
2014 Zuse Institute Berlin 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 distribu...
null
https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/test/rrepair_proto_sched_SUITE.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language gov...
2014 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > -module(rrepair_proto_sched_SUITE). -author(''). -vsn('$Id$'). -define(proto_sched(Action), proto_sched_fun(Action)). -in...
c818a27d534c6f59c9f1668b9d4a21ed968a10fbc89942adfee616910ce43015
boomerang-lang/boomerang
berror.ml
(******************************************************************************) The Harmony Project (******************************************************************************) Copyright ( C ) 2008 and ...
null
https://raw.githubusercontent.com/boomerang-lang/boomerang/b42c2bfc72030bbe5c32752c236c0aad3b17d149/lib/berror.ml
ocaml
**************************************************************************** **************************************************************************** This library is free software; you can redistribute it and/or modify it u...
The Harmony Project Copyright ( C ) 2008 and License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your option ) any later ...
3272fcc0ea3eda1fdbacea0f8df4a3c5be5f1976cfb3119ee0743c6970aa102c
jberryman/unagi-chan
UnagiUnboxed.hs
# LANGUAGE RankNTypes , ScopedTypeVariables , BangPatterns # # LANGUAGE TypeSynonymInstances , FlexibleInstances , CPP # module UnagiUnboxed (unagiUnboxedMain) where Unagi - chan - specific tests -- Forked from tests / Unagi.hs at 337600f import Control.Concurrent.Chan.Unagi.Unboxed import qualified Control.Concu...
null
https://raw.githubusercontent.com/jberryman/unagi-chan/03f62bb6989fcfa3372a93925b7bc0294b51a65d/tests/UnagiUnboxed.hs
haskell
TODO Maybe refactor & get rid of these ------ ------ ------ ------ ------ ------ TODO Maybe refactor & get rid of these www.../rrr... spanning overflow w/r/w/r... spanning overflow testing of writing atomicUnicorn smokeManyElement for atomicUnicorn values ------------- Make sure we get no tearing of adja...
# LANGUAGE RankNTypes , ScopedTypeVariables , BangPatterns # # LANGUAGE TypeSynonymInstances , FlexibleInstances , CPP # module UnagiUnboxed (unagiUnboxedMain) where Unagi - chan - specific tests Forked from tests / Unagi.hs at 337600f import Control.Concurrent.Chan.Unagi.Unboxed import qualified Control.Concurre...
54bf33f514c671510241ec8d852a6b184e0cbf9430c9c48282d0d45566cd75ab
phillord/tawny-owl
render_test.clj
The contents of this file are subject to the LGPL License , Version 3.0 . ;; Copyright ( C ) 2013 , 2017 , , Newcastle University ;; ;; This program is free software: you can redistribute it and/or modify it ;; under the terms of the GNU Lesser General Public License as published by the Free Software Foundation...
null
https://raw.githubusercontent.com/phillord/tawny-owl/331e14b838a42adebbd325f80f60830fa0915d76/test/tawny/render_test.clj
clojure
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT without even the implied warranty of MERCHANTABILITY or FITNESS...
The contents of this file are subject to the LGPL License , Version 3.0 . Copyright ( C ) 2013 , 2017 , , Newcastle University the Free Software Foundation , either version 3 of the License , or ( at your You should have received a copy of the GNU Lesser General Public License along with this program . If n...
b8ff62968dea3c239893f7a10eda1646d84de85b6c55eac99b82446b756f14fc
nrepl/weasel
websocket.cljs
Copyright ( c ) . All rights reserved . ;; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;; ...
null
https://raw.githubusercontent.com/nrepl/weasel/338109d3504fa96b8a15b6892fb8c4aceeb90857/src/cljs/weasel/impls/websocket.cljs
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.
Copyright ( c ) . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns weasel.impls.websocket (:require [clojure.browser.net :as net :refer [IConnection connect transmit]] [clojure.browser.event :as event :refer [event-types]] [goog.net.WebSocket :as gwebsocket])) (defpr...
88bd97a99b137cc9db783728465a67ec5453905eaf741cb38d1d98ca43e4c3e6
miner/transmuters
test_transmuters.clj
(ns miner.test-transmuters (:require [clojure.test :refer :all] [miner.transmuters :refer :all])) (defn test-take-nth [coll] (is (= (clojure.core/take-nth 3 coll) (my-take-nth 3 coll) (sequence (my-take-nth 3) coll) (transduce (my-take-nth 3) conj [] coll)))) (defn test-xt...
null
https://raw.githubusercontent.com/miner/transmuters/90bbe11c8773a0997a234f510ca8ba652791d37f/test/miner/test_transmuters.clj
clojure
Don't use this. slow-partition-when is a fix. Slow, but useful for testing (take 0) is a special case that burns on input so we need the pushback take-while burns an extra input so you need to pushback handy combinator for testing rem is slightly faster than mod distinct monotonically increasing
(ns miner.test-transmuters (:require [clojure.test :refer :all] [miner.transmuters :refer :all])) (defn test-take-nth [coll] (is (= (clojure.core/take-nth 3 coll) (my-take-nth 3 coll) (sequence (my-take-nth 3) coll) (transduce (my-take-nth 3) conj [] coll)))) (defn test-xt...
7854e47b5a0b1b072629eff0594bb8d2924607dcf46558cd51f17fa679b76c2b
project-oak/hafnium-verification
IssueAuxData.mli
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/concurrency/IssueAuxData.mli
ocaml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
684726b14c7951d7152a35fe078536f8ad7b5f33c967460492b3e9345f0e2145
rowangithub/DOrder
sum1.ml
let rec loop i n sn = if (i <= n) then loop (i + 1) n (sn + 1) else ( if (sn = n) then () else assert (sn = 0) ) let main n = loop 1 n 0 let _ = main 10 let _ = main 0 let _ = main (-1)
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/ice/sum1.ml
ocaml
let rec loop i n sn = if (i <= n) then loop (i + 1) n (sn + 1) else ( if (sn = n) then () else assert (sn = 0) ) let main n = loop 1 n 0 let _ = main 10 let _ = main 0 let _ = main (-1)
7151cd51a195089e1f8d9ac22c8a86d473f0368b2c9d61d41ea6d35fd18414bd
mzp/coq-ruby
contradiction.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/tactics/contradiction.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Absurd Contradiction
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * $ I d : contradiction.ml ...
93564b79669ca45da83352ef092b48bb0bce71592a77466d3b128ccecaa6d8e9
anuyts/menkar
Maybe.hs
module Data.Traversable.Maybe where import Control.Exception.AssertFalse import Data.Foldable import Data.Monoid import Data.Maybe traverseMaybe :: (Functor t, Foldable t) => (a -> Maybe b) -> t a -> Maybe (t b) traverseMaybe f ta = -- If all contained elements are of the form `Just _` if getAll . foldMap (All ....
null
https://raw.githubusercontent.com/anuyts/menkar/1f00e9febd1e9ed70c138ae8232b1c72a17d31da/menkar/src/Data/Traversable/Maybe.hs
haskell
If all contained elements are of the form `Just _` Then extract the `Just` Else return `Nothing`
module Data.Traversable.Maybe where import Control.Exception.AssertFalse import Data.Foldable import Data.Monoid import Data.Maybe traverseMaybe :: (Functor t, Foldable t) => (a -> Maybe b) -> t a -> Maybe (t b) traverseMaybe f ta = if getAll . foldMap (All . isJust . f) $ ta then Just $ fromMaybe unreachable . ...
e9acf7c2e227efcbb304749f84a4004df80cb52204c29417b63c8a6a1d2d98ae
ds-wizard/engine-backend
LocaleService.hs
module Registry.Service.Locale.LocaleService where import Registry.Api.Resource.Locale.LocaleDTO import Registry.Api.Resource.Locale.LocaleDetailDTO import Registry.Database.DAO.Locale.LocaleDAO import Registry.Database.DAO.Organization.OrganizationDAO import Registry.Model.Context.AppContext import Registry.Service.L...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/0ec94a4b0545f2de8a4e59686a4376023719d5e7/engine-registry/src/Registry/Service/Locale/LocaleService.hs
haskell
-------------------------------- PRIVATE --------------------------------
module Registry.Service.Locale.LocaleService where import Registry.Api.Resource.Locale.LocaleDTO import Registry.Api.Resource.Locale.LocaleDetailDTO import Registry.Database.DAO.Locale.LocaleDAO import Registry.Database.DAO.Organization.OrganizationDAO import Registry.Model.Context.AppContext import Registry.Service.L...
12fe931603fb4612c59a51dde6197438619b5120fb6c83a60be66fde1ed4e5df
gwkkwg/metatilities
generic-lisp.lisp
(in-package #:metatilities) ;;; --------------------------------------------------------------------------- ;;; specify that we're using the OPENMCL interface ;;; --------------------------------------------------------------------------- (setf (default-interface) :OPENMCL) ;;; --------------------------------------...
null
https://raw.githubusercontent.com/gwkkwg/metatilities/82e13df0545d0e47ae535ea35c5c99dd3a44e69e/dev/openmcl/generic-lisp.lisp
lisp
--------------------------------------------------------------------------- specify that we're using the OPENMCL interface --------------------------------------------------------------------------- --------------------------------------------------------------------------- ----------------------------------------...
(in-package #:metatilities) (setf (default-interface) :OPENMCL) (defmethod is-interface-available-p ((interface (eql :OPENMCL))) (values t)) (defmethod quit-lisp* ((interface (eql :OPENMCL))) (ccl:quit)) (defmethod total-bytes-allocated* ((interface (eql :OPENMCL))) (values (ccl::total-bytes-allocated))...
aad86329d67ab1932d9e8ffb76522fb74b30581fb1103e59605565d8079e7547
GaloisInc/surveyor
InstructionSemanticsViewer.hs
{-# LANGUAGE BangPatterns #-} -- | A widget for displaying the semantics for an individual instruction -- -- This is intended for displaying machine code instruction semantics. It -- currently has no interactivity, so there is no event handler. module Surveyor.Brick.Widget.InstructionSemanticsViewer ( InstructionSem...
null
https://raw.githubusercontent.com/GaloisInc/surveyor/96b6748d811bc2ab9ef330307a324bd00e04819f/surveyor-brick/src/Surveyor/Brick/Widget/InstructionSemanticsViewer.hs
haskell
# LANGUAGE BangPatterns # | A widget for displaying the semantics for an individual instruction This is intended for displaying machine code instruction semantics. It currently has no interactivity, so there is no event handler. The rendering only requires a view of the context, so there is no data payload for t...
module Surveyor.Brick.Widget.InstructionSemanticsViewer ( InstructionSemanticsViewer, instructionSemanticsViewer, renderInstructionSemanticsViewer ) where import qualified Brick as B import Control.DeepSeq ( NFData, rnf ) import Control.Lens ( (^?), (^.) ) import qualified Data.Vector as V ...
de0d954c8246e1492c98db473bf24382ac41a7111d8a0b0c0e6a6cbe1e4551c4
overtone/overtone
synth.clj
(ns ^{:doc "The ugen functions create a data structure representing a synthesizer graph that can be executed on the synthesis server. This is the logic to \"compile\" these clojure data structures into a form that can be serialized by the byte-spec defined in synthdef.clj." :author...
null
https://raw.githubusercontent.com/overtone/overtone/9afb513297662716860a4010bc76a0e73c65ca37/src/overtone/sc/synth.clj
clojure
A Synth is a collection of unit generators that run together. They can be addressed and controlled by commands to the synthesis engine. They read input and write output to global audio and control buses. Synths can have their own local controls that are set via commands to the server. Gets the group number (sourc...
(ns ^{:doc "The ugen functions create a data structure representing a synthesizer graph that can be executed on the synthesis server. This is the logic to \"compile\" these clojure data structures into a form that can be serialized by the byte-spec defined in synthdef.clj." :author...
3310eff3ae75e335f31746c14925f48f62aba641f4bba83a4db3256edc7c26b3
acowley/concurrent-machines
Concurrent.hs
# LANGUAGE CPP , GADTs , FlexibleContexts , RankNTypes , ScopedTypeVariables , TupleSections # TupleSections #-} -- | The primary use of concurrent machines is to establish a -- pipelined architecture that can boost overall throughput by running -- each stage of the pipeline at the same time...
null
https://raw.githubusercontent.com/acowley/concurrent-machines/70d2a8ae481e6fef503f2609c65b530bd1f96e1b/src/Data/Machine/Concurrent.hs
haskell
| The primary use of concurrent machines is to establish a pipelined architecture that can boost overall throughput by running each stage of the pipeline at the same time. The processing, or production, rate of each stage may not be identical, so facilities are provided to loosen the temporal coupling between pipe...
# LANGUAGE CPP , GADTs , FlexibleContexts , RankNTypes , ScopedTypeVariables , TupleSections # TupleSections #-} module Data.Machine.Concurrent (module Data.Machine, (>~>), (<~<), bufferConnect, rollingConnect, ...
c93edba89a25b881ae5aa3e2278be7c6c0cbfd19317262a5bce79a05ccc9f96f
caiorss/Functional-Programming
funclist.hs
import Data.Maybe (fromJust) f1 x = 2.4*x f2 x = 3.5*x -10 f3 x = 4*x^^2 - 10*x + 100 dict = [('a', f1), ('b', f2), ('c', f3)] funcdict key value = (fromJust $ lookup key dict) value funcdict2 'a' x = f1 x funcdict2 'b' x = f2 x funcdict2 'c' x = f3 x
null
https://raw.githubusercontent.com/caiorss/Functional-Programming/ef3526898e3014e9c99bf495033ff36a4530503d/codes/funclist.hs
haskell
import Data.Maybe (fromJust) f1 x = 2.4*x f2 x = 3.5*x -10 f3 x = 4*x^^2 - 10*x + 100 dict = [('a', f1), ('b', f2), ('c', f3)] funcdict key value = (fromJust $ lookup key dict) value funcdict2 'a' x = f1 x funcdict2 'b' x = f2 x funcdict2 'c' x = f3 x
fdc48692f66dd9619b7a669304ab51a0abf1b88d8b57c69f4618978dabc370af
40ants/openrpc
docs.lisp
(uiop:define-package #:openrpc-client/docs (:use #:cl) (:import-from #:40ants-doc #:defsection) (:import-from #:openrpc-client #:generate-client)) (in-package #:openrpc-client/docs) (defsection @client (:title "Client") (openrpc-client system) "OPENRPC-CLIENT ASDF system prov...
null
https://raw.githubusercontent.com/40ants/openrpc/8bb78c7bcf22eed95b3a8e6e634697d76b15d753/client/docs.lisp
lisp
(uiop:define-package #:openrpc-client/docs (:use #:cl) (:import-from #:40ants-doc #:defsection) (:import-from #:openrpc-client #:generate-client)) (in-package #:openrpc-client/docs) (defsection @client (:title "Client") (openrpc-client system) "OPENRPC-CLIENT ASDF system prov...
a00622a7614b0fee27b39bf60c2d4e62a33ad6ade451d6c1c651c13b8694be82
BinaryAnalysisPlatform/bap-plugins
visual.ml
open Core_kernel open Bap.Std open Uaf_error open Poly class marker (error : Uaf_error.t) = object(self) inherit Term.mapper as super method! map_term cls t = super#map_term cls t |> fun t -> (* Highlight everything visited in the trace *) (if List.mem ~equal:Tid.equal error.trace (Term.tid t) the...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap-plugins/2e9aa5c7c24ef494d0e7db1b43c5ceedcb4196a8/uaf-checker/visual.ml
ocaml
Highlight everything visited in the trace Highlight use site Highlight free site Highlight alloc site
open Core_kernel open Bap.Std open Uaf_error open Poly class marker (error : Uaf_error.t) = object(self) inherit Term.mapper as super method! map_term cls t = super#map_term cls t |> fun t -> (if List.mem ~equal:Tid.equal error.trace (Term.tid t) then Term.set_attr t foreground `cyan else t) |> f...
9836d902ed763adc835d958f52456daf3625e5bdc1a235d88d3c17d64dd2a4a7
HugoPeters1024/hs-sleuth
Records.hs
module Records where data Big = Big { field00 :: Int , field01 :: Int , field02 :: Int , field03 :: Int , field04 :: Int , field05 :: Int , field06 :: Int , field07 :: Int , field08 :: Int , field09 :: Int , field10 :: Int }
null
https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/8ea5efc614b23692fd208c611f749b788f09f596/test-project/app/Records.hs
haskell
module Records where data Big = Big { field00 :: Int , field01 :: Int , field02 :: Int , field03 :: Int , field04 :: Int , field05 :: Int , field06 :: Int , field07 :: Int , field08 :: Int , field09 :: Int , field10 :: Int }
916ae05fd3ac64fefedf59d33dcf800c1f4491b00f4a4e689178094683daa990
camsaul/methodical
common.clj
(ns methodical.impl.method-table.common (:require [clojure.string :as str])) (defn- datafy-method [f] (let [mta (meta f)] (cond-> mta (:ns mta) (update :ns ns-name) (and (:name mta) (:ns mta)) (update :name (fn [fn-name] (symbol (str (ns-name (:ns mta))...
null
https://raw.githubusercontent.com/camsaul/methodical/05ced088550dd212e9722c9c901183ce52bd37c0/src/methodical/impl/method_table/common.clj
clojure
we already know dispatch value. Whether it's private is irrelevant
(ns methodical.impl.method-table.common (:require [clojure.string :as str])) (defn- datafy-method [f] (let [mta (meta f)] (cond-> mta (:ns mta) (update :ns ns-name) (and (:name mta) (:ns mta)) (update :name (fn [fn-name] (symbol (str (ns-name (:ns mta))...
1b422e561c44470d44a1fab4f542ce57dda1b75bcf432556c60e371cd9f049d3
kutyel/haskell-book
Chapter30.hs
{-# LANGUAGE GADTs #-} module Chapter30 where import Control.Exception (ArithException (..), AsyncException (..)) import Data.Typeable (Typeable, cast) data MyException where MyException :: (Show e, Typeable e) => e -> MyException instance Show MyException where showsPrec p (MyException e) = showsPrec p e mult...
null
https://raw.githubusercontent.com/kutyel/haskell-book/fd4dc0332b67575cfaf5e3fb0e26687dc01772a0/src/Chapter30.hs
haskell
# LANGUAGE GADTs #
module Chapter30 where import Control.Exception (ArithException (..), AsyncException (..)) import Data.Typeable (Typeable, cast) data MyException where MyException :: (Show e, Typeable e) => e -> MyException instance Show MyException where showsPrec p (MyException e) = showsPrec p e multiError :: Int -> Either...
1f64d82849e3963ebaeb6e611b60cb6dafbb1851cfb3413549abf32b13b4caca
vaclavsvejcar/headroom
Types.hs
# LANGUAGE NoImplicitPrelude # -- | Module : Headroom . PostProcess . Types -- Description : Data types for /post-processing/ Copyright : ( c ) 2019 - 2022 -- License : BSD-3-Clause -- Maintainer : -- Stability : experimental -- Portability : POSIX -- -- This module contains data types and /type...
null
https://raw.githubusercontent.com/vaclavsvejcar/headroom/3b20a89568248259d59f83f274f60f6e13d16f93/src/Headroom/PostProcess/Types.hs
haskell
| Description : Data types for /post-processing/ License : BSD-3-Clause Maintainer : Stability : experimental Portability : POSIX This module contains data types and /type class/ instances for the /post-processing/ functions. | Definition of /post-processor/, i.e. function, that is applied to transfo...
# LANGUAGE NoImplicitPrelude # Module : Headroom . PostProcess . Types Copyright : ( c ) 2019 - 2022 module Headroom.PostProcess.Types ( PostProcess (..) ) where import RIO already rendered /license header/ , performs some logic and returns modified text of /license header/. Given that the...
149767aa922c9277c6a65fd989c8f1c94c2415dfb7d13e35b9102cbf9509682c
winny-/aoc
day12-typed.rkt
#lang typed/racket (struct instruction ([name : Symbol] [arg1 : (U Symbol Integer)] [arg2 : (U Symbol Integer False)]) #:transparent) (struct state ([registers : (HashTable Symbol Integer)] [address : (U Integer False)]) #:transparent) (define initial-stat...
null
https://raw.githubusercontent.com/winny-/aoc/d508caae19899dcab57ac665ef5d1a05b0a90c0c/2016/day12/day12-typed.rkt
racket
Sample input
#lang typed/racket (struct instruction ([name : Symbol] [arg1 : (U Symbol Integer)] [arg2 : (U Symbol Integer False)]) #:transparent) (struct state ([registers : (HashTable Symbol Integer)] [address : (U Integer False)]) #:transparent) (define initial-stat...
145e97c05a2b2c24e582b88663cf881bdfab5b6f7331afa30a4ec9a3e5294062
w3ntao/sicp-solution
1-44.rkt
#lang racket (define (even? n) (= (remainder n 2) 0)) (define (square x) (* x x)) (define (compose f g) (lambda (x) (f (g x)))) (define (double f) (lambda (x) (f (f x)))) (define (repeat f n) (cond ((= n 1) (lambda (x) (f x))) ((even? n) (repeat (double f) (/ n 2))) (else (compose f (re...
null
https://raw.githubusercontent.com/w3ntao/sicp-solution/00be3a7b4da50bb266f8a2db521a24e9f8c156be/chap-1/1-44.rkt
racket
#lang racket (define (even? n) (= (remainder n 2) 0)) (define (square x) (* x x)) (define (compose f g) (lambda (x) (f (g x)))) (define (double f) (lambda (x) (f (f x)))) (define (repeat f n) (cond ((= n 1) (lambda (x) (f x))) ((even? n) (repeat (double f) (/ n 2))) (else (compose f (re...
541618696798fa22ea1dd623f574e7b1e4b6dbefc37a1d32061a0a45b169e952
jeromesimeon/Galax
shredded_main_memory_hash.ml
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/shredded/shredded_main_memory/shredded_main_memory_hash.ml
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . $ I d : , v 1.3 2007/02/01 22:08:54 simeon Exp $ exception Cursor_Error of string module Shredded_Main_Memory_Hash_Functor (Key : Shredded_common.Shred_Type) (Value : Shredded_common.Shred_Type) = struct type hash = (Key.t, Valu...
86702d5153b7a689e38c56f2e568f3e7de87d828ca299d13742099d1b616e454
Ericson2314/lighthouse
Interp.hs
Interprets the subset of well - typed Core programs for which ( a ) All constructor and primop applications are saturated ( b ) All non - trivial expressions of unlifted kind ( ' # ' ) are scrutinized in a Case expression . This is by no means a " minimal " interpreter , in the sense that con...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/utils/ext-core/Interp.hs
haskell
constructed value (note: no qualifier needed!) function closure unevaluated thunk heap pointer (boxed) immediate primitive value (unboxed) unboxed tuples values of vars values of the (unboxed) primitive types actually WORD_SIZE_IN_BITS-bit signed actually WORD_SIZE_IN_BITS-bit unsigned actually native pointe...
Interprets the subset of well - typed Core programs for which ( a ) All constructor and primop applications are saturated ( b ) All non - trivial expressions of unlifted kind ( ' # ' ) are scrutinized in a Case expression . This is by no means a " minimal " interpreter , in the sense that con...
ac1bee5d7543279d51e7e2bc4d67b2ebfe73a6a80caff96c989ab02eca9b186f
AndrewMagerman/wizard-book-study
obj-harun.rkt
;;#lang simply-scheme obj.scm version 4.0 5/18/2000 ;;; -- implementation of the object-oriented syntax By , based on a handout from MIT Revised for STk by - removed scm and procedure->macro Utilities MAKNAM : create a new symbol whose name is the concatenation of the names of those in the symbol list...
null
https://raw.githubusercontent.com/AndrewMagerman/wizard-book-study/01f777f6d73967361eabcdacf6c6f69d73cc244d/missing_files/project_4/obj-harun.rkt
racket
#lang simply-scheme -- implementation of the object-oriented syntax the second with MESSAGE ; any extra actual arguments are put in a list, and that list is associated with ARGS will be the empty list.) procedure to the things in the list, which are used as actual argument values. The difference is that only INS...
obj.scm version 4.0 5/18/2000 By , based on a handout from MIT Revised for STk by - removed scm and procedure->macro Utilities MAKNAM : create a new symbol whose name is the concatenation of the names of those in the symbol list SYMBOLS . (define (maknam . symbols) (string->symbol (apply string-appe...
23a07bea7fe3ed5ff343e26f457fe47aac9e85c2b75e9ab1f76918374d23fcc4
roelvandijk/numerals
OJI.hs
| [ @ISO639 - 1@ ] oj [ @ISO639 - 2@ ] oji [ @ISO639 - 3@ ] oji [ @Native name@ ] ᐊᓂᔑᓈᐯᒧᐎᓐ ( ) [ @English name@ ] Ojibwe [@ISO639-1@] oj [@ISO639-2@] oji [@ISO639-3@] oji [@Native name@] ᐊᓂᔑᓈᐯᒧᐎᓐ (Anishinaabemowin) [@English name@] Ojibwe...
null
https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src/Text/Numeral/Language/OJI.hs
haskell
* Language entry * Conversions * Structure * Bounds ------------------------------------------------------------------------------ Imports ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------...
| [ @ISO639 - 1@ ] oj [ @ISO639 - 2@ ] oji [ @ISO639 - 3@ ] oji [ @Native name@ ] ᐊᓂᔑᓈᐯᒧᐎᓐ ( ) [ @English name@ ] Ojibwe [@ISO639-1@] oj [@ISO639-2@] oji [@ISO639-3@] oji [@Native name@] ᐊᓂᔑᓈᐯᒧᐎᓐ (Anishinaabemowin) [@English name@] Ojibwe...
627d56c942e7213015d01aac0670fef7ba951b6735ba6fdcb005317999499a2a
danlarkin/subrosa
database.clj
(ns subrosa.database (:refer-clojure :exclude [get]) (:import (java.util UUID))) (defonce ^:dynamic db (ref {})) (defn ensure-id [m] (if (:id m) m (assoc m :id (str (UUID/randomUUID))))) (defn add-index* [db table field-or-fields opts] (update-in db [table :indices] assoc field-or-fields opts)) (def...
null
https://raw.githubusercontent.com/danlarkin/subrosa/b8e554ffc1b83572acbbb8f50704d3db44b3770f/src/subrosa/database.clj
clojure
(ns subrosa.database (:refer-clojure :exclude [get]) (:import (java.util UUID))) (defonce ^:dynamic db (ref {})) (defn ensure-id [m] (if (:id m) m (assoc m :id (str (UUID/randomUUID))))) (defn add-index* [db table field-or-fields opts] (update-in db [table :indices] assoc field-or-fields opts)) (def...