_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
074c7bb66ef884e13f375ef41b9a0d878a75ae327933c4b5ff966caeb2cce42c
jdreaver/eventful
TransferManager.hs
# LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # module Bank.ProcessManagers.TransferManager ( TransferManager (..) , TransferManagerTransferData (..) , TransferProcessManager , transferProcessManager ) where import Control.Lens import Data.Maybe (isNothing) import Data.Map.Strict (Map) import qual...
null
https://raw.githubusercontent.com/jdreaver/eventful/3f0c604e5bb2dcf5bacf0a2e01edf6a5e9c5e22e/examples/bank/src/Bank/ProcessManagers/TransferManager.hs
haskell
TODO: Find a way to get the actual error so we can put it in this event.
# LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # module Bank.ProcessManagers.TransferManager ( TransferManager (..) , TransferManagerTransferData (..) , TransferProcessManager , transferProcessManager ) where import Control.Lens import Data.Maybe (isNothing) import Data.Map.Strict (Map) import qual...
2dba6643c9de3d71412acacb8b20d5c398ff25fba7514f5c76d17b17bbc1578e
swaywm/cl-wlroots
test.lisp
(ql:quickload "cl-wlroots") ;; (ql:quickload "swank") ;; (swank-loader:init) ( swank : create - server : port 4000 ;; :dont-close t) (defpackage #:cl-wlr-test (:use #:cl #:wlr #:cffi #:wayland-server-core)) (in-package #:cl-wlr-test) (defclass test-server () ((display :initarg :display :accessor d...
null
https://raw.githubusercontent.com/swaywm/cl-wlroots/f8a33979e45086ecd5c7deefd5ee067b941e0998/examples/test.lisp
lisp
(ql:quickload "swank") (swank-loader:init) :dont-close t) (with-foreign-slots ((notify notify) listener (:struct wl_listener)) (wl-event-loop-destroy event-loop)
(ql:quickload "cl-wlroots") ( swank : create - server : port 4000 (defpackage #:cl-wlr-test (:use #:cl #:wlr #:cffi #:wayland-server-core)) (in-package #:cl-wlr-test) (defclass test-server () ((display :initarg :display :accessor display) (backend :initarg :backend :accessor backend) (event-lo...
85bffaf7d0d90dcf02157da139a256fb4721a063e7c42e5feafb731d047b58fe
namin/biohacker
states.lisp
;; -*- Mode: Lisp; -*- ;;;; TGizmo state recorder Last Edited : 1/29/93 , by KDF Copyright ( c ) 1991 , , Northwestern University , and , the Xerox Corporation . All Rights Reserved . ;;; See the file legal.txt for a paragraph stating scope of permission ;;; and disclaimer of warranty. The above cop...
null
https://raw.githubusercontent.com/namin/biohacker/6b5da4c51c9caa6b5e1a68b046af171708d1af64/BPS/tgizmo/states.lisp
lisp
-*- Mode: Lisp; -*- TGizmo state recorder See the file legal.txt for a paragraph stating scope of permission and disclaimer of warranty. The above copyright notice and that paragraph must be included in any separate copy of this file. a previously examined state to be regenerated and for easy comparison of sta...
Last Edited : 1/29/93 , by KDF Copyright ( c ) 1991 , , Northwestern University , and , the Xerox Corporation . All Rights Reserved . (in-package :COMMON-LISP-USER) Takes a snapshot of the current LTMS database to allow (defun snapshot (title &optional (*tgizmo* *tgizmo*)) (let ((st (make-state...
9dab9c26f457b2310c37707ebeee21e3479550de2ee3ac36164a292daa5b85fb
halogenandtoast/nhk-reader-haskell
Redis.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module Util.Redis where import Import import Database.Redis notFetchedRecently :: Connection -> IO Bool notFetchedRecently conn = do liftIO $ runRedis conn $ do fetched <- exists "nhk_fetched" return $ either (const True) not fetche...
null
https://raw.githubusercontent.com/halogenandtoast/nhk-reader-haskell/de3d26eba65adae372ee91c32299ef55b5024d39/src/Util/Redis.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE NoImplicitPrelude # module Util.Redis where import Import import Database.Redis notFetchedRecently :: Connection -> IO Bool notFetchedRecently conn = do liftIO $ runRedis conn $ do fetched <- exists "nhk_fetched" return $ either (const True) not fetched setFetchedKey :: Connection -> I...
89b990e1fbbae470c89becb7f3ec0d50421f339941e6e6551d7f073ccc34ce2d
coq/coq
classes.ml
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/17861fef0115d965996294be15258c8bd5e857a7/vernac/classes.ml
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
c8371d93d6ec0b591c50a9f28d70665830972ae89469c87781d6a0be3de04817
kudu-dynamics/blaze
Pil.hs
module Blaze.Pil where import Blaze.Pil.Analysis (getAllSyms) import Blaze.Types.Pil.Analysis (symbolGenerator) import Blaze.Prelude hiding ( Symbol, Type, ) import Blaze.Types.Function ( Access (In, Out), FuncInfo, FuncParamInfo (FuncParamInfo, FuncVarArgInfo), ParamInfo (ParamInfo), ResultI...
null
https://raw.githubusercontent.com/kudu-dynamics/blaze/63e30781f4c7bd816118e855f6fa4ae6e59949fe/src/Blaze/Pil.hs
haskell
The list contains vars cons'd on as they are encountered in processing a path. The var last defined is at the head of the list. If none of the candidate vars appear in the list, return 'Nothing'. |Generate store statements that correspond to any arguments used for output for a called function. TODO: Need to actu...
module Blaze.Pil where import Blaze.Pil.Analysis (getAllSyms) import Blaze.Types.Pil.Analysis (symbolGenerator) import Blaze.Prelude hiding ( Symbol, Type, ) import Blaze.Types.Function ( Access (In, Out), FuncInfo, FuncParamInfo (FuncParamInfo, FuncVarArgInfo), ParamInfo (ParamInfo), ResultI...
e9ba1ca54a0e16c8530706fe07210018389655d627aaa4d748d0f79ff4a401bd
razum2um/cljsh
postclj.clj
(ns cljsh.postclj (:require [clojure.pprint :as pprint] [clojure.zip :as z])) (clojure.core/defn pprint [code] (pprint/with-pprint-dispatch pprint/code-dispatch (pprint/pprint code))) (clojure.core/defn coll-zip [root] (z/zipper sequential? seq (fn [node children] (let [coll (i...
null
https://raw.githubusercontent.com/razum2um/cljsh/b2ebe284fea5dce618786111524735c73ff1be63/src/cljsh/postclj.clj
clojure
(ns cljsh.postclj (:require [clojure.pprint :as pprint] [clojure.zip :as z])) (clojure.core/defn pprint [code] (pprint/with-pprint-dispatch pprint/code-dispatch (pprint/pprint code))) (clojure.core/defn coll-zip [root] (z/zipper sequential? seq (fn [node children] (let [coll (i...
e4828ed0a22e14efb71fa02352cad87df712ee0371705002560de8d71f85da4c
OCamlPro/ocp-build
ocpStream.ml
(**************************************************************************) (* *) (* Typerex Libraries *) (* *) Copyrigh...
null
https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/libs/ocplib-lang/ocpStream.ml
ocaml
************************************************************************ Typerex Libraries ...
Copyright 2011 - 2017 OCamlPro SAS the GNU Lesser General Public License version 2.1 , with the include Stream let to_list stream = let list = ref [] in Stream.iter ( fun token -> list := token :: !list ) stream; List.rev !list let of_lines lin...
684847efc3a7b646297f4df48fc778db212d94ba24434e13c36cf76f41e7c07c
l29ah/hyborg
Main.hs
# LANGUAGE DeriveGeneric , OverloadedStrings , ScopedTypeVariables , RecordWildCards , Strict , CPP # #if __GLASGOW_HASKELL__ < 902 {-# OPTIONS_GHC -fplugin=RecordDotPreprocessor #-} #else # LANGUAGE OverloadedRecordDot # #endif # LANGUAGE DuplicateRecordFields , TypeApplications , FlexibleContexts , DataKinds , MultiP...
null
https://raw.githubusercontent.com/l29ah/hyborg/6ff493b988c6359303515dab8b6897c70fc34f32/Main.hs
haskell
# OPTIONS_GHC -fplugin=RecordDotPreprocessor # store the chunk data on the server |archive a chunked directory entry store the file data on the server archive the directory contents and then the directory itself TODO other encryption schemes TODO user-settable number of threads list all the archives present in ...
# LANGUAGE DeriveGeneric , OverloadedStrings , ScopedTypeVariables , RecordWildCards , Strict , CPP # #if __GLASGOW_HASKELL__ < 902 #else # LANGUAGE OverloadedRecordDot # #endif # LANGUAGE DuplicateRecordFields , TypeApplications , FlexibleContexts , DataKinds , MultiParamTypeClasses , TypeSynonymInstances , FlexibleIn...
e22aa847c8cfd60698b62e7c9c8a884658a474aa1be1ad5b8d4930b4e4782582
Plutonomicon/plutarch-core
SKI.hs
# LANGUAGE FlexibleInstances # TODO : Taken from github.com/L-as/ski-singletons , will be ported back eventually . # LANGUAGE UndecidableInstances # module Plutarch.Internal.SKI ( Known (..), CheckCorrect, sinterp, Interp, DefineNewtypeInner, DefineNewtypeConstructor, GetNewtypeInner, GetNewtypeConst...
null
https://raw.githubusercontent.com/Plutonomicon/plutarch-core/6befe9f205fd3a9f1b6697f09e7162331029dde0/Plutarch/Internal/SKI.hs
haskell
Helpers Data types Not isomorphic on the type-level, but viewed externally is equivalent. ((forall x. f x) -> ForallS f, forall x. ForallS f -> f x) # OVERLAPPABLE # FIXME: Add inductive types too and have separate type for fixpoint using
# LANGUAGE FlexibleInstances # TODO : Taken from github.com/L-as/ski-singletons , will be ported back eventually . # LANGUAGE UndecidableInstances # module Plutarch.Internal.SKI ( Known (..), CheckCorrect, sinterp, Interp, DefineNewtypeInner, DefineNewtypeConstructor, GetNewtypeInner, GetNewtypeConst...
583b07a0bc97ed264d29bb13c0c36320af225dec9a6ddfd55bf02439cfb4fe1f
ndmitchell/catch
ZipInit.hs
module ZipInit where main x y = zipinit x y zipinit [] ys = ys zipinit (x:xs) (y:ys) = (x : y) : zipinit xs ys
null
https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/examples/Example/ZipInit.hs
haskell
module ZipInit where main x y = zipinit x y zipinit [] ys = ys zipinit (x:xs) (y:ys) = (x : y) : zipinit xs ys
51754ccf04da8e4acb45bd2f1cac26e0d7d0b0019fe9658a99ebae4dd2b290d2
d-plaindoux/transept
element.mli
(** The [Element] module provides a simple type [t]. This type is used to denote elements in parsed streams. *) (** {1 Structure anatomy} *) module CORE : sig type t end (** {1 API} *) module type API = module type of CORE (** The complete interface of an [Element]. *)
null
https://raw.githubusercontent.com/d-plaindoux/transept/8567803721f6c3f5d876131b15cb301cb5b084a4/lib/transept_specs/element.mli
ocaml
* The [Element] module provides a simple type [t]. This type is used to denote elements in parsed streams. * {1 Structure anatomy} * {1 API} * The complete interface of an [Element].
module CORE : sig type t end module type API = module type of CORE
215ecc19d440f99e21ccf7dc21c2a3bde9be28e080ce926e4d47a2242a1d56bf
input-output-hk/project-icarus-importer
Util.hs
-- | Utilities used by slotting implementations. module Pos.Slotting.Impl.Util ( approxSlotUsingOutdated , slotFromTimestamp ) where import Universum import Data.Time.Units (Microsecond, convertUnit) import Pos.Core.Configuration (epochSlots, HasProtocolConstants) ...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/infra/Pos/Slotting/Impl/Util.hs
haskell
| Utilities used by slotting implementations. | Approximate current slot using outdated slotting data. This is a constant and doesn't need to be fetched atomically This is here to ensure we don't have any timing issues | Get both values we need in a single fetch, so we don't end up with invalid data. | Compute c...
module Pos.Slotting.Impl.Util ( approxSlotUsingOutdated , slotFromTimestamp ) where import Universum import Data.Time.Units (Microsecond, convertUnit) import Pos.Core.Configuration (epochSlots, HasProtocolConstants) import Pos.Core.Slotting (EpochIndex, L...
809096c7c758eeac8d2e9c2a326d98660a90cb534257a932ce7ef8a0d9f873b0
tmattio/omigrate
omigrate.ml
module Connection = Driver.Connection let with_driver ~f database = let open Lwt_result.Syntax in let* () = Logs_lwt.debug (fun m -> m "Loading the driver from the URI") |> Lwt_result.ok in let* driver = Driver.load_from_uri database |> Lwt.return in let module D = (val driver) in let* conninfo = D...
null
https://raw.githubusercontent.com/tmattio/omigrate/de6dc1ef0478560a64f345a2afa364d081ac4519/lib/omigrate/omigrate.ml
ocaml
module Connection = Driver.Connection let with_driver ~f database = let open Lwt_result.Syntax in let* () = Logs_lwt.debug (fun m -> m "Loading the driver from the URI") |> Lwt_result.ok in let* driver = Driver.load_from_uri database |> Lwt.return in let module D = (val driver) in let* conninfo = D...
289e833ffc20eb0553263a9b51f28e3a515e1ad287acf738459a134cc7413a37
haskell-repa/repa
Detect.hs
module Data.Array.Repa.Plugin.ToDDC.Detect ( detectModule , Detect (..) , zeroState) where import Data.Array.Repa.Plugin.FatName import Data.Array.Repa.Plugin.ToDDC.Detect.Base import Data.Array.Repa.Plugin.ToDDC.Detect.Type () import Data.Array.Repa.Plugin.ToDDC.Detect.Prim import DDC.Core.M...
null
https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/icebox/abandoned/repa-plugin/Data/Array/Repa/Plugin/ToDDC/Detect.hs
haskell
| Detect primitive operators in a module. In the input program, special functions like 'map' and 'reduce' are taken to be defined in an imported module, but for the lowering transform we treat those as primitive operators. - names as strings. We produce a new module with special names like 'map' and ...
module Data.Array.Repa.Plugin.ToDDC.Detect ( detectModule , Detect (..) , zeroState) where import Data.Array.Repa.Plugin.FatName import Data.Array.Repa.Plugin.ToDDC.Detect.Base import Data.Array.Repa.Plugin.ToDDC.Detect.Type () import Data.Array.Repa.Plugin.ToDDC.Detect.Prim import DDC.Core.M...
f9b5c28e1ea27ab364c6de1a665fdb41018ea00fb4a20d69fee2204d0a22eb24
gtk2hs/gtk2hs
GtkChap5-3.hs
import Graphics.UI.Gtk main :: IO () main = do initGUI window <- windowNew set window [windowTitle := "Font and Color Selection", containerBorderWidth := 10 ] vb <- vBoxNew False 0 containerAdd window vb qtlab <- labelNew (Just "How poor are they that have not patience!\nWhat wound did e...
null
https://raw.githubusercontent.com/gtk2hs/gtk2hs/0f90caa1dae319a0f4bbab76ed1a84f17c730adf/docs/tutorial/Tutorial_Port/Example_Code/GtkChap5-3.hs
haskell
import Graphics.UI.Gtk main :: IO () main = do initGUI window <- windowNew set window [windowTitle := "Font and Color Selection", containerBorderWidth := 10 ] vb <- vBoxNew False 0 containerAdd window vb qtlab <- labelNew (Just "How poor are they that have not patience!\nWhat wound did e...
b760052fc7b0ce519875dae3e33cb5bd9f4678b1fc834e2560d08618a4cb302f
bondy-io/bondy
bondy_session_api.erl
-module(bondy_session_api). -include_lib("kernel/include/logger.hrl"). -include_lib("wamp/include/wamp.hrl"). -export([get/3]). get(Key, SessionId, _Details) -> try case bondy_session:lookup(Key) of {ok, Session} -> case bondy_session:external_id(Session) of ...
null
https://raw.githubusercontent.com/bondy-io/bondy/a1267e7e5526db24f278e12315020753f3168b44/apps/bondy/src/bondy_session_api.erl
erlang
-module(bondy_session_api). -include_lib("kernel/include/logger.hrl"). -include_lib("wamp/include/wamp.hrl"). -export([get/3]). get(Key, SessionId, _Details) -> try case bondy_session:lookup(Key) of {ok, Session} -> case bondy_session:external_id(Session) of ...
2f742fea91402c89a59644e5f593a951676bc02357dffd74989cd0abdd470b55
haskell-suite/haskell-src-exts
ExplicitNamespaces1.hs
# LANGUAGE ExplicitNamespaces # import Data.Array.Repa ( type (++) ) import Data.Array.Repa ( type {- comment here -} (++) ) import Data.Array.Repa ( type {- comment2 here -} (++) {- and here -} )
null
https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/ExplicitNamespaces1.hs
haskell
comment here comment2 here and here
# LANGUAGE ExplicitNamespaces # import Data.Array.Repa ( type (++) )
9a9e39cd31049f8e62ba7f5f276d08d7b6e963a7d1eb86680f3197cf3ae4478e
fulcrologic/semantic-ui-wrapper
ui_feed_summary.cljc
(ns com.fulcrologic.semantic-ui.views.feed.ui-feed-summary (:require [com.fulcrologic.semantic-ui.factory-helpers :as h] #?(:cljs ["semantic-ui-react$FeedSummary" :as FeedSummary]))) (def ui-feed-summary "A feed can contain a summary. Props: - as (elementType): An element type to render as (string...
null
https://raw.githubusercontent.com/fulcrologic/semantic-ui-wrapper/7bd53f445bc4ca7e052c69596dc089282671df6c/src/main/com/fulcrologic/semantic_ui/views/feed/ui_feed_summary.cljc
clojure
(ns com.fulcrologic.semantic-ui.views.feed.ui-feed-summary (:require [com.fulcrologic.semantic-ui.factory-helpers :as h] #?(:cljs ["semantic-ui-react$FeedSummary" :as FeedSummary]))) (def ui-feed-summary "A feed can contain a summary. Props: - as (elementType): An element type to render as (string...
aa6d7673c38cd6f78e8fa405e6ec7e84ae0c2d339a38afb599764bc2e51f0b56
plumatic/grab-bag
messages_test.clj
(ns domain.messages-test (:use clojure.test plumbing.core plumbing.test domain.doc-test-utils domain.messages) (:require [schema.core :as s] [plumbing.serialize :as serialize] [domain.doc-test-utils :as doc-test-utils] [domain.docs.actions :as actions] [domain.docs.fitness-stats :as fitness-stats] ...
null
https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/domain/test/domain/messages_test.clj
clojure
(ns domain.messages-test (:use clojure.test plumbing.core plumbing.test domain.doc-test-utils domain.messages) (:require [schema.core :as s] [plumbing.serialize :as serialize] [domain.doc-test-utils :as doc-test-utils] [domain.docs.actions :as actions] [domain.docs.fitness-stats :as fitness-stats] ...
5f6b063d4bc28a7906b1a45a8828f44063ae673627ff9cb979b4a1c3e090347d
runtimeverification/haskell-backend
Sentence.hs
| Copyright : ( c ) Runtime Verification , 2019 - 2021 License : BSD-3 - Clause Copyright : (c) Runtime Verification, 2019-2021 License : BSD-3-Clause -} module Kore.Syntax.Sentence ( Symbol (..), groundSymbol, Alias (..), SentenceAlias (..), SentenceSymbol (..), SentenceIm...
null
https://raw.githubusercontent.com/runtimeverification/haskell-backend/c4f375731a8786c48291958a4bc2484b51ce5d8c/kore/src/Kore/Syntax/Sentence.hs
haskell
* Injections and projections * Type synonyms * Re-exports |Given an 'Id', 'groundSymbol' produces the unparameterized 'Symbol' corresponding to that argument. | 'SentenceSymbol' is the @sentence-symbol@ and syntactic category from <-backend/blob/master/docs/kore-syntax.md#sentences kore-syntax.md#sentences>. | ...
| Copyright : ( c ) Runtime Verification , 2019 - 2021 License : BSD-3 - Clause Copyright : (c) Runtime Verification, 2019-2021 License : BSD-3-Clause -} module Kore.Syntax.Sentence ( Symbol (..), groundSymbol, Alias (..), SentenceAlias (..), SentenceSymbol (..), SentenceIm...
b6a0fed459652648b4b5cff4009005355ebb46fa8b299c2b57042bdb766505bd
lpw25/ocaml-typed-effects
mtype.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/lpw25/ocaml-typed-effects/79ea08b285c1fd9caf3f5a4d2aa112877f882bea/typing/mtype.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . open Asttypes open Path open Types l...
ad5f482cb676eb412d59800638e6d0b979764a2fe01a44aaba9aff16f591b6f7
greglook/merkledag-ledger
balance.clj
(ns finance.data.balance "Balance checks provide a mechanism for asserting the state of an account at specific points in time. This is a tool for tying the data to known-good numbers verified in the real world." (:require [finance.data.core :as data :refer [defattr]] [finance.data.entry :as entry] [...
null
https://raw.githubusercontent.com/greglook/merkledag-ledger/af938ba0c7e5e694e679d583a1cecf64f41452d8/src/finance/data/balance.clj
clojure
## Normal Form TODO: adopt transaction date?
(ns finance.data.balance "Balance checks provide a mechanism for asserting the state of an account at specific points in time. This is a tool for tying the data to known-good numbers verified in the real world." (:require [finance.data.core :as data :refer [defattr]] [finance.data.entry :as entry] [...
4530d8d1d31e38e33ccba0c080f8455de6eca3f477f9653193d5ff59579e8044
dgiot/dgiot
emqx_dashboard_sup.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/dgiot/dgiot/c9f2f78af71692ba532e4806621b611db2afe0c9/lib-ce/emqx_dashboard/src/emqx_dashboard_sup.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_dashboard_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1...
f7ac9b05cef7c452eeb27b0574f41debfe887e384888b09411dfbacb4d124fda
jaspervdj/planet-wars-haskell
BullyBot.hs
| Example bot using the PlanetWars module -- module Main where import Data.List (maximumBy, partition) import qualified Data.IntMap as IM import Data.Ord (comparing) import PlanetWars doTurn :: GameState -- ^ Game state -> [Order] -- ^ Blocks forever doTurn state = if null myFleets && (not . null) myPla...
null
https://raw.githubusercontent.com/jaspervdj/planet-wars-haskell/83a3e9150a4ee11b5ef13be085191a4ebadf3ba7/example_bots/BullyBot.hs
haskell
^ Game state ^ Blocks forever Find my fleets Separate out my planets Conversion function Find my strongest planet Value of other planets Find the weakest planet I don't control Send half the planet's ships
| Example bot using the PlanetWars module module Main where import Data.List (maximumBy, partition) import qualified Data.IntMap as IM import Data.Ord (comparing) import PlanetWars doTurn state = if null myFleets && (not . null) myPlanets && (not . null) notMyPlanets then [Order (p...
2c2c6b02ac47f1bf31629cbc1baa679c3a6bbb8470af46dae804c7d97cbc02a4
jakemcc/sicp-study
ex3_40.clj
Exercise 3.40 ; Give all possible values of x that can result from: ( define x 10 ) ; (parallel-execute (lambda () (set! x (* x x))) ; (lambda () (set! x (* x x x)))) ; Potentials 1000000 - > P1 runs to completion then P2 1000000 - > P2 then P1 100 - > P2 reads 10 for x but no set , P1 re...
null
https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section3.4/ex3_40.clj
clojure
Give all possible values of x that can result from: (parallel-execute (lambda () (set! x (* x x))) (lambda () (set! x (* x x x)))) Potentials If it gets changed to: (define s (make-serializer)) (parallel-execute (s (lambda () (set! x (* x x)))) (s (lambda () (set! x (* x x x)...
Exercise 3.40 ( define x 10 ) 1000000 - > P1 runs to completion then P2 1000000 - > P2 then P1 100 - > P2 reads 10 for x but no set , P1 reads 10 for x but no set , P2 sets , P1 sets 1000 - > P1 reads 10 for x but no set , P2 reads 10 for x but no set , P1 sets , P2 sets ( define x 10 ) Now P1 and...
65b106e30a48356cc944f041213df7abf54dbb6fae3a56c92185542ec0654593
xh4/web-toolkit
tests.lisp
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- (defpackage #:org.mapcar.parse-number-tests (:use #:common-lisp #:org.mapcar.parse-number) (:export #:run-tests)) (in-package #:org.mapcar.parse-number-tests) (defparameter *test-values* '("1" "-1" "1034" "3." "-3." "-364" "80/335" "1.3214" "3.5333" "2.4E4" "6.8d3...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/parse-number-v1.7/tests.lisp
lisp
-*- Mode: Lisp; indent-tabs-mode: nil -*-
(defpackage #:org.mapcar.parse-number-tests (:use #:common-lisp #:org.mapcar.parse-number) (:export #:run-tests)) (in-package #:org.mapcar.parse-number-tests) (defparameter *test-values* '("1" "-1" "1034" "3." "-3." "-364" "80/335" "1.3214" "3.5333" "2.4E4" "6.8d3" "#xFF" "#b-1000" "#o-101/75" "13.09s3" "3...
43b856f771fa4a5eb4b3ce28273edd7704691645660f16a8ef41b1d5f433e508
janestreet/universe
out_channel.ml
open! Base open! Import type t = Caml.out_channel let equal (t1 : t) t2 = phys_equal t1 t2 let seek = Caml.LargeFile.seek_out let pos = Caml.LargeFile.pos_out let length = Caml.LargeFile.out_channel_length let stdout = Caml.stdout let stderr = Caml.stderr let sexp_of_t t = if phys_equal t stderr then Sexp...
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/stdio/src/out_channel.ml
ocaml
open! Base open! Import type t = Caml.out_channel let equal (t1 : t) t2 = phys_equal t1 t2 let seek = Caml.LargeFile.seek_out let pos = Caml.LargeFile.pos_out let length = Caml.LargeFile.out_channel_length let stdout = Caml.stdout let stderr = Caml.stderr let sexp_of_t t = if phys_equal t stderr then Sexp...
7564abbf773e19e454cec4c1ff986823d0e067113a0325513afb0ed70668ec33
owlbarn/owl_opt
rmsprop.ml
open Owl module AD = Algodiff.D module P = struct type 'a t = { a : 'a ; b : 'a } [@@deriving prms] end open P module O = Owl_opt.D.Rmsprop.Make (P) let () = let x = Algodiff.D.Mat.gaussian 3 1 in let a = Algodiff.D.Mat.gaussian 5 3 in let b = Algodiff.D.Mat.gaussian 5 1 in let y = Algodiff.D...
null
https://raw.githubusercontent.com/owlbarn/owl_opt/c3b34072dddbce2d70e1698c5f1fd84d783f9cef/examples/opt/rmsprop.ml
ocaml
open Owl module AD = Algodiff.D module P = struct type 'a t = { a : 'a ; b : 'a } [@@deriving prms] end open P module O = Owl_opt.D.Rmsprop.Make (P) let () = let x = Algodiff.D.Mat.gaussian 3 1 in let a = Algodiff.D.Mat.gaussian 5 3 in let b = Algodiff.D.Mat.gaussian 5 1 in let y = Algodiff.D...
b27799d056313ff769bd61da97494953090e7f5985d31d7d84168cf2a4ebfe05
cjay/vulkyrie
Buffer.hs
{-# LANGUAGE Strict #-} module Vulkyrie.Vulkan.Buffer ( createBuffer , copyBuffer , findMemoryType ) where import Control.Monad.IO.Unlift import Graphics.Vulkan import Graphics.Vulkan.Core_1_0 import Graphics.Vulkan.Marshal.Create import Vulkyrie.Program impor...
null
https://raw.githubusercontent.com/cjay/vulkyrie/83edbd0099f9bb02b2b1fe159523245861011018/src/Vulkyrie/Vulkan/Buffer.hs
haskell
# LANGUAGE Strict # releasing the buffer before releasing the memory that is bound to it
module Vulkyrie.Vulkan.Buffer ( createBuffer , copyBuffer , findMemoryType ) where import Control.Monad.IO.Unlift import Graphics.Vulkan import Graphics.Vulkan.Core_1_0 import Graphics.Vulkan.Marshal.Create import Vulkyrie.Program import Vulkyrie.Pro...
57fc98ea88d3af33f304e7928a0eb024d837a82792880fd11b7df40f9ce3e379
Helium4Haskell/helium
PatUnaryMinBad2.hs
f (-.Nil) = 3
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/parser/PatUnaryMinBad2.hs
haskell
f (-.Nil) = 3
7916211f108d63db0fe0d005b7e65eaca080e690f76644b2d89ab995dc00ecbf
eeng/mercurius
deposit_test.clj
(ns mercurius.wallets.domain.use-cases.deposit-test (:require [clojure.test :refer [deftest testing is]] [spy.core :as spy] [spy.assert :as assert] [matcher-combinators.test] [mercurius.support.factory :refer [build-user-id build-wallet]] [mercurius.wallets....
null
https://raw.githubusercontent.com/eeng/mercurius/f83778ddde99aa13692e4fe2e70b2e9dc2fd70e9/test/mercurius/wallets/domain/use_cases/deposit_test.clj
clojure
(ns mercurius.wallets.domain.use-cases.deposit-test (:require [clojure.test :refer [deftest testing is]] [spy.core :as spy] [spy.assert :as assert] [matcher-combinators.test] [mercurius.support.factory :refer [build-user-id build-wallet]] [mercurius.wallets....
c6a40d51a5cb5a27920a8bd0bb04df53549fbd9d4436ad794c3286fdddf89a0f
bluemont/kria
server_test.clj
(ns kria.server-test (:require [clojure.test :refer :all] [kria.test-helpers :as h] [kria.client :as c] [kria.server :as s])) (defn connect [] (let [p (promise) conn (c/connect "127.0.0.1" 8087 (h/cb-fn p))] @p conn)) (deftest ping-test (testing "ping-info" ...
null
https://raw.githubusercontent.com/bluemont/kria/8ed7fb1ebda8bfa1a2a6d7a3acf05e2255fcf0f0/test/kria/server_test.clj
clojure
(ns kria.server-test (:require [clojure.test :refer :all] [kria.test-helpers :as h] [kria.client :as c] [kria.server :as s])) (defn connect [] (let [p (promise) conn (c/connect "127.0.0.1" 8087 (h/cb-fn p))] @p conn)) (deftest ping-test (testing "ping-info" ...
7d78d45981ceba04faff016f50384e48ae047e4b9486d82b34019d53617fea6b
yzhs/ocamlllvm
parse.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/parsing/parse.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ I d : parse.ml 9547 2010 - 01 - 22 ...
ef2e2e82b8cd6ee7eb25a112babcd0c4c5a0b3654a05917e8809983567b247ba
zkincaid/duet
bddpa.ml
* BDD - based points - to and escape analysis . The analysis is : - Inclusion based - Context insensitive - Speculatively field sensitive - Inclusion based - Context insensitive - Speculatively field sensitive *) open Core open CfgIr open Srk open PointerAnalysis (* Enumerations for...
null
https://raw.githubusercontent.com/zkincaid/duet/eb3dbfe6c51d5e1a11cb39ab8f70584aaaa309f9/duet/bddpa.ml
ocaml
Enumerations for converting to/from integers for datalog ****************** x.of1 := y.of2 + of3 x.of1 := *(y.of2 + of3) input relations computed relations variables constants x.fx := y.f1 + f2 *(x.f1 + f2) := y.fy x.fx := *(y.f1 + f2) x.fx := alloc (...) + f / &y + f / "const_str" + f todo! Und...
* BDD - based points - to and escape analysis . The analysis is : - Inclusion based - Context insensitive - Speculatively field sensitive - Inclusion based - Context insensitive - Speculatively field sensitive *) open Core open CfgIr open Srk open PointerAnalysis module DefEnum = En...
9400c15b0430cef08ffa3473ac476c32c67ebefd0dbe9f8d760e0a563502eb06
chaitanyagupta/chronicity
grabber.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*- ;;; grabber.lisp ;;; See the LICENSE file for licensing information. (cl:in-package #:chronicity) ;;; Enable cl-interpol reader #.(cl-interpol:enable-interpol-syntax) (defclass grabber (tag) ()) (defmethod scan-tokens ((tag (eql 'g...
null
https://raw.githubusercontent.com/chaitanyagupta/chronicity/5841d1548cad0ca6917d8e68933124a5af68f5ec/src/grabber.lisp
lisp
Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*- grabber.lisp See the LICENSE file for licensing information. Enable cl-interpol reader Disable cl-interpol reader
(cl:in-package #:chronicity) #.(cl-interpol:enable-interpol-syntax) (defclass grabber (tag) ()) (defmethod scan-tokens ((tag (eql 'grabber)) tokens) (let ((scan-map '(("last" :last) ("this" :this) ("next" :next)))) (dolist (token tokens tokens) (loop ...
26fdfa48d02643f85d6c73e31b9eff805bb70a237a3448ff44f0b5a933c85877
wireapp/wire-server
AssetRetention_user.hs
-- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License...
null
https://raw.githubusercontent.com/wireapp/wire-server/c428355b7683b7b7722ea544eba314fc843ad8fa/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetRetention_user.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTI...
Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along module Test.Wire.API.Golden.Gene...
d1b294a71f0aaa6c331d5da85060976a15d6a83b559635780ee5a6939b782659
ocaml-sf/learn-ocaml-corpus
test.ml
open Report open Test_lib let sample_int () = Random.int 30 - 15 let sample_array sample = sample_array ~min_size: 2 ~max_size: 12 ~dups: false ~sorted: false sample let () = set_result @@ ast_sanity_check code_ast @@ fun () -> [ Section ([ Text "Exercise 1: " ; Code "min" ], test_function_1_a...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/mooc/week2/seq3/ex2/test.ml
ocaml
auto gen auto gen
open Report open Test_lib let sample_int () = Random.int 30 - 15 let sample_array sample = sample_array ~min_size: 2 ~max_size: 12 ~dups: false ~sorted: false sample let () = set_result @@ ast_sanity_check code_ast @@ fun () -> [ Section ([ Text "Exercise 1: " ; Code "min" ], test_function_1_a...
eb174665789fff576bd287ed6ea7e382db48f204dbc4382bad3e7a63f51fcb86
spawnfest/eep49ers
wxHtmlEasyPrinting.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2020 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxHtmlEasyPrinting.erl
erlang
%CopyrightBegin% 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 lan...
Copyright Ericsson AB 2008 - 2020 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(wxHtmlEasyPrinting). -include("wxe.hrl"). -export([destroy/1,getPageSetupData/1,getPrintData/1,new/0,new/1,p...
929fc5b86dba336d3aa985a162a958466664ca89bbfeae550e5e0dc89be58f86
ntoronto/pict3d
gen-world-state.rkt
#lang racket (require pict3d pict3d/universe) (define lights+camera (combine (light (pos 0 1 2) (emitted "Thistle" 3)) (light (pos 0 -1 -2) (emitted "PowderBlue" 3)) (basis 'camera (point-at (pos 1.5 0 0) origin)))) (define blades (scale (move-z (combine (cylinder origin (di...
null
https://raw.githubusercontent.com/ntoronto/pict3d/09283c9d930c63b6a6a3f2caa43e029222091bdb/pict3d/tests/gen-world-state.rkt
racket
#lang racket (require pict3d pict3d/universe) (define lights+camera (combine (light (pos 0 1 2) (emitted "Thistle" 3)) (light (pos 0 -1 -2) (emitted "PowderBlue" 3)) (basis 'camera (point-at (pos 1.5 0 0) origin)))) (define blades (scale (move-z (combine (cylinder origin (di...
b8a4c92a0600050e1c9ca3bf979456c92abb68f518c5da9d969cad5f63552b67
klarna-incubator/bec
bec_hook_t.erl
%%============================================================================== Type definition for the data structure %%============================================================================== -module(bec_hook_t). %%============================================================================== %% Exports %%...
null
https://raw.githubusercontent.com/klarna-incubator/bec/b090bfbeeff298b4fc40e16a9da217f2ce404844/src/bec_hook_t.erl
erlang
============================================================================== ============================================================================== ============================================================================== Exports ==========================================================================...
Type definition for the data structure -module(bec_hook_t). -export([ from_map/1, to_map/1]). -include("bitbucket.hrl"). -type key() :: binary(). -type hook() :: #{ key := key() , enabled := boolean() , settings => bec_hook_settings_t:settings() }. -expor...
cd5237463a60bf8fc3ee8dbced7de1001f592610fe746fbe7436a74609057490
genmeblog/genuary
day25.clj
;; Perspective. (ns genuary.2022.day25 (:require [fastmath.vector :as v] [clojure2d.core :as c2d] [clojure2d.extra.utils :as utils] [clojure2d.pixels :as p] [fastmath.random :as r] [clojure2d.color :as c])) (defn project [[x y z]] (v/mult (v/vec2 (/ x z...
null
https://raw.githubusercontent.com/genmeblog/genuary/f61a2b1e6f06518fefc7d4a263100995e3f28190/src/genuary/2022/day25.clj
clojure
Perspective. blobs
(ns genuary.2022.day25 (:require [fastmath.vector :as v] [clojure2d.core :as c2d] [clojure2d.extra.utils :as utils] [clojure2d.pixels :as p] [fastmath.random :as r] [clojure2d.color :as c])) (defn project [[x y z]] (v/mult (v/vec2 (/ x z) (/ y z)) 3.0))...
423013aba5f83e9028ce81e12247d57770135358a510e10a2e786018262243a2
moby/datakit
datakit_client_git.mli
(** A DataKit client that use a Git directory directly. *) include Datakit_client.S val connect : ?head:string -> ?bare:bool -> ?level:int -> ?dot_git:string -> ?author:string -> string -> t Lwt.t
null
https://raw.githubusercontent.com/moby/datakit/e047e55a2dfa3aaec02398d7d7699f4f7afd2b47/api/ocaml/git/datakit_client_git.mli
ocaml
* A DataKit client that use a Git directory directly.
include Datakit_client.S val connect : ?head:string -> ?bare:bool -> ?level:int -> ?dot_git:string -> ?author:string -> string -> t Lwt.t
7bc033632422790abea95485f08c42343bd13892023c0b02074e5df8ebc97550
CSCfi/rems
form_validation.clj
(ns rems.form-validation "Pure functions for form validation logic" (:require [clojure.string :as str] [rems.common.form :as form] [rems.common.util :refer [+email-regex+ +phone-number-regex+ +ipv4-regex+ ...
null
https://raw.githubusercontent.com/CSCfi/rems/567ce80d7b136d43570083380933d2907baba769/src/clj/rems/form_validation.clj
clojure
default: Schema validation guarantees that it's either a s/Str or a [[{:column s/Str :value s/Str}]], and we've ruled out s/Str in wrong-value-type-error TODO: validate that attachments are actually valid? default
(ns rems.form-validation "Pure functions for form validation logic" (:require [clojure.string :as str] [rems.common.form :as form] [rems.common.util :refer [+email-regex+ +phone-number-regex+ +ipv4-regex+ ...
dab65269359a4815a5997783e129198aa3758a1d6ba44537f8e8c9a820f0e693
blindglobe/clocc
load-memoization.lisp
-*- Mode : LISP ; Syntax : Common - Lisp ; Package : User ; Base : 10 -*- (in-package :User) ;;;=========================================================================== ( C ) 1992 . Permission is granted for any use or modification of this code provided this notice is retained . Version of 8/93 . ;;;=...
null
https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/tools/memoization/load-memoization.lisp
lisp
Syntax : Common - Lisp ; Package : User ; Base : 10 -*- =========================================================================== =========================================================================== =========================================================================== - Load-Memoization [THIS FILE]:...
(in-package :User) ( C ) 1992 . Permission is granted for any use or modification of this code provided this notice is retained . Version of 8/93 . This file is one of four files that define the Memoization facility : other 3 files the pr...
cfb2315af1d81461d03272a2c3800128024dd8e71d8daf0de94789ada8a0e235
softwarelanguageslab/maf
R5RS_various_work-4.scm
; Changes: * removed : 0 * added : 2 * swaps : 0 ; * negated predicates: 0 ; * swapped branches: 0 * calls to i d fun : 1 (letrec ((fix (let ((z (lambda (P) (<change> () (lambda (o) (lambda (r) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_various_work-4.scm
scheme
Changes: * negated predicates: 0 * swapped branches: 0
* removed : 0 * added : 2 * swaps : 0 * calls to i d fun : 1 (letrec ((fix (let ((z (lambda (P) (<change> () (lambda (o) (lambda (r) (lambda (k) ...
d7e1d6dac6dd7e36a83656017f7b99c641c9a4adcfb88269c29133b926561729
Hans-Halverson/myte
main_function.mli
val analyze : Ast.Module.t list -> Loc.t option * Analyze_error.errors
null
https://raw.githubusercontent.com/Hans-Halverson/myte/c873c89417367a4ba385d081346241b0d9236e01/src/analyze/main_function.mli
ocaml
val analyze : Ast.Module.t list -> Loc.t option * Analyze_error.errors
f10b75fca28e611713b0d2c38f9a44d2945033bbafa75331f1d9144de03b1bd5
coco-team/lustrec
kindLustreAst.mli
This file is part of the Kind 2 model checker . Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License a...
null
https://raw.githubusercontent.com/coco-team/lustrec/b21f9820df97e661633cd4418fdab68a6c6ca67d/src/cocospec/kindLustreAst.mli
ocaml
* Error while parsing * {1 Types} * An identifier * A single index * A clock expression * A Lustre type * An identifier with a type * A record field or an array or tuple index * A declaration of an alias or free type * An identifier with a type and a clock as used for the type of variables * An identifier, po...
This file is part of the Kind 2 model checker . Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License a...
3f14199e7f97888156acfdda33f9425ff5c2b2d09263719f8cb81e8e6fb54854
Enecuum/Node
Interpreters.hs
module Enecuum.Framework.Interpreters ( module X ) where import Enecuum.Framework.NodeDefinition.Interpreter as X -- import Enecuum.Framework.Network.Interpreter as X import Enecuum.Framework.Networking.Interpreter as X import Enecuum.Framework.Node.Interpreter as X import Enecuum.Framework.Handler.Rpc.Interpreter...
null
https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/src/Enecuum/Framework/Interpreters.hs
haskell
import Enecuum.Framework.Network.Interpreter as X
module Enecuum.Framework.Interpreters ( module X ) where import Enecuum.Framework.NodeDefinition.Interpreter as X import Enecuum.Framework.Networking.Interpreter as X import Enecuum.Framework.Node.Interpreter as X import Enecuum.Framework.Handler.Rpc.Interpreter as X
f1c9a10074b4386ab21f1a097ff60fc31a36dd48395142287a7b4f9898f61f65
clash-lang/clash-compiler
BitReduction.hs
| Copyright : ( C ) 2013 - 2016 , University of Twente , 2021 , QBayLogic B.V. License : BSD2 ( see the file LICENSE ) Maintainer : QBayLogic B.V. < > Copyright : (C) 2013-2016, University of Twente, 2021, QBayLogic B.V. License : BSD2 (see the...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/0bc08c17cebc4a459877a565b33cff714636b116/clash-prelude/src/Clash/Class/BitPack/BitReduction.hs
haskell
# OPTIONS_HADDOCK show-extensions # | Are all bits set to '1'? 0b11_1110 >>> reduceAnd (0 :: Unsigned 0) 0b00_0101 >>> reduceOr (0 :: Unsigned 0) | Is the number of bits set to '1' uneven? 0b00_0101 0b11_1011 >>> reduceXor (0 :: Unsigned 0)
| Copyright : ( C ) 2013 - 2016 , University of Twente , 2021 , QBayLogic B.V. License : BSD2 ( see the file LICENSE ) Maintainer : QBayLogic B.V. < > Copyright : (C) 2013-2016, University of Twente, 2021, QBayLogic B.V. License : BSD2 (see the...
ce42bce969fd578e999e9e2a447ef36f550fbf36e2fed48944f898a72f8f7a53
macchiato-framework/macchiato-template
project.clj
(defproject macchiato/lein-template "0.2.67" :description "A Leiningen template for creating Node.js based ClojureScript apps." :url "-framework/macchiato-template" :license {:name "MIT License" :url ""} :scm {:name "git" :url "-framework/macchiato-template.git"} :eval-in-leiningen true)
null
https://raw.githubusercontent.com/macchiato-framework/macchiato-template/f740cddf6340acbf32a909ff22ea268cc087fbca/project.clj
clojure
(defproject macchiato/lein-template "0.2.67" :description "A Leiningen template for creating Node.js based ClojureScript apps." :url "-framework/macchiato-template" :license {:name "MIT License" :url ""} :scm {:name "git" :url "-framework/macchiato-template.git"} :eval-in-leiningen true)
966d67df2a88b8280971453ec7050355bdd8788b1a531fd677889f2c0a167e91
emillon/ocaml-noise
hkdf.ml
let extract ~hmac ~salt ~ikm = hmac ~key:salt ikm let b01 = Cstruct.of_hex "01" let b02 = Cstruct.of_hex "02" let b03 = Cstruct.of_hex "03" let hkdf2_k ~hmac ~temp_key = let output1 = hmac ~key:temp_key b01 in let output2 = hmac ~key:temp_key (Cstruct.concat [output1; b02]) in (output1, output2) let hkdf2 ~h...
null
https://raw.githubusercontent.com/emillon/ocaml-noise/d5a3e0f634fba1f8d948a91c70a1dad6470722b0/lib/hkdf.ml
ocaml
let extract ~hmac ~salt ~ikm = hmac ~key:salt ikm let b01 = Cstruct.of_hex "01" let b02 = Cstruct.of_hex "02" let b03 = Cstruct.of_hex "03" let hkdf2_k ~hmac ~temp_key = let output1 = hmac ~key:temp_key b01 in let output2 = hmac ~key:temp_key (Cstruct.concat [output1; b02]) in (output1, output2) let hkdf2 ~h...
5f8f22115f5f811396a08ab766883cda28ec0a5b670599892f696f11b88b174f
bhk/scam
math2.scm
;;---------------------------------------------------------------- : Transcendental functions ;;---------------------------------------------------------------- (require "core.scm") (require "math0.scm" &private) (require "math1.scm" &private) ;;---------------------------------------------------------------- U...
null
https://raw.githubusercontent.com/bhk/scam/59d7c02e673f1faebd0b7625d8c595daaa5efc51/math2.scm
scheme
---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- Remove the initial (words B) words from A NIL if there a...
: Transcendental functions (require "core.scm") (require "math0.scm" &private) (require "math1.scm" &private) Utilities ( to reconcile with mcore.scm & math.scm ) (define `(wsub a b) (nth-rest (words (>>1 b)) a)) Return a list with UX words , all " 0 " . UX may have digits larger than 9 . (define (u-z...
e66acd531eaa1b4bd471ef3f0631be5dc4907ac11d7286751e65afd6a41529d4
NorfairKing/dekking
TypeApplications.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # module TypeApplications where import Data.String main :: IO () main = do print (noArguments @String) print (oneArgument @String "hi") print (twoArguments @String "hi" "ho") noArguments :: IsString a => a noArguments = "no arguments" oneArgument...
null
https://raw.githubusercontent.com/NorfairKing/dekking/51e94aafb13df214f5cbf3572a245036405142a7/e2e-test/syntax/src/TypeApplications.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeApplications # module TypeApplications where import Data.String main :: IO () main = do print (noArguments @String) print (oneArgument @String "hi") print (twoArguments @String "hi" "ho") noArguments :: IsString a => a noArguments = "no arguments" oneArgument :: (IsString a, Semigroup a) => a ...
a08558872594bcb8a0522497cf1a391ce50abf99c7e2a3af328e404da704e89f
silent-entertainment/claxiom
package.lisp
package.lisp (defpackage #:claxiom (:use #:cl #:house #:parenscript #:cl-who #:fact-base) (:import-from #:cl-css #:inline-css) (:shadowing-import-from #:cl-css #:%) (:import-from #:anaphora #:aif #:awhen #:it) (:import-from #:alexandria #:with-gensyms) (:shadowing-import-from #+openmcl-native-threads #...
null
https://raw.githubusercontent.com/silent-entertainment/claxiom/44c6122ec46859fd881772bfc24ca3a141fb153a/src/package.lisp
lisp
package.lisp (defpackage #:claxiom (:use #:cl #:house #:parenscript #:cl-who #:fact-base) (:import-from #:cl-css #:inline-css) (:shadowing-import-from #:cl-css #:%) (:import-from #:anaphora #:aif #:awhen #:it) (:import-from #:alexandria #:with-gensyms) (:shadowing-import-from #+openmcl-native-threads #...
8ea2598bac65704b994a0624e588223c19c74179989efe5990557272055e41e1
adamschoenemann/clofrp
EvalSpec.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE OverloadedLists # # LANGUAGE QuasiQuotes # # LANGUAGE TypeApplications # # LANGUAGE TupleSections # {-# LANGUAGE RankNTypes #-} # LANGUAGE NamedFieldPuns # module CloFRP.EvalSpec where import Test.Tasty.Hspec import Data.Either (isLeft) import Data.String (fromString) imp...
null
https://raw.githubusercontent.com/adamschoenemann/clofrp/c26f86aec2cdb8fa7fd317acd13f7d77af984bd3/test-suite/CloFRP/EvalSpec.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # let m = env [s,z,just,nothing] let p = unann [unsafeExpr let map = \f x -> case x of | Nothing -> Nothing | Just x' -> Just (f x') in |] -- fix body => body (\\af -> fix body) fix body => body (\\af -> body) => ...
# LANGUAGE OverloadedLists # # LANGUAGE QuasiQuotes # # LANGUAGE TypeApplications # # LANGUAGE TupleSections # # LANGUAGE NamedFieldPuns # module CloFRP.EvalSpec where import Test.Tasty.Hspec import Data.Either (isLeft) import Data.String (fromString) import NeatInterpolation import Debug.Trace import qualified CloF...
cbe78980b4fc27dd373913559103025a5210d3277a5705772c6733d7b50dc270
ml4tp/tcoq
glob_ops.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/pretyping/glob_ops.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Equalities * Operations on [glob_...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Glob_term v...
afcc585f0062b037c4717dcacbb32a4b3486fbbca91649830472627575fe8a05
bobzhang/ocaml-book
pa_ctyp.ml
open Camlp4.PreCast; module Caml = Camlp4OCamlParser.Make (Camlp4OCamlRevisedParser.Make (Camlp4.OCamlInitSyntax.Make Ast Gram Quotation )); module Printers = Camlp4.Printers.OCaml.Make Caml; * File PreCast.ml module . ; module Ast = Struct . Camlp4Ast . Make ; module Token = Stru...
null
https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/camlp4/pa_ctyp.ml
ocaml
module OCamlrr = Printers.OCamlrr.Make Syntax;
open Camlp4.PreCast; module Caml = Camlp4OCamlParser.Make (Camlp4OCamlRevisedParser.Make (Camlp4.OCamlInitSyntax.Make Ast Gram Quotation )); module Printers = Camlp4.Printers.OCaml.Make Caml; * File PreCast.ml module . ; module Ast = Struct . Camlp4Ast . Make ; module Token = Stru...
9b9065d5ff87bfdcce1c4771eb22f47bae62be354d3a8ef5790772d8f31daee1
TristeFigure/shuriken
let.clj
(ns shuriken.let) (defmacro earlet [bindings & body] `(let ~(mapv macroexpand bindings) ~@body)) (defmacro lay [[sym expr & more-bindings] & body] (let [delay-sym (gensym (str "laid-" sym "-"))] `(let [~delay-sym (delay ~expr)] (symbol-macrolet [~sym (deref ~delay-sym)] ~@(if (empty? more...
null
https://raw.githubusercontent.com/TristeFigure/shuriken/cd36dd2a4005c85260125d89d5a3f475d248e6e4/src/shuriken/let.clj
clojure
See: - Handling :& in destructuring maps: - Clojure lazy let based on delays:
(ns shuriken.let) (defmacro earlet [bindings & body] `(let ~(mapv macroexpand bindings) ~@body)) (defmacro lay [[sym expr & more-bindings] & body] (let [delay-sym (gensym (str "laid-" sym "-"))] `(let [~delay-sym (delay ~expr)] (symbol-macrolet [~sym (deref ~delay-sym)] ~@(if (empty? more...
88c175b7bf8211f885152e06f55b573bb2d6e3417a9a888d024517dfd60b283b
nmattia/niv
Cli.hs
# LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # module Niv.Cli where import Control.Applicative import Control.Monad import Control.Monad.Reader import Data....
null
https://raw.githubusercontent.com/nmattia/niv/2998a663d03ef9521585f67cf8fdfa8dac348462/src/Niv/Cli.hs
haskell
# LANGUAGE OverloadedStrings # I died a little ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- | Whether or not to fetch nixpkgs Pull latest known nixpkgs owner, repo Writes all the default files a path, a ...
# LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE QuasiQuotes # # LANGUAGE TupleSections # # LANGUAGE ViewPatterns # module Niv.Cli where import Control.Applicative import Control.Monad import Control.Monad.Reader import Data.Aeson ((.=)) import qualified Data....
f25b8786a6a7fc926400baef52e1e9c06c170e6c48126d749ab1f1ac29a0b26f
simplex-chat/simplex-chat
M20220302_profile_images.hs
# LANGUAGE QuasiQuotes # module Simplex.Chat.Migrations.M20220302_profile_images where import Database.SQLite.Simple (Query) import Database.SQLite.Simple.QQ (sql) m20220302_profile_images :: Query m20220302_profile_images = [sql| ALTER TABLE contact_profiles ADD COLUMN image TEXT; ALTER TABLE group_profil...
null
https://raw.githubusercontent.com/simplex-chat/simplex-chat/4b39de6c4fdec8d7795b2e7eb457b5661e77aa9b/src/Simplex/Chat/Migrations/M20220302_profile_images.hs
haskell
# LANGUAGE QuasiQuotes # module Simplex.Chat.Migrations.M20220302_profile_images where import Database.SQLite.Simple (Query) import Database.SQLite.Simple.QQ (sql) m20220302_profile_images :: Query m20220302_profile_images = [sql| ALTER TABLE contact_profiles ADD COLUMN image TEXT; ALTER TABLE group_profil...
e42fcf3a67f20b743d2456730bd5b55e186248dc8af6ddc056402724ff760ff7
RolfRolles/PandemicML
BVPrettyPrint.ml
let shallow_string_of_bvexpr_op e = let open BV in match e with | Constant(c,i) -> Printf.sprintf "BVConstant(0x%Lx,%d)" c i | Variable(bv) -> Printf.sprintf "%s[%d]" (BitVector.name_of_bv bv) (BitVector.size_of_bv bv) | Extract(e,_,_) -> "BVExtract" | Repeat(_,_) -> "BVRepeat" | Concat(_,_) -> "BVConcat" | Z...
null
https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/SMT/Propositional%20Logic/BVPrettyPrint.ml
ocaml
let shallow_string_of_bvexpr_op e = let open BV in match e with | Constant(c,i) -> Printf.sprintf "BVConstant(0x%Lx,%d)" c i | Variable(bv) -> Printf.sprintf "%s[%d]" (BitVector.name_of_bv bv) (BitVector.size_of_bv bv) | Extract(e,_,_) -> "BVExtract" | Repeat(_,_) -> "BVRepeat" | Concat(_,_) -> "BVConcat" | Z...
90cabd52d01400c0ff4b80b6d8d087c70e63d80b6b30f94679d04b684201e230
postgres-haskell/postgres-wire
Bench.hs
# language BangPatterns # # language LambdaCase # module Main where import Data.ByteString.Lazy (toStrict) import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString as B import Data.ByteString.Builder (toLazyByteString) import Data.Vector as V(fromList, empty) import Data.IORef import Data.Int impor...
null
https://raw.githubusercontent.com/postgres-haskell/postgres-wire/fda5e3b70c3cc0bab8365b4b872991d50da0348c/bench/Bench.hs
haskell
CREATE TABLE _bytes_100_of_1k(b bytea); CREATE TABLE _bytes_10_of_20k(b bytea); INSERT INTO _bytes_100_of_1k(b) INSERT INTO _bytes_400_of_200(b) INSERT INTO _bytes_10_of_20k(b) INSERT INTO _bytes_300_of_100(b) File contains a PostgreSQL binary response on the query:
# language BangPatterns # # language LambdaCase # module Main where import Data.ByteString.Lazy (toStrict) import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString as B import Data.ByteString.Builder (toLazyByteString) import Data.Vector as V(fromList, empty) import Data.IORef import Data.Int impor...
9dfefb0133443e790aa0bbfb41e2fa561142324b1452a2c28e5e8487dc712bd2
input-output-hk/plutus
Substitutions.hs
-- editorconfig-checker-disable-file module PlutusCore.Generators.QuickCheck.Substitutions where import PlutusCore.Generators.QuickCheck.Common import PlutusCore.Generators.QuickCheck.GenerateTypes import PlutusCore.Generators.QuickCheck.ShrinkTypes import PlutusCore.Generators.QuickCheck.Utils import PlutusCore.Def...
null
https://raw.githubusercontent.com/input-output-hk/plutus/78402fb44148ce97a0a30efe406ba431fc49006c/plutus-core/testlib/PlutusCore/Generators/QuickCheck/Substitutions.hs
haskell
editorconfig-checker-disable-file Note [Substitution in generators] Generators define their own substitution algorithm. It's generally useful, however it's quite inefficient, since calling 'renameVar' in the worker when handling bindings makes the whole algorithm at least quadratic. Plus, it also very general, since ...
module PlutusCore.Generators.QuickCheck.Substitutions where import PlutusCore.Generators.QuickCheck.Common import PlutusCore.Generators.QuickCheck.GenerateTypes import PlutusCore.Generators.QuickCheck.ShrinkTypes import PlutusCore.Generators.QuickCheck.Utils import PlutusCore.Default import PlutusCore.Name import Pl...
952545064c1983d116ad39cd31e6cb70570934fb4de66a93d59e9075c4d41d24
aantron/luv
handle.ml
This file is part of Luv , released under the MIT license . See LICENSE.md for details , or visit . details, or visit . *) include Helpers.Retained (struct include C.Types.Handle type 'kind base = 'kind handle include C.Functions.Handle end) let is_closing handle = C.Functions.Handle.is...
null
https://raw.githubusercontent.com/aantron/luv/4b49d3edad2179c76d685500edf1b44f61ec4be8/src/handle.ml
ocaml
This file is part of Luv , released under the MIT license . See LICENSE.md for details , or visit . details, or visit . *) include Helpers.Retained (struct include C.Types.Handle type 'kind base = 'kind handle include C.Functions.Handle end) let is_closing handle = C.Functions.Handle.is...
beb3190f9a61f3bb0487123c49a33c1a5cde9e247b36349b41c526abf5518100
darkleaf/publicator
fakes.clj
(ns publicator.use-cases.test.fakes (:require [publicator.domain.test.fakes :as domain.fakes] [publicator.use-cases.test.fakes.session :as session] [publicator.use-cases.test.fakes.storage :as storage] [publicator.use-cases.test.fakes.user-queries :as user-q] [publicator.use-cases.test.fakes.post-queri...
null
https://raw.githubusercontent.com/darkleaf/publicator/e07eee93d8f3d9c07a15d574619d5ea59c00f87d/core/src/publicator/use_cases/test/fakes.clj
clojure
(ns publicator.use-cases.test.fakes (:require [publicator.domain.test.fakes :as domain.fakes] [publicator.use-cases.test.fakes.session :as session] [publicator.use-cases.test.fakes.storage :as storage] [publicator.use-cases.test.fakes.user-queries :as user-q] [publicator.use-cases.test.fakes.post-queri...
898fe36a255e1e20ff44ddc81422a27f46a907cdde735e662f6efc7d7abdf834
atlas-engineer/nyxt
remembrance.lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :nyxt/tests) (define-test toggle-remembrance-mode () (let ((buffer (make-instance 'modable-buffer))) (with-current-buffer buffer (assert-true (enable-modes* 'nyxt/remembrance-mode:remembrance-mode bu...
null
https://raw.githubusercontent.com/atlas-engineer/nyxt/65a9aa568b16c109281fa403a7c045b3b6d87025/tests/offline/mode/remembrance.lisp
lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :nyxt/tests) (define-test toggle-remembrance-mode () (let ((buffer (make-instance 'modable-buffer))) (with-current-buffer buffer (assert-true (enable-modes* 'nyxt/remembrance-mode:remembrance-mode bu...
c1534bcb10069eca3a55288c974793bec655f8909849f971ae1ecf86f8f884cf
hopv/MoCHi
boolTerm.ml
open Combinator open Util (** Boolean term expressions *) let mk_true = Term.mk_const Const.True let mk_false = Term.mk_const Const.False let make b = if b then mk_true else mk_false
null
https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/fpat/boolTerm.ml
ocaml
* Boolean term expressions
open Combinator open Util let mk_true = Term.mk_const Const.True let mk_false = Term.mk_const Const.False let make b = if b then mk_true else mk_false
caace3ffb9f988558f9f65f1475eec7674bf9229eaef65c8e4e0cac9f337a523
jakemcc/sicp-study
ex3_35.clj
(ns ex3-35 (:use constraint-system clojure.contrib.math)) ; Going to implement the squarer using similar ways I implemented the ; other constraints (defn square [x] (* x x)) (deftype Squarer [a b] Constraint (process-new-value [this] (if (has-value? b) (if (< (get-value b) 0) (Error. (str ...
null
https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section3.3/src/ex3_35.clj
clojure
Going to implement the squarer using similar ways I implemented the other constraints
(ns ex3-35 (:use constraint-system clojure.contrib.math)) (defn square [x] (* x x)) (deftype Squarer [a b] Constraint (process-new-value [this] (if (has-value? b) (if (< (get-value b) 0) (Error. (str "square less than 0 -- SQUARER " (get-value b))) (set-value! a (sqrt (get-val...
45d4793d2f3686f66900bc107c2d27d8dcd44e4e11e0424e950e704e87c11871
racket/racket7
parse.rkt
#lang racket/base (require racket/cmdline racket/pretty racket/list racket/match parser-tools/lex (prefix-in : parser-tools/lex-sre) parser-tools/yacc) Parse " rktio.h " to produce a seqeuence ;; (define-constant <id> <const>) ... ;; <type-def> ... ;; <func-de...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/rktio/parse.rkt
racket
(define-constant <id> <const>) ... <type-def> ... <func-def> ... where <type-def> = (define-type <id> <id>) | (define-struct-type <id> ([<type> <name>] ...)) <func-def> = (define-function <type> <id> ([<type> <arg-name>] ...)) => never fails | (define-function/err...
#lang racket/base (require racket/cmdline racket/pretty racket/list racket/match parser-tools/lex (prefix-in : parser-tools/lex-sre) parser-tools/yacc) Parse " rktio.h " to produce a seqeuence (define output-file #f) (define c-mode? #f) (define .def-mode? #f) (...
55edadf72690e98dc6e87c947af3dfd58d826683df70174582f565056d78e06e
wdhowe/clojure-snippets
atoms.clj
; atoms - allow for associating a value with an identity and then ; changing the identity to refer to a new value. ; swap! compares current value with the new value ; this ensures no swaps are lost in a concurrent situation (def myatomvar (atom 1)) (println "My atom var is:" @myatomvar) (swap! myatomvar inc) (...
null
https://raw.githubusercontent.com/wdhowe/clojure-snippets/0c3247ce99a563312b549d03f080b8cf449b541d/state/atoms.clj
clojure
atoms - allow for associating a value with an identity and then changing the identity to refer to a new value. swap! compares current value with the new value this ensures no swaps are lost in a concurrent situation reset! is used when you don't care about the current value and just want the value changed...
(def myatomvar (atom 1)) (println "My atom var is:" @myatomvar) (swap! myatomvar inc) (println "After swap! inc, my atom var is now:" @myatomvar) (reset! myatomvar 0) (println "After reset!, myatomvar is now:" @myatomvar)
a83f37f58f90f8b941e9395a7a44fdcd3688cd5deb163b2b0f4a141afdd635e0
ekmett/profunctors
Types.hs
# LANGUAGE CPP # # LANGUAGE DeriveGeneric # # LANGUAGE PolyKinds # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE Trustworthy # -- | Copyright : ( C ) 2011 - 2015 , -- License : BSD-style (see the file LICENSE) Maintainer : < > -- Stability : provisional -- Portabilit...
null
https://raw.githubusercontent.com/ekmett/profunctors/5031ed76a0037743024bb119abbc59af91e475ff/src/Data/Profunctor/Types.hs
haskell
# LANGUAGE RankNTypes # | License : BSD-style (see the file LICENSE) Stability : provisional Portability : portable <-in-haskell.html> <-strength-from-laziness/> ---------------------------------------------------------------------------- --------------------------------------------------------------...
# LANGUAGE CPP # # LANGUAGE DeriveGeneric # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE Trustworthy # Copyright : ( C ) 2011 - 2015 , Maintainer : < > For a good explanation of profunctors in Haskell see article : For more information on strength and , see : module Dat...
a057bc1a7e904e57212952c5d5c64bf6f04546d7394e4a8581f9b66bdea04468
ahefner/asm6502
assembler.lisp
(in-package :asm6502) ;;;; Delayed evaluation (defvar *lazy-marker* '#:postponed) (defstruct promise name fun (value *lazy-marker*)) (define-condition resolvable-condition () ((path :initform nil :initarg :path :accessor path)) (:report (lambda (condition stream) (format stream "~A" (path condition)...
null
https://raw.githubusercontent.com/ahefner/asm6502/11807096abc0c08f7c2f2915af57fce961c73606/assembler.lisp
lisp
Delayed evaluation Bits and bytes Files Basic implementation of assembly context Note that context-code-vector isn't part of the context protocol, but defined on basic-contexts. Local context, the base upon which to build local symbol scopes and special-purpose contexts. User interface: Definition of Address...
(in-package :asm6502) (defvar *lazy-marker* '#:postponed) (defstruct promise name fun (value *lazy-marker*)) (define-condition resolvable-condition () ((path :initform nil :initarg :path :accessor path)) (:report (lambda (condition stream) (format stream "~A" (path condition))))) (defgeneric force ...
c9b0fb7060f2a7be78de7d0e3ca56e33f3e75d38745edae33329e657bedca2f8
jackfirth/rebellion
sorted-map-builder.rkt
#lang racket/base (require racket/contract/base) (provide (contract-out [sorted-map-builder? predicate/c] [sorted-map-builder-put (-> sorted-map-builder? any/c any/c sorted-map-builder?)] [sorted-map-builder-put-all (-> sorted-map-builder? (sequence/c entry?) sorted-map-builder?)] [make-sorted-map-builder ...
null
https://raw.githubusercontent.com/jackfirth/rebellion/206ced365b07d1c6da5dcbe93f892fbb9bd7ba72/collection/private/sorted-map-builder.rkt
racket
@----------------------------------------------------------------------------------------------------
#lang racket/base (require racket/contract/base) (provide (contract-out [sorted-map-builder? predicate/c] [sorted-map-builder-put (-> sorted-map-builder? any/c any/c sorted-map-builder?)] [sorted-map-builder-put-all (-> sorted-map-builder? (sequence/c entry?) sorted-map-builder?)] [make-sorted-map-builder ...
f3cfdd1d4048e1824ad77a3e2fdc2541f7800c029633b72deff05e80a09d14ba
NethermindEth/horus-checker
FunctionAnalysis.hs
module Horus.FunctionAnalysis ( pcToFunOfProg , callersOf , programLabels , inlinableFuns , FInfo , FuncOp (ArcCall, ArcRet) , ScopedFunction (..) , isCallArc , isRetArc , isWrapper , isNormalArc , uninlinableFuns , sizeOfCall , mkGeneratedNames , storageVarsOfCD , isAuxFunc , scopedFO...
null
https://raw.githubusercontent.com/NethermindEth/horus-checker/b4ce60c7739a0d12dab6c9b2ff87719b321f6200/src/Horus/FunctionAnalysis.hs
haskell
The last accessible scope of the given label is the function said label belongs to. Checks if there exists an annotation associated with the given identifier (last parameter).
module Horus.FunctionAnalysis ( pcToFunOfProg , callersOf , programLabels , inlinableFuns , FInfo , FuncOp (ArcCall, ArcRet) , ScopedFunction (..) , isCallArc , isRetArc , isWrapper , isNormalArc , uninlinableFuns , sizeOfCall , mkGeneratedNames , storageVarsOfCD , isAuxFunc , scopedFO...
2209548efaa50f22543bcfdc1aac66e5760b97d0b120c49621882ae788c604c7
S8A/htdp-exercises
ex287.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex287) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex287.rkt
racket
about the language level of this file in a form that our tools can easily process. Data definitions :. An Inventory Record (IR) is a structure: (make-ir String String Number Number) Data examples :. Functions :. [List-of IR] Number -> [List-of IR] String [List-of IR] -> [List-of IR] Produces a list of invent...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex287) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define-struct ir [name description acquisition-price ...
7a03da524676c8068798475ce3f21e7f3b28d15de2cfad5b2a0cdb9c7052b4bb
mikera/core.matrix
implementations.clj
(ns clojure.core.matrix.docgen.implementations (:require [clojure.string :as s] [hiccup.page :as h] [clojure.core.matrix.utils :as u] [clojure.core.matrix.protocols :as mp] [clojure.core.matrix.impl.common :as c])) # # Info ;; This file provides rather hacky solution...
null
https://raw.githubusercontent.com/mikera/core.matrix/0a35f6e3d6d2335cb56f6f3e5744bfa1dd0390aa/src/dev/clojure/clojure/core/matrix/docgen/implementations.clj
clojure
This file provides rather hacky solution for generating html documentation about various matrix implementations available in core.matrix
(ns clojure.core.matrix.docgen.implementations (:require [clojure.string :as s] [hiccup.page :as h] [clojure.core.matrix.utils :as u] [clojure.core.matrix.protocols :as mp] [clojure.core.matrix.impl.common :as c])) # # Info (def repo-url "") (def src-path "src/main/...
d165ebdf24a4a7eb5a7407f656d496315860ce559d74388441385e52dbaed992
conjure-cp/conjure
Tuple.hs
# LANGUAGE QuasiQuotes # module Conjure.Rules.Vertical.Tuple where import Conjure.Rules.Import rule_Tuple_Eq :: Rule rule_Tuple_Eq = "tuple-eq" `namedRule` theRule where theRule p = do (x,y) <- match opEq p TypeTuple{} <- typeOf x -- TODO: check if x and y have the same arity ...
null
https://raw.githubusercontent.com/conjure-cp/conjure/dd5a27df138af2ccbbb970274c2b8f22ac6b26a0/src/Conjure/Rules/Vertical/Tuple.hs
haskell
TODO: check if x and y have the same arity TODO: check if x and y have the same arity TODO: check if x and y have the same arity TODO: check if x and y have the same arity TODO: check if x and y have the same arity TODO: check if x and y have the same arity
# LANGUAGE QuasiQuotes # module Conjure.Rules.Vertical.Tuple where import Conjure.Rules.Import rule_Tuple_Eq :: Rule rule_Tuple_Eq = "tuple-eq" `namedRule` theRule where theRule p = do (x,y) <- match opEq p TypeTuple{} <- typeOf y xs <- downX1 x ys <- down...
6296e053f1da2ce7fea0bbca51b243a6df6421b4544e087213f19c5489717bcc
matthiasn/systems-toolbox-sente
server_cmp_test.clj
(ns matthiasn.systems-toolbox-sente.server-cmp-test (:require [clojure.test :refer :all] [matthiasn.systems-toolbox-sente.server :as sente] [clojure.tools.logging :as log])) (deftest cmp-map-test (testing "Warnings logged when called in deprecated way." (let [log-msgs (atom [])] (...
null
https://raw.githubusercontent.com/matthiasn/systems-toolbox-sente/edd0a8295f372063e507810c3fa92b23c0524f67/test/clj/matthiasn/systems_toolbox_sente/server_cmp_test.clj
clojure
(ns matthiasn.systems-toolbox-sente.server-cmp-test (:require [clojure.test :refer :all] [matthiasn.systems-toolbox-sente.server :as sente] [clojure.tools.logging :as log])) (deftest cmp-map-test (testing "Warnings logged when called in deprecated way." (let [log-msgs (atom [])] (...
8dfa2929fea1a7fed44801d2fea772c8219b38a8668cece47dd2daceac6b3ac5
upgradingdave/cljs
core.cljs
(ns up.ical.core (:require [reagent.core :as r] [goog.date :as dt] [up.csv :as csv] [cljsjs.ical])) (defn format-datetime [datetime] (str (inc (.getMonth datetime)) "/" (.getDate datetime) "/" (.getFullYear datetime) " " (.getHours datetime) ":"...
null
https://raw.githubusercontent.com/upgradingdave/cljs/1026b6db905214586fb7e04800df078da19b37cc/src/cljs/up/ical/core.cljs
clojure
TODO: this gets data generically but different rows can have different number of keys (for [[k {:keys [type value]}] (seq e)] (if (= type "date-time") (format-datetime (dt/fromIsoString value)) value)) file api isn't supported, so show an error message file app supported, try showing the widget...
(ns up.ical.core (:require [reagent.core :as r] [goog.date :as dt] [up.csv :as csv] [cljsjs.ical])) (defn format-datetime [datetime] (str (inc (.getMonth datetime)) "/" (.getDate datetime) "/" (.getFullYear datetime) " " (.getHours datetime) ":"...
5b3c98f66ef17efee8781646ea3c49130310f51b7869a17b32418e9059cc44e6
mtnygard/ssh-repl
server.clj
(ns ssh-repl.server (:require [clojure.java.io :as io] [ssh-repl.pubkey :as pubkey]) (:import [org.apache.sshd SshServer] [org.apache.sshd.server Command PasswordAuthenticator PublickeyAuthenticator] [org.apache.sshd.common Factory] [org.apache.sshd.server.keyprovider Si...
null
https://raw.githubusercontent.com/mtnygard/ssh-repl/c5c8ed825a9c5beb8ab11cfe72cebff4dbd09913/src/ssh_repl/server.clj
clojure
(ns ssh-repl.server (:require [clojure.java.io :as io] [ssh-repl.pubkey :as pubkey]) (:import [org.apache.sshd SshServer] [org.apache.sshd.server Command PasswordAuthenticator PublickeyAuthenticator] [org.apache.sshd.common Factory] [org.apache.sshd.server.keyprovider Si...
fdef9c91c18e6811b6f56245d5089f52722029199d209b9faf995eea690270b2
Bogdanp/try-racket
info.rkt
#lang info (define collection "tests") (define deps '()) (define build-deps '("base" "db-lib" "koyo-lib" "rackunit-lib" "try-racket")) (define update-implies '("try-racket"))
null
https://raw.githubusercontent.com/Bogdanp/try-racket/0b82259d60edb08a5158d60500e0104cf9dbaad6/try-racket-tests/info.rkt
racket
#lang info (define collection "tests") (define deps '()) (define build-deps '("base" "db-lib" "koyo-lib" "rackunit-lib" "try-racket")) (define update-implies '("try-racket"))
df3f8fe20c60799be7326b1b44c1d4a00f28a51e3d53a54749b469a561842ed2
kupl/MicSE
mich.ml
Mich : Frontend Target Datatype . MicSE 's representation is defined in Tz module is defined in Tz module *) open Core (*****************************************************************************) (*****************************************************************************) (* Location in Code ...
null
https://raw.githubusercontent.com/kupl/MicSE/23678f01f993baac6c45ca2aab029e7356edfa2f/lib/mich.ml
ocaml
*************************************************************************** *************************************************************************** Location in Code *************************************************************************** ****************...
Mich : Frontend Target Datatype . MicSE 's representation is defined in Tz module is defined in Tz module *) open Core type pos = { col : int; lin : int; } [@@deriving compare, equal] type loc = | Unknown | Pos of pos * pos [@@deriving compare, equal] type annot = [@@deriving compare, equa...
615a2fe6c2370f2f10d2a54e68ada5d3dd01d5541217703b4fd4bd9eb4510f84
monadicsystems/okapi
Query.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Conduit.Database.Query where import Conduit.Auth import Conduit.Type import Control.Monad (forM) import Control.Monad.IO.Class (Mon...
null
https://raw.githubusercontent.com/monadicsystems/okapi/2ff768fac047770137c6fd09258218fd132efd0e/examples/realworld-json/Conduit/Database/Query.hs
haskell
# LANGUAGE ConstraintKinds # DB Functions
# LANGUAGE FlexibleContexts # # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Conduit.Database.Query where import Conduit.Auth import Conduit.Type import Control.Monad (forM) import Control.Monad.IO.Class (MonadIO, liftIO) import Control.Mona...
1316554771f0056d8c8aba31908878b112e065b975b8b667248fef4e97650fab
antalsz/choose-your-own-derivative
Pretty.hs
# LANGUAGE KindSignatures , TypeOperators , PolyKinds , DataKinds , TypeFamilies , ScopedTypeVariables , AllowAmbiguousTypes , TypeApplications , BangPatterns # TypeFamilies, ScopedTypeVariables, AllowAmbiguousTypes, TypeApplications, B...
null
https://raw.githubusercontent.com/antalsz/choose-your-own-derivative/29897118314da416023977b317971ba4f840a5eb/src/Pretty.hs
haskell
------------------------------------------------------------------------------ Pretty-printing ------------------------------------------------------------- ------------------------------------------------------------------------------ -------------------------------------- I can't seem to pattern match on the type h...
# LANGUAGE KindSignatures , TypeOperators , PolyKinds , DataKinds , TypeFamilies , ScopedTypeVariables , AllowAmbiguousTypes , TypeApplications , BangPatterns # TypeFamilies, ScopedTypeVariables, AllowAmbiguousTypes, TypeApplications, B...
a66467b05ccd1d83cfd17b656c9bb30350cbde374bd429888a4ebcec6dd2f2a1
docker-in-aws/docker-in-aws
http.clj
(ns swarmpit.http (:require [cheshire.core :refer [parse-string parse-stream generate-string]] [clj-http.client :as http]) (:import (java.util.concurrent TimeoutException ExecutionException) (java.io IOException) (clojure.lang ExceptionInfo))) (def default-timeout 15000) (def ^:p...
null
https://raw.githubusercontent.com/docker-in-aws/docker-in-aws/bfc7e82ac82ea158bfb03445da6aec167b1a14a3/ch16/swarmpit/src/clj/swarmpit/http.clj
clojure
(ns swarmpit.http (:require [cheshire.core :refer [parse-string parse-stream generate-string]] [clj-http.client :as http]) (:import (java.util.concurrent TimeoutException ExecutionException) (java.io IOException) (clojure.lang ExceptionInfo))) (def default-timeout 15000) (def ^:p...
28f5dfe6724ed36c72f26b10bf984a1e61d042aabe3bb977adf15d08494a7793
ucsd-progsys/liquidhaskell
Inc01.hs
{-@ LIQUID "--expect-any-error" @-} -- | Test module Inc01 where @ inc : : { v : . Int | v > = 0 } - > { v : . Int | v > = 0 } @ inc :: Int -> Int inc x = plus x one @ one : : { v : . Int | v > = 0 } @ one :: Int one = undefined @ plus : : x : . Int - > y : . Int - > { v : . Int| v = x - y } @ plus :: Int ...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/basic/neg/Inc01.hs
haskell
@ LIQUID "--expect-any-error" @ | Test
module Inc01 where @ inc : : { v : . Int | v > = 0 } - > { v : . Int | v > = 0 } @ inc :: Int -> Int inc x = plus x one @ one : : { v : . Int | v > = 0 } @ one :: Int one = undefined @ plus : : x : . Int - > y : . Int - > { v : . Int| v = x - y } @ plus :: Int -> Int -> Int plus = undefined
8381130fdca5376b218c9e60f895772c9a6e7e09dd26f0a3aa7e9ef3f034f830
zxymike93/SICP
237.rkt
#lang sicp (define (accumulate op init seq) (if (null? seq) init (op (car seq) (accumulate op init (cdr seq))))) (define (accumulate-n op init seqs) (if (null? (car seqs)) nil (cons (accumulate op init (map car seqs)) (accumulate-n op init (map cdr seqs))))) ;; vecto...
null
https://raw.githubusercontent.com/zxymike93/SICP/9d8e84d6a185bf4d7f28c414fc3359741384beb5/chapter2/237.rkt
racket
vector matrix tests
#lang sicp (define (accumulate op init seq) (if (null? seq) init (op (car seq) (accumulate op init (cdr seq))))) (define (accumulate-n op init seqs) (if (null? (car seqs)) nil (cons (accumulate op init (map car seqs)) (accumulate-n op init (map cdr seqs))))) (define ...
233ddbb285bf75b63f57322f691c5cb412188040734756359ebbde2669ed88ed
amcphail/lambda
Lambda.hs
----------------------------------------------------------------------------- -- | -- Module : Lambda Copyright : ( c ) 2000 , 2015 -- License : BSD3 -- -- Maintainer : haskell.vivian.mcphail <at> gmail <dot> com -- Stability : provisional -- Portability : portable -- -- Lambda evaluator -- ...
null
https://raw.githubusercontent.com/amcphail/lambda/9da05e733ac362ba83dfb288e5512762b57ccb43/Lambda.hs
haskell
--------------------------------------------------------------------------- | Module : Lambda License : BSD3 Maintainer : haskell.vivian.mcphail <at> gmail <dot> com Stability : provisional Portability : portable Lambda evaluator ---------------------------------------------------------------...
Copyright : ( c ) 2000 , 2015 module Main ( main, Term(Var,Lam,App), ( i.e. String - > Term ) ) where import Data.Char import qualified Data.List as L import qualified Data.Map as M import Parsers import Combinators import System.IO type Name = String data Term = Var N...
dbedaf20ee46ab3640b2389ec60304261943a8e4b34d4b2759effb08986a0f18
arttuka/reagent-material-ui
no_crash_two_tone.cljs
(ns reagent-mui.icons.no-crash-two-tone "Imports @mui/icons-material/NoCrashTwoTone as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def no-crash-two-tone (creat...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/c7cd0d7c661ab9df5b0aed0213a6653a9a3f28ea/src/icons/reagent_mui/icons/no_crash_two_tone.cljs
clojure
(ns reagent-mui.icons.no-crash-two-tone "Imports @mui/icons-material/NoCrashTwoTone as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def no-crash-two-tone (creat...
d7b7be60186cb98103b687f9968b09220533830cb63133ce68934c8096684f4b
spurious/sagittarius-scheme-mirror
stub.scm
-*- mode : scheme ; coding : utf-8 ; -*- #!read-macro=sagittarius/regex (library (sagittarius cgen stub) (export cgen-genstub <cgen-stub-unit> ;; for custom generation cgen-stub-parse-form define-form-parser (rename (<c-proc> <cgen-c-proc>)) TODO remove me <c-proc>) (import (rn...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/sagittarius/cgen/stub.scm
scheme
coding : utf-8 ; -*- for custom generation for print (cgen-include "<sagittarius.h>") utilities form parsers generics assume it's the end re-init prologue <arg> assume pair is expression literal (define-class <special-literal> () ()) (define-cgen-literal <raw-c-literal> <special-literal> () (static (self) #t...
#!read-macro=sagittarius/regex (library (sagittarius cgen stub) (export cgen-genstub <cgen-stub-unit> cgen-stub-parse-form define-form-parser (rename (<c-proc> <cgen-c-proc>)) TODO remove me <c-proc>) (import (rnrs) (rnrs eval) (sagittarius cgen cise) (sagittarius cgen ...
7eb6e766cf49df45a2ef8950dc985ebdab82d5838ee964a7e4a502171dcbc6e9
alvatar/spheres
real.scm
;;; this is a distribution that correspond to expected intervals ;;; between events with a poisson distribution ;;; l is lambda that is the mean of the distribution ;;; If for example you want to simulate the event arrival of random ;;; indipendent events, like the requests to a web server with a mean of 4 request ...
null
https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/spheres/util/quickcheck/real.scm
scheme
this is a distribution that correspond to expected intervals between events with a poisson distribution l is lambda that is the mean of the distribution If for example you want to simulate the event arrival of random indipendent events, like the requests to a web server you can simulate it by generating this, d...
with a mean of 4 request per second (define current-case-limit (make-parameter 100)) (define pi 3.14159265) (define (memoize fn size) (let((cache (make-vector size #!void))) (lambda (j) (let((v0 (vector-ref cache j))) (if (eq? v0 #!void) (let((v (fn j))) (vector-set! c...
893751c1358a839e225f6339edc7c1cdaa873c573c1ea7b8c809beda9399e591
zoomhub/zoomhub
OpenSeadragonViewerConfig.hs
{-# LANGUAGE OverloadedStrings #-} module ZoomHub.Web.Types.OpenSeadragonViewerConfig ( OpenSeadragonViewerConfig, mkOpenSeadragonViewerConfig, ObjectFit (..), Constraint (..), ) where import Data.Aeson (ToJSON, object, toJSON, (.=)) import Data.Maybe (fromJust, fromMaybe) import qualified Data.Text a...
null
https://raw.githubusercontent.com/zoomhub/zoomhub/e732cd25c692a1a2458c77f4bda155c5fe679041/src/ZoomHub/Web/Types/OpenSeadragonViewerConfig.hs
haskell
# LANGUAGE OverloadedStrings # JSON NOTE: plural key
module ZoomHub.Web.Types.OpenSeadragonViewerConfig ( OpenSeadragonViewerConfig, mkOpenSeadragonViewerConfig, ObjectFit (..), Constraint (..), ) where import Data.Aeson (ToJSON, object, toJSON, (.=)) import Data.Maybe (fromJust, fromMaybe) import qualified Data.Text as T import Network.URI (URI, parseR...
c5199fc1866f63da04190b67bb84757dea1e003af2eb93a89d686837dfba4391
clojerl/clojerl
clojerl.IColl.erl
%%% Code generate by scripts/generate-protocols -module('clojerl.IColl'). -include("clojerl.hrl"). -include("clojerl_int.hrl"). -clojure(true). -protocol(true). -export(['cons'/2, 'empty'/1]). -export([?SATISFIES/1]). -export([?EXTENDS/1]). -callback 'cons'(any(), any()) -> any(). -callback 'empty'(any()) -> any()....
null
https://raw.githubusercontent.com/clojerl/clojerl/aa35847ca64e1c66224867ca4c31ca6de95bc898/src/erl/lang/protocols/clojerl.IColl.erl
erlang
Code generate by scripts/generate-protocols
-module('clojerl.IColl'). -include("clojerl.hrl"). -include("clojerl_int.hrl"). -clojure(true). -protocol(true). -export(['cons'/2, 'empty'/1]). -export([?SATISFIES/1]). -export([?EXTENDS/1]). -callback 'cons'(any(), any()) -> any(). -callback 'empty'(any()) -> any(). -optional_callbacks(['cons'/2, 'empty'/1]). 'c...
21fbf1247e9d4cf8bb15cb0e60dd9e85b82225453642bd5bc7443e3b7ae15b1c
spawnfest/eep49ers
test.erl
%% %% This is a test file %% -module(test). -export([nrev/1]). %% Just a naive reverse function in order %% to get a code example with some comments. nrev([X | Xs]) -> append(X, nrev(Xs)); % Quadratic behaviour nrev([]) -> %% The trivial case: []. %% We need `append' as a subroutine: append(Y, [X |...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/syntax_tools/examples/test.erl
erlang
This is a test file Just a naive reverse function in order to get a code example with some comments. Quadratic behaviour The trivial case: We need `append' as a subroutine: Simple, innit? Done. ---- end of file ----
-module(test). -export([nrev/1]). nrev([X | Xs]) -> nrev([]) -> []. append(Y, [X | Xs]) -> append(Y, []) ->
cab0002af9cc97000993525fdb9b5d4db5ea3641f05c4e5b5310c8f329930558
haskellfoundation/error-message-index
Main.hs
data Foo = A | B deriving Eq isA :: Foo -> Bool isA foo = foo == A
null
https://raw.githubusercontent.com/haskellfoundation/error-message-index/6b80c2fe6d8d2941190bda587bcea6f775ded0a4/message-index/messages/GHC-39999/no-instance/after/Main.hs
haskell
data Foo = A | B deriving Eq isA :: Foo -> Bool isA foo = foo == A
c934f02e4a5da5d4a43555d54d4f18f36c692206e64142ddff2d9aa407e2d22a
Beluga-lang/Beluga
opsem.mli
open Syntax.Int val eval : Comp.exp -> Comp.value
null
https://raw.githubusercontent.com/Beluga-lang/Beluga/520c41534820e12a52d640f3151480e790baa17e/src/core/opsem.mli
ocaml
open Syntax.Int val eval : Comp.exp -> Comp.value
66da6c8a74e54f0c4d163a19b1822c02fb54690a3a8df0141ff12d4ec8519768
gulige/neuroevo
gstk_menubar.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2016 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applic...
null
https://raw.githubusercontent.com/gulige/neuroevo/09e67928c2417f2b27ec6522acc82f8b3c844949/apps/gs/src/gstk_menubar.erl
erlang
%CopyrightBegin% 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 l...
Copyright Ericsson AB 1996 - 2016 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(gstk_menubar). highlightbg Color keyrelease [ Bool | { Bool , Data } ] Read Options : -expor...
ba6ee67635db93e61292543867610f73330d65664cde4c2653222d5e94999a70
shirok/Gauche
hash.scm
;;; scheme.mapping.hash - hashmaps ( ) ;;; Copyright ( c ) 2017 - 2022 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Redistributions of source code must retain the above...
null
https://raw.githubusercontent.com/shirok/Gauche/e606bfe5a94b100d5807bca9c2bb95df94f60aa6/lib/scheme/mapping/hash.scm
scheme
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in b...
scheme.mapping.hash - hashmaps ( ) Copyright ( c ) 2017 - 2022 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (defi...
9e21749ccc4d40a436846cc26bb70b93b3c968fe991d1516a8ee1cf2fb9ca913
OCamlPro/typerex-lint
lint_warning_types.ml
(**************************************************************************) (* *) (* OCamlPro Typerex *) (* *) Copyrigh...
null
https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/tools/ocp-lint/api/lint_warning_types.ml
ocaml
************************************************************************ OCamlPro Typerex This file is distributed ...
Copyright OCamlPro 2011 - 2016 . All rights reserved . ( GNU General Public Licence version 3.0 ) . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE...