_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
c59a5fdfc2b582593c33afe9cc3b1ad681d62de041ddc435591aed835a366ee0
elastic/eui-cljs
eui_timeline_styles.cljs
(ns eui.eui-timeline-styles (:require ["@elastic/eui/lib/components/timeline/timeline.styles.js" :as eui])) (def euiTimelineStyles eui/euiTimelineStyles)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/eui_timeline_styles.cljs
clojure
(ns eui.eui-timeline-styles (:require ["@elastic/eui/lib/components/timeline/timeline.styles.js" :as eui])) (def euiTimelineStyles eui/euiTimelineStyles)
77d8cf9545792ed0b5a3e66c08c2c0eefb11979f6a48d6a3c5042af6f4aa8612
anoma/juvix
Arity.hs
module Commands.Dev.Internal.Arity where import Commands.Base import Commands.Dev.Internal.Arity.Options import Juvix.Compiler.Internal.Pretty qualified as Internal import Juvix.Compiler.Internal.Translation.FromInternal.Analysis.ArityChecking.Data.Context qualified as InternalArity runCommand :: (Members '[Embed IO,...
null
https://raw.githubusercontent.com/anoma/juvix/807b3b1770289b8921304e92e7305c55c2e11f8f/app/Commands/Dev/Internal/Arity.hs
haskell
module Commands.Dev.Internal.Arity where import Commands.Base import Commands.Dev.Internal.Arity.Options import Juvix.Compiler.Internal.Pretty qualified as Internal import Juvix.Compiler.Internal.Translation.FromInternal.Analysis.ArityChecking.Data.Context qualified as InternalArity runCommand :: (Members '[Embed IO,...
45fe9ccd686d095c1e8c924f5f5e37c24a4ebc9ed193da83ccaf718918f7fc9c
K2InformaticsGmbH/dderl
erlformat.erl
-module(erlformat). -author(""). -export([format/3]). -define(TAB_SIZE, 4). -define(NL(__E), if __E > 0 -> "\n"; true -> "" end). -define(NT(__E,__T), if __E > 0 -> lists:duplicate(?TAB_SIZE*(__T),32); true -> "" end). -define(MAX_COMPRESS, 50). -spec format(binary(), integer() | auto, boolean()) -> binary() | {erro...
null
https://raw.githubusercontent.com/K2InformaticsGmbH/dderl/84697547fe8009db7964baa4eceb876fd78512a0/src/erlformat.erl
erlang
If we dont have formatting already. Else we preserve it. Try to format it using pretty_pr in case of expresion.
-module(erlformat). -author(""). -export([format/3]). -define(TAB_SIZE, 4). -define(NL(__E), if __E > 0 -> "\n"; true -> "" end). -define(NT(__E,__T), if __E > 0 -> lists:duplicate(?TAB_SIZE*(__T),32); true -> "" end). -define(MAX_COMPRESS, 50). -spec format(binary(), integer() | auto, boolean()) -> binary() | {erro...
f90b80afb2763f303a7fc6f3ec6498a6720df68981d78e59c5a6e7d3bc24cc9d
ptal/AbSolute
ad_type.mli
Copyright 2020 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 ; either version 3 of the License , or ( at your option ) any later version . This program is distr...
null
https://raw.githubusercontent.com/ptal/AbSolute/469159d87e3a717499573c1e187e5cfa1b569829/src/lang/typing/ad_type.mli
ocaml
* Rational is more specialized than float (because more precise). Integers and rational/float are unordered. * Find and format the name of an abstract domain. It is used in the header of the error messages. * Filter the abstract domains in the list which subsume all the others. The list is empty if none e...
Copyright 2020 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 ; either version 3 of the License , or ( at your option ) any later version . This program is distr...
675d7877dff2a1e3c31c70b3c07c4c7b8f0289307008b7d3f61453c24bb070d2
racket/mzscheme
tree-finish.rkt
Assumes that tree.so has been loaded (require mzlib/class) (define tree% (let ([method-names '(get-leaves get-left get-right grow graft)]) (make-primitive-class (lambda (class prop:object preparer dispatcher) (primitive-class-prepare-struct-type! tree-primitive-class prop:object cla...
null
https://raw.githubusercontent.com/racket/mzscheme/39f323980a452aff1c3dd53003cdd661190ef698/mzscheme-lib/mzscheme/examples/tree-finish.rkt
racket
Assumes that tree.so has been loaded (require mzlib/class) (define tree% (let ([method-names '(get-leaves get-left get-right grow graft)]) (make-primitive-class (lambda (class prop:object preparer dispatcher) (primitive-class-prepare-struct-type! tree-primitive-class prop:object cla...
1518d0dbeafff28b958855ac5c711b18cf7bc4b2e649811da6146f4f05eaddd1
project-oak/hafnium-verification
CaptureCompilationDatabase.mli
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/integration/CaptureCompilationDatabase.mli
ocaml
* Run the capture of the files for which we have compilation commands in the database and in [changed_files], if specified.
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
f07623166b4c9b5774f5b26a181ab150b277f58d5b7b96b8f1771d23dfbf95dc
mattmundell/nightshade
locall.lisp
;;; Local call analysis. A local call is a function call between functions ;;; being compiled at the same time. If we can tell at compile time that ;;; such a call is legal, then we change the combination to call the ;;; correct lambda, mark it as local, and add this link to our call graph. ;;; Once a call is local, ...
null
https://raw.githubusercontent.com/mattmundell/nightshade/d8abd7bd3424b95b70bed599e0cfe033e15299e0/src/compiler/locall.lisp
lisp
Local call analysis. A local call is a function call between functions being compiled at the same time. If we can tell at compile time that such a call is legal, then we change the combination to call the correct lambda, mark it as local, and add this link to our call graph. Once a call is local, it is then elig...
(in-package :c) #[ Local Call Analysis Find calls to local functions and convert them to local calls to the correct entry point, doing keyword parsing, etc. Recognize once-called functions as `let's. Create "external entry points" for entry-point functions. Phase position: 2/23 (front) Presence: ...
4c1117737ff4fe49fc60a1e33de2886e0ad00c923ec8b9419944c1b86add5756
nuprl/gradual-typing-performance
world.rkt
#lang typed/racket (require benchmark-util) (define-type Color Symbol) (require/typed/check "data.rkt" [#:struct posn ([x : Real] [y : Real])] [#:struct block ([x : Real] [y : Real] [color : Color])] [#:struct tetra ([center : posn] [bloc...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/postmortem/experiments/adaptor/without-adaptor/tetris/typed/world.rkt
racket
and create a new tetra. Take the current tetra and move it down until it lands. Has the current tetra landed on blocks? Has the current tetra landed on the floor? Has the current tetra landed? Step the world, either touchdown or move the tetra down on step. Make a world with the new tetra *IF* if doesn't lie on...
#lang typed/racket (require benchmark-util) (define-type Color Symbol) (require/typed/check "data.rkt" [#:struct posn ([x : Real] [y : Real])] [#:struct block ([x : Real] [y : Real] [color : Color])] [#:struct tetra ([center : posn] [bloc...
8f2513e4087002dba1a3b812d4fa35a2d2a4cf99f2fab28ffc1f393a38223f0d
lmj/lparallel
option.lisp
Copyright ( c ) 2011 - 2012 , . 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, this li...
null
https://raw.githubusercontent.com/lmj/lparallel/9c11f40018155a472c540b63684049acc9b36e15/src/cognate/option.lisp
lisp
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary...
Copyright ( c ) 2011 - 2012 , . All rights reserved . " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY...
275dc40fbb91019831e0db32b58d094fda3aa9370bc64846f15793aea1f3dad5
rsharifnasab/my-learning
14.hs
dupli :: [a] -> [a] dupli = concatMap (\x -> [x,x])
null
https://raw.githubusercontent.com/rsharifnasab/my-learning/8555583a772c96e334e3fdace5a295a21c31ea8b/haskell/99questions/14.hs
haskell
dupli :: [a] -> [a] dupli = concatMap (\x -> [x,x])
58db2a04af769409e584dbde2516ca869d64759695967ff940f985d60c9b32ce
kind2-mc/kind2
modelElement.mli
This file is part of the Kind 2 model checker . Copyright ( c ) 2020 by the Board of Trustees of the University of Iowa Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License a...
null
https://raw.githubusercontent.com/kind2-mc/kind2/7f3560f5b50cb14e3818ab3ba61da44cd9a1d4b0/src/modelElement.mli
ocaml
* Represents an equation of the transition system. It is not specific to the 'equation' model elements of the source lustre program (any model element can be represented by this 'equation' type). Intuitively, a ts_equation corresponds to a conjunct of the transition system. However, some conjuncts m...
This file is part of the Kind 2 model checker . Copyright ( c ) 2020 by the Board of Trustees of the University of Iowa Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License a...
b63af570d93e63bbacee6ea7e3b0e58b39d9e64f9ba1bd9b3ae063fa4fb7d754
buntine/Simply-Scheme-Exercises
17-9.scm
; Write list-ref (define (list-ref2 lst n) (cond ((empty? lst) #f) ((= n 0) (car lst)) (else (list-ref2 (cdr lst) (- n 1)))))
null
https://raw.githubusercontent.com/buntine/Simply-Scheme-Exercises/c6cbf0bd60d6385b506b8df94c348ac5edc7f646/17-lists/17-9.scm
scheme
Write list-ref
(define (list-ref2 lst n) (cond ((empty? lst) #f) ((= n 0) (car lst)) (else (list-ref2 (cdr lst) (- n 1)))))
accd8fd6ab048067b1ef6e2304d27bab481402acb3b12cb0694404d94f410204
dgiot/dgiot
dgiot_mqttc_worker.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy...
null
https://raw.githubusercontent.com/dgiot/dgiot/a6b816a094b1c9bd024ce40b8142375a0f0289d8/apps/dgiot_bridge/src/channel/dgiot_mqttc_worker.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(dgiot_mqttc_worker). -author("johnliu"). -record(state, {id, client = disconnect}). -in...
f2923956a16fe13f84eb0a28dee811a4f2c5a0067f4a7d290d1248402e4ee032
haskell/containers
Lazy.hs
# LANGUAGE CPP # #if defined(__GLASGOW_HASKELL__) {-# LANGUAGE Safe #-} #endif #include "containers.h" ----------------------------------------------------------------------------- -- | -- Module : Data.Map.Merge.Lazy Copyright : ( c ) 2016 -- License : BSD-style -- Maintainer : -- Portability ...
null
https://raw.githubusercontent.com/haskell/containers/f4aec7fe0d7abf16c3090f0cd632b4a9b683d433/containers/src/Data/Map/Merge/Lazy.hs
haskell
# LANGUAGE Safe # --------------------------------------------------------------------------- | Module : Data.Map.Merge.Lazy License : BSD-style Maintainer : Portability : portable maps. The key functions are 'merge' and 'mergeA'. Each of these can be used with several different \"merge tactics\"...
# LANGUAGE CPP # #if defined(__GLASGOW_HASKELL__) #endif #include "containers.h" Copyright : ( c ) 2016 This module defines an API for writing functions that merge two The ' Control . Category . Category ' , ' Applicative ' , and ' Monad ' instances for ' WhenMissing ' tactics are included because they...
23da44fea0ba2b084b3821b4b2885cb7302384a06f63124c67d4c6f18f8cd0c7
Convex-Dev/convex.cljc
_requirer.cljc
;; This file has been autogenerated. ;; Its only purpose is to require a collection of namespaces. ;; ;; (ns ^{:no-doc true} convex.gen.-requirer (:require #?(:clj convex.gen) )) ;;;;;;;;;; (defn -main [& _arg+])
null
https://raw.githubusercontent.com/Convex-Dev/convex.cljc/211658a0d8e8f85b21b8dbc89f97a25063bb521c/module/gen/src/main/clj/convex/gen/_requirer.cljc
clojure
This file has been autogenerated. Its only purpose is to require a collection of namespaces.
(ns ^{:no-doc true} convex.gen.-requirer (:require #?(:clj convex.gen) )) (defn -main [& _arg+])
6145616320dd9f4b8f2e7ff9cce9dbdb71233bde0d48ac4f4f3fffe6994963d4
djnym/erlang-pool-research
pt_gsp_sup.erl
-module (pt_gsp_sup). %% API -export ([ start_link/2, do/2, superconfig/2 ]). superconfig (MinPool, MaxPool) -> [ { pt_gsp_sup, {pt_gsp_sup, start_link, [MinPool, MaxPool]}, permanent, 2000, worker, [pt_gsp_sup] } ]. start_link (_MinPool, MaxPool) -> PoolOptions = [ % mini...
null
https://raw.githubusercontent.com/djnym/erlang-pool-research/3e41f46e40a2d346d984bb016d871b6234a2a50d/src/pt_gsp_sup.erl
erlang
API minimum number of resources maximum number of resources max number to queue emit stats
-module (pt_gsp_sup). -export ([ start_link/2, do/2, superconfig/2 ]). superconfig (MinPool, MaxPool) -> [ { pt_gsp_sup, {pt_gsp_sup, start_link, [MinPool, MaxPool]}, permanent, 2000, worker, [pt_gsp_sup] } ]. start_link (_MinPool, MaxPool) -> PoolOptions = { min_pool_si...
90f9f79d6fa80457223e5545384a64844a67500194639dc486fd15b8809fd514
Holmusk/servant-docs-simple
example.hs
-- stack runghc --package servant-docs-simple # LANGUAGE DataKinds # # LANGUAGE TypeApplications # {-# LANGUAGE TypeOperators #-} module Main where import Servant.API ((:>), Post, ReqBody) import Servant.Docs.Simple (writeDocsJson, writeDocsPlainText) -- Our API type type API = "hello" :> "world" :> Requ...
null
https://raw.githubusercontent.com/Holmusk/servant-docs-simple/ab3edfa619ce1d91f0f68a4cb63b003215c17003/examples/example.hs
haskell
stack runghc --package servant-docs-simple # LANGUAGE TypeOperators # Our API type Writes to the file $PWD/docs.json
# LANGUAGE DataKinds # # LANGUAGE TypeApplications # module Main where import Servant.API ((:>), Post, ReqBody) import Servant.Docs.Simple (writeDocsJson, writeDocsPlainText) type API = "hello" :> "world" :> Request :> Response type Request = ReqBody '[()] () type Response = Post '[()] () main :: IO () mai...
dcd55a81c4500fa99321641fa86ae0e5c23207c793f4c96decae82ec1a1400a6
clojure-lsp/clojure-lsp
test_helper.clj
(ns clojure-lsp.test-helper (:require [clojure-lsp.db :as db] [clojure-lsp.feature.java-interop :as f.java-interop] [clojure-lsp.handlers :as handlers] [clojure-lsp.logger :as logger] [clojure-lsp.parser :as parser] [clojure-lsp.producer :as producer] [clojure-lsp.shared :as shared] [clojure.c...
null
https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/ee8ad07be39e9ecd6ced8ad53e4623f605896941/common-test/src/clojure_lsp/test_helper.clj
clojure
(ns clojure-lsp.test-helper (:require [clojure-lsp.db :as db] [clojure-lsp.feature.java-interop :as f.java-interop] [clojure-lsp.handlers :as handlers] [clojure-lsp.logger :as logger] [clojure-lsp.parser :as parser] [clojure-lsp.producer :as producer] [clojure-lsp.shared :as shared] [clojure.c...
b6c4066cef1b8728a765e2a7f301b06b28255611ddc86ef431341cb65c1454c4
danfran/cabal-macosx
Templates.hs
{-# LANGUAGE OverloadedStrings #-} -- | Templates for the bundle. module Distribution.MacOSX.Templates ( plistTemplate ) where import Data.Text ( Text ) | Default plist template , based on that in - app from wx ( but -- with version stuff removed). plistTemplate :: Text plistTemplate = "\ \<?xml version=\"...
null
https://raw.githubusercontent.com/danfran/cabal-macosx/6714a7018ddcd71efd96044bd55c0e19fb690939/Distribution/MacOSX/Templates.hs
haskell
# LANGUAGE OverloadedStrings # | Templates for the bundle. with version stuff removed).
module Distribution.MacOSX.Templates ( plistTemplate ) where import Data.Text ( Text ) | Default plist template , based on that in - app from wx ( but plistTemplate :: Text plistTemplate = "\ \<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\ \<!DOCTYPE plist SYSTEM \"file\">\n\ \<plist version=\"0.9\"...
90eee66922575069d9bef9e3d1afeb1089944f66394f65e0d1689b486e37e789
ChrisPenner/trek
HKD.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE StandaloneDeriving # # LANGUAGE QuantifiedConstraints # # LANGUAGE UndecidableInstances # module Trek.HKD where import Barbies import Trek import Data.Functor.Identity runHKD :: TraversableB b => b (Trek s) -> Trek s (b Identity) runHKD = bsequence...
null
https://raw.githubusercontent.com/ChrisPenner/trek/26556b8157b38be94718dce7548f81350772d072/trek-hkd/src/Trek/HKD.hs
haskell
# LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric # # LANGUAGE StandaloneDeriving # # LANGUAGE QuantifiedConstraints # # LANGUAGE UndecidableInstances # module Trek.HKD where import Barbies import Trek import Data.Functor.Identity runHKD :: TraversableB b => b (Trek s) -> Trek s (b Identity) runHKD = bsequence'
5265ad01615be5dcffeadde5fdc287d6471279e330c0855931fb68f3bd6026e7
b0-system/b0
b0_cmd_cmd.mli
--------------------------------------------------------------------------- Copyright ( c ) 2020 The b0 programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
null
https://raw.githubusercontent.com/b0-system/b0/cbe12b8a55da6b50ab01ed058b339dbed3cfe894/tool-b0/b0_cmd_cmd.mli
ocaml
* [cmd] is the command line for [cmd].
--------------------------------------------------------------------------- Copyright ( c ) 2020 The b0 programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
645dc1299de31df84a2018da50e92c575b95a4713e186d5a3cd3170cf33afee6
tweag/ormolu
do.hs
main = do stuff `finally` do recover main = do stuff `finally` recover main = do { stuff } `finally` recover foo = do 1 + 2
null
https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/value/function/infix/do.hs
haskell
main = do stuff `finally` do recover main = do stuff `finally` recover main = do { stuff } `finally` recover foo = do 1 + 2
38ca360f7b2420139f6d410d9aa4b16588399fd631e7c4080686d345e92bf349
brennonyork/clj-template
bootstrap.clj
(ns clj-template.util.bootstrap "Built to house all functions helpful for developing Bootstrap-based HTML templates **NOTE** Feel free to submit a pull request to add to this file if you'd like to see something here" (:require clojure.string) (:gen-class)) (def ^{:private true} single-classes "Generate all ...
null
https://raw.githubusercontent.com/brennonyork/clj-template/d255a1c7d50936da5e73ce89d2dff1fb1600672f/src/clj_template/util/bootstrap.clj
clojure
Using the vector returned by `single-classes` will generate functions for each
(ns clj-template.util.bootstrap "Built to house all functions helpful for developing Bootstrap-based HTML templates **NOTE** Feel free to submit a pull request to add to this file if you'd like to see something here" (:require clojure.string) (:gen-class)) (def ^{:private true} single-classes "Generate all ...
3bcaf869e1ec63c92839852b8d03c1bf81a6732778141580fe0a08deddba16c1
GaloisInc/what4
GenWhat4Expr.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE KindSignatures # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PolyKinds # {-# LANGUAGE RankNTypes #-} # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # | Module : GenWhat4Expr Copyright ...
null
https://raw.githubusercontent.com/GaloisInc/what4/4183a84d75d6a540e0581f98d51ccf6355eb0bd9/what4/test/GenWhat4Expr.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # | A convenience class to extract the description string and haskell n.b. cannot ad What4BTy, because the target (SymExpr) is a type synonym for a type family and type family instances cannot specify a type synonym as a target. data What4BTy x :: BaseType -- -...
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE KindSignatures # # LANGUAGE LambdaCase # # LANGUAGE PolyKinds # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # | Module : GenWhat4Expr Copyright : ( c ) Galois Inc , 2020 License : : This mo...
3637bc886fca7b4504f620bf51c0c8cc6c8ba1d7de82808284dbe8dc8e78b0ab
cwmaguire/zombunity-mud
banner_test.clj
(ns zombunity.banner-test (:use clojure.test) (:require [zombunity.dispatch :as disp] [zombunity.data :as data] [zombunity.data.simple-data :as simple-data])) (def conn-id (rand 100)) (def banner-msg {:message "Welcome to Zombunity-MUD!" :conn-id conn-id}) (deftest test-chat (disp/regist...
null
https://raw.githubusercontent.com/cwmaguire/zombunity-mud/ec14406f4addac9b9a0742d3043a6e7bccef1fa6/zombunity_server/test/zombunity/banner_test.clj
clojure
(ns zombunity.banner-test (:use clojure.test) (:require [zombunity.dispatch :as disp] [zombunity.data :as data] [zombunity.data.simple-data :as simple-data])) (def conn-id (rand 100)) (def banner-msg {:message "Welcome to Zombunity-MUD!" :conn-id conn-id}) (deftest test-chat (disp/regist...
8d92ba03c3e0e3ac7d04340e21d1ce646513d45fdeffbd550670fd29f9e1cbd1
dmitryvk/sbcl-win32-threads
clos-add-remove-method.impure.lisp
;;;; testing add/remove-method thread thread safety This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; While most of SBCL is derived from the CMU CL system , the test ;;;; files (like this one) were written from scratch after the fork from CMU CL . ;;;; ;;;; This softw...
null
https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/tests/clos-add-remove-method.impure.lisp
lisp
testing add/remove-method thread thread safety more information. files (like this one) were written from scratch after the fork This software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. We make a generic function, add a bunch of m...
This software is part of the SBCL system . See the README file for While most of SBCL is derived from the CMU CL system , the test from CMU CL . (defpackage "CLOS-ADD/REMOVE-METHOD" (:use "COMMON-LISP" "SB-THREAD")) (in-package "CLOS-ADD/REMOVE-METHOD") (defgeneric foo (x)) (defvar *to-remove-a* nil) (def...
1c77cd739e15154184e976fde6c679c931baa80ea8c81dde70484e1f203b6078
jyh/metaprl
mfir_list.mli
* The Mfir_list module defines lists and list operations . Lists * are used in FIR programs to represent entities whose arity may vary . * * ------------------------------------------------------------------------ * * @begin[license ] * This file is part of MetaPRL , a modular , higher order *...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/fir/mfir_list.mli
ocaml
************************************************************************* * Declarations. ************************************************************************* ************************************************************************* * Rewrites. ******************************************************************...
* The Mfir_list module defines lists and list operations . Lists * are used in FIR programs to represent entities whose arity may vary . * * ------------------------------------------------------------------------ * * @begin[license ] * This file is part of MetaPRL , a modular , higher order *...
a5bfe2f8fd9382a1d9da44541641f5fd6064083d1f38c7ca350c68accc945601
trainline/optimus
backend.clj
Copyright ( c ) Trainline Limited , 2017 . All rights reserved . See LICENSE.txt in the project root for license information (ns optimus.service.backend "This ns contains protocols for a KV store, implementations of which can then be used as the backend for Optimus." (:refer-clojure :exclude [get]) (:requir...
null
https://raw.githubusercontent.com/trainline/optimus/caf4d065f40d5edef87eeb60d767b8379465501e/service/src/optimus/service/backend.clj
clojure
;; ---==| K V P R O T O C O L S |==---- ;; ;; => kvstore' ; first entry => kvstore' ...
Copyright ( c ) Trainline Limited , 2017 . All rights reserved . See LICENSE.txt in the project root for license information (ns optimus.service.backend "This ns contains protocols for a KV store, implementations of which can then be used as the backend for Optimus." (:refer-clojure :exclude [get]) (:requir...
b62f55ea07d6588962727fdce9d9919c0d5386ec1a1b4b16600753419f789a3c
haskus/haskus-system
Main.hs
# LANGUAGE TypeApplications # # LANGUAGE TypeOperators # # LANGUAGE DataKinds # import Haskus.System import qualified Haskus.Utils.Text as Text import Haskus.Utils.Maybe import qualified Haskus.System.Linux.Internals.Sound as Snd import Haskus.System.Linux.Sound.Pcm import Haskus.System.Linux.FileSystem (close) impor...
null
https://raw.githubusercontent.com/haskus/haskus-system/2bdb2bfa4324a567cb726ecb7603e4b8088c24d9/haskus-system-examples/src/sound/Main.hs
haskell
select "hw" devices FIXME: support more access modes stereo FIXME: buffer size FIXME: handle offsets.. -- free buffer on mapping error create a foreign pointer that automatically unmaps the buffer let finalizer = runE_ (sysMemUnmap addr sz)
# LANGUAGE TypeApplications # # LANGUAGE TypeOperators # # LANGUAGE DataKinds # import Haskus.System import qualified Haskus.Utils.Text as Text import Haskus.Utils.Maybe import qualified Haskus.System.Linux.Internals.Sound as Snd import Haskus.System.Linux.Sound.Pcm import Haskus.System.Linux.FileSystem (close) impor...
31d24d53033fabad8ba0fa3bd7798c54a0d82f98fd7af5afd2c2658d030fdc43
haskellfoundation/error-message-index
warning-sets.hs
{- -} import Data.List import Data.Function import Data.Foldable import GHC.Driver.Flags main :: IO () main = print [ ("-W" ++ wf, (is_def, gs)) | w <- minusWeverythingOpts, wf <- toList (warnFlagNames w) , let is_def = w `elem` standardWarnings , let gs = [ "-W" ++ g | g <- smallestWarningGroups w ] ...
null
https://raw.githubusercontent.com/haskellfoundation/error-message-index/76c909ab5bb05f0ce67721af0c880918d0178f38/message-index/warning-sets/warning-sets.hs
haskell
import Data.List import Data.Function import Data.Foldable import GHC.Driver.Flags main :: IO () main = print [ ("-W" ++ wf, (is_def, gs)) | w <- minusWeverythingOpts, wf <- toList (warnFlagNames w) , let is_def = w `elem` standardWarnings , let gs = [ "-W" ++ g | g <- smallestWarningGroups w ] ]
87d2fb596d681c2fbf830643dc57b8084498cb7d441fe1d44237d184fca3a6a5
YoshikuniJujo/test_haskell
LocalValues.hs
# LANGUAGE BlockArguments # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE GADTs #-} # LANGUAGE DataKinds # # LANGUAGE TypeOperators # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleContexts , FlexibleInstances # {-# LANGUAGE ImpredicativeTypes #-} # OPTIONS_GHC -Wall -fno - warn - tabs # module LocalValues where ne...
null
https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/0c76f631a603c9a4bb1ec283e6f3d450e5faafea/tribial/try-newer-ghc/src/LocalValues.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE GADTs # # LANGUAGE ImpredicativeTypes # createMessages :: [String] -> (forall ss .
# LANGUAGE BlockArguments # # LANGUAGE DataKinds # # LANGUAGE TypeOperators # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleContexts , FlexibleInstances # # OPTIONS_GHC -Wall -fno - warn - tabs # module LocalValues where newtype Message s = Message String deriving Show infixr 5 :. data List t ss where Nil ...
db6f2a660490799de172ce500dd28afa40b18c4c50e4b112ed683894504ccd7f
reborg/clojure-essential-reference
1.clj
(vector-of ([t]) ([t x1]) ([t x1 x2]) ([t x1 x2 x3]) ([t x1 x2 x3 x4]) ([t x1 x2 x3 x4 & xn]))
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Vectors/vector-of/1.clj
clojure
(vector-of ([t]) ([t x1]) ([t x1 x2]) ([t x1 x2 x3]) ([t x1 x2 x3 x4]) ([t x1 x2 x3 x4 & xn]))
4ab9e02f089f090a23932388a26308d3d833734887e9173abf96cde6160bbe2c
anoma/juvix
Lexer.hs
module Juvix.Compiler.Concrete.Translation.FromSource.Lexer ( module Juvix.Compiler.Concrete.Translation.FromSource.Lexer, module Juvix.Parser.Lexer, module Juvix.Data.Keyword, module Juvix.Compiler.Concrete.Keywords, ) where import Data.Text qualified as Text import GHC.Unicode import Juvix.Compiler.C...
null
https://raw.githubusercontent.com/anoma/juvix/447f2f1dcf6dc0b4b6513f4396daf5eca0c99652/src/Juvix/Compiler/Concrete/Translation/FromSource/Lexer.hs
haskell
module Juvix.Compiler.Concrete.Translation.FromSource.Lexer ( module Juvix.Compiler.Concrete.Translation.FromSource.Lexer, module Juvix.Parser.Lexer, module Juvix.Data.Keyword, module Juvix.Compiler.Concrete.Keywords, ) where import Data.Text qualified as Text import GHC.Unicode import Juvix.Compiler.C...
848ca1ef4f3e5f3564f78b6a285552da6003295e0fafb3011cea2c785e4fbb74
tweag/ormolu
multiline-arg-parens-out.hs
module Main where -- | Something. data Foo = Foo Bar (Set Baz) -- and here we go -- and that's it Text deriving (Eq)
null
https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/data/multiline-arg-parens-out.hs
haskell
| Something. and here we go and that's it
module Main where data Foo = Foo Bar Text deriving (Eq)
c4195fc176c8dda1879a1df9c58574555b500bf6ef026ea7abb50eb50682d33d
thlorenz/WebToInk
Download.hs
module WebToInk.Converter.Download ( downloadAndSaveImages , downloadPage , savePage , getSrcFilePath ) where import System.Directory (createDirectoryIfMissing, setCurrentDirectory, doesFileExist) import System.IO (hPutStr, withFile, IOMode(..), writeFile) import System.FilePath (takeFileName, take...
null
https://raw.githubusercontent.com/thlorenz/WebToInk/82e2e340f6f16b83681459fb2acc5e19ea1a76f9/webtoink-converter/WebToInk/Converter/Download.hs
haskell
--------------------- ---- Tests ---- -- --------------------- / means root
module WebToInk.Converter.Download ( downloadAndSaveImages , downloadPage , savePage , getSrcFilePath ) where import System.Directory (createDirectoryIfMissing, setCurrentDirectory, doesFileExist) import System.IO (hPutStr, withFile, IOMode(..), writeFile) import System.FilePath (takeFileName, take...
6860f443fd4ca282e41f4ec7c158aa9f5685cafc350f1db1ac6f5010d3de928a
yoriyuki/Camomile
absOrd.ml
(** Abstract total order *) Copyright ( C ) 2002 (* 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 of the License , or ( at your option ) any later version ...
null
https://raw.githubusercontent.com/yoriyuki/Camomile/d7d8843c88fae774f513610f8e09a613778e64b3/Camomile/toolslib/absOrd.ml
ocaml
* Abstract total order This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License may link, statically or dynamically, a "work that uses this library" with a publicly distributed version of this library to produce an executable file contain...
Copyright ( C ) 2002 as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . As a special exception to the GNU Library General Public License , you additional requirements listed in clause 6 of the GNU Library General we mean either the ...
9db6c62b39c6c5fa39ae86f678450d360d6416f6b6bef08fd413f744c9d30813
monadfix/ormolu-live
TcRnTypes.hs
( c ) The University of Glasgow 2006 - 2012 ( c ) The GRASP Project , Glasgow University , 1992 - 2002 Various types used during typechecking , please see TcRnMonad as well for operations on these types . You probably want to import it , instead of this module . All the monads exported here are built on ...
null
https://raw.githubusercontent.com/monadfix/ormolu-live/d8ae72ef168b98a8d179d642f70352c88b3ac226/ghc-lib-parser-8.10.1.20200412/compiler/typecheck/TcRnTypes.hs
haskell
The monad is opaque outside this module The environment types Frontend types (shouldn't really be here) Template Haskell Misc other types Role annotations # SOURCE # # SOURCE # to refine the identities of a hole while we are renaming interfaces (for some 'OccName' @T@) to some arbitrary other 'Name'. by the i...
( c ) The University of Glasgow 2006 - 2012 ( c ) The GRASP Project , Glasgow University , 1992 - 2002 Various types used during typechecking , please see TcRnMonad as well for operations on these types . You probably want to import it , instead of this module . All the monads exported here are built on ...
b932860211f7d4a5650f54d9a41f564493d8a7fb135ea9c756680a63698f507f
serokell/ariadne
Accounts.hs
# LANGUAGE DataKinds , TypeApplications # module Test.Spec.Accounts (spec) where import Test.Hspec (Spec, describe, shouldBe, shouldSatisfy) import Test.Hspec.QuickCheck (prop) import Test.QuickCheck (arbitrary, withMaxSuccess) import Test.QuickCheck.Monadic (PropertyM, monadicIO, pick) import qualified Test.Spec.Wall...
null
https://raw.githubusercontent.com/serokell/ariadne/5f49ee53b6bbaf332cb6f110c75f7b971acdd452/ariadne/cardano/test/backend/Test/Spec/Accounts.hs
haskell
# LANGUAGE DataKinds , TypeApplications # module Test.Spec.Accounts (spec) where import Test.Hspec (Spec, describe, shouldBe, shouldSatisfy) import Test.Hspec.QuickCheck (prop) import Test.QuickCheck (arbitrary, withMaxSuccess) import Test.QuickCheck.Monadic (PropertyM, monadicIO, pick) import qualified Test.Spec.Wall...
1629427731fb72be0a22c6e575e5e3c5fe0c4f1a943dae6f44ff05ca9c089f70
racket/gui
keep-forever.rkt
#lang racket/base (require ffi/unsafe) (provide (protect-out keep-forever)) (define forever (box null)) ;; Keeps as long as the place runs, at least: (void (malloc-immobile-cell forever)) (define (keep-forever v) (set-box! forever (cons v (unbox forever))))
null
https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mred/private/wx/common/keep-forever.rkt
racket
Keeps as long as the place runs, at least:
#lang racket/base (require ffi/unsafe) (provide (protect-out keep-forever)) (define forever (box null)) (void (malloc-immobile-cell forever)) (define (keep-forever v) (set-box! forever (cons v (unbox forever))))
7bd48e5d23c73da60377aa93b0224d1571a2e27a114060464cd3f47457e004ec
laanwj/Purecoin
ZModule.hs
module Purecoin.Crypto.ZModule where import Data.Monoid (Monoid, mempty, mappend) (<+>) :: (Monoid m) => m -> m -> m (<+>) = mappend class Monoid m => ZModule m where double :: m -> m double x = x <+> x opposite :: m -> m opposite x = mempty <-> x (<->) :: m -> m -> m x <-> y = x <+> (opposite y) (*+)...
null
https://raw.githubusercontent.com/laanwj/Purecoin/0861dbc0ed61545d26787b3a001992e67b14ad45/Purecoin/Crypto/ZModule.hs
haskell
module Purecoin.Crypto.ZModule where import Data.Monoid (Monoid, mempty, mappend) (<+>) :: (Monoid m) => m -> m -> m (<+>) = mappend class Monoid m => ZModule m where double :: m -> m double x = x <+> x opposite :: m -> m opposite x = mempty <-> x (<->) :: m -> m -> m x <-> y = x <+> (opposite y) (*+)...
a9248763df9a35e65cea71531c47ae58ccc7edd0fba9931f8342f0c5c6916d8e
lpeterse/haskell-terminal
Spec.hs
module Main where import Data.Monoid import Test.Tasty import Test.Tasty.HUnit import qualified Spec.Decoder import qualified Spec.Virtual main :: IO () main = defaultMain $ testGroup "Control.Monad.Terminal" [ Spec.Decoder.tests , Spec.Virtual.tests ]
null
https://raw.githubusercontent.com/lpeterse/haskell-terminal/994602af65e7f038bc387139ec961248760fd6e6/test/Spec.hs
haskell
module Main where import Data.Monoid import Test.Tasty import Test.Tasty.HUnit import qualified Spec.Decoder import qualified Spec.Virtual main :: IO () main = defaultMain $ testGroup "Control.Monad.Terminal" [ Spec.Decoder.tests , Spec.Virtual.tests ]
743d3403ee3b4407e55db721a97790d9a77e329c4356c771d8f63b6e385a21b6
coast-framework/db
transactor.clj
(ns db.transactor (:require [db.sql :as sql] [db.defq] [db.pull] [clojure.java.jdbc :as jdbc]) (:refer-clojure :exclude [update])) (defn debug? [ctx] (true? (:debug ctx))) (defn sqlite? [ctx] (= "sqlite" (:adapter ctx))) (defn postgres? [ctx] (= "postgres" (:adapter c...
null
https://raw.githubusercontent.com/coast-framework/db/e738cd6402a89c591363ac6f3e7a6e08bcc28a0e/src/db/transactor.clj
clojure
(ns db.transactor (:require [db.sql :as sql] [db.defq] [db.pull] [clojure.java.jdbc :as jdbc]) (:refer-clojure :exclude [update])) (defn debug? [ctx] (true? (:debug ctx))) (defn sqlite? [ctx] (= "sqlite" (:adapter ctx))) (defn postgres? [ctx] (= "postgres" (:adapter c...
9e0e2845fa137ecce55c4ac07423cf281bafcb75bfa5290e7ed8136432e69bc2
dizzyd/retest
basic_rt.erl
-module(basic_rt). files() -> []. run(_Dir) -> ok.
null
https://raw.githubusercontent.com/dizzyd/retest/6b33038bd4df4aab1dc15bb59076512ba8fbb113/test/retest_SUITE_data/basic/basic_rt.erl
erlang
-module(basic_rt). files() -> []. run(_Dir) -> ok.
97c5c7550d29c776d7341076534af1e801b718a1bc6c9473957ff32a25373f70
hammerlab/prohlatype
align2fasta.ml
open Prohlatype open Cmdline_options open Cmdliner let app_name = "align2fasta" let fail_on_parse a = match Nomenclature.parse a with | Ok (l, r) -> l, r | Error e -> failwith e let alters_to_string = function | [] -> " " | lst -> sprintf " %s " (string_of_list lst ~sep:"," ~f:MSA.Alterat...
null
https://raw.githubusercontent.com/hammerlab/prohlatype/3acaf7154f93675fc729971d4c76c2b133e90ce6/src/app/align2fasta.ml
ocaml
output destination. output option optional distance to trigger imputation, merging selectors input Allele information source Allele selectors Input
open Prohlatype open Cmdline_options open Cmdliner let app_name = "align2fasta" let fail_on_parse a = match Nomenclature.parse a with | Ok (l, r) -> l, r | Error e -> failwith e let alters_to_string = function | [] -> " " | lst -> sprintf " %s " (string_of_list lst ~sep:"," ~f:MSA.Alterat...
7d8f2495f8af99926502abb130654a3f6315629e728fbf5cc2f9e4c6df93702b
qrilka/xlsx
CfPair.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE DeriveGeneric # module Codec.Xlsx.Types.Internal.CfPair where import GHC.Generics (Generic) import Text.XML.Cursor import Codec.Xlsx.Parser.Internal import Codec.Xlsx.Types.Common import Codec.Xlsx.Types.ConditionalFormatting import Codec.Xlsx.Writer.Internal -- | Intern...
null
https://raw.githubusercontent.com/qrilka/xlsx/397c3c9db965419a2d2d72470ba68f478748c573/src/Codec/Xlsx/Types/Internal/CfPair.hs
haskell
# LANGUAGE OverloadedStrings # | Internal helper type for parsing "conditionalFormatting recods Implementing those will need this implementation to be changed
# LANGUAGE DeriveGeneric # module Codec.Xlsx.Types.Internal.CfPair where import GHC.Generics (Generic) import Text.XML.Cursor import Codec.Xlsx.Parser.Internal import Codec.Xlsx.Types.Common import Codec.Xlsx.Types.ConditionalFormatting import Codec.Xlsx.Writer.Internal TODO : pivot , extList See 18.3.1.18 " con...
292dd38e7b5d3c69a7ac0b118b611b6f30765f99fe6278dc26108e0b9dc757c7
reach-sh/reach-lang
Compiler.hs
{-# OPTIONS_GHC -Wno-name-shadowing #-} module Reach.Compiler ( CompilerConfig (..) , compile , printKeywordInfo ) where We allow name shadowing because we want to use ` p ` for every program AST -- to ensure that we don't accidentally use things out of order. import Control.Monad import qualified Data.Map....
null
https://raw.githubusercontent.com/reach-sh/reach-lang/f79282c49705c66fc10489045d502d17621d60c5/hs/src/Reach/Compiler.hs
haskell
# OPTIONS_GHC -Wno-name-shadowing # to ensure that we don't accidentally use things out of order. We are now inside the main part of the compiler that actually does f = () => { if ( c ) { commit() publish(x) } commit() publish(y) } f() f() k ones that do communication). So the program l...
module Reach.Compiler ( CompilerConfig (..) , compile , printKeywordInfo ) where We allow name shadowing because we want to use ` p ` for every program AST import Control.Monad import qualified Data.Map.Strict as M import Data.Maybe import qualified Data.Set as S import qualified Data.Text as T import quali...
e6420323cbc9f0fc82574f5e29de4c05784ac4694ed83ec8ba85b32e9aad5ca5
mhjort/clj-gatling
simulation_test.clj
(ns clj-gatling.simulation-test (:require [clojure.test :refer :all] [clj-gatling.test-helpers :refer :all] [clj-gatling.httpkit :as httpkit] [clj-containment-matchers.clojure-test :refer :all] [clj-async-test.core :refer :all] [clojure.core.async :refer [go...
null
https://raw.githubusercontent.com/mhjort/clj-gatling/7f54a0779d43474463b13e03ae54f7e2eb278659/test/clj_gatling/simulation_test.clj
clojure
Original vector might contain small inconsistencies It could for example look like this [1 0 3 4 5 6] This should be counted as a sorted list even though there is an outlier, so we work out the % of non-matches and compare that There is a race condition between calling the force-stop-fn and sending more requests,...
(ns clj-gatling.simulation-test (:require [clojure.test :refer :all] [clj-gatling.test-helpers :refer :all] [clj-gatling.httpkit :as httpkit] [clj-containment-matchers.clojure-test :refer :all] [clj-async-test.core :refer :all] [clojure.core.async :refer [go...
2465f1eba0fc93c5e25b5b8adc8e613a73c4b0e5f75cf68d31ca902664cfb6ae
8c6794b6/guile-tjit
self-references.scm
Continuation - passing style ( CPS ) intermediate language ( IL ) Copyright ( C ) 2013 , 2014 , 2015 Free Software Foundation , Inc. ;;;; 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 Founda...
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/language/cps/self-references.scm
scheme
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library 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 ...
Continuation - passing style ( CPS ) intermediate language ( IL ) Copyright ( C ) 2013 , 2014 , 2015 Free Software Foundation , Inc. version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , ...
021c4ead8fe5d612f2e0749a71e87c3c8ee892d36f13db3d01e3e0744dd654f9
nixin72/shan
util_test.clj
(ns shan.util-test (:require [clojure.test :refer [deftest testing is]] [flatland.ordered.map :refer [ordered-map]] [flatland.ordered.set :refer [ordered-set]] [shan.macros :refer [with-test-data suppress-side-effects suppress-stdout]] [shan.test-values :as v] [shan.print :as p] [shan.util :as u]...
null
https://raw.githubusercontent.com/nixin72/shan/2fe648cb7648174900d25e5ef2af6a9263ee9f97/test/shan/util_test.clj
clojure
serialize ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; deserialize ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; unordered= ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; do-merge ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; merge-conf/1 ;;;;;;;;;;;;;;;;;;;;;;...
(ns shan.util-test (:require [clojure.test :refer [deftest testing is]] [flatland.ordered.map :refer [ordered-map]] [flatland.ordered.set :refer [ordered-set]] [shan.macros :refer [with-test-data suppress-side-effects suppress-stdout]] [shan.test-values :as v] [shan.print :as p] [shan.util :as u]...
b8345afebb751d608e1dbbbe73b43c2f9668704107444129728a69640e1fae62
mihaimaruseac/HsMaze
Maze.hs
module Maze.Maze (genMaze) where import Control.Arrow (first, second) import Control.Monad.State (state, State) import Data.Array.ST (runSTArray, newListArray, readArray, writeArray) import System.Random (StdGen, randomR) import Maze.Types {- Generates the entire maze. -} genMaze :: Size -> State StdGen Maze genMaze...
null
https://raw.githubusercontent.com/mihaimaruseac/HsMaze/470edbf89c3b5ae7c65e5cf16f0da9744bd393f0/Maze/Maze.hs
haskell
Generates the entire maze. Generates all the important points in the maze. Receives size of maze and returns a tuple with cells where the eastern corridor ends and where the northwards openings are placed. Generates the important point for a row. Receives current position, length of row and row order and returns a...
module Maze.Maze (genMaze) where import Control.Arrow (first, second) import Control.Monad.State (state, State) import Data.Array.ST (runSTArray, newListArray, readArray, writeArray) import System.Random (StdGen, randomR) import Maze.Types genMaze :: Size -> State StdGen Maze genMaze s@(sx, sy) = do (ews, ups) <- ...
223aa29eb3cc0c4b47e4659082117d5e32491c2a7b5e1026aa59a088c607a8e3
jepst/CloudHaskell
Test-Message.hs
# LANGUAGE DeriveDataTypeable , TemplateHaskell # module Main where -- A convoluted example showing some different ways -- messages can be passed between processes. import Remote import Data.Typeable (Typeable) import Data.Data (Data) import Data.Binary (Binary,get,put) import System.Random (randomR,getStdRandom) im...
null
https://raw.githubusercontent.com/jepst/CloudHaskell/6acbcb6b2fc6bb6789cce2083cdd4747ef427627/examples/tests/Test-Message.hs
haskell
A convoluted example showing some different ways messages can be passed between processes.
# LANGUAGE DeriveDataTypeable , TemplateHaskell # module Main where import Remote import Data.Typeable (Typeable) import Data.Data (Data) import Data.Binary (Binary,get,put) import System.Random (randomR,getStdRandom) import Control.Concurrent (threadDelay) import Control.Monad (when) import Control.Monad.Trans (lif...
d89813106d256f95a7b853d77a0e9c1bb993794c3f209c7d922611c9796ec249
RedPRL/stagedtt
Inner.ml
open Prelude module D = Data type t = D.inner = | Local of int | Global of global | Lam of Ident.t * t | Ap of t * t | Quote of t | Splice of t | CodePi of t * t | CodeUniv of int and global = [ `Unstaged of Ident.path * D.value Lazy.t * D.inner Lazy.t | `Staged of Ident.path * D.value Lazy.t *...
null
https://raw.githubusercontent.com/RedPRL/stagedtt/f88538036b51cebb83ebb0b418ec9b089550275d/lib/core/Inner.ml
ocaml
open Prelude module D = Data type t = D.inner = | Local of int | Global of global | Lam of Ident.t * t | Ap of t * t | Quote of t | Splice of t | CodePi of t * t | CodeUniv of int and global = [ `Unstaged of Ident.path * D.value Lazy.t * D.inner Lazy.t | `Staged of Ident.path * D.value Lazy.t *...
ebcc89891df8734f8d43cb48a82cc209f821c757922176d7e3cbdb3fc2deb0cc
bmstu-iu9/scheme-labs
parser-example.scm
(load "stream.scm") (load "trace.scm") ; Подмножество языка Scheme ; <sequence> ::= <term> <sequence> | <empty> ; <empty> ::= ; <term> ::= <define> | <expr> ; <define> ::= (DEFINE VAR <expr>) ; <expr> ::= VAR | (<complex-const>) ; <complex-constr> ::= <lambda> | <call> ; <lambda> ::= LAMBDA <varlist> <sequence> ; <cal...
null
https://raw.githubusercontent.com/bmstu-iu9/scheme-labs/354a5428b8451dc6965f729a20e822ae6d8d1930/appendix/parser/parser-example.scm
scheme
Подмножество языка Scheme <sequence> ::= <term> <sequence> | <empty> <empty> ::= <term> ::= <define> | <expr> <define> ::= (DEFINE VAR <expr>) <expr> ::= VAR | (<complex-const>) <complex-constr> ::= <lambda> | <call> <lambda> ::= LAMBDA <varlist> <sequence> <call> ::= <expr> <exprs> <exprs> ::= <empty> | <exp...
(load "stream.scm") (load "trace.scm") : (define (scan str) (let* ((EOF (integer->char 0)) (stream (make-stream (string->list str) EOF))) (call-with-current-continuation (lambda (error) (define result (tokens stream error)) (and (equal? (peek stream) EOF) result...
3a5ca768489f5be121cd6097d0c8651e22628f79b9a4c1a76250967254a9b6b8
prg-titech/baccaml
jit_elim_hints.ml
open Std open MinCaml open Asm let hints = [ "min_caml_jit_merge_point"; "min_caml_can_enter_jit" ] let contain_hints (Id.L x) = List.mem (String.get_name x) hints let rec elim_hints = function | Ans e -> Ans (elim_hints' e) | Let (x, CallDir (id_l, args, fargs), t) when contain_hints id_l -> elim_hints t |...
null
https://raw.githubusercontent.com/prg-titech/baccaml/a3b95e996a995b5004ca897a4b6419edfee590aa/jit/jit_elim_hints.ml
ocaml
open Std open MinCaml open Asm let hints = [ "min_caml_jit_merge_point"; "min_caml_can_enter_jit" ] let contain_hints (Id.L x) = List.mem (String.get_name x) hints let rec elim_hints = function | Ans e -> Ans (elim_hints' e) | Let (x, CallDir (id_l, args, fargs), t) when contain_hints id_l -> elim_hints t |...
4682f3ac5d18b948b47e727c96e6570ddc3f28807d4e3260efefcb7127afeb09
charlieg/Sparser
ops-structure.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- copyright ( c ) 1994,1995 -- all rights reserved ;;; ;;; File: "ops structure" ;;; Module: "objects;model:categories:" version : December 1995 broken out from [ object ] file 8/12/94 . 12/8 added Category - instantiates as ;; an access fn...
null
https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/objects/model/categories/ops-structure.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- File: "ops structure" Module: "objects;model:categories:" an access fn. from the category-level -------- object -------- backpointer to the category whose operations these are a category or list of categories that any individual of this category is...
copyright ( c ) 1994,1995 -- all rights reserved version : December 1995 broken out from [ object ] file 8/12/94 . 12/8 added Category - instantiates as (in-package :sparser) (defstruct (category-operations (:conc-name #:cat-ops-) (:print-function print-operations-data-structu...
12428a78f9abd292a0b1360bbc576813dada916d50e5c05fbd51885944d5267e
r0man/grafeo
examples_test.cljs
(ns grafeo.examples-test (:require [alumbra.js.ast :as ast] [alumbra.spec] [clojure.pprint :refer [pprint]] [clojure.spec.alpha :as s] [clojure.test :refer [deftest is testing]] [grafeo.core :as core] [grafeo.examples :as examples] [g...
null
https://raw.githubusercontent.com/r0man/grafeo/087449efe0dda93eb3aca3ec733d392550cd3562/test/grafeo/examples_test.cljs
clojure
(ns grafeo.examples-test (:require [alumbra.js.ast :as ast] [alumbra.spec] [clojure.pprint :refer [pprint]] [clojure.spec.alpha :as s] [clojure.test :refer [deftest is testing]] [grafeo.core :as core] [grafeo.examples :as examples] [g...
9b7a380c58dea3cee4f78c0a06b724234de23ca1664d94804870a229232b4fc0
lopusz/langlab
stopwords_header.clj
(ns langlab.core.stopwords "Module contains predefined sets of stopwords/articles for various languages and functions to operate on them. All constants are lowercase." (:require [ clojure.string :refer [lower-case]]) (:import [ org.apache.lucene.analysis.ar ArabicAnalyzer ] [ org...
null
https://raw.githubusercontent.com/lopusz/langlab/dd075c9f4ef3594defe16b88bab8460db23c7c75/aux/stopwords/stopwords_header.clj
clojure
(ns langlab.core.stopwords "Module contains predefined sets of stopwords/articles for various languages and functions to operate on them. All constants are lowercase." (:require [ clojure.string :refer [lower-case]]) (:import [ org.apache.lucene.analysis.ar ArabicAnalyzer ] [ org...
33295c5c4bed844c170cd815fa2abd4437c9fb86f49112fb26b02e935384da6b
jship/opentelemetry-haskell
Internal.hs
# LANGUAGE BlockArguments # # LANGUAGE DataKinds # # LANGUAGE DerivingVia # {-# LANGUAGE GADTs #-} # LANGUAGE KindSignatures # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE NumericUnderscores # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # {-# LANGUAGE RankNTypes #-} # LANGUAGE Scoped...
null
https://raw.githubusercontent.com/jship/opentelemetry-haskell/636a301bdfbb2392a3804a8610c26a9e76190901/otel-sdk-trace/library/OTel/SDK/Trace/Internal.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # LANGUAGE StrictData # * Disclaimer $disclaimer TODO: Populate correctly Parent context Parent context TODO: Env vars , spanContextTraceState = traceState , spanContextTraceState = traceState N.B. There are 'attributes' and 'droppedAttrib...
# LANGUAGE BlockArguments # # LANGUAGE DataKinds # # LANGUAGE DerivingVia # # LANGUAGE KindSignatures # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE NumericUnderscores # # LANGUAGE PatternSynonyms # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneKindSignatures # # LANGUAGE TupleSections # # LAN...
47b847774b845b609282bda4d32a5d1f533eaa4248f65757e1e8d76982423eff
jship/opentelemetry-haskell
Internal.hs
# LANGUAGE BlockArguments # # LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE DerivingVia # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneKindSignatures # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # {-...
null
https://raw.githubusercontent.com/jship/opentelemetry-haskell/0cafc10c085d8b078a5a95592be89da609475544/otel-api-trace/library/OTel/API/Trace/Internal.hs
haskell
# OPTIONS_GHC -Wno-unused-imports # * Disclaimer $disclaimer @base@ @base@ @mtl@ @mtl@ @exceptions@ @unliftio-core@ @transformers-base@ @monad-control@ @monad-logger@ @resourcet@ @otel-api-baggage-core@ @base@ @monad-control@ @base@ N.B. We set the span's 'spanFrozenAt' field both in the value copy we ...
# LANGUAGE BlockArguments # # LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE DerivingVia # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneKindSignatures # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # mo...
bf7e02a68961d4a1ebcb847561308175ed929c0d1ea6339d3010e08d7257de82
g000001/MacLISP-compat
STRUCT.lisp
;;; -*- Mode:Lisp; Package:SI; Lowercase:True; Base:8 -*- * * ( c ) Copyright 1980 Massachusetts Institute of Technology * * ;The master copy of this file is in MC:ALAN;NSTRUCT > ;The current Lisp machine copy is in AI:LISPM2;STRUCT > The current Multics copy is in > udd > > Bawden > defstruct.lisp ;***** READ TH...
null
https://raw.githubusercontent.com/g000001/MacLISP-compat/a147d09b98dca4d7c089424c3cbaf832d2fd857a/STRUCT.lisp
lisp
-*- Mode:Lisp; Package:SI; Lowercase:True; Base:8 -*- The master copy of this file is in MC:ALAN;NSTRUCT > The current Lisp machine copy is in AI:LISPM2;STRUCT > ***** READ THIS PLEASE! ***** If you are thinking of munging anything in this file you might want features you are considering adding might be usefull to t...
* * ( c ) Copyright 1980 Massachusetts Institute of Technology * * The current Multics copy is in > udd > > Bawden > defstruct.lisp to consider finding me ( ) and asking me to mung it for you . There is more than one copy of this file in the world ( it runs in PDP10 and Multics MacLisp and on LispMachines ) and w...
6da4890e43229e7bd64dac258a01ff878aa890557c6558b2b41caab70ae36150
racket/slideshow
sig.rkt
(module sig mzscheme (require mzlib/unit) (provide config^ viewer^ core^ cmdline^) ;; Configuration inputs to the core unit: (define-signature config^ normally 32 aspect - > logical size ; ' fullscreen - > 1024x768 , ' widescreen - > 1360x766 , # f varies use-screen-ws use-screen-hs ; aspect -> ...
null
https://raw.githubusercontent.com/racket/slideshow/f67a11ba41a61129f07b3b43ff0497da6303c246/slideshow-lib/slideshow/sig.rkt
racket
Configuration inputs to the core unit: ' fullscreen - > 1024x768 , ' widescreen - > 1360x766 , # f varies aspect -> "pixel" size amount the "pixels" are scaled (e.g., for quad) mode Viewer inputs to the core unit: Registering slides: Pass-through of slide-program requests: Called when a clickback-containing sl...
(module sig mzscheme (require mzlib/unit) (provide config^ viewer^ core^ cmdline^) (define-signature config^ normally 32 smoothing? commentary-on-slide?)) (define-signature viewer^ add-talk-slide! retract-talk-slide! most-recent-talk-slide set-init-page! set-use-back...
f834210e6dc4a64bf9f92f97125160779207a4b9a6b8735a1e6d3527793c2168
Clojure2D/clojure2d-examples
ray.clj
(ns rt4.the-rest-of-your-life.ch06c.ray (:require [fastmath.vector :as v] [fastmath.core :as m])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defprotocol RayProto (at [ray t])) (defrecord Ray [origin direction ^double time] RayProto (at [_ ...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/f47e1655902cc6bf1590aaecc144ac274ed3af66/src/rt4/the_rest_of_your_life/ch06c/ray.clj
clojure
(ns rt4.the-rest-of-your-life.ch06c.ray (:require [fastmath.vector :as v] [fastmath.core :as m])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defprotocol RayProto (at [ray t])) (defrecord Ray [origin direction ^double time] RayProto (at [_ ...
e9ccf18e325720b72f1e2e9e4ff85c50071889f0c859bae5cce5558cfef39b2b
HunterYIboHu/htdp2-solution
ex393-union.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex393-union) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repe...
null
https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter4/Section23-Simultaneous-Processing/ex393-union.rkt
racket
about the language level of this file in a form that our tools can easily process. Design the union function for the representation of finite sets of your choice. produces the set of exactly those elements that occur in both. data difinitions A Son.R is one of: – empty Constraint If s is a Son.R, no number o...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex393-union) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) Exercise 393 . Figure 58 presents two data defini...
747b043ddb5f77eb8602feb3e58d32a4f15643ea657ab7195cb797cc9f75261f
facebook/Haxl
FB.hs
module FB ( getObject , getUser , getUserFriends , Id(..), Friend(..), User(..) ) where import FB.DataSource import Data.Aeson import Facebook (Id(..), Friend(..), User(..)) import Haxl.Core | Fetch an arbitrary object in the Facebook graph . getObject :: Id -> GenHaxl u w Object getObject id = dataFetch...
null
https://raw.githubusercontent.com/facebook/Haxl/8f018dc9cffe641bc0d88d29934d378c82a1246d/example/facebook/FB.hs
haskell
current app.
module FB ( getObject , getUser , getUserFriends , Id(..), Friend(..), User(..) ) where import FB.DataSource import Data.Aeson import Facebook (Id(..), Friend(..), User(..)) import Haxl.Core | Fetch an arbitrary object in the Facebook graph . getObject :: Id -> GenHaxl u w Object getObject id = dataFetch...
97f8b143f4a841ccbfb875ed4f5a3e0d2417c6d3fd78986f911d5fd1691130c8
aveltras/servant-forma
ServerSpec.hs
# LANGUAGE DataKinds # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module Servant.Forma.ServerSpec (spec) where im...
null
https://raw.githubusercontent.com/aveltras/servant-forma/f8f43f2f608be2317fd018c46c7ff8ed1b20b7db/servant-forma-server/test/Servant/Forma/ServerSpec.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedLabels # # LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators #
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE TypeApplications # module Servant.Forma.ServerSpec (spec) where import Control.Lens ((^.)) import Control.Monad.Except (ExceptT, throwError) import Data.Aeson (Value, object, toJSON...
877b33381f337c3fa56d9897be72b294eea91e5a296fd91d27c73268574b972b
Lambda-X/re-console
handlers.cljs
(ns re-console.handlers (:require [re-frame.core :refer [register-handler dispatch]] [clairvoyant.core :refer-macros [trace-forms]] [re-frame-tracer.core :refer [tracer]] [re-console.app :as app])) ;; (trace-forms {:tracer (tracer :color "green")} (register-handler :init-console...
null
https://raw.githubusercontent.com/Lambda-X/re-console/a7a31046ba5066163d46ac586072c92b7414c52b/src/re_console/handlers.cljs
clojure
(trace-forms {:tracer (tracer :color "green")} )
(ns re-console.handlers (:require [re-frame.core :refer [register-handler dispatch]] [clairvoyant.core :refer-macros [trace-forms]] [re-frame-tracer.core :refer [tracer]] [re-console.app :as app])) (register-handler :init-console (fn add-console [db [_ console-key eval-opts]] ...
004dacc7fbe9f2074d0db3c7a5d91e0bffb2f4bede5f10685a35746cfa9fdf2f
kappelmann/engaging-large-scale-functional-programming
Exercise04.hs
module Exercise04 where rudolph :: String -> (Int, Int) rudolph s = if null t then (0, 1) else (maxi * 2, times) where t = cd s (0, 0) maxi :: Int maxi = maximum [l | (l, r) <- t] times = length [l | (l, r) <- t, l == maxi] cd :: String -> (Int, Int) -> [(Int, Int)] cd [] (l, r) = [] cd ('R' : xs) (...
null
https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/8ed2c056fbd611f1531230648497cb5436d489e4/resources/contest/example_data/04/uploads/syzygy/Exercise04.hs
haskell
module Exercise04 where rudolph :: String -> (Int, Int) rudolph s = if null t then (0, 1) else (maxi * 2, times) where t = cd s (0, 0) maxi :: Int maxi = maximum [l | (l, r) <- t] times = length [l | (l, r) <- t, l == maxi] cd :: String -> (Int, Int) -> [(Int, Int)] cd [] (l, r) = [] cd ('R' : xs) (...
c0a8d6b7d72d016bc546496de0acd844c541d6a77e4e82be64b2897eb03940f0
OCamlPro/ocp-build
b.ml
(**************************************************************************) (* *) (* OCamlPro TypeRex *) (* *) Copyrigh...
null
https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tests/ocp-pp/test0/b.ml
ocaml
************************************************************************ OCamlPro TypeRex This file is distributed ...
Copyright OCamlPro 2011 - 2016 . All rights reserved . ( GNU Public Licence version 3.0 ) . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE...
02724f94f8c1457c693fee5b64a8704d3061c786382b6f771a71647fef9af024
fpco/ide-backend
InterruptRunExe.hs
module TestSuite.Tests.InterruptRunExe (testGroupInterruptRunExe) where import Control.Concurrent import Control.Monad import Data.Monoid import System.Exit import Test.Tasty import Test.HUnit import qualified Data.ByteString.Lazy.Char8 as L (unlines) import qualified Data.Text as T import IdeSession...
null
https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/TestSuite/Tests/InterruptRunExe.hs
haskell
SIGINT SIGINT and reported. SIGINT This doesn't work, because the updateStdoutBufferMode above is void for runExe. runActions <- runExe session m result <- runWait runActions assertEqual "" (Left (BSSC.pack "Hi!\n")) result needed , because exe not killed by shutdown
module TestSuite.Tests.InterruptRunExe (testGroupInterruptRunExe) where import Control.Concurrent import Control.Monad import Data.Monoid import System.Exit import Test.Tasty import Test.HUnit import qualified Data.ByteString.Lazy.Char8 as L (unlines) import qualified Data.Text as T import IdeSession...
eec763c0b4eb52ad366c0659f2982bc6aa37d81ba368b2e713ae0adc84fc5c04
PLTools/GT
naming.ml
open Stdppx open Printf let meth_of_constr = sprintf "c_%s" let self_arg_name = "fself" let self_typ_param_name = "self" let gcata_name_for_typ name = Printf.sprintf "gcata_%s" name let class_name_for_typ name = Printf.sprintf "%s_t" name let trait_class_name_for_typ ~trait name = class_name_for_typ (if String....
null
https://raw.githubusercontent.com/PLTools/GT/62d1a424a3336f2317ba67e447a9ff09d179b583/common/naming.ml
ocaml
Should contain object for transforming mutally declared type let typ2_for_class_arg ~plugin_name = sprintf "%s_t_%s_2" plugin_name Largest. Containt not fully initialized stib class "mut_trfs_here" Stdlib.Sys.command "notify-send 'hecking an attribute of constructor' " |> ignore;
open Stdppx open Printf let meth_of_constr = sprintf "c_%s" let self_arg_name = "fself" let self_typ_param_name = "self" let gcata_name_for_typ name = Printf.sprintf "gcata_%s" name let class_name_for_typ name = Printf.sprintf "%s_t" name let trait_class_name_for_typ ~trait name = class_name_for_typ (if String....
8e83a3aa9a256ef8ddbfa4e3af9b4592eea79110af2e07a70099e86fcfe2d3ad
GaloisInc/what4
STP.hs
------------------------------------------------------------------------ -- | Module : What4.Solver . STP Description : Solver adapter code for STP Copyright : ( c ) Galois , Inc 2015 - 2020 -- License : BSD3 Maintainer : < > -- Stability : provisional -- STP - specific tweaks to the basic...
null
https://raw.githubusercontent.com/GaloisInc/what4/ce5c0aa937286932f792fe33ad7692495cdd54a6/what4/src/What4/Solver/STP.hs
haskell
---------------------------------------------------------------------- | License : BSD3 Stability : provisional ---------------------------------------------------------------------- # LANGUAGE OverloadedStrings # | Path to stp to solver.strict-parsing option setting). otherwise left with the default confi...
Module : What4.Solver . STP Description : Solver adapter code for STP Copyright : ( c ) Galois , Inc 2015 - 2020 Maintainer : < > STP - specific tweaks to the basic SMTLib2 solver interface . # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # module What4.Solver.STP ( STP(..) ...
190d53c938920f190653ba9e0dcf68eddc190ddcab3b8dd1614ae62818aa99ce
bsaleil/lc
divrec.scm.scm
;;------------------------------------------------------------------------------ Macros (##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body))) (def-macro (FLOATvector-const . lst) `',(list->vector lst)) (def-macro (FLOATvector? x) `(vector? ,x)) (def-macro (FLOATvector . lst...
null
https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/tools/benchtimes/resultbak/m5rponly/divrec.scm.scm
scheme
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Gabriel benchmarks C benchmarks Other benchmarks
Macros (##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body))) (def-macro (FLOATvector-const . lst) `',(list->vector lst)) (def-macro (FLOATvector? x) `(vector? ,x)) (def-macro (FLOATvector . lst) `(vector ,@lst)) (def-macro (FLOATmake-vector n . init) `(make-vector ,...
4a271d1c55eb5732b914e5f714520ac614038af8cd8d4f0fbc06408c4594b327
marcoheisig/Petalisp
vectorize.lisp
© 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*- (in-package #:petalisp.api) (declaim (inline vectorize)) (defun vectorize (function &optional (arity 1)) (lambda (&rest args) (apply #'lazy-multiple-value arity function args)))
null
https://raw.githubusercontent.com/marcoheisig/Petalisp/60ce0051e54550a345337d4c276107d5cb5f062e/code/api/vectorize.lisp
lisp
© 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*- (in-package #:petalisp.api) (declaim (inline vectorize)) (defun vectorize (function &optional (arity 1)) (lambda (&rest args) (apply #'lazy-multiple-value arity function args)))
6e9a6c4ab8a12e5c308605477145f36c853515fba0765404e5059da34353b4d2
PacktPublishing/Mastering-Clojure
volatile.clj
(ns m-clj.c5.volatile) ;; user> (def v (volatile! 0)) ;; #'user/v ;; user> @v 0 user > ( vreset ! v 1 ) 1 user > ( vswap ! v inc ) 2 user > ( vswap ! v + 3 ) 5
null
https://raw.githubusercontent.com/PacktPublishing/Mastering-Clojure/5364ad907056c1c84c759491b17d45d06f4d7cdc/src/m_clj/c5/volatile.clj
clojure
user> (def v (volatile! 0)) #'user/v user> @v
(ns m-clj.c5.volatile) 0 user > ( vreset ! v 1 ) 1 user > ( vswap ! v inc ) 2 user > ( vswap ! v + 3 ) 5
2e4df595be5af2494538c77d928b84d0c4372d4917facfd83f66bac955cf9c02
airbus-seclab/bincat
gnuc.mli
C2Newspeak : compiles C code into Newspeak . Newspeak is a minimal language well - suited for static analysis . 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 Fr...
null
https://raw.githubusercontent.com/airbus-seclab/bincat/493a03890b3b472fd198ce58c7e9280abd0f9f93/ocaml/src/npk/c2newspeak/gnuc.mli
ocaml
C2Newspeak : compiles C code into Newspeak . Newspeak is a minimal language well - suited for static analysis . 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 Fr...
742b42ef9b0bab0bc73ed0d6e3788c6dd1324388cb114a06213e3f0c2a80c05f
raptazure/experiments
View.hs
module Application.Helper.View ( -- To use the built in login: -- module IHP.LoginSupport.Helper.View ) where -- Here you can add functions which are available in all your views import IHP.ViewPrelude -- To use the built in login: -- import IHP.LoginSupport.Helper.View
null
https://raw.githubusercontent.com/raptazure/experiments/c48263980d1ce22ee9407ff8dcf0cf5091b01c70/haskell/ihp-blog/Application/Helper/View.hs
haskell
To use the built in login: module IHP.LoginSupport.Helper.View Here you can add functions which are available in all your views To use the built in login: import IHP.LoginSupport.Helper.View
module Application.Helper.View ( ) where import IHP.ViewPrelude
cbd1de09904bf7d0cf6ed0246b5c0c6b3f45aa485dcda3db1ce3189a3dc0f178
russellc/Marshal
core.clj
Copyright ( c ) All rights reserved . The use and ;; distribution terms for this software are covered by the Eclipse Public ;; License 1.0 (-1.0.php) which can be found ;; in the file epl-v10.html at the root of this distribution. By using this ;; software in any fashion, you are agreeing to be bound by the terms o...
null
https://raw.githubusercontent.com/russellc/Marshal/58fe5cf255aaea0a9cbc0892ed4c2c8e20479f15/test/marshal/test/core.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 any other...
Copyright ( c ) All rights reserved . The use and (ns marshal.test.core (:refer-clojure :exclude [read struct vector float double]) (:use [marshal.core] :reload-all) (:use [clojure.java.io]) (:use [clojure.test]) (:import [java.nio ByteOrder] [java.io ByteArrayInputStream ByteArrayOutputStream...
8e34a90a2487e588872ef6d7f5eb5905343107108c30d043be9f72398dbaee2a
kim/opentracing
Time.hs
module OpenTracing.Time (AsMicros(micros)) where import Data.Int import Data.Time.Clock import Data.Time.Clock.POSIX import Data.Word class AsMicros a where micros :: Integral b => a -> b instance AsMicros UTCTime where micros = round . (1000000*) . utcTimeToPOSIXSeconds # INLINE micros # instance AsMicros...
null
https://raw.githubusercontent.com/kim/opentracing/0cae2699eb83c5ff840173920d26646a8238e820/opentracing/OpenTracing/Time.hs
haskell
# SPECIALIZE micros :: UTCTime -> Int64 # # SPECIALIZE micros :: UTCTime -> Word64 # # SPECIALIZE micros :: NominalDiffTime -> Int64 # # SPECIALIZE micros :: NominalDiffTime -> Word64 #
module OpenTracing.Time (AsMicros(micros)) where import Data.Int import Data.Time.Clock import Data.Time.Clock.POSIX import Data.Word class AsMicros a where micros :: Integral b => a -> b instance AsMicros UTCTime where micros = round . (1000000*) . utcTimeToPOSIXSeconds # INLINE micros # instance AsMicros...
8049a2ededf4b892e6ff83382045fd03c54ec3a737c43bde31e7c7ab72e38ad0
alexandergunnarson/quantum
print.cljc
(ns ^{:doc "Printing functions such as fipp.edn (a fast pretty printer), `pr-attrs` (which prints the key attributes of a given object or expression, blacklisted printable objects (so you don't have to wait while you accidentally print out an entire database), and so on." :...
null
https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/core/print.cljc
clojure
===== Data and dynamic bindings ===== ;; ===== `println` varieties ===== ;; ===== `ppr` ===== ;; ===== `ppr` varieties ===== ;; ===== Print groups ===== ;;
(ns ^{:doc "Printing functions such as fipp.edn (a fast pretty printer), `pr-attrs` (which prints the key attributes of a given object or expression, blacklisted printable objects (so you don't have to wait while you accidentally print out an entire database), and so on." :...
8a4ac627c3d52488990e6d69f8a944b89fdb9822036b385e1a48bb116fdb92ec
openmusic-project/openmusic
midi-api.lisp
;;=========================================================================== Copyright ( C ) IRCAM - Centre , Paris , France . ; ;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 ...
null
https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/api/externals/MIDI/midi-api.lisp
lisp
=========================================================================== This program is free software; you can redistribute it and/or either version 2 of the License, or (at your option) any later version. See file LICENSE for further informations on licensing terms. This program is distributed in the hope tha...
Copyright ( C ) IRCAM - Centre , Paris , France . modify it under the terms of the GNU General Public License You should have received a copy of the GNU General Public License Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA . DocFile MIDI functions called by OpenMusic (defpack...
199aaa077d40eac316577efcb9f28987e54d6508e05015907f9040a296903c38
shenxs/about-scheme
rocket-launch.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname rocket-launch) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "univ...
null
https://raw.githubusercontent.com/shenxs/about-scheme/d458776a62cb0bbcbfbb2a044ed18b849f26fd0f/HTDP/rocket-launch.rkt
racket
about the language level of this file in a form that our tools can easily process. 图片常量 背景
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname rocket-launch) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settin...
8a3944ecd83db5861ac3bcdc675287f056de60b8a13ae46a87aa3e57da12999b
Smart-Sql/smart-sql
plus_init_sql.clj
(ns org.gridgain.plus.init.plus-init-sql) 1、超级用户名、密码直接写死 xml 文件中 2、初始化元表 (def my-grid-tables " /** 1、用户自定义的 cache */ CREATE TABLE IF NOT EXISTS my_meta.my_caches ( schema_name VARCHAR, -- cache 表名 table_name VARCHAR(40), ...
null
https://raw.githubusercontent.com/Smart-Sql/smart-sql/d2f237f935472942a143816925221cdcf8246aff/src/main/clojure/org/gridgain/plus/init/plus_init_sql.clj
clojure
"DROP TABLE IF EXISTS my_dataset" "DROP TABLE IF EXISTS my_meta_tables" "DROP TABLE IF EXISTS table_item" "DROP TABLE IF EXISTS table_index" "DROP INDEX IF EXISTS my_meta_tables_idx" "DROP INDEX IF EXISTS table_item_idx" "DROP INDEX IF EXISTS table_index_idx" "DROP INDE...
(ns org.gridgain.plus.init.plus-init-sql) 1、超级用户名、密码直接写死 xml 文件中 2、初始化元表 (def my-grid-tables " /** 1、用户自定义的 cache */ CREATE TABLE IF NOT EXISTS my_meta.my_caches ( schema_name VARCHAR, -- cache 表名 table_name VARCHAR(40), ...
ecb5b9ea7a15d0e4a93bc4b10ad64a8d2aff381022d79b349f897d27e4913d3b
malgo-lang/malgo
DsEnv.hs
# LANGUAGE TemplateHaskell # # LANGUAGE UndecidableInstances # module Malgo.Desugar.DsEnv (DsEnv (..), makeDsEnv) where import Control.Lens.TH import Koriel.Id import Koriel.Lens import Koriel.MonadUniq import Malgo.Interface (Interface) import Malgo.Monad import Malgo.Prelude -- 脱糖衣処理の環境 data DsEnv = DsEnv { modu...
null
https://raw.githubusercontent.com/malgo-lang/malgo/a2a91e82692a2797bceefe502e1c2602dee1b03d/src/Malgo/Desugar/DsEnv.hs
haskell
脱糖衣処理の環境
# LANGUAGE TemplateHaskell # # LANGUAGE UndecidableInstances # module Malgo.Desugar.DsEnv (DsEnv (..), makeDsEnv) where import Control.Lens.TH import Koriel.Id import Koriel.Lens import Koriel.MonadUniq import Malgo.Interface (Interface) import Malgo.Monad import Malgo.Prelude data DsEnv = DsEnv { moduleName :: Mo...
a024b508a1e0def15e7394d6ac8315de5fa3299d77076e091c367d5918088b4e
florence/cover
module.rkt
#lang racket (module* test #f 1)
null
https://raw.githubusercontent.com/florence/cover/bc17e4e22d47b1da91ddaa5eafefe28f4675e85c/cover-test/cover/tests/module.rkt
racket
#lang racket (module* test #f 1)
2f9e586d096df1856136af3bba7228309955ef5cee4020f220e87f961d35444b
valderman/haste-compiler
PlusPlus.hs
module Tests.PlusPlus where # NOINLINE str1 # str1 = "27" # NOINLINE str2 # str2 = ".0" # NOINLINE theString # theString = str1 ++ str2 runTest :: IO String runTest = return theString
null
https://raw.githubusercontent.com/valderman/haste-compiler/47d942521570eb4b8b6828b0aa38e1f6b9c3e8a8/Tests/PlusPlus.hs
haskell
module Tests.PlusPlus where # NOINLINE str1 # str1 = "27" # NOINLINE str2 # str2 = ".0" # NOINLINE theString # theString = str1 ++ str2 runTest :: IO String runTest = return theString
60e08779535cf1f6cc1dc66eda84cb0e86f21c82c3e50b65e29b03acafe0c73b
ruricolist/FXML
characters.lisp
copyright ( c ) 2004 knowledgeTools Int . GmbH Author of this version : < > ;;; derived from , ( c ) copyright 1998,1999 by ;;; ;;; License: Lisp-LGPL (See file COPYING for details). ;;; ;;; This code is free software; you can redistribute it and/or modify it under the terms of the version 2.1 of the GNU ...
null
https://raw.githubusercontent.com/ruricolist/FXML/a0e73bb48ef03adea94a55986cc27f522074c8e1/runes/characters.lisp
lisp
License: Lisp-LGPL (See file COPYING for details). This code is free software; you can redistribute it and/or modify it the file COPYING. This code 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 purp...
copyright ( c ) 2004 knowledgeTools Int . GmbH Author of this version : < > derived from , ( c ) copyright 1998,1999 by under the terms of the version 2.1 of the GNU Lesser General Public License as published by the Free Software Foundation , as clarified by the " Preamble to the Gnu Lesser General Pu...
df5bf7186c758e80a2161e2bfdb6a43e2080bebc6ca455fd626995c067cebb51
rgrinberg/stringext
test_stringext_qcheck.ml
open QCheck let (|>) x f = f x let quoted_str = Printf.sprintf "%S" let run lst = OUnit2.run_test_tt_main (QCheck_runner.to_ounit2_test lst) let _ = run ( let f1 s = Stringext.split_trim_left ~on:"," ~trim:" " s in let f2 s = Stringext.split ~on:',' s |> List.map Stringext.trim_left in let pp str = (quo...
null
https://raw.githubusercontent.com/rgrinberg/stringext/2bce0a6fe54e8f8782f7a3b2be44a5e1fb37a522/lib_test/test_stringext_qcheck.ml
ocaml
open QCheck let (|>) x f = f x let quoted_str = Printf.sprintf "%S" let run lst = OUnit2.run_test_tt_main (QCheck_runner.to_ounit2_test lst) let _ = run ( let f1 s = Stringext.split_trim_left ~on:"," ~trim:" " s in let f2 s = Stringext.split ~on:',' s |> List.map Stringext.trim_left in let pp str = (quo...
435e8ab0a46e851685d2266112c09359d350cec2b7fde6dd2f98ca34c9ded6ec
herbelin/coq-hh
subtac_pretyping.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/plugins/subtac/subtac_pretyping.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** A R : A -> A -> Prop : well_fou...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Global open Pp open Util...
fbc5a20b6abe235c0d92b1c7974c5832d052ec680d2809d73d3f7c29b52f0d2c
luposlip/json-schema
infer_test.clj
(ns json-schema.infer-test (:require [clojure.test :refer :all] [json-schema.core :as v] [json-schema.infer :as t]) (:import clojure.lang.ExceptionInfo)) (deftest infer-map (is (= {:$schema "-schema.org/draft-07/schema#" :title "ent-1" :type #{:object} :a...
null
https://raw.githubusercontent.com/luposlip/json-schema/8a07329d8f31b29b15a4b53fcd1be57f330d197d/test/json_schema/infer_test.clj
clojure
not allowed to change type
(ns json-schema.infer-test (:require [clojure.test :refer :all] [json-schema.core :as v] [json-schema.infer :as t]) (:import clojure.lang.ExceptionInfo)) (deftest infer-map (is (= {:$schema "-schema.org/draft-07/schema#" :title "ent-1" :type #{:object} :a...
290b1af5b3ee20eb5366c5f5eea81f615bf1600c08e3aae0582360080c32fd8a
CorticalComputer/DXNN2
morphology.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% This source code and work is provided and developed by . COM % The original release of this source code and the DXNN MK2 system was introduced and explained in my book : Handbook of Neuroevolution Through Erlang . Springer 2012 , print I...
null
https://raw.githubusercontent.com/CorticalComputer/DXNN2/d57d43a91f125f3930e06611f5fce15a0462b32f/src/morphology.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language g...
This source code and work is provided and developed by . COM The original release of this source code and the DXNN MK2 system was introduced and explained in my book : Handbook of Neuroevolution Through Erlang . Springer 2012 , print ISBN : 978 - 1 - 4614 - 4462 - 6 ebook ISBN : 978 - 1 - 4614 - 4463 - 6 . Co...
654bdc87914b624f3440b9ecc910dba8ca1edab43a4e757279c3a497f4304d03
johnwhitington/ocamli
exercise05.ml
let rec member e l = match l with [] -> false | h::t -> h = e || member e t
null
https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/OCaml%20from%20the%20Very%20Beginning/Chapter%204/exercise05.ml
ocaml
let rec member e l = match l with [] -> false | h::t -> h = e || member e t
e947ec9b7016dfc8cd9ffe387200f1a1a9ce894f731d16709cbc23a8c02f3e78
input-output-hk/cardano-sl
Demo.hs
# LANGUAGE FlexibleInstances # # LANGUAGE InstanceSigs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # -- | Demo for the outbound qu...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/networking/src/Network/Broadcast/OutboundQueue/Demo.hs
haskell
# LANGUAGE ScopedTypeVariables # | Demo for the outbound queue ------------------------------------------------------------------------------ Relay demo ------------------------------------------------------------------------------ Set up some test nodes (disjoint from the nodes we set up above) In order to tes...
# LANGUAGE FlexibleInstances # # LANGUAGE InstanceSigs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Network.Broadcast.OutboundQueue.Demo where import ...
629e6307f3c9f1675e846fe254c773242ae0bb8a7f667dcf1a702ed251a1dc09
fmi/fp2015
version1-problem5.rkt
#lang racket (require rackunit) (require rackunit/text-ui) (define (all-sums ns) (define (helper ns index sum) (cond [(= index (length ns)) (list sum)] [else (append (helper ns (add1 index) (+ sum (list-ref ns index))) (helper ns (add1 index) sum))])) (remove-duplicates ...
null
https://raw.githubusercontent.com/fmi/fp2015/ea2ea5448c6c054b00c280590e2e56ee782278e9/exam1/version1-problem5.rkt
racket
#lang racket (require rackunit) (require rackunit/text-ui) (define (all-sums ns) (define (helper ns index sum) (cond [(= index (length ns)) (list sum)] [else (append (helper ns (add1 index) (+ sum (list-ref ns index))) (helper ns (add1 index) sum))])) (remove-duplicates ...
d6fd76798935819e1f3e19556cd90e3f2d248ed31334339d516d2069edc187f2
gar1t/modlib
modlib_data_tests.erl
-module(modlib_data_tests). -include_lib("eunit/include/eunit.hrl"). -import(modlib_data, [optional/4]). optional_test() -> Params = [{"s", "Foo"}, {"i", "123"}, {"f", "123.456"}, {"b1", ""}, {"b2", "no"}, {"b3", "No"}, {"b4", "F...
null
https://raw.githubusercontent.com/gar1t/modlib/e1e0b2aa160a760964a0508283146af81800d098/test/modlib_data_tests.erl
erlang
Defaults Strings are returns if type isn't specified Integers Floats Range Bad operators
-module(modlib_data_tests). -include_lib("eunit/include/eunit.hrl"). -import(modlib_data, [optional/4]). optional_test() -> Params = [{"s", "Foo"}, {"i", "123"}, {"f", "123.456"}, {"b1", ""}, {"b2", "no"}, {"b3", "No"}, {"b4", "F...
821fa23137d2bf8f60d6c46d9f3f851936bfa843f2ca5f36ef4f7d7249ac7d27
alda-lang/alda-core
event.clj
(ns alda.lisp.model.event (:require [alda.lisp.model.offset :refer (absolute-offset)])) (defmulti update-score* "See `update-score`." (fn [score event] (cond (or (= :nil event) (nil? event) (var? event)) :nil (sequential? event) :event-sequence :else (:ev...
null
https://raw.githubusercontent.com/alda-lang/alda-core/4c92eb4fe363485193c58b77b1ec8e36c8866fb5/src/alda/lisp/model/event.clj
clojure
pass score through unchanged `attr-changes` is a map of attribute to vector of attribute values. It's a vector because technically, the attribute can be set multiple times at the same point in time, which is useful sometimes because the effect can be cumulative. In the case of tempo, it's last writer wins, i.e....
(ns alda.lisp.model.event (:require [alda.lisp.model.offset :refer (absolute-offset)])) (defmulti update-score* "See `update-score`." (fn [score event] (cond (or (= :nil event) (nil? event) (var? event)) :nil (sequential? event) :event-sequence :else (:ev...
83098e0d9347fca59a72ccbe5fe3b693d2f779f056d7b180a82b6133dc8d2d84
lepisma/pigeon
utils.lisp
(in-package #:pigeon) (cl-interpol:enable-interpol-syntax) (defun prepend-pad (lines pad-str) (mapcar (cut format nil "~A~A" pad-str <>) lines)) (defun get-line-pad (line pad-char &optional (at 0)) (if (or (= at (length line)) (char-not-equal (elt line at) pad-char)) at (get-line-pad line pad-char (+ ...
null
https://raw.githubusercontent.com/lepisma/pigeon/226f06298d18192bd9f7a677d04f1a5cd5928217/src/utils.lisp
lisp
(in-package #:pigeon) (cl-interpol:enable-interpol-syntax) (defun prepend-pad (lines pad-str) (mapcar (cut format nil "~A~A" pad-str <>) lines)) (defun get-line-pad (line pad-char &optional (at 0)) (if (or (= at (length line)) (char-not-equal (elt line at) pad-char)) at (get-line-pad line pad-char (+ ...
e3a0ebad63818bd6883db3abbd63bb08719ae4db7712e0a46ac590cfa7535cba
digitallyinduced/ihp-forum
Types.hs
module Web.Types where import IHP.Prelude import qualified IHP.Controller.Session import qualified IHP.ControllerSupport as ControllerSupport import IHP.ModelSupport import Application.Helper.Controller import IHP.ViewSupport import Generated.Types import IHP.LoginSupport.Types data WebApplication = WebApplication der...
null
https://raw.githubusercontent.com/digitallyinduced/ihp-forum/ac36ad4ab5dfe7b3aa85ea92d642aec12e4fa6ad/Web/Types.hs
haskell
module Web.Types where import IHP.Prelude import qualified IHP.Controller.Session import qualified IHP.ControllerSupport as ControllerSupport import IHP.ModelSupport import Application.Helper.Controller import IHP.ViewSupport import Generated.Types import IHP.LoginSupport.Types data WebApplication = WebApplication der...
d4296118b4f387969049660ad18ed764e9aab80bc54076d059cbfc92b19f00a6
pascal-knodel/haskell-craft
E'7''1.hs
-- -- -- ---------------- Exercise 7.1 . ---------------- -- -- -- module E'7''1 where firstIncremented :: [Integer] -> Integer firstIncremented [] = 0 firstIncremented ( firstInteger : _ ) = firstInteger + 1 GHCi > firstIncremented [ 1 ] firstIncremented [ 1 ] -} 2 -- Other solutions for "first...
null
https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'7''1.hs
haskell
-------------- -------------- Other solutions for "firstIncremented":
Exercise 7.1 . module E'7''1 where firstIncremented :: [Integer] -> Integer firstIncremented [] = 0 firstIncremented ( firstInteger : _ ) = firstInteger + 1 GHCi > firstIncremented [ 1 ] firstIncremented [ 1 ] -} 2 firstIncremented'3 :: [Integer] -> Integer firstIncremented'3 [] = 0 firstIncr...
bd1a4d9608b53c161bab98857b3f415a69049c8c67e34a779fe2e76e1c762970
CloudI/CloudI
epgsql_fake_json_mod.erl
-module(epgsql_fake_json_mod). -export([encode/1]). -export([decode/1]). encode(ErlJson) -> encode(ErlJson, []). encode({ErlJson}, _EncodeOpts) -> ErlJson. decode(EncodedJson) -> decode(EncodedJson, []). decode(EncodedJson, _DecodeOpts) -> {EncodedJson}.
null
https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_epgsql/test/epgsql_fake_json_mod.erl
erlang
-module(epgsql_fake_json_mod). -export([encode/1]). -export([decode/1]). encode(ErlJson) -> encode(ErlJson, []). encode({ErlJson}, _EncodeOpts) -> ErlJson. decode(EncodedJson) -> decode(EncodedJson, []). decode(EncodedJson, _DecodeOpts) -> {EncodedJson}.
74b0e988049aaf7e3dda2f528e1a093f0795101e227f3e0020ef5311812a9827
serokell/avl-plus
Internal.hs
{-| This module houses internal representation of AVL+ tree. It's not designed to be imported from the outside. -} module Data.Tree.AVL.Internal ( -- * Interfaces with database Retrieves (..) -- * Interface to plug in hash , ProvidesHash (..) , Hash , Debug , hashOf -- * Exc...
null
https://raw.githubusercontent.com/serokell/avl-plus/3fb3933f4f11f282e8c498d128c3e5c79518ea9b/src/Data/Tree/AVL/Internal.hs
haskell
| This module houses internal representation of AVL+ tree. It's not designed to be imported from the outside. * Interfaces with database * Interface to plug in hash * Exception to be thrown by DB operations * AVL map type, its layer and variants * High-level operations * Smart constructors * Getters * Sett...
module Data.Tree.AVL.Internal Retrieves (..) , ProvidesHash (..) , Hash , Debug , hashOf , NotFound (..) , notFound , Map , MapLayer (..) , Rep , toRep , fromRep , rootHash , size , toList , ref , branch , leaf , empty , emptyHash ...