_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
957817574b793bfa0b89bb6295098bbe8be7d860e052f7c36095b1144dcaf2bc
dom96/SimpleIRC
testbot.hs
{-# LANGUAGE OverloadedStrings #-} import Network.SimpleIRC import Data.Maybe import qualified Data.ByteString.Char8 as B privmsgTest :: EventFunc privmsgTest s msg = do putStrLn $ show $ privmsg putStrLn $ show $ privmsg == "|test" if privmsg == "|test" || privmsg == "$kill" then sendMsg s origin ("DIE!") ...
null
https://raw.githubusercontent.com/dom96/SimpleIRC/ee5ab54fcff9ae974458a9394a2484709724e9dc/tests/testbot.hs
haskell
# LANGUAGE OverloadedStrings # connect freenode True True
import Network.SimpleIRC import Data.Maybe import qualified Data.ByteString.Char8 as B privmsgTest :: EventFunc privmsgTest s msg = do putStrLn $ show $ privmsg putStrLn $ show $ privmsg == "|test" if privmsg == "|test" || privmsg == "$kill" then sendMsg s origin ("DIE!") else return () where privmsg =...
a711c8ab49601876d67627c4231dffd34f5025c22f222fbbb3316c62a8062262
sneeuwballen/zipperposition
Skolem.mli
This file is free software , part of Logtk . See file " license " for more details . (** {1 Skolem symbols} *) * A Skolem symbol is a witness for an existential property , used in { ! CNF } . Typically , we transform [ ∃x . ) ] into [ p(sk_x ) ] where [ sk_x ] is a fresh Skolem constant , " wit...
null
https://raw.githubusercontent.com/sneeuwballen/zipperposition/7f1455fbe2e7509907f927649c288141b1a3a247/src/core/Skolem.mli
ocaml
* {1 Skolem symbols} * Context needed to create new symbols * Just obtain a fresh skolem symbol. It is also declared in the inner signature. * Fresh symbol with a different name * {2 Skolemization} * [skolem_form ~ctx subst var f] returns a term [t] made of a new symbol applied to the free variables of [f]...
This file is free software , part of Logtk . See file " license " for more details . * A Skolem symbol is a witness for an existential property , used in { ! CNF } . Typically , we transform [ ∃x . ) ] into [ p(sk_x ) ] where [ sk_x ] is a fresh Skolem constant , " witnessing " the existential ...
55a60f826500ba901141ead1c4aa897da7322717cdc720afe17bce9119e10498
javalib-team/javalib
plugin.ml
let my_hello = Javalib_pack.JBasics.(ConstString (make_jstr "Hello from Javalib")) let main () = print_endline (Javalib_pack.Javalib.JPrint.constant my_hello) let () = Run.add main
null
https://raw.githubusercontent.com/javalib-team/javalib/807881077342a1a22650e6a9906ae5c2743a9940/tests/plugin/plugin.ml
ocaml
let my_hello = Javalib_pack.JBasics.(ConstString (make_jstr "Hello from Javalib")) let main () = print_endline (Javalib_pack.Javalib.JPrint.constant my_hello) let () = Run.add main
4239107f57f273dfe49ef859bc20f6bb90fa7bae88b5fff370360f7534dae2f8
pflanze/chj-schemelib
config-example.scm
(define compile-mode 'c) ;; s source, c compile, (i is currently buggy) (define compile-options '(options: (debug))) (define interpreted-modules ;; symbols, like: cj-env '())
null
https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/mod/config-example.scm
scheme
s source, c compile, (i is currently buggy) symbols, like: cj-env
(define compile-options '(options: (debug))) (define interpreted-modules '())
caa4299a4687627a2ec025e56510edd19947dfc7261bbe80776ad0c7fecefdf6
reenberg/wobot
Fladuino.hs
Copyright ( c ) 2008 The President and Fellows of Harvard College . -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: 1 . Redistributions of source code must retain the above copyright -- notice, th...
null
https://raw.githubusercontent.com/reenberg/wobot/ce7f112096ba1abd43b8d29da7e8944c2a004125/fladuino/fladuino/Fladuino.hs
haskell
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer. notice, this list of conditions and the following disclaimer in the documentation and/or other mate...
Copyright ( c ) 2008 The President and Fellows of Harvard College . 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright 3 . Neither the name of the University nor the names of its contributors THIS SOFTWARE IS PROV...
b06d1feeddaf2904f1da6902080de7ebf252bcb55712704c5e793f412bbfbbe6
nikodemus/SBCL
pprint.lisp
;;;; Common Lisp pretty printer 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 ;;...
null
https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/code/pprint.lisp
lisp
Common Lisp pretty printer 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. pretty streams INDEX - index into the output buffer POSN - some position in the stream of characters cycling...
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!PRETTY") There are three different units for measuring character positions : COLUMN - offset ( if cha...
0ffe8b47ffd4237c2a728ce6ad51ea63502035d9f7cc80984122503a218b0b63
xsc/claro
cache_test.clj
(ns claro.middleware.cache-test (:require [clojure.test.check :as tc] [clojure.test.check [clojure-test :refer [defspec]] [generators :as gen] [properties :as prop]] [clojure.test :refer :all] [clojure.set :as set] [claro.test :as ...
null
https://raw.githubusercontent.com/xsc/claro/16db75b7a775a14f3b656362e8ee4f65dd8b0d49/test/claro/middleware/cache_test.clj
clojure
## Helper ## Tests
(ns claro.middleware.cache-test (:require [clojure.test.check :as tc] [clojure.test.check [clojure-test :refer [defspec]] [generators :as gen] [properties :as prop]] [clojure.test :refer :all] [clojure.set :as set] [claro.test :as ...
19abce248535201de43a66fa1a19aad01451b6906a26f5b6e96e6a800fe0f5cc
teropa/nlp
tokenizer.clj
(ns teropa.nlp.tokenizer) (defprotocol Tokenizer (tokenize [this s] [this s args]) (batch-tokenize [this s] [this s args])) (defmacro deftokenizer [name init-vec & body] (let [method-names (into #{} (map first (filter list? body))) body-with-default-impls (concat body (if-not (meth...
null
https://raw.githubusercontent.com/teropa/nlp/f89bc5a15b516208de1cfe2abe9692b7ed9a43e2/src/teropa/nlp/tokenizer.clj
clojure
(ns teropa.nlp.tokenizer) (defprotocol Tokenizer (tokenize [this s] [this s args]) (batch-tokenize [this s] [this s args])) (defmacro deftokenizer [name init-vec & body] (let [method-names (into #{} (map first (filter list? body))) body-with-default-impls (concat body (if-not (meth...
728311f3d308e8d2fd526a479fdb0e5edcc036eeced12fcab0dee36c50a40092
fosskers/aura
Logo.hs
-- | Module : . Logo Copyright : ( c ) , 2012 - 2021 -- License : GPL3 Maintainer : < > -- Print an animated AURA version message . module Aura.Logo ( animateVersionMsg ) where import Aura.Colour (dtot, yellow) import Aura.IO import Aura.Languages (translatorMsg) impo...
null
https://raw.githubusercontent.com/fosskers/aura/08cd46eaa598094f7395455d66690d3d8c59e965/haskell/aura/lib/Aura/Logo.hs
haskell
| License : GPL3 - | Show an animated version message, but only when the output target is a terminal. Version message Initial reraising of the cursor. Initial rendering of head. Initial bite animation. Taken from: figlet -f small "aura"
Module : . Logo Copyright : ( c ) , 2012 - 2021 Maintainer : < > Print an animated AURA version message . module Aura.Logo ( animateVersionMsg ) where import Aura.Colour (dtot, yellow) import Aura.IO import Aura.Languages (translatorMsg) import Aura.Pacman (ve...
3fce9bf960f65a151e2a3356a06fe00c24c097ff808395ea2b757cedef9e9a00
ekmett/ekmett.github.com
Classes.hs
# LANGUAGE FlexibleContexts , FlexibleInstances , TypeSynonymInstances , MultiParamTypeClasses , UndecidableInstances , TypeOperators , DeriveDataTypeable # module Data.Rope.Classes ( Breakable(..) , Unpackable(..) ) where import Prelude hiding (break, span, takeWhile, dropWhile, unpack, head, last, uncons...
null
https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/rope/Data/Rope/Classes.hs
haskell
# LANGUAGE FlexibleContexts , FlexibleInstances , TypeSynonymInstances , MultiParamTypeClasses , UndecidableInstances , TypeOperators , DeriveDataTypeable # module Data.Rope.Classes ( Breakable(..) , Unpackable(..) ) where import Prelude hiding (break, span, takeWhile, dropWhile, unpack, head, last, uncons...
7bd6722479535d7cfb5890e34a0f1bdc9b764e2c5688b403f588a588b1826b3f
TrustInSoft/tis-kernel
help_manager.ml
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/gui/help_manager.ml
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of Frama - C. Copyright ( C ) 2007 - 2015 ...
0b99b112132e910695d15026e0d3fbcd8669682994d7257b8265b4a64bd25fed
puzza007/openpoker
bits.erl
Copyright ( C ) 2005 Wager Labs , SA %%% This file is part of OpenPoker . %%% OpenPoker is free software ; you can redistribute it and/or %%% modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any l...
null
https://raw.githubusercontent.com/puzza007/openpoker/bbd7158c81ba869f9f04ac7295c9fb7ea099a9d2/src/bits.erl
erlang
modify it under the terms of the GNU General Public This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. License along with this ...
Copyright ( C ) 2005 Wager Labs , SA This file is part of OpenPoker . OpenPoker is free software ; you can redistribute it and/or License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Gene...
bbf272fd6928a9b30d50e155f4d514c251a7def56cf9fe997b5ca31c39cc9e3e
lgessler/glam
settings.cljs
(ns glam.client.ui.admin.project.settings "The UI for admin settings on a single project." (:require [com.fulcrologic.fulcro.components :as c :refer [defsc]] [com.fulcrologic.fulcro.algorithms.form-state :as fs] [com.fulcrologic.fulcro.mutations :as m :refer [defmutation]] [com.f...
null
https://raw.githubusercontent.com/lgessler/glam/4b35b75456f03fc4b0529030d8adc2f6ac1c1615/src/main/glam/client/ui/admin/project/settings.cljs
clojure
Mutations -------------------------------------------------------------------------------------------- ====================================================================================================== Side panel components -------------------------------------------------------------------------------- =======...
(ns glam.client.ui.admin.project.settings "The UI for admin settings on a single project." (:require [com.fulcrologic.fulcro.components :as c :refer [defsc]] [com.fulcrologic.fulcro.algorithms.form-state :as fs] [com.fulcrologic.fulcro.mutations :as m :refer [defmutation]] [com.f...
458d7e6308b0a32a0c9ff87a132ad097088c7a393e9299c27f319d7b2fce5ecf
sdanzan/erlang-systools
shell_utils.erl
%%% -------------------------------------------------------------------------- @author < > @doc Utilities when passing parameters to os : cmd like functions . %%% -------------------------------------------------------------------------- -module(shell_utils). -export([quote/1]). %% ----------------------------...
null
https://raw.githubusercontent.com/sdanzan/erlang-systools/ced3faf1c807d36c528e53cbb366d69f464ff4e5/src/shell_utils.erl
erlang
-------------------------------------------------------------------------- -------------------------------------------------------------------------- --------------------------------------------------------------------------- @doc Replace all ' by \'
@author < > @doc Utilities when passing parameters to os : cmd like functions . -module(shell_utils). -export([quote/1]). -spec quote(string()) -> string(). quote(String) -> lists:flatten(lists:map(fun($') -> "\\'"; (C) -> C end, String)).
2f373fc9948ac9ba9cda734610a4153bbfb2feedcc4429cb51f885bb42b19ae3
sile/local
local_lib_tests.erl
@copyright 2014 , < > %% -module(local_lib_tests). -include_lib("eunit/include/eunit.hrl"). %%---------------------------------------------------------------------------------------------------------------------- %% Unit Tests %%------------------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/sile/local/91b4806a628001948ac98f50f5ce1f5a42b6ab2d/test/local_lib_tests.erl
erlang
---------------------------------------------------------------------------------------------------------------------- Unit Tests ----------------------------------------------------------------------------------------------------------------------
@copyright 2014 , < > -module(local_lib_tests). -include_lib("eunit/include/eunit.hrl"). link_and_flush_test_() -> [ {"unlink_and_flush: no flush", fun () -> Pid = spawn_link(timer, sleep, [infinity]), true = link(Pid), true = local_lib:unlink_and_flush(Pi...
b8ab8535821ff1dc5c1f63ef2ebb1dd6f2965b1adbe46ec4e5eb3dd8fa740a3f
theodormoroianu/SecondYearCourses
Exp-5_20210115162815.hs
module Exp where import Parsing import Control.Applicative data Exp = Lit Int | Add Exp Exp | Sub Exp Exp | Mul Exp Exp | Div Exp Exp deriving (Eq,Show) evalExp :: Exp -> Int evalExp (Lit n) = n evalExp (Add e f) = evalExp e + evalExp f evalExp (Sub e f) = evalE...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/.history/lab12/Exp-5_20210115162815.hs
haskell
module Exp where import Parsing import Control.Applicative data Exp = Lit Int | Add Exp Exp | Sub Exp Exp | Mul Exp Exp | Div Exp Exp deriving (Eq,Show) evalExp :: Exp -> Int evalExp (Lit n) = n evalExp (Add e f) = evalExp e + evalExp f evalExp (Sub e f) = evalE...
2dad3361540ce2a1a0a838c765ee3bfcabdface3f41b7be9751644781d04d838
xvw/planet
qexp.ml
open Bedrock open Util open Error type quote = | Double | Backtick type t = | Atom of string | Tag of string | Keyword of string | String of (quote * string) | Node of t list | Block of t list let atom value = Atom value let tag value = Tag value let keyword value = Keyword value let string ?(quote =...
null
https://raw.githubusercontent.com/xvw/planet/c2a77ea66f61cc76df78b9c2ad06d114795f3053/src/paperwork/qexp.ml
ocaml
open Bedrock open Util open Error type quote = | Double | Backtick type t = | Atom of string | Tag of string | Keyword of string | String of (quote * string) | Node of t list | Block of t list let atom value = Atom value let tag value = Tag value let keyword value = Keyword value let string ?(quote =...
b062a191c5749a6ee57fdee7016582936a22f05fa226689a801fadf243df65c7
argp/bap
asmir_rdisasm.mli
* Lift a program using recursive disassembly . @author @author Ricky Zhou *) open Ast open Type type callback = addr -> addr -> stmt list -> bool (** Recursively disassemble [p] beginning from known addresses in [startaddrs]. If [f] is defined and [f addr stmts] returns false, raises {!Asmir....
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/asmir_rdisasm.mli
ocaml
* Recursively disassemble [p] beginning from known addresses in [startaddrs]. If [f] is defined and [f addr stmts] returns false, raises {!Asmir.Disassembly_error}.
* Lift a program using recursive disassembly . @author @author Ricky Zhou *) open Ast open Type type callback = addr -> addr -> stmt list -> bool val rdisasm_at : ?f:callback -> Asmir.asmprogram -> addr list -> Ast.program * string * Recursively disassemble [ p ] beginning at the program 's defined ...
3a85f824542d8016bf33829f465e4866cbf2a668cb087a6fa4dbc834f636112c
w3ntao/sicp-solution
2-22.rkt
#lang racket (define nil '()) (define (square x) (* x x)) (define (square-list items) (define (iter things answer) (if (null? things) answer (iter (cdr things) (cons answer (square (car things)))))) (iter items nil)) (define (square-list-improve items) ...
null
https://raw.githubusercontent.com/w3ntao/sicp-solution/00be3a7b4da50bb266f8a2db521a24e9f8c156be/chap-2/2-22.rkt
racket
#lang racket (define nil '()) (define (square x) (* x x)) (define (square-list items) (define (iter things answer) (if (null? things) answer (iter (cdr things) (cons answer (square (car things)))))) (iter items nil)) (define (square-list-improve items) ...
39d0bec0d8a474ea6319b32b80e9343816ceace89b0a1cda6b0acfe710bbdf52
input-output-hk/cardano-sl
DisplayError.hs
# LANGUAGE RecordWildCards # module Lang.DisplayError ( ppArgumentError , ppEvalError , ppTypeError , ppTypeName , ppParseError , ppProcError , ppResolveErrors , renderAuxxDoc ) where import Universum hiding (empty, (<$>)) import qualified Data.List.NonEmpty as NE import...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/auxx/src/Lang/DisplayError.hs
haskell
returned line number bigger than the actual amount of lines in the input text. it's fine
# LANGUAGE RecordWildCards # module Lang.DisplayError ( ppArgumentError , ppEvalError , ppTypeError , ppTypeName , ppParseError , ppProcError , ppResolveErrors , renderAuxxDoc ) where import Universum hiding (empty, (<$>)) import qualified Data.List.NonEmpty as NE import...
f57d37930412aaa45e86c327a21788e5582ac35bd568ab0b9db92d7007624c3d
haskell-works/hw-xml
Words.hs
module HaskellWorks.Data.Xml.Internal.Words where import Data.Word import Data.Word8 isLeadingDigit :: Word8 -> Bool isLeadingDigit w = w == _hyphen || (w >= _0 && w <= _9) isTrailingDigit :: Word8 -> Bool isTrailingDigit w = w == _plus || w == _hyphen || (w >= _0 && w <= _9) || w == _period || w == _E || w == _e i...
null
https://raw.githubusercontent.com/haskell-works/hw-xml/e30a4cd8e6dc7451263a3d45c1ae28b3f35d0079/src/HaskellWorks/Data/Xml/Internal/Words.hs
haskell
module HaskellWorks.Data.Xml.Internal.Words where import Data.Word import Data.Word8 isLeadingDigit :: Word8 -> Bool isLeadingDigit w = w == _hyphen || (w >= _0 && w <= _9) isTrailingDigit :: Word8 -> Bool isTrailingDigit w = w == _plus || w == _hyphen || (w >= _0 && w <= _9) || w == _period || w == _E || w == _e i...
978eb9e7e94388a8ad0777a56abe3888e56af15338df319ffb7b58e08472b436
ezrakilty/narc
Eval.hs
module Database.Narc.Eval where import Database.Narc.AST import Database.Narc.Debug (debug) import Database.Narc.Util (alistmap) -- -- Evaluation ---------------------------------------------------------- -- -- { Values and value environments } ----------------------------------- bind x v env = (x,v):env -- type R...
null
https://raw.githubusercontent.com/ezrakilty/narc/76310e6ac528fe038d8bdd4aa78fa8c555501fad/Database/Narc/Eval.hs
haskell
Evaluation ---------------------------------------------------------- { Values and value environments } ----------------------------------- type RuntimeTerm = Term (Maybe Query) | Inject a data value back into a literal term that denotes it. [("+", | appPrim: apply a primitive function to a list of value ar...
module Database.Narc.Eval where import Database.Narc.AST import Database.Narc.Debug (debug) import Database.Narc.Util (alistmap) bind x v env = (x,v):env type Env = [(VarName, Value)] data Value = VUnit | VBool Bool | VNum Integer | VString String | VList [Value] | VRecord [(String, Value...
af1299916c7c53214e0e03fe80ed2b8f4b7e48b8c2d6d7b6aed3c2c6cd678e97
AndrasKovacs/ELTE-func-lang
Notes02.hs
ismétlés , ADT - k -------------------------------------------------------------------------------- 1 . Definiáld a . f1 :: (a -> (b, c)) -> (a -> b, a -> c) f1 f = (fst . f, snd . f) f2 :: (a -> b, a -> c) -> (a -> (b, c)) f2 (f, g) a = (f a, g a) f3 :: (Either a b -> c) -> (a -> c, b -> c) f3 f = (f . Lef...
null
https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/88d41930999d6056bdd7bfaa85761a527cce4113/2019-20-1/lectures/Notes02.hs
haskell
------------------------------------------------------------------------------ Írj "Eq a => Eq (Tree a)" instance-t
ismétlés , ADT - k 1 . Definiáld a . f1 :: (a -> (b, c)) -> (a -> b, a -> c) f1 f = (fst . f, snd . f) f2 :: (a -> b, a -> c) -> (a -> (b, c)) f2 (f, g) a = (f a, g a) f3 :: (Either a b -> c) -> (a -> c, b -> c) f3 f = (f . Left, f . Right) f4 :: (a -> c, b -> c) -> (Either a b -> c) f4 (f, g) (Left a) = ...
3040368dd98ded1b22a6beae9abe21e1e9fdf1b5b93da61a102f975ae3173aea
richhickey/clojure-contrib
database.clj
Copyright ( c ) . All rights reserved . The use and ;; distribution terms for this software are covered by the Eclipse Public ;; License 1.0 (-1.0.php) which can ;; be found in the file epl-v10.html at the root of this distribution. By ;; using this software in any fashion, you are agreeing to be bound by t...
null
https://raw.githubusercontent.com/richhickey/clojure-contrib/40b960bba41ba02811ef0e2c632d721eb199649f/src/main/clojure/clojure/contrib/datalog/database.clj
clojure
distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or an...
Copyright ( c ) . All rights reserved . The use and A Clojure implementation of Datalog -- Support for in - memory database straszheimjeffrey ( gmail ) Created 21 Feburary 2009 (ns clojure.contrib.datalog.database (:use clojure.contrib.datalog.util) (:use clojure.contrib.def) (:use [clojure....
3f033602a88c4fa4c7f21b96cd073c88ef826f8d60c7dc41aa4b41d89b0a9b45
philnguyen/soft-contract
ex-06.rkt
#lang racket (define (f x y) (if (and (number? x) (string? y)) (+ x (string-length y)) (string-length x))) (provide/contract [f ((or/c number? string?) string? . -> . number?)])
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/octy/ex-06.rkt
racket
#lang racket (define (f x y) (if (and (number? x) (string? y)) (+ x (string-length y)) (string-length x))) (provide/contract [f ((or/c number? string?) string? . -> . number?)])
a2150ebd82adefd0c533e500b8d335b8b098819c3c79c0606a0066c2982e7471
jordwalke/rehp
main.ml
Js_of_ocaml example * / * Copyright ( C ) 2010 * * 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 ve...
null
https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/examples/wysiwyg/main.ml
ocaml
see * -spec.html
Js_of_ocaml example * / * Copyright ( C ) 2010 * * 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 ve...
75ed0de4e99feafa4e27fb19aa4aae2468accddc786b845b1c175b5cc87e1f51
airalab/hs-web3
Class.hs
{-# LANGUAGE FlexibleContexts #-} # LANGUAGE FunctionalDependencies # -- | -- Module : Network.Ethereum.Account.Class Copyright : 2016 - 2021 -- License : Apache-2.0 -- -- Maintainer : -- Stability : experimental -- Portability : unportable -- Ethereum external owned account abstract...
null
https://raw.githubusercontent.com/airalab/hs-web3/49b920384b025ab7de0f9fce3efe9f471d95e71f/packages/ethereum/src/Network/Ethereum/Account/Class.hs
haskell
# LANGUAGE FlexibleContexts # | Module : Network.Ethereum.Account.Class License : Apache-2.0 Maintainer : Stability : experimental Portability : unportable | Account is needed for sending transactions to blockchain Typically account is provided by node. In this case node manage accou...
# LANGUAGE FunctionalDependencies # Copyright : 2016 - 2021 Ethereum external owned account abstraction . module Network.Ethereum.Account.Class where import Control.Monad.Trans (MonadTrans) import Data.ByteArray.HexString (HexString) import Data.Solidity...
3a04ccb54d3f0c63e87bb33f5fe71eb18173d1e3af3badee4059b00b7902e58d
4y8/esoo
hardlang.ml
exception Invalid_input let rec eval ?pos:(pos=0) input a = match pos with _ when pos = String.length input -> a | _ -> let new_a = match String.get input pos with '!' -> (lnot a) land 2147483647 | '<' -> (a lsl 1) land 2147483647 | _ -> raise(Invalid_input) in...
null
https://raw.githubusercontent.com/4y8/esoo/49f9b8bd70c1f41bf2d4db044d0cfede4e1ff470/hardlang/hardlang.ml
ocaml
exception Invalid_input let rec eval ?pos:(pos=0) input a = match pos with _ when pos = String.length input -> a | _ -> let new_a = match String.get input pos with '!' -> (lnot a) land 2147483647 | '<' -> (a lsl 1) land 2147483647 | _ -> raise(Invalid_input) in...
2f38f9c41e69f78f924e85731557ed3044f61933004f715562fb39ee6f2390bf
luminus-framework/examples
config.clj
(ns guestbook.config (:require [cprop.core :refer [load-config]] [cprop.source :as source] [mount.core :refer [args defstate]])) (defstate env :start (load-config :merge [(args) (source/from-system-props) (source/from-env)]))
null
https://raw.githubusercontent.com/luminus-framework/examples/cbeee2fef8f457a6a6bac2cae0b640370ae2499b/guestbook-sente/src/clj/guestbook/config.clj
clojure
(ns guestbook.config (:require [cprop.core :refer [load-config]] [cprop.source :as source] [mount.core :refer [args defstate]])) (defstate env :start (load-config :merge [(args) (source/from-system-props) (source/from-env)]))
9b042db29ea0534e242def909b0a72c6be963df29c9943a1f1d30c52c9e563a4
racket/compiler
embed-sig.rkt
(module embed-sig racket/base (require racket/unit) (provide compiler:embed^) (define-signature compiler:embed^ (create-embedding-executable make-embedding-executable write-module-bundle embedding-executable-is-directory? embedding-executable-is-actually-directory? embedding-executa...
null
https://raw.githubusercontent.com/racket/compiler/88acf8a1ec81fec0fbcb6035af1d994d2fec4154/compiler-lib/compiler/embed-sig.rkt
racket
(module embed-sig racket/base (require racket/unit) (provide compiler:embed^) (define-signature compiler:embed^ (create-embedding-executable make-embedding-executable write-module-bundle embedding-executable-is-directory? embedding-executable-is-actually-directory? embedding-executa...
da20869fefc973e432cba20577b63aab3d4609aed9af47d3dd066d3edcefe3c8
tkych/lisp-dojo
016.lisp
Last modified : 2013 - 10 - 15 18:59:02 tkych (define-practice :id 016 :name remove-every-nth :level 1 :problem " REMOVE-EVERY-NTH n list => result-list Make function REMOVE-EVERY-NTH. It returns list that does not contains every the `n'th element. If `n' is not a positive integer, RE...
null
https://raw.githubusercontent.com/tkych/lisp-dojo/ba83d025bc03101eec43ec6be44585d7b076caf6/practices/016.lisp
lisp
Last modified : 2013 - 10 - 15 18:59:02 tkych (define-practice :id 016 :name remove-every-nth :level 1 :problem " REMOVE-EVERY-NTH n list => result-list Make function REMOVE-EVERY-NTH. It returns list that does not contains every the `n'th element. If `n' is not a positive integer, RE...
448e3fc98bf13aad1d9a36badf4981a2d727b8f8305ac05854563178ec85725e
cuter-testing/cuter
cuter_env.erl
-*- erlang - indent - level : 2 -*- %%------------------------------------------------------------------------------ -module(cuter_env). -export([new_environment/0, add_binding/3, bind_parameters/3, get_value/2, add_mappings_to_environment/2]). -include_lib("compiler/src/core_parse.hrl"). %% External exported ty...
null
https://raw.githubusercontent.com/cuter-testing/cuter/62a300d5cadf62ca9af5bc62ff0a0cb2d717dfcd/src/cuter_env.erl
erlang
------------------------------------------------------------------------------ External exported types Environments are rather small so orddict is more efficient Creates a new empty environment Adds a new binding to the environment and returns the new environment Returns the value of a variable Binds the paramet...
-*- erlang - indent - level : 2 -*- -module(cuter_env). -export([new_environment/0, add_binding/3, bind_parameters/3, get_value/2, add_mappings_to_environment/2]). -include_lib("compiler/src/core_parse.hrl"). -export_type([environment/0]). -type environment() :: orddict:orddict(). -type cvar() :: cerl:var_name(...
7da4f9c760e432b5009efe20cee87d7e6341ebd89c6e45d044d1b118075c76f0
voodoos/elpi-js
stringTools.ml
Tools for priting results * These results have the type Elpi_API.Data.solution * * type solution = { * assignments : term StrMap.t ; * constraints : syntactic_constraints ; * custom_constraints : custom_constraints ; * } * * These results have the type Elpi_API.Data.solution ...
null
https://raw.githubusercontent.com/voodoos/elpi-js/3b70c5a9d5be66c8e6c0f4f4315747d97b705faf/src/stringTools.ml
ocaml
Tools for priting results * These results have the type Elpi_API.Data.solution * * type solution = { * assignments : term StrMap.t ; * constraints : syntactic_constraints ; * custom_constraints : custom_constraints ; * } * * These results have the type Elpi_API.Data.solution ...
da89d9ca9e27d82df5c14ebdaf5cbc7df243b97768623332409b06d160b77430
zed-throben/erlangeos
test_dict.erl
- module('test_dict'). - compile(export_all). test() -> PropList = [{a,alpha},{b,beta},{c,gamma}], 3 = eos:invoke(PropList,length,[]), alpha = eos:get_slot(PropList,a), beta = eos:get_slot(PropList,b), gamma = eos:get_slot(PropList,c), Dict = dict:from_list(PropList), 3 = eos:invoke(Dict,le...
null
https://raw.githubusercontent.com/zed-throben/erlangeos/44e50e442f5d396c69ae90db530b0b60b01d692a/test/test_dict.erl
erlang
- module('test_dict'). - compile(export_all). test() -> PropList = [{a,alpha},{b,beta},{c,gamma}], 3 = eos:invoke(PropList,length,[]), alpha = eos:get_slot(PropList,a), beta = eos:get_slot(PropList,b), gamma = eos:get_slot(PropList,c), Dict = dict:from_list(PropList), 3 = eos:invoke(Dict,le...
926056e58f7a9934a11a37dfa0ac1c89684374cdd084834140a5c3a8813ddc2a
erdos/stencil
extract-wordxml.clj
#!/usr/bin/env bb (def input (first *command-line-args*)) (assert input) (def input-file (clojure.java.io/file input)) (assert (.exists input-file)) (with-open [fistream (new java.io.FileInputStream input-file) zipstream (new java.util.zip.ZipInputStream fistream)] (doseq [entry (repeatedly #(.getNext...
null
https://raw.githubusercontent.com/erdos/stencil/858b1e221a4a53c14e0b121054841f3e50bef2fd/scripts/extract-wordxml.clj
clojure
#!/usr/bin/env bb (def input (first *command-line-args*)) (assert input) (def input-file (clojure.java.io/file input)) (assert (.exists input-file)) (with-open [fistream (new java.io.FileInputStream input-file) zipstream (new java.util.zip.ZipInputStream fistream)] (doseq [entry (repeatedly #(.getNext...
1b12a82306fe8cc7a2b9ef972e85fb9c0a526d48096ed96c72897e255d35574d
felipereigosa/mock-mechanics
persistence.clj
(declare get-body-transform) (declare make-sphere) (defn get-simple-transform [transform] {:position (get-transform-position transform) :rotation (get-transform-rotation transform)}) (defn get-simple-color [color] (if (keyword? color) color [(.getRed color) (.getGreen color) (.getBlue color)...
null
https://raw.githubusercontent.com/felipereigosa/mock-mechanics/93070a789f5b24a7b34643bc11f47f8cf6112f8d/src/mockmechanics/persistence.clj
clojure
(declare get-body-transform) (declare make-sphere) (defn get-simple-transform [transform] {:position (get-transform-position transform) :rotation (get-transform-rotation transform)}) (defn get-simple-color [color] (if (keyword? color) color [(.getRed color) (.getGreen color) (.getBlue color)...
d38c5280a659c6f6ce5ea4a1a6a226171b76f8540720d86bceded807c225d965
glutamate/bugpan
RegressionGibbs.hs
# LANGUAGE ViewPatterns , NoMonomorphismRestriction , FlexibleInstances , ForeignFunctionInterface , ScopedTypeVariables # module Main where import Math.Probably.Sampler import Math.Probably.StochFun import Math.Probably.MCMC import qualified Math.Probably.PDF as P import Control.Monad import TNUtils import System.Env...
null
https://raw.githubusercontent.com/glutamate/bugpan/d0983152f5afce306049262cba296df00e52264b/RegressionGibbs.hs
haskell
mapM print thedata
# LANGUAGE ViewPatterns , NoMonomorphismRestriction , FlexibleInstances , ForeignFunctionInterface , ScopedTypeVariables # module Main where import Math.Probably.Sampler import Math.Probably.StochFun import Math.Probably.MCMC import qualified Math.Probably.PDF as P import Control.Monad import TNUtils import System.Env...
2b6d8326c7a02f06c4c4ceb17a9beca6a364eff21a85097a71c75d84f6a1ae75
drsk0/fasths
Fast.hs
-- | -- Module : Codec.Fast Copyright : 2011 -- License : BSD3 -- Maintainer : -- Stability : experimental -- Portability : unknown # LANGUAGE FlexibleContexts # module Codec.Fast ( -- * Introduction -- |This library provides the means to decode or encode binary data encoded accor...
null
https://raw.githubusercontent.com/drsk0/fasths/06b144bddb38c805ef9c5abf21dcad8b4adeb357/src/Codec/Fast.hs
haskell
| Module : Codec.Fast License : BSD3 Stability : experimental Portability : unknown * Introduction |This library provides the means to decode or encode binary data encoded according to the FAST protocol. See @[Msg Name [\"MDIncRefresh_33\"] Ns [\"-\"] Id [\"33\"] -> Gr Name [\"ApplV...
Copyright : 2011 Maintainer : # LANGUAGE FlexibleContexts # module Codec.Fast ( < > for more information on FAST . A FAST message is a tuple ( ' NsName ' , Maybe ' Value ' ) , where ' Value ' is a recursive data structure . Here is how a typical decoded message will look like : Name [ ...
7aa3287575348e471744058506bc016d96996b77932b970d1ab404430f2c6cff
buntine/Simply-Scheme-Exercises
20-4.scm
; Write a program that carries on a conversation like the following example. What ; the user types is in boldface. ; ; > (converse) Hello , I 'm the computer . What 's your name ? Hi , . How are you ? I 'm fine . ; Glad to hear it. (define (converse) (display "Hello, I'm the computer. What's your name?") (l...
null
https://raw.githubusercontent.com/buntine/Simply-Scheme-Exercises/c6cbf0bd60d6385b506b8df94c348ac5edc7f646/20-input-and-output/20-4.scm
scheme
Write a program that carries on a conversation like the following example. What the user types is in boldface. > (converse) Glad to hear it.
Hello , I 'm the computer . What 's your name ? Hi , . How are you ? I 'm fine . (define (converse) (display "Hello, I'm the computer. What's your name?") (let ((name (read-line))) (show-line (se "Hi, " name ". How are you?")) (let ((mood (read-line))) (show-line (if (equal? mood '(good)) ...
751ec197856b1ad5a82c4cb1966eb95533c9511603ec42d4ec6174fe09dc8399
evertedsphere/how-to-implement-dependent-type-theory
Main.hs
-- It is generally a good idea to keep all your business logic in your library -- and only use it in the executable. Doing so allows others to use what you -- wrote in their libraries. import qualified Example main :: IO () main = Example.main
null
https://raw.githubusercontent.com/evertedsphere/how-to-implement-dependent-type-theory/40040c39f3008b27a8e123b169821bc545ac050c/executable/Main.hs
haskell
It is generally a good idea to keep all your business logic in your library and only use it in the executable. Doing so allows others to use what you wrote in their libraries.
import qualified Example main :: IO () main = Example.main
c49ba504921e576cc2fa27d3c6b30e7383edb68b53383d5a8792445d106c4fa2
kssytsrk/cellular-automata
states.lisp
;;;; -*-lisp-*- ;;;; ;;;; states.lisp (in-package #:ca) (defmacro state-fn (state-name) "Returns the state's function #'<state-name>-STATE." `(function ,(find-symbol (concatenate 'string (symbol-name state-name) "-STATE") ...
null
https://raw.githubusercontent.com/kssytsrk/cellular-automata/173ada0a89b6095501d91829288927e8d46ccd9d/states.lisp
lisp
-*-lisp-*- states.lisp
(in-package #:ca) (defmacro state-fn (state-name) "Returns the state's function #'<state-name>-STATE." `(function ,(find-symbol (concatenate 'string (symbol-name state-name) "-STATE") 'ca))) (defun next-state...
7fc0dee66abb5e234dcc4639484529c09371a10b87af7134f29b869072b3a40c
inaka/worker_pool
wpool_time_checker.erl
This file is licensed to you under the Apache License , % Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain % a copy of the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distributed under the License is dis...
null
https://raw.githubusercontent.com/inaka/worker_pool/8e124897f1c2dc84e99c5233abcdb62ada6fa3af/src/wpool_time_checker.erl
erlang
Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. @hidden api gen_server callback...
This file is licensed to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(wpool_time_checker). -behaviour(gen_server). -type handler() :: {atom()...
4f5e7469c12c459e872f8d559eef0d7900ce60e7afbeb3136552b1cbbfc653e0
Metaxal/quickscript-extra
all-tabs.rkt
#lang racket/base (require racket/gui/base racket/class quickscript) The default ' Tabs ' menu in lists only the first 10 tabs . ;;; This script displays all tabs, which is particularly convenient when ;;; there are many tabs and not all of them are visible. (script-help-string "Have a menu that...
null
https://raw.githubusercontent.com/Metaxal/quickscript-extra/526b2eccd9f73ea30bbc013741fdd77f4e2724cf/scripts/all-tabs.rkt
racket
This script displays all tabs, which is particularly convenient when there are many tabs and not all of them are visible.
#lang racket/base (require racket/gui/base racket/class quickscript) The default ' Tabs ' menu in lists only the first 10 tabs . (script-help-string "Have a menu that displays all open tabs in DrRacket.") (define-script all-tabs #:label "All tabs" (λ (str #:frame fr) (define menu-bar ...
ddc632d5e650ace2a443e71fd5b571961b66cbeead85831e645be8146743976a
AbstractMachinesLab/caramel
mocaml.ml
open Std open Local_store.Compiler (* Instance of environment cache & btype unification log *) type typer_state = Local_store.scope let current_state = srefk None let new_state () = let scope = Local_store.fresh compiler_state in Local_store.with_scope scope (fun () -> current_state := Some scope); scope le...
null
https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/src/kernel/mocaml.ml
ocaml
Instance of environment cache & btype unification log Build settings Cleanup caches Flush cache
open Std open Local_store.Compiler type typer_state = Local_store.scope let current_state = srefk None let new_state () = let scope = Local_store.fresh compiler_state in Local_store.with_scope scope (fun () -> current_state := Some scope); scope let with_state state f = if Local_store.is_bound compiler_sta...
8cf5c9f6d83cbd58cb479373b6cfb8117597edfff1ae175963035fc23b782832
HealthSamurai/ql
string.cljc
(ns ql.pg.string (:require [clojure.string :as str] [ql.method :refer [to-sql conj-sql conj-param reduce-separated]])) string || string text String concatenation ' Post ' || ' greSQL ' PostgreSQL string || non - string or non - string || string text String concatenation with one non - string in...
null
https://raw.githubusercontent.com/HealthSamurai/ql/145241ee7484a9e8a6c106c271505f2e3f0788ee/src/ql/pg/string.cljc
clojure
substring(string from pattern) text Extract substring matching POSIX regular expression. See Section 9.7 for more information on pattern matching. substring('Thomas' from '...$') mas substring(string from pattern for escape) text Extract substring matching SQL regular expression. See Section 9.7 for more information ...
(ns ql.pg.string (:require [clojure.string :as str] [ql.method :refer [to-sql conj-sql conj-param reduce-separated]])) string || string text String concatenation ' Post ' || ' greSQL ' PostgreSQL string || non - string or non - string || string text String concatenation with one non - string in...
ddc7e3ccf14dd7cba132255ce71eeb1beade0d4c92a70204e02b4fd1721cdc41
lamdu/hypertypes
Traversable.hs
# LANGUAGE FlexibleContexts # | A variant of ' ' for ' Hyper . Type . HyperType 's module Hyper.Class.Traversable ( HTraversable (..) , ContainedH (..) , _ContainedH , htraverse , htraverse1 ) where import Control.Lens (iso) import GHC.Generics import GHC.Generics.Lens (generic1, _M1, _Rec1...
null
https://raw.githubusercontent.com/lamdu/hypertypes/161142e0d9f503194b85fb6f5b2a5907a1ae3783/src/Hyper/Class/Traversable.hs
haskell
Used to express 'hsequence'. # INLINE _ContainedH # | 'HTraversable' variant of 'sequenceA' | 'HTraversable' variant of 'traverse' It is a valid 'Traversal' as it avoids using @RankNTypes@.
# LANGUAGE FlexibleContexts # | A variant of ' ' for ' Hyper . Type . HyperType 's module Hyper.Class.Traversable ( HTraversable (..) , ContainedH (..) , _ContainedH , htraverse , htraverse1 ) where import Control.Lens (iso) import GHC.Generics import GHC.Generics.Lens (generic1, _M1, _Rec1...
638cd216ea992729a6bc3dd059ed3d328227ae7293a4e304e51f0bcb02638e59
Viasat/halite
bound_union.clj
Copyright ( c ) 2022 Viasat , Inc. Licensed under the MIT license (ns com.viasat.halite.propagate.bound-union (:require [clojure.set :as set] [com.viasat.halite.propagate.prop-refine :refer [ConcreteBound RefinementBound]] [schema.core :as s])) (set! *warn-on-reflection* tru...
null
https://raw.githubusercontent.com/Viasat/halite/a5f81473dadc1b8e63ed6744d3b0154098f1b3ab/src/com/viasat/halite/propagate/bound_union.clj
clojure
Copyright ( c ) 2022 Viasat , Inc. Licensed under the MIT license (ns com.viasat.halite.propagate.bound-union (:require [clojure.set :as set] [com.viasat.halite.propagate.prop-refine :refer [ConcreteBound RefinementBound]] [schema.core :as s])) (set! *warn-on-reflection* tru...
6e2326c1413c1255e8cc226752c5107b5276bd1a9b7b80ffc960974e9eac5617
ghcjs/ghcjs-dom
HTMLMetaElement.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.HTMLMetaElement (js_setContent, setContent, js_getContent, getContent, js_setHt...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/HTMLMetaElement.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.HTMLMetaElement (js_setContent, setContent, js_getContent, getContent, js_setHttpEquiv, setHttpEquiv, js_getHttpEquiv, getHttpEquiv, js_setName, setName, js_getName, getN...
9fe740d3b2bd01b37e3a556f022959548d99780d6371321d13a4e712947b89c2
ekmett/monoids
Combinators.hs
# LANGUAGE UndecidableInstances , TypeOperators , FlexibleContexts , MultiParamTypeClasses , FlexibleInstances , TypeFamilies , CPP # ----------------------------------------------------------------------------- -- | -- Module : Data.Monoid.Combinators Copyright : ( c ) 2009 -- License : BSD-style ...
null
https://raw.githubusercontent.com/ekmett/monoids/711963df750ba3417f464fbc0c6c726f3a0c9c8c/Data/Monoid/Combinators.hs
haskell
--------------------------------------------------------------------------- | Module : Data.Monoid.Combinators License : BSD-style Maintainer : Stability : experimental Portability : non-portable (type families, MPTCs) "Data.Foldable", "Control.Monad" or elsewhere. Intended to be imported qual...
# LANGUAGE UndecidableInstances , TypeOperators , FlexibleContexts , MultiParamTypeClasses , FlexibleInstances , TypeFamilies , CPP # Copyright : ( c ) 2009 Utilities for working with Monoids that conflict with names from the " Prelude " , > import Data . Monoid . Combinators as Monoid module Data.Monoid...
4e2ac4f0cbde04ecb0759668c86ad5f1cb2a02cc7dadf58f87c1c77695e31a3e
jeffshrager/biobike
loop-errors.lisp
;;;; -*- mode: Lisp; Syntax: Common-Lisp; Package: bioutils; -*- (in-package :bioutils) ;;; +=========================================================================+ | Copyright ( c ) 2005 JP , , , | ;;; | | ;;; | Permission is her...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Bioutils/loop-errors.lisp
lisp
-*- mode: Lisp; Syntax: Common-Lisp; Package: bioutils; -*- +=========================================================================+ | | | Permission is hereby granted, free of charge, to any person obtaining | | a copy of this software a...
(in-package :bioutils) | Copyright ( c ) 2005 JP , , , | | " Software " ) , to deal in the Software without restriction , including | | distribute , sublicense , and/or sell copies of the Software , and to | | permit persons to whom the Software is furnished to do so , subject to | ...
25f2340029359a0df414ed39a7b34f5974bb7c534c9f5ebf3591539011b70dcd
jeffshrager/biobike
list-extraction-doc.lisp
-*- Package : bbi ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*- (in-package :bbi) ;;; +=========================================================================+ | Copyright ( c ) 2002 , 2003 , 2004 JP , , | ;;; | | ;;; | ...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Doc/bbldf/reduced/list-extraction-doc.lisp
lisp
mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*- +=========================================================================+ | | | Permission is hereby granted, free of charge, to any person obtaining | | a copy of this software and as...
(in-package :bbi) | Copyright ( c ) 2002 , 2003 , 2004 JP , , | | " Software " ) , to deal in the Software without restriction , including | | distribute , sublicense , and/or sell copies of the Software , and to | | permit persons to whom the Software is furnished to do so , subject to ...
febbd3f9430a408a0b332263d81fdf07f96bf8b690a64debe676fd9829c8444a
jarohen/clidget
handler.clj
(ns clidget-sample.handler (:require [ring.util.response :refer [response]] [compojure.core :refer [routes GET]] [compojure.route :refer [resources]] [compojure.handler :refer [api]] [hiccup.page :refer [html5 include-css include-js]] [frodo :refer [repl-con...
null
https://raw.githubusercontent.com/jarohen/clidget/bd67082ad3819908e2d532151417cab436333ad0/clidget-sample/src/clojure/clidget_sample/handler.clj
clojure
(ns clidget-sample.handler (:require [ring.util.response :refer [response]] [compojure.core :refer [routes GET]] [compojure.route :refer [resources]] [compojure.handler :refer [api]] [hiccup.page :refer [html5 include-css include-js]] [frodo :refer [repl-con...
7cf8eaae4659201dcfd10de037fb46be434b9cb11b6af1d8f5a50ea5c0a2a22f
replikativ/datahike
validation_test.cljc
(ns datahike.test.validation-test (:require #?(:cljs [cljs.test :as t :refer-macros [is are deftest]] :clj [clojure.test :as t :refer [is are deftest]]) [datahike.api :as d] [datahike.db :as db] [datahike.test.core-test])) #?(:cljs (def Throwable js/Error)) (deftest test-with-validat...
null
https://raw.githubusercontent.com/replikativ/datahike/3625234370d336aa7e4caa77ec07566d340ca910/test/datahike/test/validation_test.cljc
clojure
todo: how to test incorrect spec now?
(ns datahike.test.validation-test (:require #?(:cljs [cljs.test :as t :refer-macros [is are deftest]] :clj [clojure.test :as t :refer [is are deftest]]) [datahike.api :as d] [datahike.db :as db] [datahike.test.core-test])) #?(:cljs (def Throwable js/Error)) (deftest test-with-validat...
29aeeee3248594f415970449797899ba49d83b96705049281486b9cb548d3607
vonzhou/LearnYouHaskellForGreatGood
Person2.hs
data Person = Person {firstName::String, lastName:: String, age::Int } deriving (Show, Eq, Read) vonzhou = Person {firstName = "von", lastName = "zhou", age = 88} luyna = Person {firstName = "yu", lastName = "nan", age = 33} nuan = Person {firstName = "...
null
https://raw.githubusercontent.com/vonzhou/LearnYouHaskellForGreatGood/439d848deac53ef6da6df433078b7f1dcf54d18d/chapter7/Person2.hs
haskell
data Person = Person {firstName::String, lastName:: String, age::Int } deriving (Show, Eq, Read) vonzhou = Person {firstName = "von", lastName = "zhou", age = 88} luyna = Person {firstName = "yu", lastName = "nan", age = 33} nuan = Person {firstName = "...
770f1b78ad7b537569ac08a0da35e32acc1a7e5edb81a78c6ff9ee7da44ff83b
SKS-Keyserver/sks-keyserver
server.mli
exception Bug of string val solving : float ref val lookup : float ref val flushtime : float ref val unmarsh_time : float ref val solve : remote_size:int -> local_size:int -> remote_samples:ZZp.mut_array -> local_samples:ZZp.mut_array -> points:ZZp.zz array -> (ZZp.Set.t * ZZp.Set.t) option val handle_one : ...
null
https://raw.githubusercontent.com/SKS-Keyserver/sks-keyserver/a4e5267d817cddbdfee13d07a7fb38a9b94b3eee/server.mli
ocaml
exception Bug of string val solving : float ref val lookup : float ref val flushtime : float ref val unmarsh_time : float ref val solve : remote_size:int -> local_size:int -> remote_samples:ZZp.mut_array -> local_samples:ZZp.mut_array -> points:ZZp.zz array -> (ZZp.Set.t * ZZp.Set.t) option val handle_one : ...
095e4ee4508d5e76cca85ee3b62388b90af4e2248032901915f14e7b8b4c21d2
opencog/opencog
loader.scm
;; (load "rules/comp.scm") ;; (load "rules/advmod.scm") (load "rules/adverbialpp.scm") (load "rules/amod.scm") (load "rules/atTime.scm") (load "rules/because.scm") (load "rules/be-inheritance.scm") (load "rules/compmod.scm") ;(load "rules/comp.scm") (load "rules/conj.scm") (load "rules/copula-ynq.scm") (load "rules/dec...
null
https://raw.githubusercontent.com/opencog/opencog/008cdbe7f192fc66b3deadf6400f8edb54533f36/opencog/nlp/relex2logic/loader/loader.scm
scheme
(load "rules/comp.scm") (load "rules/demdet.scm") (load "rules/prepadj.scm") (load "rules/whichobjSVIOQ.scm") (load "rules/whichpobjQ.scm") (load "rules/whichsubjpobjQ.scm") (load "rules/whichsubjQ.scm") (load "rules/whichsubjSVQ.scm")
(load "rules/comp.scm") (load "rules/advmod.scm") (load "rules/adverbialpp.scm") (load "rules/amod.scm") (load "rules/atTime.scm") (load "rules/because.scm") (load "rules/be-inheritance.scm") (load "rules/compmod.scm") (load "rules/conj.scm") (load "rules/copula-ynq.scm") (load "rules/declarative.scm") (load "rules/def...
1d57de4f746fd9284cac143388d61a66a9e56b59f0b3ec67bf1efe10f2cba82d
evertedsphere/shorshe
Reflected.hs
module Shorshe.Syntax.Reflected where import Data.Word import Shorshe.Syntax.Abstract.Name import Shorshe.Syntax.Common import Shorshe.Syntax.Literal -------------------------------------------------------------------------------- -- type Elim = Elim' Term newtype Elim' a = Apply (Arg a) deriving Show -...
null
https://raw.githubusercontent.com/evertedsphere/shorshe/86ef55341f9de1336ea7c1da5723d42c1516f027/src/Shorshe/Syntax/Reflected.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ types or terms, whatever you prefer to call them. ------------------------------...
module Shorshe.Syntax.Reflected where import Data.Word import Shorshe.Syntax.Abstract.Name import Shorshe.Syntax.Common import Shorshe.Syntax.Literal type Elim = Elim' Term newtype Elim' a = Apply (Arg a) deriving Show newtype Abs a = Abs (String, a) data Term = Var Word32 [ Elim ] | Con QName...
057dbff448f160b4039372e66cdada0e8d31b621ecce8350bf90da04102ffbcb
helpshift/kodai
util.clj
(ns kodai.util (:require [clojure.set :as set] [hara.data.nested :as nested])) (defn reverse-graph "takes a call-graph and reverses the visulization of call (def calls {:a #{:b :c :d} :b #{:c} :c #{:a} :d #{}}) (reverse-graph calls) => {:a #{:c}...
null
https://raw.githubusercontent.com/helpshift/kodai/b04961a45039401b6e2eebf8afc0600a19c9f76b/src/kodai/util.clj
clojure
(ns kodai.util (:require [clojure.set :as set] [hara.data.nested :as nested])) (defn reverse-graph "takes a call-graph and reverses the visulization of call (def calls {:a #{:b :c :d} :b #{:c} :c #{:a} :d #{}}) (reverse-graph calls) => {:a #{:c}...
154afb969cbdf82a7bdf7193e14a31d8e9a2b1a8bc595a1e20b85393f6a17f74
ocamllabs/ocaml-effects
bytepackager.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-effects/36008b741adc201bf9b547545344507da603ae31/bytecomp/bytepackager.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 2002 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . " Package " a set of .cmo files into ...
01ba04312a25292ce48d054dace6cb3ad96a2074ef61f613dc41c7c0497cc7b8
NorfairKing/smos
Utils.hs
module Smos.Scheduler.Utils where import Control.Arrow import Control.Monad import qualified Data.ByteString as SB import Data.Yaml as Yaml import Path import Path.IO import Smos.Scheduler.OptParse import UnliftIO.IO.File readScheduleTemplate :: Path Abs File -> IO (Maybe (Either String ScheduleTemplate)) readSchedul...
null
https://raw.githubusercontent.com/NorfairKing/smos/f0d76460eff4c1270fd0ddd5ac6face76f6342b1/smos-scheduler/src/Smos/Scheduler/Utils.hs
haskell
module Smos.Scheduler.Utils where import Control.Arrow import Control.Monad import qualified Data.ByteString as SB import Data.Yaml as Yaml import Path import Path.IO import Smos.Scheduler.OptParse import UnliftIO.IO.File readScheduleTemplate :: Path Abs File -> IO (Maybe (Either String ScheduleTemplate)) readSchedul...
286c7af4703df2ebfb8b718a88496d5687000b43a47c966a25f8a0afa8c02f50
zkincaid/duet
interval.ml
open BatPervasives type t = { lower : QQ.t option; upper : QQ.t option } [@@deriving ord] let pp formatter x = Format.fprintf formatter "[%s, %s]" (match x.lower with | Some lo -> QQ.show lo | None -> "-oo") (match x.upper with | Some hi -> QQ.show hi | None -> "+oo") ...
null
https://raw.githubusercontent.com/zkincaid/duet/162d3da830f12ab8e8d51f7757cddcb49c4084ca/srk/src/interval.ml
ocaml
Is every member of the interval x inside the interval y? todo TODO: this is a coarse abstraction Naive integral lower/upper approximation of log. TODO: make this more accurate. base^exp is monotone
open BatPervasives type t = { lower : QQ.t option; upper : QQ.t option } [@@deriving ord] let pp formatter x = Format.fprintf formatter "[%s, %s]" (match x.lower with | Some lo -> QQ.show lo | None -> "-oo") (match x.upper with | Some hi -> QQ.show hi | None -> "+oo") ...
b9079ec1ea27e1481eea9a29d0f3d41f3df1571c2779b4f03b4726497d0e0357
DaMSL/K3
Representation.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # module Language.K3.Codegen.CPP.Representation ( Stringifiable(..), Name(..), Primitive(..), Type(..), pattern Address, pattern Collection, pattern Byte, pattern SharedPointer, pattern UniquePointer, pattern Unit, pattern Tuple, ...
null
https://raw.githubusercontent.com/DaMSL/K3/51749157844e76ae79dba619116fc5ad9d685643/src/Language/K3/Codegen/CPP/Representation.hs
haskell
# LANGUAGE OverloadedStrings # * Heuristics * Transformations Pretty-Printing Utility Functions Heuristics Transformations
# LANGUAGE PatternSynonyms # module Language.K3.Codegen.CPP.Representation ( Stringifiable(..), Name(..), Primitive(..), Type(..), pattern Address, pattern Collection, pattern Byte, pattern SharedPointer, pattern UniquePointer, pattern Unit, pattern Tuple, pattern Void, pattern Box, Lit...
30142da322cb6092c4f9bebf596fa535b6e36793612570830dc63a6ac69fd299
khigia/eocarve
cmdline_resizer.ml
* seamcarve , content - aware image resizing using seam carving * Copyright ( C ) 2007 < > * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation ; either * version 2.1...
null
https://raw.githubusercontent.com/khigia/eocarve/8a5f65b8175b27bfc0d792719485b5d31b72760a/seamcarve/_darcs/pristine/cmdline_resizer.ml
ocaml
* seamcarve , content - aware image resizing using seam carving * Copyright ( C ) 2007 < > * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation ; either * version 2.1...
bafcb6a2df8bb6cbda8557fd8dac46a7e904116357a1fb568d7bb154b07dbbac
skeuchel/needle
WellFormedStrengthen.hs
{-# LANGUAGE GADTs #-} module KnotCore.Elaboration.Lemma.WellFormedStrengthen where import Control.Applicative import Control.Monad import Data.List (intersect, nub) import Data.Maybe (catMaybes) import Coq.Syntax import Coq.StdLib import KnotCore.Syntax import KnotCore.Elaboration.Core lemmas :: Elab m => m [Sente...
null
https://raw.githubusercontent.com/skeuchel/needle/25f46005d37571c1585805487a47950dcd588269/src/KnotCore/Elaboration/Lemma/WellFormedStrengthen.hs
haskell
# LANGUAGE GADTs #
module KnotCore.Elaboration.Lemma.WellFormedStrengthen where import Control.Applicative import Control.Monad import Data.List (intersect, nub) import Data.Maybe (catMaybes) import Coq.Syntax import Coq.StdLib import KnotCore.Syntax import KnotCore.Elaboration.Core lemmas :: Elab m => m [Sentence] lemmas = do stns...
ce447db277ce20258526b8b672b93ba9f2ee7031f69709453625a63dfad49f26
ananthakumaran/eopl
11.clj
Add the begin expression of exercise 4.4 to the continuation- ;; passing interpreter. Be sure that no call to value-of or ;; value-of-rands occurs in a position that would build control ;; context. ;; see eopl.core.letrec-cont-lang
null
https://raw.githubusercontent.com/ananthakumaran/eopl/876d6c2e44865e2c89a05a683d99a289c71f1487/src/eopl/chap_5/11.clj
clojure
passing interpreter. Be sure that no call to value-of or value-of-rands occurs in a position that would build control context. see eopl.core.letrec-cont-lang
Add the begin expression of exercise 4.4 to the continuation-
6d9a4ad0a2ed616f7b8300231fa56056ecb2935b7976d828ace92f8f77d817f8
tezos/tezos-mirror
monitor_services.mli
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2023 Marigold < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/cc9b2080397f902664aa9975838173dfa81cb5c5/src/lib_dac_node/monitor_services.mli
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2023 Marigold < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER I...
278ce48a0b4e0a924d9f9b555dfc319c1bb48a7b84952349d66bed7bd682265e
ekmett/ekmett.github.com
Maybe.hs
module Control.Monad.Ran.Maybe ( Maybe'(Maybe',getMaybe') , runMaybe' ) where import Control.Applicative import Control.Monad newtype Maybe' a = Maybe' { getMaybe' :: forall o. (a -> o) -> o -> o } runMaybe' :: Maybe' a -> (a -> b) -> b -> b runMaybe' = getMaybe' instance Functor Maybe' where fmap ...
null
https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/monad-ran-old/_darcs/pristine/src/Control/Monad/Ran/Maybe.hs
haskell
module Control.Monad.Ran.Maybe ( Maybe'(Maybe',getMaybe') , runMaybe' ) where import Control.Applicative import Control.Monad newtype Maybe' a = Maybe' { getMaybe' :: forall o. (a -> o) -> o -> o } runMaybe' :: Maybe' a -> (a -> b) -> b -> b runMaybe' = getMaybe' instance Functor Maybe' where fmap ...
0c436181b44ef303d51755bbde2f20fcd43564506a5e3473b3b87536b6bff46a
dimitri-xyz/haskell-coinbase-pro
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Monad import qualified Data.ByteString.Char8 as CBS import Network.HTTP.Client.TLS import Network.HTTP.Conduit import System.Environment import Test.Tasty import Coinbase.Exchan...
null
https://raw.githubusercontent.com/dimitri-xyz/haskell-coinbase-pro/642a8282ac9f378a6dc0e88535bb50c44bcae091/test/Main.hs
haskell
# LANGUAGE OverloadedStrings # TODO: Make this a list of all products
module Main where import Control.Monad import qualified Data.ByteString.Char8 as CBS import Network.HTTP.Client.TLS import Network.HTTP.Conduit import System.Environment import Test.Tasty import Coinbase.Exchange.Types import Coinbase....
c1c001a86513510212987ffa9a2c7f674ed69a9d41878e7f4e416108c1f58950
marick/specter-book-code
continuation_passing.clj
(ns exercises.ch1.continuation-passing (:use midje.sweet commons.clojure.core)) (defprotocol Navigator (select* [this structure continuation])) (extend-type clojure.lang.Keyword Navigator (select* [this structure continuation] (continuation (get structure this)))) (extend-type clojure.lang.AFn Navigato...
null
https://raw.githubusercontent.com/marick/specter-book-code/e416d4ce8164084057d36d29d89b17d114d1ab28/src/exercises/ch1/continuation_passing.clj
clojure
(ns exercises.ch1.continuation-passing (:use midje.sweet commons.clojure.core)) (defprotocol Navigator (select* [this structure continuation])) (extend-type clojure.lang.Keyword Navigator (select* [this structure continuation] (continuation (get structure this)))) (extend-type clojure.lang.AFn Navigato...
cc1e38b614c56f575cf25aa00af2a9e0e700dec9988ab5b7e97f568ee2b8a379
xapi-project/xen-api
storage_locks.ml
* Copyright ( C ) 2011 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in fi...
null
https://raw.githubusercontent.com/xapi-project/xen-api/6c2aadbb44166b389a3bd956c8a6af5787003d68/ocaml/xapi/storage_locks.ml
ocaml
* A table of 'instance' locks with a single master lock Acquire this to prevent other locks being held * Execute the function with the specified instance locked Wait for the lock to be free (ie the table entry to be removed and the master lock to be released * Execute the function with the master_lock held and no...
* Copyright ( C ) 2011 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in fi...
878e8d01fba529bc271991e92fd29929039aecc9de1c35483b3d560862d5b086
realworldocaml/book
menhir_rules.mli
* Menhir rules open Import (** Return the list of modules that are generated by this stanza. *) val module_names : Dune_file.Menhir.t -> Module_name.t list * Generate the rules for a [ ( menhir ... ) ] stanza . val gen_rules : dir:Path.Build.t -> Compilation_context.t -> Dune_file.Menhir.t -> unit Memo.t
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_rules/menhir_rules.mli
ocaml
* Return the list of modules that are generated by this stanza.
* Menhir rules open Import val module_names : Dune_file.Menhir.t -> Module_name.t list * Generate the rules for a [ ( menhir ... ) ] stanza . val gen_rules : dir:Path.Build.t -> Compilation_context.t -> Dune_file.Menhir.t -> unit Memo.t
f3d8bbbfb6ffd06cd58c36a9d04eb48ec769d0904f65852c0d9338ac270b13d2
ha-mo-we/Racer
repository.lisp
-*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : THEMATIC - SUBSTRATE ; Base : 10 -*- Copyright ( c ) 1998 - 2014 , , , . ;;; All rights reserved. Racer is distributed under the following BSD 3 - clause license ;;; Redistribution and use in source and binary forms, with or without ;;; modi...
null
https://raw.githubusercontent.com/ha-mo-we/Racer/d690841d10015c7a75b1ded393fcf0a33092c4de/source/repository.lisp
lisp
Syntax : Ansi - Common - Lisp ; Package : THEMATIC - SUBSTRATE ; Base : 10 -*- All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, ...
Copyright ( c ) 1998 - 2014 , , , . Racer is distributed under the following BSD 3 - clause license Neither the name Racer nor the names of its contributors may be used CONTRIBUTORS " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , VOLKER HAARSLEV , RALF MOELLER , NOR FOR ANY ...
be5ff01b042a1a20572c71534258487abaa335fc283c439c3126d744cb17e9cb
facebookincubator/hsthrift
Base64.hs
Copyright ( c ) Facebook , Inc. and its affiliates . module Thrift.Protocol.JSON.Base64 ( encodeBase64 , encodeBase64Text , decodeBase64 ) where import Data.Bits import Data.ByteString.Builder import Data.ByteString.Builder.Prim as Prim import Data.ByteString.Internal import Data.ByteString.Lazy (toStrict) ...
null
https://raw.githubusercontent.com/facebookincubator/hsthrift/d3ff75d487e9d0c2904d18327373b603456e7a01/lib/Thrift/Protocol/JSON/Base64.hs
haskell
Copyright ( c ) Facebook , Inc. and its affiliates . module Thrift.Protocol.JSON.Base64 ( encodeBase64 , encodeBase64Text , decodeBase64 ) where import Data.Bits import Data.ByteString.Builder import Data.ByteString.Builder.Prim as Prim import Data.ByteString.Internal import Data.ByteString.Lazy (toStrict) ...
1eb0ee35e56b88ecbdd632fde6094e812eff4a672526d9f0783eabe9f0ffb77a
fortytools/holumbus
Threading.hs
-- ---------------------------------------------------------------------------- | Module : Holumbus . Common . Threading Copyright : Copyright ( C ) 2008 License : MIT Maintainer : ( ) Stability : experimental Portability : portable Version : 0.1 Operations to ...
null
https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/distribution/source/Holumbus/Common/Threading.hs
haskell
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- | Excep...
| Module : Holumbus . Common . Threading Copyright : Copyright ( C ) 2008 License : MIT Maintainer : ( ) Stability : experimental Portability : portable Version : 0.1 Operations to start and stop threads which will not be killed when a regular exception occ...
2be87660eab2c553d8f157f406e681fae1a68b64a7b3c2cd37f741a07f077f71
AmpersandTarski/Ampersand
ConceptStructure.hs
# LANGUAGE FlexibleInstances # module Ampersand.Classes.ConceptStructure (ConceptStructure (..)) where import Ampersand.ADL1 import Ampersand.Basics hiding (Ordering (..)) import Ampersand.Classes.ViewPoint import qualified RIO.NonEmpty as NE import qualified RIO.Set as Set class ConceptStructure a where concs :: ...
null
https://raw.githubusercontent.com/AmpersandTarski/Ampersand/cb2306a09ce79d5609ccf8d3e28c0a1eb45feafe/src/Ampersand/Classes/ConceptStructure.hs
haskell
| the set of all concepts used in data structure a | The set of all expressions within data structure a | the set of all declaratons used within data structure a. `used within` means that there is a relation that refers to that relation. | the set of expressions of which population could be modified directy by Inse...
# LANGUAGE FlexibleInstances # module Ampersand.Classes.ConceptStructure (ConceptStructure (..)) where import Ampersand.ADL1 import Ampersand.Basics hiding (Ordering (..)) import Ampersand.Classes.ViewPoint import qualified RIO.NonEmpty as NE import qualified RIO.Set as Set class ConceptStructure a where concs :: ...
e0251db008526dccfff3c18d2ed3728fab0248c71378ec11bc0d50fdfa533e77
15Galan/asignatura-204
HeapSort.hs
------------------------------------------------------------------------------- -- Heap Sort Algorithm -- Data Structures . en Informática . UMA . , 2012 ------------------------------------------------------------------------------- module DataStructures.Heap.HeapSort(heapSort) where import DataStructures.Hea...
null
https://raw.githubusercontent.com/15Galan/asignatura-204/894f33ff8e0f52a75d8f9ff15155c656f1a8f771/Recursos/data.structures/haskell/DataStructures/Heap/HeapSort.hs
haskell
----------------------------------------------------------------------------- Heap Sort Algorithm ----------------------------------------------------------------------------- Test for correctness
Data Structures . en Informática . UMA . , 2012 module DataStructures.Heap.HeapSort(heapSort) where import DataStructures.Heap.WBLeftistHeap import Data.List import Test.QuickCheck heapSort :: (Ord a) => [a] -> [a] heapSort = heapToList . mkHeap heapToList :: (Ord a) => Heap a -> [a] heapToList h | isEmpty ...
fb0c28968a101a825c7be1047c9665c3e002192da941b672f22ac318772a8833
TeMPOraL/alice
notifications.lisp
(in-package #:alice) (defparameter *user-notification-medium* (make-hash-table :test 'equalp)) (defvar *memos* (make-hash-table :test 'equalp) "List of memos, i.e. notifications to be delivered on IRC.") (defvar *delayed-notifications* '() "List for delayed notifications, to be checked every now and then.") (defvar ...
null
https://raw.githubusercontent.com/TeMPOraL/alice/4621a53ccd459bebf0b34c531dab49f7b42f35c7/grimoire/notifications.lisp
lisp
:type string NOTE in the future, this will be some sort of weak reference to an user object. :type local-time:timestamp Fix strings of invalid specific type that interfere with serialization also probably failure of cl - marshal to serialize type ( VECTOR CHARACTER n ) is a bug in cl - marshal itself . cf. -marsha...
(in-package #:alice) (defparameter *user-notification-medium* (make-hash-table :test 'equalp)) (defvar *memos* (make-hash-table :test 'equalp) "List of memos, i.e. notifications to be delivered on IRC.") (defvar *delayed-notifications* '() "List for delayed notifications, to be checked every now and then.") (defvar ...
5393b4e0fecc0ec2e5866a46f49bae656a35552286466cb00fc3777838286b94
tmattio/js-bindings
node_punycode.mli
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]] open Es2020 module Punycode : sig val decode : string:string -> string [@@js.global "decode"] val encode : string:string -> string [@@js.global "encode"] val to_unicode : domain:string -> string [@@js.global "toUnicode"] ...
null
https://raw.githubusercontent.com/tmattio/js-bindings/f1d36bba378e4ecd5310542a0244dce9258b6496/lib/node/node_punycode.mli
ocaml
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]] open Es2020 module Punycode : sig val decode : string:string -> string [@@js.global "decode"] val encode : string:string -> string [@@js.global "encode"] val to_unicode : domain:string -> string [@@js.global "toUnicode"] ...
9d22de5c7a08a5f29a90df14a39c4c70dfa7fd583213850d63c5f178bfabf687
cpeikert/Lol
BenchAppsCPPMain.hs
| Module : BenchAppsCPPMain Description : Main driver for lol - apps benchmarks with CPP . Copyright : ( c ) , 2011 - 2017 , 2011 - 2017 License : GPL-3 Maintainer : Stability : experimental Portability : POSIX Main driver for lol - apps benchmarks with CPP ....
null
https://raw.githubusercontent.com/cpeikert/Lol/4416ac4f03b0bff08cb1115c72a45eed1fa48ec3/lol-cpp/benchmarks/BenchAppsCPPMain.hs
haskell
# LANGUAGE DataKinds #
| Module : BenchAppsCPPMain Description : Main driver for lol - apps benchmarks with CPP . Copyright : ( c ) , 2011 - 2017 , 2011 - 2017 License : GPL-3 Maintainer : Stability : experimental Portability : POSIX Main driver for lol - apps benchmarks with CPP ....
aa3f1f5079d97a784e76efdb63eb2567f2ebe46a4ec3f4c1fef2a199aedbb98d
bbss/cljsc2
resolution.cljs
(ns cljsc2.cljs.ui.resolution (:require [cljsc2.cljs.material_ui :refer [ui-button ui-paper]] [cljsc2.cljs.ui.fulcro :refer [input-with-label]] [cljsc2.cljs.ui.player_setup :refer [ui-player-setup PlayerSetup]] [fulcro.client.primitives :as prim :refer [defsc]] [fulcro....
null
https://raw.githubusercontent.com/bbss/cljsc2/70e720f5bae9b58248df86f3f50d855878ae4f49/src/cljsc2/cljs/ui/resolution.cljs
clojure
(ns cljsc2.cljs.ui.resolution (:require [cljsc2.cljs.material_ui :refer [ui-button ui-paper]] [cljsc2.cljs.ui.fulcro :refer [input-with-label]] [cljsc2.cljs.ui.player_setup :refer [ui-player-setup PlayerSetup]] [fulcro.client.primitives :as prim :refer [defsc]] [fulcro....
fc956fde6419f003fc46ffceaa9587158e6cb9965bf0794143b06817c8dedd69
SKA-ScienceDataProcessor/RC
Spawn.hs
# LANGUAGE BangPatterns # # LANGUAGE FlexibleContexts # {-# LANGUAGE TemplateHaskell #-} -- | Code for starting remote actors module DNA.Interpreter.Spawn ( -- * Spawning actors execSpawnActor , execSpawnCollector , execSpawnGroup -- , execSpawnGroupN , e...
null
https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS3/lib/DNA/Interpreter/Spawn.hs
haskell
# LANGUAGE TemplateHaskell # | Code for starting remote actors * Spawning actors , execSpawnGroupN , execSpawnCollectorGroupMR , execSpawnMappers * Workers import DNA.CH -------------------------------------------------------------- Functions for spawning actors --------------------------------------...
# LANGUAGE BangPatterns # # LANGUAGE FlexibleContexts # module DNA.Interpreter.Spawn ( execSpawnActor , execSpawnCollector , execSpawnGroup , execSpawnCollectorGroup , spawnSingleActor ) where import Control.Applicative import Control.Concurrent (threadDelay) import...
5d2a220e2b5baccbdf55c2a4905a35db8d2d30a32ab898b7d7df9eded59687f1
dpiponi/Moodler
test_demo1.hs
do restart root <- getRoot let out = "out" audio_id0 <- new' "audio_id" audio_id1 <- new' "audio_id" audio_id10 <- new' "audio_id" audio_id11 <- new' "audio_id" audio_id12 <- new' "audio_id" audio_id13 <- new' "audio_id" audio_id14 <- new' "audio_id" audio_id15 <- new' "audio...
null
https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/saves/test_demo1.hs
haskell
do restart root <- getRoot let out = "out" audio_id0 <- new' "audio_id" audio_id1 <- new' "audio_id" audio_id10 <- new' "audio_id" audio_id11 <- new' "audio_id" audio_id12 <- new' "audio_id" audio_id13 <- new' "audio_id" audio_id14 <- new' "audio_id" audio_id15 <- new' "audio...
1be8186cd198b0b500dfe89435c13610c37a816c11610a1a4a215b1062fb79ad
joyofclojure/book-source
units.clj
(ns joy.units) (defn convert [context descriptor] (reduce (fn [result [mag unit]] (+ result (let [val (get context unit)] (if (vector? val) (* mag (convert context val)) (* mag val))))) 0 (partition 2 descriptor))) ...
null
https://raw.githubusercontent.com/joyofclojure/book-source/b76ef15248dac88c7b1c77c2d461f3aa522a1461/src/clj/joy/units.clj
clojure
#: Create the units map #: Define the unit-of macro #: Multiply magnitude by target unit #: Unroll the unit conversions into a case look-up Runtime.... => #uuid "dae78a90-d491-11e2-8b8b-0800200c9a66" => java.util.UUID java.lang.RuntimeException: No reader function for tag unit/time => [what/the :huh?]
(ns joy.units) (defn convert [context descriptor] (reduce (fn [result [mag unit]] (+ result (let [val (get context unit)] (if (vector? val) (* mag (convert context val)) (* mag val))))) 0 (partition 2 descriptor))) ...
62dff4dfccf3518f3620e592b82b82c7f18c30901cd817d5bde0686b634b563c
sunng87/cljts
transform.clj
(ns cljts.test.transform (:use midje.sweet cljts.transform [cljts.geom :only [c point]])) (fact (let [rotation (transformation [(c 0 0) (c 1 0) (c 0 1) (c 0 0) (c 0 1) (c -1 0)])] (rotation (c 0 0)) => (c 0 0) (rotation (c 1 0)) => (c 0 1) (rotation (c 0...
null
https://raw.githubusercontent.com/sunng87/cljts/b4360aa79fe8cad278bb5bc552f487832a4908b9/test/cljts/test/transform.clj
clojure
(ns cljts.test.transform (:use midje.sweet cljts.transform [cljts.geom :only [c point]])) (fact (let [rotation (transformation [(c 0 0) (c 1 0) (c 0 1) (c 0 0) (c 0 1) (c -1 0)])] (rotation (c 0 0)) => (c 0 0) (rotation (c 1 0)) => (c 0 1) (rotation (c 0...
42690d2a8cfd56be4560b8b38947d8dba46c54023adef9ba78ffe86dfe9ed190
ozusrl/SubtypedQuotedML
types.ml
open Common (* misc. --{{{-------------------------------------------------------------- *) let rec unique = function | [] -> [] | x :: xr -> if List.mem x xr then unique xr else x :: unique xr module IdSet = Set.Make(struct let compare = Pervasives.compare type t = string end) (* ---}}}-------------------...
null
https://raw.githubusercontent.com/ozusrl/SubtypedQuotedML/7b09eb5518dea21fda3dc9db3b966a17225d91ff/src/staged/types.ml
ocaml
misc. --{{{-------------------------------------------------------------- ---}}}-------------------------------------------------------------------- language of types --{{{---------------------------------------------------- TODO: maybe we should rename it with `tyscm` ---}}}-----------------------------------...
open Common let rec unique = function | [] -> [] | x :: xr -> if List.mem x xr then unique xr else x :: unique xr module IdSet = Set.Make(struct let compare = Pervasives.compare type t = string end) type ty = | TInt | TBool | TUnit | TPair of ty * ty | TList of ty | TRef of ty | TFun of ty * ty...
dbac51fc980ee92c5b967db9046da120da86904b3e0b48c46b05027cfe0772b7
Frama-C/Frama-C-snapshot
services.mli
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/callgraph/services.mli
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
5fe575656576f592c4915df25497f43aef1c883b73629138c23f7f2105de1f24
mgritter/aoc-lh
Main.hs
{-@ LIQUID "--max-case-expand=4" @-} module Main (main) where import System.Environment import Data.Maybe (mapMaybe) import Control.Monad data RPS = Rock | Paper | Scissors data Strategy = Lose | Draw | Win data Game = FirstWin | SecondWin | Tie beatsM X = Y means " X beats Y " @ measure @ @...
null
https://raw.githubusercontent.com/mgritter/aoc-lh/644587fd2cd47265d180ae251bc3b5deca2aa933/2022/day2/Main.hs
haskell
@ LIQUID "--max-case-expand=4" @ @ measure scoreForGame @ @ measure scoreForMove @ " Suddenly , the Elf is called away to help with someone 's tent . @ die :: {v:_ | false} -> a @ Why doesn't the specification help? I think it was because --max-case-expand was not set yet parseMove _ = die "Unexpected input"
module Main (main) where import System.Environment import Data.Maybe (mapMaybe) import Control.Monad data RPS = Rock | Paper | Scissors data Strategy = Lose | Draw | Win data Game = FirstWin | SecondWin | Tie beatsM X = Y means " X beats Y " @ measure @ @ beatsM : : RPS - > RPS @ beatsM :: R...
ad6c549afa9ebb35ef1b823d2d3df8fc0cba5aeafcf55b26dc6192bef31e6b8e
jeffshrager/biobike
arithmetic-trigonometric-doc.lisp
-*- Package : bbi ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*- (in-package :bbi) ;;; +=========================================================================+ | Copyright ( c ) 2002 , 2003 , 2004 JP , , | ;;; | | ;;; | ...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Doc/bbldf/reduced/arithmetic-trigonometric-doc.lisp
lisp
mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*- +=========================================================================+ | | | Permission is hereby granted, free of charge, to any person obtaining | | a copy of this software and as...
(in-package :bbi) | Copyright ( c ) 2002 , 2003 , 2004 JP , , | | " Software " ) , to deal in the Software without restriction , including | | distribute , sublicense , and/or sell copies of the Software , and to | | permit persons to whom the Software is furnished to do so , subject to ...
0d8481e0e49572da736987d2af9ec01a81b5640b604765cced680ddaa9587a8e
arcfide/chez-srfi
ilists.sps
Copyright © 2015 Copyright © 2017 Copyright © 2020 SPDX - License - Identifier : MIT #!r6rs Tests for SRFI 116 (import (rnrs) (srfi :116 ilists) (srfi :64 testing)) (define (pk . args) (write args)(newline) (car (reverse args))) (test-begin "ilists") (define abc (ilist 'a 'b 'c)) (define ch...
null
https://raw.githubusercontent.com/arcfide/chez-srfi/96fb553b6ba0834747d5ccfc08c181aa8fd5f612/tests/ilists.sps
scheme
We have to be careful to test both single-list and multiple-list code paths, as they are different in this implementation.
Copyright © 2015 Copyright © 2017 Copyright © 2020 SPDX - License - Identifier : MIT #!r6rs Tests for SRFI 116 (import (rnrs) (srfi :116 ilists) (srfi :64 testing)) (define (pk . args) (write args)(newline) (car (reverse args))) (test-begin "ilists") (define abc (ilist 'a 'b 'c)) (define ch...
871daca7c4cce76ff2b82dc52365e2bb16770d7d8a077ffba1f3362d30eb7296
reanimate/reanimate
doc_slideDownT.hs
#!/usr/bin/env stack -- stack runghc --package reanimate module Main(main) where import Reanimate import Reanimate.Builtin.Documentation import Reanimate.Builtin.Slide import Reanimate.Transition main :: IO () main = reanimate $ docEnv $ pauseAtEnd 1 $ signalT (curveS 2) slideDownT left right where left = drawC...
null
https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/doc_slideDownT.hs
haskell
stack runghc --package reanimate
#!/usr/bin/env stack module Main(main) where import Reanimate import Reanimate.Builtin.Documentation import Reanimate.Builtin.Slide import Reanimate.Transition main :: IO () main = reanimate $ docEnv $ pauseAtEnd 1 $ signalT (curveS 2) slideDownT left right where left = drawCircle right = staticFrame 1 (mkB...
6621c06fef1b9c33166e9e97fd4f3137740bdd1e72eef3bc27f4c8700e6004d5
fpco/ide-backend
CopyFile.hs
{-# OPTIONS -cpp #-} OPTIONS required for ghc-6.4.x compat , and must appear first # LANGUAGE CPP # # OPTIONS_GHC -cpp # # OPTIONS_NHC98 -cpp # # OPTIONS_JHC -fcpp # -- #hide module Distribution.Compat.CopyFile ( copyFile, copyOrdinaryFile, copyExecutableFile, setFileOrdinary, setFileExecutable, setDirOrd...
null
https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/inputs/Cabal-1.14.0/Distribution/Compat/CopyFile.hs
haskell
# OPTIONS -cpp # #hide file perms -rw-r--r-- file perms -rwxr-xr-x
OPTIONS required for ghc-6.4.x compat , and must appear first # LANGUAGE CPP # # OPTIONS_GHC -cpp # # OPTIONS_NHC98 -cpp # # OPTIONS_JHC -fcpp # module Distribution.Compat.CopyFile ( copyFile, copyOrdinaryFile, copyExecutableFile, setFileOrdinary, setFileExecutable, setDirOrdinary, ) where #ifdef __GLA...
4e0b65f834cc34e9d17beca874ab576f6da461951548d603e2e724cd78c390fb
HuwCampbell/orc-haskell
Logical.hs
# LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module Orc.Table.Logical ( Row (..) -- * Projection functions , takeString , takeChar , takeVarChar , takeBinary , takeBool , takeByte , takeShort , takeInteger , takeLong , takeDate , takeFlo...
null
https://raw.githubusercontent.com/HuwCampbell/orc-haskell/259649bc5fa5c6d8bd850fdad0517af6c028e00e/src/Orc/Table/Logical.hs
haskell
# LANGUAGE OverloadedStrings # * Projection functions Composite Columns Primitive Columns For partial columns.
# LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # module Orc.Table.Logical ( Row (..) , takeString , takeChar , takeVarChar , takeBinary , takeBool , takeByte , takeShort , takeInteger , takeLong , takeDate , takeFloat , takeDouble , takeAnonymousStruct , takeStruct , ta...
e7d57a976452a59828d8e79dd22e9aaef0967dac4c028c01de7e6683fd1a49ae
garrigue/lablgtk
pixview.ml
(**************************************************************************) Lablgtk - Examples (* *) (* This code is in the public domain. *) (* You may f...
null
https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/examples/pixview.ml
ocaml
************************************************************************ This code is in the public domain. You may freely copy parts of it in your application. ...
Lablgtk - Examples $ Id$ let pb = if Array.length Sys.argv < 2 then begin Printf.eprintf "usage : %s <file>\n" Sys.argv.(0); exit 2; end; try GdkPixbuf.from_file Sys.argv.(1) with GdkPixbuf.GdkPixbufError(_,msg) as exn -> let d = GWindow.me...
32f378bdc656f786f398f3b3c0d5bcda8abe1a3645b7190c740736261507273b
weavejester/re-rand
rules.clj
Copyright ( c ) . All rights reserved . The use and distribution terms for this software are covered by the Eclipse ;; Public License 1.0 (-1.0.php) which ;; can be found in the file epl-v10.html at the root of this distribution. By ;; using this software in any fashion, you are agreeing to be bound by the ;; ter...
null
https://raw.githubusercontent.com/weavejester/re-rand/40a3f0e4f362627d85de386feba834a85e80c979/src/re_rand/parser/rules.clj
clojure
Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. re-rand.parser.rules: Rules to parse a ...
Copyright ( c ) . All rights reserved . The use and distribution terms for this software are covered by the Eclipse (ns re-rand.parser.rules (:use re-rand.parser.tools) (:use [clojure.set :only (difference)])) (defn rnd-choice [coll] (let [v (vec coll)] (v (rand-int (count v))))) (defn take-fn [...
25750bbf888efa24fb980c8f5be63ae9ec4e52295dd5adb15a43073aa3e9c7b3
purcell/adventofcode2016
Day18.hs
module Main where import AdventOfCode import Data.List (tails) data Tile = Safe | Trap deriving (Eq) next :: [Tile] -> [Tile] next tiles = fmap tripleToNext . take (length tiles) . fmap (take 3) . tails . cycle . (Safe :) $ tiles where tripleToNext :: [Tile] -> Tile tripleToNext [Trap, Trap, Sa...
null
https://raw.githubusercontent.com/purcell/adventofcode2016/081f30de4ea6b939e6c3736d83836f4dd72ab9a2/src/Day18.hs
haskell
module Main where import AdventOfCode import Data.List (tails) data Tile = Safe | Trap deriving (Eq) next :: [Tile] -> [Tile] next tiles = fmap tripleToNext . take (length tiles) . fmap (take 3) . tails . cycle . (Safe :) $ tiles where tripleToNext :: [Tile] -> Tile tripleToNext [Trap, Trap, Sa...
dd4a0fdbe451c5174b152fbb9b91720bae27fdcdd8dd805dbdae919a899bee74
cyga/real-world-haskell
toupper-impch20.hs
file : ch19 / toupper - impch20.hs import System.IO import System.IO.Error import Data.Char(toUpper) main :: IO () main = do inh <- openFile "input.txt" ReadMode outh <- openFile "output.txt" WriteMode mainloop inh outh hClose inh hClose outh mainloop :: Handle -> Handle -> IO ()...
null
https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch19/toupper-impch20.hs
haskell
file : ch19 / toupper - impch20.hs import System.IO import System.IO.Error import Data.Char(toUpper) main :: IO () main = do inh <- openFile "input.txt" ReadMode outh <- openFile "output.txt" WriteMode mainloop inh outh hClose inh hClose outh mainloop :: Handle -> Handle -> IO ()...
3d89a4e9ba8ac24e55e3cdef48a672aa3adbfdf16e6be7d9a3ff6a06986a3a40
coalton-lang/coalton
ast.lisp
(defpackage #:coalton-impl/codegen/ast (:use #:cl #:coalton-impl/util) (:local-nicknames (#:tc #:coalton-impl/typechecker)) (:import-from #:coalton-impl/ast #:pattern) (:import-from #:coalton-impl/algorithm #:tarjan-scc) (:export #:node ; STRUCT ACCESSOR...
null
https://raw.githubusercontent.com/coalton-lang/coalton/a8d779e824bb362c01d3218cfbb3394f9858850f/src/codegen/ast.lisp
lisp
STRUCT TYPE TYPE STRUCT STRUCT FUNCTION STRUCT FUNCTION STRUCT FUNCTION STRUCT FUNCTION STRUCT STRUCT FUNCTION STRUCT ACCESOR ACCESOR STRUCT TYPE STRUCT STRUCT STRUCT STRUCT FUNCTION STRUCT STRUCT ACCESOR FUNCTION FUNCTION FUNCTION FUNCTION FUNCTION FUNCTION FUNCTION Functions ...
(defpackage #:coalton-impl/codegen/ast (:use #:cl #:coalton-impl/util) (:local-nicknames (#:tc #:coalton-impl/typechecker)) (:import-from #:coalton-impl/ast #:pattern) (:import-from #:coalton-impl/algorithm #:tarjan-scc) (:export ACCESSOR CONSTRUCTOR ACCESSOR CONSTRUCTOR ACCESSO...
a2c04a59a50711acb77d07d7e0d048114f5cfbfde04744ce7c086829347bb540
cj1128/sicp-review
2.58-a.scm
2.58 a Assume that + and * always take two arguments and the expressions are fully ; parenthesized. (load "sd-basic.scm") (define (sum? x) (and (pair? x) (eq? '+ (cadr x)))) (define (make-sum a1 a2) (cond ((=number? a1 0) a2) ((=number? a2 0) a1) ((and (number? a1) (number? ...
null
https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-2/2.3/2.58-a.scm
scheme
parenthesized.
2.58 a Assume that + and * always take two arguments and the expressions are fully (load "sd-basic.scm") (define (sum? x) (and (pair? x) (eq? '+ (cadr x)))) (define (make-sum a1 a2) (cond ((=number? a1 0) a2) ((=number? a2 0) a1) ((and (number? a1) (number? a2)) (+ a1 a...
1053bb703c32f171edf0298294c930a8a89a3e72df062c681ea0de9b769a141c
michalkonecny/aern2
CIDR.hs
# LANGUAGE PartialTypeSignatures # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - partial - type - signatures # # LANGUAGE CPP # -- #define DEBUG | Experimenting with programming in CIDR shallow embedding in Haskell / AERN2 . CIDR is an experimental core language for exact real computation brie...
null
https://raw.githubusercontent.com/michalkonecny/aern2/ac9beb0ec333709b9d33317df5c9e8876d253db2/aern2-real/attic/CIDR.hs
haskell
#define DEBUG ------------------------------------------------ ------------------------------------------------ ---------------------------------------------------- example: sqrt via limit using various strategies ---------------------------------------------------- | A n-times nested sqrt: Cauchy reals are slow he...
# LANGUAGE PartialTypeSignatures # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - partial - type - signatures # # LANGUAGE CPP # | Experimenting with programming in CIDR shallow embedding in Haskell / AERN2 . CIDR is an experimental core language for exact real computation briefly developed wit...
a0c62c1b775a1beb592ac756a1b0276bad856e4d10a01c0db2894e6f87989772
McCLIM/McCLIM
regions.lisp
;;; --------------------------------------------------------------------------- ;;; License: LGPL-2.1+ (See file 'Copyright' for details). ;;; --------------------------------------------------------------------------- ;;; ( c ) copyright 1998 - 2002 < > ( c ) copyright 2001 > ( c ) copyright 2001 ...
null
https://raw.githubusercontent.com/McCLIM/McCLIM/d49fef5c2bb1307a006cdadfc4061e0a6b0fff79/Core/geometry/regions.lisp
lisp
--------------------------------------------------------------------------- License: LGPL-2.1+ (See file 'Copyright' for details). --------------------------------------------------------------------------- ---------------------------------------------------------------------------- Class and protocol impleme...
( c ) copyright 1998 - 2002 < > ( c ) copyright 2001 > ( c ) copyright 2001 ( c ) copyright 2002 - 2004 < > ( c ) copyright 2002 ( c ) copyright 2004 - 2009 < > ( c ) copyright 2006 - 2008 < > ( c ) copyright 2014 - 2016 < > ( c ) copyright 2017 < > ( c ) copyright...