_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
43cc15d25cdbec42a192149679bfbc6ae1309b20f57a899ecfde2f065ff494f4
avras/nsime
nsime_droptail_queue.erl
%% Copyright ( C ) 2012 < > %% %% This file is part of nsime. %% nsime 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 later version....
null
https://raw.githubusercontent.com/avras/nsime/fc5c164272aa649541bb3895d9f4bea34f45beec/src/nsime_droptail_queue.erl
erlang
This file is part of nsime. (at your option) any later version. nsime is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. along with...
Copyright ( C ) 2012 < > nsime 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 You should have received a copy of the GNU General Public License Author :...
d568d3ffca42c3b05d6eebb6dc4285409c2f19e24a5591161e69767b3f36961b
xsc/ancient-clj
core.clj
(ns ancient-clj.core (:require [ancient-clj [artifact :as artifact] [repositories :as r] [zip :as z]] [version-clj.core :as version] [rewrite-clj.zip :as rewrite] [clojure.java.io :as io]) (:import (java.io File))) # # Loader # # # Bas...
null
https://raw.githubusercontent.com/xsc/ancient-clj/c34d96553c74ee1909a71e014e54a718933d1dd0/src/ancient_clj/core.clj
clojure
## Updater ## Deprecated API
(ns ancient-clj.core (:require [ancient-clj [artifact :as artifact] [repositories :as r] [zip :as z]] [version-clj.core :as version] [rewrite-clj.zip :as rewrite] [clojure.java.io :as io]) (:import (java.io File))) # # Loader # # # Bas...
eb5798ce063ef3c524608a3f81d0e330cd44593dadbb2163a920177216c1eb21
jeffpsherman/postgres-jsonb-clojure
project.clj
(defproject postgres-jsonb-clojure "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :source-paths ["src"] :dependencies [[org.clojure/clojure "1.6.0"] [org.clojure/java.jdbc "0.3.7"] [org.p...
null
https://raw.githubusercontent.com/jeffpsherman/postgres-jsonb-clojure/e2156362ae73aef2e6c46f180a43aa1b33aa3b9f/project.clj
clojure
(defproject postgres-jsonb-clojure "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :source-paths ["src"] :dependencies [[org.clojure/clojure "1.6.0"] [org.clojure/java.jdbc "0.3.7"] [org.p...
9d90f8bfe654e0bc784269e8e0c36546e349b138d4f1a3a505266c547cf9b3f8
futurice/haskell-mega-repo
MissingHoursChart.hs
# LANGUAGE DataKinds # module Futurice.App.Reports.MissingHoursChart ( MissingHoursChartData, missingHoursChartData, missingHoursChartRender, ) where import Control.Lens ((.=)) import Control.Monad.State.Strict (StateT, evalStateT, state) import Data.Fixed (Centi) impor...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/reports-app/src/Futurice/App/Reports/MissingHoursChart.hs
haskell
people: do not include only some contracts timereports I wish we had better Monoid (Map k v) Move to Futurice.Time
# LANGUAGE DataKinds # module Futurice.App.Reports.MissingHoursChart ( MissingHoursChartData, missingHoursChartData, missingHoursChartRender, ) where import Control.Lens ((.=)) import Control.Monad.State.Strict (StateT, evalStateT, state) import Data.Fixed (Centi) impor...
0e2ba893ad052f649a35a83fdf368f582549d3b72667fd6c792ec4f101727690
akamai/cl-http2-protocol
stream.lisp
Copyright ( c ) 2014 Akamai Technologies , Inc. ( MIT License ) (in-package :cl-http2-protocol) ;; A single HTTP/2 connection can multiplex multiple streams in parallel: ;; multiple requests and responses can be in flight simultaneously and stream ;; data can be interleaved and prioritized. ;; ;; This class encapsu...
null
https://raw.githubusercontent.com/akamai/cl-http2-protocol/67fb6befe78ed1e52e1ba1f1e66a0a793119033e/stream.lisp
lisp
A single HTTP/2 connection can multiplex multiple streams in parallel: multiple requests and responses can be in flight simultaneously and stream data can be interleaved and prioritized. This class encapsulates all of the state, transition, flow-control, and error management as defined by the HTTP/2 specification...
Copyright ( c ) 2014 Akamai Technologies , Inc. ( MIT License ) (in-package :cl-http2-protocol) | | H / ES | | ES \ H | | | R | : close | R | (defclass stream (flowbuffer-include emitter-include error-include) ((id :reader stream...
907ac9fb200150c48f624bf77004f29b46eb05535efabbce4aa7d40cc5b7dc91
BranchTaken/Hemlock
test_nbI_nbU.ml
open! Basis.Rudiments open! Basis let test () = File.Fmt.stdout |> (fun formatter -> List.fold I16.([kv (-32768L); kv (-1L); kv 0L; kv 1L; kv 32767L]) ~init:formatter ~f:(fun formatter i -> formatter |> Fmt.fmt "widen_to_u32_opt " |> I16.pp i |> Fmt.fmt " -> " |> (...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/convert/test_nbI_nbU.ml
ocaml
open! Basis.Rudiments open! Basis let test () = File.Fmt.stdout |> (fun formatter -> List.fold I16.([kv (-32768L); kv (-1L); kv 0L; kv 1L; kv 32767L]) ~init:formatter ~f:(fun formatter i -> formatter |> Fmt.fmt "widen_to_u32_opt " |> I16.pp i |> Fmt.fmt " -> " |> (...
d3779ef07180995675ff94938d34868cb56e327f27ae11868bdbdd35641313fb
audreyt/openafp
SCFL.hs
module OpenAFP.Records.PTX.SCFL where import OpenAFP.Types import OpenAFP.Internals data PTX_SCFL = PTX_SCFL { ptx_scfl_Type :: !N1 ,ptx_scfl :: !N1 } deriving (Show, Typeable)
null
https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/PTX/SCFL.hs
haskell
module OpenAFP.Records.PTX.SCFL where import OpenAFP.Types import OpenAFP.Internals data PTX_SCFL = PTX_SCFL { ptx_scfl_Type :: !N1 ,ptx_scfl :: !N1 } deriving (Show, Typeable)
083003fe9bf70b9f1b33814e65d16ee924f192282b5b2d4cf98c83b6b5161548
fpco/th-utilities
StorableSpec.hs
# LANGUAGE TemplateHaskell # module TH.Derive.StorableSpec (spec) where import Control.Monad (when) import Data.Int import qualified Data.Vector.Storable as SV import Foreign.Storable import TH.Derive import TH.Derive.Storable () import Test.Hspec data ADat...
null
https://raw.githubusercontent.com/fpco/th-utilities/1fef9916c58f8e82266cd9379615354ad58d21cb/test/TH/Derive/StorableSpec.hs
haskell
Regression test for generating peek on single-constructor data types.
# LANGUAGE TemplateHaskell # module TH.Derive.StorableSpec (spec) where import Control.Monad (when) import Data.Int import qualified Data.Vector.Storable as SV import Foreign.Storable import TH.Derive import TH.Derive.Storable () import Test.Hspec data ADat...
d95413ad1cd88ffd22544bfea539d0b2f1d0ea71b568186b8f5b91232a7e14be
sheyll/b9-vm-image-builder
YamlObjectSpec.hs
{-# LANGUAGE OverloadedStrings #-} module B9.Content.YamlObjectSpec ( spec, ) where import B9.Artifact.Content.AST import B9.Artifact.Content.CloudConfigYaml import B9.Artifact.Content.YamlObject import Data.Text () import Data.Yaml import Test.Hspec spec :: Spec spec = do describe "YamlObject" $ do it "co...
null
https://raw.githubusercontent.com/sheyll/b9-vm-image-builder/4d2af80d3be4decfce6c137ee284c961e3f4a396/src/tests/B9/Content/YamlObjectSpec.hs
haskell
# LANGUAGE OverloadedStrings # it "returns x from (AST x)" $ let x = (object []) lift :: a -> ReaderT Environment IO a
module B9.Content.YamlObjectSpec ( spec, ) where import B9.Artifact.Content.AST import B9.Artifact.Content.CloudConfigYaml import B9.Artifact.Content.YamlObject import Data.Text () import Data.Yaml import Test.Hspec spec :: Spec spec = do describe "YamlObject" $ do it "combines primitives by putting them i...
5c120382c81c755f0e9bd79eb8333c6ddea06c3f75fb1d2d9b458a7abedd172e
tsloughter/kuberl
kuberl_v1_api_service_spec.erl
-module(kuberl_v1_api_service_spec). -export([encode/1]). -export_type([kuberl_v1_api_service_spec/0]). -type kuberl_v1_api_service_spec() :: #{ 'caBundle' => kuberl_byte_array:kuberl_byte_array(), 'group' => binary(), 'groupPriorityMinimum' := integer(), 'insecureSkipTLSVerify' => boolean()...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_api_service_spec.erl
erlang
-module(kuberl_v1_api_service_spec). -export([encode/1]). -export_type([kuberl_v1_api_service_spec/0]). -type kuberl_v1_api_service_spec() :: #{ 'caBundle' => kuberl_byte_array:kuberl_byte_array(), 'group' => binary(), 'groupPriorityMinimum' := integer(), 'insecureSkipTLSVerify' => boolean()...
dcfaebb7cd5055281b9d17cb1517142d4a610293ebe43d75b07f00fabdce8ea8
jeffreyrosenbluth/static-canvas
LinearGradient.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Graphics.Static gradient :: CanvasFree () gradient = do rect 0 0 400 400 grd <- createLinearGradient 0 0 400 400 addColorStop 0 (Hex "#8ed6ff") $ grd addColorStop 1 (Hex "#004cb3") $ grd fillStyle grd fill main :: IO () main = writeCanvasDoc "L...
null
https://raw.githubusercontent.com/jeffreyrosenbluth/static-canvas/1aad0f192828ded72dced14e42ac4e6baa6dab6f/examples/LinearGradient.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import Graphics.Static gradient :: CanvasFree () gradient = do rect 0 0 400 400 grd <- createLinearGradient 0 0 400 400 addColorStop 0 (Hex "#8ed6ff") $ grd addColorStop 1 (Hex "#004cb3") $ grd fillStyle grd fill main :: IO () main = writeCanvasDoc "LinearGradient.html" 400 400 gradien...
6825537d670d2d80758574befcb7c05f2c1997b4ae258c8e680671147e27096c
dpiponi/Moodler
sin.hs
do plane <- currentPlane (x, y) <- fmap (quantise2 quantum) mouse panel <- container' "panel_3x1.png" (x, y) (Inside plane) lab <- label' "sin" (x-25.0, y+75.0) (Inside plane) parent panel lab name <- new' "sin" inp <- plugin' (name ++ ".signal") (x-21, y) (Inside plane) setColour inp "#...
null
https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/sin.hs
haskell
do plane <- currentPlane (x, y) <- fmap (quantise2 quantum) mouse panel <- container' "panel_3x1.png" (x, y) (Inside plane) lab <- label' "sin" (x-25.0, y+75.0) (Inside plane) parent panel lab name <- new' "sin" inp <- plugin' (name ++ ".signal") (x-21, y) (Inside plane) setColour inp "#...
63076fc00aed24154534a9f2cd0f2772c0e7a03be313e70a82f449f975f44ebe
postspectacular/devart-codefactory
core.clj
(ns codefactory.exhibit.core "The code in this ns creates a 3d mockup scene of the exhibition space at the Barbican. Exports STL meshes of all items and he resulting LXS file can be rendered straight away with Luxrender." (:require [codefactory.exhibit.utils :refer :all] [codefactory.exhibit.canopy :refer...
null
https://raw.githubusercontent.com/postspectacular/devart-codefactory/9bccdc10e58fa4861a69767e9ae4be0bb8d7f650/src-fabricate/src/codefactory/exhibit/core.clj
clojure
uses boolean operations to carve out frame from bounding boxes LXS
(ns codefactory.exhibit.core "The code in this ns creates a 3d mockup scene of the exhibition space at the Barbican. Exports STL meshes of all items and he resulting LXS file can be rendered straight away with Luxrender." (:require [codefactory.exhibit.utils :refer :all] [codefactory.exhibit.canopy :refer...
7a1d5f2e52aeef72fe6273064b7904ff477436f8a31bc564e1baa1cde20a22fe
kahaani/TINY-in-Haskell
TypeCheck.hs
module TypeCheck ( typeCheck ) where import Scan (Token(..)) import Parse (Stmt(..), Exp(..)) data ExpType = VoidT | IntegerT | BooleanT deriving (Eq) typeCheck :: [Stmt] -> [Stmt] typeCheck stmts = case typeCheckStmts stmts of True -> stmts False -> error "There is a bug in type checking" typeCheckStmts :: [St...
null
https://raw.githubusercontent.com/kahaani/TINY-in-Haskell/9149c71faa09d33a18b00a08180cefeb6359de77/v1/TypeCheck.hs
haskell
module TypeCheck ( typeCheck ) where import Scan (Token(..)) import Parse (Stmt(..), Exp(..)) data ExpType = VoidT | IntegerT | BooleanT deriving (Eq) typeCheck :: [Stmt] -> [Stmt] typeCheck stmts = case typeCheckStmts stmts of True -> stmts False -> error "There is a bug in type checking" typeCheckStmts :: [St...
7bc7248c939175e4b821f5e5509567a4f22f84a82011b76862d83cfc03d26b3e
TheLortex/mirage-monorepo
static_arp.ml
module Make(E : Ethernet.S) = struct module A = Arp.Make(E) (* generally repurpose A, but substitute input and query, and add functions for adding/deleting entries *) type t = { base : A.t; table : (Ipaddr.V4.t, Macaddr.t) Hashtbl.t; } let add_ip t = A.add_ip t.base let remove_ip t = A.remove...
null
https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/mirage-tcpip/test/static_arp.ml
ocaml
generally repurpose A, but substitute input and query, and add functions for adding/deleting entries disregard responses, but reply to queries
module Make(E : Ethernet.S) = struct module A = Arp.Make(E) type t = { base : A.t; table : (Ipaddr.V4.t, Macaddr.t) Hashtbl.t; } let add_ip t = A.add_ip t.base let remove_ip t = A.remove_ip t.base let set_ips t = A.set_ips t.base let get_ips t = A.get_ips t.base let pp ppf t = let print i...
b606997d09af5d66a66f817e5fee17ead5a468397233b5dcb0a695bc3b1f2fef
kepler16/gx.cljc
registry.cljs
(ns k16.gx.beta.registry) (defonce registry* (atom {}))
null
https://raw.githubusercontent.com/kepler16/gx.cljc/5fae30c875b2f0140d01c00ebd17686ac5e6c29b/src/k16/gx/beta/registry.cljs
clojure
(ns k16.gx.beta.registry) (defonce registry* (atom {}))
db89706bad99c1dd211d4c661af185b1c8f1a2a2456772d1041f7653bdf9fc1f
nkaretnikov/OOHaskell
Selfish.hs
{-# LANGUAGE EmptyDataDecls #-} # LANGUAGE TypeOperators # # LANGUAGE ScopedTypeVariables # OOHaskell ( C ) 2004 , , , This module illustrates the notion of self , i.e. , open recursion . A number of key OO concepts are demonstrated including basics like inheritance . In the following we again quote fr...
null
https://raw.githubusercontent.com/nkaretnikov/OOHaskell/ddf42cfa62f8bd27643ff6db136dec6c14466232/samples/Selfish.hs
haskell
# LANGUAGE EmptyDataDecls # We shall see that below ... We shall see that below ... To be revealed later We can share this print_getX method across all the objects that have at least the method getX of type (Show a ) => IO a The objects in question do not have to belong to the same hierarchy. We re-use this f...
# LANGUAGE TypeOperators # # LANGUAGE ScopedTypeVariables # OOHaskell ( C ) 2004 , , , This module illustrates the notion of self , i.e. , open recursion . A number of key OO concepts are demonstrated including basics like inheritance . In the following we again quote from the tutorial " Objects in ...
ea759b57bd3ab106f3ede67a5f32d269d96e9509845892a3e2400aa55546e79d
ndmitchell/catch
Type.hs
module Typey.Type where import Hite import General.General import Data.Maybe import Data.List import Control.Exception -- SHOW STUFF instance Show Large2T where show x = f 0 x where f n (Free2T i) = i f n (Ctor2T x) = x f n (Bind2T x xs) = brack (n>=...
null
https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/src/Typey/Type.hs
haskell
SHOW STUFF TYPE STUFF the constructors at this level, and inside them emptySubtype = Subtype [] [] [] [] drop all items to the bottom (recursive) level a free variable can be a subtype
module Typey.Type where import Hite import General.General import Data.Maybe import Data.List import Control.Exception instance Show Large2T where show x = f 0 x where f n (Free2T i) = i f n (Ctor2T x) = x f n (Bind2T x xs) = brack (n>=2) $ show x ++ ...
15e17304765a7407c14aacf3e5c17108e20c65ac543adc24ae3f0c058c24d325
NorfairKing/validity
Clock.hs
# LANGUAGE RecordWildCards # # OPTIONS_GHC -fno - warn - orphans # module Data.Validity.Time.Clock where import Data.Time.Clock import Data.Validity import Data.Validity.Time.Calendar () -- | Valid according to the 'Rational' it contains. instance Validity UniversalTime where validate = delve "toModifiedJulianDay"...
null
https://raw.githubusercontent.com/NorfairKing/validity/1c3671a662673e21a1c5e8056eef5a7b0e8720ea/validity-time/src/Data/Validity/Time/Clock.hs
haskell
| Valid according to the 'Rational' it contains. | Trivially valid
# LANGUAGE RecordWildCards # # OPTIONS_GHC -fno - warn - orphans # module Data.Validity.Time.Clock where import Data.Time.Clock import Data.Validity import Data.Validity.Time.Calendar () instance Validity UniversalTime where validate = delve "toModifiedJulianDay" . getModJulianDate instance Validity DiffTime wher...
a36df17c90b8a829a6c503cfa132c4208630747c80d6c213f591083f6b5b5798
fp-works/2019-winter-Haskell-school
Parser.hs
-- Applicative parser for infix arithmetic expressions without any -- dependency on hackage. Builds an explicit representation of the -- syntax tree to fold over using client-supplied semantics. module Parser (parseExp) where import Control.Applicative hiding (Const) import Control.Arrow import Data.Char import Data ...
null
https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week5/zehua/src/Parser.hs
haskell
Applicative parser for infix arithmetic expressions without any dependency on hackage. Builds an explicit representation of the syntax tree to fold over using client-supplied semantics. Building block of a computation with some state of type @s@ threaded through it, possibly resulting in a value of type @r@ along...
module Parser (parseExp) where import Control.Applicative hiding (Const) import Control.Arrow import Data.Char import Data . Monoid import Data.List (foldl') import Prelude hiding (toInteger) newtype State s r = State (s -> Maybe (r, s)) data Expr = Const Integer | Add Expr Expr | Mul Expr Expr ...
0bcce54c22db539049581793d99f6c825ad2f693d44b57085bc685a06505892b
futurice/haskell-mega-repo
FUM.hs
{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE TypeFamilies #-} # LANGUAGE UndecidableInstances # #if __GLASGOW_HASKELL__ >= 800 # LANGUAGE UndecidableSuperClasses # #endif module Control.Monad.FUM (MonadFUM(..)) where import Futurice.Prelude import Prelude () import ...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/fum-client/src/Control/Monad/FUM.hs
haskell
# LANGUAGE CPP # # LANGUAGE ConstraintKinds # # LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances # #if __GLASGOW_HASKELL__ >= 800 # LANGUAGE UndecidableSuperClasses # #endif module Control.Monad.FUM (MonadFUM(..)) where import Futurice.Prelude import Prelude () import Data.Constraint (Constraint) import Data.Aeson.Compat (FromJSON) import FUM.Request import FUM.Types (User, Gr...
61e2baf902b3ee55f848335cceb26fe362b59bf3ad3a7689cb0b369811dba0d2
openbadgefactory/salava
register.cljs
(ns salava.user.ui.register (:require [reagent.core :refer [atom cursor]] [reagent.session :as session] [reagent-modals.modals :as m] [clojure.string :as string] [salava.core.ui.ajax-utils :as ajax] [salava.core.ui.layout :as layout] [salava.core...
null
https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/cljs/salava/user/ui/register.cljs
clojure
[:legend.sr-only ""] (oauth-registration-form)
(ns salava.user.ui.register (:require [reagent.core :refer [atom cursor]] [reagent.session :as session] [reagent-modals.modals :as m] [clojure.string :as string] [salava.core.ui.ajax-utils :as ajax] [salava.core.ui.layout :as layout] [salava.core...
d239b5a49904d8269bd8e1c3d32e917d158b589e7638df9c3e44cffd69218d5d
dalaing/little-languages
Gen.hs
| Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Copyright : (c) Dave Laing, 2016 License : BSD3 Maintainer : Stability : experimental Portability : non-portable -} module Component.Type.Int.Gen ( genTypeInput ) where import ...
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/modular/i-lang/src/Component/Type/Int/Gen.hs
haskell
| | ^ ^ | | ^ ^
| Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Copyright : (c) Dave Laing, 2016 License : BSD3 Maintainer : Stability : experimental Portability : non-portable -} module Component.Type.Int.Gen ( genTypeInput ) where import ...
f8e2a2ac730a4eb0e18914ecf19554a67999ed3729618e1f3e5711f411e34ab7
vlaaad/plusinia
plusinia.clj
(ns io.github.vlaaad.plusinia (:require [com.walmartlabs.lacinia.schema :as l.schema] [com.walmartlabs.lacinia.executor :as l.executor])) (defprotocol Node :extend-via-metadata true (get-value [this]) (get-context [this]) (get-type [this])) (extend-protocol Node Object (get-value [this] this...
null
https://raw.githubusercontent.com/vlaaad/plusinia/1fc0f20f3a7034831ee351268c1abd6cec4b4752/src/io/github/vlaaad/plusinia.clj
clojure
field->fetcher: a map of field keywords to fetchers (fn of ctx, args, values -> value->node-or-nodes) returns: a map of selection->input-node->output-values (not nodes!) skip when requested type is concrete and not equal to node type sub-input-node is an output-node with context added from corresponding input-node ...
(ns io.github.vlaaad.plusinia (:require [com.walmartlabs.lacinia.schema :as l.schema] [com.walmartlabs.lacinia.executor :as l.executor])) (defprotocol Node :extend-via-metadata true (get-value [this]) (get-context [this]) (get-type [this])) (extend-protocol Node Object (get-value [this] this...
ab12b46c35eb17519c348823da139b3caf6ed45ae983b7f3ced0c3dede46dbf7
day8/re-frame
db.cljs
(ns todomvc.db (:require [cljs.reader] [cljs.spec.alpha :as s] [re-frame.core :as re-frame])) ;; -- Spec -------------------------------------------------------------------- ;; This is a clojure.spec specification for the value in app - db . It is like a ;; Schema. See: ;; ;; The value in...
null
https://raw.githubusercontent.com/day8/re-frame/ecb756e66fe30efca896879369a420df1e271605/examples/todomvc/src/todomvc/db.cljs
clojure
-- Spec -------------------------------------------------------------------- Schema. See: The value in app-db should always match this spec. Only event handlers can change the value in app-db so, after each event handler How is this done? Look in events.cljs and you'll notice that all handlers have an "after"...
(ns todomvc.db (:require [cljs.reader] [cljs.spec.alpha :as s] [re-frame.core :as re-frame])) This is a clojure.spec specification for the value in app - db . It is like a has run , we re - check app - db for correctness ( compliance with the ) . (s/def ::id int?) (s/def ::title string...
630c0d2ed4ca25bed2ba3d55a7c4fe7ff4e98ccd1a6a09b525987ddd1fefe964
amnh/PCG
Internal.hs
----------------------------------------------------------------------------- -- | Module : Analysis . . Fitch Copyright : ( c ) 2015 - 2021 Ward Wheeler -- License : BSD-style -- -- Maintainer : -- Stability : provisional -- Portability : portable -- Standard Fitch ( non - additive ) ch...
null
https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/core/analysis/src/Analysis/Parsimony/Fitch/Internal.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style Maintainer : Stability : provisional Portability : portable character will be received at a time. Assumes binary trees. --------------------------------------------------------------------------- |...
Module : Analysis . . Fitch Copyright : ( c ) 2015 - 2021 Ward Wheeler Standard Fitch ( non - additive ) character analysis ( cost and medians ) . This only works on static characters , and due to the traversal , only one # LANGUAGE BangPatterns # # LANGUAGE FlexibleContexts # module Analys...
0f031a7860ffe7eb71b516ac38530e477cede8a270c8a46d362259f05ffded99
coq-community/coqffi
aliases.mli
type t val ( + ) : t -> t -> t val ( < ) : t -> t -> bool [@@pure]
null
https://raw.githubusercontent.com/coq-community/coqffi/0e31ff7bcced176afd6233c7825f4bd41ab894ce/examples/src/aliases.mli
ocaml
type t val ( + ) : t -> t -> t val ( < ) : t -> t -> bool [@@pure]
c198cbe9832041e3730d1c9d309c76f4a52b4219392b328c7e781413732939ce
HachiSecurity/plc-llvm
Equality.hs
# LANGUAGE LambdaCase # -- | This module contains code generators for runtime, value equality checks. module Hachi.Compiler.CodeGen.Equality ( eqData ) where ------------------------------------------------------------------------------- import LLVM.AST import LLVM.AST.Constant import LLVM.AST.IntegerPredicate a...
null
https://raw.githubusercontent.com/HachiSecurity/plc-llvm/c99c8d58ec7cbbb8942604338cfde00ad23e7f13/compiler/src/Hachi/Compiler/CodeGen/Equality.hs
haskell
| This module contains code generators for runtime, value equality checks. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- and checks that the resulting values are the same. values and checks that the resultin...
# LANGUAGE LambdaCase # module Hachi.Compiler.CodeGen.Equality ( eqData ) where import LLVM.AST import LLVM.AST.Constant import LLVM.AST.IntegerPredicate as LLVM import Hachi.Compiler.CodeGen.Closure import Hachi.Compiler.CodeGen.Constant import Hachi.Compiler.CodeGen.Constant.ByteString import Hachi.Compiler.C...
f6ffa776f5a3cc3af8187c98aeff776ed1b788aa0e2202ca8cb066d2419b92d7
janestreet/bonsai
main.ml
open! Core open! Bonsai_web module Style = [%css stylesheet {| .box { width: 100px; height: 100px; background-color: var(--my-color); border-radius: var(--radius); border: 3px solid black; } |} ~rewrite:[ "--my-color", "--my-color"; "--radius", "--radius" ]] let component = ...
null
https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/examples/inline_css_with_var/main.ml
ocaml
open! Core open! Bonsai_web module Style = [%css stylesheet {| .box { width: 100px; height: 100px; background-color: var(--my-color); border-radius: var(--radius); border: 3px solid black; } |} ~rewrite:[ "--my-color", "--my-color"; "--radius", "--radius" ]] let component = ...
20f9e977908e54a2ddbb1d29542852994305e60c914f16b3e14a3b651e303e34
dbuenzli/xmlm
pkg.ml
#!/usr/bin/env ocaml #use "topfind" #require "topkg" open Topkg let () = Pkg.describe "xmlm" @@ fun c -> Ok [ Pkg.mllib "src/xmlm.mllib"; Pkg.bin "test/xmltrip"; Pkg.test "test/examples"; Pkg.test "test/test"; Pkg.test "test/xhtml"; Pkg.test "test/test_tree"; Pkg.doc "doc/...
null
https://raw.githubusercontent.com/dbuenzli/xmlm/47ad01c1970e5cc035117e9b52bad072bbaef8d8/pkg/pkg.ml
ocaml
#!/usr/bin/env ocaml #use "topfind" #require "topkg" open Topkg let () = Pkg.describe "xmlm" @@ fun c -> Ok [ Pkg.mllib "src/xmlm.mllib"; Pkg.bin "test/xmltrip"; Pkg.test "test/examples"; Pkg.test "test/test"; Pkg.test "test/xhtml"; Pkg.test "test/test_tree"; Pkg.doc "doc/...
a2c6bb754e11da16420c99d7b8257781f8d5bfdf990a4b14c944db19796c4d34
arthurbarroso/lovelace
specs.clj
(ns lovelace.pages.specs (:require [clojure.spec.alpha :as s])) (s/def ::parent (s/keys :req-un [::database_id])) (s/def ::create-body (s/keys :req-un [::parent ::properties])) (defn validate-page-creation [body] (s/valid? ::create-body body))
null
https://raw.githubusercontent.com/arthurbarroso/lovelace/a6cadfc83953f3488117ee46a0bec768fe616ba0/src/lovelace/pages/specs.clj
clojure
(ns lovelace.pages.specs (:require [clojure.spec.alpha :as s])) (s/def ::parent (s/keys :req-un [::database_id])) (s/def ::create-body (s/keys :req-un [::parent ::properties])) (defn validate-page-creation [body] (s/valid? ::create-body body))
9d53fc4a3f660151307813d47745e1d897888530c2f8ce87452d11057b018a4f
LeventErkok/hArduino
Arduino.hs
------------------------------------------------------------------------------- -- | -- Module : System.Hardware.Arduino Copyright : ( c ) -- License : BSD3 -- Maintainer : -- Stability : experimental -- hArduino allows Haskell programs to control Arduino boards ( < > ) and peripherals , ...
null
https://raw.githubusercontent.com/LeventErkok/hArduino/ee04988ad9ef3d4384d7ce7a8670518ce8b0a34c/System/Hardware/Arduino.hs
haskell
----------------------------------------------------------------------------- | Module : System.Hardware.Arduino License : BSD3 Maintainer : Stability : experimental For details, see: <>. ----------------------------------------------------------------------------- * Running the controller * ...
Copyright : ( c ) hArduino allows Haskell programs to control Arduino boards ( < > ) and peripherals , using the Firmata protocol ( < > ) . module System.Hardware.Arduino ( withArduino, Arduino , analog, digital, pin, Pin, PinMode(..), setPinMode , analogRead, analogWrite , digitalWrite, digitalR...
5f9923daeb1a62678a7b7de915472fa67666e378b04bf07c70690326665116aa
bobbae/gosling-emacs
process.ml
(declare-global last-line) (declare-buffer-specific last-line) (defun (pr-newline (end-of-line) (if (eobp) (newline) (progn com (beginning-of-line) (if (= (following-char) '$') (forward-character)) (if (= (following-char) ' ') (forward-character)) (set-mark) (end-of-line) ...
null
https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/lib/maclib/process.ml
ocaml
(declare-global last-line) (declare-buffer-specific last-line) (defun (pr-newline (end-of-line) (if (eobp) (newline) (progn com (beginning-of-line) (if (= (following-char) '$') (forward-character)) (if (= (following-char) ' ') (forward-character)) (set-mark) (end-of-line) ...
93e3b715080cb7eb4abcc178cfd7b9da5b38f59327fcd4ed0830790093c99f34
GaloisInc/ivory
BitData.hs
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE TypeFamilies # # LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleContexts # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE UndecidableInstances # -- BitData.hs --- Typed bit data types . -- Copyright ( C ) 2013 , Galois , Inc. All Rights Reserved . -- ...
null
https://raw.githubusercontent.com/GaloisInc/ivory/53a0795b4fbeb0b7da0f6cdaccdde18849a78cd6/ivory/src/Ivory/Language/BitData/BitData.hs
haskell
# LANGUAGE ConstraintKinds # - Typed bit data types . quasiquoter. | Convert a bit data type to its raw bit value. This is always well defined and should be exported. | Convert a raw bit value to a bit data type. All values may not be well defined with respect to the original set of bit data constructors. F...
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE TypeFamilies # # LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleContexts # # LANGUAGE UndecidableInstances # Copyright ( C ) 2013 , Galois , Inc. All Rights Reserved . module Ivory.Language.BitData.BitData where import Ivory.Language.Bits import Ivo...
49beb143d5f137d70e8ea087d308b198aeb99ac79feaa122d5972f6cd179d7dd
Helium4Haskell/helium
TicTacToe.hs
module TicTacToe where BORD type Bord = [Veld] een is of bezet door een speler data Veld = Leeg | Speler Speler eqVeld :: Veld -> Veld -> Bool eqVeld Leeg Leeg = True eqVeld (Speler s1) (Speler s2) = s1 `eqSpeler` s2 eqVeld _ _ = False twee spelers : de computer zet rondjes en de mens kruisjes data Spele...
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/demo/TicTacToe.hs
haskell
een leeg bord randomRIO (0, length zetten-1) HULPFUNCTIES
module TicTacToe where BORD type Bord = [Veld] een is of bezet door een speler data Veld = Leeg | Speler Speler eqVeld :: Veld -> Veld -> Bool eqVeld Leeg Leeg = True eqVeld (Speler s1) (Speler s2) = s1 `eqSpeler` s2 eqVeld _ _ = False twee spelers : de computer zet rondjes en de mens kruisjes data Spele...
5001b3ca475f241329b670f1134f8459258a93e7dfb10516240e856e82155c86
lingnand/VIMonad
Xfce.hs
# OPTIONS_GHC -fno - warn - missing - signatures # ----------------------------------------------------------------------------- -- | Module : XMonad . Config . Copyright : ( c ) < > -- License : BSD -- Maintainer : none -- Stability : unstable -- Portability : unportable -- This...
null
https://raw.githubusercontent.com/lingnand/VIMonad/048e419fc4ef57a5235dbaeef8890faf6956b574/XMonadContrib/XMonad/Config/Xfce.hs
haskell
--------------------------------------------------------------------------- | License : BSD Stability : unstable Portability : unportable environment. * Usage $usage $usage To use this module, start with the following @~\/.xmonad\/xmonad.hs@: > For examples of how to further customize @xfceCon...
# OPTIONS_GHC -fno - warn - missing - signatures # Module : XMonad . Config . Copyright : ( c ) < > Maintainer : none This module provides a config suitable for use with the desktop module XMonad.Config.Xfce ( xfceConfig ) where import XMonad import XMonad.Config.Desktop import ...
ef5154aded3ff50ebb9d934f05f19d5925a8716996014bea7d15a237744dbe6f
wavewave/HROOT.old
project1d.hs
module Main where import Control.Monad import HROOT main :: IO () main = do tcanvas <- newTCanvas "Test" "Test" 640 480 h2 <- newTH2F "test" "test" 100 (-5.0) 5.0 100 (-5.0) 5.0 tRandom <- newTRandom 65535 let generator1 = gaus tRandom 0 2 generator2 = gaus tRandom 1 0.5 let go n | n <= 0 = retur...
null
https://raw.githubusercontent.com/wavewave/HROOT.old/6be1bae246ff4c82159d84981cf7e4389011b17a/example/project1d.hs
haskell
module Main where import Control.Monad import HROOT main :: IO () main = do tcanvas <- newTCanvas "Test" "Test" 640 480 h2 <- newTH2F "test" "test" 100 (-5.0) 5.0 100 (-5.0) 5.0 tRandom <- newTRandom 65535 let generator1 = gaus tRandom 0 2 generator2 = gaus tRandom 1 0.5 let go n | n <= 0 = retur...
556e517a72aae9d9b0b78ade8025f99c80fcfbe8f28979aacbebff2b588ddae1
argp/bap
piqic_erlang_types.ml
pp camlp4o -I ` ocamlfind query piqi.syntax ` pa_labelscope.cmo pa_openin.cmo Copyright 2009 , 2010 , 2011 , 2012 , 2013 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 ...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/libtracewrap/libtrace/piqi/piqi/piqic/piqic_erlang_types.ml
ocaml
TODO: this is a dirty method for sharing settings across all * piqic_erlang_* modules this function will be called only for named types (i.e. typedefs) imported name local name recognized the fact that strings are actually parsed as binaries allow more flexible typing in certain cases: loosen type restricti...
pp camlp4o -I ` ocamlfind query piqi.syntax ` pa_labelscope.cmo pa_openin.cmo Copyright 2009 , 2010 , 2011 , 2012 , 2013 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 ...
51905b79a6f3000211a1669728b75f0c261695c407b6703643e28a1d877388af
superbobry/pareto
tests.ml
open Internal type test_alternative = Less | Greater | TwoSided type test_result = { test_statistic : float; test_pvalue : float } let run_test ?(significance_level=0.05) f = let { test_pvalue = pvalue; _ } = f () in if pvalue <= significance_level then `NotSignificant else `Significant module T = s...
null
https://raw.githubusercontent.com/superbobry/pareto/8b3b27bce7b7df5d9713d16ed40a844861aa368e/lib/tests.ml
ocaml
Use Yates' correction for continuity. Correct bottom left element if needed. Here come factorials! FIXME(superbobry): control for overflow in matrix power calculation. FIXME(superbobry): see the following bug for critique of 'psmirnov2x' implementation: -project.org/bugzilla3/show_bug.cg...
open Internal type test_alternative = Less | Greater | TwoSided type test_result = { test_statistic : float; test_pvalue : float } let run_test ?(significance_level=0.05) f = let { test_pvalue = pvalue; _ } = f () in if pvalue <= significance_level then `NotSignificant else `Significant module T = s...
edb18dc187693b0ea8f21b93ccc4e1149b6278c290a685ecc867709199859633
synrc/mad
mad_utils_SUITE.erl
-module(mad_utils_SUITE). -export([all/0]). -export([cwd/1]). -export([exec/1]). -export([home/1]). -export([consult/1]). -export([src/1]). -export([include/1]). -export([ebin/1]). -export([deps/1]). -export([get_value/1]). -export([script/1]). -export([lib_dirs/1]). -export([sub_dirs/1]). -export([https_to_git/1]). -...
null
https://raw.githubusercontent.com/synrc/mad/b8811aebd662c2a281c9f87642b5cab9321cf543/test/mad_utils_SUITE.erl
erlang
-module(mad_utils_SUITE). -export([all/0]). -export([cwd/1]). -export([exec/1]). -export([home/1]). -export([consult/1]). -export([src/1]). -export([include/1]). -export([ebin/1]). -export([deps/1]). -export([get_value/1]). -export([script/1]). -export([lib_dirs/1]). -export([sub_dirs/1]). -export([https_to_git/1]). -...
9dbecafd3498ae5c6727e7c1b7a5afd81d56d131e29d81c85d59cebb225e7a0e
falsetru/htdp
24.0.7.scm
(lambda (x y) (x y y)) (lambda () 10) (lambda (x) x) (lambda (x y) x) ( lambda x 10 ) ; 파라미터에 괄호가 없음.
null
https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/24/24.0.7.scm
scheme
파라미터에 괄호가 없음.
(lambda (x y) (x y y)) (lambda () 10) (lambda (x) x) (lambda (x y) x) ( lambda x 10 )
68c5dfad2393d919cc554f303620ab1754405f7e6af3f93fd88ad078f21ae15e
input-output-hk/cardano-wallet
Error.hs
# LANGUAGE DataKinds # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedLabels # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # -- | Copyright : © 2018 - 2022 IOHK -- License: Apache-2.0 -- -- 'IsServerError' de...
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet/1f01cdc22bb81ef24e2d457962407bd087ce5b69/lib/wallet/api/http/Cardano/Wallet/Api/Http/Server/Error.hs
haskell
| License: Apache-2.0 'IsServerError' definition along with most instances | Maps types to servant error responses. | A structured human-readable error code to return to API clients. | Lift our wallet layer into servant 'Handler', by mapping each error to a corresponding servant error. | Small helper to easy ...
# LANGUAGE DataKinds # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedLabels # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # Copyright : © 2018 - 2022 IOHK module Cardano.Wallet.Api.Http.Server.Error ( IsSe...
f39f4f11f37b890b68563781189ce0be55a3a12655402920d4d880bfb0472e2a
acowley/CLUtil
Resource.hs
# LANGUAGE ConstraintKinds , FlexibleContexts , FlexibleInstances , ScopedTypeVariables , TemplateHaskell # ScopedTypeVariables, TemplateHaskell #-} -- | A resource-tracking monad inspired by the @resourcet@ -- package. The distinction here is that we commonly want to separate -- execution o...
null
https://raw.githubusercontent.com/acowley/CLUtil/d57f05cb3419001b3079d4dfd738bf4538a115ce/src/CLUtil/Resource.hs
haskell
| A resource-tracking monad inspired by the @resourcet@ package. The distinction here is that we commonly want to separate execution of an action prepared in the resource-tracking monad from the cleanup of the resources it refers to. Typical usage will functions a caller can execute multiple times along with anoth...
# LANGUAGE ConstraintKinds , FlexibleContexts , FlexibleInstances , ScopedTypeVariables , TemplateHaskell # ScopedTypeVariables, TemplateHaskell #-} involve allocating OpenCL images and buffers , then returning ' IO ' module CLUtil.Resource ( ezInit, clDeviceGPU, clDeviceCPU, clDeviceSel...
ea8553a859a29066dadb5bfe5beb152098abde870e27a78039a8ea3773102d21
jekor/templatepg
TemplatePG.hs
module Database.TemplatePG (-- *Introduction -- $intro -- *Usage -- $usage -- **Compile-Time Parameters -- $compiletime * -- $caveats ...
null
https://raw.githubusercontent.com/jekor/templatepg/24a131aa533f823e125341fd95174ea14b200d66/Database/TemplatePG.hs
haskell
*Introduction $intro *Usage $usage **Compile-Time Parameters $compiletime $caveats *Limitations and Workarounds **A Note About NULL $nulls **Tips $tips **Other Workarounds $other $intro primary focus is on safety. To help ensure safety, it uses the PostgreSQL server to parse every query and statement...
* PGException(..) , pgConnect , pgDisconnect , queryTuples , queryTuple , execute , withTransaction ...
e6f5f4fc5ebfac3ba636b81a669e603d62cf7ff45604f86abfc5219132fa54a6
untangled-web/untangled-ui
image_library.cljs
(ns untangled.ui.image-library (:require [om.dom :as dom] [om.next :as om :refer-macros [defui]] [untangled.i18n :refer-macros [tr trf]] [goog.object :as gobj] [clojure.string :as str] [untangled.client.core :as uc] [untangled.client.data-fetch :...
null
https://raw.githubusercontent.com/untangled-web/untangled-ui/ae101f90cd9b7bf5d0c80e9453595fdfe784923c/src/main/untangled/ui/image_library.cljs
clojure
(ns untangled.ui.image-library (:require [om.dom :as dom] [om.next :as om :refer-macros [defui]] [untangled.i18n :refer-macros [tr trf]] [goog.object :as gobj] [clojure.string :as str] [untangled.client.core :as uc] [untangled.client.data-fetch :...
678b3d5565dee31b043708ba06ad345ae5d6869d093f41b19505f631c930712f
LdBeth/CLFSWM
cd-player.lisp
;;; -------------------------------------------------------------------------- ;;; CLFSWM - FullScreen Window Manager ;;; ;;; -------------------------------------------------------------------------- ;;; Documentation: Music Player Daemon (MPD) interface ;;; ------------------------------------------------------------...
null
https://raw.githubusercontent.com/LdBeth/CLFSWM/4e936552d1388718d2947a5f6ca3eada19643e75/contrib/cd-player.lisp
lisp
-------------------------------------------------------------------------- CLFSWM - FullScreen Window Manager -------------------------------------------------------------------------- Documentation: Music Player Daemon (MPD) interface -------------------------------------------------------------------------- ...
( C ) 2015 < > it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA . (in-package :clfswm) (format t "Loading CDPLAYER code... ") (defun cdplay...
8d654aa84dc9cf98607b93b703ac4b9c483f5da503cfceccc6ea394bdffb769e
xvw/preface
writer.ml
module Core_over_monad (Monad : Preface_specs.MONAD) (Tape : Preface_specs.MONOID) = struct type tape = Tape.t type 'a monad = 'a Monad.t type 'a t = ('a * tape) monad let upper m = Monad.bind (fun a -> Monad.return (a, Tape.neutral)) m let writer (x, t) = Monad.return (x, t) let run writer_m = wri...
null
https://raw.githubusercontent.com/xvw/preface/7253e43d4d88a4b2205f701029207c6cf9036eed/lib/preface_make/writer.ml
ocaml
module Core_over_monad (Monad : Preface_specs.MONAD) (Tape : Preface_specs.MONOID) = struct type tape = Tape.t type 'a monad = 'a Monad.t type 'a t = ('a * tape) monad let upper m = Monad.bind (fun a -> Monad.return (a, Tape.neutral)) m let writer (x, t) = Monad.return (x, t) let run writer_m = wri...
7f536014ef46e35faa36404939e41a659af099a9f5a497fc9e72faffb22f771e
abid-mujtaba/haskell-cas
Vars.hs
-- | This module declares useful variables (expressions) which are used in ghci to aid in debugging and development. module Vars ( x, y, z, ) where import CAS -- | We define and export some useful symbols (the ubiquitous x, y, z). x, y, z :: Expr x = symbol "x" y = symbol "y" z = symbol "z" To create the varia...
null
https://raw.githubusercontent.com/abid-mujtaba/haskell-cas/077b4b7fb4366818dc1f76348d288bab260be968/src/Vars.hs
haskell
| This module declares useful variables (expressions) which are used in ghci to aid in debugging and development. | We define and export some useful symbols (the ubiquitous x, y, z).
module Vars ( x, y, z, ) where import CAS x, y, z :: Expr x = symbol "x" y = symbol "y" z = symbol "z" To create the variables we simply use the ' symbol ' utility function that is defined in and exported by CAS This function provides the only mechanism for creating Atoms that corresond to single symbols / ...
50a02e9feacae79b0c6c4385f527b864fec3a42b095896aca5193bc83096effe
ghc/packages-Cabal
Compiler.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # {-# LANGUAGE DeriveTraversable #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Compiler Copyright : 2003 - 2004 -- License...
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/Cabal/Distribution/Compiler.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveTraversable # --------------------------------------------------------------------------- | Module : Distribution.Compiler License : BSD3 Maintainer : Portability : portable also specifies the default compiler. Sadly you'll often see code that does...
# LANGUAGE DeriveGeneric # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # Copyright : 2003 - 2004 This has an enumeration of the various compilers that knows about . It > GHC - > GHC.getInstalledPackages verbosity packageDb progdb Obviously it would be better to use the proper ' Compiler ' a...
3e0c7da2d6a830de4aa69e1dafe47a126a9b7ac10f4a23fc8301f81f3af9304c
Engil/Goodboy
addressable.ml
type uint8 = Uint8.t type uint16 = int module Bs = Bigstringaf type t = { buffer : Bs.t; get : int -> uint8; set_n : int -> uint8 -> unit; } let make ?buffer (b, e) = let buffer = match buffer with Some buffer -> buffer | _ -> Bs.create (e - b + 1) in let get = fun addr -> Bs.get buffer (addr - b) in let ...
null
https://raw.githubusercontent.com/Engil/Goodboy/2e9abc243b929d8bdfb7c5d4874ddb8a07c55fac/lib/addressable.ml
ocaml
type uint8 = Uint8.t type uint16 = int module Bs = Bigstringaf type t = { buffer : Bs.t; get : int -> uint8; set_n : int -> uint8 -> unit; } let make ?buffer (b, e) = let buffer = match buffer with Some buffer -> buffer | _ -> Bs.create (e - b + 1) in let get = fun addr -> Bs.get buffer (addr - b) in let ...
c9b3871ce0aa1a6da1fc7334fd0fe47792e6559fc0626e90f368c8bab69cb24c
jyh/metaprl
sil_state_types.ml
* Possible types of the state . * * ---------------------------------------------------------------- * * This file is part of MetaPRL , a modular , higher order * logical framework that provides a logical programming * environment for OCaml and other languages . * * See the file doc / htmlman...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/sil/sil_state_types.ml
ocaml
*********************************************************************** * SYNTAX * *********************************************************************** * Type of labels into the state. * Declaration lists. * State from a declaration. *******...
* Possible types of the state . * * ---------------------------------------------------------------- * * This file is part of MetaPRL , a modular , higher order * logical framework that provides a logical programming * environment for OCaml and other languages . * * See the file doc / htmlman...
32449b0c7e26dbc16fab7bdb0087f97aba6982682bf66eb99c7ef38ea259e958
basho/riak_dt
riak_dt_disable_flag.erl
%% ------------------------------------------------------------------- %% %% riak_dt_disable_flag: A state based, disable-only flag. %% Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not...
null
https://raw.githubusercontent.com/basho/riak_dt/11571d45e8bbc19908040c7c7ee65274cba4e134/src/riak_dt_disable_flag.erl
erlang
------------------------------------------------------------------- riak_dt_disable_flag: A state based, disable-only flag. Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See ...
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY ...
7bb2def036746f4001fa6820e3544142ee081a5220c77d7f4c85a63267791dbd
schemedoc/implementation-metadata
jazz.scm
(title "JazzScheme") (tagline "") (based-on "gambit") (person "Guillaume Cartier") (homepage-url "/") (features module-system hygienic-macros object-oriented-programming cross-platform-gui ide build-system self-contained-executables)
null
https://raw.githubusercontent.com/schemedoc/implementation-metadata/6280d9c4c73833dc5bd1c9bef9b45be6ea5beb68/schemes/jazz.scm
scheme
(title "JazzScheme") (tagline "") (based-on "gambit") (person "Guillaume Cartier") (homepage-url "/") (features module-system hygienic-macros object-oriented-programming cross-platform-gui ide build-system self-contained-executables)
91786e6f6d618ae82d91a347b89ab88cd1c7eb7ce626e0c8bd8c21b70c996bce
typeable/compaREST
Common.hs
module Data.OpenApi.Compare.Common ( zipAll, ) where zipAll :: [a] -> [b] -> Maybe [(a, b)] zipAll [] [] = Just [] zipAll (x : xs) (y : ys) = ((x, y) :) <$> zipAll xs ys zipAll (_ : _) [] = Nothing zipAll [] (_ : _) = Nothing
null
https://raw.githubusercontent.com/typeable/compaREST/5727f6bf83ce59a81293837e593822c4a66fcc0b/src/Data/OpenApi/Compare/Common.hs
haskell
module Data.OpenApi.Compare.Common ( zipAll, ) where zipAll :: [a] -> [b] -> Maybe [(a, b)] zipAll [] [] = Just [] zipAll (x : xs) (y : ys) = ((x, y) :) <$> zipAll xs ys zipAll (_ : _) [] = Nothing zipAll [] (_ : _) = Nothing
8840e13e76b08579235f18efc24dd49e56d142ac5e61f7866e70a1e99d539d59
herd/herdtools7
restrict.mli
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/herd/restrict.mli
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2012 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
cef21a6ee4c18e684eb99dacbf1fd18bc4c7238844706539487168d9c1f4410d
smallhadroncollider/taskell
Mode.hs
module Taskell.UI.Draw.Mode where import ClassyPrelude import Taskell.Events.State.Types.Mode (InsertType (..), ModalType (..), Mode (..)) import Taskell.UI.Draw.Field (Field) getField :: Mode -> Maybe Field getField (Insert _ _ f) = Just f getField _ = Nothing editingTitle :: Mode -> Bool ed...
null
https://raw.githubusercontent.com/smallhadroncollider/taskell/3c731476e9a58ede300cfa83aba412509b132a3e/src/Taskell/UI/Draw/Mode.hs
haskell
module Taskell.UI.Draw.Mode where import ClassyPrelude import Taskell.Events.State.Types.Mode (InsertType (..), ModalType (..), Mode (..)) import Taskell.UI.Draw.Field (Field) getField :: Mode -> Maybe Field getField (Insert _ _ f) = Just f getField _ = Nothing editingTitle :: Mode -> Bool ed...
9f00d60c9f6a3c4f755c869bd03fc032b5d22a1775c9e48faf2a47ed01662edd
mbenke/zpf2013
sin.hs
# LANGUAGE ForeignFunctionInterface # module FfiExample where import Foreign.C -- get the C types -- pure function foreign import ccall "math.h sin" c_sin :: CDouble -> CDouble mysin :: Double -> Double mysin d = realToFrac (c_sin (realToFrac d))
null
https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Code/FFI/sin.hs
haskell
get the C types pure function
# LANGUAGE ForeignFunctionInterface # module FfiExample where foreign import ccall "math.h sin" c_sin :: CDouble -> CDouble mysin :: Double -> Double mysin d = realToFrac (c_sin (realToFrac d))
f67389028e9d979463381c4e52beac44da043c61ec5ea0b3c585d3ba5ffc0b48
huangz1990/SICP-answers
test-37-matrix-*-vector.scm
(load "test-manager/load.scm") (load "37-matrix-*-vector.scm") (define m (list (list 1 2 3 4) (list 4 5 6 6) (list 6 7 8 9))) (define v (list 1 2 3 4)) (define-each-check (equal? (matrix-*-vector m v) (list 30 56 80)) ) (run-registered-tests)
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/test-37-matrix-*-vector.scm
scheme
(load "test-manager/load.scm") (load "37-matrix-*-vector.scm") (define m (list (list 1 2 3 4) (list 4 5 6 6) (list 6 7 8 9))) (define v (list 1 2 3 4)) (define-each-check (equal? (matrix-*-vector m v) (list 30 56 80)) ) (run-registered-tests)
93b38f2fb530cc918cc079b24a0d8a00a75edb78f2d51edf286de57020d00481
scheme/scsh
strings-and-chars-test.scm
(add-test! 'file-name-sans-extension 'string-and-chars (lambda () (and (string=? (file-name-sans-extension ".scm") ".scm") (string=? (file-name-sans-extension "/.scm") "/.scm") (string=? (file-name-sans-extension "a/.scm") "a/.scm") (string=? (file-name-sans-extension "t.scm") "t") (string=? (...
null
https://raw.githubusercontent.com/scheme/scsh/114432435e4eadd54334df6b37fcae505079b49f/test/strings-and-chars-test.scm
scheme
(add-test! 'file-name-sans-extension 'string-and-chars (lambda () (and (string=? (file-name-sans-extension ".scm") ".scm") (string=? (file-name-sans-extension "/.scm") "/.scm") (string=? (file-name-sans-extension "a/.scm") "a/.scm") (string=? (file-name-sans-extension "t.scm") "t") (string=? (...
c88a9ffc99ccc23e11d754604ec396b5d808042bf7728ea82ae4e499676a3675
planetfederal/signal
processor.clj
Copyright 2016 - 2018 Boundless , ;; 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 distribute...
null
https://raw.githubusercontent.com/planetfederal/signal/e3eae56c753f0a56614ba8522278057ab2358c96/src/signal/components/processor.clj
clojure
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 2016 - 2018 Boundless , distributed under the License is distributed on an " AS IS " BASIS , (ns signal.components.processor (:require [com.stuartsierra.component :as component] [clojure.tools.logging :as log] [signal.components.database :as db] [signal.components.n...
c93557649a393bfdae1adf361e63ae495b2e0f641b4d15de36455a47187ecfa1
wireless-net/erlang-nommu
ssh_connection.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 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/ssh/src/ssh_connection.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 2008 - 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 " -module(ssh_connection). -include("ssh....
21cae80901ae07dcbcca9fc2fb48b80b31cc8a0c70ba28446ced7349adf117da
ocaml-sf/learn-ocaml-corpus
test.ml
open Report open Test_lib let sample_queue () = let l1 = sample_list sample_int () in let l2 = sample_list sample_int () in (l1, l2) let exercise_1 = Section ([ Text "Exercise 1: " ; Code "is_empty" ], test_function_1_against_solution [%ty: queue -> bool] "is_empty" [ ([],...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/mooc/week3/seq1/ex1/test.ml
ocaml
open Report open Test_lib let sample_queue () = let l1 = sample_list sample_int () in let l2 = sample_list sample_int () in (l1, l2) let exercise_1 = Section ([ Text "Exercise 1: " ; Code "is_empty" ], test_function_1_against_solution [%ty: queue -> bool] "is_empty" [ ([],...
c55e2c3850b08edacb11c10d03e0b5931d4ae5f3423b3352f25d475712fa9674
ferd/merklet
merklet_bench.erl
-module(merklet_bench). %% API exports -export([build/1, catch_up_diff/1, rewrite_diff/1]). %%==================================================================== %% API functions %%==================================================================== build([N, Tries]) -> Pairs = pairs(N), BO = eministat:s("bu...
null
https://raw.githubusercontent.com/ferd/merklet/cf2b12a888d0cc0e753da8247c0d55a96c3b134f/bench/merklet_bench/src/merklet_bench.erl
erlang
API exports ==================================================================== API functions ==================================================================== ==================================================================== ==================================================================== Generate `N' ke...
-module(merklet_bench). -export([build/1, catch_up_diff/1, rewrite_diff/1]). build([N, Tries]) -> Pairs = pairs(N), BO = eministat:s("build-old", fun() -> build(merklet_old, Pairs) end, Tries), BN = eministat:s("build-new", fun() -> build(merklet, Pairs) end, Tries), BA = eministat:s("build-array", fu...
d419d9f416492cfcc9d5e68253df097a8c13a9bbed13ec794ec6255e21eeffc3
serokell/importify
Bool.hs
| Extended utilities for ' ' type . module Extended.Data.Bool ( (==>) ) where import Universum -- | Logical implication. (==>) :: Bool -> Bool -> Bool False ==> _ = True True ==> x = x infixr 4 ==>
null
https://raw.githubusercontent.com/serokell/importify/09f31d851b2152ae6ce880b81abc3554ade29f37/src/Extended/Data/Bool.hs
haskell
| Logical implication.
| Extended utilities for ' ' type . module Extended.Data.Bool ( (==>) ) where import Universum (==>) :: Bool -> Bool -> Bool False ==> _ = True True ==> x = x infixr 4 ==>
03e7a169804b20b72954ca5053d4b6a66634523a95e7b8754715af8c60b01e25
cark/cark.behavior-tree
until_failure.cljc
(ns cark.behavior-tree.node-defs.until-failure "The :until-failure node refreshes and reruns its child node until it fails, and then returns :success" (:require [cark.behavior-tree.context :as ctx] [cark.behavior-tree.db :as db] [cark.behavior-tree.tree :as tree] [cark.behav...
null
https://raw.githubusercontent.com/cark/cark.behavior-tree/4e229fcc2ed3af3c66e74d2c51dda6684927d254/src/main/cark/behavior_tree/node_defs/until_failure.cljc
clojure
(ns cark.behavior-tree.node-defs.until-failure "The :until-failure node refreshes and reruns its child node until it fails, and then returns :success" (:require [cark.behavior-tree.context :as ctx] [cark.behavior-tree.db :as db] [cark.behavior-tree.tree :as tree] [cark.behav...
24eddcf78788fa1bcdce70419bdebd3e5a34c844ff4a503327254228bcb7693e
Andromedans/andromeda
andromeda.ml
(** Andromeda main program *) (** Possible locations of prelude file *) type prelude = | PreludeNone | PreludeDefault | PreludeFile of string (** Location of the prelude file *) let prelude_file = ref PreludeDefault (** Should the interactive shell be run? *) let interactive_shell = ref true (** The command-l...
null
https://raw.githubusercontent.com/Andromedans/andromeda/a5c678450e6c6d4a7cd5eee1196bde558541b994/archive/old-andromeda/andromeda.ml
ocaml
* Andromeda main program * Possible locations of prelude file * Location of the prelude file * Should the interactive shell be run? * The command-line wrappers that we look for. * The usage message. * The help text printed when [#help] is used. * A list of files to be loaded and run, together with information on...
type prelude = | PreludeNone | PreludeDefault | PreludeFile of string let prelude_file = ref PreludeDefault let interactive_shell = ref true let wrapper = ref (Some ["rlwrap"; "ledit"]) let usage = "Usage: andromeda [option] ... [file] ..." let help_text = "Toplevel directives: #context .... print current c...
5e2f88a076bb53cad5d30e936951095e897b1c8f6ab7ecff12436b130d3e15e9
dm3/sicp
e2_63_to_66.clj
(ns e2-63-to-66 (:use clojure.test)) ; Tree accessors and a constructor (defn entry [t] (first t)) (defn left-branch [t] (second t)) (defn right-branch [t] (second (rest t))) (defn make-tree ([e] [e [] []]) ([e l r] [e l r])) 2.63 ; a) (defn tree->list-1 [t] (if (empty? t) [] (concat (tree->...
null
https://raw.githubusercontent.com/dm3/sicp/14f0361cbd0cce817d93e38dcc895f3e845515b1/src/main/clojure/e2_63_to_66.clj
clojure
Tree accessors and a constructor a) tree which spawns a tree-recursive process. That's exactly how I'd do the process) as it keeps the state of the list in an additional argument. Let's see how these functions flatten actual trees: / \ / \ / \ / \ \ / \ / / \ ...
(ns e2-63-to-66 (:use clojure.test)) (defn entry [t] (first t)) (defn left-branch [t] (second t)) (defn right-branch [t] (second (rest t))) (defn make-tree ([e] [e [] []]) ([e l r] [e l r])) 2.63 (defn tree->list-1 [t] (if (empty? t) [] (concat (tree->list-1 (left-branch t)) (c...
b8784a5f4d863ebf779cda9ab70e256ff8c808e104ec9398600fb2a467c829c9
remyzorg/pendulum
pendulum_misc.ml
open Migrate_parsetree open Ast_405 open Ast_helper open Compiler module Ast = Grc2ml.Ast let string_const ident = let open Ast in Exp.constant ~loc:ident.loc @@ Const.string ident.content (* Exp.constant ~loc:ident.loc (Const_string (ident.content, None)) *) let expr_of_ast e = let open Ast in let open ...
null
https://raw.githubusercontent.com/remyzorg/pendulum/a532681c6f99d77129e31fbe27cc56c396a7c63c/src/ppx/pendulum_misc.ml
ocaml
Exp.constant ~loc:ident.loc (Const_string (ident.content, None))
open Migrate_parsetree open Ast_405 open Ast_helper open Compiler module Ast = Grc2ml.Ast let string_const ident = let open Ast in Exp.constant ~loc:ident.loc @@ Const.string ident.content let expr_of_ast e = let open Ast in let open Ast.Derived in let rec visit e = begin match e.content with | N...
ee864f868a36a885eb2415e47ad2f801202aa9410a318c0d7908cef63132872c
herbelin/coq-hh
equality.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/tactics/equality.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i i true = support rewriting depend...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Util open Names open Ter...
0b3846fd4860b1d802c52776c5115ae1ca2ddb99831b437ab464e1a877c71410
hipsleek/hipsleek
term.ml
#include "xdebug.cppo" open VarGen module CP = Cpure module CF = module MCP = Mcpure open Gen.Basic open Globals open Others open Cprinter open Cpure open Cformula open TermUtils type phase_trans = int * int (* Transition on termination annotation with measures (if any) *) type term_ann_trans = (term_ann * exp li...
null
https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/term.ml
ocaml
Transition on termination annotation with measures (if any) Transition on program location * src: post_pos * dst: proving_loc The variance is not well-founded The variance is well-founded Reason for error The termination can only be determined when * a base case or an infinite loop is reached used for...
#include "xdebug.cppo" open VarGen module CP = Cpure module CF = module MCP = Mcpure open Gen.Basic open Globals open Others open Cprinter open Cpure open Cformula open TermUtils type phase_trans = int * int type term_ann_trans = (term_ann * exp list) * (term_ann * exp list) type term_trans_loc = loc * loc typ...
14740c63a6a8a6e57c3bac7fda183084770f6a4a7d6b5efa9882fc861d3c4131
pavlobaron/ErlangOTPBookSamples
sum7.erl
-module(sum7). -export([sum_redirect/2]). -import(sum6, [sum/2]). sum_redirect(X, Y) -> sum(X, Y).
null
https://raw.githubusercontent.com/pavlobaron/ErlangOTPBookSamples/50094964ad814932760174914490e49618b2b8c2/sprache/sum7.erl
erlang
-module(sum7). -export([sum_redirect/2]). -import(sum6, [sum/2]). sum_redirect(X, Y) -> sum(X, Y).
7d19f8629218a570fbda4e3c39c97c17b21713240f6a4e0b71bf7af2649de6c8
haskell-tools/haskell-tools
StandaloneDeriving.hs
# LANGUAGE StandaloneDeriving # module Decl.StandaloneDeriving where data WrapStr = WrapStr String deriving instance Eq WrapStr
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/refactor/examples/Decl/StandaloneDeriving.hs
haskell
# LANGUAGE StandaloneDeriving # module Decl.StandaloneDeriving where data WrapStr = WrapStr String deriving instance Eq WrapStr
203f96ec22c975f2e27932c85d9efcdc08d1b94af65d9780746a25a2419fa2c9
CryptoKami/cryptokami-core
Types.hs
# LANGUAGE TypeFamilies # -- | Types used for managing of transactions -- and synchronization with database. module Pos.Txp.Toil.Types ( Utxo , formatUtxo , utxoF , GenesisUtxo (..) , _GenesisUtxo , TxFee(..) , MemPool (..) , mpLocalTxs , mpSize ,...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/txp/Pos/Txp/Toil/Types.hs
haskell
| Types used for managing of transactions and synchronization with database. -------------------------------------------------------------------------- -------------------------------------------------------------------------- | Unspent transaction outputs. Transaction inputs are identified by (transaction ID, ind...
# LANGUAGE TypeFamilies # module Pos.Txp.Toil.Types ( Utxo , formatUtxo , utxoF , GenesisUtxo (..) , _GenesisUtxo , TxFee(..) , MemPool (..) , mpLocalTxs , mpSize , TxMap , StakesView (..) , svStakes , svTotal , UndoMap...
1349b4402a97d030dca752ca19f87ddd72c386041a85ecc6a285881e179d1a13
kahua/Kahua
check.scm
#!/usr/bin/env gosh -*- mode : scheme ; coding : utf-8 -*- ;; ;; script checking version and threading type. (use gauche.threads) (use gauche.version) (define (print-usage args) (with-output-to-port (current-error-port) (lambda () (format #t "Usage: ~a <version>" (car args))))) (define (main args) (c...
null
https://raw.githubusercontent.com/kahua/Kahua/c90fe590233e4540923e4e5cc9f61da32873692c/check.scm
scheme
coding : utf-8 -*- script checking version and threading type.
#!/usr/bin/env gosh (use gauche.threads) (use gauche.version) (define (print-usage args) (with-output-to-port (current-error-port) (lambda () (format #t "Usage: ~a <version>" (car args))))) (define (main args) (cond ((null? (cdr args)) (print-usage args) 70) ((version<? (gauche-version) (cadr args...
fabccfcbfd72c63e893468e625e5e152aa252cde1f27698069b0e4ee6e20af29
emanjavacas/cosycat
utils.cljs
(ns cosycat.backend.handlers.utils) (defn get-query "get query from query results summary for :query dispatches" [db project-name] (get-in db [:projects project-name :session :query :results :results-summary :query-str])) (defn get-corpus-param "get corpus from query results summary for :query dispatches and ...
null
https://raw.githubusercontent.com/emanjavacas/cosycat/a7186363d3c0bdc7b714af126feb565f98793a6e/src/cljs/cosycat/backend/handlers/utils.cljs
clojure
(ns cosycat.backend.handlers.utils) (defn get-query "get query from query results summary for :query dispatches" [db project-name] (get-in db [:projects project-name :session :query :results :results-summary :query-str])) (defn get-corpus-param "get corpus from query results summary for :query dispatches and ...
ca1f511d5e82ff47a40d32a22695a3a87631d2015d3646c719e3dd10710ec0e4
michalkonecny/aern2
Analytic.hs
module AERN2.Analytic ( module AERN2.Analytic.Type , anaSin , anaGeom ) where import MixedTypesNumPrelude import AERN2.Real import Data.List import AERN2.Analytic.Type anaSin :: Analytic anaSin = Analytic 3 1 an where iFact n = foldl' (/!) (real 1) (map real (reverse [2 .. n])) an n = if even n then ...
null
https://raw.githubusercontent.com/michalkonecny/aern2/1c8f12dfcb287bd8e3353802a94865d7c2c121ec/aern2-fun-univariate/src/AERN2/Analytic.hs
haskell
module AERN2.Analytic ( module AERN2.Analytic.Type , anaSin , anaGeom ) where import MixedTypesNumPrelude import AERN2.Real import Data.List import AERN2.Analytic.Type anaSin :: Analytic anaSin = Analytic 3 1 an where iFact n = foldl' (/!) (real 1) (map real (reverse [2 .. n])) an n = if even n then ...
1c85fb6d5e9263ae136b2e0d3600efb10a0c34298c675ce3397fac5926b7eb58
dmitryvk/sbcl-win32-threads
pred.lisp
;;;; the VM definition of predicate VOPs for the Alpha This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The software is in the ...
null
https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/compiler/alpha/pred.lisp
lisp
the VM definition of predicate VOPs for the Alpha 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. The unconditional branch, emitted when we can't drop through to the desired destination. De...
This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB!VM") the Branch VOP (define-vop (branch) (:info dest) (:generator 5 (inst br zero-tn dest))) ...
356f4fb899f7c9e2f6ce3453a63a9c107c9e397d00e93ac32f13b5dfd4c9aabb
reactive-systems/syfco
Data.hs
----------------------------------------------------------------------------- -- | -- Module : Writer.Data License : MIT ( see the LICENSE file ) Maintainer : ( ) -- -- Common data used by the writer module. -- ----------------------------------------------------------------------------- # LANG...
null
https://raw.githubusercontent.com/reactive-systems/syfco/603bbdba1c4902674165714516eea7b6dacbd155/src/lib/Writer/Data.hs
haskell
--------------------------------------------------------------------------- | Module : Writer.Data Common data used by the writer module. --------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------...
License : MIT ( see the LICENSE file ) Maintainer : ( ) # LANGUAGE LambdaCase , MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances # LambdaCase , MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #-} module Writer.Data ( WriteMode...
67dc95e7a5cc84c0c7358a51812f7699164ce1b8ac9c428ef595ba34581ac0c5
Clozure/ccl-tests
format-x.lsp
;-*- Mode: Lisp -*- Author : Created : Sun Aug 1 06:51:34 2004 ;;;; Contains: Tests of ~X format directive (in-package :cl-test) (compile-and-load "printer-aux.lsp") (deftest format.x.1 (let ((fn (formatter "~x"))) (with-standard-io-syntax (loop for x = (ash 1 (+ 2 (random 80))) for i...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/format-x.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of ~X format directive Comma tests Must add tests for non-integers when the parameters are specified, but it's not clear what the meaning is. Are comma-char and comma-interval always ignored? # arguments Randomized test
Author : Created : Sun Aug 1 06:51:34 2004 (in-package :cl-test) (compile-and-load "printer-aux.lsp") (deftest format.x.1 (let ((fn (formatter "~x"))) (with-standard-io-syntax (loop for x = (ash 1 (+ 2 (random 80))) for i = (- (random (+ x x)) x) for s1 = (format nil "~X" i) for s...
1dc6710aa66a667feba55c2129be7dca94d37f50ecedd0dd2730965a4b3936e2
andelf/erlang-proxy
proxy_server_app.erl
-module(proxy_server_app). -behaviour(application). %% Application callbacks -export([start/2, stop/1]). %% =================================================================== %% Application callbacks %% =================================================================== start(_StartType, _StartArgs) -> proxy_s...
null
https://raw.githubusercontent.com/andelf/erlang-proxy/d3c6d7ba8825ba7fd438bef5d1e41aa5eae5d872/apps/proxy_server/src/proxy_server_app.erl
erlang
Application callbacks =================================================================== Application callbacks ===================================================================
-module(proxy_server_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> proxy_server_sup:start_link(). stop(_State) -> ok.
82230b384fb1a9dd22d7dede9c749bfe110ad7eb60f7f775eaeaa15ed8c9b2c5
simingwang/emqx-plugin-kafkav5
kpro_sasl.erl
%%% Copyright ( c ) 2018 - 2021 , Klarna Bank AB ( publ ) %%% 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 ...
null
https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/lib/kafka_protocol/src/kpro_sasl.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language g...
Copyright ( c ) 2018 - 2021 , Klarna Bank AB ( publ ) Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , for authentication . -module(kpro_sasl). -export([ auth/7 ]). -include("kpro_private.hrl"). -define...
89092632f3df0f1ecbbcb79119a8123f15137a28347b010e4d522990cd70e756
psilord/option-9
events.lisp
(in-package :option-9) #+option-9-debug (declaim (optimize (safety 3) (space 0) (speed 0) (debug 3))) ;; This will end up being the event handler that will dispatch events from SDL into the game engine . (defclass dispatcher () ()) #| :quit left joystick :fly-left :fly-right :fly-forward :fly-backward right ...
null
https://raw.githubusercontent.com/psilord/option-9/44d96cbc5543ee2acbdcf45d300207ef175462bc/events.lisp
lisp
This will end up being the event handler that will dispatch events :quit left joystick :fly-left :fly-right :fly-forward :fly-backward right joystick :start-charge-main-gun :end-charge-main-gun :shoot-main-gun :start-charge-secondary-gun :end-charge-secondary-gun :shoot-secondary-gun :pause :drop-mine
(in-package :option-9) #+option-9-debug (declaim (optimize (safety 3) (space 0) (speed 0) (debug 3))) from SDL into the game engine . (defclass dispatcher () ())
75363853094464f020930273270031a52b265bddd5a6196727789fbaf62e1cc4
ngorogiannis/cyclist
soundcheck.ml
open Lib open Parsers external create_aut : int -> unit = "create_aut" external destroy_aut : unit -> unit = "destroy_aut" external create_vertex : int -> unit = "create_vertex" external tag_vertex : int -> int -> unit = "tag_vertex" external set_successor : int -> int -> unit = "set_successor" external set_trace...
null
https://raw.githubusercontent.com/ngorogiannis/cyclist/c93a168d586b308ab2a2c730cd1b2375ab263167/src/generic/soundcheck.ml
ocaml
if a parent points to the child of the node to be fused then we would run into difficulties when updating that parent to point directly to the grandchild, so we avoid that altogether check global soundness condition on proof init is a node in the proof For all nodes n in the proof For all premises i of n ...
open Lib open Parsers external create_aut : int -> unit = "create_aut" external destroy_aut : unit -> unit = "destroy_aut" external create_vertex : int -> unit = "create_vertex" external tag_vertex : int -> int -> unit = "tag_vertex" external set_successor : int -> int -> unit = "set_successor" external set_trace...
ffef8176962e80e79ed01a4b05cc9e18507a72fb9bb7319cb43163fabc065310
ejgallego/dfuzz
constr.mli
open Syntax open Ctx open Support.FileInfo (* Type of constraints generated by the type-checker when verifying subtyping. A constraint has the form φ ⇒ R ≤ R' where φ is a list of equality constraints (S = S') between size expressions, and R and R' are sensitivity expressions. *) type constr = { c_...
null
https://raw.githubusercontent.com/ejgallego/dfuzz/09b408e4f917cdd6945bdc20b7dd325ff80e5843/src/constr.mli
ocaml
Type of constraints generated by the type-checker when verifying subtyping. A constraint has the form φ ⇒ R ≤ R' where φ is a list of equality constraints (S = S') between size expressions, and R and R' are sensitivity expressions. Kinding context for the expressions The smaller side in the inequal...
open Syntax open Ctx open Support.FileInfo type constr = { c_info : info; c_kind_ctx : kind ctx; List of equality constraints between size expressions . Intended invariant : all variables have kind under the kinding context . invariant: all variables have kind Size under the kinding ...
d85a41d7ef563f9c5a772221f2d593f09bdfb0389df375063a5dc686359e3b24
rtoy/ansi-cl-tests
readtablep.lsp
;-*- Mode: Lisp -*- Author : Created : Sat Jan 1 19:19:42 2005 Contains : Tests of (in-package :cl-test) (deftest readtablep.1 (and (not (readtablep nil)) (not (readtablep 'a)) (not (readtablep 0)) (not (readtablep 1/2)) (not (readtablep 1.2)) (not ...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/readtablep.lsp
lisp
-*- Mode: Lisp -*- Error tests
Author : Created : Sat Jan 1 19:19:42 2005 Contains : Tests of (in-package :cl-test) (deftest readtablep.1 (and (not (readtablep nil)) (not (readtablep 'a)) (not (readtablep 0)) (not (readtablep 1/2)) (not (readtablep 1.2)) (not (readtablep 1.2s2)) ...
cffa6a62d57372636f7de603ebd681d39ac99b3c25162323f0faaf6d39b45b04
BinaryAnalysisPlatform/bap
bap_byteweight.ml
open Core_kernel[@@warning "-D"] open Bap.Std module type Corpus = sig type t type key val look : t -> length:int -> int -> key option end module type S = sig type t [@@deriving bin_io, sexp] type key type corpus val create : unit -> t val train : t -> max_length:int -> (key -> bool) -> corpus -> uni...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/bap_byteweight/bap_byteweight.ml
ocaml
open Core_kernel[@@warning "-D"] open Bap.Std module type Corpus = sig type t type key val look : t -> length:int -> int -> key option end module type S = sig type t [@@deriving bin_io, sexp] type key type corpus val create : unit -> t val train : t -> max_length:int -> (key -> bool) -> corpus -> uni...
6889785d1e487fbe6675933c1313d43e1a8e3bbfaef50aaf7af0e78408d2fc3e
rsnikhil/Forvis_RISCV-ISA-Spec
ALU.hs
Copyright ( c ) 2018 -- See LICENSE for license details module ALU where -- ================================================================ -- This module defines various RISC-V ALU functions. -- ================================================================ Standard Haskell imports import Data.Bits -- P...
null
https://raw.githubusercontent.com/rsnikhil/Forvis_RISCV-ISA-Spec/0c5590a12f4b39644d0497fa6285ad5e33003dfc/ZZ_OLD/v3/ALU.hs
haskell
See LICENSE for license details ================================================================ This module defines various RISC-V ALU functions. ================================================================ Project imports ================================================================ EQ: test for equalit...
Copyright ( c ) 2018 module ALU where Standard Haskell imports import Data.Bits import Bit_Utils # INLINE alu_eq # alu_eq :: Int -> Integer -> Integer -> Bool alu_eq xlen rs1_val rs2_val = let 0xFFFF_FFFF or 0xFFFF_FFFF_FFFF_FFFF u1 = rs1_val .&. mask_xlen u2 = rs2_val .&. ...
b5187fa3e4fef7842f8671ff809abad6161e9c7d652926454d37b2a3142f13d7
justinethier/nugget
call-cc.scm
;; Example of an escape continuation (call/cc (lambda (return) (begin (display 1) (display 2) (return 2) (display 3) (display 4))))
null
https://raw.githubusercontent.com/justinethier/nugget/0c4e3e9944684ea83191671d58b5c8c342f64343/cyclone/tests/call-cc.scm
scheme
Example of an escape continuation
(call/cc (lambda (return) (begin (display 1) (display 2) (return 2) (display 3) (display 4))))
bf4a280562bd93bb1c2430b2d953e9f52533ddcedbca1fbd25cf930477ec7abf
learnuidev/reagent-reposh-realworld
profile.cljs
(ns app.profile (:require [reagent.core :as r] [reitit.frontend.easy :as rfe] [app.api :refer [api-uri get-auth-header]] [clojure.string :as s] [ajax.core :refer [GET POST PUT DELETE json-request-format json-response-format]])) (defonce profile-state (r/atom nil)) (def...
null
https://raw.githubusercontent.com/learnuidev/reagent-reposh-realworld/54ce08d4a196e2a0ece1e485065cd30a3ccf2aac/src/app/profile.cljs
clojure
testing follow user follow user
(ns app.profile (:require [reagent.core :as r] [reitit.frontend.easy :as rfe] [app.api :refer [api-uri get-auth-header]] [clojure.string :as s] [ajax.core :refer [GET POST PUT DELETE json-request-format json-response-format]])) (defonce profile-state (r/atom nil)) (def...
b62bbc0b9fc0a32ab04f8b12fba9a2250be04384d0adf00c9b99f311ce383f73
vlstill/hsExprTest
simple-4.nok.hs
f _ 0 = 0 f m n = m `mod` n
null
https://raw.githubusercontent.com/vlstill/hsExprTest/391fc823c1684ec248ac8f76412fefeffb791865/test/simple-4.nok.hs
haskell
f _ 0 = 0 f m n = m `mod` n
04396cf74da68cf366b7f1d77edd5f177e57282b2f4ee616cfb1b7ae0c5019b0
egison/sweet-egison
QQ.hs
-- | -- Module : Control . . QQ -- Description: Quasi-quoter to construct queries -- Stability: experimental -- -- This module provides 'QuasiQuoter' that builds 'Query' from nice pattern expressions. {-# LANGUAGE CPP #-} # LANGUAGE TemplateHaskell # module Control.Egison.QQ ( mc , PP(..) ...
null
https://raw.githubusercontent.com/egison/sweet-egison/fd3b392f9a2993bbc59d541b61f6641c7d193d6e/src/Control/Egison/QQ.hs
haskell
| Description: Quasi-quoter to construct queries Stability: experimental This module provides 'QuasiQuoter' that builds 'Query' from nice pattern expressions. # LANGUAGE CPP # imports to create 'Name' in compilation main | Quasi-quoter for pattern expressions. PROBLEM: Ad-hoc optimization PROBL...
Module : Control . . QQ # LANGUAGE TemplateHaskell # module Control.Egison.QQ ( mc , PP(..) ) where import Control.Monad ( MonadPlus(..) ) import Control.Monad.Search ( MonadSearch(..) ) import Data.Maybe ( mapMaybe ) import...
929d307f99e32232c445b3746b3c805f2b3029fd93cc0b7db158c992a3f0484f
kennknowles/aspcc
AspAst.ml
* A module containing the syntax for ASP / VbScript pages , including all inlining and server - side includes ( we have to emulate IIS 's way of doing them ) all inlining and server-side includes (we have to emulate IIS's way of doing them) *) * { 4 Expressions } type binary_operator = | Concat | Add | Subtrac...
null
https://raw.githubusercontent.com/kennknowles/aspcc/951a91cc21e291b1d3c750bbbca7fa79209edd08/parsed/AspAst.ml
ocaml
* The types of identifiers * A single, simple, name * Dereferencing a field of an object * Indexing into an object; function apps also look like this * TODO: make this a standard lib function, instead of syntactic construct. * not a CompoundStatement because it isn't control flow * not correct, but easy enough for...
* A module containing the syntax for ASP / VbScript pages , including all inlining and server - side includes ( we have to emulate IIS 's way of doing them ) all inlining and server-side includes (we have to emulate IIS's way of doing them) *) * { 4 Expressions } type binary_operator = | Concat | Add | Subtrac...
ac774893c35b0a8eb21386f3b8d32d3b9d87fbe73611c5a3753bd12d72ab3cc9
mbutterick/fontland
cff-pointer.rkt
#lang debug racket/base (require racket/class racket/list xenomorph/pointer xenomorph/base "cff-struct.rkt") (provide CFFPointer CFFPointer%) #| approximates |# (define (CFFPointer type #:relative-to [relative-to 'global] #:lazy [lazy #false]) (x:pointer #:dest-type type ...
null
https://raw.githubusercontent.com/mbutterick/fontland/e50e4c82f58e2014d64e87a14c1d29b546fb393b/fontland/table/cff/cff-pointer.rkt
racket
approximates
#lang debug racket/base (require racket/class racket/list xenomorph/pointer xenomorph/base "cff-struct.rkt") (provide CFFPointer CFFPointer%) (define (CFFPointer type #:relative-to [relative-to 'global] #:lazy [lazy #false]) (x:pointer #:dest-type type #:base-cl...
5db72fd576147f9ea48835c2016d1310d3d14a9d684805375138524f1b5c8265
NetComposer/nklib
nklib_throttle.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2019 . All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the...
null
https://raw.githubusercontent.com/NetComposer/nklib/1f29f8f566586618651e4680dcc488f2dc11ff5c/src/nklib_throttle.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2019 . All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(nklib_throttle). -au...
f9654e47316e75b9df72edb6340e671f9bee7afd25a670f2611ece88329bd899
andersfugmann/aws-s3
s3.mli
* S3 functions All function requires a [ region ] , [ scheme ] and [ credentials ] . The default region is [ Us_east_1 ] . The default scheme is [ http ] . If you are connecting from outside AWS , it is strongly recommended that you use https . To use https , make sure to have the releva...
null
https://raw.githubusercontent.com/andersfugmann/aws-s3/0308809b2a1bfbe3b62b16ef445f63543706786d/aws-s3/s3.mli
ocaml
* Meta headers. If None, the information was not retrieved. * The type of S3 requests. [credentials] refers to AWS credentials, as created by [Credentials.make]. [connect_timeout_ms] specifies the request timeout, in milliseconds. If [confirm_requester_pays], caller acknowledges that it will pay AW...
* S3 functions All function requires a [ region ] , [ scheme ] and [ credentials ] . The default region is [ Us_east_1 ] . The default scheme is [ http ] . If you are connecting from outside AWS , it is strongly recommended that you use https . To use https , make sure to have the releva...
253a3b00034b6d2f25a06606cb5edee4957a07c86241356b81c4e8183c9e0327
herd/herdtools7
myName.ml
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/0a4e39a86dc3fb1c1900b1ae331b27e718a056dc/litmus/myName.ml
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2010 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
74fa1f183d18dafcea73894c4aa8ac7052b26b1d21b2d204e9884d46494fb7fd
tonyg/racket-abnf
greedy-6spaces.rkt
#lang abnf @greedy-repetition S = 2*4SP *2SP SP = %x20
null
https://raw.githubusercontent.com/tonyg/racket-abnf/1079bc5b30a227f52ac00a84dc3fcd539da5f8db/abnf/private/greedy-6spaces.rkt
racket
#lang abnf @greedy-repetition S = 2*4SP *2SP SP = %x20
b4f612aa19ddc474fdb222dbcc3ca3d7d685ac60afb74a0f61586945e70b772d
c-cube/ocaml-containers
CCMap.mli
(* This file is free software, part of containers. See file "license" for more details. *) * Extensions of Standard Map Provide useful functions and iterators on [ Map . S ] @since 0.5 Provide useful functions and iterators on [Map.S] @since 0.5 *) type 'a iter = ('a -> unit) -> unit * Fast inte...
null
https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/src/core/CCMap.mli
ocaml
This file is free software, part of containers. See file "license" for more details. * [get k m] returns [Some v] if the current binding of [k] in [m] is [v], or [None] if the key [k] is not present. Safe version of {!find}. * [update k f m] calls [f (Some v)] if [find k m = v], otherwise it calls ...
* Extensions of Standard Map Provide useful functions and iterators on [ Map . S ] @since 0.5 Provide useful functions and iterators on [Map.S] @since 0.5 *) type 'a iter = ('a -> unit) -> unit * Fast internal iterator . @since 2.8 @since 2.8 *) type 'a printer = Format.formatter -> '...
582016cefe44a350d9848afa1a4eb409a3c4024aa9a638416406f7d7cbb29294
folivetti/Category4Programmers
Algebra.hs
module Algebra where -- | Recursion Scheme Algebra type Algebra f a = f a -> a type Coalgebra f a = a -> f a newtype Fix f = Fix { unfix :: (f (Fix f)) } cata :: Functor f => (f a -> a) -> Fix f -> a cata alg = alg . fmap (cata alg) . unfix ana :: Functor f => (a -> f a) -> a -> Fix f ana coalg = Fix . fmap (ana co...
null
https://raw.githubusercontent.com/folivetti/Category4Programmers/b002b7eeeddf272ca94bd2467db535e0ad268176/Algebra/Algebra.hs
haskell
| Recursion Scheme Algebra
module Algebra where type Algebra f a = f a -> a type Coalgebra f a = a -> f a newtype Fix f = Fix { unfix :: (f (Fix f)) } cata :: Functor f => (f a -> a) -> Fix f -> a cata alg = alg . fmap (cata alg) . unfix ana :: Functor f => (a -> f a) -> a -> Fix f ana coalg = Fix . fmap (ana coalg) . coalg hylo :: Functor ...
7c6717fb943a3f14b69469d1e0c08acc68b9692b786097abb68eccf18c63ab21
s-expressionists/Cleavir
packages.lisp
(defpackage #:cleavir-example (:use #:cl) (:local-nicknames (#:abstract-interpreter #:cleavir-abstract-interpreter) (#:ast-to-bir #:cleavir-ast-to-bir) (#:attributes #:cleavir-attributes) (#:bir #:cleavir-bir) (#:bir-transformations #:c...
null
https://raw.githubusercontent.com/s-expressionists/Cleavir/f4f38868bc86c1d0de44e75375f9dcb253730ee4/Example/packages.lisp
lisp
(defpackage #:cleavir-example (:use #:cl) (:local-nicknames (#:abstract-interpreter #:cleavir-abstract-interpreter) (#:ast-to-bir #:cleavir-ast-to-bir) (#:attributes #:cleavir-attributes) (#:bir #:cleavir-bir) (#:bir-transformations #:c...