_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
926f1124c133b7a01d1899084d6e94fcc0c482373f3bb3f977800c3121e4a20f
ygmpkk/house
Main.hs
module Main where -- ************************************************************************************************** -- A program that creates two interactive processes that bounce balls in an open - ended barrel . -- The program has been written in Clean 1.3.2 and uses the Clean Standard Object I / O ...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/hslibs/object-io/Examples/Bounce/Main.hs
haskell
************************************************************************************************** ************************************************************************************************** The message type: balls that have crossed process border the other bounce process has been created quit ...
module Main where A program that creates two interactive processes that bounce balls in an open - ended barrel . The program has been written in Clean 1.3.2 and uses the Clean Standard Object I / O library 1.2 import Graphics.UI.ObjectIO import BounceTypes import BounceDraw = Bounce } main...
9bdaf40afe314d0615b363855c2a8145865c70987663fe3a7b436ffbfdd02c05
ocaml-community/ocamlscript
std.ml
module Common = Common module Pipeline = Pipeline module Ocaml = Ocaml module Utils = Utils let (--) _ _ = ()
null
https://raw.githubusercontent.com/ocaml-community/ocamlscript/df0f04d7e41655944bd14e6989dd695425e5f871/std.ml
ocaml
module Common = Common module Pipeline = Pipeline module Ocaml = Ocaml module Utils = Utils let (--) _ _ = ()
b1cc6b66cd03905aa3b06af61bedc58a8710b0cf67b747a13b51a363f619988c
cyverse-archive/DiscoveryEnvironmentBackend
manifest.clj
(ns donkey.services.filesystem.manifest (:use [clojure-commons.error-codes] [clojure-commons.validators] [donkey.services.filesystem.common-paths] [donkey.services.filesystem.validators] [donkey.services.filesystem.sharing :only [anon-file-url anon-readable?]] [clj-jargon.init ...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/Donkey/src/donkey/services/filesystem/manifest.clj
clojure
(ns donkey.services.filesystem.manifest (:use [clojure-commons.error-codes] [clojure-commons.validators] [donkey.services.filesystem.common-paths] [donkey.services.filesystem.validators] [donkey.services.filesystem.sharing :only [anon-file-url anon-readable?]] [clj-jargon.init ...
fa033d2309827bdda100280d825c69aaf2c1d0f47698de2ed022bff33900bb59
mtgred/netrunner
set_up_test.clj
(ns game.core.set-up-test (:require [game.core :as core] [game.core-test :refer :all] [game.utils-test :refer :all] [game.macros-test :refer :all] [clojure.test :refer :all])) (deftest mulligan-responses (let [setup {:corp {:deck ["Ice Wall" "Hedge Fund" "IPO" "NGO F...
null
https://raw.githubusercontent.com/mtgred/netrunner/022eec2cb2c51011076c13935199129e3f980011/test/clj/game/core/set_up_test.clj
clojure
(ns game.core.set-up-test (:require [game.core :as core] [game.core-test :refer :all] [game.utils-test :refer :all] [game.macros-test :refer :all] [clojure.test :refer :all])) (deftest mulligan-responses (let [setup {:corp {:deck ["Ice Wall" "Hedge Fund" "IPO" "NGO F...
04d7a0c0594dda92d7d12d0289278e504edbbcff06cbdcdcd38d102932799919
thi-ng/geom
csg.cljc
(ns thi.ng.geom.mesh.csg #?(:cljs (:require-macros [thi.ng.math.macros :as mm])) (:require [thi.ng.geom.core :as g] [thi.ng.geom.vector :as v :refer [vec3 V3X V3Y]] [thi.ng.geom.basicmesh :as bm] [thi.ng.geom.plane :as p] [thi.ng.geom.utils :as gu] [thi.ng.dstruct.core :as d] [thi.ng...
null
https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/src/thi/ng/geom/mesh/csg.cljc
clojure
Parts of the functionality in this namespace are originally based on an early implementation of csg.js and have been ported to resulting quality of meshes. Only fully closed meshes (i.e. enclosing solid volumes) can be used of the input meshes. Therefore it's best to keep meshes fairly simple/small and avoid to...
(ns thi.ng.geom.mesh.csg #?(:cljs (:require-macros [thi.ng.math.macros :as mm])) (:require [thi.ng.geom.core :as g] [thi.ng.geom.vector :as v :refer [vec3 V3X V3Y]] [thi.ng.geom.basicmesh :as bm] [thi.ng.geom.plane :as p] [thi.ng.geom.utils :as gu] [thi.ng.dstruct.core :as d] [thi.ng...
c4c4d8ddee6926473967d22e67e58eaeb9661336181e69a3f2a33e221427b3ef
haskell/hackage-security
Snapshot.hs
# LANGUAGE UndecidableInstances # module Hackage.Security.TUF.Snapshot ( Snapshot(..) ) where import MyPrelude import Control.Monad.Except import Control.Monad.Reader import Hackage.Security.JSON import Hackage.Security.TUF.Header import Hackage.Security.TUF.FileInfo import Hackage.Security.TUF.FileMap import H...
null
https://raw.githubusercontent.com/haskell/hackage-security/745b294e8cda2b46a21a6d1766a87f699a0277a8/hackage-security/src/Hackage/Security/TUF/Snapshot.hs
haskell
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -----------------------------------------------------------------------------} | File info for the root metadata We list this explicitly in the snapshot so that w...
# LANGUAGE UndecidableInstances # module Hackage.Security.TUF.Snapshot ( Snapshot(..) ) where import MyPrelude import Control.Monad.Except import Control.Monad.Reader import Hackage.Security.JSON import Hackage.Security.TUF.Header import Hackage.Security.TUF.FileInfo import Hackage.Security.TUF.FileMap import H...
e551a7dfa000eff1767954ca47cdc10291f73d38f77902531af7707c3061cd4c
mirage/qubes-mirage-firewall
rules.ml
Copyright ( C ) 2015 , < > See the README file for details . See the README file for details. *) * This module applies firewall rules from . open Packet open Lwt.Infix module Q = Pf_qubes.Parse_qubes let src = Logs.Src.create "rules" ~doc:"Firewall rules" module Log = (val Logs.src_log src : Logs.LOG) ...
null
https://raw.githubusercontent.com/mirage/qubes-mirage-firewall/47562749b2d2c62f7c5fb47df23502666d326ae3/rules.ml
ocaml
TODO: fix type of dns_client so that this case can go Does the packet match our rules?
Copyright ( C ) 2015 , < > See the README file for details . See the README file for details. *) * This module applies firewall rules from . open Packet open Lwt.Infix module Q = Pf_qubes.Parse_qubes let src = Logs.Src.create "rules" ~doc:"Firewall rules" module Log = (val Logs.src_log src : Logs.LOG) ...
3c9723c4175a5b9ddfba41a63a6d4920e2dddcd9a049dfb391713a9c8f782d3d
DomainDrivenArchitecture/dda-managed-vm
main.clj
Licensed to the Apache Software Foundation ( ASF ) under one ; or more contributor license agreements. See the NOTICE file ; distributed with this work for additional information ; regarding copyright ownership. The ASF licenses this file to you under the Apache License , Version 2.0 ( the ; "License"); you may not...
null
https://raw.githubusercontent.com/DomainDrivenArchitecture/dda-managed-vm/ed44f97ef89468a4dd4bc514439df3f936c86d26/uberjar/src/dda/pallet/dda_managed_vm/main.clj
clojure
or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file "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 b...
Licensed to the Apache Software Foundation ( ASF ) under one to you under the Apache License , Version 2.0 ( the distributed under the License is distributed on an " AS IS " BASIS , (ns dda.pallet.dda-managed-vm.main (:gen-class) (:require [clojure.string :as str] [clojure.tools.cli :as cli] [dda...
a25b1c4288a8cbc1fd0815a7bebffb4dee08b0c54804d0fc9369c266d3022db6
omelkonian/AlgoRhythm
Integration.hs
# LANGUAGE ImplicitParams # module Grammar.Integration ( integrate ) where import Control.Monad (when) import Dynamics import Grammar.Harmony import Grammar.Melody import Grammar.TonalHarmony import Grammar.Types import Grammar.VoiceLeading import Music integrate :: (?melodyConfig :: MelodyConfig, ?har...
null
https://raw.githubusercontent.com/omelkonian/AlgoRhythm/fdc1ccbae0b3d8a7635b24d37716123aba2d6c11/AlgoRhythm/src/Grammar/Integration.hs
haskell
# LANGUAGE ImplicitParams # module Grammar.Integration ( integrate ) where import Control.Monad (when) import Dynamics import Grammar.Harmony import Grammar.Melody import Grammar.TonalHarmony import Grammar.Types import Grammar.VoiceLeading import Music integrate :: (?melodyConfig :: MelodyConfig, ?har...
305b22f63c521996b7322e050e3f633ad17a44a4dd08865c2a9bd5c9170484eb
telekons/one-more-re-nightmare
similar.lisp
(in-package :one-more-re-nightmare) (define-condition no-match () ()) (defvar *environment*) (defvar *backward-environment*) (defun assert-equivalent (from to) (when (or (and (eql from 'position) (eql to 'position)) (and (eql from 'nil) (eql to 'nil))) ;; Don't care for POSITION ~ POSITION or NIL ~...
null
https://raw.githubusercontent.com/telekons/one-more-re-nightmare/c27f2e96ece56dc5689db0d5d3909e6f8a3744ef/Code/DFA-construction/similar.lisp
lisp
Don't care for POSITION ~ POSITION or NIL ~ NIL they never cause effects, and they never change while generating a
(in-package :one-more-re-nightmare) (define-condition no-match () ()) (defvar *environment*) (defvar *backward-environment*) (defun assert-equivalent (from to) (when (or (and (eql from 'position) (eql to 'position)) (and (eql from 'nil) (eql to 'nil))) (return-from assert-equivalent)) (multiple-v...
63ef09584a2583695f676cc3a676ff00623f6d4dda0a25469a3f618364cdb686
gafiatulin/codewars
Sumdivsq.hs
-- Integers: Recreation One -- / module Codewars.G964.Sumdivsq where listSquared :: Int -> Int -> [(Int, Int)] listSquared m n = map (\i -> (i, sOfSOfD i) ) . filter (\i -> isSquare . sOfSOfD $ i) $ [m..n] where divisors n = 1 : filter ((==0) . rem n) [2 .. floor . sqrt . fromIntegral $ n] sOfSOfD 1 = 1...
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/6%20kyu/Sumdivsq.hs
haskell
Integers: Recreation One /
module Codewars.G964.Sumdivsq where listSquared :: Int -> Int -> [(Int, Int)] listSquared m n = map (\i -> (i, sOfSOfD i) ) . filter (\i -> isSquare . sOfSOfD $ i) $ [m..n] where divisors n = 1 : filter ((==0) . rem n) [2 .. floor . sqrt . fromIntegral $ n] sOfSOfD 1 = 1 sOfSOfD n = sum . map ...
8735675556b72f62b0018a0b300ebda7f3421d1e8d880b99cd2552fda3098380
vlstill/hsExprTest
typecmp-a.1.ok.hs
Int -> Int Double Integral c => c -> c -> b (Integral d, Num b) => d -> b
null
https://raw.githubusercontent.com/vlstill/hsExprTest/391fc823c1684ec248ac8f76412fefeffb791865/examples/typecmp-a.1.ok.hs
haskell
Int -> Int Double Integral c => c -> c -> b (Integral d, Num b) => d -> b
edcc1c4c5b16d75d66444275245f65b80275d89a4b1abab1c0656c05ca761cd7
haskell-tools/haskell-tools
NotOccurring.hs
module Refactor.InlineBinding.NotOccurring where a = ()
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/InlineBinding/NotOccurring.hs
haskell
module Refactor.InlineBinding.NotOccurring where a = ()
5b7b59d9936f578a05e49c9843018828107cd720a20ea365dfc769fb36455f9f
sneeuwballen/zipperposition
sat_solver.ml
This file is free software , part of Zipperposition . See file " license " for more details . * { 1 Bridge to [ MSat ] prover } open Logtk module SI = Msat.Solver_intf let section = Util.Section.make ~parent:Const.section "msat" let prof_call_msat = ZProf.make "msat.call" let stat_num_clauses = Util.mk_stat "msa...
null
https://raw.githubusercontent.com/sneeuwballen/zipperposition/333c4a5b0f8a726f414db901a77ca30921178da5/src/prover/sat_solver.ml
ocaml
Instantiate solver queue of clauses waiting for being pushed into the solver flag to indicate whether it's time to re-check the model channel on which to print boolean clauses print list of clauses on [dump_to], if it's defined add clause, if not added already add new clause -> check again no duplicates ...
This file is free software , part of Zipperposition . See file " license " for more details . * { 1 Bridge to [ MSat ] prover } open Logtk module SI = Msat.Solver_intf let section = Util.Section.make ~parent:Const.section "msat" let prof_call_msat = ZProf.make "msat.call" let stat_num_clauses = Util.mk_stat "msa...
f86bec5e96ab2804038fecd9f22dd441527b4b317ccc3371e9a38e756adf5ffc
brownplt/TeJaS
id.mli
type t val gen_id : unit -> t val id_of_string : string -> t val string_of_id : t -> string val compare : t -> t -> int
null
https://raw.githubusercontent.com/brownplt/TeJaS/a8ad7e5e9ad938db205074469bbde6a688ec913e/src/patterns/id.mli
ocaml
type t val gen_id : unit -> t val id_of_string : string -> t val string_of_id : t -> string val compare : t -> t -> int
574bafef9c13be68133cb7479a5cb7b76c8df537d62147d5a628a14047666392
camlp5/camlp5
r2sch_test.ml
(* camlp5r *) (* r2sch_test.ml *) open Testutil ; open OUnit2 ; open OUnitTest ; Pcaml.inter_phrases.val := Some ("\n") ; value pa1 = PAPR.Implem.pa1 ; value pr = PAPR.Implem.pr ; value tests = "test pa_r -> pr_scheme" >::: [ "simplest" >:: (fun [ _ -> assert_equal ~{msg="not equal"} ~{printer=(fun [ x...
null
https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/testsuite/r2sch_test.ml
ocaml
camlp5r r2sch_test.ml ;;; Local Variables: *** ;;; mode:tuareg *** ;;; End: ***
open Testutil ; open OUnit2 ; open OUnitTest ; Pcaml.inter_phrases.val := Some ("\n") ; value pa1 = PAPR.Implem.pa1 ; value pr = PAPR.Implem.pr ; value tests = "test pa_r -> pr_scheme" >::: [ "simplest" >:: (fun [ _ -> assert_equal ~{msg="not equal"} ~{printer=(fun [ x -> x ])} {foo|(begin 1 ...
eba309f4817ae8cbae88c2a13e756298f38762a23408976106955d7a69b22920
input-output-hk/cardano-ledger
KeyPair.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Test.Cardano.Ledger.Core.KeyPair ( mkAddr, mkCred, KeyPair (..), KeyPa...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/libs/cardano-ledger-core/testlib/Test/Cardano/Ledger/Core/KeyPair.hs
haskell
| Representation of a list of pairs of key pairs, e.g., pay and stake keys | Create a witness for transaction | Create witnesses for transaction | From a list of key pairs and a set of key hashes required for a multi-sig scripts, return the set of required keys.
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Test.Cardano.Ledger.Core.KeyPair ( mkAddr, mkCred, KeyPair (..), KeyPa...
91ff8e070db8d8dfa79ca9e19fc96f5079e0b10e7ee759f29c031077082d6696
abailly/xxi-century-typed
Types.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE ViewPatterns # module Minilang.REPL.Types where import Control.Exception (Exception) import Data.Aeson (FromJSON, ToJSON) import Data.Text as Text hiding (replicate) import GHC.Generics import Minilang.Env import Minilang.Eval hiding (rho) import Minilang.Parser (AST, Bindin...
null
https://raw.githubusercontent.com/abailly/xxi-century-typed/89df5eab3747ddb0ea37030ddb1947fb8c14265b/minilang/src/Minilang/REPL/Types.hs
haskell
# LANGUAGE DeriveAnyClass # | Returns the current environment for this session Environment is made of an `Env`ironment binding names to `Decl`arations | Updates the current environment for this session. | Handle some input, parsing, typechecking and possibly evaluating it. | Produces some output | Prompt for some...
# LANGUAGE ViewPatterns # module Minilang.REPL.Types where import Control.Exception (Exception) import Data.Aeson (FromJSON, ToJSON) import Data.Text as Text hiding (replicate) import GHC.Generics import Minilang.Env import Minilang.Eval hiding (rho) import Minilang.Parser (AST, Binding) import Minilang.Pretty () imp...
65909c20f38979d595c43d95feaa095a08bb1b4ad08fbae41c9344ea7c33e08b
Helium4Haskell/helium
Thompson14.hs
double :: Int -> Int double x = 2 * x main = double -4
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/thompson/Thompson14.hs
haskell
double :: Int -> Int double x = 2 * x main = double -4
c34ac997b32c51bdcc40edcfb07a0dcc051c3f8b107fb864b5ea91904350fd76
multiformats/clj-multistream
text.clj
(ns multistream.codec.text "Text codec which uses UTF-8 to serialize strings." (:require [clojure.java.io :as io] [clojure.string :as str] [multistream.codec :as codec :refer [defcodec defdecoder defencoder]]) (:import (java.io InputStream InputStreamReader OutputStream Out...
null
https://raw.githubusercontent.com/multiformats/clj-multistream/c66d61a28bc9d54beb04a45f76b40a101a1f0a32/src/multistream/codec/text.clj
clojure
## Text Codec TODO: make this read lines instead?
(ns multistream.codec.text "Text codec which uses UTF-8 to serialize strings." (:require [clojure.java.io :as io] [clojure.string :as str] [multistream.codec :as codec :refer [defcodec defdecoder defencoder]]) (:import (java.io InputStream InputStreamReader OutputStream Out...
d6ceb994500135e1deddac455c6c51b9b912d4bf6cd300597374d031b032b4f7
icicle-lang/disorder.hs-ambiata
Main.hs
module Disorder.Core.Main ( disorderMain , disorderCliMain ) where import Control.Applicative import Control.Monad import System.Directory import System.Process import System.Exit import System.IO import Prelude disorderMain :: [IO Bool] ...
null
https://raw.githubusercontent.com/icicle-lang/disorder.hs-ambiata/0068d9a0dd9aea45e772fb664cf4e7e71636dbe5/disorder-core/src/Disorder/Core/Main.hs
haskell
module Disorder.Core.Main ( disorderMain , disorderCliMain ) where import Control.Applicative import Control.Monad import System.Directory import System.Process import System.Exit import System.IO import Prelude disorderMain :: [IO Bool] ...
035f92469fae33667379303c7d9fe2e30c8a5baae19019b25482c76f73958385
hadolint/hadolint
DL3041.hs
module Hadolint.Rule.DL3041 (rule) where import qualified Data.Text as Text import Hadolint.Rule import qualified Hadolint.Shell as Shell import Language.Docker.Syntax rule :: Rule Shell.ParsedShell rule = dl3041 <> onbuild dl3041 # INLINEABLE rule # dl3041 :: Rule Shell.ParsedShell dl3041 = simpleRule code severit...
null
https://raw.githubusercontent.com/hadolint/hadolint/6c4632387a3485a9b7e1bf46c58da697178e02e2/src/Hadolint/Rule/DL3041.hs
haskell
# INLINEABLE dl3041 #
module Hadolint.Rule.DL3041 (rule) where import qualified Data.Text as Text import Hadolint.Rule import qualified Hadolint.Shell as Shell import Language.Docker.Syntax rule :: Rule Shell.ParsedShell rule = dl3041 <> onbuild dl3041 # INLINEABLE rule # dl3041 :: Rule Shell.ParsedShell dl3041 = simpleRule code severit...
d729bd08783eeac5c2c9afa92b1f9d88d59960d70f1c75f661f590002a906747
ianmbloom/gudni
EmbeddedOpenCLSource.hs
# LANGUAGE TemplateHaskell # ----------------------------------------------------------------------------- -- | Module : Graphics . Gudni . OpenCL.CallKernel Copyright : ( c ) 2019 -- License : BSD-style (see the file libraries/base/LICENSE) -- Maintainer : -- Stability : experi...
null
https://raw.githubusercontent.com/ianmbloom/gudni/fa69f1bf08c194effca05753afe5455ebae51234/src/Graphics/Gudni/OpenCL/EmbeddedOpenCLSource.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style (see the file libraries/base/LICENSE) Stability : experimental Portability : portable | Raw embedded source from the Kernels.cl file.
# LANGUAGE TemplateHaskell # Module : Graphics . Gudni . OpenCL.CallKernel Copyright : ( c ) 2019 Maintainer : Functions for embedding OpenCL source in the compiled Haskell library . module Graphics.Gudni.OpenCL.EmbeddedOpenCLSource ( embeddedOpenCLSource ) where import qualifie...
c6c456b762d3ec9470a57671434cc482b495a9939dd34f8605484a0fbdee2fed
typelead/etlas
Package.hs
# LANGUAGE DeriveFunctor # module Distribution.Solver.Modular.Package ( I(..) , Loc(..) , PackageId , PackageIdentifier(..) , PackageName, mkPackageName, unPackageName , PkgconfigName, mkPkgconfigName, unPkgconfigName , PI(..) , PN , QPV , instI , makeIndependent , primaryPP , setupPP , show...
null
https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas/Distribution/Solver/Modular/Package.hs
haskell
| A package name. | Unpacking a package name. | Package version. A package name plus a version number. | Qualified package version. | Package id. Currently just a black-box string. | Location. Info about whether a package is installed or not, and where exactly it is located. For installed packages, uniquely iden...
# LANGUAGE DeriveFunctor # module Distribution.Solver.Modular.Package ( I(..) , Loc(..) , PackageId , PackageIdentifier(..) , PackageName, mkPackageName, unPackageName , PkgconfigName, mkPkgconfigName, unPkgconfigName , PI(..) , PN , QPV , instI , makeIndependent , primaryPP , setupPP , show...
cb4f3d85f381194b2b011e12da71c8fd6c2ecabaa7096acfc11fd49c0d830662
mstksg/advent-of-code-2021
Day15.hs
-- | -- Module : AOC.Challenge.Day15 -- License : BSD3 -- -- Stability : experimental -- Portability : non-portable -- Day 15 . See " AOC.Solver " for the types used in this module ! module AOC.Challenge.Day15 ( day15a , day15b ) where import AOC.Common (digitToIntSafe) import ...
null
https://raw.githubusercontent.com/mstksg/advent-of-code-2021/8fc4f68ee129c03cd14c44eec7665c2b4ff961f0/src/AOC/Challenge/Day15.hs
haskell
| Module : AOC.Challenge.Day15 License : BSD3 Stability : experimental Portability : non-portable
Day 15 . See " AOC.Solver " for the types used in this module ! module AOC.Challenge.Day15 ( day15a , day15b ) where import AOC.Common (digitToIntSafe) import AOC.Common.Point (Point, V2(..), parseAsciiMap, mannDist, cardinalNeighbsSet) import AOC.Common.Search (aStar...
ecdfcbd7f93bc2f0e9c8ceea0b5299ebcdc48e6c1f8515406bd11fc84e162ace
jchavarri/rebind
longident.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/jchavarri/rebind/ccfa1725ff5b16574daf4d0044c49dbf719aa105/vendor/ocaml/parsing/longident.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 . type t = Lident of string | Ldot ...
2b9d35da029f16ea683ffd746ab2edc2f2571dc3a940858252f68efd63e80e0f
TheLortex/mirage-monorepo
migrate_411_412.ml
open Stdlib0 module From = Ast_411 module To = Ast_412 let rec copy_toplevel_phrase : Ast_411.Parsetree.toplevel_phrase -> Ast_412.Parsetree.toplevel_phrase = function | Ast_411.Parsetree.Ptop_def x0 -> Ast_412.Parsetree.Ptop_def (copy_structure x0) | Ast_411.Parsetree.Ptop_dir x0 -> Ast_412.Pars...
null
https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/ppxlib/astlib/migrate_411_412.ml
ocaml
open Stdlib0 module From = Ast_411 module To = Ast_412 let rec copy_toplevel_phrase : Ast_411.Parsetree.toplevel_phrase -> Ast_412.Parsetree.toplevel_phrase = function | Ast_411.Parsetree.Ptop_def x0 -> Ast_412.Parsetree.Ptop_def (copy_structure x0) | Ast_411.Parsetree.Ptop_dir x0 -> Ast_412.Pars...
47f7f1be340a5da4880767b6be3b51cc5fe030fac049e1513045dd8690db7e31
codedownio/sandwich
Draw.hs
{-# LANGUAGE MultiWayIf #-} # LANGUAGE CPP # module Test.Sandwich.Formatters.TerminalUI.Draw where import Brick import Brick.Widgets.Border import Brick.Widgets.Center import qualified Brick.Widgets.List as L import Control.Monad import Control.Monad.Logger import Control.Monad.Reader import Data.Foldable import qual...
null
https://raw.githubusercontent.com/codedownio/sandwich/80c5244a47a29c3ec20d68afec89297e014847b9/sandwich/unix-src/Test/Sandwich/Formatters/TerminalUI/Draw.hs
haskell
# LANGUAGE MultiWayIf #
# LANGUAGE CPP # module Test.Sandwich.Formatters.TerminalUI.Draw where import Brick import Brick.Widgets.Border import Brick.Widgets.Center import qualified Brick.Widgets.List as L import Control.Monad import Control.Monad.Logger import Control.Monad.Reader import Data.Foldable import qualified Data.List as L import ...
cc2fb32d6b05c919bb4e303ac7222f0d339a3ac85553da5e987dff7fe2a88d87
zotonic/zotonic
m_image_edit.erl
@author < > 2021 %% @doc Model for fetching the image edit settings of a page. Copyright 2021 %% 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 %% %% Unle...
null
https://raw.githubusercontent.com/zotonic/zotonic/1bb4aa8a0688d007dd8ec8ba271546f658312da8/apps/zotonic_mod_image_edit/src/models/m_image_edit.erl
erlang
@doc Model for fetching the image edit settings of a page. 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 implie...
@author < > 2021 Copyright 2021 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(m_image_edit). -author("Marc Worrell <"). -behaviour(zotonic_model). -export([ m_get/3, get_settings/2, sa...
3032d21548ffc9eeb0790a3e6c9acc4f0e7ac0250820d86e8729beb231d87185
jpmonettas/flow-storm-debugger
dev_tester.cljs
(ns dev-tester) (defn factorial [n] (if (zero? n) 1 (* n (factorial (dec n))))) (defn multi-arity ([a] (multi-arity a 10)) ([a b] (+ a b))) (defmulti do-it #(.-name (type %))) (defmethod do-it "Number" [l] (factorial l)) (defmethod do-it "String" [s] (count s)) (defprotocol Adder (add [x])...
null
https://raw.githubusercontent.com/jpmonettas/flow-storm-debugger/8f5e8ec4bc2d4ab043a9515d459ddc0666492ba9/src-dev/dev_tester.cljs
clojure
(ns dev-tester) (defn factorial [n] (if (zero? n) 1 (* n (factorial (dec n))))) (defn multi-arity ([a] (multi-arity a 10)) ([a b] (+ a b))) (defmulti do-it #(.-name (type %))) (defmethod do-it "Number" [l] (factorial l)) (defmethod do-it "String" [s] (count s)) (defprotocol Adder (add [x])...
dc5be62898b3b5d10d896e23182fee629159288270c453700c37da3028d7720d
jackfirth/rebellion
naming.rkt
#lang racket/base (require racket/contract/base) (provide (contract-out [default-descriptor-identifier (-> identifier? identifier?)] [default-predicate-name (-> interned-symbol? interned-symbol?)] [default-predicate-identifier (-> identifier? identifier?)] [default-constructor-name (-> interned-symbol? inter...
null
https://raw.githubusercontent.com/jackfirth/rebellion/64f8f82ac3343fe632388bfcbb9e537759ac1ac2/type/private/naming.rkt
racket
@------------------------------------------------------------------------------
#lang racket/base (require racket/contract/base) (provide (contract-out [default-descriptor-identifier (-> identifier? identifier?)] [default-predicate-name (-> interned-symbol? interned-symbol?)] [default-predicate-identifier (-> identifier? identifier?)] [default-constructor-name (-> interned-symbol? inter...
22f8c6488bed0fba5520b38bbe4e62d0fa4bee51565172719689dd6130d4879c
aatree/aautil
closer.cljc
(ns aautil.closer (:require [aautil.aalog :as log])) #?(:clj (set! *warn-on-reflection* true)) (defn open-trait [this name f] (log/info (str "opening " name)) (if-let [fsa (:closer-fsa this)] (do (swap! fsa (fn [fs] (if fs (conj fs [f name]) ...
null
https://raw.githubusercontent.com/aatree/aautil/1fd75fd3020a51dd0796f2252e812e1332f3f79a/src/cljc/aautil/closer.cljc
clojure
(ns aautil.closer (:require [aautil.aalog :as log])) #?(:clj (set! *warn-on-reflection* true)) (defn open-trait [this name f] (log/info (str "opening " name)) (if-let [fsa (:closer-fsa this)] (do (swap! fsa (fn [fs] (if fs (conj fs [f name]) ...
ce93a786d995aff1f16ae8162d4cee31faffb9d6c3509b49b5f544db042e24b7
expipiplus1/vulkan
VK_KHR_maintenance1.hs
{-# language CPP #-} -- | = Name -- -- VK_KHR_maintenance1 - device extension -- = = VK_KHR_maintenance1 -- -- [__Name String__] @VK_KHR_maintenance1@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] 70 -- -- [__Revision__] 2 -- -- [__Extension and Version D...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Extensions/VK_KHR_maintenance1.hs
haskell
# language CPP # | = Name VK_KHR_maintenance1 - device extension [__Name String__] [__Extension Type__] Device extension [__Registered Extension Number__] [__Revision__] [__Extension and Version Dependencies__] [__Deprecation state__] - /Promoted/ to <-extensions/html/vkspec.html#...
= = VK_KHR_maintenance1 @VK_KHR_maintenance1@ 70 2 - Requires support for Vulkan 1.0 - < -Docs/issues/new?body=[VK_KHR_maintenance1 ] @pdaniell - nv%0A*Here describe the issue or question you have about the VK_KHR_maintenance1 extension * > 2018 - 03 - 13 - ...
ebd6524565769ae97db2c7a4e798358f71203ba658ea9d65b649df0ebfe4a418
dvingo/dv.fulcro-template
storybook.clj
(ns clj.new.dv.fulcro-template.options.storybook (:require [clj.new.dv.fulcro-template.options.helpers :as helpers])) (def option "+storybook") ;; todo - add task-stories sample namespace. (defn files [data] [[".storybook/.babelrc" (helpers/render ".storybook/.babelrc" data)] [".storybook/main.js" (helpers/ren...
null
https://raw.githubusercontent.com/dvingo/dv.fulcro-template/a0e61c3bcfb67e52d3000e1664348b3f75d6530b/src/clj/new/dv/fulcro_template/options/storybook.clj
clojure
todo - add task-stories sample namespace.
(ns clj.new.dv.fulcro-template.options.storybook (:require [clj.new.dv.fulcro-template.options.helpers :as helpers])) (def option "+storybook") (defn files [data] [[".storybook/.babelrc" (helpers/render ".storybook/.babelrc" data)] [".storybook/main.js" (helpers/render ".storybook/main.js" data)] [".storybo...
69e9414e72ca2466a7f154f084dc1ca783e234c7ea4ee89031d39fb195d61ec3
alt-romes/slfl
Parser.hs
module Parser (parseExpr, parseModule, parseType, tylit) where import Prelude hiding (sum) import Text.Parsec import qualified Text.Parsec.Expr as Ex import Data.Maybe import Data.Either import Debug.Trace import Lexer import CoreSyntax hiding (Var(..)) import Syntax import Program import Util hiding (parens) --...
null
https://raw.githubusercontent.com/alt-romes/slfl/4956fcce8ff2ca7622799fe0715c118b568b74eb/STLLC/app/Parser.hs
haskell
----------------------------------------------------------------------------- ----------------------------------------------------------------------------- A -o B A (*) B TODO : <<><*><>> breaks... A & B A (+) B !A lettensorpattern = do i1 <- identifier reservedOp "*" TensorPattern i1 <$> identifi...
module Parser (parseExpr, parseModule, parseType, tylit) where import Prelude hiding (sum) import Text.Parsec import qualified Text.Parsec.Expr as Ex import Data.Maybe import Data.Either import Debug.Trace import Lexer import CoreSyntax hiding (Var(..)) import Syntax import Program import Util hiding (parens) ...
4b84ff6a8d55a1ee6fb36c2c7871f05c4d018daa8106795ad0026a314b8cb14c
decomplect/ion
core.clj
(ns ion.cuss.core (:require [garden.stylesheet :refer [at-media]])) (defmacro defbreakpoint [name media-params] `(defn ~name [& rules#] (at-media ~media-params [:& rules#])))
null
https://raw.githubusercontent.com/decomplect/ion/72e7a9b9359112832c928017d307a71317b84802/src/ion/cuss/core.clj
clojure
(ns ion.cuss.core (:require [garden.stylesheet :refer [at-media]])) (defmacro defbreakpoint [name media-params] `(defn ~name [& rules#] (at-media ~media-params [:& rules#])))
8f2bd49ab6e9061e8f8d5942c3ec13677a55f5e90e61f175b834a32b1f2e99bf
cbaggers/rtg-math
sampling.lisp
(in-package :rtg-math.sampling) (defun sample-2d (function &key (x-range (v! 0 1)) (y-range (v! 0 1)) (incr 0.1) (passes 1) (pass-multiple 0.5) (element-type t)) (let* ((x-dim (floor (/ (- (v:y x-range) (v:x x-range)) incr))) (y-dim (floor (/ (- (v:y...
null
https://raw.githubusercontent.com/cbaggers/rtg-math/29fc5b3d0028a4a11a82355ecc8cca62662c69e0/sampling.lisp
lisp
(in-package :rtg-math.sampling) (defun sample-2d (function &key (x-range (v! 0 1)) (y-range (v! 0 1)) (incr 0.1) (passes 1) (pass-multiple 0.5) (element-type t)) (let* ((x-dim (floor (/ (- (v:y x-range) (v:x x-range)) incr))) (y-dim (floor (/ (- (v:y...
6a38a4d778b8c61043c21a167a08bb4b0fe058cfb746c705fab60e94828b9036
tsloughter/erlangdc2013
erlangdc_app.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2012 , %%% @doc %%% %%% @end Created : 15 Dec 2012 by < > %%%------------------------------------------------------------------- -module(erlangdc_app). -behaviour(application). %% Application callbacks -export([sta...
null
https://raw.githubusercontent.com/tsloughter/erlangdc2013/d08198526f903cf081f81cacef1cc82ee9e8575b/apps/erlangdc/src/erlangdc_app.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- Application callbacks =================================================================== Application callbacks =========================================================...
@author < > ( C ) 2012 , Created : 15 Dec 2012 by < > -module(erlangdc_app). -behaviour(application). -export([start/0, start/2, stop/1]). start() -> application:set_env(lager, handlers, {handlers, [ {lager_console_backend, [info]} ...
af85415a05e63d93872bbfbfd8b4fff90d7763f8cb6bb34b05be9679a7ac9adf
jdreaver/eventful
PostgresqlSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Eventful.Store.PostgresqlSpec (spec) where import Control.Monad.Reader (ask) import Data.ByteString (ByteString) import qualified Data.ByteString.UTF8 as UTF8 import Data.Maybe (maybe) import Data.Monoid ((<>)) import Data.Text (Text, intercalate) import Database.Persist.Post...
null
https://raw.githubusercontent.com/jdreaver/eventful/3f0c604e5bb2dcf5bacf0a2e01edf6a5e9c5e22e/eventful-postgresql/tests/Eventful/Store/PostgresqlSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module Eventful.Store.PostgresqlSpec (spec) where import Control.Monad.Reader (ask) import Data.ByteString (ByteString) import qualified Data.ByteString.UTF8 as UTF8 import Data.Maybe (maybe) import Data.Monoid ((<>)) import Data.Text (Text, intercalate) import Database.Persist.Postgresql import System.Environment (l...
3f705582933fb64d1a0709fefa27205de40d90f5d930684bb038cc2767e5cbb2
logseq/logseq
editor.cljs
(ns frontend.components.editor (:require [clojure.string :as string] [frontend.commands :as commands :refer [*first-command-group *matched-block-commands *matched-commands]] [frontend.components.block :as block] [frontend.components.datetime :as datetime-comp] ...
null
https://raw.githubusercontent.com/logseq/logseq/46d3cb516ad5e4d16909fe1b9c4af15f5d1d0efd/src/main/frontend/components/editor.cljs
clojure
if there's a page name fully matched content returned from search engine is normalized enter no new line input escape TODO: auto responsive fixed size as the function is binding to the editor content, optimization is welcome other formats FIXME: assuming enter key is the only trigger of the height changing (un...
(ns frontend.components.editor (:require [clojure.string :as string] [frontend.commands :as commands :refer [*first-command-group *matched-block-commands *matched-commands]] [frontend.components.block :as block] [frontend.components.datetime :as datetime-comp] ...
7ef11e7958627d59a86179a52bb689ec9da1f8d62f9ce80e250474f19c278ce1
kowey/GenI
GenI.hs
-- GenI surface realiser Copyright ( C ) 2005 and -- -- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . -- -- T...
null
https://raw.githubusercontent.com/kowey/GenI/570a6ef70e61a7cb01fe0fc29732cd9c1c8f2d7a/src/NLP/GenI.hs
haskell
GenI surface realiser This program is free software; you can redistribute it and/or This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more det...
Copyright ( C ) 2005 and modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . You should have received a copy of the GNU General Public License Foundation , Inc. , 59 Temple ...
70d04a9ebd59688042271917bb8cb95548048ef33b697aafb52a14baaf3d2e8c
lilyball/projecteuler-ocaml
prob205.ml
has nine four - sided ( pyramidal ) dice , each with faces numbered 1 , 2 , 3 , 4 . has six six - sided ( cubic ) dice , each with faces numbered 1 , 2 , 3 , 4 , 5 , 6 . and roll their dice and compare totals : the highest total wins . The result is a draw if the totals are equal . What ...
null
https://raw.githubusercontent.com/lilyball/projecteuler-ocaml/a88ed8355b565ad0726cfcac4916d2b80512da7a/prob205.ml
ocaml
has nine four - sided ( pyramidal ) dice , each with faces numbered 1 , 2 , 3 , 4 . has six six - sided ( cubic ) dice , each with faces numbered 1 , 2 , 3 , 4 , 5 , 6 . and roll their dice and compare totals : the highest total wins . The result is a draw if the totals are equal . What ...
233d39049ef565455d7ee5f0e647c6f453f6ea26445d4f2250598c84b4bd8878
racket/plai
circular.rkt
#lang plai/mutator (allocator-setup "../good-collectors/good-collector.rkt" 68) (define (gen-circular) (let ([x (cons 3 4)]) (let ([y (cons 2 x)]) (set-rest! x y) x))) (define x (gen-circular)) (test/location=? x (rest (rest x)))
null
https://raw.githubusercontent.com/racket/plai/164f3b763116fcfa7bd827be511650e71fa04319/plai-lib/tests/gc/good-mutators/circular.rkt
racket
#lang plai/mutator (allocator-setup "../good-collectors/good-collector.rkt" 68) (define (gen-circular) (let ([x (cons 3 4)]) (let ([y (cons 2 x)]) (set-rest! x y) x))) (define x (gen-circular)) (test/location=? x (rest (rest x)))
6ff0f2f1903f1e8c750da95f3fb657dcbf198efaadfd69d5fc98efc1c37e9302
ocamllabs/ocaml-modular-implicits
t022-pushconstint.ml
let _ = () in -1;; * 0 1 PUSHCONSTINT -1 3 POP 1 5 ATOM0 6 SETGLOBAL T022 - pushconstint 8 STOP * 0 CONST0 1 PUSHCONSTINT -1 3 POP 1 5 ATOM0 6 SETGLOBAL T022-pushconstint 8 STOP **)
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t022-pushconstint.ml
ocaml
let _ = () in -1;; * 0 1 PUSHCONSTINT -1 3 POP 1 5 ATOM0 6 SETGLOBAL T022 - pushconstint 8 STOP * 0 CONST0 1 PUSHCONSTINT -1 3 POP 1 5 ATOM0 6 SETGLOBAL T022-pushconstint 8 STOP **)
2175c400383674f47ffaa960c77dc5807f24126261cd80ae8742b875921f076c
f-o-a-m/kepler
Effects.hs
module Tendermint.SDK.BaseApp.Effects ( BaseAppEffs , defaultCompileToCore , defaultCompileToPureCore , module Tendermint.SDK.BaseApp.Effects.BaseEffs , module Tendermint.SDK.BaseApp.Effects.CoreEffs , module Tendermint.SDK.BaseApp.Effects.PureCoreEffs ) where import Polysemy ...
null
https://raw.githubusercontent.com/f-o-a-m/kepler/6c1ad7f37683f509c2f1660e3561062307d3056b/hs-abci-sdk/src/Tendermint/SDK/BaseApp/Effects.hs
haskell
module Tendermint.SDK.BaseApp.Effects ( BaseAppEffs , defaultCompileToCore , defaultCompileToPureCore , module Tendermint.SDK.BaseApp.Effects.BaseEffs , module Tendermint.SDK.BaseApp.Effects.CoreEffs , module Tendermint.SDK.BaseApp.Effects.PureCoreEffs ) where import Polysemy ...
075c7e02438bc212cd3f96ab192fa4e69888fb6c236e40bd3aa32b1913f2fd2f
yzh44yzh/practical_erlang
task_3.erl
-module(task_3). -export([member/2, filter/2]). -include_lib("eunit/include/eunit.hrl"). implement lists : member/2 %% #member-2 member(Elem, List) -> false. member_test() -> ?assertEqual(true, member(55, [1,2,55,77])), ?assertEqual(false, member(55, [])), ?assertEqual(false, member(55, [1,2,77]...
null
https://raw.githubusercontent.com/yzh44yzh/practical_erlang/c9eec8cf44e152bf50d9bc6d5cb87fee4764f609/02_list_recursion/exercise/task_3.erl
erlang
#member-2 implement lists:filter/2
-module(task_3). -export([member/2, filter/2]). -include_lib("eunit/include/eunit.hrl"). implement lists : member/2 member(Elem, List) -> false. member_test() -> ?assertEqual(true, member(55, [1,2,55,77])), ?assertEqual(false, member(55, [])), ?assertEqual(false, member(55, [1,2,77])), ?asse...
46ebced2174d251b6692b54941c4c0725c85d7d80b50ab93c764d4c03c09a787
helium/miner
miner_collect.erl
-module(miner_collect). -behaviour(gen_server). %% API -export([ start_link/0, stop/0 ]). %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -include_lib("blockchain/include/blockchain_vars.hrl"). -define(SERVER, ?M...
null
https://raw.githubusercontent.com/helium/miner/8906ca280544d9d14ce34fade54ea6f5e51e5c98/src/miner_collect.erl
erlang
API gen_server callbacks =================================================================== API =================================================================== =================================================================== gen_server callbacks ==============================================================...
-module(miner_collect). -behaviour(gen_server). -export([ start_link/0, stop/0 ]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -include_lib("blockchain/include/blockchain_vars.hrl"). -define(SERVER, ?MODULE). -record(state, ...
1e9faba492f7043ca569f3b5b96167852ff927a94c8f331c669cd4d8e16058b6
droundy/iolaus-broken
Repository.hs
Copyright ( C ) 2009 -- -- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 , or ( at your option ) -- any later version. -- -- This program is distributed in the hope t...
null
https://raw.githubusercontent.com/droundy/iolaus-broken/e40c001f3c5a106bf39f437d6349858e7e9bf51e/Iolaus/Repository.hs
haskell
This program is free software; you can redistribute it and/or modify any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License fo...
Copyright ( C ) 2009 it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 , or ( at your option ) You should have received a copy of the GNU General Public License the Free Software Foundation , Inc. , 51 Franklin Street , Fifth Floor , ...
6221a6cc0b88111a34c3a1f498c8b2f4f7a73c9146b96f1b6a4fce3d98d0f30e
logseq/logseq
shell.cljs
(ns electron.shell (:require [clojure.string :as string] [electron.state :as state] [clojure.set :as set] [electron.logger :as logger] ["child_process" :as child-process] ["command-exists" :as command-exists])) (def commands-allowlist #{"git" "pandoc" "ag" "grep" "alda"}) ;(def commands-denylist...
null
https://raw.githubusercontent.com/logseq/logseq/396c42c9c55f262e2db800d91698b1581cd640ae/src/electron/electron/shell.cljs
clojure
(def commands-denylist #{"rm" "mv" "rename" "dd" ">" "command" "sudo"})
(ns electron.shell (:require [clojure.string :as string] [electron.state :as state] [clojure.set :as set] [electron.logger :as logger] ["child_process" :as child-process] ["command-exists" :as command-exists])) (def commands-allowlist #{"git" "pandoc" "ag" "grep" "alda"}) (defn- get-commands-al...
f2ee9f4b3b93c714c2d1bfac56f605dd786058717c5403314f41d864bd4310b8
exercism/clojure
trinary.clj
(ns trinary) (defn to-decimal [] ;; <- arglist goes here ;; your code goes here )
null
https://raw.githubusercontent.com/exercism/clojure/7ed96a5ae3c471c37db2602baf3db2be3b5a2d1a/exercises/practice/trinary/src/trinary.clj
clojure
<- arglist goes here your code goes here
(ns trinary) )
accec9f089ad7189b51a72c92dc30dde1765309e987693a5d33946c7580609c4
mirage/awa-ssh
awa_test_client.ml
* Copyright ( c ) 2019 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
null
https://raw.githubusercontent.com/mirage/awa-ssh/7c65292939ae4dff25170b1dbad6e3bc48d177a4/test/awa_test_client.ml
ocaml
* Copyright ( c ) 2019 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
59d012894ebdc0c3f6d02c3301fa4a13c4db985a93d7a514026c0128713f7675
HeinrichApfelmus/reactive-banana
Combinators.hs
{----------------------------------------------------------------------------- reactive-banana ------------------------------------------------------------------------------} # LANGUAGE FlexibleInstances , NamedFieldPuns , NoMonomorphismRestriction # module Reactive.Banana.Prim.High.Combinators where import ...
null
https://raw.githubusercontent.com/HeinrichApfelmus/reactive-banana/974716850af1a45658fde5dd1a069e9d01195528/reactive-banana/src/Reactive/Banana/Prim/High/Combinators.hs
haskell
---------------------------------------------------------------------------- reactive-banana ----------------------------------------------------------------------------- ---------------------------------------------------------------------------- Types ----------------------------------------------------------...
# LANGUAGE FlexibleInstances , NamedFieldPuns , NoMonomorphismRestriction # module Reactive.Banana.Prim.High.Combinators where import Control.Exception import Control.Concurrent.MVar import Control.Event.Handler import Control.Monad import Control.Monad.IO.Class import...
0da13a6ca310ac060fe575aa688993c7520973d4c81be2f1920881a011e152c6
sirherrbatka/vellum
macros.lisp
(cl:in-package #:vellum.header) (defmacro with-header ((header) &body body) `(let ((*header* ,header) (*row* (box nil))) ,@body))
null
https://raw.githubusercontent.com/sirherrbatka/vellum/5ba920c9733a290226cde4738de28255b4307b69/src/header/macros.lisp
lisp
(cl:in-package #:vellum.header) (defmacro with-header ((header) &body body) `(let ((*header* ,header) (*row* (box nil))) ,@body))
ff3a74736ec4c53c9d2f6c03cd6babdc8e3ba0cf5888594daada9f42e4444594
lilactown/punk
project.clj
(defproject lilactown/punk-adapter-jvm "0.0.11" :description "Punk JVM Clojure application adapter" :url "" :license {:name "EPL" :url "-2.0"} :source-paths ["src"] :dependencies [[org.clojure/clojure "1.10.0"] [lilactown/punk-core "0.0.6"] [compojure "1.6.1"] ...
null
https://raw.githubusercontent.com/lilactown/punk/0c6e529429837c00958d41e09fd672f49778dedf/adapter-jvm/project.clj
clojure
(defproject lilactown/punk-adapter-jvm "0.0.11" :description "Punk JVM Clojure application adapter" :url "" :license {:name "EPL" :url "-2.0"} :source-paths ["src"] :dependencies [[org.clojure/clojure "1.10.0"] [lilactown/punk-core "0.0.6"] [compojure "1.6.1"] ...
d48fac8c3f264950c0c4689b8f80ddb16dc5024059ad5bf0c8b32d6a96a1f722
janestreet/base
int63_emul.ml
A 63bit integer is a 64bit integer with its bits shifted to the left and its lowest bit set to 0 . This is the same kind of encoding as OCaml int on 64bit architecture . The only difference being the lowest bit ( immediate bit ) set to 1 . and its lowest bit set to 0. This is the same kind of enc...
null
https://raw.githubusercontent.com/janestreet/base/1462b7d5458e96569275a1c673df968ecbf3342f/src/int63_emul.ml
ocaml
the use of [unwrap_unsigned] here is important for the case of [min_value] Include type-specific [Replace_polymorphic_compare] at the end, after including functor application that could shadow its definitions. This is here so that efficient versions of the comparison functions are exported by this module.
A 63bit integer is a 64bit integer with its bits shifted to the left and its lowest bit set to 0 . This is the same kind of encoding as OCaml int on 64bit architecture . The only difference being the lowest bit ( immediate bit ) set to 1 . and its lowest bit set to 0. This is the same kind of enc...
6c47f85572fd6f0cae2404320ef21f013612052d237ae30a523c59c794f455c3
prg-titech/Kani-CUDA
synth-bool.rkt
#lang rosette (require rosette/lib/synthax "../../lang.rkt") (current-bitwidth #f) (define-synthax (bool-exp tcol c brow k i bdimx bcol trow BLOCKSIZE x row col c2 depth) #:base (choose 0 1 2 tcol c brow k i bdimx bcol trow BLOCKSIZE x row col c2) #:else (choose 0 1 2 tcol c brow k i bdimx bcol trow BLOCKSIZE x ...
null
https://raw.githubusercontent.com/prg-titech/Kani-CUDA/e97c4bede43a5fc4031a7d2cfc32d71b01ac26c4/Emulator/Examples/Matrixmultiply/synth-bool.rkt
racket
#lang rosette (require rosette/lib/synthax "../../lang.rkt") (current-bitwidth #f) (define-synthax (bool-exp tcol c brow k i bdimx bcol trow BLOCKSIZE x row col c2 depth) #:base (choose 0 1 2 tcol c brow k i bdimx bcol trow BLOCKSIZE x row col c2) #:else (choose 0 1 2 tcol c brow k i bdimx bcol trow BLOCKSIZE x ...
a0f99e18baa52cd2bbc6aa9f1df947d7f9432d739f024f7619bd804e4320e50c
lem-project/lem
version.lisp
(uiop/package:define-package :lem-version-up/version (:use :cl)) (in-package :lem-version-up/version) ;;;don't edit above (defun path (target) (let ((path (uiop:symbol-call :quicklisp :where-is-system target))) (and path (probe-file (merge-pathnames (format nil "~A.asd" target) path))))) (defun get-ver...
null
https://raw.githubusercontent.com/lem-project/lem/4f620f94a1fd3bdfb8b2364185e7db16efab57a1/contrib/version-up/version.lisp
lisp
don't edit above [tbd] replace algorithm here?
(uiop/package:define-package :lem-version-up/version (:use :cl)) (in-package :lem-version-up/version) (defun path (target) (let ((path (uiop:symbol-call :quicklisp :where-is-system target))) (and path (probe-file (merge-pathnames (format nil "~A.asd" target) path))))) (defun get-version (target) (map...
855496f9e460fef0edb46edebe1fa9ce1bac43b4d95064681f26eb38c7351e22
lucassouzamatos/chico.lang
chico_parser.erl
-module(chico_parser). -export([parse/1, parse_and_scan/1, format_error/1]). -file("chico_parser.yrl", 165). -file("/opt/homebrew/Cellar/erlang/25.2/lib/erlang/lib/parsetools-2.4.1/include/yeccpre.hrl", 0). %% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2021 . All Rights Reserved . %% Licensed under the ...
null
https://raw.githubusercontent.com/lucassouzamatos/chico.lang/48557fb0f0e38e26e47a779ea219d404f2889779/src/chico_parser.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...
-module(chico_parser). -export([parse/1, parse_and_scan/1, format_error/1]). -file("chico_parser.yrl", 165). -file("/opt/homebrew/Cellar/erlang/25.2/lib/erlang/lib/parsetools-2.4.1/include/yeccpre.hrl", 0). Copyright Ericsson AB 1996 - 2021 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ...
cca7186c0fe377c1f57808cd1151dd3d30eeeb6c61653e3fb52903b7411c8c13
slindley/dependent-haskell
Box.hs
# LANGUAGE DataKinds , KindSignatures , GADTs , TypeFamilies , TypeOperators , RankNTypes , PolyKinds , ScopedTypeVariables , FlexibleInstances # RankNTypes, PolyKinds, ScopedTypeVariables, FlexibleInstances #-} module Box where import Data.Monoid import Control.Applicative import Data.Foldable import Data...
null
https://raw.githubusercontent.com/slindley/dependent-haskell/f0ea64b4e50464e8c60c11a82a7f432b0fccf122/OldBox/Box.hs
haskell
plus minus max smart constructors for clear boxes placing boxes - lemmas about max --- we wire this knowledge into the Cmp datatype ---------------------- - lemmas about max --- we wire this knowledge into the Cmp datatype ---------------------- place boxes horizontally place boxes vertically cropping...
# LANGUAGE DataKinds , KindSignatures , GADTs , TypeFamilies , TypeOperators , RankNTypes , PolyKinds , ScopedTypeVariables , FlexibleInstances # RankNTypes, PolyKinds, ScopedTypeVariables, FlexibleInstances #-} module Box where import Data.Monoid import Control.Applicative import Data.Foldable import Data...
82ffb7e94ffe0c2bc4dc525c0a3408babe2983d866588933702db309a47de393
strint/sicpAns
1023_three_smallest_primes_next2.scm
;;;next (define (timed-prime-test-next n) (start-prime-test-next n (runtime))) (define (start-prime-test-next n start-time) (if (prime-next? n) (- (runtime) start-time))) (define (prime-next? n) (= n (smallest-divisor-next n))) (define (smallest-divisor-next n) (find-divisor-next n 3)) (define (find-divis...
null
https://raw.githubusercontent.com/strint/sicpAns/efc4bdfaab7583117d42f2141d4b3b9e12792b79/1.2.6-6_Primes/1023_three_smallest_primes_next2.scm
scheme
next not next common test
(define (timed-prime-test-next n) (start-prime-test-next n (runtime))) (define (start-prime-test-next n start-time) (if (prime-next? n) (- (runtime) start-time))) (define (prime-next? n) (= n (smallest-divisor-next n))) (define (smallest-divisor-next n) (find-divisor-next n 3)) (define (find-divisor-next ...
83bbeaf8c6ea3459654241d672d3ae6fc728f96c51c96968f810e1de2d1ed1c4
fulcro-legacy/semantic-ui-wrapper
ui_item_description.cljs
(ns fulcrologic.semantic-ui.views.item.ui-item-description (:require [fulcrologic.semantic-ui.factory-helpers :as h] ["semantic-ui-react/dist/commonjs/views/Item/ItemDescription" :default ItemDescription])) (def ui-item-description "An item can contain a description with a single or multiple paragraphs. ...
null
https://raw.githubusercontent.com/fulcro-legacy/semantic-ui-wrapper/b0473480ddfff18496df086bf506099ac897f18f/semantic-ui-wrappers-shadow/src/main/fulcrologic/semantic_ui/views/item/ui_item_description.cljs
clojure
(ns fulcrologic.semantic-ui.views.item.ui-item-description (:require [fulcrologic.semantic-ui.factory-helpers :as h] ["semantic-ui-react/dist/commonjs/views/Item/ItemDescription" :default ItemDescription])) (def ui-item-description "An item can contain a description with a single or multiple paragraphs. ...
859a8c427fb984d7084e7458f41b1761ddd92286d8ab8c1ccf54300a7b750670
heechul/crest-z3
pretty.mli
* * Copyright ( c ) 2001 by * * * * * All rights reserved . Permission to use , copy , modify and distribute * this software for research purposes only is hereby granted , * provided that the following conditions are met : * 1 . Redistributions of source code...
null
https://raw.githubusercontent.com/heechul/crest-z3/cfcebadddb5e9d69e9956644fc37b46f6c2a21a0/cil/ocamlutil/pretty.mli
ocaml
* API * Constructors for the doc type. * Constructs an empty document * A document that prints the given string * A document that prints an integer in decimal form * A document that prints a real number * A document that consists of a mandatory newline. This is just like [(text "\n")]. The new line will be in...
* * Copyright ( c ) 2001 by * * * * * All rights reserved . Permission to use , copy , modify and distribute * this software for research purposes only is hereby granted , * provided that the following conditions are met : * 1 . Redistributions of source code...
bc24b996ea08e625037c99cbcb29879ef8e8151003e8d4eafa06439eebe4990b
ucsd-progsys/nate
ctype.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) and , projet Crist...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/typing/ctype.ml
ocaml
********************************************************************* Objective Caml ...
and , 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 : ctype.ml , v 1.205.2.5 2008/02/12 04:49:25 ...
0d824c86026a72bcbb24f56c3206b160e30ee56114a40517adace5ce235aad33
mzp/bs-lwt
pa_lwt.mli
Lightweight thread library for OCaml * * Module Pa_lwt * Copyright ( C ) 2009 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation , with linking exceptions ; * ...
null
https://raw.githubusercontent.com/mzp/bs-lwt/f37a3c47d038f4efcd65912c41fab95d1e6633ce/lwt/src/camlp4/pa_lwt.mli
ocaml
* Syntactic sugars for Lwt (deprecated)
Lightweight thread library for OCaml * * Module Pa_lwt * Copyright ( C ) 2009 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation , with linking exceptions ; * ...
ba1b67e96388e45d30dc5c0ee1a85855a3ec06318d4ac68dbec8e92c6366c3eb
metabase/metabase
session_test.clj
(ns metabase.server.middleware.session-test (:require [cheshire.core :as json] [clojure.string :as str] [clojure.test :refer :all] [environ.core :as env] [java-time :as t] [metabase.api.common :refer [*current-user* *current-user-id*]] [metabase.config :as config] [metabase.core.initialization...
null
https://raw.githubusercontent.com/metabase/metabase/0c56664819bb84a7a317caf0fc393d2fa1bf3ccd/test/metabase/server/middleware/session_test.clj
clojure
Default value if request is an HTTPS request then we should set `:secure true`. There are several different headers we check for this. Make sure they all work. ------------------------------------- tests for full-app embedding sessions -------------------------------------- ----------------------------------------...
(ns metabase.server.middleware.session-test (:require [cheshire.core :as json] [clojure.string :as str] [clojure.test :refer :all] [environ.core :as env] [java-time :as t] [metabase.api.common :refer [*current-user* *current-user-id*]] [metabase.config :as config] [metabase.core.initialization...
ada1582b07ce4ac0b0c7c6bf13bb93b3f9064274dd9ed3d38db310a897ee97b5
NorfairKing/declops
Test.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # OPTIONS_GHC -Wno - orphans # module Declops.Provider.Test where import Autodocodec import Autodocodec.Yaml import Control.Exception import Control.Monad.Logger import Data.Aeson (FromJSON, ToJSO...
null
https://raw.githubusercontent.com/NorfairKing/declops/796aa923d43c75268b2b96a04e1d5d9d35486d5d/declops-provider-test/src/Declops/Provider/Test.hs
haskell
# LANGUAGE OverloadedStrings # Setup Test starts here Cannot run this test Setup Tests start here Setup Tests start here Setup Tests start here Apply Query Check Destroy Apply Query Check Change Query again Check Destroy
# LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # OPTIONS_GHC -Wno - orphans # module Declops.Provider.Test where import Autodocodec import Autodocodec.Yaml import Control.Exception import Control.Monad.Logger import Data.Aeson (FromJSON, ToJSON) import Data.Data import Data.Gen...
aff5e96b15c415d9a6b31757cfb2de43c426f66240ca8c63674aec8bc452ce07
bdeket/rktsicm
units.rkt
#lang racket/base (provide (except-out (all-defined-out) assign-operation)) (require (only-in "../rkt/glue.rkt" make-initialized-vector fix:= fix:+) "../general/assert.rkt" "../kernel/generic.rkt" "../kernel/iterat.rkt" "../kernel/types.rkt" "../kernel/nu...
null
https://raw.githubusercontent.com/bdeket/rktsicm/225a43bc3d9953f9dbbdbfb2fa4a50028a7a41ce/rktsicm/sicm/units/units.rkt
racket
; start original file Manipulation of units The units of a quantity are represented as a combination of a (labeled) vector of exponents, one for each base unit in a system, such objects. Multiplication, division, and exponentiation are extended to combine units from the same system. ;;; in types.scm (define un...
#lang racket/base (provide (except-out (all-defined-out) assign-operation)) (require (only-in "../rkt/glue.rkt" make-initialized-vector fix:= fix:+) "../general/assert.rkt" "../kernel/generic.rkt" "../kernel/iterat.rkt" "../kernel/types.rkt" "../kernel/nu...
854bfead2c79884223b695e8d0657444908a7a7d417d9521451a67a02f419f82
ocaml/oasis
test.ml
(******************************************************************************) OASIS : architecture for building OCaml libraries and applications (* *) Copyright ( C ) 2011 - 2016 , Copyrig...
null
https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/test/data/TestFull/bug588/test.ml
ocaml
**************************************************************************** This library is free software; you can redistribute it and/or modify it under the t...
OASIS : architecture for building OCaml libraries and applications Copyright ( C ) 2011 - 2016 , Copyright ( C ) 2008 - 2011 , OCamlCore SARL the Free Software Foundation ; either version 2.1 of the License , or ( at You s...
a3e0195522eba552b0dc1f56c809b2122cc59acb2db5ab67fbf3b115faeedb2c
tweag/lagoon
Group.hs
Copyright 2020 Pfizer Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -2.0 -- Unless required by applicable law or agreed to in writing, software distributed under th...
null
https://raw.githubusercontent.com/tweag/lagoon/2ef0440db810f4f45dbed160b369daf41d92bfa4/server/src/Lagoon/Server/API/Group.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permiss...
Copyright 2020 Pfizer Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , module Lagoon.Server.API.Group (server) where import Servant import Lagoon.Interface import Lagoon.Server.HandlerM import Lagoon.Util.PostgreSQ...
81042f453fa57f57c1e3b4b490f20bd88b5278009e7f1d71a696a6d3554d4dac
Kalimehtar/russian-lang
indent.rkt
#lang racket/base ;; This module provides an indenter for the sweet-exp language. ;; Within a normal s-expression, it uses normal s-expression indentation rules. ;; Otherwise, it leaves code indented the way it was, and indents blank lines ;; and comments to match the indentation of the next expression. (provide inde...
null
https://raw.githubusercontent.com/Kalimehtar/russian-lang/a9660a0777dfdfb2a86aaea22b297c6b769817df/1/indent.rkt
racket
This module provides an indenter for the sweet-exp language. Within a normal s-expression, it uses normal s-expression indentation rules. Otherwise, it leaves code indented the way it was, and indents blank lines and comments to match the indentation of the next expression. indent : (is-a?/c racket:text<%>) exact...
#lang racket/base (provide indent) (require racket/class) This function is used to indent lines in . It is called with the position containing at the beginning of the line or # f. If # f is returned , uses the standard s - expression (define (indent text pos) (if (within-sexp-not-first-line? text pos) ...
71b1a21dfda7d508b0b7befdc9d8dee0170bab6c34bde573b9f9dce321e3f615
mirage/index
log_file.ml
* Copyright ( c ) 2021 Tarides < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND ...
null
https://raw.githubusercontent.com/mirage/index/f359eb825aadd4d553a17176bb39bbd536ed341f/src/log_file.ml
ocaml
* [Bytes.length buf = Entry.encoded_size] * The disk file handler * Pre-allocated [IO.append io] closure NOTE: we use the _uppermost_ bits of the key hash to index the bucket array, so that the hashtbl is approximately sorted by key hash (with only the entries within each bucket being relatively out o...
* Copyright ( c ) 2021 Tarides < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND ...
1032cf11e12c1f018bf1f1ed1c0c6a7e825185e9ae5b2c76cb105c6b67f9929e
darkling/lagra
lagra_parser_turtle_lexer.erl
@private -module(lagra_parser_turtle_lexer). -behaviour(gen_server). %% These macros define sets of characters which can be concatenated %% and put inside a regex character class [] Used in 172s 171s 163s -define(PN_CHARS_U, ?PN_CHARS_BASE++"_"). % 164s -define(PN_CHARS, ?PN_CHARS_U++"0-9\\x{00B7}\...
null
https://raw.githubusercontent.com/darkling/lagra/6827ea20db86aeb4c139db45bd3133ffccfddb7d/src/lagra_parser_turtle_lexer.erl
erlang
These macros define sets of characters which can be concatenated and put inside a regex character class [] 164s 166s 161s These macros define full regular expressions 169s 168s 162s 144s 141s API. gen_server. API. gen_server. The lexer is a mini server for parsing terms incrementally. The server reads ...
@private -module(lagra_parser_turtle_lexer). -behaviour(gen_server). Used in 172s 171s 163s 172s 171s -define(PN_LOCAL, "(?:[0-9:"++?PN_CHARS_U++"]|"++?PLX++")" ++ "(?:(?:[.:"++?PN_CHARS++"]|"++?PLX++")*" -define(PN_PREFIX, "["++?PN_CHARS_BASE++"]" 167s 159s 26 -define(STRING_LITERAL_LONG_QUOT...
63b92ca48e59ae2406b6446f911fe5d11bd41b67b874b1d02da29ce01a0eb646
gstew5/cs4100-public
compile.mli
open Exp val compile_and_print_result : exp -> unit
null
https://raw.githubusercontent.com/gstew5/cs4100-public/53c99e3e87331aa5dfa9161ca350a8e23acee739/compile-example/compile.mli
ocaml
open Exp val compile_and_print_result : exp -> unit
672e7132914246c54cbcebc7c0a75e5bf82dbafd21722beb50012ec67ba5ebac
BranchTaken/Hemlock
test_fmt.ml
open! Basis.Rudiments open! Basis open Real (* The test output is quite large, so only its hash is printed by default. Set verbose to true * while modifying the test or diagnosing regressions. *) let verbose = false let test () = let rec fn xs formatter = match xs with | [] -> formatter | x :: xs' -> ...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/real/test_fmt.ml
ocaml
The test output is quite large, so only its hash is printed by default. Set verbose to true * while modifying the test or diagnosing regressions.
open! Basis.Rudiments open! Basis open Real let verbose = false let test () = let rec fn xs formatter = match xs with | [] -> formatter | x :: xs' -> List.fold ~init:( formatter |> fmt ~alt:true ~radix:Radix.Hex x |> Fmt.fmt "\n" ) [Radix.Bin; Radix.Oct; Radix.Dec; Ra...
e69e8ad070b9f6127346ca6a5a029f31f7ae4641a4228b381767172cefcaf087
discus-lang/ddc
Error.hs
module DDC.Core.Discus.Convert.Error ( ConvertM , Error (..)) where import DDC.Core.Exp import DDC.Data.Pretty import DDC.Core.Check (AnTEC(..)) import DDC.Core.Discus.Prim as E import qualified DDC.Core.Discus.Transform.Curry.Error as ...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core-discus/DDC/Core/Discus/Convert/Error.hs
haskell
| Conversion Monad | Things that can go wrong during the conversion. | The 'Main' module has no 'main' function. | Found unexpected AST node, like `LWithRegion`. | The program is definately not well typed. | The program wasn't normalised, or we don't support the feature. | The program has bottom (missing) type a...
module DDC.Core.Discus.Convert.Error ( ConvertM , Error (..)) where import DDC.Core.Exp import DDC.Data.Pretty import DDC.Core.Check (AnTEC(..)) import DDC.Core.Discus.Prim as E import qualified DDC.Core.Discus.Transform.Curry.Error as ...
7e3bcc896acecd248f28b58eb672c58a68b53e927958f62e2d3920d7fde496f6
kfish/const-math-ghc-plugin
V706.hs
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE ImpredicativeTypes #-} # OPTIONS_GHC -Wall # module ConstMath.PrimRules.V706 ( unaryPrimRules , binaryPrimRules ) where unaryPrimRules :: [(String, (forall a. RealFloat a => a -> a))] unaryPrimRules = [ ("GHC.Prim.expDouble#" , exp) , ("GHC.Prim.logDouble#" , l...
null
https://raw.githubusercontent.com/kfish/const-math-ghc-plugin/c1d269e0ddc72a782c73cca233ec9488f69112a9/ConstMath/PrimRules/V706.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE ImpredicativeTypes # FloatPowerOp DoublePowerOp
# OPTIONS_GHC -Wall # module ConstMath.PrimRules.V706 ( unaryPrimRules , binaryPrimRules ) where unaryPrimRules :: [(String, (forall a. RealFloat a => a -> a))] unaryPrimRules = [ ("GHC.Prim.expDouble#" , exp) , ("GHC.Prim.logDouble#" , log) , ("GHC.Prim.sqrtDouble#" , sqrt) , ("GHC.Prim.sin...
e13d25887a1f8c0d019f607411a32e584a0ab2239f5e81c57a55682cc1a82987
VisionsGlobalEmpowerment/webchange
state.cljs
(ns webchange.lesson-builder.tools.background-music.state (:require [clojure.string :as str] [re-frame.core :as re-frame] [re-frame.std-interceptors :as i] [webchange.lesson-builder.state :as state] [webchange.lesson-builder.layout.stage.state :as stage-state] [webchange.state.warehouse :as wa...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/b13346f1e65cbf90d32a04321d4c5dccdfe01077/src/cljs/webchange/lesson_builder/tools/background_music/state.cljs
clojure
(ns webchange.lesson-builder.tools.background-music.state (:require [clojure.string :as str] [re-frame.core :as re-frame] [re-frame.std-interceptors :as i] [webchange.lesson-builder.state :as state] [webchange.lesson-builder.layout.stage.state :as stage-state] [webchange.state.warehouse :as wa...
3000fb5ee88eb09cb2d73530118fde62f0f348ad5bff62314374e68591df46eb
rtoy/cmucl
cp1257.lisp
;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*- ;;; ;;; ********************************************************************** This code was written by and has been placed in the public ;;; domain. ;;; (ext:file-comment "$Header: src/pcl/simple-streams/external-formats/cp1257.lisp $") (in-package...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/pcl/simple-streams/external-formats/cp1257.lisp
lisp
-*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*- ********************************************************************** domain. See For undefined characters we use U+FFFE
This code was written by and has been placed in the public (ext:file-comment "$Header: src/pcl/simple-streams/external-formats/cp1257.lisp $") (in-package "STREAM") (intl:textdomain "cmucl") (defconstant +ms-cp1257+ (make-array 128 :element-type '(unsigned-byte 16) :initial-contents...
6e8010d39106452536b9fff9a423999744a1636660cead4987e385302875811e
bmeurer/ocamljit2
Exemples.ml
class point x_init = object val mutable x = x_init method get_x = x method move d = x <- x + d end;; let p = new point 7;; p#get_x;; p#move 3;; p#get_x;; let q = Oo.copy p;; q#move 7; p#get_x, q#get_x;; class color_point x (c : string) = object inherit point x val c = c method color = c end;; let p' ...
null
https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/testsuite/tests/typing-objects/Exemples.ml
ocaml
Echec ***************************************************************** ***************************************************************** ***************************************************************** *****************************************************************
class point x_init = object val mutable x = x_init method get_x = x method move d = x <- x + d end;; let p = new point 7;; p#get_x;; p#move 3;; p#get_x;; let q = Oo.copy p;; q#move 7; p#get_x, q#get_x;; class color_point x (c : string) = object inherit point x val c = c method color = c end;; let p' ...
d9ea3af005d88329d09b681399fd70971902e91deafce7eb766bb8307ac41d28
markcox80/basic-binary-ipc
posix-sockets.lisp
(in-package "BASIC-BINARY-IPC") (defgeneric file-descriptor (object) (:documentation "Return the file descriptor of the object.")) (defgeneric namespace (posix-socket) (:documentation "Return the posix namespace used by the POSIX-SOCKET.")) (defgeneric communication-style (posix-socket) (:documentation "Retu...
null
https://raw.githubusercontent.com/markcox80/basic-binary-ipc/9a80a2e0ea9eba94b9bd357917c7066bbdf1b1aa/src/posix-sockets.lisp
lisp
Socket Option arguments Socket options Failed stream - stream protocol Failed IPV4 Stream - This class is for the special situation when the loopback device. If the server does not exist, then some object of type FAILED-IPV4-TCP-STREAM is returned. This shouldn't be necessary but on some systems the socket opt...
(in-package "BASIC-BINARY-IPC") (defgeneric file-descriptor (object) (:documentation "Return the file descriptor of the object.")) (defgeneric namespace (posix-socket) (:documentation "Return the posix namespace used by the POSIX-SOCKET.")) (defgeneric communication-style (posix-socket) (:documentation "Retu...
880b83dd4407e93dafab6fe887386fa2a1469ac498f8e5dd73851f9a147c77b5
donatello/minio-hs-archived
ListOps.hs
module Network.Minio.ListOps where import qualified Data.Conduit as C import qualified Data.Conduit.List as CL import Lib.Prelude import Network.Minio.Data import Network.Minio.S3API -- | List objects in a bucket matching the given prefix. If recurse is -- set to True objects matching ...
null
https://raw.githubusercontent.com/donatello/minio-hs-archived/c808dc1be2a5b15c2c714c0052f1d6a7bc98a809/src/Network/Minio/ListOps.hs
haskell
| List objects in a bucket matching the given prefix. If recurse is set to True objects matching prefix are recursively listed. | List incomplete uploads in a bucket matching the given prefix. If recurse is set to True incomplete uploads for the given prefix are recursively listed. | List object parts of an ongoi...
module Network.Minio.ListOps where import qualified Data.Conduit as C import qualified Data.Conduit.List as CL import Lib.Prelude import Network.Minio.Data import Network.Minio.S3API listObjects :: Bucket -> Maybe Text -> Bool -> C.Producer Minio ObjectInfo listObjects bucket prefix re...
8c417edcec9e15392191f01d5126fdd79c62a37267bcb85a7fcdf12ad0e82838
propella/tamacola
check.scm
;; SRFI-78 style lightweight testing ;; -78/srfi-78.html ;; Usage : ( check ( + 3 4 ) = > 7 ) (define-syntax check (syntax-rules (=>) ((_ expr => expected) (let ((*expr expr) (*expected expected)) (if (equal? *expr *expected) () (check-error 'expr *expr *expected)))))) (define check-er...
null
https://raw.githubusercontent.com/propella/tamacola/b3b200e6ba445ea72ead1cde6d40c5546115e8c3/abcsx/check.scm
scheme
SRFI-78 style lightweight testing -78/srfi-78.html
Usage : ( check ( + 3 4 ) = > 7 ) (define-syntax check (syntax-rules (=>) ((_ expr => expected) (let ((*expr expr) (*expected expected)) (if (equal? *expr *expected) () (check-error 'expr *expr *expected)))))) (define check-error (lambda (expr result expected) (write expr) (d...
5cb2cd443c6039e0bbf793b5fdb190755f4c4127efdb3f4075224be8ea1ca15c
tek/ribosome
Settings.hs
-- |Interpreters for 'Settings' module Ribosome.Interpreter.Settings where import Exon (exon) import Ribosome.Data.PluginName (PluginName (PluginName)) import Ribosome.Data.Setting (Setting (Setting)) import qualified Ribosome.Data.SettingError as SettingError import Ribosome.Data.SettingError (SettingError) import R...
null
https://raw.githubusercontent.com/tek/ribosome/800642404ee8bf6e1d563ad3440d3e191e5be62d/packages/ribosome/lib/Ribosome/Interpreter/Settings.hs
haskell
|Interpreters for 'Settings' |Assemble the name of a setting variable by prefixing the 'Setting' key with the plugin name if the flag is set. |Return the default value for a setting or stop with an error if none is set.
module Ribosome.Interpreter.Settings where import Exon (exon) import Ribosome.Data.PluginName (PluginName (PluginName)) import Ribosome.Data.Setting (Setting (Setting)) import qualified Ribosome.Data.SettingError as SettingError import Ribosome.Data.SettingError (SettingError) import Ribosome.Effect.Settings (Setting...
fb8c58a04d22e87b2a4360cd6f16a69c5c9cdeb69cd0a34b643aa5784a3f01e3
danneu/chaingun
crypto.clj
(ns chaingun.crypto (:require [chaingun.util :refer :all] [clojure.core.typed :refer :all]) (:import [java.security MessageDigest Security] [org.bouncycastle.jce.provider BouncyCastleProvider])) (Security/insertProviderAt (BouncyCastleProvider.) 1) (non-nil-returns [MessageDigest getInsta...
null
https://raw.githubusercontent.com/danneu/chaingun/e25c594152a5584b2af774422e82884b8ab5ad9c/src/chaingun/crypto.clj
clojure
(ns chaingun.crypto (:require [chaingun.util :refer :all] [clojure.core.typed :refer :all]) (:import [java.security MessageDigest Security] [org.bouncycastle.jce.provider BouncyCastleProvider])) (Security/insertProviderAt (BouncyCastleProvider.) 1) (non-nil-returns [MessageDigest getInsta...
4dfc91888e1605f1e860c7a74f98f6e6f629be8193a1be4f5b77a4fd79932ebd
modular-macros/ocaml-macros
pr6865.ml
let%foo x = 42 let%foo _ = () and _ = () let%foo _ = ()
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/parsing/pr6865.ml
ocaml
let%foo x = 42 let%foo _ = () and _ = () let%foo _ = ()
cd93e60544e5014f70b4b54401c68d1bd8cbb1fca349135ad65637a1ab13e7ba
epiccastle/spire
core.clj
(ns spire.pod.core (:refer-clojure :exclude [read-string read]) (:require [bencode.core :refer [read-bencode write-bencode]] [spire.pod.utils :as utils] [spire.pod.lookup :as lookup] [spire.pod.stream] [spire.transport] [spire.ssh] [spire.pod.s...
null
https://raw.githubusercontent.com/epiccastle/spire/3ff1a18a843f56a2a3b0aa646cc3dd8e6ca3891d/src/clj/spire/pod/core.clj
clojure
(.flush System/out) spire.shlex spire.sh spire.local spire.utils output modules spire.pod.stream privates dynamic spire side bb side spire.transport spire.context (utils/make-inlined-public-fns spire.context) spire.state spire.facts fetch-facts pod.epiccastle.spire.facts/fetch-fa...
(ns spire.pod.core (:refer-clojure :exclude [read-string read]) (:require [bencode.core :refer [read-bencode write-bencode]] [spire.pod.utils :as utils] [spire.pod.lookup :as lookup] [spire.pod.stream] [spire.transport] [spire.ssh] [spire.pod.s...
d5e98a15cff20277ba637e5c9872421392fa1d0592c0e1508a35f44c1293fccf
coingaming/lnd-client
TrackPayment.hs
# LANGUAGE FlexibleContexts # module LndClient.Data.TrackPayment ( TrackPaymentRequest (..), ) where import Data.ProtoLens.Message import LndClient.Import import qualified Proto.Routerrpc.Router as LnGRPC import qualified Proto.Routerrpc.Router_Fields as LnGRPC data TrackPaymentRequest = TrackPaymentRequest { ...
null
https://raw.githubusercontent.com/coingaming/lnd-client/98974c514cd82253dbd6111bafbbb2bbff6bffe2/src/LndClient/Data/TrackPayment.hs
haskell
# LANGUAGE FlexibleContexts # module LndClient.Data.TrackPayment ( TrackPaymentRequest (..), ) where import Data.ProtoLens.Message import LndClient.Import import qualified Proto.Routerrpc.Router as LnGRPC import qualified Proto.Routerrpc.Router_Fields as LnGRPC data TrackPaymentRequest = TrackPaymentRequest { ...
2d1c1e5c92c0166c6b2fd3483825710ed8d91ef4cea742dc085bffa64f08d103
jiesoul/soul-talk
app_key_test.clj
(ns soul-talk.routes.site.app-key-test (:require [clojure.test :refer :all] [soul-talk.handler :refer :all] [soul-talk.helper :as h :refer [parse-body]] [soul-talk.utils :as utils] [taoensso.timbre :as log])) (defn context [uri] (str "/app-keys" uri)) (def ^:dynamic...
null
https://raw.githubusercontent.com/jiesoul/soul-talk/630de08c6549b206d59023764d5f2576d97d1030/api/test/soul_talk/routes/site/app_key_test.clj
clojure
(ns soul-talk.routes.site.app-key-test (:require [clojure.test :refer :all] [soul-talk.handler :refer :all] [soul-talk.helper :as h :refer [parse-body]] [soul-talk.utils :as utils] [taoensso.timbre :as log])) (defn context [uri] (str "/app-keys" uri)) (def ^:dynamic...
b8de02367d842d096fd5503bd397020916df27bb20c18c87c5a3239e1f30ba50
LaurentMazare/ocaml-arrow
datatype.ml
open! Base type t = | Null | Boolean | Int8 | Uint8 | Int16 | Uint16 | Int32 | Uint32 | Int64 | Uint64 | Float16 | Float32 | Float64 | Binary | Large_binary | Utf8_string | Large_utf8_string | Decimal128 of { precision : int ; scale : int } | Fixed_width_binary o...
null
https://raw.githubusercontent.com/LaurentMazare/ocaml-arrow/a88aa7b2761c6397cd59ba2d6487f8e5112d7e26/src/wrapper/datatype.ml
ocaml
open! Base type t = | Null | Boolean | Int8 | Uint8 | Int16 | Uint16 | Int32 | Uint32 | Int64 | Uint64 | Float16 | Float32 | Float64 | Binary | Large_binary | Utf8_string | Large_utf8_string | Decimal128 of { precision : int ; scale : int } | Fixed_width_binary o...
fb8a1e4da1bf8646de531ef83eaa78d42f3d15b6f7967163f0cc846e504d9e61
waldheinz/ads
Base64.hs
{-# LANGUAGE OverloadedStrings #-} -- | Freenet's modified Base64 encoding module Freenet.Base64 ( FreenetBase64(..), -- * Integer utilities i2bs, bs2i, bsToPosI, posIToBs ) where import Data.Bits ( shiftL, shiftR ) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import quali...
null
https://raw.githubusercontent.com/waldheinz/ads/7695a157d76f35849351b2e039890eae1b419088/src/lib/Freenet/Base64.hs
haskell
# LANGUAGE OverloadedStrings # | Freenet's modified Base64 encoding * Integer utilities | things that have a special base64 representation in Freenet | convert bytes to Freenet's modified base64 ---------------------------------------------------------------------- base64 encoded integers ------------------------...
module Freenet.Base64 ( FreenetBase64(..), i2bs, bs2i, bsToPosI, posIToBs ) where import Data.Bits ( shiftL, shiftR ) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Lazy.Char8 as BLC import Data.ByteString.Base64 import Data.Monoid ( (<>) ) imp...
d3767144242db3b276bc1ed9f52a87496e881b17ea6d92c9468f11492b192173
ivanjovanovic/sicp
e-5.38.scm
Exercise 5.38 . ; ; Our compiler is clever about avoiding unnecessary stack ; operations, but it is not clever at all when it comes to compiling calls to ; the primitive procedures of the language in terms of the primitive operations ; supplied by the machine. For example, consider how much code is compiled to comp...
null
https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/5.5/e-5.38.scm
scheme
Our compiler is clever about avoiding unnecessary stack operations, but it is not clever at all when it comes to compiling calls to the primitive procedures of the language in terms of the primitive operations supplied by the machine. For example, consider how much code is compiled to primitive addition procedure...
Exercise 5.38 . compute ( + a 1 ): The code sets up an argument list in argl , puts the code for primitive and compound branches ( only one of which will be as 43 (assign val (op lookup-variable-value) (const a) (reg env)) (assign val (op +) (reg val) (const 1)) registers arg1 and . The primitive arithmeti...
d113f0b20eb420ead1d08e323bd380abdc5d590e2921749c28abc9e67a4d6e3e
SKA-ScienceDataProcessor/RC
Util.hs
-- | Functions common to different interpreters module DNA.Util where import Data.Binary.Get import Data.Binary.IEEE754 import qualified Data.ByteString.Lazy as BS import qualified Data.Vector.Storable as S import System.IO readPackedFile :: FilePath -> IO (S.Vector Double) readPackedFile nm = do bs <- BS.readFil...
null
https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS1/distributed-dot-product/DNA/Util.hs
haskell
| Functions common to different interpreters
module DNA.Util where import Data.Binary.Get import Data.Binary.IEEE754 import qualified Data.ByteString.Lazy as BS import qualified Data.Vector.Storable as S import System.IO readPackedFile :: FilePath -> IO (S.Vector Double) readPackedFile nm = do bs <- BS.readFile nm let n = fromIntegral $ BS.length bs `div`...
a61250eefba18c7f37ec726ff4bd8b63acf2796d4289ffb2aa32ef01576e60e5
mars0i/pasta
project.clj
(defproject pasta "1.0" :description "Agent-based simulation with competition between individual learners, assumers, and social learners." :url "" :license {:name "Gnu General Public License version 3.0" :url ""} :dependencies [[org.clojure/clojure "1.10.3"] [org.clojure/math.numeri...
null
https://raw.githubusercontent.com/mars0i/pasta/e835317c932611bfc09cc5a7cdeb4ccc7b6e1339/project.clj
clojure
[criterium "0.4.4"] ; to use, e.g.: (use '[criterium.core :as c]) allows wildcards in resource - paths ( -expand-resource-paths ) :global-vars {*warn-on-reflection* true} :resource-paths ["lib/*"] :main pasta.GUI :aot :all ; wrong order of compilation :aot [utils.random utils.random-utils ; spell out by hand so core ...
(defproject pasta "1.0" :description "Agent-based simulation with competition between individual learners, assumers, and social learners." :url "" :license {:name "Gnu General Public License version 3.0" :url ""} :dependencies [[org.clojure/clojure "1.10.3"] [org.clojure/math.numeri...
3d3f8b02ef6f2296000870383e93abd2f8b401ec079325bd429dccc53735fa98
Clozure/ccl
cocoa-utils.lisp
; -*- Mode: Lisp; Package: GUI -*- ;;; ;;; Copyright 2016 Clozure Associates ;;; 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...
null
https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/cocoa-ide/cocoa-utils.lisp
lisp
-*- Mode: Lisp; Package: GUI -*- Copyright 2016 Clozure Associates 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 expres...
distributed under the License is distributed on an " AS IS " BASIS , (in-package "GUI") (defmethod list-from-ns-array (thing) (error "~S is not an instance of NS:NS-ARRAY" thing)) (defmethod list-from-ns-array ((nsa ns:ns-array)) (let ((result (list)) (c (#/count nsa))) (dotimes (i c) (setf result (pu...
4c33af14685b868850cd5bada894ae64daaf441c78ddb1e3282a86065cb6f860
lemmaandrew/CodingBatHaskell
oneTwo.hs
From Given a string , compute a new string by moving the first char to come after the next two chars , so \"abc\ " yields \"bca\ " . Repeat this process for each subsequent group of 3 chars , so \"abcdef\ " yields \"bcaefd\ " . Ignore any group of fewer than 3 chars at the end . Given a string, compute a n...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/String-2/oneTwo.hs
haskell
From Given a string , compute a new string by moving the first char to come after the next two chars , so \"abc\ " yields \"bca\ " . Repeat this process for each subsequent group of 3 chars , so \"abcdef\ " yields \"bcaefd\ " . Ignore any group of fewer than 3 chars at the end . Given a string, compute a n...
76cab9b0a933a9d780277ad24c28d4f737e5bc1081697b02591a204782588119
Psi-Prod/Mehari
rate_limiter_impl.ml
module type S = sig module IO : Types.IO type t module Addr : Types.ADDR val check : t -> Addr.t Request.t -> Response.t IO.t option val make : ?period:int -> int -> [ `Second | `Minute | `Hour | `Day ] -> t end module Make (Clock : Mirage_clock.PCLOCK) (IO : Types.IO) (Addr : Types.ADDR) : S with modul...
null
https://raw.githubusercontent.com/Psi-Prod/Mehari/6918a45f0674c4b6f063fff4f687f225e84ec4a2/mehari/rate_limiter_impl.ml
ocaml
module type S = sig module IO : Types.IO type t module Addr : Types.ADDR val check : t -> Addr.t Request.t -> Response.t IO.t option val make : ?period:int -> int -> [ `Second | `Minute | `Hour | `Day ] -> t end module Make (Clock : Mirage_clock.PCLOCK) (IO : Types.IO) (Addr : Types.ADDR) : S with modul...
d90b188c013d05beb4328daa87afa3f990d34dc0f34e3b5d07a4625442f3c823
archaelus/webmachine
skel_sup.erl
@author author < > YYYY author . %% @doc Supervisor for the skel application. -module(skel_sup). -author('author <>'). -behaviour(supervisor). %% External exports -export([start_link/0, upgrade/0]). %% supervisor callbacks -export([init/1]). ( ) - > ServerRet %% @doc API for starting the supervisor. sta...
null
https://raw.githubusercontent.com/archaelus/webmachine/1d30b6a1763d6a66664f3aff4c811753e7e1a5ed/priv/skel/src/skel_sup.erl
erlang
@doc Supervisor for the skel application. External exports supervisor callbacks @doc API for starting the supervisor. @doc Add processes if necessary. @doc supervisor callback.
@author author < > YYYY author . -module(skel_sup). -author('author <>'). -behaviour(supervisor). -export([start_link/0, upgrade/0]). -export([init/1]). ( ) - > ServerRet start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). @spec upgrade ( ) - > ok upgrade() -> {ok, {_, Specs...
ba43506cd288bb96968fdb05f076566825603ff5104826a8de56e93fb0c7714a
lep/jhcr
Main.hs
{-# LANGUAGE GADTs #-} # LANGUAGE TemplateHaskell # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE LambdaCase # # LANGUAGE CPP # import Debug.Trace import Data.FileEmbed import Control.Applicative import Control.Monad import Control.Monad.Trans.Except import Control.Monad.IO.Class import Control.Arrow (first, seco...
null
https://raw.githubusercontent.com/lep/jhcr/f2c5e10778cf471da30026bf267ac2b9785fb68c/Main.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # print is used by alloc we don't care about the value, just if it's already initialized or not TODO: handle globals and set their correct value only report globals as fresh once or if their type has changed TODO: need to reload all functions which use that global. ...
# LANGUAGE TemplateHaskell # # LANGUAGE LambdaCase # # LANGUAGE CPP # import Debug.Trace import Data.FileEmbed import Control.Applicative import Control.Monad import Control.Monad.Trans.Except import Control.Monad.IO.Class import Control.Arrow (first, second) import System.IO import System.Exit import System.Fi...
dbd919ec62c66ee112d700c2f4216be53c40e8727ab04f430473d21036058d22
janestreet/universe
type_abstract.mli
(** Abstract types helpers. An abstract type in the sense of the typerep library is a type whose representation is unknown. Such a type has only a name that can be used to provide and register custom implementation of generics. This is typically a type obtained with the following syntax extension: {...
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/typerep/lib/type_abstract.mli
ocaml
* Abstract types helpers. An abstract type in the sense of the typerep library is a type whose representation is unknown. Such a type has only a name that can be used to provide and register custom implementation of generics. This is typically a type obtained with the following syntax extension: {[ ...
module Make0 (X : Named_intf.S0) : Typerepable.S with type t := X.t module Make1 (X : Named_intf.S1) : Typerepable.S1 with type 'a t := 'a X.t module Make2 (X : Named_intf.S2) : Typerepable.S2 with type ('a, 'b) t := ('a, 'b) X.t module Make3 (X : Named_intf.S3) : Typerepable.S3 with type ('a, 'b, 'c) t := ...
bfe24d420aa0a84991490bf9bb9b8052f7b1db9f03c4db37b3928faa3f66b474
ghollisjr/cl-ana
test.lisp
;;;; makeres-macro is a Common Lisp make-like tool for computations. Copyright 2014 ;;;; This file is part of makeres - macro . ;;;; ;;;; makeres-macro 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 , ...
null
https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/makeres-macro/tests/test.lisp
lisp
makeres-macro is a Common Lisp make-like tool for computations. makeres-macro is free software: you can redistribute it and/or modify it (at your option) any later version. makeres-macro is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN...
Copyright 2014 This file is part of makeres - macro . 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 along with makeres - macro . If not , see < / > . ...