_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
73a5e35e3ea0a3d1c3d44bce65b588e3c157a7f59af2c017407ded1d5dbf6884
input-output-hk/plutus-apps
ErrorChecking.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} {-# LANGUAGE PatternSynonyms #-} # LANGUAGE StandaloneDeriving # {-# LANGUAGE TemplateHaskell #-} # LANGUAGE TypeApplications # {-# LANGUAGE...
null
https://raw.githubusercontent.com/input-output-hk/plutus-apps/006f4ae4461094d3e9405a445b0c9cf48727fa81/plutus-contract/test/Spec/ErrorChecking.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE GADTs # # LANGUAGE PatternSynonyms # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # | Normal failures should be allowed | Head Nil failure should not be allowed | Successful validation should be allowed test ...
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeApplications # # OPTIONS_GHC -fno - warn - name - shadowing # module Spec.ErrorChecking where import Control.Lens hiding (elements) import Control.Monad import Control.Mo...
1ffa9b2f3dd862afec3b8c0a2f1e6f76be1c444a6d1b207caf4d9e1655eae6a5
GaloisInc/daedalus
EntangledVars.hs
# LANGUAGE KindSignatures , GADTs # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE DeriveGeneric , DeriveAnyClass # module Talos.Analysis.EntangledVars where import Control.DeepSeq (NFData) import GHC.Generics (Generic) import Data.Set (Set) import qualified Data.Set as Set import Data.Map (Map) import qualified Dat...
null
https://raw.githubusercontent.com/GaloisInc/daedalus/13b96ee2ccd70bed18a57792ac653c644b86f37f/talos/src/Talos/Analysis/EntangledVars.hs
haskell
# LANGUAGE OverloadedStrings # - i.e. , the choice of value for one variable may impact the choices for the other. We define our own as we want to ensure ResultVar < everything | `isPrefix x y` is true when `y` is a subfield of x, it is also reflexive, transitive, partial (basically a partial <=) ----------------...
# LANGUAGE KindSignatures , GADTs # # LANGUAGE DeriveGeneric , DeriveAnyClass # module Talos.Analysis.EntangledVars where import Control.DeepSeq (NFData) import GHC.Generics (Generic) import Data.Set (Set) import qualified Data.Set as Set import Data.Map (Map) import qualified Data.Map as Map import Control.DeepSe...
2da5b3c90e7336cd1c2bea1849939d8a20129491341e867d7e3465a60660ab25
thheller/shadow
css.cljs
(ns shadow.markup.react.impl.css (:require [clojure.string :as str] [shadow.markup.react.impl.interop :as interop] [shadow.markup.css.impl.gen :as gen] [shadow.markup.env :as env] [shadow.dom :as dom] ["react" :as react])) (defonce env-ref (volatile! {})) ...
null
https://raw.githubusercontent.com/thheller/shadow/beab6586a9782ceb3e2a4bfa2935fb8756e13d2c/src/main/shadow/markup/react/impl/css.cljs
clojure
{classname-of-el el-instance} which can't remove the old instance since it is not equal each element will cause a re-parse of all previously generated css rules since we replace the textContent of the <style> element the better option would be to use style.sheet.insertRule but that has the effect of not being abl...
(ns shadow.markup.react.impl.css (:require [clojure.string :as str] [shadow.markup.react.impl.interop :as interop] [shadow.markup.css.impl.gen :as gen] [shadow.markup.env :as env] [shadow.dom :as dom] ["react" :as react])) (defonce env-ref (volatile! {})) ...
35845617e6cb1c5e136a931efa03298f73ae5d7e48aa7971dfa7015bea706676
unnohideyuki/Tiger-in-Haskell
Flow.hs
module Flow where import qualified Data.Map as Map import qualified Graph as G import qualified Temp data Flowgraph = FGRAPH { get_control :: G.Graph , get_def :: Map.Map G.Node [Int] , get_use :: Map.Map G.Node [Int] , get_ismove :: Map.Map G.N...
null
https://raw.githubusercontent.com/unnohideyuki/Tiger-in-Haskell/69fc976e64bfe7abfa842d7179e06eae740d36b9/chap10_11/src/Flow.hs
haskell
module Flow where import qualified Data.Map as Map import qualified Graph as G import qualified Temp data Flowgraph = FGRAPH { get_control :: G.Graph , get_def :: Map.Map G.Node [Int] , get_use :: Map.Map G.Node [Int] , get_ismove :: Map.Map G.N...
9f05f81bdab93a31d2be4389c72f39a014288ff308782a38725943b49f06932c
bsaleil/lc
deriv.scm.scm
;;------------------------------------------------------------------------------ Macros (##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body))) (def-macro (FLOATvector-const . lst) `',(list->f64vector lst)) (def-macro (FLOATvector? x) `(f64vector? ,x)) (def-macro (FLOATvector...
null
https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/tools/benchtimes/resultVMIL-lc-gsc-lc/LC5f64/deriv.scm.scm
scheme
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Gabriel benchmarks C benchmarks Other benchmarks DERIV -- Symbolic derivation. ...
Macros (##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body))) (def-macro (FLOATvector-const . lst) `',(list->f64vector lst)) (def-macro (FLOATvector? x) `(f64vector? ,x)) (def-macro (FLOATvector . lst) `(f64vector ,@lst)) (def-macro (FLOATmake-vector n . init) `(make...
44b5d52bbd28a0281d1deb463133500635a3341e185975294a7054bb028fed59
dfeltey/CompilersFromScratch
CESK.hs
module CEK where nested = App (App (App (Lambda "x" (Lambda "y" (Lambda "x" (Binop Add (Var "y") (Var "x"))))) (BoolE True)) (Val 5)) (Val 3) data Expr = App Expr Expr | Lambda Name Expr | Binop Op Expr Expr | Var Name | Val Integer | BoolE Bool | IF Expr E...
null
https://raw.githubusercontent.com/dfeltey/CompilersFromScratch/8fa59d419522fe9e0623fd5a58c3ea2bbb2d1837/CESK.hs
haskell
Push is the wrong instruction to handle binops, push always sets up an arg continuation but that isn't what is needed for a binop, because they are not applied the way that functions are, need a Load instruction to handle these ... Use the op to build the Op continuation then can push and manipulate the arguments ...
module CEK where nested = App (App (App (Lambda "x" (Lambda "y" (Lambda "x" (Binop Add (Var "y") (Var "x"))))) (BoolE True)) (Val 5)) (Val 3) data Expr = App Expr Expr | Lambda Name Expr | Binop Op Expr Expr | Var Name | Val Integer | BoolE Bool | IF Expr E...
5cb436db07f69fdf482d38c4fc7d559a1f32c1b3568279002593dfdf1f5654fc
Quickscript-Competiton/July2020entries
register.rkt
#lang racket/base (require (for-syntax racket/base racket/runtime-path (only-in quickscript/library add-third-party-script-directory!)) racket/runtime-path (only-in quickscript/library add-third-party-script-directory!)) ;; This is going to be called during s...
null
https://raw.githubusercontent.com/Quickscript-Competiton/July2020entries/b6406a4f021671bccb6b464042ba6c91221286fe/register.rkt
racket
This is going to be called during setup and will automatically
#lang racket/base (require (for-syntax racket/base racket/runtime-path (only-in quickscript/library add-third-party-script-directory!)) racket/runtime-path (only-in quickscript/library add-third-party-script-directory!)) register quickscript - extra in quic...
ce5f377ec366b08545d9fdb5aefd7019232bb8978986290907b8402028b8ef4c
gsakkas/rite
20060323-16:46:40-3a2db0aab4cec751ce06a6163c6a0997.seminal.ml
exception Unimplemented exception AlreadyDone (*** part a ***) type move = Home | Forward of float | Turn of float | For of int * (move)list (*** part b -- return move***) let makePoly sides len = # # # # # # # # # # # # # # # # # # # # # let rec makePolyHelp sidesLeft turn = match sidesLe...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060323-16%3A46%3A40-3a2db0aab4cec751ce06a6163c6a0997.seminal.ml
ocaml
** part a ** ** part b -- return move** ** part c ** ** part d ** ** part e ** ** part f ** ####################### ################################################# ############################# # ** possibly helpful testing code **
exception Unimplemented exception AlreadyDone type move = Home | Forward of float | Turn of float | For of int * (move)list let makePoly sides len = # # # # # # # # # # # # # # # # # # # # # let rec makePolyHelp sidesLeft turn = match sidesLeft with 0 -> [] | 1 -> Home::makePolyH...
e388285a83ee47fa7b75ac2f6bd043339208546d9845f0089abb7e61d753a328
tweag/lagoon
Conduit.hs
Copyright 2020 Pfizer Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -2.0 -- Unless required by applicable law or agreed to in writing, software distributed under th...
null
https://raw.githubusercontent.com/tweag/lagoon/2ef0440db810f4f45dbed160b369daf41d92bfa4/src/backend/src/Lagoon/Util/Conduit.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permiss...
Copyright 2020 Pfizer Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , module Lagoon.Util.Conduit ( zipListWith , chunksOf , peekAt , every , sinkBuilderHandle , compactManyConduits , compactConduitsW...
f3d5719622983409967703376a3e2b9bd216e1dbbc275102acb854614ed3d906
CryptoKami/cryptokami-core
Yaml.hs
-- | Infrastructure for parsing the .yaml network topology file {-# LANGUAGE RankNTypes #-} module Pos.Network.Yaml ( Topology(..) , AllStaticallyKnownPeers(..) , DnsDomains(..) , KademliaParams(..) , KademliaId(..) , KademliaAddress(..) , NodeRegion(..) ...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/infra/Pos/Network/Yaml.hs
haskell
| Infrastructure for parsing the .yaml network topology file # LANGUAGE RankNTypes # opaque opaque opaque | Description of the network topology in a Yaml file This differs from 'Pos.Network.Types.Topology' because for static nodes this describes the entire network topology (all statically known nodes), not just...
module Pos.Network.Yaml ( Topology(..) , AllStaticallyKnownPeers(..) , DnsDomains(..) , KademliaParams(..) , KademliaId(..) , KademliaAddress(..) , NodeRegion(..) , NodeRoutes(..) , NodeMetadata(..) , RunKademlia , Valency , ...
afde5d2b2a255a9c6092de20c63663e3c91dcb342b6aac88432b3cebe5ef241b
ravichugh/djs
bNstats.mli
* * Copyright ( c ) 2001 by * * * * * All rights reserved . Permission to use , copy , modify and distribute * this software for research purposes only is hereby granted , * provided that the following conditions are met : * 1 . XSRedistributions of sourc...
null
https://raw.githubusercontent.com/ravichugh/djs/c4a13e06adb3e0945f39966523a4d944448c1941/src/BNstats/bNstats.mli
ocaml
* Utilities for maintaining timing statistics * Reset all the timings * Time a function and associate the time with the given string. If some timing information is already associated with that string, then accumulate the times. If this function is invoked within another timed function then you can have a ...
* * Copyright ( c ) 2001 by * * * * * All rights reserved . Permission to use , copy , modify and distribute * this software for research purposes only is hereby granted , * provided that the following conditions are met : * 1 . XSRedistributions of sourc...
5fc7f589e7a2e1dea0b1d94fe8dcf9a850925b4113106f52780cfd2fe17f5cb9
kendroe/CoqRewriter
kbrewrite.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * REWRITELIB * * kbrewrite.ml * * This file contains heuristic rewriting . * * ( C ) 2017 , * * This program i...
null
https://raw.githubusercontent.com/kendroe/CoqRewriter/ddf5dc2ea51105d5a2dc87c99f0d364cf2b8ebf5/plugin/src/kbrewrite.ml
ocaml
require "list.sml" ; require "exp.sml" ; require "expint.sml" ; require "env.sml" ; require "subst.sml" ; require "context.sml" ; require "crewrite.sml" ; require "kbrewr-s.sml" ; require "bmf.sml" ; require "match.sml" ; require "basis.__integer" ; open listimpl ; open EXP_INTERNimp...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * REWRITELIB * * kbrewrite.ml * * This file contains heuristic rewriting . * * ( C ) 2017 , * * This program i...
124290c0a8d5c1ec5215c53c82d293ef11b5bc7b13c959a98ca5bdf815464b2e
peerdrive/peerdrive
peerdrive_sync_worker.erl
PeerDrive Copyright ( C ) 2011 < jan DOT kloetzke AT freenet DOT de > %% %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or %% (at your option) any la...
null
https://raw.githubusercontent.com/peerdrive/peerdrive/94389e2536cc9b1a0c168ec56ba3912910eb0c35/server/apps/peerdrive/src/peerdrive_sync_worker.erl
erlang
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public...
PeerDrive Copyright ( C ) 2011 < jan DOT kloetzke AT freenet DOT de > it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License -module(peerdrive_sync_worker). ...
4d6a07620b68997d3ac9632cec9cb3b1e39848a3fd43805ab31f3bee205bf5f4
gafiatulin/codewars
Multiply.hs
-- Multiply two numbers a number of times module Codewars.Kata.Multiply where multiplyBy :: Integer -> Integer -> Int -> [Integer] multiplyBy x y n = [x * y^k | k <- [1..n]]
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/Beta/Multiply.hs
haskell
Multiply two numbers a number of times
module Codewars.Kata.Multiply where multiplyBy :: Integer -> Integer -> Int -> [Integer] multiplyBy x y n = [x * y^k | k <- [1..n]]
99e7af04a8b3b57925a81ed337332c683c1c2bc76c1f4c077bca078fadb942ef
arielnetworks/cl-amazonproduct
response.lisp
(in-package :cl-amazonproduct) (defun cxml-response-handler (input) (cxml:parse input (cxml-dom:make-dom-builder))) (defun xmls-response-handler (input) (cxml:parse input (cxml-xmls:make-xmls-builder))) (defun string-response-handler (input) input) (defun run-response-handler (input handler) (funcall handle...
null
https://raw.githubusercontent.com/arielnetworks/cl-amazonproduct/60553a1d2ae3f8a3cfa062679e0681f28f332e0d/src/response.lisp
lisp
(in-package :cl-amazonproduct) (defun cxml-response-handler (input) (cxml:parse input (cxml-dom:make-dom-builder))) (defun xmls-response-handler (input) (cxml:parse input (cxml-xmls:make-xmls-builder))) (defun string-response-handler (input) input) (defun run-response-handler (input handler) (funcall handle...
8f7e6c04ad6552f59495d2046d8d5d0cc5009d018f217fef79d89de7b64fc20a
erlsci/iso8601
iso8601_tests.erl
-module(iso8601_tests). -include_lib("eunit/include/eunit.hrl"). -define(MN, {0,0,0}). % midnight, as a calendar:time() -define(MNE, {0,0,0.0}). % midnight, as a calendar:time(), with microseconds parse_fail_test_() -> F = fun iso8601:parse/1, [{"fails to parse YYYYMM", ?_assertError(badarg, F("201212"...
null
https://raw.githubusercontent.com/erlsci/iso8601/70c03cfecdd7b8ce6c46e0103144a5c21b3be58e/test/iso8601_tests.erl
erlang
midnight, as a calendar:time() midnight, as a calendar:time(), with microseconds disallowed by spec
-module(iso8601_tests). -include_lib("eunit/include/eunit.hrl"). parse_fail_test_() -> F = fun iso8601:parse/1, [{"fails to parse YYYYMM", ?_assertError(badarg, F("201212"))}]. parse_year_test_() -> F = fun iso8601:parse/1, [{"parses YYYY", ?_assertMatch({{2012,1,1}, ?MN}, F("2012"))}]. ...
8b4a1866711f7e73d43d9468770a2f05bd54259b8b92d1fe0a47127f4bb34815
hercules-ci/hercules-ci-agent
Effect.hs
module Hercules.Agent.Effect where import qualified Data.Aeson as A import Data.IORef import qualified Data.Map as M import qualified Hercules.API.Agent.Effect.EffectTask as EffectTask import Hercules.API.TaskStatus (TaskStatus) import qualified Hercules.API.TaskStatus as TaskStatus import qualified Hercules.Agent.Con...
null
https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/be8142e7f38eba5e3805f21d5b6423ce7239e0f0/hercules-ci-agent/hercules-ci-agent/Hercules/Agent/Effect.hs
haskell
module Hercules.Agent.Effect where import qualified Data.Aeson as A import Data.IORef import qualified Data.Map as M import qualified Hercules.API.Agent.Effect.EffectTask as EffectTask import Hercules.API.TaskStatus (TaskStatus) import qualified Hercules.API.TaskStatus as TaskStatus import qualified Hercules.Agent.Con...
6f32d5560747a3a9d1dd1573a435d6366d813b685c74388f19071da674f030d4
RyanGlScott/text-show
RatioSpec.hs
| Module : Spec . Data . RatioSpec Copyright : ( C ) 2014 - 2017 License : BSD - style ( see the file LICENSE ) Maintainer : Stability : Provisional Portability : GHC @hspec@ test for ' Ratio ' . Module: Spec.Data.RatioSpec Copyright: (C) 2014-2017 Ryan Scott License: ...
null
https://raw.githubusercontent.com/RyanGlScott/text-show/5ea297d0c7ae2d043f000c791cc12ac53f469944/tests/Spec/Data/RatioSpec.hs
haskell
| Module : Spec . Data . RatioSpec Copyright : ( C ) 2014 - 2017 License : BSD - style ( see the file LICENSE ) Maintainer : Stability : Provisional Portability : GHC @hspec@ test for ' Ratio ' . Module: Spec.Data.RatioSpec Copyright: (C) 2014-2017 Ryan Scott License: ...
f65e6f8b44a823775be715406dcb35e28c8f9d98998f42a953c6706cea6d0885
antifuchs/sbcl
wxs.lisp
;;;; Generate WiX XML Source, from which we eventually generate the .MSI This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The s...
null
https://raw.githubusercontent.com/antifuchs/sbcl/789bf105edca031aff991ad16a5fd207812336a0/tools-for-build/wxs.lisp
lisp
Generate WiX XML Source, from which we eventually generate the .MSI more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. XML generation GUID generation Apparently this willy-nilly regeneration...
This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (defvar *indent-level* 0) (defvar *sbcl-source-root* (truename (merge-pathnames (make-pathname :directory (list :relat...
ea25bf96314f62e038062326218b576814e99225228ad91ccedb67830ddcacc6
matteoredaelli/ebot
ebot_db_backend_couchdb.erl
EBOT , an erlang web crawler . Copyright ( C ) 2010 ~ matteo DOT AT libero DOT it %% / %% %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the Lice...
null
https://raw.githubusercontent.com/matteoredaelli/ebot/6a6af4eb345adfa05b4508ed2dec529413d97da8/src/ebot_db_backend_couchdb.erl
erlang
/ This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See...
EBOT , an erlang web crawler . Copyright ( C ) 2010 ~ matteo DOT AT libero DOT it it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License Created : 4 Apr 2010...
b870438feaaf29bc40517a7325ec6f6c23d850bb93a07fc549bed2d93d14f220
ztellman/narrator
core.clj
(ns narrator.core (:use [potemkin]) (:require [clojure.edn :as edn] [clojure.core.reducers :as r] [narrator.utils.rand :as rand]) (:import [java.util ArrayList])) ;;; (definterface+ IBufferedAggregator (process! [_ msg]) (flush-operator [_])) (definterface+ StreamOperatorGenerator (re...
null
https://raw.githubusercontent.com/ztellman/narrator/fd6b46b374c375c2701c377085058f27430e34f1/src/narrator/core.clj
clojure
(ns narrator.core (:use [potemkin]) (:require [clojure.edn :as edn] [clojure.core.reducers :as r] [narrator.utils.rand :as rand]) (:import [java.util ArrayList])) (definterface+ IBufferedAggregator (process! [_ msg]) (flush-operator [_])) (definterface+ StreamOperatorGenerator (recur-...
beca005b56d5d2b5c7207fc22e970eaa14a021c518938bf390f7a9c41a21061e
drathier/elm-offline
Type.hs
# OPTIONS_GHC -Wall # {-# LANGUAGE OverloadedStrings #-} module Reporting.Error.Type ( Error(..) -- expectations , Expected(..) , Context(..) , SubContext(..) , MaybeName(..) , Category(..) , PExpected(..) , PContext(..) , PCategory(..) , typeReplace , ptypeReplace -- make reports , toReport...
null
https://raw.githubusercontent.com/drathier/elm-offline/f562198cac29f4cda15b69fde7e66edde89b34fa/compiler/src/Reporting/Error/Type.hs
haskell
# LANGUAGE OverloadedStrings # expectations make reports ERRORS EXPRESSION EXPECTATIONS PATTERN EXPECTATIONS HELPERS TO REPORT TO PATTERN REPORT PATTERN HELPERS EXPR HELPERS BAD RIGID HINTS BAD SUPER HINTS TO EXPR REPORT HELPERS FIELD NAME HELPERS OP LEFT OP RIGHT BAD CONS BAD MATH BAD BOOLS BAD CO...
# OPTIONS_GHC -Wall # module Reporting.Error.Type ( Error(..) , Expected(..) , Context(..) , SubContext(..) , MaybeName(..) , Category(..) , PExpected(..) , PContext(..) , PCategory(..) , typeReplace , ptypeReplace , toReport ) where import Prelude hiding (round) import qualified Data.Map ...
dec1bc5bc0881a043fa44f5bb4f2a993d368ee811807eba30df4d5d24e3ca6f1
Ptival/yugioh
Lenses.hs
{-# LANGUAGE RankNTypes #-} -- | A bunch of useful lenses. module YuGiOh.Lenses ( currentPlayer, deck, hand, hasDrawnCard, hasNormalSummoned, hasSwitchedPosition, lifePoints, mainMonsterZone, mat, otherPlayer, phase, turn, ) where import Control.Lens (Lens') import YuGi...
null
https://raw.githubusercontent.com/Ptival/yugioh/855e8f22c3ff322c7ca1d0a1fa96c50a54724aeb/lib/YuGiOh/Lenses.hs
haskell
# LANGUAGE RankNTypes # | A bunch of useful lenses.
module YuGiOh.Lenses ( currentPlayer, deck, hand, hasDrawnCard, hasNormalSummoned, hasSwitchedPosition, lifePoints, mainMonsterZone, mat, otherPlayer, phase, turn, ) where import Control.Lens (Lens') import YuGiOh.Duel import qualified YuGiOh.Mat as Mat import qualified...
e0074f6be438b9395e685d3dc24053f27464e950c3cda2351879678b0f8b44be
lfeutre/lmud
lmud_room_mgr.erl
%%% ========================================================================= @author < > 2010 - 2011 %%% @doc Manage the room database. %%% Handle room lookups, loading/instantiation, deletion etc. %%% @end %%% ========================================================================= -module(lmud_room_mgr). ...
null
https://raw.githubusercontent.com/lfeutre/lmud/5da355fdcaf40b97ee7a20e301ef4355dbd3c221/apps/lmud/src/lmud_room_mgr.erl
erlang
========================================================================= @doc Manage the room database. Handle room lookups, loading/instantiation, deletion etc. @end ========================================================================= API Concurrent lookup if room is loaded; call to lmud_room_mgr otherwis...
@author < > 2010 - 2011 -module(lmud_room_mgr). -behaviour(gen_server). -export([start_link/0, get_room/1, new_room/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -define(SERVER, ?MODULE). -define(TABLE_ID, ?MODULE). -include_lib("logjam/include/...
a3234bcecd4f384ee8b9e8576fa4864441ed2401f5bbe28c5ed4b717d507d050
composewell/streaming-benchmarks
StreamlyArray.hs
-- | Module : Benchmarks . StreamlyArray Copyright : ( c ) 2018 -- License : MIT -- Maintainer : # LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleContexts # # LANGUAGE TemplateHaskell # module Benchmarks.StreamlyArray where import Control.Monad.IO.Class (MonadIO(..)) import Prelude (Int, (...
null
https://raw.githubusercontent.com/composewell/streaming-benchmarks/c31fa9d2d20c9b4e8e85be19ac1e7a41a88b4945/Benchmarks/StreamlyArray.hs
haskell
| Maintainer : ----------------------------------------------------------------------------- Stream generation and elimination ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Append -----------------------...
Module : Benchmarks . StreamlyArray Copyright : ( c ) 2018 License : MIT # LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleContexts # # LANGUAGE TemplateHaskell # module Benchmarks.StreamlyArray where import Control.Monad.IO.Class (MonadIO(..)) import Prelude (Int, (+), ($), (.), even, (>), (...
b9b802f6265278e5f6fd672f8c7462a84c930a1ac4b90f9f9216ccfe58441425
fendor/hsimport
Main.hs
module Main where import Test.Tasty import Test.Tasty.Golden import System.FilePath import System.IO (hPutStrLn, stderr) import Data.List (intercalate) import qualified Data.ByteString.Lazy.UTF8 as BS import qualified Language.Haskell.Exts as HS import qualified HsImport as HI import qualified HsImport.Parse as HIP i...
null
https://raw.githubusercontent.com/fendor/hsimport/9be9918b06545cfd7282e4db08c2b88f1d8162cd/tests/Main.hs
haskell
module Main where import Test.Tasty import Test.Tasty.Golden import System.FilePath import System.IO (hPutStrLn, stderr) import Data.List (intercalate) import qualified Data.ByteString.Lazy.UTF8 as BS import qualified Language.Haskell.Exts as HS import qualified HsImport as HI import qualified HsImport.Parse as HIP i...
57902fe19e7ecc16f7506d9e074b8922a551bfd08dff4963a0947de8c1649317
alex-gutev/static-dispatch
aux.lisp
;;;; aux.lisp ;;;; Copyright 2019 - 2021 ;;;; ;;;; 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, ;;;; cop...
null
https://raw.githubusercontent.com/alex-gutev/static-dispatch/baa21ef88e23e28eaa541f87298ca2603c270b6a/test/aux.lisp
lisp
aux.lisp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell Software is furnished to do so, subject to the follow...
Copyright 2019 - 2021 files ( the " Software " ) , to deal in the Software without copies of the Software , and to permit persons to whom the included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , 1 . That Generic functions ar...
feaa4efa648820f245e0fe160b6645c1fa21e92e54c84f9228d74eca0876dd30
mflatt/shrubbery-rhombus-0
map.rkt
#lang racket/base (require racket/unsafe/undefined (for-syntax racket/base syntax/parse "srcloc.rkt" "with-syntax.rkt") "expression.rkt" "binding.rkt" (submod "annotation.rkt" for-class) "static-info.rkt" ...
null
https://raw.githubusercontent.com/mflatt/shrubbery-rhombus-0/7e6d521646bb9a1174b15e97bf825c3923de58af/rhombus/private/map.rkt
racket
macro to optimize to an inline functional update
#lang racket/base (require racket/unsafe/undefined (for-syntax racket/base syntax/parse "srcloc.rkt" "with-syntax.rkt") "expression.rkt" "binding.rkt" (submod "annotation.rkt" for-class) "static-info.rkt" ...
b87b4bc1881b031acb9956cef7de1879c63748828b467e7fb881c59a5c6d1b8d
racket/racket7
unsafe.rkt
#lang racket/base (require "atomic.rkt" "thread.rkt" "schedule.rkt" "evt.rkt") (provide unsafe-start-atomic unsafe-end-atomic unsafe-start-breakable-atomic unsafe-end-breakable-atomic unsafe-in-atomic? unsafe-set-on-atomic-timeout!) (define (unsa...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/thread/unsafe.rkt
racket
#lang racket/base (require "atomic.rkt" "thread.rkt" "schedule.rkt" "evt.rkt") (provide unsafe-start-atomic unsafe-end-atomic unsafe-start-breakable-atomic unsafe-end-breakable-atomic unsafe-in-atomic? unsafe-set-on-atomic-timeout!) (define (unsa...
9e3f5eddedda6be218095cf3a1d0cbb6576cb090a779fa49846a24a5c5e1af4b
s-expressionists/Cleavir
note.lisp
(in-package #:cleavir-conditions) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Condition type PROGRAM-NOTE ;;; ;;; PROGRAM-NOTE can be used for information that a programmer may wish to be ;;; informed of but which does not warrant even a STYLE-WARNING. This could ;;; includ...
null
https://raw.githubusercontent.com/s-expressionists/Cleavir/e0293780d356a9d563af9abf9317019f608b4e1d/Conditions/note.lisp
lisp
Condition type PROGRAM-NOTE PROGRAM-NOTE can be used for information that a programmer may wish to be informed of but which does not warrant even a STYLE-WARNING. This could include optimization hints or notes that the compiler will ignore some declaration because it is not smart enough to use it, for example. ...
(in-package #:cleavir-conditions) (define-condition program-note (program-condition) ()) Signal a compiler note . The MUFFLE - NOTE restart can be used to prevent any as DATUM . (defun note (datum &rest arguments) (let ((note (apply #'make-condition datum arguments))) (restart-case (signal note) (mu...
e25df7a78926c894108ae8fd896a7e65f18a0aa36c5a62e37c72ba58dd0c76b6
vernemq/vernemq
vmq_diversity_vmq_api.erl
Copyright 2018 Octavo Labs AG Zurich Switzerland ( ) %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing...
null
https://raw.githubusercontent.com/vernemq/vernemq/234d253250cb5371b97ebb588622076fdabc6a5f/apps/vmq_diversity/src/vmq_diversity_vmq_api.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright 2018 Octavo Labs AG Zurich Switzerland ( ) Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(vmq_diversity_vmq_api). -include_lib("luerl/include/luerl.hrl"). -export([install/1]). install(St) -> luer...
1bd095cde6f346797aa8c164dcb3560abb3550f83f4a2947e58419cb40b3f42b
skanev/playground
27.scm
EOPL exercise 2.27 ; ; Draw the abstract syntax tree for the lambda calculus expressions ; ; ((lambda (a) (a b)) c) ; ; (lambda (x) ; (lambda (y) ; ((lambda (x) ; (x y)) ; x))) ; Expression: ((lambda (a) (a b)) c) ; ; +---------+ ; | app-exp | ; ...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/02/27.scm
scheme
Draw the abstract syntax tree for the lambda calculus expressions ((lambda (a) (a b)) c) (lambda (x) (lambda (y) ((lambda (x) (x y)) x))) Expression: ((lambda (a) (a b)) c) +---------+ | app-exp | +---------+ ...
EOPL exercise 2.27 + ------------+ + ------------+
23f5318df4ccd35010c34c9179fbc3259d0fd5928b4cef4e91d28417c365a644
cdepillabout/pretty-simple
ExprParser.hs
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # | Module : Text . Pretty . Simple . Internal . ExprParser Copyright : ( c ) , 2016 License : BSD - style ( see LICENSE file ) Maintainer : Stability : experimental Portability :...
null
https://raw.githubusercontent.com/cdepillabout/pretty-simple/c20addb015ccd4cc35251db6f09f77485ca7470d/src/Text/Pretty/Simple/Internal/ExprParser.hs
haskell
# LANGUAGE RankNTypes # | 'testString1' and 'testString2' are convenient to use in GHCi when playing around with how parsing works. | See 'testString1'. | Parse multiple expressions. >>> parseExprs "Just 'a'" ([Other "Just ",CharLit "a"],"") Handle escaped characters correctly >>> parseExprs $ "Foo \"hello \...
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # | Module : Text . Pretty . Simple . Internal . ExprParser Copyright : ( c ) , 2016 License : BSD - style ( see LICENSE file ) Maintainer : Stability : experimental Portability : POSIX Module : Text...
a7321962058b08bc8307efc1669655fbf128431ce01044732537fd62b2088739
AdRoll/rebar3_format
macros_in_specs.erl
-module(macros_in_specs). -type t() :: t. -type foo() :: foo. -define(FOO, foo). %% @doc Is properly formatted -spec ?MODULE:f() -> t(). f() -> t. %% @doc Was crashing the formatter -spec g() -> ?MODULE:t(). g() -> t. %% @doc Can't be parsed -spec a_module : ?FOO( ) -> t( ) . foo() -> t. %% @doc Was ...
null
https://raw.githubusercontent.com/AdRoll/rebar3_format/5ffb11341796173317ae094d4e165b85fad6aa19/test_app/after/src/macros_in_specs.erl
erlang
@doc Is properly formatted @doc Was crashing the formatter @doc Can't be parsed @doc Was crashing the formatter
-module(macros_in_specs). -type t() :: t. -type foo() :: foo. -define(FOO, foo). -spec ?MODULE:f() -> t(). f() -> t. -spec g() -> ?MODULE:t(). g() -> t. -spec a_module : ?FOO( ) -> t( ) . foo() -> t. -spec h() -> a_module:?FOO(). h() -> foo.
f7ae4cc0170ca3d59b68229d2b709488f40057cafb092b953763bbcb35830cb0
eeng/shevek
sharing.clj
(ns shevek.lib.sharing (:require [buddy.core.hash :refer [md5]] [buddy.core.codecs :refer [bytes->hex]])) (defn base-url [request] (str (-> request :scheme name) "://" (get-in request [:headers "host"]))) (defn hash-data [data] (-> data pr-str md5 bytes->hex))
null
https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/src/clj/shevek/lib/sharing.clj
clojure
(ns shevek.lib.sharing (:require [buddy.core.hash :refer [md5]] [buddy.core.codecs :refer [bytes->hex]])) (defn base-url [request] (str (-> request :scheme name) "://" (get-in request [:headers "host"]))) (defn hash-data [data] (-> data pr-str md5 bytes->hex))
1ff3060bd745d0f07421151a666e682588ca7b15bd26fa258d6cd2cfe185d533
penpot/penpot
drawing.cljs
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 /. ;; ;; Copyright (c) KALEIDOS INC (ns app.main.data.workspace.drawing "Drawing interactions." (:require [app.common.types.shape :as cts] ...
null
https://raw.githubusercontent.com/penpot/penpot/cc18f84d620e37d8efafc5bed1bcdbe70ec23c1e/frontend/src/app/main/data/workspace/drawing.cljs
clojure
Copyright (c) KALEIDOS INC --- Select for Drawing When changing drawing tool disable "scale text" mode automatically, to help users that ignore how this mode works. NOTE: comments are a special case and they manage they own interrupt cycle.q NOTE/TODO: when an exception is raised in some point of drawing the ...
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 /. (ns app.main.data.workspace.drawing "Drawing interactions." (:require [app.common.types.shape :as cts] [app.common.uuid :as uuid] ...
7a6eb7aa94d31279da315a1f62d96ccfb61f71672cdc9bb99787d42a994672f1
zenspider/schemers
exercise.3.42.scm
#lang racket/base Exercise 3.42 suggests that it 's a waste of time ;; to create a new serialized procedure in response to every ;; `withdraw' and `deposit' message. He says that `make-account' ;; could be changed so that the calls to `protected' are done outside ;; the `dispatch' procedure. That is, an accou...
null
https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_3/exercise.3.42.scm
scheme
to create a new serialized procedure in response to every `withdraw' and `deposit' message. He says that `make-account' could be changed so that the calls to `protected' are done outside the `dispatch' procedure. That is, an account would return the same serialized procedure (which was created at the same time a...
#lang racket/base Exercise 3.42 suggests that it 's a waste of time difference in what concurrency is allowed by these two versions of
ea0d4d6d50c7fdc304a69b28ee802ff01eac3546162a020a55ff1673607f68fb
willowtreeapps/wombats-api
current_user.clj
(ns wombats.interceptors.current-user (:require [wombats.daos.helpers :refer [get-fn]])) (def add-current-user "Attaches the current user to the context map" {:name ::current-user-interceptor :enter (fn [{:keys [request] :as context}] (let [access-token (get-in request [:headers "authorization"]) ...
null
https://raw.githubusercontent.com/willowtreeapps/wombats-api/738e4cc8d7011998695ec85e663f650be71f60ae/src/wombats/interceptors/current_user.clj
clojure
(ns wombats.interceptors.current-user (:require [wombats.daos.helpers :refer [get-fn]])) (def add-current-user "Attaches the current user to the context map" {:name ::current-user-interceptor :enter (fn [{:keys [request] :as context}] (let [access-token (get-in request [:headers "authorization"]) ...
e0052a22ec95a5835b801497fe4e25b9da4af7198baf3ea49b96f0fa74a424b0
avsm/eeww
translmod.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/avsm/eeww/4834abb9a40a9f35d0d7041a61e53e3426d8886f/boot/ocaml/lambda/translmod.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Misc open Asttypes open Path open Types open Typedtree open Lambda open Translobj open Translcore o...
2a39bb5347435353c58726458b25c108ccefacfc2e802b5e94c3782f00e12652
juji-io/datalevin
constants.cljc
(ns ^:no-doc datalevin.constants (:refer-clojure :exclude [meta]) (:require [datalevin.util :as u]) (:import [java.util UUID Arrays HashSet] [java.math BigInteger BigDecimal])) ;;--------------------------------------------- ;; system constants, fixed ;; datom (def ^:const e0 0) (def ^:const emax ...
null
https://raw.githubusercontent.com/juji-io/datalevin/d2f019eb1e613805d9c6eb6fd4f0c79eb4403592/src/datalevin/constants.cljc
clojure
--------------------------------------------- system constants, fixed datom schema lmdb in bytes tmp lmdb percentage of Xmx index storage - eid - aid - s - hdr - 1 byte TBD - hsh - tr value headers dbi-names search engine we ignore exceedingly long strings server / client -------------------------------...
(ns ^:no-doc datalevin.constants (:refer-clojure :exclude [meta]) (:require [datalevin.util :as u]) (:import [java.util UUID Arrays HashSet] [java.math BigInteger BigDecimal])) (def ^:const e0 0) (def ^:const emax 0x7FFFFFFFFFFFFFFF) (def ^:const tx0 1) (def ^:const txmax 0x7FFFFFFFFFFFFFFF) (de...
489e1e465173e3c4f06f87e174da5109584acf529f52547ba331b8e883017234
nvim-treesitter/nvim-treesitter
highlights.scm
;; General syntax (ERROR) @error (command_name) @function (caption command: _ @function) (key_value_pair key: (_) @parameter value: (_)) [ (line_comment) (block_comment) (comment_environment) ] @comment ((line_comment) @preproc (#lua-match? @preproc "^%% !TeX")) [ (brack_group) (brack_group_argc) ] @p...
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/0b00eb4b826bde517e87a0993bdb8409435b2378/queries/latex/highlights.scm
scheme
General syntax General environments Definitions and references Math Sectioning Beamer frames Formatting File inclusion commands
(ERROR) @error (command_name) @function (caption command: _ @function) (key_value_pair key: (_) @parameter value: (_)) [ (line_comment) (block_comment) (comment_environment) ] @comment ((line_comment) @preproc (#lua-match? @preproc "^%% !TeX")) [ (brack_group) (brack_group_argc) ] @parameter [(operat...
d5c0c0bbb0f076de17229b8a12fd90dd8f19e906337ca53b33d7e2ba264bb08b
elarous/O2SN
events.cljs
(ns o2sn.signup.events (:require [kee-frame.core :refer [reg-event-db reg-event-fx]] [re-frame.core :refer [path dispatch]] [ajax.core :as ajax] [o2sn.common.interceptors :refer [server]] #_[o2sn.validation :as v])) ;; sign up form events (reg-event-db :signup/set-ema...
null
https://raw.githubusercontent.com/elarous/O2SN/289e17e5c4b6a19e3c8f964f9faa4efad3edefa8/src/client/main/o2sn/signup/events.cljs
clojure
sign up form events
(ns o2sn.signup.events (:require [kee-frame.core :refer [reg-event-db reg-event-fx]] [re-frame.core :refer [path dispatch]] [ajax.core :as ajax] [o2sn.common.interceptors :refer [server]] #_[o2sn.validation :as v])) (reg-event-db :signup/set-email [(path :signup-form...
1e788b17a77a174dac40cfa11dd2cfa9d4ce5bd8ae744e2d27c3242668dc7113
poroh/ersip
ersip_sdp_time_test.erl
%% Copyright ( c ) 2018 Dmitry Poroh %% All rights reserved. Distributed under the terms of the MIT License . See the LICENSE file . %% SDP time fields ( t= , r= , z= ) test %% -module(ersip_sdp_time_test). -include_lib("eunit/include/eunit.hrl"). %%%============================================================...
null
https://raw.githubusercontent.com/poroh/ersip/f1b0d3c5713fb063a6cc327ea493f06cff6a6e5e/test/sdp/ersip_sdp_time_test.erl
erlang
All rights reserved. =================================================================== Cases ===================================================================
Copyright ( c ) 2018 Dmitry Poroh Distributed under the terms of the MIT License . See the LICENSE file . SDP time fields ( t= , r= , z= ) test -module(ersip_sdp_time_test). -include_lib("eunit/include/eunit.hrl"). -define(crlf, "\r\n"). parse_test() -> T0 = <<"t=0 0" ?crlf>>, {ok, Time0, <<>>} = ersi...
1bdc082fd163deceafc4fbfadd65e53a3fb87420735e2db05318cd3879f92995
artemeff/raven-erlang
raven_app.erl
-module(raven_app). -include("raven.hrl"). -behaviour(application). -export([ start/2, stop/1 ]). %% @hidden start(_StartType, _StartArgs) -> case application:get_env(?APP, error_logger) of {ok, true} -> error_logger:add_report_handler(raven_error_logger); _ -> ...
null
https://raw.githubusercontent.com/artemeff/raven-erlang/cfd0ba79ba1f10a25e6b8740ed6c9b4171ffc0b0/src/raven_app.erl
erlang
@hidden @hidden
-module(raven_app). -include("raven.hrl"). -behaviour(application). -export([ start/2, stop/1 ]). start(_StartType, _StartArgs) -> case application:get_env(?APP, error_logger) of {ok, true} -> error_logger:add_report_handler(raven_error_logger); _ -> ...
f9a99366489cb91ed0d9894f980f3db673894008f9869f68453face35981bec3
cram-code/cram_core
swank-indentation.lisp
(in-package :crs) (eval-when (:load-toplevel) (when (and (find-package "SWANK") (boundp (intern "*APPLICATION-HINTS-TABLES*" (find-package "SWANK")))) (push (alexandria:alist-hash-table '((with-production . let) (with-production-handlers . flet))...
null
https://raw.githubusercontent.com/cram-code/cram_core/984046abe2ec9e25b63e52007ed3b857c3d9a13c/cram_reasoning/src/swank-indentation.lisp
lisp
(in-package :crs) (eval-when (:load-toplevel) (when (and (find-package "SWANK") (boundp (intern "*APPLICATION-HINTS-TABLES*" (find-package "SWANK")))) (push (alexandria:alist-hash-table '((with-production . let) (with-production-handlers . flet))...
7b842c0bbe29cfcd80ecd11b0894c6d2373905a0ca4f53d1afa802c95ea4a00e
haskell-waargonaut/waargonaut
Whitespace.hs
module Types.Whitespace ( genWS , genEmptyWS ) where import Hedgehog import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range import qualified Data.Vector as V import Types.Common (genWhitespace) import ...
null
https://raw.githubusercontent.com/haskell-waargonaut/waargonaut/ba1dbbc170c2279749ea29bc8aaf375bdb659ad2/test/Types/Whitespace.hs
haskell
module Types.Whitespace ( genWS , genEmptyWS ) where import Hedgehog import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range import qualified Data.Vector as V import Types.Common (genWhitespace) import ...
78b8a5799ee802d250da571ae262ed0139cc05400bdd11ee7934cc03d859d040
lichenscript/lichenscript
lex_error.ml
type t = | Unexpected of string | UnexpectedWithExpected of string * string | UnexpectedTokenWithSuggestion of string * string | UnexpectedEOS | UnterminatedRegExp | InvalidFloatBigInt | InvalidSciBigInt | IllegalUnicodeEscape module PP = struct let error = function | Unexpected unexpected -> P...
null
https://raw.githubusercontent.com/lichenscript/lichenscript/5f9280f5927f1ed799d447940705eca11b8049dc/lib/lex/lex_error.ml
ocaml
type t = | Unexpected of string | UnexpectedWithExpected of string * string | UnexpectedTokenWithSuggestion of string * string | UnexpectedEOS | UnterminatedRegExp | InvalidFloatBigInt | InvalidSciBigInt | IllegalUnicodeEscape module PP = struct let error = function | Unexpected unexpected -> P...
48bb7928abf2b4682163c219ec0a927a269be9c89cf72fe90ebeb8efd6b13281
pokepay/aws-sdk-lisp
es.lisp
;; DO NOT EDIT: File is generated by AWS-SDK/GENERATOR. (uiop:define-package #:aws-sdk/services/es (:use) (:use-reexport #:aws-sdk/services/es/api))
null
https://raw.githubusercontent.com/pokepay/aws-sdk-lisp/836b87df520391478a19462443342dc56f4b3f2c/services/es.lisp
lisp
DO NOT EDIT: File is generated by AWS-SDK/GENERATOR.
(uiop:define-package #:aws-sdk/services/es (:use) (:use-reexport #:aws-sdk/services/es/api))
585484b7a8474a38d591dfb16156439e78eeda10ec7fe42fd9d26a966b6c19ab
robdockins/edison
Coll.hs
-- | -- Module : Data.Edison.Coll Copyright : Copyright ( c ) 1998 License : MIT ; see COPYRIGHT file for terms and conditions -- Maintainer : robdockins AT fastmail DOT fm -- Stability : stable Portability : GHC , Hugs ( MPTC and FD ) -- -- The /collection/ abstractio...
null
https://raw.githubusercontent.com/robdockins/edison/543a9085384ac2f4effbfc3266cca5f2d3b08e1b/edison-api/src/Data/Edison/Coll.hs
haskell
| Module : Data.Edison.Coll Stability : stable The /collection/ abstraction includes sets, bags and priority queues All collections assume at least an equality relation of elements, and may also assume an ordering relation. elements in the collection are equal). These subclasses, indic...
Copyright : Copyright ( c ) 1998 License : MIT ; see COPYRIGHT file for terms and conditions Maintainer : robdockins AT fastmail DOT fm Portability : GHC , Hugs ( MPTC and FD ) ( heaps ) . Collections are defined in Edison as a set of eight classes . The hierarchy contains ...
d2041e49d85888777a6b3c58396bc6a1758ffc761ad8d19ffea09f22536a774b
typelead/etlas
Db.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Program.Db Copyright : 2006 , 2007 - 2009 -- -- Maintainer : -- Portability : portable --...
null
https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas-cabal/Distribution/Simple/Program/Db.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE DeriveDataTypeable # --------------------------------------------------------------------------- | Module : Distribution.Simple.Program.Db Maintainer : Portability : portable configured programs. It is the parameter to lots of actions elsewhere in helpers like --wit...
# LANGUAGE FlexibleContexts # Copyright : 2006 , 2007 - 2009 This provides a ' ProgramDb ' type which holds configured and not - yet Cabal that need to look up and run programs . If we had a Cabal monad , the ' ProgramDb ' would probably be a reader or state component of it . One nice thing about us...
2ff826f3740d72a2a1225420e0c47c88f8518bf557cf623053f583bc446480a3
Darkkey/erlamsa
erlamsa_gf.erl
-module(erlamsa_gf). -export([static/1, rbyte/1, rword/1, rdword/1, rddword/1, pick/1, rbinary/2, rbinary/3, pick_pref/3, sizer/4, block/2, block/1, range/3, loop/4, fuzz/3, rbits/2, session_get_bits/3, session_get/2]). inc_ms(Rnd, Prob) -> io:format("Ms+1: ~w =< ~w~n", [Rnd, Prob]). ...
null
https://raw.githubusercontent.com/Darkkey/erlamsa/f46dde549588d15789c2c38aec4a206560024987/src/erlamsa_gf.erl
erlang
io:format("Block1~n"), io:format("PickPref~n"), TODO: type io:format("Loop~n"), io:format("Sizer~n"),
-module(erlamsa_gf). -export([static/1, rbyte/1, rword/1, rdword/1, rddword/1, pick/1, rbinary/2, rbinary/3, pick_pref/3, sizer/4, block/2, block/1, range/3, loop/4, fuzz/3, rbits/2, session_get_bits/3, session_get/2]). inc_ms(Rnd, Prob) -> io:format("Ms+1: ~w =< ~w~n", [Rnd, Prob]). ...
d86ee495440ccc3bee958d59c47a3ad1b07752e87bf00c0c9e1e5c08341c01cb
tfausak/exercism-solutions
Queens.hs
module Queens ( boardString , canAttack ) where import Data.List (intercalate, intersperse) type Board = [[Char]] type Point = (Int, Int) board :: Board board = replicate 8 $ replicate 8 'O' render :: Board -> String render b = intercalate "\n" (map (intersperse ' ') b) ++ "\n" place :: Char -> Point -> Board -> B...
null
https://raw.githubusercontent.com/tfausak/exercism-solutions/5e6f93979cc61ef5e3b48a09ca316dfd7fcd319c/haskell/queen-attack/Queens.hs
haskell
module Queens ( boardString , canAttack ) where import Data.List (intercalate, intersperse) type Board = [[Char]] type Point = (Int, Int) board :: Board board = replicate 8 $ replicate 8 'O' render :: Board -> String render b = intercalate "\n" (map (intersperse ' ') b) ++ "\n" place :: Char -> Point -> Board -> B...
733967c24653ddf910f537f6220d811c67b3f76f0f5fb81f690cf86c74e236c9
wireless-net/erlang-nommu
wxSplitterEvent.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2009 - 2013 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Publi...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/src/gen/wxSplitterEvent.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitatio...
Copyright Ericsson AB 2009 - 2013 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " < dd><em > command_splitter_sash_pos_cha...
504184016d0e0c47e5c84e6cd45e61b2f68050670772d772cc4cb8b17a0a8d9a
BitGameEN/bitgamex
jiffy_03_number_tests.erl
This file is part of Jiffy released under the MIT license . % See the LICENSE file for more information. -module(jiffy_03_number_tests). -include_lib("eunit/include/eunit.hrl"). -include("jiffy_util.hrl"). number_success_test_() -> [gen(ok, Case) || Case <- cases(ok)]. number_failure_test_() -> [gen(er...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/jiffy/test/jiffy_03_number_tests.erl
erlang
See the LICENSE file for more information.
This file is part of Jiffy released under the MIT license . -module(jiffy_03_number_tests). -include_lib("eunit/include/eunit.hrl"). -include("jiffy_util.hrl"). number_success_test_() -> [gen(ok, Case) || Case <- cases(ok)]. number_failure_test_() -> [gen(error, Case) || Case <- cases(error)]. number...
2315443c02a8b63d3ebb52496eda790b5ff33fbe36ae6d8dbe26544de1fa4ac4
kremers/cblog
project.clj
(defproject cblog "1.0.0" :description "simple blog in clojure" :dependencies [[org.clojure/clojure "1.4.0"] ;[ring/ring-jetty-adapter "1.1.0-beta3"] [ring "1.1.6"] [clj-time "0.4.4"] [net.cgrand/moustache "1.1.0"] [org.clojure/too...
null
https://raw.githubusercontent.com/kremers/cblog/54fd5325f3f620f582616cbee04de5623b6f48d8/project.clj
clojure
[ring/ring-jetty-adapter "1.1.0-beta3"]
(defproject cblog "1.0.0" :description "simple blog in clojure" :dependencies [[org.clojure/clojure "1.4.0"] [ring "1.1.6"] [clj-time "0.4.4"] [net.cgrand/moustache "1.1.0"] [org.clojure/tools.logging "0.2.3"] [org.slf4j/slf4j-api ...
3b8fa6e3fd6d0b3807ef4133973e6dffc84ca7733a31f8f1353e5ac0018165d6
hopv/homusat
typing.ml
(* Type inference/reconstruction *) (* Type environment *) module Env = Id.IdMap module UnionFind = struct (* We can use arrays instead of sets and maps *) module S = X.Set.Make (struct type t = HES.simple_type let compare : t -> t -> int = compare end) module M = X.Map.Make (struct ...
null
https://raw.githubusercontent.com/hopv/homusat/cc05711a3f9d45b253b83ad09a2d0288115cc4f4/typing.ml
ocaml
Type inference/reconstruction Type environment We can use arrays instead of sets and maps No rank function No occurs check No occurs check Auxiliary function for pretty error printing Reconstruction with occurs check The id x and pos are used for warning
module Env = Id.IdMap module UnionFind = struct module S = X.Set.Make (struct type t = HES.simple_type let compare : t -> t -> int = compare end) module M = X.Map.Make (struct type t = HES.simple_type let compare : t -> t -> int = compare end) type t = HES.simple_...
59232ed022c9b3d3c58539af757955fdd252568996cd438a9ed7266748352218
Gbury/dolmen
ast.ml
(* This file is free software, part of dolmen. See file "LICENSE" for more information. *) * AST requirement for the Smtlib format . The smtlib format is widely used among SMT solvers , and is the language of the smtlib benchmark library . Terms are expressed as s - expressions , and top - level dir...
null
https://raw.githubusercontent.com/Gbury/dolmen/12bf280df3d886ddc0faa110effbafb71bffef7e/src/languages/smtlib2/v2.6/script/ast.ml
ocaml
This file is free software, part of dolmen. See file "LICENSE" for more information. * The type of identifiers * Namespace for identifiers * The namespace for sorts (also called typee), terms and attributes, respectively. * Make an identifier from a name and namespace. * Create an indexed identifier. * The...
* AST requirement for the Smtlib format . The smtlib format is widely used among SMT solvers , and is the language of the smtlib benchmark library . Terms are expressed as s - expressions , and top - level directives include everything needed to use a prover in an interactive loop ( so it incl...
c261f80874308e04127af3ceff99b6d130ce2b19c24e49b770b72f6498a26765
lspitzner/pqueue
BenchMinPQueue.hs
import System.Random import Test.Tasty.Bench import qualified KWay.PrioMergeAlg as KWay import qualified PHeapSort as HS kWay :: Int -> Int -> Benchmark kWay i n = bench ("k-way merge looking " ++ show i ++ " deep into " ++ show n ++ " streams") (whnf ((!! i) . KWay.merge . KWay.mkStreams n) $ mkStdGen 5466122035...
null
https://raw.githubusercontent.com/lspitzner/pqueue/141022da77d9d4d4013badb7d6536d601221837f/benchmarks/BenchMinPQueue.hs
haskell
import System.Random import Test.Tasty.Bench import qualified KWay.PrioMergeAlg as KWay import qualified PHeapSort as HS kWay :: Int -> Int -> Benchmark kWay i n = bench ("k-way merge looking " ++ show i ++ " deep into " ++ show n ++ " streams") (whnf ((!! i) . KWay.merge . KWay.mkStreams n) $ mkStdGen 5466122035...
26ca3d25078f2fbdcf24cfedb60c43f5cbcd8d4a0a63b31645d9ea1900a0b3f5
PacktPublishing/HaskellCookbook
Lens.hs
{-# LANGUAGE Rank2Types #-} type Getter s a = s -> a type Setter s b t = s -> b -> t type Lens s t a b = forall f . Functor f => (a -> f b) -> s -> f t type Lens' s a = Lens s s a a lens :: Getter s a -> Setter s b t -> Lens s t a b lens getter setter f x = fmap (setter x) $ f $ getter $ x data Point = Point...
null
https://raw.githubusercontent.com/PacktPublishing/HaskellCookbook/27e146b6d91c008a7b1d06eda4ea63fe8a8cdb04/Ch_11-Working_with_Lens_and_Prisms/creating-lenses/src/Lens.hs
haskell
# LANGUAGE Rank2Types #
type Getter s a = s -> a type Setter s b t = s -> b -> t type Lens s t a b = forall f . Functor f => (a -> f b) -> s -> f t type Lens' s a = Lens s s a a lens :: Getter s a -> Setter s b t -> Lens s t a b lens getter setter f x = fmap (setter x) $ f $ getter $ x data Point = Point { x :: Double, y :: Double ...
b07448f044aabf611d9c91db90301627e5454dc5ccbac1432a0fe8419f6e9229
cedlemo/OCaml-GI-ctypes-bindings-generator
Network_connectivity.ml
open Ctypes open Foreign type t = Local | Limited | Portal | Full let of_value v = if v = Unsigned.UInt32.of_int 1 then Local else if v = Unsigned.UInt32.of_int 2 then Limited else if v = Unsigned.UInt32.of_int 3 then Portal else if v = Unsigned.UInt32.of_int 4 then Full else raise (Invalid_argument "Unexpe...
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gio/Network_connectivity.ml
ocaml
open Ctypes open Foreign type t = Local | Limited | Portal | Full let of_value v = if v = Unsigned.UInt32.of_int 1 then Local else if v = Unsigned.UInt32.of_int 2 then Limited else if v = Unsigned.UInt32.of_int 3 then Portal else if v = Unsigned.UInt32.of_int 4 then Full else raise (Invalid_argument "Unexpe...
1b2c1b200c7e2b46094fd8a5c0943426b6cf20fdbe5d74b1dda010e8fbcb722b
returntocorp/semgrep
unit_parsing_java.ml
open Common open Ast_java module Vis = Visitor_java (*****************************************************************************) (* Unit tests *) (*****************************************************************************) (* ran from _build/default/tests/ hence the '..'s below *) let tests_path = "../../../tes...
null
https://raw.githubusercontent.com/returntocorp/semgrep/00f1e67bbb80f00e29db3381288fc00398b6868a/languages/java/menhir/unit_parsing_java.ml
ocaml
*************************************************************************** Unit tests *************************************************************************** ran from _build/default/tests/ hence the '..'s below
open Common open Ast_java module Vis = Visitor_java let tests_path = "../../../tests" let tests = Testutil.pack_tests "parsing_java" [ ( "regression files", fun () -> let dir = Filename.concat tests_path "java/parsing" in let files = Common2.glob (spf "%s/*.java" dir) in ...
380c7bb990196492efddfee182f73629d931e1dbe7def49317785234aff899d3
dhleong/wish
limited_use.cljs
(ns wish.sheets.dnd5e.subs.limited-use (:require [re-frame.core :as rf :refer [reg-sub subscribe]] [wish.sheets.dnd5e.data :as data] [wish.sheets.dnd5e.subs.abilities :as abilities] [wish.sheets.dnd5e.subs.inventory :as inventory] [wish.sheets.dnd5e.subs.proficiency :as...
null
https://raw.githubusercontent.com/dhleong/wish/9036f9da3706bfcc1e4b4736558b6f7309f53b7b/src/cljs/wish/sheets/dnd5e/subs/limited_use.cljs
clojure
eagerly evaluate :uses (the sheet shouldn't do this) Takes an entity with :consumes and returns something that can be consumed from it. Usually this delegates to [::by-id (:consumes a)], but this also supports the special case of consuming a :*spell-slot special case easy case easy case: also easy:
(ns wish.sheets.dnd5e.subs.limited-use (:require [re-frame.core :as rf :refer [reg-sub subscribe]] [wish.sheets.dnd5e.data :as data] [wish.sheets.dnd5e.subs.abilities :as abilities] [wish.sheets.dnd5e.subs.inventory :as inventory] [wish.sheets.dnd5e.subs.proficiency :as...
333998b7bc3ba727bd8a14c46521c7c1490d70bb270489c07256017af8f44098
steinuil/xobl
elaborate_resolve_output.ml
let modules = [ "bigreq"; "composite"; "damage"; "dpms"; "dri2"; "dri3"; "ge"; "glx"; "present"; "randr"; "record"; "render"; "res"; "screensaver"; "shape"; "shm"; "sync"; "xc_misc"; "xevie"; "xf86dri"; "xf86vidmode"; "xfixes"; ...
null
https://raw.githubusercontent.com/steinuil/xobl/a5480d9ed51c6b9a51b3a7aa41f246a47ce1ecda/test/elaborate_resolve_output.ml
ocaml
let modules = [ "bigreq"; "composite"; "damage"; "dpms"; "dri2"; "dri3"; "ge"; "glx"; "present"; "randr"; "record"; "render"; "res"; "screensaver"; "shape"; "shm"; "sync"; "xc_misc"; "xevie"; "xf86dri"; "xf86vidmode"; "xfixes"; ...
ec1d2e5b29c7592f965cac97f78cc513602fd9bc210063c07896e0a166945aab
mbutterick/pollen
pollen.rkt
#lang racket/base (provide (all-defined-out)) (define (root . xs) `(one ,@xs)) (define (puppy) "one")
null
https://raw.githubusercontent.com/mbutterick/pollen/a4910a86dc62d1147f3aad94b56cecd6499d7aa6/pollen/test/data/pathup/pollen.rkt
racket
#lang racket/base (provide (all-defined-out)) (define (root . xs) `(one ,@xs)) (define (puppy) "one")
d9694146626b4ca2135585c1ec48ffda9cd363a7ea4b63d2a9a738637c1b68fc
clash-lang/clash-compiler
T1591.hs
# LANGUAGE CPP # #if __GLASGOW_HASKELL__ >= 810 # LANGUAGE StandaloneKindSignatures # #endif # LANGUAGE GADTs , UndecidableInstances # module T1591 where import Clash.Prelude import Data.Singletons import Data.Singletons.TH #if MIN_VERSION_singletons(3,0,0) import Prelude.Singletons #else import Data.Singletons.Pre...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/e502f16e44b57a23b2f5c945a7b295168be9a684/tests/shouldwork/Basic/T1591.hs
haskell
# LANGUAGE CPP # #if __GLASGOW_HASKELL__ >= 810 # LANGUAGE StandaloneKindSignatures # #endif # LANGUAGE GADTs , UndecidableInstances # module T1591 where import Clash.Prelude import Data.Singletons import Data.Singletons.TH #if MIN_VERSION_singletons(3,0,0) import Prelude.Singletons #else import Data.Singletons.Pre...
9d366cf83a4149ebabce03b379014ebebf7e3b1d55eb49afd7438754f99f0432
deadcode/Learning-CL--David-Touretzky
6.37.lisp
(defun rotate-left (x) (let ((to-move (first x))) (append (remove to-move x) (list to-move)))) (defun rotate-right (x) (let ((to-move (nth (- (length x) 1) x))) (append (list to-move) (remove to-move x)))) (let ((foo '(rotate-left '(a b c d e))) (bar '(rotate-right '(a b c d e)))) (forma...
null
https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%206/6.37.lisp
lisp
(defun rotate-left (x) (let ((to-move (first x))) (append (remove to-move x) (list to-move)))) (defun rotate-right (x) (let ((to-move (nth (- (length x) 1) x))) (append (list to-move) (remove to-move x)))) (let ((foo '(rotate-left '(a b c d e))) (bar '(rotate-right '(a b c d e)))) (forma...
ef14df17d8e5c3e44edee45f2fb42fb8ec1b5018fe656e8bf00f23bc863b4522
devaspot/brace
jxat_examples.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2011 , %%% @doc %%% %%% @end Created : 29 Dec 2011 by < > %%%------------------------------------------------------------------- -module(jxat_examples). %% API -include_lib("proper/include/proper.hrl"). %%%=====...
null
https://raw.githubusercontent.com/devaspot/brace/8494573efef63f4b2f39dd36e8c651a487223f20/test/jxat_examples.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API =================================================================== Tests =================================================================== =======================...
@author < > ( C ) 2011 , Created : 29 Dec 2011 by < > -module(jxat_examples). -include_lib("proper/include/proper.hrl"). prop_seive() -> Source = <<" (ns jxat-sieve-of-eratosthenes (require lists io) (use (joxa-core :only (!=/2)) (erlang :only (rem/2 +/2)))) (defn s...
ba7be7e8766d2d413ed822f5ef7df8d25587fa920a62ae91e16f440697c63884
lem-project/lem
indent.lisp
(defpackage :lem-lisp-syntax.indent (:use :cl :lem-base) (:export :*get-method-function* :get-indentation :set-indentation :update-system-indentation :indentation-update :calc-indent) #+sbcl (:lock t)) (in-package :lem-lisp-syntax.indent) (defparameter *bo...
null
https://raw.githubusercontent.com/lem-project/lem/67d918420cd968f36efc3e2763e05c50b737717d/lib/lisp-syntax/indent.lisp
lisp
("do" lisp-indent-do) `else-body' style single-else style (then and else equally indented) ("lambda" (&lambda &rest lisp-indent-function-lambda-hack)) barf ("loop" (&rest &body)) in `defgeneric' Combines the worst features of BLOCK, LET and TAGBODY ) (character-at p))) (character-at p)) (compute-i...
(defpackage :lem-lisp-syntax.indent (:use :cl :lem-base) (:export :*get-method-function* :get-indentation :set-indentation :update-system-indentation :indentation-update :calc-indent) #+sbcl (:lock t)) (in-package :lem-lisp-syntax.indent) (defparameter *bo...
7f7d950d650a2be6a10a45494071a4d002bd3dcb8280e9f5e96149a0a4b07c4d
startalkIM/ejabberd
http_muc_destroy.erl
-module(http_muc_destroy). -export([handle/1]). -include("ejabberd.hrl"). -include("logger.hrl"). -record(muc_online_room, {name_host = {<<"">>, <<"">>} :: {binary(), binary()} | '$1' | {'_', binary()} | '_', pid = self() :: pid() | '$2' | '_' | '$1'}). handle(Req) -> {Method, Req1}...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/http_muc_destroy.erl
erlang
-module(http_muc_destroy). -export([handle/1]). -include("ejabberd.hrl"). -include("logger.hrl"). -record(muc_online_room, {name_host = {<<"">>, <<"">>} :: {binary(), binary()} | '$1' | {'_', binary()} | '_', pid = self() :: pid() | '$2' | '_' | '$1'}). handle(Req) -> {Method, Req1}...
f34cb9706cb0d1357ac0c82ba056a8dc396117d53d29a5add2afec2d4c961145
nmattia/haskell-hot-swap
Server.hs
# LANGUAGE MagicHash # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE UnboxedTuples # module Main(main) where import Control.Concurrent (threadDelay) import Control.Concurrent.MVar import Control.Monad (forever, void) imp...
null
https://raw.githubusercontent.com/nmattia/haskell-hot-swap/37bdd031176ea9407b062e32584531e4c2f30b59/src/Server.hs
haskell
# LANGUAGE OverloadedStrings # ------------------------------ ULGY STUFF -----------------------------------
# LANGUAGE MagicHash # # LANGUAGE ScopedTypeVariables # # LANGUAGE UnboxedTuples # module Main(main) where import Control.Concurrent (threadDelay) import Control.Concurrent.MVar import Control.Monad (forever, void) import Encoding import ...
3df9c5c3aff03646506aec3f31bbb681ff656163ba01ecc942b21d4d1906c05c
aumouvantsillage/Virgule-CPU-Racket
datapath-components.rkt
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 /. #lang racket (require syntax/parse/define data/pvector (only-in data/collection nth set-nth) "logic.rkt" "signal.rkt" "opcode...
null
https://raw.githubusercontent.com/aumouvantsillage/Virgule-CPU-Racket/3df9656c48f04fb9488952ededccee38d3c527c7/src/datapath-components.rkt
racket
Architecture properties. Reading and writing happen in different stages. src-instr is used when reading xs1 and xs2 dest-instr is used when writing xd This implementation uses a signal of persistent vectors We don't use a register/re here. In register/e and register/re the input signal is evaluated even if the...
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 /. #lang racket (require syntax/parse/define data/pvector (only-in data/collection nth set-nth) "logic.rkt" "signal.rkt" "opcode...
9bd0c06f827bf30ecf3ca24b767fa08ec8996eceac620af83af2a54ee10ae1fd
wdebeaum/step
upstairs.lisp
;;;; W::upstairs ;;;; (define-words :pos W::ADV :words ( (W::upstairs (SENSES ((LF-PARENT ONT::floor-above) (TEMPL PRED-S-VP-TEMPL) (example "he went upstairs") (meta-data :origin chf :entry-date 20070810 :change-date nil :comments nil) ) ) ) ))
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/upstairs.lisp
lisp
W::upstairs (define-words :pos W::ADV :words ( (W::upstairs (SENSES ((LF-PARENT ONT::floor-above) (TEMPL PRED-S-VP-TEMPL) (example "he went upstairs") (meta-data :origin chf :entry-date 20070810 :change-date nil :comments nil) ) ) ) ))
8a95955f2be5c2b21e327d6332268d3f3f0ac5e05f408ed992ec7e97c68625e0
TrustInSoft/tis-kernel
Vset.mli
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/Vset.mli
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of WP plug - in of Frama - C. Copyright ( C ) 2007 - 2015 ...
da6166b5502b3f92728a7af7b22712988846d2e5b26abb7c49d1d580858315ed
dongcarl/guix
python-science.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2015 , 2016 , 2020 , 2021 < > Copyright © 2015 < > Copyright © 2016 < > Copyright © 2016 < > Copyright © 2016 < > Copyright © 2016 , 2017 , 2018 , 2019 , 2020 < > Copyright © 2019 < > Copyright © 2019 < > Copy...
null
https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/python-science.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2015 , 2016 , 2020 , 2021 < > Copyright © 2015 < > Copyright © 2016 < > Copyright © 2016 < > Copyright © 2016 < > Copyright © 2016 , 2017 , 2018 , 2019 , 2020 < > Copyright © 2019 < > Copyright © 2019 < > Copyright © 2019 < > Copyright © 2020 < > Copyrig...
aa0bb63f182c2c1e4dae55917ab7911598379ef439bcec4fb578e12033c254fb
jaredly/belt
belt_MapDict.ml
Copyright ( C ) 2017 Authors of BuckleScript * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later versi...
null
https://raw.githubusercontent.com/jaredly/belt/4d07f859403fdbd3fbfc5a9547c6066d657a2131/belt_src/belt_MapDict.ml
ocaml
Worth optimize for reference equality? Nothing to remove Nothing to remove
Copyright ( C ) 2017 Authors of BuckleScript * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later versi...
7cf897be05f2206992e0285a1ce2e0de2985ba27c16d175cf4b8e337c0ab0f91
TrustInSoft/tis-interpreter
callgraph_api.mli
Modified by TrustInSoft (**************************************************************************) (* *) This file is part of Frama - C. (* ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/callgraph/callgraph_api.mli
ocaml
************************************************************************ alternatives) ...
Modified by TrustInSoft This file is part of Frama - C. Copyright ( C ) 2007 - 2015 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Softwa...
dc65354a81ae9f63cd7ec08b364336a9a9040b818770103234a7ce845350580f
imandra-ai/minisat-ml
Minisat_types.ml
Minisat - ml , adapted from Minisat by < > Copyright ( c ) 2019 - 2019 , Aesthetic Integration ( ) Copyright (c) 2019-2019, Aesthetic Integration () *) Copyright ( c ) 2003 - 2006 , , ( c ) 2007 - 2010 , is hereby granted , free of charge , to any person obtaining a copy of this software an...
null
https://raw.githubusercontent.com/imandra-ai/minisat-ml/7e942e95e88a2443bd449f8e470aa7d68cead2be/src/lib/Minisat_types.ml
ocaml
magic for casting from bool to int */* */* */* unchecked conversion unchecked conversion */* $T Lit.is_undef Lit.undef large array ensure that capacity is at least [min_cap] Printf.printf "clause.alloc.ensure %d (cap %d)\n" min_cap prev_cap; overflow realloc now ensure activity array is at least [min...
Minisat - ml , adapted from Minisat by < > Copyright ( c ) 2019 - 2019 , Aesthetic Integration ( ) Copyright (c) 2019-2019, Aesthetic Integration () *) Copyright ( c ) 2003 - 2006 , , ( c ) 2007 - 2010 , is hereby granted , free of charge , to any person obtaining a copy of this software an...
67e41eab0289dd266afa4a5f9dea94727a4e71aec167020c9a7363196c4c941e
Drup/dowsing
IndexIntf.ml
module type S = sig type t type iter = (Type.t * Cell.t) Iter.t type iter_with_unifier = (Type.t * Cell.t * Subst.t) Iter.t val make : Unit.t -> t val remove : t -> String.t -> Unit.t val add : t -> String.t -> Fpath.t -> Unit.t val iter : ?pkgs:(String.t List.t) -> t -> iter val iter_with : ?pkgs:(...
null
https://raw.githubusercontent.com/Drup/dowsing/cbeeb9d4e885b6ee03416415a3142717543953e2/lib/index/IndexIntf.ml
ocaml
module type S = sig type t type iter = (Type.t * Cell.t) Iter.t type iter_with_unifier = (Type.t * Cell.t * Subst.t) Iter.t val make : Unit.t -> t val remove : t -> String.t -> Unit.t val add : t -> String.t -> Fpath.t -> Unit.t val iter : ?pkgs:(String.t List.t) -> t -> iter val iter_with : ?pkgs:(...
388d6f38e6996cd520126fff165421ba3219d41642b85a522cf281f37d8f333a
jeromesimeon/Galax
code_util_join.mli
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/code_selection/code/code_util_join.mli
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . $ I d : code_util_join.mli , v 1.6 2007/02/01 22:08:45 simeon Exp $ open Algebra_type open Xquery_algebra_ast open Xquery_common_ast open Code_selection_context type join_kind = | NestedLoopJoin | HashJoin | SortJoin val get_join_k...
e6578c0640d5d2e8e59763ae69642b5963bdb7fd8f4dd2a6a2d411248293e418
DKurilo/hackerrank
solution.hs
# LANGUAGE OverloadedStrings , UnicodeSyntax # module Main where import Prelude.Unicode import Control.Monad import qualified Data.ByteString.Char8 as BSC import Debug.Trace import System.Environment import System.IO deDupe ∷ String → String deDupe = reverse ∘ fst ∘ foldl (\(cs,ds) c → if c `elem` ds ...
null
https://raw.githubusercontent.com/DKurilo/hackerrank/37063170567b397b25a2b7123bc9c1299d34814a/string-reductions/solution.hs
haskell
# LANGUAGE OverloadedStrings , UnicodeSyntax # module Main where import Prelude.Unicode import Control.Monad import qualified Data.ByteString.Char8 as BSC import Debug.Trace import System.Environment import System.IO deDupe ∷ String → String deDupe = reverse ∘ fst ∘ foldl (\(cs,ds) c → if c `elem` ds ...
6543133d377cc1022bcc7ba5fc2eb1eb4d8533b4e4aa5c6ce0ae10b3af9e6dac
dongcarl/guix
orange.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2021 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU 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 the Lice...
null
https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/orange.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2021 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu packages orange) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packa...
dced9e31d1673728369d364811b8b68ef4d19d75a3b83179db21593e3e939e1d
tonymorris/fp-course
ChequeTest.hs
# OPTIONS_GHC -fno - warn - type - defaults # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module Course.ChequeTest where import Test.Tasty (TestTree, testGroup) import Test.Tasty.HUnit (testCase, (@?=)) import Course.Core import Course.Cheque (dol...
null
https://raw.githubusercontent.com/tonymorris/fp-course/73a64c3d4d0df58654a1a9a0ee9d9b11c3818911/test/Course/ChequeTest.hs
haskell
# LANGUAGE OverloadedStrings #
# OPTIONS_GHC -fno - warn - type - defaults # # LANGUAGE NoImplicitPrelude # module Course.ChequeTest where import Test.Tasty (TestTree, testGroup) import Test.Tasty.HUnit (testCase, (@?=)) import Course.Core import Course.Cheque (dollars) import Course.List ...
2cebb62b2a562d156303976402633db0e9b25446a43f0abf035ed05c596981a0
expipiplus1/vulkan
Extra.hs
module Data.Vector.Extra ( module Data.Vector , pattern Empty , pattern (:<|) , pattern Singleton ) where import Data.Vector import qualified Data.Vector as V import Prelude # complete Empty , (: < | ) # pattern Empty :: Vector a pattern Empty <- (V.null -> True) where...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/generate-new/src/Data/Vector/Extra.hs
haskell
module Data.Vector.Extra ( module Data.Vector , pattern Empty , pattern (:<|) , pattern Singleton ) where import Data.Vector import qualified Data.Vector as V import Prelude # complete Empty , (: < | ) # pattern Empty :: Vector a pattern Empty <- (V.null -> True) where...
3ff1d95ee24d81c04630398850ca74c46d91ba81bb5ac6c5b29ac4d27a8626be
GaloisInc/LIMA
Periodic.hs
-- | -- Module : Periodic Copyright : 2017 License : ISC -- -- Maintainer : -- Stability : experimental -- Portability : unknown -- -- Some example specifications of systems with different periodic behavior. -- module Periodic (module Periodic) where import Control.Monad (mapM_) import D...
null
https://raw.githubusercontent.com/GaloisInc/LIMA/8006bb52b2fb5d3264fe55ef8c9b7c89ab7f4630/case-studies/periodic/Periodic.hs
haskell
| Module : Periodic Maintainer : Stability : experimental Portability : unknown Some example specifications of systems with different periodic behavior. ----------------------------------------------------------------- | Simple periodic atom. obviously untrue | Clocked version of ex1 reset clo...
Copyright : 2017 License : ISC module Periodic (module Periodic) where import Control.Monad (mapM_) import Data.Int import Language.LIMA import Language.LIMA.C.Util (printProbe) import Language.Sally ex1 :: Atom () ex1 = atom "ex1" $ do x <- int64 "x" 0 incr x ex2 :: Atom () ex2 = atom "ex2"...
ae14eb7a0c0e59bfc2b0fd318d0431c156d2e4410535d65d4624fe250003f188
Tclv/HaskellBook
Hello.hs
module Hello (sayHello) where sayHello :: String -> IO () sayHello name = do putStrLn $ "Hi " ++ name ++ "!"
null
https://raw.githubusercontent.com/Tclv/HaskellBook/78eaa5c67579526b0f00f85a10be3156bc304c14/ch13/hello/src/Hello.hs
haskell
module Hello (sayHello) where sayHello :: String -> IO () sayHello name = do putStrLn $ "Hi " ++ name ++ "!"
826193adf2b51eca0466ebf5730edd6cb2672133718d47064f50942910d6e6f1
LeventErkok/sbv
Enumerate.hs
----------------------------------------------------------------------------- -- | -- Module : Documentation.SBV.Examples.Optimization.Enumerate Copyright : ( c ) -- License : BSD3 -- Maintainer: -- Stability : experimental -- -- Demonstrates how enumerations can be used with optimization, -- by properly defi...
null
https://raw.githubusercontent.com/LeventErkok/sbv/cfaa40b8c8ff8e1b7ff9ab71304654f6f531ba72/Documentation/SBV/Examples/Optimization/Enumerate.hs
haskell
--------------------------------------------------------------------------- | Module : Documentation.SBV.Examples.Optimization.Enumerate License : BSD3 Maintainer: Stability : experimental Demonstrates how enumerations can be used with optimization, by properly defining your metric values. ---------------...
Copyright : ( c ) # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # module Documentation.SBV.Examples.Optimization.Enumerate where import Data.SBV data Day = Mon | Tue | Wed | Thu | Fri | Sat | Sun | Make ' Day ' a symbolic value . mkSymbolicEnumeration ''D...
54743e63cab68537ea54bd33d77ab087e94830f3c65f432e385211823d1e8b14
ygmpkk/house
Cutil_12.hs
{-# OPTIONS -cpp #-} -- #hide ----------------------------------------------------------------------------- -- Module : OS.Cutil_12 Copyright : ( c ) 2002 -- License : BSD-style -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -- This module contains some additiona...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/ObjectIO/Graphics/UI/ObjectIO/OS/Cutil_12.hs
haskell
# OPTIONS -cpp # #hide --------------------------------------------------------------------------- Module : OS.Cutil_12 License : BSD-style Maintainer : Stability : provisional Portability : portable This module contains some additional routines required for marshalling -------------------...
Copyright : ( c ) 2002 arguments to OS C calling routines . module Graphics.UI.ObjectIO.OS.Cutil_12 ( addr2int, int2addr, fpeek, Storable(..), free, malloc , module Data.Int , module Data.Bits , module Foreign.Ptr , module Foreign.C.String ) where import Foreign.Ptr import Foreign.Storable i...
f05bc343bd6fa41d444eabcc4b12b6afa1d2227f7f04debecff845378cc72f93
ingesolvoll/kee-frame
beta.cljc
(ns kee-frame.fsm.beta (:require [glimt.core :as http] [re-frame.core :as f] [statecharts.clock :as clock] [statecharts.core :as fsm] [statecharts.core :as fsm] [statecharts.delayed :as delayed] [statecharts.integrations.re-frame :as sc.rf] [statecharts.utils :as u] [taoensso.timbre :as log...
null
https://raw.githubusercontent.com/ingesolvoll/kee-frame/8907f615db446c20ed9054acd4b55995b8c6393f/src/kee_frame/fsm/beta.cljc
clojure
(ns kee-frame.fsm.beta (:require [glimt.core :as http] [re-frame.core :as f] [statecharts.clock :as clock] [statecharts.core :as fsm] [statecharts.core :as fsm] [statecharts.delayed :as delayed] [statecharts.integrations.re-frame :as sc.rf] [statecharts.utils :as u] [taoensso.timbre :as log...
ef4862d1d43b2dc64d8b41888f16f8680883138695d896515ae06ab5e17b7fc5
Gabscap/InfoProxy
GetIS.hs
module GetIS where import qualified Data.ByteString as BS import System.IO.Streams (InputStream) import qualified System.IO.Streams.ByteString as Streams import qualified System.IO.Streams.Cereal as Streams import Control.Applicative import Control.Monad import Control.Monad.IO.Class import qualified Contro...
null
https://raw.githubusercontent.com/Gabscap/InfoProxy/3c24b7ccce8b2c2f3aec03a373c3b14fec8afd2b/src/GetIS.hs
haskell
# INLINE (<*>) # # INLINE (*>) # # INLINE empty # # INLINE (<|>) # # INLINE (>>=) # # INLINE (>>) #
module GetIS where import qualified Data.ByteString as BS import System.IO.Streams (InputStream) import qualified System.IO.Streams.ByteString as Streams import qualified System.IO.Streams.Cereal as Streams import Control.Applicative import Control.Monad import Control.Monad.IO.Class import qualified Contro...
a5c496f0da3d76d79be166e689a0db162372fe3bc30689791663a33c53f1b0c5
eugeneia/athens
importer.lisp
(in-package :athens.service) (defun clean-html (html &aux (error-output *error-output*)) (let ((errors (make-array 0 :element-type 'character :adjustable t :fill-pointer t))) (handler-bind ((error (lambda (error) (declare (ignore error)) (w...
null
https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/src/importer.lisp
lisp
(in-package :athens.service) (defun clean-html (html &aux (error-output *error-output*)) (let ((errors (make-array 0 :element-type 'character :adjustable t :fill-pointer t))) (handler-bind ((error (lambda (error) (declare (ignore error)) (w...
0eeffb1f578cc014c960c8d88c635f1412fe12e82a5665bb4abaf19a50f0e242
valderman/haste-compiler
PrimopWrappers.hs
{-# LANGUAGE MagicHash, NoImplicitPrelude, UnboxedTuples #-} module GHC.PrimopWrappers where import qualified GHC.Prim import GHC.Tuple () import GHC.Prim (Char#, Int#, Word#, Float#, Double#, Word64#, Int64#, State#, MutableArray#, Array#, SmallMutableArray#, SmallArray#, MutableByteArray#, ByteArray#, Addr#, StablePt...
null
https://raw.githubusercontent.com/valderman/haste-compiler/47d942521570eb4b8b6828b0aa38e1f6b9c3e8a8/libraries/ghc-7.10/ghc-prim/GHC/PrimopWrappers.hs
haskell
# LANGUAGE MagicHash, NoImplicitPrelude, UnboxedTuples # # NOINLINE geChar# # # NOINLINE neChar# # # NOINLINE (*#) # # NOINLINE (==#) # # NOINLINE (/=#) # # NOINLINE uncheckedIShiftL# # # NOINLINE timesWord# # # NOINLINE quotRemWord# # # NOINLINE popCnt16# # # NOINLINE (==##) # # NOINLINE (/=##) # # NOINLINE double2Flo...
module GHC.PrimopWrappers where import qualified GHC.Prim import GHC.Tuple () import GHC.Prim (Char#, Int#, Word#, Float#, Double#, Word64#, Int64#, State#, MutableArray#, Array#, SmallMutableArray#, SmallArray#, MutableByteArray#, ByteArray#, Addr#, StablePtr#, MutableArrayArray#, ArrayArray#, MutVar#, RealWorld, TVar...
a71b339a280a21d9072a1bdff0d563925074e9954517d07a63cda39e1b637260
jwiegley/notes
Chobbes.hs
module Main where import Data.Attoparsec.Text import qualified Data.Text as T import Control.Applicative import Control.Monad.State import Control.Monad.Trans.Except import Debug.Trace type EvalParser = StateT Integer (ExceptT String Parser) liftP :: Parser a -> EvalParser a liftP = lift . lift parseOp :: Char -> P...
null
https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/Chobbes.hs
haskell
module Main where import Data.Attoparsec.Text import qualified Data.Text as T import Control.Applicative import Control.Monad.State import Control.Monad.Trans.Except import Debug.Trace type EvalParser = StateT Integer (ExceptT String Parser) liftP :: Parser a -> EvalParser a liftP = lift . lift parseOp :: Char -> P...
1bd0f68743039154e94fee0d74d462689bbb883cdbe10cb6e701cc217534e0e4
bmeurer/ocaml-arm
unixLabels.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , Kyot...
null
https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/otherlibs/unix/unixLabels.ml
ocaml
********************************************************************* OCaml ...
, Kyoto University RIMS Copyright 2001 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with $ Id$ Module [ UnixLabels ] : labelled ...
fa924de37cb9bab05f77be6a39ecc704f781a4b259e9fba530a48e9fc29d9452
kendricktan/bch
Main.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE Rank2Types # module Main where import qualified Control.Monad.State as S import Data.Aeson hiding (json) import qualified Data.ByteString import Data.IORef import Data.Monoid ((<>)) impo...
null
https://raw.githubusercontent.com/kendricktan/bch/b31fb94cd9599ff33eaa28b671dc7ae5da0c7d72/app/Main.hs
haskell
# LANGUAGE OverloadedStrings # Adds a transaction Block head Block tail Add tx to the head of block New blockchain Mines the block head Blockchain Block head Block tail Mined block New block head Returns current block head Gets current blockhash Gets entire blockchasin a state (making it 'mutable') ...
# LANGUAGE DeriveGeneric # # LANGUAGE Rank2Types # module Main where import qualified Control.Monad.State as S import Data.Aeson hiding (json) import qualified Data.ByteString import Data.IORef import Data.Monoid ((<>)) import Data.String (f...
d60bd98c22a221849b81d3c4e2238f4f080bbf87d12ff91d7c5cfd650d9776e0
justinethier/nugget
begin.scm
(begin 1 2 (+ 1 2) (+ 3 4))
null
https://raw.githubusercontent.com/justinethier/nugget/0c4e3e9944684ea83191671d58b5c8c342f64343/cyclone/tests/begin.scm
scheme
(begin 1 2 (+ 1 2) (+ 3 4))
a3d0c680c16cd8e3d6a2f335c89cd7c5658dbe5d8d5dd962dc48f7726b2b70f1
rlepigre/subml
timed.ml
(****************************************************************************) * { 3 Undoable references } (****************************************************************************) (** This module provides alternative functions for updating references (that i...
null
https://raw.githubusercontent.com/rlepigre/subml/6d2b35276d8d299bef9d5e70653a88be7f89f7f1/src/timed.ml
ocaml
************************************************************************** ************************************************************************** * This module provides alternative functions for updating references (that is, terms of type ['a ref]) and enables the restoration of a previously saved state by ...
* { 3 Undoable references } * [ Time ] submodule allows to [ save ] the current time and [ rollback ] the references . If the time is not accessible . old values are collected by the GC if no time are accessible that would allow to rollback to this...
2a19fe9cec74e09eb66d6b1fb53910ec97d8cf2b0169bf5557bbd00d3d04e09c
erlang/rebar3
ec_vsn.erl
%%% vi:ts=4 sw=4 et %%%------------------------------------------------------------------- @author < > 2014 Erlware , LLC . %%% @doc Provides a signature to manage returning semver formatted versions %%% from various version control repositories. %%% This interface is a member of the Erlware Commons Libr...
null
https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/vendor/erlware_commons/src/ec_vsn.erl
erlang
vi:ts=4 sw=4 et ------------------------------------------------------------------- @doc from various version control repositories. @end ------------------------------------------------------------------- API =================================================================== Types =============================...
@author < > 2014 Erlware , LLC . Provides a signature to manage returning semver formatted versions This interface is a member of the Erlware Commons Library . -module(ec_vsn). -export([new/1, vsn/1]). -export_type([t/0]). -record(t, {callback, data}). -type t() :: #t{}. -ifdef(have_callbac...
ac5c1d1d3be25312fb141aa42001d2aae3520fdab7ff89822ef9727a917a887b
unnohideyuki/bunny
sample040.hs
f True = "true message" f False = "false message" main = putStrLn (f True)
null
https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample040.hs
haskell
f True = "true message" f False = "false message" main = putStrLn (f True)
df814af402935519d906a7f7b6de8b1cdb0229cb96005e8b3b50f1a75be5dc54
nextjournal/clojure-mode
close_brackets.cljs
(ns nextjournal.clojure-mode.extensions.close-brackets (:require ["w3c-keyname" :refer [keyName]] ["@codemirror/view" :as view] ["@codemirror/state" :refer [EditorState EditorSelection Transaction ...
null
https://raw.githubusercontent.com/nextjournal/clojure-mode/d414976ebdbc47242e05b693305832888020090b/src/nextjournal/clojure_mode/extensions/close_brackets.cljs
clojure
handle line-comments (backspace should not drag forms up into line comments) we are directly in front of a line-comment current line is blank node immediately to the left of cursor selection inside a string unbalanced left-paren entering right edge of collection - skip inside left edge of collection - remove o...
(ns nextjournal.clojure-mode.extensions.close-brackets (:require ["w3c-keyname" :refer [keyName]] ["@codemirror/view" :as view] ["@codemirror/state" :refer [EditorState EditorSelection Transaction ...
ff164fcaee606e27eb7476e4ce86fc7f09faa18b8a854bd537ac44ef106c3f26
AdaCore/why3
generic_arg_trans_utils.mli
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University (* ...
null
https://raw.githubusercontent.com/AdaCore/why3/4441127004d53cf2cb0f722fed4a930ccf040ee4/src/transform/generic_arg_trans_utils.mli
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University General Public License version 2.1 , with the special exception open Term exception Arg_trans of string exception Arg_trans_decl of (string * Theory.tdecl list) exception...