_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
ad3e417ffd6c361ce911d5152b713bc9a457f22535473a01d7d6828e40e94c3a
cheecheeo/haskell-cgi
Protocol.hs
----------------------------------------------------------------------------- -- | -- Module : Network.CGI.Protocol Copyright : ( c ) 2006 -- License : BSD-style -- Maintainer : < > -- Stability : experimental -- Portability : non-portable -- -- An implementation of the program side of ...
null
https://raw.githubusercontent.com/cheecheeo/haskell-cgi/a49660abdc5b711fcc99989f121eb4404bbde66c/src/Network/CGI/Protocol.hs
haskell
--------------------------------------------------------------------------- | Module : Network.CGI.Protocol License : BSD-style Stability : experimental Portability : non-portable An implementation of the program side of the CGI protocol. ---------------------------------------------------------...
Copyright : ( c ) 2006 Maintainer : < > module Network.CGI.Protocol ( CGIRequest(..), Input(..), CGIResult(..), Headers, HeaderName(..), hRunCGI, runCGIEnvFPS, decodeInput, takeInput, getCGIVars, logCGI, formEncode, urlEncode, formDecode, urlDecode, maybeRead, replace ) where impo...
a0f46b4882ce92b25d0baf2729d1760c872255a8d4717401a4c928b5772d870f
donaldsonjw/bigloo
failsafe.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / comptime / Sync / failsafe.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Sync/failsafe.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * raise an exception or invoke an exit. */ *===========================...
* serrano / prgm / project / bigloo / comptime / Sync / failsafe.scm * / * Author : * / * Creation : Sun Nov 18 08:49:33 2012 * / * Last change : Mon Nov 11 10:11:50 2013 ( serrano ) * / * Copy...
aefbfd216859d265c2ef1ca274801fda45ed15c12c612ecfec6572c2826f3960
uw-unsat/leanette-popl22-artifact
arith.rkt
#lang rosette (provide >> << bvor bvand + - * / > < >= <= = zero? abs) ; This module lets you use your favorite arithmetic operators (+, -, =, etc.) while mixing Rosette 2.0 's bitvector types and integers . (require (prefix-in old (only-in rosette + - * / > < >= <= = zero? abs bvor bvand))) (define-syntax-rule (l...
null
https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-4/neutrons/therapyControl-symbolic/arith.rkt
racket
This module lets you use your favorite arithmetic operators (+, -, =, etc.)
#lang rosette (provide >> << bvor bvand + - * / > < >= <= = zero? abs) while mixing Rosette 2.0 's bitvector types and integers . (require (prefix-in old (only-in rosette + - * / > < >= <= = zero? abs bvor bvand))) (define-syntax-rule (lift-2op-to-bitvectors op old bv-equivalent) (define (op xraw yraw) (for*...
b6345fe930f67f11bc6b56f71df702ba46f6d23c0d7cde4b7dd8ac29125f23d3
Frama-C/Frama-C-snapshot
value_product.ml
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/value/values/value_product.ml
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
8157258e20a6eeaa0768d480d669278c249f693559b490837ea6ac15c890857e
geremih/xcljb
gen_common.clj
(ns xcljb.gen-common (:require [gloss core io] [xcljb common])) (defprotocol Measurable (sizeof [this value])) (defprotocol Serializable (->frame [this value] "For fields, value is context instead.") (->value [this value] "For fields, value is context instead.")) (defprotocol Deserializab...
null
https://raw.githubusercontent.com/geremih/xcljb/59e9ff795bf00595a3d46231a7bb4ec976852396/src/xcljb/gen_common.clj
clojure
Expressions Fields Mask type is always a primitive. FIXME: For valueparam with mask type of "CARD16", the value-mask-name refers to actual, existing field. Mask type is always a primitive. Concrete types Request, reply, event, error Has to be named "length", since e.g. GetKeyboardMapping requires it.
(ns xcljb.gen-common (:require [gloss core io] [xcljb common])) (defprotocol Measurable (sizeof [this value])) (defprotocol Serializable (->frame [this value] "For fields, value is context instead.") (->value [this value] "For fields, value is context instead.")) (defprotocol Deserializab...
4d5af76e5a7992970e3c62bcde956a94df9e48554bd7de9e3f69f7dc0ea37c3c
MarkP88/racket-coin
main.rkt
#lang racket (require "main-helper.rkt") (when (file-exists? "blockchain.data") (begin (printf "Found 'blockchain.data', reading...\n") (print-blockchain (file->struct "blockchain.data")) (exit))) Initialize wallets (define coin-base (make-wallet)) (define wallet-a (make-wallet)) (define wallet-b (mak...
null
https://raw.githubusercontent.com/MarkP88/racket-coin/0810de56ac8531a918ac420cfdfd5c5188cae7ec/main.rkt
racket
Transactions Blockchain initiation
#lang racket (require "main-helper.rkt") (when (file-exists? "blockchain.data") (begin (printf "Found 'blockchain.data', reading...\n") (print-blockchain (file->struct "blockchain.data")) (exit))) Initialize wallets (define coin-base (make-wallet)) (define wallet-a (make-wallet)) (define wallet-b (mak...
f4eef92eb0cea327b781f9be6757794d511a9594698c4ebd5332fdc38de8ae54
esl/MongooseIM
mongoose_credentials.erl
-module(mongoose_credentials). -export([make_opts/1, new/3, lserver/1, host_type/1, auth_modules/1, get/2, get/3, set/3, extend/2, register/3]). -export_type([t/0, opts/0]). -record(mongoose_credentials, {lserver, host_type, registry = [], extra...
null
https://raw.githubusercontent.com/esl/MongooseIM/dda03c16c83f5ea9f5c9b87c3b36c989813b9250/src/mongoose_credentials.erl
erlang
These values are always present. Authorization success / failure registry. Each backend may require different values to be present. Allows to enable only some modules for some listeners @doc Returns Default when Key is not found.
-module(mongoose_credentials). -export([make_opts/1, new/3, lserver/1, host_type/1, auth_modules/1, get/2, get/3, set/3, extend/2, register/3]). -export_type([t/0, opts/0]). -record(mongoose_credentials, {lserver, host_type, registry = [], extra...
62c967083c119ce9b1f4fbb500ed82e264cb026b77a37503f6f7c2e0c9aea2af
awslabs/s2n-bignum
bignum_gt.ml
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) (* =================================================================...
null
https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_gt.ml
ocaml
========================================================================= ========================================================================= *** print_literal_from_elf "x86/generic/bignum_gt.o";; *** XOR (% r8) (% r8) INC (% rdx) TEST (% rdi) (% rdi) INC (% r8) INC (% r8) NEG (% rax) ADD (% rdx...
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) Comparison > test on bignums . ...
2a7cd606cf9dedfbaaf1ba5c0e29cd11a2fe286d4669db77fb1e60c242cc68f3
learnuidev/patu
plugins.cljs
(ns patu.plugins (:require [clojure.repl :refer [doc]] [goog.object :as obj] [patu.core :as p] [patu.loaders :as l] [patu.lib :as lib] [patu.utils :refer [js-set! js-get]] [patu.components :as c])) ;; (defn calc-quad [file size] (let [frame (:frame file)] [(/ (:x frame) (:w size)) (/ ...
null
https://raw.githubusercontent.com/learnuidev/patu/b3ea0138350f1063af976bec1a7a9a878d41c841/src/patu/plugins.cljs
clojure
(ns patu.plugins (:require [clojure.repl :refer [doc]] [goog.object :as obj] [patu.core :as p] [patu.loaders :as l] [patu.lib :as lib] [patu.utils :refer [js-set! js-get]] [patu.components :as c])) (defn calc-quad [file size] (let [frame (:frame file)] [(/ (:x frame) (:w size)) (/ (:y...
0799391a5f394be97890a33c9bf18e05ffa7de7ce3fa20267f1b9657f19916e7
ghuysmans/ocaml-fet
no_plus.ml
type 'a t = string let of_string s = if String.contains s '+' then failwith "no_plus" else s let to_string s = s
null
https://raw.githubusercontent.com/ghuysmans/ocaml-fet/e1f2ce9e500e16e6d181baf9e440ede21d740ef7/lib/no_plus.ml
ocaml
type 'a t = string let of_string s = if String.contains s '+' then failwith "no_plus" else s let to_string s = s
a17b994be6f20a95e106372e04a675f3d11cc155a592551e52a6afffed8f96a9
unclebob/spacewar
slider.cljc
(ns spacewar.ui.widgets.slider (:require [quil.core :as q #?@(:cljs [:include-macros true])] [spacewar.ui.protocols :as p] [spacewar.geometry :as geo] [spacewar.ui.config :as uic])) (defn draw-slider-bezel [state] (let [{:keys [w h color mouse-in]} state] (q/stroke-weight 2)...
null
https://raw.githubusercontent.com/unclebob/spacewar/71c3195b050c4fdb7e643f53556ab580d70f27ba/src/spacewar/ui/widgets/slider.cljc
clojure
(ns spacewar.ui.widgets.slider (:require [quil.core :as q #?@(:cljs [:include-macros true])] [spacewar.ui.protocols :as p] [spacewar.geometry :as geo] [spacewar.ui.config :as uic])) (defn draw-slider-bezel [state] (let [{:keys [w h color mouse-in]} state] (q/stroke-weight 2)...
58acc49fd7e8d4aa5889e8b9f786f3ca199ab80ebbc2ab9252286d51cd5e01ed
mitchellwrosen/boston-haskell-arcade
Prelude.hs
module Bha.Banana.Prelude ( -- * Banana Banana , Events , Behavior , MonadMoment , (<@) , (<@>) , accumB , accumE , executeE , filterCoincidentE , filterE , filterJust , leftmostE , mapMaybeE , mergeE , never , previewE , stepper , switchB , switchE , unionWith , unions ...
null
https://raw.githubusercontent.com/mitchellwrosen/boston-haskell-arcade/2e85fbc4ddd18bad520c7544572f7205ef02015f/src/Bha/Banana/Prelude.hs
haskell
* Banana * Randomness * Re-exports
module Bha.Banana.Prelude Banana , Events , Behavior , MonadMoment , (<@) , (<@>) , accumB , accumE , executeE , filterCoincidentE , filterE , filterJust , leftmostE , mapMaybeE , mergeE , never , previewE , stepper , switchB , switchE , unionWith , unions , unpairE , v...
5216785d0dc220aba9df5c54167db35da85e65e19b032eaeafaf60c9262434bc
LesleyLai/PFPL-Interpreters
types.ml
type typ = | TNum | TStr type var = string type num = int type expr = | Var of var | Num of num | Str of string | Plus of expr * expr | Times of expr * expr | Cat of expr * expr | Len of expr | Let of expr * var * expr
null
https://raw.githubusercontent.com/LesleyLai/PFPL-Interpreters/fc78563f1c49c4729daf2e946cd3a4e92e27ea0b/lib/e/types.ml
ocaml
type typ = | TNum | TStr type var = string type num = int type expr = | Var of var | Num of num | Str of string | Plus of expr * expr | Times of expr * expr | Cat of expr * expr | Len of expr | Let of expr * var * expr
39cfc057ef381fac80a0c4fb8c47badc0f5de3daf658655479ac3f2dc9b397cf
uncomplicate/bayadera
visual_test.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) or later ;; which can be found in the file LICENSE at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be boun...
null
https://raw.githubusercontent.com/uncomplicate/bayadera/4105fd0e02bbe1cb19b9413f454075d61def6945/test/clojure/uncomplicate/bayadera/toolbox/visual_test.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) or later which can be found in the file LICENSE 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 rem...
Copyright ( c ) . All rights reserved . (ns ^{:author "Dragan Djuric"} uncomplicate.bayadera.toolbox.visual-test (:require [midje.sweet :refer :all] [uncomplicate.commons.core :refer [with-release double-fn]] [uncomplicate.fluokitten.core :refer [fmap fmap!]] [uncomplica...
6c2df6023d0d5214dc13e95b0ae10dd55b471f06f9192015e4ec3369bdf492b2
rkaippully/webgear
Common.hs
# LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} module Model.Common where import Control.Monad.Logger (runStdoutLoggingT) import Data.Aeson (Options (..), defaultOptions) import Data.Char (isLower, isUpper, toLower) import Data.Pool (Pool, withResource) import Database.Esqueleto import Database.Pers...
null
https://raw.githubusercontent.com/rkaippully/webgear/db122125c35e5853251bfd68a0e5222fafd6cd49/webgear-examples/realworld/Model/Common.hs
haskell
# LANGUAGE OverloadedStrings # All DB operations run in this monad An optional update operator Aeson options to drop the entity name prefix from field names
# LANGUAGE CPP # module Model.Common where import Control.Monad.Logger (runStdoutLoggingT) import Data.Aeson (Options (..), defaultOptions) import Data.Char (isLower, isUpper, toLower) import Data.Pool (Pool, withResource) import Database.Esqueleto import Database.Persist.Sqlite (withSqlitePool) import ...
7109741eebdec4ea0050e0165cee67ace010de8a8dbd563d77cfb6fc056373b0
travelping/eradius
eradius_metrics_SUITE.erl
Copyright ( c ) 2010 - 2017 by Travelping GmbH < > % Permission is hereby granted, free of charge, to any person obtaining a % copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation % the rights to use, copy, modify, me...
null
https://raw.githubusercontent.com/travelping/eradius/82a01d2eda6eca18e19c3db147de08c25377e5e8/test/eradius_metrics_SUITE.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, publish, distribute, sublicense, Software is furnished to do so, subject to the following conditions: The above copyright notice...
Copyright ( c ) 2010 - 2017 by Travelping GmbH < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF...
602d4e585b2cd95ef880d53734773687a750c5996efe0bcadf3fe68e08ac21ed
sgbj/MaximaSharp
vmonde.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 1.221 2010/05/26 19:25:52 " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.204 2010/02/23 05:21:30 " " f2cl6.l , v 1.48 2008/08/...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/colnew/lisp/vmonde.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 1.221 2010/05/26 19:25:52 " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.204 2010/02/23 05:21:30 " " f2cl6.l , v 1.48 2008/08/24 00:56:27 rtoy Exp $ " " ...
04385b97313546c1368ac6f3996a742c323a23e9f3947a29b3eae76a74a706ad
agda/agda
Quote.hs
module Agda.TypeChecking.Quote where import Control.Arrow ((&&&)) import Control.Monad import Data.Maybe (fromMaybe) import qualified Data.Text as T import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Common import Agda.Syntax.Internal as I import Agda.Syntax.Internal.Pattern ( hasDefP, dbPatPerm ) import...
null
https://raw.githubusercontent.com/agda/agda/9e1ce31289df068a93ccc81f88a3898354d0ab56/src/full/Agda/TypeChecking/Quote.hs
haskell
TODO: quote Annotation We keep no ranges in the quoted term, so the equality on terms is only on the structure. has the clause been generated (in particular by --cubical)? TODO: have an explicit clause origin field? An extended lambda should not have any extra parameters! See also corresponding code in InternalT...
module Agda.TypeChecking.Quote where import Control.Arrow ((&&&)) import Control.Monad import Data.Maybe (fromMaybe) import qualified Data.Text as T import qualified Agda.Syntax.Abstract as A import Agda.Syntax.Common import Agda.Syntax.Internal as I import Agda.Syntax.Internal.Pattern ( hasDefP, dbPatPerm ) import...
7d44d1a6d71d782c0765ba5d4c2ea2a48e520d4707e8cf3acd4d1996409b3ee4
ztellman/duel
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...
null
https://raw.githubusercontent.com/ztellman/duel/bf0de9f884578b21cddbaf83a88ed9f0ab83d8e8/src/duel/core.clj
clojure
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 of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns duel.core (:use [potemkin]) (:require [clojure.java.io :as io] [clojure.string :as str] [clojure.java.shell :as sh]) (:import [java.io PipedOutputStream PipedInputStream InputStream OutputStream])) (defprotocol-once IPl...
3a7706303c5994c8b649b70510565d312eddb7b4823eec5ebe716e1c8c13aae8
jaspervdj/lorem-markdownum
Token.hs
-------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} module LoremMarkdownum.Token ( Stream , streamElements , mapStream , printStream , previewStream , Token (..) , tokenIsElement , tokenIsDelimiter , tokenEndsSentence ...
null
https://raw.githubusercontent.com/jaspervdj/lorem-markdownum/fabe4e5f3094467c992b83c1f99ae01a1c3f3155/lib/LoremMarkdownum/Token.hs
haskell
------------------------------------------------------------------------------ # LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----------------------------------------------------...
module LoremMarkdownum.Token ( Stream , streamElements , mapStream , printStream , previewStream , Token (..) , tokenIsElement , tokenIsDelimiter , tokenEndsSentence , castToken ) where import Text.Blaze.Html (Html) import LoremMarkdownum.Print ...
c4352afabb44a88839a847542e61c2fe959c82175f119945c862f0270b25ceff
input-output-hk/cardano-ledger
RulesTests.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE PatternSynonyms # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Test.Cardano.Ledger.Shelley.RulesTests ( chainExamples, multisigExamples, testTickF, ) where import C...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/38aa337834ccb9b5f47dbf9e81a3b986dcdd57f5/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/RulesTests.hs
haskell
multiple script-locked outputs script and skey locked Withdrawals Instead of collecting a `Coin` for each stake credential, we collect 'Set Reward'. property is not enforced in the types. For this reason, the property test 'propTickfPerservesLedgerView' removes these empty sets from an otherwise arbitrary 'NewEp...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE PatternSynonyms # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Test.Cardano.Ledger.Shelley.RulesTests ( chainExamples, multisigExamples, testTickF, ) where import C...
4708b3fabb7726ec0a0a236db3220cbe55a49f3d2c1e131fbe939d588213ff08
snowleopard/hadrian
Way.hs
module Way ( WayUnit (..), Way, wayUnit, addWayUnit, removeWayUnit, wayFromUnits, allWays, vanilla, profiling, dynamic, profilingDynamic, threaded, debug, logging, threadedDebug, threadedProfiling, threadedLogging, threadedDynamic, threadedDebugProfiling, threadedDebugDynamic, threadedProfilingDynamic,...
null
https://raw.githubusercontent.com/snowleopard/hadrian/b9a3f9521b315942e1dabb006688ee7c9902f5fe/src/Way.hs
haskell
| Build default _vanilla_ way. | Build with profiling. | Build with dynamic linking. | Build with profiling and dynamic linking. RTS only ways below. See compiler/main/DynFlags.hs. | Build RTS with event logging. | Build multithreaded RTS. | Build RTS with debug information. | Various combinations of RTS only ...
module Way ( WayUnit (..), Way, wayUnit, addWayUnit, removeWayUnit, wayFromUnits, allWays, vanilla, profiling, dynamic, profilingDynamic, threaded, debug, logging, threadedDebug, threadedProfiling, threadedLogging, threadedDynamic, threadedDebugProfiling, threadedDebugDynamic, threadedProfilingDynamic,...
bd7101b82f7dc6434552f020030584d5fe51718ed7d0bd51bb263f50e5175a62
zenhack/haskell-capnp
Util.hs
# LANGUAGE DataKinds # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # # LANGUAGE TypeFamilies # module Util ( MsgMetaData (..), capnpEncode, capnpDecode, capnpCompile, capnpCanonicalize, decodeValue, encodeValue, aircraftSchemaSrc, schemaSchemaSrc, ) where import quali...
null
https://raw.githubusercontent.com/zenhack/haskell-capnp/6cf9fae35189a3668f2740d64c634675ec5fbdec/tests/Util.hs
haskell
# LANGUAGE OverloadedStrings # | Information about the contents of a capnp message. This is enough to encode/decode both textual and binary forms. | The source of the schema | The name of the root struct's type the needed metadata and returning the output the needed metadata and returning the output the needed m...
# LANGUAGE DataKinds # # LANGUAGE QuasiQuotes # # LANGUAGE TypeFamilies # module Util ( MsgMetaData (..), capnpEncode, capnpDecode, capnpCompile, capnpCanonicalize, decodeValue, encodeValue, aircraftSchemaSrc, schemaSchemaSrc, ) where import qualified Capnp.Message as M import Cont...
b14480452136477a287573514581a0d50e35c639e19c58a301b97ce3e4ef58fb
nikita-volkov/rerebase
Encoding.hs
module Data.Text.Encoding ( module Rebase.Data.Text.Encoding ) where import Rebase.Data.Text.Encoding
null
https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Data/Text/Encoding.hs
haskell
module Data.Text.Encoding ( module Rebase.Data.Text.Encoding ) where import Rebase.Data.Text.Encoding
41ba8360810ad8233330e4a945d88471636671632dd3e53264dee0abab2c4017
Elzair/nazghul
voidgap-passage.scm
(kern-mk-place 'p_voidgap_entrance "Passage to Voidgap" s_dungeon ; sprite (kern-mk-map nil 19 19 pal_expanded (list "rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn " "rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn " "rn rn rn rn rn rn rn rn rn rn rn rn rn rn r8 rn rn rn rn " ...
null
https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.002/voidgap-passage.scm
scheme
sprite wraps underground large-scale (wilderness) tmp combat place subplaces neighbors objects hooks edge entrances sprite wraps underground large-scale (wilderness) tmp combat place subplaces neighbors objects hooks edge entrances sprite wraps underground large-scale (wilderness) tmp combat pl...
(kern-mk-place 'p_voidgap_entrance "Passage to Voidgap" (kern-mk-map nil 19 19 pal_expanded (list "rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn " "rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn " "rn rn rn rn rn rn rn rn rn rn rn rn rn rn r8 rn rn rn rn " "rn rn r8 r8 r8 r8 r8 rn r8 r...
b007090244f7d098b30a0ff66de3704a609526bffb8be933b31ea0ab6d206bf6
Liqwid-Labs/liqwid-plutarch-extra
List.hs
| Module : Plutarch . Extra . List Copyright : ( C ) Liqwid Labs 2022 License : Apache 2.0 Maintainer : < > Portability : GHC only Stability : Experimental Various helpers for list - like structures . This module is intended to be imported qualified . Module: Plutarch.Extra.List Copyri...
null
https://raw.githubusercontent.com/Liqwid-Labs/liqwid-plutarch-extra/1d29727eb19e737479ec2df288d1266ab00140cc/src/Plutarch/Extra/List.hs
haskell
* Construction * Transformation * Search * Elimination * Comparison * Singleton > listI a : -- > listO b ) > listO b) -> > ell a : -- > b ) > ( kv : -- > v ) : -- > k : -- > ell kv : -- > v ) > k : -- > kv : -- > kv ) > a :--> ell a) Similar to 'precList', but with a \'look-ahead\' in the list-like struct...
| Module : Plutarch . Extra . List Copyright : ( C ) Liqwid Labs 2022 License : Apache 2.0 Maintainer : < > Portability : GHC only Stability : Experimental Various helpers for list - like structures . This module is intended to be imported qualified . Module: Plutarch.Extra.List Copyri...
fce5732c077f92c137f5f81566a92d316533a6f0b5e5858d84ad56e861676103
xapi-project/xenopsd
xenops_utils.ml
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
null
https://raw.githubusercontent.com/xapi-project/xenopsd/837d1ce49f2bb68092298a3d0a3dbaeb82c10058/lib/xenops_utils.ml
ocaml
**************************************************************************** * A directory tree containiign files, each of which contain strings This is thrown by the rmdir when we're trying to delete a directory that's got files still in it. It's not an error, so ignore it This is thr...
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
20412cbe2c0bb5282fe2f7b4e3d384ccbb5b2a6d9a96c57c1192802433fd2ecc
iu-parfunc/lvars
Range.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE ConstraintKinds #-} # LANGUAGE TypeFamilies , NamedFieldPuns # {-| A mechanism to describe iteration spaces supporting parallel execution. -} module Data.Par.Range ( -- * Constructing iteration spaces -- | Beware that ranges include information about whether...
null
https://raw.githubusercontent.com/iu-parfunc/lvars/78e73c96a929aa75aa4f991d42b2f677849e433a/src/par-collections/Data/Par/Range.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE ConstraintKinds # | A mechanism to describe iteration spaces supporting parallel execution. * Constructing iteration spaces | Beware that ranges include information about whether or not sequential "bottoming-out" is permitted. If you are executing parallel loops with inter-i...
# LANGUAGE TypeFamilies , NamedFieldPuns # module Data.Par.Range ( Range(..), range, irange, zrange, fullpar, pmapReduce, pmapReduce_, toList ) where import Control.DeepSeq import Data.Traversable () import Control.Monad as M hiding (mapM, sequence, join) import GHC.Conc (getNumProcessors) i...
23cd0544a1a67527f82e611fb60b3b96ff9bf2fbb18934283cda0582ebaa87b0
minoki/pandoc-aozora-ruby
AozoraRuby.hs
{-# LANGUAGE OverloadedStrings #-} module Text.Pandoc.Filter.AozoraRuby where import Text.Pandoc.Definition import Data.String import TextCompat -- import Text.Pandoc.XML (escapeStringForXML) -- depending on the entire 'pandoc' package just for a single function is overkill... isKanji :: Char -> Bool CJK Unified Ide...
null
https://raw.githubusercontent.com/minoki/pandoc-aozora-ruby/b33e8121b6ce211fd4dc1d792ac78d01ce4fa300/src/Text/Pandoc/Filter/AozoraRuby.hs
haskell
# LANGUAGE OverloadedStrings # import Text.Pandoc.XML (escapeStringForXML) depending on the entire 'pandoc' package just for a single function is overkill... '々' Ideographic Iteration Mark '〆' Ideographic Closing Mark '〇' Ideographic Number Zero '〻' Vertical Ideographic Iteration Mark ^ Function to build a ruby ...
module Text.Pandoc.Filter.AozoraRuby where import Text.Pandoc.Definition import Data.String import TextCompat isKanji :: Char -> Bool CJK Unified Ideographs CJK Compatibility Ideographs CJK Unified Ideographs Extension A CJK Unified Ideographs Extension B - F , Supplement ' ヶ ' Letter Small KE where i = f...
996fcf201c62f6888c41657fe3b4ada5936d6147b856bfffa2778a08a5f74c77
nickzuber/infrared
parser_env.ml
* * Copyright ( c ) 2013 - present , Facebook , Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENS...
null
https://raw.githubusercontent.com/nickzuber/infrared/b67bc728458047650439649605af7a8072357b3c/InfraredParser/flow_parser/lib/parser_env.ml
ocaml
copy all the mutable things so that we have a distinct lexing environment * that does not interfere with ordinary lexer operations lex_buffer has type bytes, which is itself mutable, but the lexer * promises not to change it so a shallow copy should be fine I don't know how to do a copy without an update...
* * Copyright ( c ) 2013 - present , Facebook , Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENS...
42ff6c7797440c7e475ccdc3a70cdcf63f736ea7c2bdaf413cdf9d7526410cf6
rudymatela/leancheck
test-float.hs
test-list.hs -- example program , testing Float using -- Copyright ( c ) 2017 - 2020 . -- Distributed under the 3-Clause BSD licence (see the file LICENSE). import Test.LeanCheck main :: IO () main = do -- identities on floats -- some of these properties fail due to rounding errors checkFor n $ \x y -> ...
null
https://raw.githubusercontent.com/rudymatela/leancheck/af299d3616a362816c21931ada6fa49a2af7f911/eg/test-float.hs
haskell
example program , testing Float using Distributed under the 3-Clause BSD licence (see the file LICENSE). identities on floats some of these properties fail due to rounding errors
Copyright ( c ) 2017 - 2020 . import Test.LeanCheck main :: IO () main = do checkFor n $ \x y -> not (isInfinite y) ==> x - y + y == (x::Float) checkFor n $ \x y -> not (isInfinite y) ==> x + y - y == (x::Float) checkFor n $ \x y -> y /= 0 && not (isInfinite y) ==> x * y / y == (x::Float) checkFor n $ \x...
bdf319a31879780e23b8900f189f71d2330e11a2c27ac76788375fac45c5b4b8
NorfairKing/intray
Import.hs
module Import ( module X, ) where import Control.Monad as X import Control.Monad.IO.Class as X import Data.ByteString as X (ByteString) import Data.GenValidity as X import Data.GenValidity.ByteString as X () import Data.GenValidity.Text as X () import Data.GenValidity.Time as X () import Data.GenValidity.UUID as X...
null
https://raw.githubusercontent.com/NorfairKing/intray/f8ed32c79d8b3159a4c82cd8cc5c5aeeb92c2c90/intray-api-gen/src/Import.hs
haskell
module Import ( module X, ) where import Control.Monad as X import Control.Monad.IO.Class as X import Data.ByteString as X (ByteString) import Data.GenValidity as X import Data.GenValidity.ByteString as X () import Data.GenValidity.Text as X () import Data.GenValidity.Time as X () import Data.GenValidity.UUID as X...
070c53363ec08d6ba7ef9017a51d421d51b2d02ec5e29827b59b974a442d8b15
ghc/nofib
RealM.hs
module RealM (RealT, evalReal, int2Real, addReal, subReal, mulReal, divReal, sqrtReal) where data Tree a = TreeC a (Tree a) (Tree a) data RealT = RealC (Tree Integer) deriving () treeFrom :: Integer -> Tree Integer treeFrom n = TreeC n (treeFrom (2*n-1)) (treeFrom (2*n-2)) ----------------------------...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/real/symalg/RealM.hs
haskell
----------------------------------------------------------------------------- ----------------------------------------------------------------------------- multiply an integer, x, by 10^(-n). ----------------------------------------------------------------------------- argument is an accumulator in which the value is...
module RealM (RealT, evalReal, int2Real, addReal, subReal, mulReal, divReal, sqrtReal) where data Tree a = TreeC a (Tree a) (Tree a) data RealT = RealC (Tree Integer) deriving () treeFrom :: Integer -> Tree Integer treeFrom n = TreeC n (treeFrom (2*n-1)) (treeFrom (2*n-2)) numberTree :: Tree Integer...
9f185b10b41a8510a6c8ad17f4cf7245b5ccfdbbe624c5ac9f92145a51737bfc
juxt/jig
cljs_builder.clj
Copyright © 2013 , JUXT LTD . 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 b...
null
https://raw.githubusercontent.com/juxt/jig/3997887e5a56faadb1b48eccecbc7034b3d31e41/extensions/cljs-builder/src/jig/cljs_builder.clj
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. ...
Copyright © 2013 , JUXT LTD . All Rights Reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns jig.cljs-builder (:require jig [clojure.java.io :refer (file)] [clojure.tools [logging :refer :all]] [clojure.pprint :refer (pprint)] [cljs [closure :refer (build)] [env :refer (default-comp...
c4ac71a251a2290148b37f6a07df4fabce13a0c404062bde4916e55002bc439f
facebookincubator/hsthrift
Async.hs
Copyright ( c ) Facebook , Inc. and its affiliates . -- | This module provides some higher level concurrency facilities module Util.Async ( window_, windowUnorderedReduce, runHereOrConcurrently ) where import Control.Concurrent.Async import Control.Concurrent.Chan import Control.Monad (forM_, replicateM...
null
https://raw.githubusercontent.com/facebookincubator/hsthrift/d3ff75d487e9d0c2904d18327373b603456e7a01/common/util/Util/Async.hs
haskell
| This module provides some higher level concurrency facilities | This function is similar to folly::window. It takes a list of input items | A variant of window function where we collect the result without preserving the order | A wrapper for 'mapConcurrently' so that a singleton list of actions runs in this t...
Copyright ( c ) Facebook , Inc. and its affiliates . module Util.Async ( window_, windowUnorderedReduce, runHereOrConcurrently ) where import Control.Concurrent.Async import Control.Concurrent.Chan import Control.Monad (forM_, replicateM_) and launch a pool of ` maxConcurrency ` of workers to proce...
a2e7434ff05e6ce26c140c5d943ab511ce26d255940ddf7f13e1b16dccc23c9b
luqui/experiments
gadts.hs
# LANGUAGE GeneralizedNewtypeDeriving , GADTs # import Prelude hiding (Eq) data Eq a b where Refl :: Eq a a coerce :: Eq a b -> a -> b coerce Refl = id trans :: Eq a b -> Eq b c -> Eq a c trans Refl Refl = Refl sameUnit :: Eq () () sameUnit = Refl class IsoUnit a where iso1 :: Eq () b -> Eq a b iso2 :...
null
https://raw.githubusercontent.com/luqui/experiments/c0b9153c41507afbfdeb2b32bfc65fd1ac83fb26/gadts.hs
haskell
# LANGUAGE GeneralizedNewtypeDeriving , GADTs # import Prelude hiding (Eq) data Eq a b where Refl :: Eq a a coerce :: Eq a b -> a -> b coerce Refl = id trans :: Eq a b -> Eq b c -> Eq a c trans Refl Refl = Refl sameUnit :: Eq () () sameUnit = Refl class IsoUnit a where iso1 :: Eq () b -> Eq a b iso2 :...
dfcd048f01dd124f1faea97602175b38237c7a0a96912b098e2ad73036336584
phadej/zinza
Parser.hs
module Zinza.Parser (parseTemplate) where import Control.Applicative (many, optional, some, (<|>)) import Control.Monad (void) import Data.Char (isAlphaNum, isLower) import Data.List (foldl') import Text.Parsec (anyChar, eof, getPosition, lookAhead, notFollowedBy, parse, satisfy, ...
null
https://raw.githubusercontent.com/phadej/zinza/80cc8e62ba479df192a46bc4a0dc1eff16d61194/src/Zinza/Parser.hs
haskell
| Parse template into nodes. No other than syntactic checks are performed. ^ name of the template ^ contents of the template ----------------------------------------------------------------------------- Location ----------------------------------------------------------------------------- --------------------------...
module Zinza.Parser (parseTemplate) where import Control.Applicative (many, optional, some, (<|>)) import Control.Monad (void) import Data.Char (isAlphaNum, isLower) import Data.List (foldl') import Text.Parsec (anyChar, eof, getPosition, lookAhead, notFollowedBy, parse, satisfy, ...
9f1cf7abdd9bee3004f55b42f6f18e31295bd222dee6c601c0647421d0e9d145
micmarsh/re-frame-youtube-fx
core.cljs
(ns youtube-fx.core (:require [re-frame.core :as re-frame] [camel-snake-kebab.core :as convert] [youtube-fx.reg-fx :as fx] [youtube-fx.global :as global])) (defn event->callback [event-vec] #(re-frame/dispatch (vec (concat event-vec %&)))) (defn events->callbacks [events-map] ...
null
https://raw.githubusercontent.com/micmarsh/re-frame-youtube-fx/dfbf2790930da2810da2ea8e21a1e72abf82f0d7/src/youtube_fx/core.cljs
clojure
TODO some validation on options
(ns youtube-fx.core (:require [re-frame.core :as re-frame] [camel-snake-kebab.core :as convert] [youtube-fx.reg-fx :as fx] [youtube-fx.global :as global])) (defn event->callback [event-vec] #(re-frame/dispatch (vec (concat event-vec %&)))) (defn events->callbacks [events-map] ...
90701b2f0078b2ef4f2359f776046c2ddb5da42ec7960b59c07ce1124290f776
RolfRolles/PandemicML
IDAGraph.ml
type 'a graph_viewer = { graph: 'a; sizer: 'a -> int; text: 'a -> int -> string; edges: 'a -> (int * int) list; } external display_graph : 'a graph_viewer -> string -> bool = "OCamlShowGraph" let show_graph = display_graph
null
https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/IDA/IDAGraph.ml
ocaml
type 'a graph_viewer = { graph: 'a; sizer: 'a -> int; text: 'a -> int -> string; edges: 'a -> (int * int) list; } external display_graph : 'a graph_viewer -> string -> bool = "OCamlShowGraph" let show_graph = display_graph
9dc2d10559f5f25ea51cf410610a48a69886c454c50f077115185be436f389dd
machine-intelligence/provability
Formulas.hs
module Modal.Formulas where import Control.Applicative hiding ((<|>)) import Control.Arrow ((***)) import Control.Monad (ap) import Data.List import Data.Monoid import Data.Maybe import Data.Map (Map) import qualified Data.Map as M import Data.Text (Text) import qualified Data.Text as T import Modal.Display import Moda...
null
https://raw.githubusercontent.com/machine-intelligence/provability/12d981dfe7d0420b06f5548e96afc3f39f338d26/src/Modal/Formulas.hs
haskell
Example usage: findGeneralGLFixpoint $ M.fromList [("a",read "~ [] b"), ("b", read "[] (a -> [] ~ b)")] Alternatively: findGeneralGLFixpoint $ makeEquivs [("a", "~ [] b"), ("b", "[] (a -> [] ~ b)")] Modal Logic Formula data structure Operator like function that encodes "provable in S+Con^k(S)", where "S" is the ...
module Modal.Formulas where import Control.Applicative hiding ((<|>)) import Control.Arrow ((***)) import Control.Monad (ap) import Data.List import Data.Monoid import Data.Maybe import Data.Map (Map) import qualified Data.Map as M import Data.Text (Text) import qualified Data.Text as T import Modal.Display import Moda...
8f6e7b501d0e37aca4dad1d80593da78ece5c8b7d6a5620dc239c7a94bae0259
gleber/erlhask
Pretty.hs
----------------------------------------------------------------------------- -- | -- Module : Language.CoreErlang.Pretty Copyright : ( c ) 2008 ( c ) 2008 -- License : BSD-style (see the file LICENSE) -- Maintainer : < > -- Stability : experimental -- Portability : ...
null
https://raw.githubusercontent.com/gleber/erlhask/0c1b0263a7226d64bd9da0fd5b441eea2f997461/src/Language/CoreErlang/Pretty.hs
haskell
--------------------------------------------------------------------------- | Module : Language.CoreErlang.Pretty License : BSD-style (see the file LICENSE) Stability : experimental Portability : portable --------------------------------------------------------------------------- * Pretty printi...
Copyright : ( c ) 2008 ( c ) 2008 Maintainer : < > Pretty printer for CoreErlang . module Language.CoreErlang.Pretty ( Pretty, prettyPrintStyleMode, prettyPrintWithMode, prettyPrint, P.Style(..), P.style, P.Mode(..), ...
2fa0d4b34ecdc7b7e02b5530abfe3ff26e747443186f00e776e7c6022aed5383
defaultxr/cl-collider-tutorial
id-map.lisp
;;; This id-map implentation code all from ClozureCL. I want use it in SBCL / ECL .... so just I was copy.(1:1 ) ;;; I use id-map for sync to scsynth <---> lisp(#'sync). (in-package #:sc) ;;; ---id map ------------------------------------ (defstruct id-map (vector (make-array 1 :initial-element nil)) (free 0) ...
null
https://raw.githubusercontent.com/defaultxr/cl-collider-tutorial/266ae3e6aaa16d35695266ec884c30626fc8e38d/cl-collider/id-map.lisp
lisp
This id-map implentation code all from ClozureCL. I use id-map for sync to scsynth <---> lisp(#'sync). ---id map ------------------------------------
I want use it in SBCL / ECL .... so just I was copy.(1:1 ) (in-package #:sc) (defstruct id-map (vector (make-array 1 :initial-element nil)) (free 0) (lock (bt:make-recursive-lock))) (defun id-map-grow (id-map) (let* ((old-vector (id-map-vector id-map)) (old-size (length old-vector)) (new-size (+ old-si...
2f85f4c29897cd45d8008cd3af451f3712e63246fa2c5bdb8f408f525c7ffd91
keera-studios/haskell-titan
BouncingBallSF.hs
{-# LANGUAGE Arrows #-} module BouncingBallSF where import FRP.Yampa as Yampa width :: Num a => a width = 640 height :: Num a => a height = 480 bouncingBall :: SF () Double bouncingBall = bouncingBall' (height / 2) 0 >>> arr fst bouncingBall' :: Double -> Double -> SF () (Double, Double) bouncingBall' p0 v0 = swit...
null
https://raw.githubusercontent.com/keera-studios/haskell-titan/958ddd2b468af00db46004a683c1c7aebe81526c/titan-debug-yampa/examples/BouncingBallSF.hs
haskell
# LANGUAGE Arrows #
module BouncingBallSF where import FRP.Yampa as Yampa width :: Num a => a width = 640 height :: Num a => a height = 480 bouncingBall :: SF () Double bouncingBall = bouncingBall' (height / 2) 0 >>> arr fst bouncingBall' :: Double -> Double -> SF () (Double, Double) bouncingBall' p0 v0 = switch (fallingBall p0 v0 >>...
b7e026ed703a676358a3bfe139f73b1fd1a191224119da134b338f8d3cb24221
AshleyYakeley/Truth
PNG.hs
module Data.Media.Image.PNG ( PNGPixelType(..) , pngFormat ) where import Changes.Core import Codec.Picture.Png import Codec.Picture.Types import Data.Media.Image.Metadata import Data.Media.Image.Pixel import Shapes type PNGPixelType :: Type -> Type data PNGPixelType px where Y8PNGPixelType :: PNGPixe...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/7a6a068b029f863b50cced485972e80d1650faf3/Changes/changes-media/lib/Data/Media/Image/PNG.hs
haskell
module Data.Media.Image.PNG ( PNGPixelType(..) , pngFormat ) where import Changes.Core import Codec.Picture.Png import Codec.Picture.Types import Data.Media.Image.Metadata import Data.Media.Image.Pixel import Shapes type PNGPixelType :: Type -> Type data PNGPixelType px where Y8PNGPixelType :: PNGPixe...
982a0c4396e1a90ccc00c407ce5d9669a64fdb038eeee0d638c9eaed25305cc6
aryx/xix
hz_sched.ml
open Common open Types open Scheduler_ let any_higher () = raise Todo (* (interrupt) -> ... -> hz_clock -> <> *) let hz_sched () = let cpu = Globals.cpu () in if any_higher () || (cpu.Cpu.ticks > cpu.Cpu.sched_ticks && Scheduler.any_ready()) then begin (* less: cpu.readied <- None; *) (* todo? wh...
null
https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/kernel/scheduler/hz_sched.ml
ocaml
(interrupt) -> ... -> hz_clock -> <> less: cpu.readied <- None; todo? why not call sched() instead? TODO: up.Proc_.delay_sched <- up.Proc_.delay_sched + 1;
open Common open Types open Scheduler_ let any_higher () = raise Todo let hz_sched () = let cpu = Globals.cpu () in if any_higher () || (cpu.Cpu.ticks > cpu.Cpu.sched_ticks && Scheduler.any_ready()) then begin let up = Globals.up () in raise Todo end
448a0a338175a8388bed550f68e5d7cf519f20e43533e9374e236a6eadcd00d7
andrewthad/colonnade
Colonnade.hs
| Build HTML tables using @yesod@ and To learn how to use this module , first read the documentation for @colonnade@ , and then read the documentation for This library and are entirely distinct ; neither depends on the -- other. However, the interfaces they expose are very similar, and -- the e...
null
https://raw.githubusercontent.com/andrewthad/colonnade/3d9fd928bc118fb40075601db4858863bbd5203a/yesod-colonnade/src/Yesod/Colonnade.hs
haskell
other. However, the interfaces they expose are very similar, and the explanations provided counterpart are sufficient to understand this library. * Build * Apply the HTML content that will go inside it. | Create a 'Cell' from a 'Widget' | Create a 'Cell' from a 'String' | Create a 'Cell' from a 'Text' ...
| Build HTML tables using @yesod@ and To learn how to use this module , first read the documentation for @colonnade@ , and then read the documentation for This library and are entirely distinct ; neither depends on the module Yesod.Colonnade Cell(..) , cell , stringCell , textCell , bui...
125a6119cf4feaf6f7b523a42d239a6933f5a482d2ee9ec39320ce9e5c401853
alanz/ghc-exactprint
T10564.hs
# LANGUAGE FlexibleInstances , FlexibleContexts , UndecidableInstances , DataKinds , TypeFamilies , KindSignatures , PolyKinds , FunctionalDependencies # DataKinds, TypeFamilies, KindSignatures, PolyKinds, FunctionalDependencies #-} module T10564 where class HasFieldM (l :: k) r (v :: Mayb...
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/T10564.hs
haskell
# LANGUAGE FlexibleInstances , FlexibleContexts , UndecidableInstances , DataKinds , TypeFamilies , KindSignatures , PolyKinds , FunctionalDependencies # DataKinds, TypeFamilies, KindSignatures, PolyKinds, FunctionalDependencies #-} module T10564 where class HasFieldM (l :: k) r (v :: Mayb...
7e905211503dee8c3c143a2be580b328376ac00d6138a15872a65c46d7e3220f
mirage/ocaml-git
sync.mli
* Copyright ( c ) 2013 - 2017 < > * and < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVID...
null
https://raw.githubusercontent.com/mirage/ocaml-git/37c9ef41944b5b19117c34eee83ca672bb63f482/src/git/sync.mli
ocaml
* The synchronization commands to a git repository. * Creates a lower-level [Sync] functions [fetch] and [push] that are then overridden by backend-specific implementations such as [Mem] and [Git_unix] src (remote) ref * dst (local) ref * fetches remote references and saves them. Behavior of fetch whe...
* Copyright ( c ) 2013 - 2017 < > * and < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVID...
048be4848c1c58c73d9e0fac9545467eac914300cbc501808d10639e463a5c3b
rubenbarroso/EOPL
6-top.scm
This is 6-top.scm : loader for typed OOP language (let ((time-stamp "Time-stamp: <2000-12-15 16:07:24 wand>")) (eopl:printf "6-top.scm: loader for typed OOP language ~a~%" (substring time-stamp 13 29))) ;;;;;;;;;;;;;;;; top level interface ;;;;;;;;;;;;;;;; (define type-check (lambda (string) (type-to-e...
null
https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/interps/6-top.scm
scheme
top level interface ;;;;;;;;;;;;;;;; the tests are now in test-suite.scm
This is 6-top.scm : loader for typed OOP language (let ((time-stamp "Time-stamp: <2000-12-15 16:07:24 wand>")) (eopl:printf "6-top.scm: loader for typed OOP language ~a~%" (substring time-stamp 13 29))) (define type-check (lambda (string) (type-to-external-form (type-of-program (scan&pars...
7ff563e5844c653def1aeed4cd0769c3e3ca8b3014cda8fe3fb51fdf912d98fb
zeromq/chumak
chumak_acceptance_pub_with_sub.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(chumak_acceptance_pub_with_sub). -include_lib("eunit/include/eunit.hrl"). -define(PORT, 5586). normal_test_() -> [ { ...
null
https://raw.githubusercontent.com/zeromq/chumak/e705fa6db05dc3f4801f5cc71eb18b0e60f7ba35/test/chumak_acceptance_pub_with_sub.erl
erlang
waits for reconnection waits the negotiation
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(chumak_acceptance_pub_with_sub). -include_lib("eunit/include/eunit.hrl"). -define(PORT, 5586). normal_test_() -> [ { ...
64812f0d7e5b2bb1c926333e91daa4a093e0817f9ae5dec94bf8e2f41f6800ef
aiya000/haskell-examples
unfoldr.hs
import Data.List (unfoldr) main :: IO () main = do let xs = unfoldr unfolder defValue ys = foldr folder unit xs zs = unfoldr unfolder ys print xs print ys print zs type Elem = Int defValue :: Elem defValue = 10 unit :: Elem unit = 0 unfolder :: Elem -> Maybe (Elem, Elem) unfolder x = if x == 0 ...
null
https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Data/List/unfoldr.hs
haskell
import Data.List (unfoldr) main :: IO () main = do let xs = unfoldr unfolder defValue ys = foldr folder unit xs zs = unfoldr unfolder ys print xs print ys print zs type Elem = Int defValue :: Elem defValue = 10 unit :: Elem unit = 0 unfolder :: Elem -> Maybe (Elem, Elem) unfolder x = if x == 0 ...
b30851bc1ea67b63d0e7f1efd4385150a004db031fe885551ccbae316e8ee185
ivg/framespector
framespector.ml
open Core_kernel open Bap_main open Bap_core_theory open Bap.Std open Bap_primus.Std open Graphlib.Std module Analysis = Primus.Analysis module Linker = Primus.Linker.Make(Analysis) module Eval = Primus.Interpreter.Make(Analysis) module Memory = Primus.Memory.Make(Analysis) open Analysis.Syntax open Analysis.Let open...
null
https://raw.githubusercontent.com/ivg/framespector/cf536dd567299617145260f238d0c0d5c0ff4a2e/framespector.ml
ocaml
maps byte offset into the open/close tags, since we don't need to know the tag to close it, we just remember the number of times we have to pop the tag stack. px px px
open Core_kernel open Bap_main open Bap_core_theory open Bap.Std open Bap_primus.Std open Graphlib.Std module Analysis = Primus.Analysis module Linker = Primus.Linker.Make(Analysis) module Eval = Primus.Interpreter.Make(Analysis) module Memory = Primus.Memory.Make(Analysis) open Analysis.Syntax open Analysis.Let open...
5632244cabf819c14e1e98ab486009949eb2c66eff6fd27ad83dd0aa4d7e16df
reborg/clojure-essential-reference
2.clj
< 1 > < 2 > j ;; true (future-done? t2) ; <3> ;; false done 10 seconds . < 4 > ;; true
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/OtherFunctions/Concurrency/future/2.clj
clojure
true <3> false true
< 1 > < 2 > j done 10 seconds . < 4 >
5fae5958a03da24e5e2876fbc8c901bc35628f7ed1080c4046fd29d96e44be34
layerware/hugsql
parser.clj
(ns hugsql.parser (:require [clojure.string :as string] [clojure.tools.reader.reader-types :as r])) (defn- parse-error ([rdr msg] (parse-error rdr msg {})) ([rdr msg data] (if (r/indexing-reader? rdr) (throw (ex-info (str msg " line: " (r/get-line-number rdr) ", co...
null
https://raw.githubusercontent.com/layerware/hugsql/7a8909ab323f31a8828e0b610bec0f6602865032/hugsql-core/src/hugsql/parser.clj
clojure
read last peek char off, return nil We're done. This is the end of the type specification. This is the end of the namespace. eat colon (:) eat colon (:) eat ~ eat ~ eat + else end of string, so return all, filtering out empty hdr was read from comment hint clj expr was read from comment so we consider th...
(ns hugsql.parser (:require [clojure.string :as string] [clojure.tools.reader.reader-types :as r])) (defn- parse-error ([rdr msg] (parse-error rdr msg {})) ([rdr msg data] (if (r/indexing-reader? rdr) (throw (ex-info (str msg " line: " (r/get-line-number rdr) ", co...
a66c08b994ab6652aaee9c4aad21dbc386e1c68e627e491c31e641e8bf122ba2
tolysz/prepare-ghcjs
Time.hs
# LANGUAGE CApiFFI # # LANGUAGE CPP # #if __GLASGOW_HASKELL__ >= 709 {-# LANGUAGE Safe #-} #else # LANGUAGE Trustworthy # #endif ----------------------------------------------------------------------------- -- | Module : System . . Time Copyright : ( c ) The University of Glasgow 2002 -- License :...
null
https://raw.githubusercontent.com/tolysz/prepare-ghcjs/8499e14e27854a366e98f89fab0af355056cf055/spec-lts8/unix-bad/System/Posix/Time.hs
haskell
# LANGUAGE Safe # --------------------------------------------------------------------------- | License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : provisional Portability : non-portable (requires POSIX) POSIX Time support ---------------------------------------------...
# LANGUAGE CApiFFI # # LANGUAGE CPP # #if __GLASGOW_HASKELL__ >= 709 #else # LANGUAGE Trustworthy # #endif Module : System . . Time Copyright : ( c ) The University of Glasgow 2002 module System.Posix.Time ( epochTime, ToDo : lots more from sys / time.h ) where import System.Posix.Types ...
cc689d74c0a20f427b6a98b538aba45a5122ec7884def55041fa07244111d326
xxyzz/SICP
Exercise_4_51.rkt
#lang racket/base (require compatibility/mlist) ;; list->mlist ;; -lib/compatibility/mlist.rkt#L68 (define (true? x) (not (eq? x #f))) (define (false? x) (eq? x #f)) (define (self-evaluating? exp) (cond [(number? exp) #t] [(string? exp) #t] [(null? exp) #t] [else #f])) (define (variable? ex...
null
https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/4_Metalinguistic_Abstraction/4.3_Variations_on_a_Scheme_Nondeterministic_Computing/Exercise_4_51.rkt
racket
list->mlist -lib/compatibility/mlist.rkt#L68 formal parameters body no else clause mappend! can't append null list success continuation for evaluating the predicate to obtain pred-value failure continuation for evaluating the predicate success continuation for calling a failure continuation for calling a su...
#lang racket/base (define (true? x) (not (eq? x #f))) (define (false? x) (eq? x #f)) (define (self-evaluating? exp) (cond [(number? exp) #t] [(string? exp) #t] [(null? exp) #t] [else #f])) (define (variable? exp) (symbol? exp)) (define (quoted? exp) (tagged-list? exp 'quote)) (define (text-...
5ed90461954b9c9852fd9d9d240b08974d566896aa868ecf5609b1920d693f0a
patoline/patoline
FormatThese.ml
Copyright Florian Hatat , , , Pierre - Etienne Meunier , , 2012 . This file is part of Patoline . Patoline is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of th...
null
https://raw.githubusercontent.com/patoline/patoline/3dcd41fdff64895d795d4a78baa27d572b161081/formats/FormatThese.ml
ocaml
let shorter l= in let fam alt l= match shorter it,shorter regular with h::_,h'::_->[alt,((simpleFamilyMember (Fonts.loadFont h)), | h::_,_ | _,h::_->[alt, ((simpleFamilyMember (Fonts.loadFont h)), (simpleFamilyMember (Fonts.loadFont h)))] ...
Copyright Florian Hatat , , , Pierre - Etienne Meunier , , 2012 . This file is part of Patoline . Patoline is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of th...
31e10e7277ea7b22b912b6b6ce6b593167bf93951c10802de14408ad8776aa2c
ocurrent/ocurrent
utils.ml
module Server = Cohttp_lwt_unix.Server module Path = Cohttp.Path let string_of_timestamp time = let { Unix.tm_year; tm_mon; tm_mday; tm_hour; tm_min; tm_sec; _ } = time in Fmt.str "%04d-%02d-%02d %02d:%02d:%02d" (tm_year + 1900) (tm_mon + 1) tm_mday tm_hour tm_min tm_sec
null
https://raw.githubusercontent.com/ocurrent/ocurrent/7c5f34d2ae81899e6fa9734a6e1619a3aaf08838/lib_web/utils.ml
ocaml
module Server = Cohttp_lwt_unix.Server module Path = Cohttp.Path let string_of_timestamp time = let { Unix.tm_year; tm_mon; tm_mday; tm_hour; tm_min; tm_sec; _ } = time in Fmt.str "%04d-%02d-%02d %02d:%02d:%02d" (tm_year + 1900) (tm_mon + 1) tm_mday tm_hour tm_min tm_sec
328da356e30ca969270c92f53dbf7f0c0a17987d5ebea9da65d816925e56fd9e
clojurecup2014/parade-route
dm-test.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 ; ...
null
https://raw.githubusercontent.com/clojurecup2014/parade-route/adb2e1ea202228e3da07902849dee08f0bb8d81c/Assets/Clojure/Internal/Plugins/clojure/dm-test.clj
clojure
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 of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns clojure.test) (defn test-if [i n] ( if (> i n) 'a 'b)) (defn test-if2-test [i n] (> i n)) (defn test-if2 [i n] (if (test-if2-test i n) 'a 'b)) (defn test-if3 [i n] (if i n 'b)) basic check of type tagging from the Clojure docs : (defn len [x] (. x Length)) ...
0cf01368b72ccea419c479a23dfa01917a6d311b8f7080af37f6007b34da280d
ghc/testsuite
tcfail044.hs
-- !!! tcfail044: duplicated type variable in instance decls -- module ShouldFail where instance (Eq a) => Eq (a->a) instance Show (a->b) instance (Num a) => Num (a->a) where f + g = \x -> f x + g x negate f = \x -> - (f x) f * g = \x -> f x * g x fromInteger n = \x -> fromInteger n ss :: Float...
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail044.hs
haskell
!!! tcfail044: duplicated type variable in instance decls
module ShouldFail where instance (Eq a) => Eq (a->a) instance Show (a->b) instance (Num a) => Num (a->a) where f + g = \x -> f x + g x negate f = \x -> - (f x) f * g = \x -> f x * g x fromInteger n = \x -> fromInteger n ss :: Float -> Float cc :: Float -> Float tt :: Float -> Float ss = sin * ...
029459c5aacda28b9acc39c34a0af8ae9357d151bbf22515f74d6f67aba78707
haskell-tools/haskell-tools
ConditionalSubImport_res.hs
# LANGUAGE CPP # module CPP.ConditionalSubImport where import Data.List( #if __GLASGOW_HASKELL__ >= 710 sortOn #endif ) a = sortOn fst [("a","x")]
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/CPP/ConditionalSubImport_res.hs
haskell
# LANGUAGE CPP # module CPP.ConditionalSubImport where import Data.List( #if __GLASGOW_HASKELL__ >= 710 sortOn #endif ) a = sortOn fst [("a","x")]
9cddbcb4b3fb39921ee453c6e85f239f981a959b4c923bffefe2864e352eb2d7
liquidz/jubot
util_test.clj
(ns jubot.adapter.util-test (:require [jubot.adapter.util :refer :all] [clojure.test :refer :all])) (deftest test-parse-text (are [x y] (= x (parse-text "foo" y)) {:to "foo" :text "bar" :message-for-me? true} "foo bar" {:to "foo" :text "bar" :message-for-me? true} "foo: bar" ...
null
https://raw.githubusercontent.com/liquidz/jubot/0a2d7b18db801c3fe72f7ff216e8381df9b40815/test/jubot/adapter/util_test.clj
clojure
(ns jubot.adapter.util-test (:require [jubot.adapter.util :refer :all] [clojure.test :refer :all])) (deftest test-parse-text (are [x y] (= x (parse-text "foo" y)) {:to "foo" :text "bar" :message-for-me? true} "foo bar" {:to "foo" :text "bar" :message-for-me? true} "foo: bar" ...
7bdf655c061f465814fb3c33eaac6c1e99d25d6f72f7109321fc7870cbbc9128
janestreet/memtrace_viewer_with_deps
command_intf.ml
* Purely functional command line parsing . Here is a simple example : { [ let ( ) = let open Command . Let_syntax in Command.basic ~summary:"cook eggs " [ % map_open let num_eggs = flag " num - eggs " ( required int ) ~doc:"...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/core_kernel/src/command_intf.ml
ocaml
TODO: implement egg-cooking in ocaml * Argument types. * The type of a command line argument. * An argument type includes information about how to parse values of that type from the command line, and (optionally) how to autocomplete partial arguments of that type via bash's programmable tab-completi...
* Purely functional command line parsing . Here is a simple example : { [ let ( ) = let open Command . Let_syntax in Command.basic ~summary:"cook eggs " [ % map_open let num_eggs = flag " num - eggs " ( required int ) ~doc:"...
1ae6b1838dfcaf805d621207af97d98dc2ed297c6494a561a527d6f5e2068627
smallhadroncollider/ascii-runner
Actions.hs
module Actions ( jump , frame , restart ) where import ClassyPrelude import Control.Lens ((&), (^.), (.~), (%~), (+~)) import Types (Player, Direction(..), UI, Direction(..), State(..), Obstacles, reset, player, position, obstacles, state, speed, dimensions) import Loop (fps) restart :: UI -> UI restart ui =...
null
https://raw.githubusercontent.com/smallhadroncollider/ascii-runner/42eb674b4a997241a384c43f64e668e379519d97/src/Actions.hs
haskell
internal functions
module Actions ( jump , frame , restart ) where import ClassyPrelude import Control.Lens ((&), (^.), (.~), (%~), (+~)) import Types (Player, Direction(..), UI, Direction(..), State(..), Obstacles, reset, player, position, obstacles, state, speed, dimensions) import Loop (fps) restart :: UI -> UI restart ui =...
2921c0fccead5bdab594873f38db7df5fcfcc813ab99cf986d7854eacffb5c6c
vikram/lisplibraries
http.lisp
-*- package : ; Syntax : Common - lisp ; Base : 10 -*- ;;; ;;;; http-client.lisp ;;; ;;; ;;; -------------------------------------------------------------------------------------- ;;; ;;; The contents of this file are subject to the NOKOS License Version 1.0a (the ;;; "License"); you may not use this file exce...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/wilbur/core/http.lisp
lisp
Syntax : Common - lisp ; Base : 10 -*- http-client.lisp -------------------------------------------------------------------------------------- The contents of this file are subject to the NOKOS License Version 1.0a (the "License"); you may not use this file except in compliance with the License. WARR...
Software distributed under the License is distributed on an " AS IS " basis , WITHOUT The Original Software is WILBUR2 : Nokia Semantic Web Toolkit for CLOS Copyright ( c ) 2001 - 2005 Nokia and others . All Rights Reserved . Portions Copyright ( c ) 1989 - 1992 . All Rights Reserved . Cont...
bbbfe6993ef0220b0b1eeb53b0e3cf62227b1f55ea321303c99ecc4e31de16da
yapsterapp/er-cassandra
delete.clj
(ns er-cassandra.model.delete (:require [cats.core :refer [mlet return]] [cats.context :refer [with-context]] [cats.labs.manifold :refer [deferred-context]] [manifold.deferred :as d] [prpr.promise :as promise :refer [ddo]] [prpr.stream :as s] [er-cassandra.model.model-session :as ms] [er-cassa...
null
https://raw.githubusercontent.com/yapsterapp/er-cassandra/1d059f47bdf8654c7a4dd6f0759f1a114fdeba81/src/er_cassandra/model/delete.clj
clojure
(ns er-cassandra.model.delete (:require [cats.core :refer [mlet return]] [cats.context :refer [with-context]] [cats.labs.manifold :refer [deferred-context]] [manifold.deferred :as d] [prpr.promise :as promise :refer [ddo]] [prpr.stream :as s] [er-cassandra.model.model-session :as ms] [er-cassa...
90b21194355fa2d71269dfd31284f2cb61cdffb87f2b6a9012e1e13eb5eadd19
vyzo/gerbil
srfi-95.scm
;;; "sort.scm" Defines: sorted?, merge, merge!, sort, sort! Author : ( based on Prolog code by D.H.D.Warren ) ;;; ;;; This code is in the public domain. Updated : 11 June 1991 Modified for scheme library : 19 Sept. 1991 Updated : 19 June 1995 ( sort , sort ! , sorted ? ): Generalized to strings by jaffe...
null
https://raw.githubusercontent.com/vyzo/gerbil/17fbcb95a8302c0de3f88380be1a3eb6fe891b95/src/std/srfi/srfi-95.scm
scheme
"sort.scm" Defines: sorted?, merge, merge!, sort, sort! This code is in the public domain. (sort, sort!, sorted?, merge, merge!): Added optional KEY argument. (sorted?, merge, merge!, sort, sort!): Call KEY arg at most once per element. (sorted? sequence less?) such that for all 1 <= i <= m, (not (less? (list-...
Author : ( based on Prolog code by D.H.D.Warren ) Updated : 11 June 1991 Modified for scheme library : 19 Sept. 1991 Updated : 19 June 1995 ( sort , sort ! , sorted ? ): Generalized to strings by jaffer : 2003 - 09 - 09 ( sort , sort ! , sorted ? ): Generalized to arrays by jaffer : 2003 - 10 - 04 j...
c67a4903213f3c18dec459b525b409d8d71b4fb3831d4b2d2c9612d59c2ca608
ndmitchell/shake
Ids.hs
# LANGUAGE RecordWildCards , BangPatterns , GADTs , UnboxedTuples # -- Note that argument order is more like IORef than Map, because its mutable module General.Ids( Ids, Id(..), empty, insert, lookup, fromList, null, size, sizeUpperBound, forWithKeyM_, forCopy, forMutate, toList, elems, toMap )...
null
https://raw.githubusercontent.com/ndmitchell/shake/99c5a7a4dc1d5a069b13ed5c1bc8e4bc7f13f4a6/src/General/Ids.hs
haskell
Note that argument order is more like IORef than Map, because its mutable # UNPACK # ^ Number of entries in values, initially 0 # UNPACK #
# LANGUAGE RecordWildCards , BangPatterns , GADTs , UnboxedTuples # module General.Ids( Ids, Id(..), empty, insert, lookup, fromList, null, size, sizeUpperBound, forWithKeyM_, forCopy, forMutate, toList, elems, toMap ) where import Data.IORef.Extra import Data.Primitive.Array hiding (fromList)...
ce523d87bbcd9f3ce6106ebe43a4c4e3fd38ed6319a5d37d4cc779f831dce897
melisgl/mgl-pax
autoload.lisp
(in-package :mgl-pax) DEFUN name to be a function that loads ASDF - SYSTEM - NAME then calls ;;; the function of the same name (presumed to have been redefined by ;;; the loaded system). (defmacro autoload (name asdf-system-name &key (export t)) `(eval-when (:compile-toplevel :load-toplevel :execute) (unless ...
null
https://raw.githubusercontent.com/melisgl/mgl-pax/849ae416216e3ff32b4a016f48de2e8a7fc43ba0/src/base/autoload.lisp
lisp
the function of the same name (presumed to have been redefined by the loaded system). Prevent infinite recursion which would happen if the loaded system doesn't redefine the function. Make sure that the function redefined by LOAD-SYSTEM is invoked and not this stub, which could be the case without the SYMBOL-FUN...
(in-package :mgl-pax) DEFUN name to be a function that loads ASDF - SYSTEM - NAME then calls (defmacro autoload (name asdf-system-name &key (export t)) `(eval-when (:compile-toplevel :load-toplevel :execute) (unless (fboundp ',name) (declaim (notinline ,name)) (defun ,name (&rest args) ...
6e3debc51532319761718b6f79409225533d80e59d1dfdc1d2d3e2fcb99d4974
forsyde/forsyde-shallow
Vector.hs
----------------------------------------------------------------------------- -- | -- Module : ForSyDe.Shallow.Core.Vector Copyright : ( c ) ForSyDe Group , KTH 2007 - 2019 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : -- Stability : experimental -- Portability : portable --...
null
https://raw.githubusercontent.com/forsyde/forsyde-shallow/a0ffc85270fb0cf5f169d031a381b414c677ddae/src/ForSyDe/Shallow/Core/Vector.hs
haskell
--------------------------------------------------------------------------- | Module : ForSyDe.Shallow.Core.Vector License : BSD-style (see the file LICENSE) Maintainer : Stability : experimental Portability : portable This module defines the data type 'Vector' and the corresponding functio...
Copyright : ( c ) ForSyDe Group , KTH 2007 - 2019 < -data > or _ _ OBS : _ _ The lengths in the API documentation for function arguments module ForSyDe.Shallow.Core.Vector ( Vector (..), (<+>), (<:), nullV, lengthV, vector, fromVector, unitV, iterateV, generateV, copyV, mapV, zipWithV, zipWith3V...
fff7aadda166ebe66fa2cf06057c40c1392824aefa02e8662e66f3671ee57c4d
janestreet/memtrace_viewer_with_deps
screen.ml
open! Core_kernel open! Import include Screen_intf type t = { data : Texel.t array array ; rows : int ; cols : int } [@@deriving compare, sexp_of] let create ~rows ~cols = let data = Array.make_matrix ~dimx:rows ~dimy:cols (Char ([], Uchar.of_char ' ') : Texel.t) in { data; rows; cols } ;; let set_...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/textutils/ascii_table/kernel/screen.ml
ocaml
open! Core_kernel open! Import include Screen_intf type t = { data : Texel.t array array ; rows : int ; cols : int } [@@deriving compare, sexp_of] let create ~rows ~cols = let data = Array.make_matrix ~dimx:rows ~dimy:cols (Char ([], Uchar.of_char ' ') : Texel.t) in { data; rows; cols } ;; let set_...
da09b04f8cdf153e39e7da32b68f72da70d885bde3d903cffcce566e911bd193
sarabander/p2pu-sicp
3.24.scm
(define (same-key? key1 key2) (define tolerance 0.01) (if (and (number? key1) (number? key2)) (< (abs (- key1 key2)) tolerance) (equal? key1 key2))) (define (make-table comparator) (let ((local-table (list '*table*))) (define (lookup key-1 key-2) (let ((subtable (myassoc key-1 (cdr local-t...
null
https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/3.3/3.24.scm
scheme
venus
(define (same-key? key1 key2) (define tolerance 0.01) (if (and (number? key1) (number? key2)) (< (abs (- key1 key2)) tolerance) (equal? key1 key2))) (define (make-table comparator) (let ((local-table (list '*table*))) (define (lookup key-1 key-2) (let ((subtable (myassoc key-1 (cdr local-t...
101f3b098269dce4f5f051b3a23d3c2e9e1899381caba3ed2b257ec25f380668
jmid/qcstm
qCSTM.ml
(** A simple state machine framework based on QCheck *) open QCheck * { 1 A state machine framework for property - based testing of imperative code } * This library implements a simple , typed state machine framework for property - based testing of imperative code . It takes inspiration from the com...
null
https://raw.githubusercontent.com/jmid/qcstm/cd8f06fc23309c0b6f8c2e8339a0b69d700e2936/src/qCSTM.ml
ocaml
* A simple state machine framework based on QCheck * The specification of a state machine. * The type of commands * The type of the model's state * The type of the system under test * A command generator. Accepts a state parameter to enable state-dependent [cmd] generation. * The model's initial state. * Move...
open QCheck * { 1 A state machine framework for property - based testing of imperative code } * This library implements a simple , typed state machine framework for property - based testing of imperative code . It takes inspiration from the commercial Erlang state machine framework from Quviq ...
a287bcfd310c83846665a8cbf1ab4f1149fdcd31ae1ef1ce4d61a935f70d0bc1
roehst/tapl-implementations
syntax.ml
open Format open Support.Error open Support.Pervasive (* ---------------------------------------------------------------------- *) type ty = TyVar of int * int | TyId of string | TyTop | TyArr of ty * ty | TyBool | TyRecord of (string * ty) list | TyString | TyUnit | TyFloat | TyNat type ter...
null
https://raw.githubusercontent.com/roehst/tapl-implementations/23c0dc505a8c0b0a797201a7e4e3e5b939dd8fdb/fullsub/syntax.ml
ocaml
---------------------------------------------------------------------- ---------------------------------------------------------------------- Context management ---------------------------------------------------------------------- Shifting --------------------------------------------------------------------...
open Format open Support.Error open Support.Pervasive type ty = TyVar of int * int | TyId of string | TyTop | TyArr of ty * ty | TyBool | TyRecord of (string * ty) list | TyString | TyUnit | TyFloat | TyNat type term = TmVar of info * int * int | TmAbs of info * string * ty * term | ...
b219a2ff3eb6872736351349371e0596b4e07ef97d0cf76b34c3a9b3e61a0629
typedclojure/typedclojure
subtype.clj
(ns typed-test.cljs.checker.subtype (:require [clojure.test :refer [deftest]] [typed.clj.checker.parse-unparse :as prs] [typed.clj.checker.subtype :as sub] [typed.cljc.checker.type-rep :as r] [typed.cljs.checker.test-utils :refer [is-cljs]])) (deftest subtype-prims-clj...
null
https://raw.githubusercontent.com/typedclojure/typedclojure/f0f736bdeb2cbdb86a1194aa8217cf5e9cb675c7/typed/cljs.checker/test/typed_test/cljs/checker/subtype.clj
clojure
(ns typed-test.cljs.checker.subtype (:require [clojure.test :refer [deftest]] [typed.clj.checker.parse-unparse :as prs] [typed.clj.checker.subtype :as sub] [typed.cljc.checker.type-rep :as r] [typed.cljs.checker.test-utils :refer [is-cljs]])) (deftest subtype-prims-clj...
dd60f8eace4d9ef66c203a83de17a7a43f18f5c586afb122299bed47ffeafb4d
hasktorch/hasktorch
Model.hs
# LANGUAGE FunctionalDependencies # # LANGUAGE RecordWildCards # module Model where import Control.Monad (when) import Torch model :: Linear -> Tensor -> Tensor model state input = squeezeAll $ linear state input groundTruth :: Tensor -> Tensor groundTruth t = squeezeAll $ matmul t weight + bias where weight ...
null
https://raw.githubusercontent.com/hasktorch/hasktorch/8fa4d2a6cdb7f144484f7d24d8d4924fb0faecd2/examples/model-serving/02-train-inference/Model.hs
haskell
# LANGUAGE FunctionalDependencies # # LANGUAGE RecordWildCards # module Model where import Control.Monad (when) import Torch model :: Linear -> Tensor -> Tensor model state input = squeezeAll $ linear state input groundTruth :: Tensor -> Tensor groundTruth t = squeezeAll $ matmul t weight + bias where weight ...
d0adcb47adac9af84dd16be411c0a892eb1267d8f5176a6f1dc35233e21f054a
pascalh/Astview
Setup.hs
import Distribution.Simple(defaultMain) main :: IO () main = defaultMain
null
https://raw.githubusercontent.com/pascalh/Astview/3c0677b033a1d0366202048be273861e98a04e2a/Setup.hs
haskell
import Distribution.Simple(defaultMain) main :: IO () main = defaultMain
b82eeeadf59e873bc796c0f0a2bf006f5b0af29130f8df8d2facbdec501be965
gheber/kenzo
02_Objects_with_effective_homology.lisp
(load "common.lisp") (ql:quickload "kenzo") ( use - package : cat-7 ) ;;(use-package :cat-8) ;;(use-package :cat-9) (use-package :cat) (==> (defun cdelta (dmns) (build-chcm :cmpr #'l-cmpr :basis :locally-effective :bsgn '(0) :intr-dffr #'(lambda (degr gmsm) (...
null
https://raw.githubusercontent.com/gheber/kenzo/48e2ea398b80f39d3b5954157a7df57e07a362d7/doc/org/02_Objects_with_effective_homology.lisp
lisp
(use-package :cat-8) (use-package :cat-9)
(load "common.lisp") (ql:quickload "kenzo") ( use - package : cat-7 ) (use-package :cat) (==> (defun cdelta (dmns) (build-chcm :cmpr #'l-cmpr :basis :locally-effective :bsgn '(0) :intr-dffr #'(lambda (degr gmsm) (make-cmbn :degr (1- degr) ...
e717026f88afcc2549434ac3561dbd84c62f9ea4f464734527ad4acf1f4f4885
KestrelInstitute/Specware
Tests.lisp
(test-directories ".") (test ("Bug 0074 : Similarity of definitions often missed." :show "EquivalentTypes#XX" :output '(";;; Elaborating diagram-colimit at $TESTDIR/EquivalentTypes#XX" ";;; Elaborating diagram-term at $TESTDIR/EquivalentTypes#DD" ";;; Elaborating spec-morphism at $TESTDIR/Equivalen...
null
https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/TestSuite/Bugs/Bug_0074/Tests.lisp
lisp
(test-directories ".") (test ("Bug 0074 : Similarity of definitions often missed." :show "EquivalentTypes#XX" :output '(";;; Elaborating diagram-colimit at $TESTDIR/EquivalentTypes#XX" ";;; Elaborating diagram-term at $TESTDIR/EquivalentTypes#DD" ";;; Elaborating spec-morphism at $TESTDIR/Equivalen...
945e0a95f90f1d3ad2418fe40eb20a8e4cc306e125a70377e4b50ca3b9cce5e8
learningclojurescript/code-examples
core_test.cljs
(ns testing.core-test (:require [cljs.test :refer-macros [deftest is testing]])) (deftest i-should-fail (is (= 1 0))) (deftest i-should-succeed (is (= 1 1)))
null
https://raw.githubusercontent.com/learningclojurescript/code-examples/fdbd0e35ae5a16d53f1f784a52c25bcd4e5a8097/chapter-8/testing/test/testing/core_test.cljs
clojure
(ns testing.core-test (:require [cljs.test :refer-macros [deftest is testing]])) (deftest i-should-fail (is (= 1 0))) (deftest i-should-succeed (is (= 1 1)))
b215d91bc442dd230308d214ae4c7f859ccbae404f5996bc714f50c5134e0503
Javran/advent-of-code
Day21.hs
module Javran.AdventOfCode.Y2018.Day21 ( ) where import Control.Monad import Control.Monad.State.Strict import Data.Bits import qualified Data.IntSet as IS import qualified Data.Vector as V import Javran.AdventOfCode.Prelude import Javran.AdventOfCode.Y2018.Day16 (OpType (..), ValueMode (..)) import Javran.AdventOfC...
null
https://raw.githubusercontent.com/Javran/advent-of-code/676ef13c2f9d341cf7de0f383335a1cf577bd73d/src/Javran/AdventOfCode/Y2018/Day21.hs
haskell
note that here we need the value right before running into a loop.
module Javran.AdventOfCode.Y2018.Day21 ( ) where import Control.Monad import Control.Monad.State.Strict import Data.Bits import qualified Data.IntSet as IS import qualified Data.Vector as V import Javran.AdventOfCode.Prelude import Javran.AdventOfCode.Y2018.Day16 (OpType (..), ValueMode (..)) import Javran.AdventOfC...
f479f32cc71b1a35bec4f8d784647d670ed2cc3d71b8305752af73359945aff0
CarlosMChica/HaskellBook
StrictTest4.hs
{-# LANGUAGE BangPatterns #-} module StrictTest4 where data List a = Nil | Cons !a !(List a) deriving Show sTake :: Int -> List a -> List a sTake n _ | n <= 0 = Nil stake n Nil = Nil stake n (Cons x xs) = (Cons x (stake (n - 1) xs)) twoEls = Cons 1 (Cons undefined Nil) oneEl = sTake 1 twoEls main :: IO () main = d...
null
https://raw.githubusercontent.com/CarlosMChica/HaskellBook/86f82cf36cd00003b1a1aebf264e4b5d606ddfad/chapter27/StrictTest4.hs
haskell
# LANGUAGE BangPatterns # Blows up Blows up
module StrictTest4 where data List a = Nil | Cons !a !(List a) deriving Show sTake :: Int -> List a -> List a sTake n _ | n <= 0 = Nil stake n Nil = Nil stake n (Cons x xs) = (Cons x (stake (n - 1) xs)) twoEls = Cons 1 (Cons undefined Nil) oneEl = sTake 1 twoEls main :: IO () main = do
da0c14ecdc794df3e14c6596ca39e7802ab964bbe85115c9d8f1903747a03cba
mistupv/cauder
cauder_syntax.erl
%%%----------------------------------------------------------------------------- %%% @doc CauDEr syntax trees. %%% This module defines functions that transform "parse trees" to custom syntax trees based on the ones used by the Erlang debugger . %%% @see erl_parse %%% @end %%%------------------------------------------...
null
https://raw.githubusercontent.com/mistupv/cauder/c9bfb72a4aed70979e53f4b3ca4a085a19b6c195/src/cauder_syntax.erl
erlang
----------------------------------------------------------------------------- @doc CauDEr syntax trees. This module defines functions that transform "parse trees" to custom syntax @see erl_parse @end ----------------------------------------------------------------------------- API Clauses ------------------------...
trees based on the ones used by the Erlang debugger . -module(cauder_syntax). -export([clauses/1, expr_list/1]). -export([replace_variable/3]). -export([to_abstract_expr/1]). -export([remote_call/3]). -ifdef(EUNIT). -export([pattern/1]). -export([guard_test/1]). -export([gexpr/1]). -export([expr/1]). -endif. -exp...
5e67097825bed7ad62b080cd2c4a449864e01cc9e303388485827ff57cb9fbde
mzp/coq-ide-for-ios
checker.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/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/checker/checker.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** By the option -include -I or -R of ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * $ I d : coqtop.ml 10153 200...
113ced0bfc3197b3ae01148dbad76ae26385791effb7547406ad1b76767d2324
OCamlPro/ez_pgocaml
ezPGUpdater.mli
(**************************************************************************) (* *) Copyright 2018 - 2021 OCamlPro (* *) (* All right...
null
https://raw.githubusercontent.com/OCamlPro/ez_pgocaml/e84e6835e6048a27fcdfdc58403ca3a8ce16d744/src/ezPGUpdater.mli
ocaml
************************************************************************ All rights reserved. This file is distributed under the terms of the exception on linking descr...
Copyright 2018 - 2021 OCamlPro GNU Lesser General Public License version 2.1 , with the special val main : ?downgrades: (int * string list) list -> upgrades:(int * (unit PGOCaml.t -> int -> unit)) list -> string -> unit
d4874a28e2b3985ab0be50c6bc1c918828f4d34682074c7efd75720cec23f1b7
glebec/haskell-programming-allen-moronuki
Ex23_8.hs
module Ex23_8 where import Ex23_6 1 . get' :: Moi s s get' = Moi $ \s -> (s, s) 2 . put' :: s -> Moi s () put' s = Moi $ const ((), s) 3 . exec' :: Moi s a -> s -> s exec' (Moi s2as) s = snd $ s2as s 4 . eval' :: Moi s a -> s -> a eval' (Moi s2as) s = fst $ s2as s 5 . myModify :: (s -> s) -> Moi s ...
null
https://raw.githubusercontent.com/glebec/haskell-programming-allen-moronuki/99bd232f523e426d18a5e096f1cf771228c55f52/23-state/exercises/src/Ex23_8.hs
haskell
module Ex23_8 where import Ex23_6 1 . get' :: Moi s s get' = Moi $ \s -> (s, s) 2 . put' :: s -> Moi s () put' s = Moi $ const ((), s) 3 . exec' :: Moi s a -> s -> s exec' (Moi s2as) s = snd $ s2as s 4 . eval' :: Moi s a -> s -> a eval' (Moi s2as) s = fst $ s2as s 5 . myModify :: (s -> s) -> Moi s ...
9e0973cdaa2bfd172e2cde4636005a20f91c570291949bebffb3abaab37cb27b
mgritter/aoc-lh
Main.hs
module Main (main) where import LoadLines import Data.List data ListEntry = LE { originalIndex :: Int, value :: Int } @ assume findIndex : : ( a - > Bool ) - > xs:[a ] - > Maybe { i : | i < len xs } @ @ findOriginalIndex : : Int - > le:[ListEntry ] - > Maybe { i : | i < len le } @ -> Maybe {i:Nat | i < ...
null
https://raw.githubusercontent.com/mgritter/aoc-lh/9518fb7d783eb3c077b2b057bb04d794825e89e3/2022/day20/Main.hs
haskell
XXABYYXXXXXXXXXX XBYYAXXXXXXXXXX XABYYXXXXXXXXXX And, of course, A = B Move the entry at position "from" to position "to" (head (tail l2)) = (head l1)) to < from FIGURE THIS OUT WHEN LESS TIRED! (Tired mark says: you're not wrapping around all N elements because you don't lea...
module Main (main) where import LoadLines import Data.List data ListEntry = LE { originalIndex :: Int, value :: Int } @ assume findIndex : : ( a - > Bool ) - > xs:[a ] - > Maybe { i : | i < len xs } @ @ findOriginalIndex : : Int - > le:[ListEntry ] - > Maybe { i : | i < len le } @ -> Maybe {i:Nat | i < ...
062ce84f00dcd0fbb842db193dfc1e6f96bdd8e61c9af1bc0b7dc452adb9a27f
bnoordhuis/chicken-core
irregex.scm
;;;; irregex.scm - container for irregex-core.scm ; Copyright ( c ) 2010 - 2013 , The Chicken Team ; 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 retai...
null
https://raw.githubusercontent.com/bnoordhuis/chicken-core/56d30e3be095b6abe1bddcfe10505fa726a43bb5/irregex.scm
scheme
irregex.scm - container for irregex-core.scm 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 list of conditions and th...
Copyright ( c ) 2010 - 2013 , The Chicken Team THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE...
26271e9d4c0e0c186d227beecb8ca59f7251dd00144ea035d373212ecf1429e2
re-ops/re-cipes
jdk17.clj
(ns re-cipes.development.jdk17 "Setting up Amazon correto jdk 17" (:require [re-cipes.access :refer (permissions)] [clojure.core.strint :refer (<<)] [re-cog.resources.file :refer (file line)] [re-cog.resources.package :refer (package key-file update-)] [re-cog.resources.user :refer (group-add)] [r...
null
https://raw.githubusercontent.com/re-ops/re-cipes/d6d24f34b571316ae46a6378ae4ceea468aad050/src/re_cipes/development/jdk17.clj
clojure
(ns re-cipes.development.jdk17 "Setting up Amazon correto jdk 17" (:require [re-cipes.access :refer (permissions)] [clojure.core.strint :refer (<<)] [re-cog.resources.file :refer (file line)] [re-cog.resources.package :refer (package key-file update-)] [re-cog.resources.user :refer (group-add)] [r...
9c02104adbe05a86eb9d221e010baee8d38d262d339ea78801622c4cd91ae75a
leondavi/NErlNet
nerlGUI_app.erl
%%%------------------------------------------------------------------- %% @doc nerlGUI public API %% @end %%%------------------------------------------------------------------- -module(nerlGUI_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> application:start(sasl), ...
null
https://raw.githubusercontent.com/leondavi/NErlNet/483ae9f33fc85ae704988656dcf2f6c3eaf8f557/src_erl/NerlGUI/src/nerlGUI_app.erl
erlang
------------------------------------------------------------------- @doc nerlGUI public API @end ------------------------------------------------------------------- internal functions
-module(nerlGUI_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> application:start(sasl), application:start(ranch), application:start(inets), GUI = wx:new(), StartFrame = mainScreen:new(GUI, ""), io:format("Main Frame Gen is: ~p~n", [StartFrame...
9fab72d12602e7dd020fc275223e14d7525a0abaacdcb619dc05f04452fb7d10
alexander-yakushev/compliment
t_helpers.clj
(ns compliment.t-helpers) (defn strip-tags "Returns a wrapper predicate that first removes tags from the list of candidates." [completions] (map :candidate completions))
null
https://raw.githubusercontent.com/alexander-yakushev/compliment/a112bb85b748d4a34da89ee783e7c64d8183dab7/test/compliment/t_helpers.clj
clojure
(ns compliment.t-helpers) (defn strip-tags "Returns a wrapper predicate that first removes tags from the list of candidates." [completions] (map :candidate completions))
677e42681587070690d4f4e9eed9f19fbbd732601240f640420b7379d2d8a9c6
spilgames/spapi-router
spr_router.erl
-module(spr_router). -export([list_workers/0, list_workers/1, list_nodes/0, list_hosts/0, call/1, call/4, call/5, call_all/5, invoke/2]). -ifdef('TEST'). -export([ get_call_type/1, to_run/1, log_call/6, invoke_by_type/8 ]). -endif. -define(DEFAULT_TIMEOUT, 4500). ...
null
https://raw.githubusercontent.com/spilgames/spapi-router/91485502538a36a0f4ee76d59faaf91f57ec88bb/src/spr_router.erl
erlang
integer() optional | required | never This module routes requests to services It periodically scans for running applications and parses Application names and keeps routing information in an ETS table access routing information without going through a gen_server ------------------------------------------------...
-module(spr_router). -export([list_workers/0, list_workers/1, list_nodes/0, list_hosts/0, call/1, call/4, call/5, call_all/5, invoke/2]). -ifdef('TEST'). -export([ get_call_type/1, to_run/1, log_call/6, invoke_by_type/8 ]). -endif. That way other applications ( ru...
bc749752b37c2a801985f165a72d938ae3e4957afeb55e7571c2264af7d29373
cojna/iota
Prim.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE LambdaCase # module Data.Graph.Dense.Prim where import Control.Monad (when) import qualified Data.Vector.Fusion.Stream.Monadic as MS import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Unboxed.Mutable as UM import My.Prelude (rep, stream) -- | /O(V^2)/ pri...
null
https://raw.githubusercontent.com/cojna/iota/6d2ad5b71b1b50bca9136d6ed84f80a0b7713d7c/src/Data/Graph/Dense/Prim.hs
haskell
# LANGUAGE BangPatterns # | /O(V^2)/ | n | root | adjacent matrix (n x n) | parent (parent[root] = -1)
# LANGUAGE LambdaCase # module Data.Graph.Dense.Prim where import Control.Monad (when) import qualified Data.Vector.Fusion.Stream.Monadic as MS import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Unboxed.Mutable as UM import My.Prelude (rep, stream) primDense :: (U.Unbox w, Num w, Ord w) => I...
ffb7bbd15e3a14619415cfae6e4439b87dc6b63f4bbd269b551283223e55fba1
liqd/aula
Pure.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE ImpredicativeTypes # {-# LANGUAGE L...
null
https://raw.githubusercontent.com/liqd/aula/f96dbf85cd80d0b445e7d198c9b2866bed9c4e3d/src/Persistent/Pure.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DeriveDataTypeable # # LANGUAGE FlexibleContexts # # LANGUAGE GADTs # # LANGUAGE LambdaCase # # LANGUAGE OverloadedStrings # # LANGUAGE TemplateHaskell # # LANGUAGE TypeOperators ...
# LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE ImpredicativeTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # OPTIONS_GHC -Wall -Werror -fno - warn - orphans # | This module exports acid - state transactions . It...
2c5591cad83a2aad744ad526c3ec3ff18e70dc8f53083ee55b9e7b5dcff5b3f0
ferdinand-beyer/refx
subs.cljc
(ns refx.subs (:require [refx.interop :as interop] [refx.registry :as registry] [refx.utils :as utils])) (def kind :sub) ;; --- signals ---------------------------------------------------------------- (defprotocol ISignal "Protocol for signal types. Very similar to IDeref + IWatchable...
null
https://raw.githubusercontent.com/ferdinand-beyer/refx/64f7bd0b0cec01965c4ecc607f33eee7efa98928/core/src/refx/subs.cljc
clojure
--- signals ---------------------------------------------------------------- Useful for missing handlers. For comparison, re-frame's `subscribe` will return `nil`, which is guarenteed to break views that will deref subscribed values. --- subscription cache ----------------------------------------------------- --...
(ns refx.subs (:require [refx.interop :as interop] [refx.registry :as registry] [refx.utils :as utils])) (def kind :sub) (defprotocol ISignal "Protocol for signal types. Very similar to IDeref + IWatchable (e.g. atoms), with the difference that listeners will not receive old or new...
c168b92b7639166bc792f567a0fb48624fbe1215ad0df3d31f8d02a917ca988f
dsorokin/aivika
Server.hs
-- | -- Module : Simulation.Aivika.Server Copyright : Copyright ( c ) 2009 - 2017 , < > -- License : BSD3 Maintainer : < > -- Stability : experimental Tested with : GHC 8.0.1 -- It models the server that prodives a service . module Simulation.Aivika.Server (-- * Server Server, ...
null
https://raw.githubusercontent.com/dsorokin/aivika/7a14f460ab114b0f8cdfcd05d5cc889fdc2db0a4/Simulation/Aivika/Server.hs
haskell
| Module : Simulation.Aivika.Server License : BSD3 Stability : experimental * Server * Processing * Server Properties and Activities * Statistics Reset * Summary * Derived Signals for Properties * Basic Signals * Overall Signal ^ The initial state of the server. ^ The current state of the server....
Copyright : Copyright ( c ) 2009 - 2017 , < > Maintainer : < > Tested with : GHC 8.0.1 It models the server that prodives a service . module Simulation.Aivika.Server Server, newServer, newStateServer, newPreemptibleServer, newPreemptibleStateServer, serve...
8bf0a355666ee496293c674cf6eac68446fa5258b53a2db4c97da9fa64059966
clojure/clojurescript
js.cljs
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/clojure/clojurescript/8b16b44364d045d3f3638b006bcfb68b50a7a180/src/main/cljs/cljs/js.cljs
clojure
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 of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns cljs.js (:refer-clojure :exclude [require eval]) (:require-macros [cljs.js :refer [dump-core]] [cljs.env.macros :as env]) (:require [clojure.string :as string] [clojure.walk :as walk] [cljs.env :as env] [cljs...
8c8c40f184032bf49dec150990e3c48642d5c9bdc197b4424d6a29a1ac38d806
jackfirth/lens
assoc.rkt
#lang racket/base (require racket/contract/base) (provide (contract-out [assoc-lens (->* (any/c) (#:is-equal? (-> any/c any/c boolean?)) (lens/c (listof pair?) any/c))] [assv-lens (-> any/c (lens/c (listof pair?) any/c))] [assq-lens (-> any...
null
https://raw.githubusercontent.com/jackfirth/lens/733db7744921409b69ddc78ae5b23ffaa6b91e37/lens-data/lens/private/list/assoc.rkt
racket
#lang racket/base (require racket/contract/base) (provide (contract-out [assoc-lens (->* (any/c) (#:is-equal? (-> any/c any/c boolean?)) (lens/c (listof pair?) any/c))] [assv-lens (-> any/c (lens/c (listof pair?) any/c))] [assq-lens (-> any...
862cf5de49b47799eb6b2c36a876e6318b81ed479dca38e3be7e6fba1ffa29b9
helmutkian/cl-wasm-runtime
runtime.lisp
(in-package #:cl-wasm-runtime) ;;; Configuration (define-wasm-own config) (cffi:defcfun "wasm_config_new" %wasm-config-type) ;own (define-wasm-object-class config) (defun make-wasm-config () (enable-gc (make-instance 'wasm-config :pointer (%wasm-config-new)))) ;;; Engine (define-wasm-own engine) (cffi:defcfun...
null
https://raw.githubusercontent.com/helmutkian/cl-wasm-runtime/d04eb1ed162b7741b540d7f7c584cb8fbc19e65b/runtime.lisp
lisp
Configuration own Engine own own own WASM STORE own
(in-package #:cl-wasm-runtime) (define-wasm-own config) (define-wasm-object-class config) (defun make-wasm-config () (enable-gc (make-instance 'wasm-config :pointer (%wasm-config-new)))) (define-wasm-own engine) (define-wasm-object-class engine) (defun make-wasm-engine (&optional config) (let ((engine (e...
4510bb03cbcce08ffe4ea1ef4f8220ebb4c36370dd81510623068363ffdbf9c2
nomaddo/loop
ir_main.ml
open Ir let transl mod_name intf tast = let top = Transl.implementation mod_name intf tast in if !Flags.opt then List.iter (fun func -> while Simplify.func func do Simplify.remove_redundant_instr func done) top.funcs; top
null
https://raw.githubusercontent.com/nomaddo/loop/cd2204208b67b7e1f386b730c953404482ca36d6/ir/ir_main.ml
ocaml
open Ir let transl mod_name intf tast = let top = Transl.implementation mod_name intf tast in if !Flags.opt then List.iter (fun func -> while Simplify.func func do Simplify.remove_redundant_instr func done) top.funcs; top