_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
315431e5019516ab3fdcf816f0a26f343e9d16984d23e769072fee51044ac3d3
broom-lang/broom
Util.mli
open Streaming type document = PPrint.document type plicity = Explicit | Implicit val is_implicit : plicity -> bool val plicity_arrow : plicity -> document type span = Lexing.position * Lexing.position val span_to_string : span -> string type 'a with_pos = {v : 'a; pos: span} val ccvector_to_source : ('a, 'mut) ...
null
https://raw.githubusercontent.com/broom-lang/broom/fb1c7dcc42970442bf288a02623788d1572798fb/compiler/lib/Util/Util.mli
ocaml
open Streaming type document = PPrint.document type plicity = Explicit | Implicit val is_implicit : plicity -> bool val plicity_arrow : plicity -> document type span = Lexing.position * Lexing.position val span_to_string : span -> string type 'a with_pos = {v : 'a; pos: span} val ccvector_to_source : ('a, 'mut) ...
8a328f18c3d3aa2d56b4e664f68b878fa040c971231bf2b13a136f1217681a82
saebyn/raft
leader.clj
(ns raft.leader (:require [clojure.tools.logging :as l] [raft.core :refer [send-rpc-to-all send-rpc persist last-index last-term apply-commits]]) (:import [raft.core Raft Entry])) (defprotocol ILeader (become-candidate [raft] "Makes the raft a candidate.") (become-lea...
null
https://raw.githubusercontent.com/saebyn/raft/d739a54ff2754471b7a9b6a8408f927f203f1de8/src/raft/leader.clj
clojure
Update current term to newest Add the vote, if granted Votes for our election, include a vote for ourself. The highest seen term, initially the known current term. Block only until the election timeout expires. Notice that while we use the election timeout, we don't subtract from it. This lets us reuse it in the...
(ns raft.leader (:require [clojure.tools.logging :as l] [raft.core :refer [send-rpc-to-all send-rpc persist last-index last-term apply-commits]]) (:import [raft.core Raft Entry])) (defprotocol ILeader (become-candidate [raft] "Makes the raft a candidate.") (become-lea...
bc4771292bc92793c824ab03ec0efe4315cdfa3a6f026c0e0cc5c323482165b5
RailsOnLisp/thot
thot-threaded.lisp
;; ;; Thot - http web server Copyright 2017,2018 Thomas de Grivel < > 0614550127 ;; (in-package :thot) (defparameter *init-threads* 8) (defun make-worker-threads (fd n pipe-in) (declare (type fixnum n)) (let ((threads ()) (listen-fds ())) (dotimes (i n) (let ((thread-fd (unistd:dup fd))) ...
null
https://raw.githubusercontent.com/RailsOnLisp/thot/9cfb6c228753a752d9326a8b39a77b77f790263c/thot-threaded.lisp
lisp
Thot - http web server (untrace start acceptor-loop-threaded read write set-nonblocking socket:socket socket:bind socket:listen socket:accept unistd:close unistd:select)
Copyright 2017,2018 Thomas de Grivel < > 0614550127 (in-package :thot) (defparameter *init-threads* 8) (defun make-worker-threads (fd n pipe-in) (declare (type fixnum n)) (let ((threads ()) (listen-fds ())) (dotimes (i n) (let ((thread-fd (unistd:dup fd))) (push thread-fd listen-fds...
791b35571bec35f4a89839dd0eed9c88cdb559e5a6824b7b5e17419f7de771a6
5HT/ant
FontPK.ml
open XNum; open Substitute; open GlyphMetric; open FontMetric; value rec read_nybbles ic len = do { if len = 0 then [] else do { let c = IO.read_be_u8 ic; [c / 16; c mod 16 :: read_nybbles ic (len-1)] } }; value read_packed_num dyn_f nybbles = match nybbles with [ [] -> (0, []) | [i::ns] ->...
null
https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Runtime/FontPK.ml
ocaml
repeat command comment checksum
open XNum; open Substitute; open GlyphMetric; open FontMetric; value rec read_nybbles ic len = do { if len = 0 then [] else do { let c = IO.read_be_u8 ic; [c / 16; c mod 16 :: read_nybbles ic (len-1)] } }; value read_packed_num dyn_f nybbles = match nybbles with [ [] -> (0, []) | [i::ns] ->...
628930487c838f77f49e180bf4e2f8a85a95f25b9fa6abb3ea87e3e4aedb7943
Bike/introspect-environment
test.lisp
(defpackage #:introspect-environment-test (:use #:cl #:introspect-environment #:5am)) (in-package #:introspect-environment-test) (def-suite :introspect-environment) (in-suite :introspect-environment) (deftype foo (&optional dim) `(array integer ,dim)) (deftype bar () '(foo (7))) (defvar *x*) (defconstant +y+ t) ...
null
https://raw.githubusercontent.com/Bike/introspect-environment/e3885d0c8d7efeefeefb6cb911587280ed584fc1/test.lisp
lisp
might need to change this if an impl implements array as a macro which is unlikely, of course, but... sorry for the ``` programming the rest are all in ,name's. misses mult values hypothetically an implementation could have some tighter type, sbcl does normalization to its weird ideas about VALUES. sbcl does no...
(defpackage #:introspect-environment-test (:use #:cl #:introspect-environment #:5am)) (in-package #:introspect-environment-test) (def-suite :introspect-environment) (in-suite :introspect-environment) (deftype foo (&optional dim) `(array integer ,dim)) (deftype bar () '(foo (7))) (defvar *x*) (defconstant +y+ t) ...
ca0b2a5aba213545426cb5479efe75807007834a4c2dddcba3a1a73b4b09d077
ocaml-ppx/ocamlformat
test_conf.ml
open Ocamlformat_lib let find name = List.find (fun Conf_decl.UI.{names; _} -> List.exists (String.equal name) names ) let test_ui = let test test_name opt ~names:expected_names = ( test_name , `Quick , fun () -> let Conf_decl.UI.{names; _} = opt in Alcotest.check Alcotest.(list ...
null
https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/39c6197eb2a8f27d7fd64035f5fb6a52a598845c/test/unit/test_conf.ml
ocaml
open Ocamlformat_lib let find name = List.find (fun Conf_decl.UI.{names; _} -> List.exists (String.equal name) names ) let test_ui = let test test_name opt ~names:expected_names = ( test_name , `Quick , fun () -> let Conf_decl.UI.{names; _} = opt in Alcotest.check Alcotest.(list ...
a8b0459b97ef5e115f3ccb8260322029402a321c782c6a0a3a633764a282573c
tiagodalloca/city-weather-clj
util.clj
(ns city-weather-clj.util (:import (javax.xml.bind DatatypeConverter) (java.util.concurrent TimeUnit) (java.util Date Calendar))) (defn now-date [] (Date.)) (defn get-timestamp ([date] (let [tz (java.util.TimeZone/getTimeZone "UTC") df (new java.text.SimpleDateFormat "yyyy-MM-...
null
https://raw.githubusercontent.com/tiagodalloca/city-weather-clj/de41488eba926abe6b8dfeec67fdad7c718dbd8f/src/city_weather_clj/util.clj
clojure
(ns city-weather-clj.util (:import (javax.xml.bind DatatypeConverter) (java.util.concurrent TimeUnit) (java.util Date Calendar))) (defn now-date [] (Date.)) (defn get-timestamp ([date] (let [tz (java.util.TimeZone/getTimeZone "UTC") df (new java.text.SimpleDateFormat "yyyy-MM-...
7e16d7f67beb52bfacd07a97e20e309737e3d33ff2622e608be03e83124b9388
metaocaml/ber-metaocaml
t021-pushconst3.ml
TEST include tool - ocaml - lib flags = " -w a " ocaml_script_as_argument = " true " * setup - ocaml - build - env * * include tool-ocaml-lib flags = "-w a" ocaml_script_as_argument = "true" * setup-ocaml-build-env ** ocaml *) let _ = () in 3;; * 0 1 PUSHCONST3 2 POP 1 ...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/tool-ocaml/t021-pushconst3.ml
ocaml
TEST include tool - ocaml - lib flags = " -w a " ocaml_script_as_argument = " true " * setup - ocaml - build - env * * include tool-ocaml-lib flags = "-w a" ocaml_script_as_argument = "true" * setup-ocaml-build-env ** ocaml *) let _ = () in 3;; * 0 1 PUSHCONST3 2 POP 1 ...
d1585e996a6154c046ddbca13c7ed522c82129ef5d38f82f941e7f0f5d8e5c55
CIFASIS/QuickFuzz
Python.hs
# LANGUAGE TemplateHaskell # # LANGUAGE FlexibleInstances # # LANGUAGE IncoherentInstances # # LANGUAGE DeriveGeneric # module Test.QuickFuzz.Gen.Code.Python (pyInfo) where import Data.Default import Test.QuickCheck import Data.ByteString.Lazy.Char8 as L8 import Data.ByteString.Lazy as L import Data.Text (unpack) i...
null
https://raw.githubusercontent.com/CIFASIS/QuickFuzz/a1c69f028b0960c002cb83e8145f039ecc0e0a23/src/Test/QuickFuzz/Gen/Code/Python.hs
haskell
# LANGUAGE TemplateHaskell # # LANGUAGE FlexibleInstances # # LANGUAGE IncoherentInstances # # LANGUAGE DeriveGeneric # module Test.QuickFuzz.Gen.Code.Python (pyInfo) where import Data.Default import Test.QuickCheck import Data.ByteString.Lazy.Char8 as L8 import Data.ByteString.Lazy as L import Data.Text (unpack) i...
2fe915b19cc1a074f7d2242fecb652e85533cd701a4924409c4c4c6442b89c23
evincarofautumn/kitten
Free.hs
| Module : Kitten . Free Description : Free variables of a type Copyright : ( c ) , 2016 License : MIT Maintainer : Stability : experimental Portability : GHC Module : Kitten.Free Description : Free variables of a type Copyright : (c) Jon Purdy, 2016 License : MIT Mainta...
null
https://raw.githubusercontent.com/evincarofautumn/kitten/a5301fe24dbb9ea91974abee73ad544156ee4722/lib/Kitten/Free.hs
haskell
| Just the free variables of a type, without their kinds. | Finds free variables (those not bound by any quantifier) and returns them along with their kinds.
| Module : Kitten . Free Description : Free variables of a type Copyright : ( c ) , 2016 License : MIT Maintainer : Stability : experimental Portability : GHC Module : Kitten.Free Description : Free variables of a type Copyright : (c) Jon Purdy, 2016 License : MIT Mainta...
aa884d083c5399931bb9f7ca89bf9778de19a43727c2e87f73fb19e701049a69
pbrisbin/google-drive
File.hs
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # -- | -- Methods for working with File resources on Google Drive . -- -- -- -- This module is mostly concerned with creating and updating metadata. See @"Network . Google . Drive . Upload"@ for uploading c...
null
https://raw.githubusercontent.com/pbrisbin/google-drive/7ecfa5e60658758674c521bbeb81be740e6d0b10/src/Network/Google/Drive/File.hs
haskell
# LANGUAGE OverloadedStrings # | This module is mostly concerned with creating and updating metadata. See * File Resource * Building @File@s * Actions * Utilities | An existing file fileSize is a String! | Create a @File@ from @FileData@ | Update a @File@ | Delete a @File@ | Download a @File@ Ret...
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE RecordWildCards # Methods for working with File resources on Google Drive . @"Network . Google . Drive . Upload"@ for uploading content . module Network.Google.Drive.File ( File(..) , FileId , FileData(..) , FileTitle , MimeType ...
63c7b4a7a59fc1bf4c9dc73897d58a2a05738eeb9fb0204a9cf866e0635387c1
polysemy-research/polysemy-zoo
MonadError.hs
# LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # module Polysemy.ConstraintAbsorber.MonadError ( absorbError ) where import qualified Control.Monad.Error.Class as S import Polysemy impo...
null
https://raw.githubusercontent.com/polysemy-research/polysemy-zoo/eb0ce40e4d3b9757ede851a3450c05cc42949b49/src/Polysemy/ConstraintAbsorber/MonadError.hs
haskell
---------------------------------------------------------------------------- | Introduce a local 'S.MonadError' constraint on 'Sem' --- allowing it to ^ A computation that requires an instance of 'S.MonadError' for 'Sem'. This might be something with type @'S.MonadError' e m => m a@. -------------------------------...
# LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # module Polysemy.ConstraintAbsorber.MonadError ( absorbError ) where import qualified Control.Monad.Error.Class as S import Polysemy impo...
eb39295d2f0faec3ad5074d0776c8f59a9641be3231d1267027b9ee81965fa6b
Idorobots/spartan
exceptions.rkt
#lang racket ;; Exception handling stuff. (require "processes.rkt") (require "scheduler.rkt") (provide &error-handler &set-error-handler!) (define (&error-handler) (uproc-error-handler (current-task))) (define (&set-error-handler! handler) (set-uproc-error-handler! (current-task) handler))
null
https://raw.githubusercontent.com/Idorobots/spartan/ef3b032906655585d284f1c9a33a58f1e35cb180/src/runtime/exceptions.rkt
racket
Exception handling stuff.
#lang racket (require "processes.rkt") (require "scheduler.rkt") (provide &error-handler &set-error-handler!) (define (&error-handler) (uproc-error-handler (current-task))) (define (&set-error-handler! handler) (set-uproc-error-handler! (current-task) handler))
b2b8ff4d6684f961d6d34011de09416c06a225699f1b3891bf34947f5039a398
tfausak/rattletrap
Option.hs
module Rattletrap.Console.Option where import qualified Rattletrap.Console.Flag as Flag import qualified System.Console.GetOpt as Console type Option = Console.OptDescr Flag.Flag all :: [Option] all = [compact, fast, help, input, mode, output, schema, skipCrc, version] compact :: Option compact = Console.Option ...
null
https://raw.githubusercontent.com/tfausak/rattletrap/cc6d6aba923d840f23de7673cab9a043096d3099/src/lib/Rattletrap/Console/Option.hs
haskell
module Rattletrap.Console.Option where import qualified Rattletrap.Console.Flag as Flag import qualified System.Console.GetOpt as Console type Option = Console.OptDescr Flag.Flag all :: [Option] all = [compact, fast, help, input, mode, output, schema, skipCrc, version] compact :: Option compact = Console.Option ...
fce8992bd17e02c002034bb7f37f1cfd5fc614fd831f2a5b486dfb5a311a3877
Makell-Digital/servant-persistent-template
SignUpUser.hs
{-# LANGUAGE RankNTypes #-} module Authentication.Domain.Commands.SignUpUser where import Authentication.Domain.Models (AuthenticatedUser (..), SignUp, CreateUserBySignup, ErrInsertUser) import Servant.Auth.Server import Base.Error (Err) import Control.Monad ((>=>)) validateUser :: (Monad m) => Either (Err ErrInsert...
null
https://raw.githubusercontent.com/Makell-Digital/servant-persistent-template/b299edb81b9335ce12c5c01aa9ab3059faff15e1/src/Authentication/Domain/Commands/SignUpUser.hs
haskell
# LANGUAGE RankNTypes #
module Authentication.Domain.Commands.SignUpUser where import Authentication.Domain.Models (AuthenticatedUser (..), SignUp, CreateUserBySignup, ErrInsertUser) import Servant.Auth.Server import Base.Error (Err) import Control.Monad ((>=>)) validateUser :: (Monad m) => Either (Err ErrInsertUser) AuthenticatedUser -> m...
bf1fbbb121e723f6dd417a20f145ead01bb1319d66c4f71488ec231f8660e9c5
mirage/mirage-net
mirage_net.ml
* Copyright ( c ) 2011 - 2015 Anil Madhavapeddy < > * Copyright ( c ) 2013 - 2015 < > * Copyright ( c ) 2013 Citrix Systems Inc * Copyright ( c ) 2018 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted ...
null
https://raw.githubusercontent.com/mirage/mirage-net/ea713a6c916118e7ca10406a93eb8af5bdef1df9/src/mirage_net.ml
ocaml
* Copyright ( c ) 2011 - 2015 Anil Madhavapeddy < > * Copyright ( c ) 2013 - 2015 < > * Copyright ( c ) 2013 Citrix Systems Inc * Copyright ( c ) 2018 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted ...
6a31b18484f6bb6a3a2c9706ea9ed6e7b1bc2a48e1995093f2ae8fefe9287cfa
kazu-yamamoto/dns
Resolver.hs
module Network.DNS.Types.Resolver where import Network.Socket (AddrInfo(..), PortNumber, HostName) import Network.DNS.Imports import Network.DNS.Memo import Network.DNS.Types.Internal ---------------------------------------------------------------- -- | The type to specify a cache server. data FileOrNumericHost = R...
null
https://raw.githubusercontent.com/kazu-yamamoto/dns/067e91ae552d70eaeea890b2c78f983519a824db/internal/Network/DNS/Types/Resolver.hs
haskell
-------------------------------------------------------------- | The type to specify a cache server. ^ A path for \"resolv.conf\" on Unix. Default DNS servers are automatically detected the value of the file name. ^ A numeric IP address. /Warning/: host names are invalid. ^ Numeric IP addresses. /Warning/: host...
module Network.DNS.Types.Resolver where import Network.Socket (AddrInfo(..), PortNumber, HostName) import Network.DNS.Imports import Network.DNS.Memo import Network.DNS.Types.Internal where one or more IP addresses of DNS servers should be found on Windows regardless of deriving Show ...
3a988b60bba0ddff3590bcf2e5ae86f92f8346d7cde246c569a4eb45c7dc16c0
sky-big/RabbitMQ
rabbit_tracing_wm_file.erl
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in %% compliance with the License. You may obtain a copy of the License at %% / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITH...
null
https://raw.githubusercontent.com/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/plugins-src/rabbitmq-tracing/src/rabbit_tracing_wm_file.erl
erlang
compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. 读取某个跟踪信息文件的内容的处理模块 -----------------------------------------------------...
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is GoPivotal , In...
4ed53faa090ec93940130e594c0c42642b229fe8608227200949b18999f883a4
wangzhe3224/cs3110
test.ml
open OUnit2 open Ast open Main let code_part (Closure (x, e, _)) = Fun (x, e) * [ make n s1 s2 ] makes an OUnit test named [ n ] that expects [ s2 ] to evalute to [ s1 ] . [s2] to evalute to [s1]. *) let make n s1 s2 = n >:: (fun _ -> assert_equal (parse s1) (s2 |> interp |> code_part)) * [ make_unboun...
null
https://raw.githubusercontent.com/wangzhe3224/cs3110/33c1b9662ee5ba4bd13d7ec5a116b539bf086605/lambda-env/test.ml
ocaml
* This test suite is imperfect in that it only checks the code part of closures, not the environment part, for correctness. lexical scope
open OUnit2 open Ast open Main let code_part (Closure (x, e, _)) = Fun (x, e) * [ make n s1 s2 ] makes an OUnit test named [ n ] that expects [ s2 ] to evalute to [ s1 ] . [s2] to evalute to [s1]. *) let make n s1 s2 = n >:: (fun _ -> assert_equal (parse s1) (s2 |> interp |> code_part)) * [ make_unboun...
09ea408024dc82077f1f44d333bbf2c7223adfa4fd7bb6c04979d5c4416cd34d
karlhof26/gimp-scheme
lightsaber-effect.130.scm
; The GIMP -- an image manipulation program Copyright ( C ) 1995 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 ...
null
https://raw.githubusercontent.com/karlhof26/gimp-scheme/2e8234da38449662d301eae0bcaf834222b72c2d/lightsaber-effect.130.scm
scheme
The GIMP -- an image manipulation program This program is free software; you can redistribute it and/or modify either version 2 of the License , or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of ...
Copyright ( C ) 1995 and it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License Foundation , Inc. , 675 Mass Ave , Cambridge , , USA . Lightsaber Effect - Creates a lightsaber effect . by < > Updates for st...
d2e6e976de53f7221732a9420be5cffebc15134681838d45a1f885ce4775ae88
rpgoldman/pddl-tools
pddl-pprint.lisp
;;; ------------------------------------------------------------------------- Copyright 2011 - 2016 , SIFT , LLC , , and Available under the BSD 3 - clause license , see license.txt ;;;--------------------------------------------------------------------------- (in-package :pddl-pprinter) (defvar *pddl-packag...
null
https://raw.githubusercontent.com/rpgoldman/pddl-tools/0daf06dbbae9024e31558bba570516ffd0522c20/pddl/pddl-pprint.lisp
lisp
------------------------------------------------------------------------- --------------------------------------------------------------------------- --------------------------------------------------------------------------- --------------------------------------------------------------------------- -----------------...
Copyright 2011 - 2016 , SIFT , LLC , , and Available under the BSD 3 - clause license , see license.txt (in-package :pddl-pprinter) (defvar *pddl-package* :pddl) (defvar *is-problem* nil) (defvar *is-domain* nil) (defvar *canonical* nil "Print typed lists in CANONICAL form instead of MINIMAL form.") (de...
934ed2480b133ccc83ca15f668b00c0f04c368554a5be6f9ecb9d324d03fbcd4
hasufell/hpath
CreateDirIfMissingSpec.hs
{-# LANGUAGE OverloadedStrings #-} module System.Posix.RawFilePath.Directory.CreateDirIfMissingSpec where import Test.Hspec import System.IO.Error ( ioeGetErrorType ) import GHC.IO.Exception ( IOErrorType(..) ) import Utils upTmpDir :: IO () upTmpDir = do setTmpDir "CreateDirIfMissingSpec" cre...
null
https://raw.githubusercontent.com/hasufell/hpath/9fcc1890596e5b838bf3be9ed303165fbc692d11/hpath-directory/test/System/Posix/RawFilePath/Directory/CreateDirIfMissingSpec.hs
haskell
# LANGUAGE OverloadedStrings # successes -- posix failures --
module System.Posix.RawFilePath.Directory.CreateDirIfMissingSpec where import Test.Hspec import System.IO.Error ( ioeGetErrorType ) import GHC.IO.Exception ( IOErrorType(..) ) import Utils upTmpDir :: IO () upTmpDir = do setTmpDir "CreateDirIfMissingSpec" createTmpDir setupFiles :: IO () setu...
901a32d31a942adebffc2b3fc51427c16c99fc5ca9c010a3d601b753c43d6077
quchen/stgi
Evaluate.hs
# LANGUAGE OverloadedLists # | Evaluate STG ' Program 's . module Stg.Machine.Evaluate ( evalStep, ) where import Data.Foldable import qualified Data.Stack as S import qualified Stg.Machine.Evaluate.ErrorTransitions as Error import qualified Stg.Machine.Evaluate.ValidTransitions as...
null
https://raw.githubusercontent.com/quchen/stgi/dacd45cb0247f73889713dc92a911aaa835afd19/src/Stg/Machine/Evaluate.hs
haskell
help if none of them applies. This is the place to modify the ruleset of the machine, for example 'Valid.rule1819' can be removed to yield a less efficient, yet equally precedence over it in certain cases! | Fallback if none of the known rules applies.
# LANGUAGE OverloadedLists # | Evaluate STG ' Program 's . module Stg.Machine.Evaluate ( evalStep, ) where import Data.Foldable import qualified Data.Stack as S import qualified Stg.Machine.Evaluate.ErrorTransitions as Error import qualified Stg.Machine.Evaluate.ValidTransitions as...
2d3b39b869d56f495585678b4e4b2605b58e6357cd926248427a5c51b3b32612
ghcjs/ghcjs-dom
SVGComponentTransferFunctionElement.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.SVGComponentTransferFunctionElement (pattern SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN, ...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGComponentTransferFunctionElement.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/SVGComponentTransferFunctionElement.tableValues Mozilla SVGComponentTransferFunctionElement.tableValues documentation> | <-US/docs/Web/API/SVGComponentTransferFunctionElement.slope Mozilla SVGComponentTra...
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.SVGComponentTransferFunctionElement (pattern SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN, pattern SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY, pattern SVG_FECOMPONENTTRANSFER_TYPE_TAB...
c169f2b43b926b215b2c66418d978a8bdfc8b896d1ca854f86b4fb8d926f8520
macourtney/Conjure
app.clj
(ns flows.app (:use conjure.flow.base))
null
https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_test/test/flows/app.clj
clojure
(ns flows.app (:use conjure.flow.base))
e35b40a38a25e02d4cc144f2b6c5209608a30f5ea200c34561ab23af9262a25e
scicloj/metamorph.ml
classification.clj
(ns scicloj.metamorph.ml.classification (:require [tech.v3.dataset :as ds] [tech.v3.datatype.pprint :as dtype-pp])) (defn- safe-inc [item] (if item (inc item) 1)) (defn confusion-map ([predicted-labels labels normalize] (let [answer-counts (frequencies labels)] ...
null
https://raw.githubusercontent.com/scicloj/metamorph.ml/795ac6b0618a510e91ca3e0c5c9a01523e32d827/src/scicloj/metamorph/ml/classification.clj
clojure
Ensure order is consistent
(ns scicloj.metamorph.ml.classification (:require [tech.v3.dataset :as ds] [tech.v3.datatype.pprint :as dtype-pp])) (defn- safe-inc [item] (if item (inc item) 1)) (defn confusion-map ([predicted-labels labels normalize] (let [answer-counts (frequencies labels)] ...
e07c164ed7ce594421ff2afdb13136c939ae6ca9984b4afbbcaadd3380689bc8
clojure-emacs/cider-nrepl
cljs_inspect_test.clj
(ns cider.nrepl.middleware.cljs-inspect-test (:require [cider.nrepl.middleware.inspect :as i] [cider.nrepl.piggieback-test :refer [piggieback-fixture]] [cider.nrepl.test-session :as session] [clojure.edn :as edn] [clojure.test :refer :all])) (def nil-result '["nil" (:newline)]) (def var-result '(...
null
https://raw.githubusercontent.com/clojure-emacs/cider-nrepl/befad4d1ba14dba6cd9694c6fc12d816fad93c49/test/cljs/cider/nrepl/middleware/cljs_inspect_test.clj
clojure
integration tests
(ns cider.nrepl.middleware.cljs-inspect-test (:require [cider.nrepl.middleware.inspect :as i] [cider.nrepl.piggieback-test :refer [piggieback-fixture]] [cider.nrepl.test-session :as session] [clojure.edn :as edn] [clojure.test :refer :all])) (def nil-result '["nil" (:newline)]) (def var-result '(...
30f5bd5919b3351cae0540bf474e6cfed1250987b5c5f55f4eea8d40b679c610
bobzhang/fan
parse_parse.mli
* The front - end of Fan 's gram DDSL open Astf * parse the header , return the current [ grammar ] and previous module name , it has side effect , and can not be used alone { [ with str t extend_header % { U.M } ; - : Astf.ident option * Astf.ident = ( None , ` Uid ( , ...
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/cold/parse_parse.mli
ocaml
* parse qualified [X.Y.g] {[ with str t qualid %{ A.B.g }; - : Astf.ident = `Dot (, `Uid (, "A"), `Dot (, `Uid (, "B"), `Lid (, "g"))) ]} * parse qualified path ending with [X.t] {[ with str t t_qualid %{ A.U.t }; - : Astf.ident = `Dot (, `Uid (, "A"), `Uid (, "U")) ]} val en...
* The front - end of Fan 's gram DDSL open Astf * parse the header , return the current [ grammar ] and previous module name , it has side effect , and can not be used alone { [ with str t extend_header % { U.M } ; - : Astf.ident option * Astf.ident = ( None , ` Uid ( , ...
2a0585340d6c4ed55134d7eee9b00dca00e0f71634e385527b703c40ced7b31b
sbtourist/clamq
utils.clj
(ns clamq.internal.utils) (defn receiver-seq [request-queue timeout] (lazy-seq (if-let [m (.poll request-queue timeout java.util.concurrent.TimeUnit/MILLISECONDS)] (cons m (receiver-seq request-queue timeout)) nil)))
null
https://raw.githubusercontent.com/sbtourist/clamq/34a6bbcb7a2a431ea629aa5cfbc687ef31f860f2/clamq-core/src/clamq/internal/utils.clj
clojure
(ns clamq.internal.utils) (defn receiver-seq [request-queue timeout] (lazy-seq (if-let [m (.poll request-queue timeout java.util.concurrent.TimeUnit/MILLISECONDS)] (cons m (receiver-seq request-queue timeout)) nil)))
c649e2ee9c4f05565912186539021e196df6405682d7432c4f0498e2f879a994
wilkerlucio/js-data-interop
project.clj
(defproject com.wsscode/js-data-interop "0.0.2" :description "Library to provide alternative tools to interop between Clojurescript immutable data structures and JSON." :url "-data-interop" :license {:name "MIT" :url ""} :source-paths ["src/main"] :dependencies [[org.clojure/clojure "1.10.0" :s...
null
https://raw.githubusercontent.com/wilkerlucio/js-data-interop/92632c4d8de8ab648e4fe2cf367ebc2193239739/project.clj
clojure
(defproject com.wsscode/js-data-interop "0.0.2" :description "Library to provide alternative tools to interop between Clojurescript immutable data structures and JSON." :url "-data-interop" :license {:name "MIT" :url ""} :source-paths ["src/main"] :dependencies [[org.clojure/clojure "1.10.0" :s...
1969a0aebb2836a76fd17e60707dbafa3a8b14e308a2e3f943ab6a99720b495d
kongeor/evolduo-app
user.clj
(ns evolduo-app.views.user (:require [evolduo-app.image :as image] [evolduo-app.views.common :refer [base-view]] [evolduo-app.model.captcha :as captcha] [ring.middleware.anti-forgery :as anti-forgery])) (defn login-form [req & {:keys [login notification]}] (base-view req ...
null
https://raw.githubusercontent.com/kongeor/evolduo-app/e97e389e3ce7edf06a4e6fc0ad4de8a273ef229f/src/evolduo_app/views/user.clj
clojure
TODO show verified flag
(ns evolduo-app.views.user (:require [evolduo-app.image :as image] [evolduo-app.views.common :refer [base-view]] [evolduo-app.model.captcha :as captcha] [ring.middleware.anti-forgery :as anti-forgery])) (defn login-form [req & {:keys [login notification]}] (base-view req ...
14bcec8727a0230aeb2dc07de0aaeb67d03fc2b0a078dca6c919565390fa79b5
AshleyYakeley/Truth
Base.hs
{-# OPTIONS -fno-warn-orphans #-} module Pinafore.Language.Library.Base ( baseLibSections , showableSubtypeRelationEntry , literalSubtypeRelationEntry ) where import Changes.Core import Changes.World.Clock import qualified Data.Text import Data.Time import Pinafore.Base import Pinafore.Language.Conver...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/ecacfea61f96a9f925606ff06020f4fbcdd37159/Pinafore/pinafore-language/lib/Pinafore/Language/Library/Base.hs
haskell
# OPTIONS -fno-warn-orphans # plainFormattingDef @NominalDiffTime "a duration"
module Pinafore.Language.Library.Base ( baseLibSections , showableSubtypeRelationEntry , literalSubtypeRelationEntry ) where import Changes.Core import Changes.World.Clock import qualified Data.Text import Data.Time import Pinafore.Base import Pinafore.Language.Convert import Pinafore.Language.Convert...
eab041f13f3002310a80c8642da43651e5859a76ec02afb6bed3f35d8d05745c
Ledest/otpbp
otpbp_uri_string.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2017 - 2018 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/Ledest/otpbp/f93923239b33cc05500733027e6e775090ac80ad/src/otpbp_uri_string.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 2017 - 2018 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , [ RFC 3986 , Chapter 2.2 . Reserved Characters ] [ RFC 3986 , Chapter 2.3 . Unreserved Characters ] [ RFC 3986 ...
f18e2f44927ff09ff094d56644b1df7ffe2f9bb1ca1ded94c3b5a59050d15bf6
ndmitchell/shake
Match.hs
-- | Test the rule matching facilities - alternatives, priority etc. module Test.Match(main) where import Development.Shake import Test.Type main = testBuild test $ do let output x file = writeFile' file x ["or*","*or"] |%> output "" alternatives $ do "alternative.t*" %> output "alternative.t*...
null
https://raw.githubusercontent.com/ndmitchell/shake/99c5a7a4dc1d5a069b13ed5c1bc8e4bc7f13f4a6/src/Test/Match.hs
haskell
| Test the rule matching facilities - alternatives, priority etc.
module Test.Match(main) where import Development.Shake import Test.Type main = testBuild test $ do let output x file = writeFile' file x ["or*","*or"] |%> output "" alternatives $ do "alternative.t*" %> output "alternative.t*" "alternative.*" %> output "alternative.*" priority 100...
b1af93974d0f87d7a93a61db2a7f81aa299d3fd24cde545469ccc897c835c75d
adnelson/nixfromnpm
Wrappers.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} module Filesystem.Path.Wrappers where import ClassyPrelude hiding (FilePath, unpack, (</>), readFile, readFileUtf8, writeFile, writeFileUtf8) import qualified ClassyPrelu...
null
https://raw.githubusercontent.com/adnelson/nixfromnpm/4ab773cdead920d2312e864857fabaf5f739a80e/src/Filesystem/Path/Wrappers.hs
haskell
# LANGUAGE OverloadedStrings # | Take a function that takes a string path and returns something, and | Makes a nix regular path expression from a filepath. | Makes a nix regular path expression from a filepath. | Wraps a function generated by cabal. Returns path to a data file. | Write some stuff to disk. | Write...
# LANGUAGE NoImplicitPrelude # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # module Filesystem.Path.Wrappers where import ClassyPrelude hiding (FilePath, unpack, (</>), readFile, readFileUtf8, writeFile, writeFileUtf8) import qualified ClassyPrelude as CP import Data.Text hiding (m...
eb3f31d55604cbde606ce7de837f261575c974884c49303b3020675129f66138
evansb/cis194-hw
Fibonacci.hs
# LANGUAGE FlexibleInstances # # OPTIONS_GHC -fno - warn - missing - methods # fib:: Integer -> Integer fib 0 = 0 fib 1 = 1 fib n = fib (n - 1) + fib (n - 2) fibs1 :: [Integer] fibs1 = map fib [0..] fibs2 :: [Integer] fibs2 = fibgen 0 1 where fibgen a b = a : fibgen b (a + b) data Stream a = Cons a (Stream a) ...
null
https://raw.githubusercontent.com/evansb/cis194-hw/7ee2bc5e45a6c61d021b43e19ded66a0899f9c33/spring_2013/hw6/Fibonacci.hs
haskell
- AB = (a0 + xA') B = a0 B + x A'B = a0 (b0 + xB') + x A'B - Q = (a0/b0) + x (A' - QB') magic lol - Holy crap this is awesome
# LANGUAGE FlexibleInstances # # OPTIONS_GHC -fno - warn - missing - methods # fib:: Integer -> Integer fib 0 = 0 fib 1 = 1 fib n = fib (n - 1) + fib (n - 2) fibs1 :: [Integer] fibs1 = map fib [0..] fibs2 :: [Integer] fibs2 = fibgen 0 1 where fibgen a b = a : fibgen b (a + b) data Stream a = Cons a (Stream a) ...
9a0b58815f7206d32e51740fd99219ced1080d09703c73fd9b5b97b1388c0d13
derbear/steal
limitorder.rkt
#lang racket (provide limitorder) (provide limitorder-doc) ;; (provide limitorder-fill) (define limitorder-doc "Implements a limit order for an asset, given Algos. This is a contract account. This allows either a two-transaction group, for executing the trade, or single transaction, for closing the position. Let ra...
null
https://raw.githubusercontent.com/derbear/steal/afd746a574728dd04c76a5538449caa6f6876d99/examples/limitorder.rkt
racket
(provide limitorder-fill) Escrow |-> TMPL_OWN gtxn 0 Escrow |-> TMPL_OWN ;; This is an escrow. ; This is position 1 and 2 in a group txn . ; is looking for some such that ( 3 * 's Algos ) > ( 5 * 's DerekCoin ) ; is looking for a minimum sale of 5000 DerekCoin (define limitorder-fill ; gtxn 0 ; * - > ...
#lang racket (provide limitorder) (provide limitorder-doc) (define limitorder-doc "Implements a limit order for an asset, given Algos. This is a contract account. This allows either a two-transaction group, for executing the trade, or single transaction, for closing the position. Let ratio = TMPL_SWAPN / TMPL_SWAPD...
a44f7fbe20430d494866ed38fec6ce7be9edfb7ad99fc3a37845403311bf4e12
fujita-y/ypsilon
srfi-42.scm
#!nobacktrace (define-library (srfi srfi-42) (import (srfi 42)) (export do-ec list-ec append-ec string-ec string-append-ec vector-ec vector-of-length-ec sum-ec product-ec min-ec max-ec any?-ec every?-ec first-ec last-ec fold-ec fold3-ec :list :string :vector :integers :range :real-range :char-ra...
null
https://raw.githubusercontent.com/fujita-y/ypsilon/44260d99e24000f9847e79c94826c3d9b76872c2/sitelib/srfi/srfi-42.scm
scheme
#!nobacktrace (define-library (srfi srfi-42) (import (srfi 42)) (export do-ec list-ec append-ec string-ec string-append-ec vector-ec vector-of-length-ec sum-ec product-ec min-ec max-ec any?-ec every?-ec first-ec last-ec fold-ec fold3-ec :list :string :vector :integers :range :real-range :char-ra...
08535a25b28176e43b08aa741a3c04e66028fc734d48d4206c9718be2d187f4a
walmartlabs/lacinia-pedestal
interceptors.clj
Copyright ( c ) 2018 - present Walmart , 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 dist...
null
https://raw.githubusercontent.com/walmartlabs/lacinia-pedestal/e70f853ff96ac2c8f315bc5a6d429213df0c5d04/src/com/walmartlabs/lacinia/pedestal/interceptors.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright ( c ) 2018 - present Walmart , Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) distributed under the License is distributed on an " AS IS " BASIS , (ns com.walmartlabs.lacinia.pedestal.interceptors "Common interceptors between the standard and subscriptions code paths." {:a...
6ae95c6513016c7a2105d0911cfd48b4a5706ec0e44c25c48269048b61d14fa3
spartango/CS153
mlish_compile.ml
module ML = Mlish_ast module S = Scish_ast exception Impossible let rec compile_exp ((e,_):ML.exp) : S.exp = match e with ML.Var x -> S.Var x | ML.Fn(x,e) -> S.Lambda(x,compile_exp e) | ML.App(e1,e2) -> S.App(compile_exp e1, compile_exp e2) | ML.If(e1,e2,e3) -> S.If(compile_exp e1, comp...
null
https://raw.githubusercontent.com/spartango/CS153/16faf133889f1b287cb95c1ea1245d76c1d8db49/ps6/mlish_compile.ml
ocaml
module ML = Mlish_ast module S = Scish_ast exception Impossible let rec compile_exp ((e,_):ML.exp) : S.exp = match e with ML.Var x -> S.Var x | ML.Fn(x,e) -> S.Lambda(x,compile_exp e) | ML.App(e1,e2) -> S.App(compile_exp e1, compile_exp e2) | ML.If(e1,e2,e3) -> S.If(compile_exp e1, comp...
799ee3a75533881940c9fe73f76f11d12f8697f465b737acfb188ad6a4e8663a
igorhvr/bedlam
srfi-8.scm
;;"srfi-8.scm": RECEIVE: Binding to multiple values (require 'values) ;;@code{(require 'srfi-8)} ;;@ftindex srfi-8 ;;@body ;;@url{-8/srfi-8.html} (define-syntax receive (syntax-rules () ((receive formals expression body ...) (call-with-values (lambda () expression) (lambda formals body ...)))))
null
https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/slib/3b2/srfi-8.scm
scheme
"srfi-8.scm": RECEIVE: Binding to multiple values @code{(require 'srfi-8)} @ftindex srfi-8 @body @url{-8/srfi-8.html}
(require 'values) (define-syntax receive (syntax-rules () ((receive formals expression body ...) (call-with-values (lambda () expression) (lambda formals body ...)))))
2e2cedb07b4307401d4197cd5efa9ad077c6493bb462beceb56aca825a6b6228
slipstream/SlipStreamServer
email_lifecycle_test.clj
(ns com.sixsq.slipstream.ssclj.resources.email-lifecycle-test (:require [clojure.data.json :as json] [clojure.test :refer :all] [com.sixsq.slipstream.ssclj.app.params :as p] [com.sixsq.slipstream.ssclj.middleware.authn-info-header :refer [authn-info-header]] [com.sixsq.slipstream.ssclj.resources.c...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/test/com/sixsq/slipstream/ssclj/resources/email_lifecycle_test.clj
clojure
verify resource metadata admin query succeeds but is empty user query succeeds but is empty anon query fails anon create must fail check email creation user should see only 1 verify contents of admin email verify contents of user email admin can delete the email user can delete the email
(ns com.sixsq.slipstream.ssclj.resources.email-lifecycle-test (:require [clojure.data.json :as json] [clojure.test :refer :all] [com.sixsq.slipstream.ssclj.app.params :as p] [com.sixsq.slipstream.ssclj.middleware.authn-info-header :refer [authn-info-header]] [com.sixsq.slipstream.ssclj.resources.c...
2714827aefc70ccb2fe78f1c8a20e9935df296c7e5e4a2115bf102c5a2b6dd94
froggey/Mezzano
serialize.lisp
Serializes an environment to an in - memory image (defpackage :mezzano.cold-generator.serialize (:use :cl) (:local-nicknames (#:env #:mezzano.cold-generator.environment) (#:util #:mezzano.cold-generator.util) (#:sys.int #:mezzano.internals)) (:export #:make-image ...
null
https://raw.githubusercontent.com/froggey/Mezzano/087be4fa325619f61b2e6864277aaf83c4d1d80d/tools/cold-generator2/serialize.lisp
lisp
Wired area starts near 0. Function area starts at 512G. The wired function expands down from here, the normal area expands upwards. For the sake of sanity (so the cold-generator doesn't need to expand the wired function area, as it grows downwards), assume that the initial wired function area is this big. This m...
Serializes an environment to an in - memory image (defpackage :mezzano.cold-generator.serialize (:use :cl) (:local-nicknames (#:env #:mezzano.cold-generator.environment) (#:util #:mezzano.cold-generator.util) (#:sys.int #:mezzano.internals)) (:export #:make-image ...
56ebf4305fa17bb60b28b50128b1b5d77219cde3dcaa2af540eaf8dfd458af20
8c6794b6/haskell-sc-scratch
OTF.hs
# LANGUAGE NoMonomorphismRestriction # | Module : $ Header$ CopyRight : ( c ) 8c6794b6 License : : Stability : unstable Portability : non - portable Translation of /on - the - fly synchronization ( example by and , from : < / > . are done with calculating offset time of OSC...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/Misc/OTF.hs
haskell
---------------------------------------------------------------------------- Synth defs ---------------------------------------------------------------------------- Patterns ---------------------------------------------------------------------------- -------------------------------------------------------------------...
# LANGUAGE NoMonomorphismRestriction # | Module : $ Header$ CopyRight : ( c ) 8c6794b6 License : : Stability : unstable Portability : non - portable Translation of /on - the - fly synchronization ( example by and , from : < / > . are done with calculating offset time of OSC...
1d59eed9be48e025de39ea8a7cff44f02796c1a36c804f632a8cabd7cb514f38
rescript-lang/syntax
genlex.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/rescript-lang/syntax/891fe05b88be2aa4443a951a0d16088b69b2e279/compiler-libs-406/genlex.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the * A generic lexical analyzer . This module implements a simple ' standard ' lexical analyzer , pre...
70d52977dd904ed43161fa605ef3bc70da804af8cf7f5caa20396733f58b12a1
alexandroid000/improv
PointField.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # module Ros.Sensor_msgs.PointField where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Internal.RosBinary...
null
https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/msgs/Sensor_msgs/Ros/Sensor_msgs/PointField.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # module Ros.Sensor_msgs.PointField where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Internal.RosBinary import Ros.Internal.Msg.MsgInfo import qualified GHC.Generics as G imp...
0c59f120251023fff57c0039dd4010da452e4e67e2d95fd2a47714bf29c16af0
Inria-Prosecco/proscript-messaging
htmlast.ml
open Printf type loc = Lexing.position * Lexing.position type 'a located = 'a * loc (* Type of PHP program *) type t = node_t list and node_t = [ | `Text of string | `Tag of string * attr_t list * t ] located and attr_t = (string * string) located
null
https://raw.githubusercontent.com/Inria-Prosecco/proscript-messaging/ddb66e4934fefbbf10bbd393cabc4ecda5b75546/ps2pv/htmlast.ml
ocaml
Type of PHP program
open Printf type loc = Lexing.position * Lexing.position type 'a located = 'a * loc type t = node_t list and node_t = [ | `Text of string | `Tag of string * attr_t list * t ] located and attr_t = (string * string) located
0196eb6d23867a3cfe8afe81fbb89608ce49ef8c0e6facafc91911d8fc8e1eca
BillHallahan/G2
M19.hs
{-@ LIQUID "--no-termination" @-} module M19 (main) where @ main : : { n : Int | n > = 0 } - > { m : Int | m > = 0 & & m < n } - > { b : | b } @ main :: Int -> Int -> Bool main n m = case while n m (0, m) of (_, y') -> n == y' {-@ while :: Int -> Int -> (Int, Int) -> (Int, Int) @-} while :: Int -> Int -...
null
https://raw.githubusercontent.com/BillHallahan/G2/f2584eb2ec211aed73b3ccd88c6e232c3cf4386d/tests/LiquidInf/Paper/Eval/Compare/M19.hs
haskell
@ LIQUID "--no-termination" @ @ while :: Int -> Int -> (Int, Int) -> (Int, Int) @
module M19 (main) where @ main : : { n : Int | n > = 0 } - > { m : Int | m > = 0 & & m < n } - > { b : | b } @ main :: Int -> Int -> Bool main n m = case while n m (0, m) of (_, y') -> n == y' while :: Int -> Int -> (Int, Int) -> (Int, Int) while n m (x, y) = if x < n then while n m (x + 1, if x + 1...
15f3e4eee633ef8c1134bb17d9b270f91f8423e3f3482e272b811c48a989757e
solita/inkwell
project.clj
(defproject inkwell "0.2.0-SNAPSHOT" :description "Improved interactive and functional programming for Quil" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/core.typed "0.2.40"] [quil "1.7....
null
https://raw.githubusercontent.com/solita/inkwell/06225a7e2c63a19c23f8d948c8c634f47f950cd3/project.clj
clojure
(defproject inkwell "0.2.0-SNAPSHOT" :description "Improved interactive and functional programming for Quil" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/core.typed "0.2.40"] [quil "1.7....
8f0ff20b29a670563775c67321dd5fc89cefa8e0746c73128acf515a3bccf2cf
janestreet/universe
nine.ml
Demonstate use of [ % expect ] to match a single line of text with 0|1|2 leading & trailing NLs . Starting with .. { [ let%expect_test _ = let module M = struct let ( ) = print_string " hello " ; [ % expect{|| } ] let ( ) = print_string " hello\n " ;...
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ppx_expect/example/nine.ml
ocaml
Demonstate use of [ % expect ] to match a single line of text with 0|1|2 leading & trailing NLs . Starting with .. { [ let%expect_test _ = let module M = struct let ( ) = print_string " hello " ; [ % expect{|| } ] let ( ) = print_string " hello\n " ;...
6ea7173bcb0c6191af0571564b701456413e7e58a34bae9993a1251cc4f1e773
kaizhang/bioinformatics-toolkit
Parser.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE StrictData #-} module Bio.GO.Parser ( readOWL , readOWLAsMap , GAF(..) , readGAF ) where import Control.Arrow ((&&&)) import Conduit import qualified Data.ByteString.Lazy.Char8 as L import qualified...
null
https://raw.githubusercontent.com/kaizhang/bioinformatics-toolkit/89b8d1cdf4fa7b075794c37c070cab8ac27acfaf/bioinformatics-toolkit/src/Bio/GO/Parser.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # -annotation-file-gaf-format-21.
# LANGUAGE FlexibleContexts # module Bio.GO.Parser ( readOWL , readOWLAsMap , GAF(..) , readGAF ) where import Control.Arrow ((&&&)) import Conduit import qualified Data.ByteString.Lazy.Char8 as L import qualified Data.ByteString.Char8 as B import qualified Data.HashMap.Stric...
fb7e1c4cd911837a893af1c66431aa73c4efabba3d0208438b698c02f979e520
arttuka/reagent-material-ui
static_date_time_picker_pro.cljs
(ns reagent-mui.x.static-date-time-picker-pro "Imports @mui/x-date-pickers-pro/StaticDateTimePicker as a Reagent component. Original documentation is at -pickers/static-date-time-picker/ ." (:require [reagent.core :as r] ["@mui/x-date-pickers-pro/StaticDateTimePicker" :as MuiStaticDateTimePicker])) ...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/x/reagent_mui/x/static_date_time_picker_pro.cljs
clojure
(ns reagent-mui.x.static-date-time-picker-pro "Imports @mui/x-date-pickers-pro/StaticDateTimePicker as a Reagent component. Original documentation is at -pickers/static-date-time-picker/ ." (:require [reagent.core :as r] ["@mui/x-date-pickers-pro/StaticDateTimePicker" :as MuiStaticDateTimePicker])) ...
629db8593bcce7abd8d1883251d8bd7448f338ab4b1176cb65b0f5878c2844e9
conscell/hugs-android
Internals.hs
# OPTIONS_GHC -fno - implicit - prelude # ----------------------------------------------------------------------------- -- | -- Module : System.Directory.Internals Copyright : ( c ) The University of Glasgow 2005 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- St...
null
https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/packages/base/System/Directory/Internals.hs
haskell
--------------------------------------------------------------------------- | Module : System.Directory.Internals License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : hidden Portability : portable System-independent pathname manipulations. ---------------------...
# OPTIONS_GHC -fno - implicit - prelude # Copyright : ( c ) The University of Glasgow 2005 module System.Directory.Internals ( joinFileName, joinFileExt, parseSearchPath, pathParents, exeExtension, ) where import Data.List > ( dir , basename ) = splitFileName path joinFileName :: Stri...
2f0d67d8012afa22c74898aa00ed6afe9737dfbcbf83adf5c062f8cece9d8cd0
wardle/nhspd
core.clj
(ns com.eldrix.nhspd.core "Support for the NHS Postcode directory (NHSPD)." (:require [com.eldrix.nhspd.download :as dl] [com.eldrix.nhspd.search :as search] [clojure.core.async :as a]) (:import (org.apache.lucene.search IndexSearcher) (java.io Closeable) (java.time.f...
null
https://raw.githubusercontent.com/wardle/nhspd/f23ca72fe38ffae082f89cf893ed25e8c62acc41/src/com/eldrix/nhspd/core.clj
clojure
(ns com.eldrix.nhspd.core "Support for the NHS Postcode directory (NHSPD)." (:require [com.eldrix.nhspd.download :as dl] [com.eldrix.nhspd.search :as search] [clojure.core.async :as a]) (:import (org.apache.lucene.search IndexSearcher) (java.io Closeable) (java.time.f...
d7fb548e10460c311accce36948678a9abbb21b0de62cb2ca0b7db09804a4874
esl/MongooseIM
mod_vcard_api.erl
%% @doc Provide an interface for frontends (like graphql or ctl) to manage vcard. -module(mod_vcard_api). -include("mongoose.hrl"). -include("jlib.hrl"). -include("mod_vcard.hrl"). -type vcard_map() :: #{binary() => vcard_subelement_binary() | vcard_subelement_map()}. -type vcard_subelement_binary() :: binary() | [{o...
null
https://raw.githubusercontent.com/esl/MongooseIM/25671900c8593d37088cd069514d5eade9085f5b/src/vcard/mod_vcard_api.erl
erlang
@doc Provide an interface for frontends (like graphql or ctl) to manage vcard.
-module(mod_vcard_api). -include("mongoose.hrl"). -include("jlib.hrl"). -include("mod_vcard.hrl"). -type vcard_map() :: #{binary() => vcard_subelement_binary() | vcard_subelement_map()}. -type vcard_subelement_binary() :: binary() | [{ok, binary()}]. -type vcard_subelement_map() :: #{binary() => binary() | [{ok, bina...
bf378b5a9174bb248b04bf32ef8dd786634177f82293b1e9ef2d535d1db5245c
fstamour/breeze
channel-for-commands.lisp
(cl:in-package #:common-lisp-user) (defpackage #:channel-for-commands (:use #:cl) (:local-nicknames (#:a #:alexandria) (#:bt #:bordeaux-threads) (#:c #:chanl))) (in-package #:channel-for-commands) I realized that chanl could be used instead of the annoying CPS ;;; (continuation passing style) stuff t...
null
https://raw.githubusercontent.com/fstamour/breeze/eb25eccd91481e907d31b2cd8afdc2a5eaf4265b/scratch-files/channel-for-commands.lisp
lisp
(continuation passing style) stuff to implement the commands, let's try it! First thing, we need to create a channel and a thread, and use the channel. And we can use c:pcall as a drop-in replacement for br:make-thread it'll return a nicer object. And yest another helper-macro
(cl:in-package #:common-lisp-user) (defpackage #:channel-for-commands (:use #:cl) (:local-nicknames (#:a #:alexandria) (#:bt #:bordeaux-threads) (#:c #:chanl))) (in-package #:channel-for-commands) I realized that chanl could be used instead of the annoying CPS (let ((channel (make-instance 'c:channe...
d1dc64dc6f25fabff983e83a28d8e9f4a0f96ecf530a049f0412bb28277609c3
bmeurer/ocaml-arm
queue.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet Cris...
null
https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/stdlib/queue.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 2002 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with $ Id$ exception Empty type 'a cell = {...
deceffdf5f320923e2b1adfe9957cb1ae6f670b38a50e7f92de882cfb024e6b5
input-output-hk/project-icarus-importer
TestServer.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGE TypeOperators #-} module Pos.BlockchainImporter.Web.TestServer ( runMockServer ) where import Universum import Network.Wai (Application) import Network.Wai.Handler.Warp (run) import ...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/blockchain-importer/src/Pos/BlockchainImporter/Web/TestServer.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE TypeOperators # -------------------------------------------------------------- Top level functionality -------------------------------------------------------------- Run the server. Must be on the same port so we don't have to modify anything -------------------------...
# LANGUAGE ScopedTypeVariables # module Pos.BlockchainImporter.Web.TestServer ( runMockServer ) where import Universum import Network.Wai (Application) import Network.Wai.Handler.Warp (run) import Servant.Generic (AsServerT, toServant) import Servant.Se...
83461cff6f325e577962a9bdac9a3a74dbe98d5202f0029352fecf79eb44770e
spurious/sagittarius-scheme-mirror
arith.scm
(library (core arithmetic) (export gcd lcm div-and-mod div0-and-mod0 bitwise-rotate-bit-field bitwise-reverse-bit-field) (import (core) (core base) (core errors) (sagittarius)) ;;;;; ;; arithmetic (define gcd (lambda args (define recn (lambda (arg args) (if (...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/boot/lib/arith.scm
scheme
arithmetic
(library (core arithmetic) (export gcd lcm div-and-mod div0-and-mod0 bitwise-rotate-bit-field bitwise-reverse-bit-field) (import (core) (core base) (core errors) (sagittarius)) (define gcd (lambda args (define recn (lambda (arg args) (if (null? args) arg...
835c501a2c96a7478772a1b15c0ca3483451a4d2a01b389d24fbd261085e8b6b
mazenharake/entop
entop.erl
%%============================================================================== Copyright ( c ) 2017 , %% All rights reserved. %% %% Redistribution and use in source and binary forms, with or without %% modification, are permitted provided that the following conditions are met: %% %% * Redistributions of sourc...
null
https://raw.githubusercontent.com/mazenharake/entop/789f1ee95a30ac08ee11d16fd1b2eff8df2db773/src/entop.erl
erlang
============================================================================== All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright no...
Copyright ( c ) 2017 , THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , O...
dc6217b88b04bc18750a5501762f7814f5c2cb7e5d77de7fb924f51ad581467a
csabahruska/jhc-components
MapBinaryInstance.hs
module Support.MapBinaryInstance where import Control.Monad import Data.Binary import Data.Bits import Data.Map as Map import Data.Set as Set putLEB128 :: Word -> Put putLEB128 w = f w where f !w = do let !w' = w `shiftR` 7 putWord8 $! fromIntegral $ (w .&. 0x7f) .|. (if w' /= 0 then 0x80 else 0) ...
null
https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-common/src/Support/MapBinaryInstance.hs
haskell
module Support.MapBinaryInstance where import Control.Monad import Data.Binary import Data.Bits import Data.Map as Map import Data.Set as Set putLEB128 :: Word -> Put putLEB128 w = f w where f !w = do let !w' = w `shiftR` 7 putWord8 $! fromIntegral $ (w .&. 0x7f) .|. (if w' /= 0 then 0x80 else 0) ...
9c7ac67875b946deff4ea55a282ffc51980a9858d2ad531e0a9a82f85ce08a38
glv2/cl-monero-tools
portuguese.lisp
;;;; This file is part of monero-tools Copyright 2016 - 2017 Distributed under the GNU GPL v3 or later . ;;;; See the file LICENSE for terms of use and distribution. (in-package :monero-tools) (add-word-list :portuguese 4 #("abaular" "abdominal" ...
null
https://raw.githubusercontent.com/glv2/cl-monero-tools/ab972ac3a7c5489cf23e3bdaa5d390d5cff1732b/monero-tools/mnemonic/portuguese.lisp
lisp
This file is part of monero-tools See the file LICENSE for terms of use and distribution.
Copyright 2016 - 2017 Distributed under the GNU GPL v3 or later . (in-package :monero-tools) (add-word-list :portuguese 4 #("abaular" "abdominal" "abeto" "abissinio" "abjeto" "ablucao" ...
7f3734d66b8cfc3d0fab676082ffab8d77391df18212d9de393b56c3f52d7ce4
mlabs-haskell/plutip
PoolConfigs.hs
# LANGUAGE DataKinds # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE NumericUnderscores # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # OPTIONS_GHC -Wno - orphans # {-# OPTIONS_GHC -Wwarn=incomplete-uni-patterns #-} {-# OPTIONS...
null
https://raw.githubusercontent.com/mlabs-haskell/plutip/89cf822c213f6a4278a88c8a8bb982696c649e76/src/Plutip/Launch/PoolConfigs.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes # # OPTIONS_GHC -Wwarn=incomplete-uni-patterns # # OPTIONS_GHC -Wwarn=missing-deriving-strategies # Warnings turned off intetnionally to keep module close to the original as much as possible for easier maintenance. # OPTIONS_GHC -Wwarn=missing-import-lists # # OPTIONS_GHC -Wwa...
# LANGUAGE DataKinds # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE NumericUnderscores # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # OPTIONS_GHC -Wno - orphans # Copyright : © 2018 - 2020 IOHK Alterded types and functions marked with " altered " comment . Formatting a...
16a2f633ee3540dd9faa1efc530f8d33fb853ff9c9c322c06d7cc93306f0f768
jeromesimeon/Galax
physical_item.ml
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/physicaldm/physical_item.ml
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . $ I d : physical_item.ml , v 1.4 2007/02/01 22:08:51 simeon Exp $ Module : Physical_item Description : Physical representation of XDM items . Description: Physical representation of XDM items. *) open Error open Dm_a...
8d7e5c4a3cecaf41803f55499e51495158e28941480966adc6ddb137ef6b9cae
SanderSpies/ocaml-gist
untypeast2.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ( OCa...
null
https://raw.githubusercontent.com/SanderSpies/ocaml-gist/7dc229aebdf51310e8c7dae12df0cb55b5de5a32/ocaml_webworker/merlin_lite/src/ocaml/typer_4.05.0/typing/untypeast2.ml
ocaml
************************************************************************ OCaml ...
( OCamlPro ) , ( INRIA Saclay ) Copyright 2007 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Longident open Asttypes open Parsetree open Ast_helper module T = Typedtree type mapper = { attribute: mapper -> T...
ca2d206f6aa13013177fafb2af7986ab9328d40601c033e1e53589b8e36a5131
Apress/practical-ocaml
bitmap.ml
let fourbitstring numb = let lb = Buffer.create 4 in let rmost = numb mod 256 in let nextr = (numb / 256) mod 256 in let nextrr = (numb / (256 * 256)) mod 256 in let nextrrr = (numb / (256 * 256 * 256)) mod 256 in Buffer.add_char lb (Char.chr rmost); Buffer.add_char lb (Char.chr nextr); Buffer.add_char ...
null
https://raw.githubusercontent.com/Apress/practical-ocaml/c0f1e36283eb0e495ff8db7f2a88cadbf1a3d49e/Chapter27/bitmap.ml
ocaml
let fourbitstring numb = let lb = Buffer.create 4 in let rmost = numb mod 256 in let nextr = (numb / 256) mod 256 in let nextrr = (numb / (256 * 256)) mod 256 in let nextrrr = (numb / (256 * 256 * 256)) mod 256 in Buffer.add_char lb (Char.chr rmost); Buffer.add_char lb (Char.chr nextr); Buffer.add_char ...
cb06b7db982311894909ee59b07853fceca819ab8e1528ddc73a0ab00044fd5d
otherjoel/beeswax
render.rkt
#lang racket/base (require pollen/cache pollen/setup racket/string sugar/file "private/constants.rkt" "private/files.rkt") (provide get-template-proc render) (define (err msg . vals) (apply raise-user-error 'beeswax-render msg vals)) (define (beeswax-exn e or...
null
https://raw.githubusercontent.com/otherjoel/beeswax/993b5364b474ff0d8a1f8c26dac192cb4408f385/render.rkt
racket
#lang racket/base (require pollen/cache pollen/setup racket/string sugar/file "private/constants.rkt" "private/files.rkt") (provide get-template-proc render) (define (err msg . vals) (apply raise-user-error 'beeswax-render msg vals)) (define (beeswax-exn e or...
653fa6665d4f7763960e491346e11543137696002d7a4f9bc624e36a6172d7d4
databrary/databrary
Notification.hs
{-# LANGUAGE OverloadedStrings #-} module Service.Notification ( Notifications(..) , initNotifications , triggerNotifications ) where import Control.Concurrent.MVar (MVar, newMVar, tryPutMVar, tryTakeMVar) import Control.Monad (unless) import qualified Data.ByteString as BS import qualified Text.Regex.Posix as...
null
https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Service/Notification.hs
haskell
# LANGUAGE OverloadedStrings # TODO: get rid of this run async notification pass at boot
module Service.Notification ( Notifications(..) , initNotifications , triggerNotifications ) where import Control.Concurrent.MVar (MVar, newMVar, tryPutMVar, tryTakeMVar) import Control.Monad (unless) import qualified Data.ByteString as BS import qualified Text.Regex.Posix as Regex import Model.Periodic (Peri...
5f52b8de6eb80524af00d2295fe5e737554874cf45ab5d5d2675bc10addad0bf
input-output-hk/rscoin-haskell
Wallet.hs
{-# LANGUAGE FlexibleContexts #-} # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} # LANGUAGE TupleSections # -- | This module describes user wallet state & actions module RSCoin.User.Wallet ( v...
null
https://raw.githubusercontent.com/input-output-hk/rscoin-haskell/109d8f6f226e9d0b360fcaac14c5a90da112a810/src/RSCoin/User/Wallet.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # | This module describes user wallet state & actions * Queries * Updates | This datatype represents the status of transaction in history. Rejected transactions are those who we...
# LANGUAGE MultiParamTypeClasses # # LANGUAGE TupleSections # module RSCoin.User.Wallet ( validateKeyPair , TxHStatus (..) , TxHistoryRecord (..) , WalletStorageError (..) , WalletStorage , emptyWalletStorage , isInitialized , getSecretKey , fin...
05625f270bbb4fb140d859794ef78f59b305b5a5845911be7ddc2e220383fb1e
ocaml-sf/learn-ocaml-corpus
choose_wrong_cont.ml
The following four constructor functions are implemented already . let return (x : 'a) : 'a m = MReturn x let (>>=) (m1 : 'a m) (m2 : 'a -> 'b m) : 'b m = MBind (m1, m2) let fail : 'a m = MFail let choose (m1 : 'a m) (m2 : 'a m) : 'a m = MChoose (m1, m2) (* The bulk of the work is to implement an interpr...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/nondet_monad_defun/wrong/choose_wrong_cont.ml
ocaml
The bulk of the work is to implement an interpreter for each of the data types [_ failure], [(_, _) success], and [_ m]. wrong Invoked when the left branch of a choice has failed. [m2] is the right branch of the choice. [s] and [f] are the continuations of the choice. Used at the top lev...
The following four constructor functions are implemented already . let return (x : 'a) : 'a m = MReturn x let (>>=) (m1 : 'a m) (m2 : 'a -> 'b m) : 'b m = MBind (m1, m2) let fail : 'a m = MFail let choose (m1 : 'a m) (m2 : 'a m) : 'a m = MChoose (m1, m2) let rec apply_failure : type answer . answer fail...
9a026fab6045726e2a5d58c95d8c869093c7f25e2004b9797696f65cfb0de6f2
slyrus/mcclim-old
state-and-transition.lisp
;;; -*- Mode: Lisp; Package: AUTOMATON -*- ;;; ( c ) copyright 2005 - 2007 by ( ) ;;; ;;; This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation ; either version 2 of the Licen...
null
https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/Drei/cl-automaton/state-and-transition.lisp
lisp
-*- Mode: Lisp; Package: AUTOMATON -*- This library is free software; you can redistribute it and/or either This library 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 License ...
( c ) copyright 2005 - 2007 by ( ) modify it under the terms of the GNU Library General Public version 2 of the License , or ( at your option ) any later version . Library General Public License for more details . You should have received a copy of the GNU Library General Public Free Softwar...
44f4d1a7a67e78f90be16b4090e53f81a47640d4acbf214e5bd3b5883647f4d9
0zat/gen-bs
bs_let.ml
open Bs_str open Bs_type type variant type _ pattern = | Variant : string * (string * type_) option -> variant pattern (* | `A (b: c) ->*) | String : string -> string pattern (* | "" -> *) type eval = [ | `Variant of string | `String of string | `Ident of capital Bs_str.t list * uncapital Bs_str.t (* A.B....
null
https://raw.githubusercontent.com/0zat/gen-bs/20348991775d9ef3974c3b824968a0ab219502a8/src/output/bs_print/bs_let.ml
ocaml
| `A (b: c) -> | "" -> A.B.C.a let a = b c in function p1 -> .. | p2 -> .. expose functions. others are hidden by mli
open Bs_str open Bs_type type variant type _ pattern = type eval = [ | `Variant of string | `String of string | `Label of uncapital Bs_str.t | `Int of int | `Float of float | `Bool of bool | `Ident_with_type of uncapital Bs_str.t * type_ ] type eval_line = eval list and 'a function_code = ('a pattern...
776300ee6d4936ad34757d525ce950275a00b061c4b9801175d13af8c09061ce
toschoo/mom
tprotocol.hs
module Main where import Test import qualified Protocol as P import qualified Socket as Sock import qualified Factory as Fac import Network.Mom.Stompl.Client.Exception import qualified Network.Mom.Stompl.Frame as F import Codec.MIME.Type (nullType) import qualified Network....
null
https://raw.githubusercontent.com/toschoo/mom/b58ca23d05c98ab50d9e981bd4ad2cdb76846399/src/client/test/suite/tprotocol.hs
haskell
_ <- P.disc c c' <- P.disconnect c "" -- this causes 'resource busy' (laziness issue)
module Main where import Test import qualified Protocol as P import qualified Socket as Sock import qualified Factory as Fac import Network.Mom.Stompl.Client.Exception import qualified Network.Mom.Stompl.Frame as F import Codec.MIME.Type (nullType) import qualified Network....
857a36cbc0507f40dceb9f1e49be3db1e84cb8dad1ae4707233d3f7ca6bdff43
josefs/Gradualizer
call.erl
-module(call). -export([g/0, h/1, apply/1, remote/0]). -spec f() -> {}. f() -> {}. -spec g() -> boolean(). g() -> f(). -spec h(boolean()) -> integer(). h(B) -> B(). -spec apply(fun((...) -> boolean())) -> integer(). apply(F) -> F(). -spec remote() -> integer(). remote() -> io_lib:format("", []...
null
https://raw.githubusercontent.com/josefs/Gradualizer/208f5816b0157f282212fc036ba7560f0822f9fc/test/should_fail/call.erl
erlang
-module(call). -export([g/0, h/1, apply/1, remote/0]). -spec f() -> {}. f() -> {}. -spec g() -> boolean(). g() -> f(). -spec h(boolean()) -> integer(). h(B) -> B(). -spec apply(fun((...) -> boolean())) -> integer(). apply(F) -> F(). -spec remote() -> integer(). remote() -> io_lib:format("", []...
9177bd78d185a45cea4b494532a49c079eac06fa15d119218f3b9372f87269b6
mathematical-systems/clml
idamax.lisp
;;; Compiled by f2cl version: ( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ " " $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 " " $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ " " $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ " " $ I d : f2cl5.l , v 1.197 2008/09/11 15:0...
null
https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/blas/idamax.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls nil) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ " " $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 " " $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ " " $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ " " $ I d : f2cl5.l , v 1.197 2008/09/11 15:03:25 rtoy Exp $ " " $ I d :...
7c6cac1f3ff635ddb760d366cf91e2e1e8cf547d91ecaad7a35132523c86a80e
Commonfare-net/macao-social-wallet
account_page.clj
Freecoin - digital social currency toolkit part of Decentralized Citizen Engagement Technologies ( D - CENT ) R&D funded by the European Commission ( FP7 / CAPS 610349 ) Copyright ( C ) 2015 Dyne.org foundation Copyright ( C ) 2015 Thoughtworks , Inc. designed , written and maintained by < > ;; Wi...
null
https://raw.githubusercontent.com/Commonfare-net/macao-social-wallet/d3724d6c706cdaa669c59da439fe48b0373e17b7/src/freecoin/views/account_page.clj
clojure
With contributions by This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See th...
Freecoin - digital social currency toolkit part of Decentralized Citizen Engagement Technologies ( D - CENT ) R&D funded by the European Commission ( FP7 / CAPS 610349 ) Copyright ( C ) 2015 Dyne.org foundation Copyright ( C ) 2015 Thoughtworks , Inc. designed , written and maintained by < > <...
2c906a70a8568e419d069dbd4861a0cc8263efa2af08038be888db9ddf1b389f
babashka/sci
libsci_tasks.clj
(ns libsci-tasks (:require [babashka.deps :as deps] [babashka.fs :as fs] [babashka.process :as p] [clojure.string :as str] [clojure.test :refer [deftest is run-all-tests testing]])) (defn- setup-clojure-lein-ps1-cmd "Return PowerShell command to invoke `lein.ps1` scr...
null
https://raw.githubusercontent.com/babashka/sci/136a26c6d77d966ea85a310571e098a9282c9141/libsci/bb/libsci_tasks.clj
clojure
temporary workaround for -clojure/issues/78 assume *nix variant
(ns libsci-tasks (:require [babashka.deps :as deps] [babashka.fs :as fs] [babashka.process :as p] [clojure.string :as str] [clojure.test :refer [deftest is run-all-tests testing]])) (defn- setup-clojure-lein-ps1-cmd "Return PowerShell command to invoke `lein.ps1` scr...
aab8ac870e7acf268c23b9ccca598034523203507f5d81d3c71a05f950bf347a
bgusach/exercises-htdp2e
ex-276.rkt
#lang htdp/isl (require test-engine/racket-tests) (require 2htdp/itunes) (require racket/list) # # # Constants (define track1 (create-track "Pacman in the dark" "Johnny and the drunken squirrels" "Once upon a time" (* 3 60 1000) 1 (create-date 2015 6 3 12 30 30) 42 (create-date...
null
https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/3-abstraction/ex-276.rkt
racket
- '() - (cons Track LTracks) Example: have been played after the date LTrack -> Boolean Returns whether the track matches the album and has been played after date -- IN -- Date Date -> Boolean Track -> Boolean -- IN -- -- IN --
#lang htdp/isl (require test-engine/racket-tests) (require 2htdp/itunes) (require racket/list) # # # Constants (define track1 (create-track "Pacman in the dark" "Johnny and the drunken squirrels" "Once upon a time" (* 3 60 1000) 1 (create-date 2015 6 3 12 30 30) 42 (create-date...
7bce54c529bd4c5747b8474bb8fb6d9add8828f40f10e64d537e97993dc7aa7d
dmitryvk/sbcl-win32-threads
float-trap.lisp
;;;; This file contains stuff for controlling floating point traps. It is IEEE float specific , but should work for pretty much any FPU where the state fits in one word and exceptions are represented ;;;; by bits being set. This software is part of the SBCL system . See the README file for ;;;; more information....
null
https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/float-trap.lisp
lisp
This file contains stuff for controlling floating point traps. It by bits being set. more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. Return a mask with all the specified float trap bits set...
is IEEE float specific , but should work for pretty much any FPU where the state fits in one word and exceptions are represented This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released in...
6493372ccb1fc987766ba2272fb924221c69f6aba0ee3745feb504a4c41d75a8
appleby/99-lisp-problems
p06.lisp
;;;; (*) Find out whether a list is a palindrome. ;;;; A palindrome can be read forward or backward; e.g. (x a m a x). ;;; Tried to be clever and only iterate over half the list, but the ;;; calls to reverse and length end up making this version O(2.5n), ;;; whereas the the equal/reverse version below is O(2n). (in-pa...
null
https://raw.githubusercontent.com/appleby/99-lisp-problems/a12b2a585ac5af06f456f844d308bbada78e647c/p06.lisp
lisp
(*) Find out whether a list is a palindrome. A palindrome can be read forward or backward; e.g. (x a m a x). Tried to be clever and only iterate over half the list, but the calls to reverse and length end up making this version O(2.5n), whereas the the equal/reverse version below is O(2n).
(in-package :99-problems) (defun palindrome-iter-p (lst) (loop for x in lst for y in (reverse lst) for i upto (ceiling (length lst) 2) when (not (equalp x y)) return nil finally (return t))) (defun palindrome-p (lst) (equal lst (reverse lst))) (define-test palindrome-p-test (dolist (t...
28408efc728aa99d20cd22549d48389c22919bc44f7202ec650962f7e7ff37fc
mark-watson/loving-common-lisp
recursion1.lisp
;; a simple loop using recursion (defun recursion1 (value) (format t "entering recursion1(~A)~%" value) (if (< value 5) (recursion1 (1+ value))))
null
https://raw.githubusercontent.com/mark-watson/loving-common-lisp/32f6abf3d2e500baeffd15c085a502b03399a074/src/code_snippets_for_book/recursion1.lisp
lisp
a simple loop using recursion
(defun recursion1 (value) (format t "entering recursion1(~A)~%" value) (if (< value 5) (recursion1 (1+ value))))
611a003fe0c4ebd79fcf666b4d41fe551fcb2226df275cbe0f49245e33ce7287
zachjs/sv2v
ForAsgn.hs
sv2v - Author : < > - - Verilog-2005 requires that for loops have have one initialization and one - incrementation . If there are excess initializations , they are turned into - preceding statements . If there is no loop variable , a dummy loop variable is - created . If there are multiple increm...
null
https://raw.githubusercontent.com/zachjs/sv2v/a2b99fa9ddec5af70020cba1668ac8b873ece27e/src/Convert/ForAsgn.hs
haskell
for loop with multiple incrementations for loop with no initializations for loop with no incrementations for loop with multiple initializations
sv2v - Author : < > - - Verilog-2005 requires that for loops have have one initialization and one - incrementation . If there are excess initializations , they are turned into - preceding statements . If there is no loop variable , a dummy loop variable is - created . If there are multiple increm...
7ad94b0883591fb5e0b2c3420979a7ec3d13dbb147bec58b7f34dc554ec5efe6
scheme-live/live
output.scm
#(0.0)
null
https://raw.githubusercontent.com/scheme-live/live/4c7c9d80f2fcf80692614e10935fa66be69e3708/live/json/data/n-number-0.e1/output.scm
scheme
#(0.0)
782c5ba04f6d48ec11855ea74e9dce60193d1c7897dac719f9716e6900d6d416
mck-/Open-VRP
list.lisp
;;; Simple Util for list manipulation. Basic tools used by route.lisp mostly. (in-package :open-vrp.util) ;; Simple list utils ;; -------------------- (defun get-from-list (list pred &key key) "Gets from list the value (max or min) while ignoring NIL's. Returns NIL if the whole list is nil. Use get-min or get-max!"...
null
https://raw.githubusercontent.com/mck-/Open-VRP/408cb67063474ab61ddfc1631b5ac39714f2535e/lib/list.lisp
lisp
Simple Util for list manipulation. Basic tools used by route.lisp mostly. Simple list utils -------------------- -------------------------- Single route -------------------------
(in-package :open-vrp.util) (defun get-from-list (list pred &key key) "Gets from list the value (max or min) while ignoring NIL's. Returns NIL if the whole list is nil. Use get-min or get-max!" (let ((in-list (if key (mapcar key list) list))) (labels ((iter (ls ans) (if (null ls) (if ans ans (error 'l...
143a3b2c7749e41cd756f8083802711fa8147c17690f1489fd9cf82d0d4291ec
ghc/packages-dph
Vectorised.hs
{-# LANGUAGE ParallelArrays #-} {-# OPTIONS -fvectorise #-} module Vectorised (test0, test1, test2, test3, test4) where import Data.Array.Parallel import Data.Array.Parallel.Prelude.Int as I import qualified Prelude as P arr2 :: [:[:Int:]:] arr2 = [: [:0, 1, 2, 3:], [:4, 5:], [::], [:6, 7, 8:], [:9:]:]...
null
https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-examples/examples/smoke/prims/Concat/Vectorised.hs
haskell
# LANGUAGE ParallelArrays # # OPTIONS -fvectorise #
module Vectorised (test0, test1, test2, test3, test4) where import Data.Array.Parallel import Data.Array.Parallel.Prelude.Int as I import qualified Prelude as P arr2 :: [:[:Int:]:] arr2 = [: [:0, 1, 2, 3:], [:4, 5:], [::], [:6, 7, 8:], [:9:]:] arr3 :: [:[:[:Int:]:]:] arr3 = [: [:[:0:]:], [:[:1:],...
6b15c94d0269863bac45871410f58dcb039ab411ee5baa10dd5249c4f4f93600
as-capabl/armageddon
ConduitAdaptor.hs
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE TypeSynonymInstances #-} module Control.Arrow.Machine.ConduitAdaptor ( module Control.Arrow.Machine.Automaton ) where import qualified Control.Arrow.Machine as Machinecell import qualified Data.Conduit as Conduit import D...
null
https://raw.githubusercontent.com/as-capabl/armageddon/f9724b7a545f7e66931d2a46732402a67a59a03e/machinecell-extra/src/Control/Arrow/Machine/ConduitAdaptor.hs
haskell
# LANGUAGE TypeSynonymInstances # private
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # module Control.Arrow.Machine.ConduitAdaptor ( module Control.Arrow.Machine.Automaton ) where import qualified Control.Arrow.Machine as Machinecell import qualified Data.Conduit as Conduit import Data.Conduit ((=$=), ($$+-)) import Con...
b799d30a427b24130a95e36751e933ce5598e2e6228574437e0e83365d6ec624
leksah/leksah
Types.hs
# LANGUAGE CPP # # LANGUAGE RecordWildCards # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE LambdaCase # # LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSec...
null
https://raw.githubusercontent.com/leksah/leksah/ec95f33af27fea09cba140d7cddd010935a2cf52/src/IDE/Core/Types.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE TypeSynonymInstances # # LANGUAGE OverloadedStrings # --------------------------------------------------------------------------- Module : IDE.Core.Data License : GNU-GPL Maintainer : <maintainer at leksah.org> Stability : provisional Portability : port...
# LANGUAGE CPP # # LANGUAGE RecordWildCards # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE LambdaCase # # LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # # LANGUAGE ScopedTypeVariables # # OPTIONS_GHC -fno - warn - orphans # Copyright : ( c ) ,...
8ee29783c19bc6fdfc9f3a3ed3ad58226d7cd4d45c6960301ed67ec52b0ea833
leksah/leksah
Info.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE RecordWildCards # # LANGUAGE ExistentialQuantification # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE LambdaCase # # OPTIONS_GHC -fwarn - unu...
null
https://raw.githubusercontent.com/leksah/leksah/ec95f33af27fea09cba140d7cddd010935a2cf52/src-gtk/IDE/Pane/Info.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE TypeSynonymInstances # # LANGUAGE OverloadedStrings # --------------------------------------------------------------------------- Module : IDE.Pane.Info License : GNU-GPL Maintainer : <maintainer at leksah.org> Stability : provisional Portability : port...
# LANGUAGE DeriveGeneric # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE RecordWildCards # # LANGUAGE ExistentialQuantification # # LANGUAGE LambdaCase # # OPTIONS_GHC -fwarn - unused - imports # Copyright : ( c ) , module IDE.Pane.Info ( IDEInfo , InfoState(..) , sh...
940144399be39701d95361f1c593dcb32ee375403e8dbd3aa262492ae88cb58f
wireless-net/erlang-nommu
wxWindowDC.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2014 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Publi...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/src/gen/wxWindowDC.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitatio...
Copyright Ericsson AB 2008 - 2014 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(wxWindowDC). -include("wxe.hrl")....
2a3292a119f3db29d81dddc9c166c1a34aed5e47b77379567053c9ebbcc22acf
haskus/haskus-system
Solver.hs
# LANGUAGE TypeFamilies # -- | Solver utils module Haskus.Arch.Common.Solver ( Q , T , NT ) where import Haskus.Utils.Solver data T -- terminal data NT p e -- non-terminal type family Q t a :: * where Q (NT p e) a = Rule e p a Q T a = a
null
https://raw.githubusercontent.com/haskus/haskus-system/38b3a363c26bc4d82e3493d8638d46bc35678616/haskus-system/src/lib/Haskus/Arch/Common/Solver.hs
haskell
| Solver utils terminal non-terminal
# LANGUAGE TypeFamilies # module Haskus.Arch.Common.Solver ( Q , T , NT ) where import Haskus.Utils.Solver type family Q t a :: * where Q (NT p e) a = Rule e p a Q T a = a
840663c173ce704c2d51d172d2fe51e9ec41af4848d62b6a942f108aa5475003
facundoolano/advenjure
change_rooms.cljc
(ns advenjure.change-rooms (:require [advenjure.rooms :as rooms] [advenjure.hooks :as hooks] [advenjure.utils :refer [say]])) (defn change-rooms "Change room, say description, set visited." [game-state new-room] (let [previous (:current-room game-state) new-state (-> game-state ...
null
https://raw.githubusercontent.com/facundoolano/advenjure/2f05fdae9439ab8830753cc5ef378be66b7db6ef/src/advenjure/change_rooms.cljc
clojure
override in case hooks modified it set as visited when all of the rest done
(ns advenjure.change-rooms (:require [advenjure.rooms :as rooms] [advenjure.hooks :as hooks] [advenjure.utils :refer [say]])) (defn change-rooms "Change room, say description, set visited." [game-state new-room] (let [previous (:current-room game-state) new-state (-> game-state ...
120f2b7b54bc36f1738a6cb81cacb578055648ecc2286e12751e4fb4ef95ee43
flosell/lambdacd
default_pipeline_state_persistence_test.clj
(ns lambdacd.internal.default-pipeline-state-persistence-test (:use [lambdacd.testsupport.test-util]) (:require [clojure.test :refer :all] [lambdacd.internal.default-pipeline-state-persistence :refer :all] [lambdacd.presentation.pipeline-structure-test :as pipeline-structure-test] ...
null
https://raw.githubusercontent.com/flosell/lambdacd/e9ba3cebb2d5f0070a2e0e1e08fc85fc99ee7135/test/clj/lambdacd/internal/default_pipeline_state_persistence_test.clj
clojure
covers only edge-cases that aren't coverd by roundtrip covers only edge-cases that aren't covered by roundtrip
(ns lambdacd.internal.default-pipeline-state-persistence-test (:use [lambdacd.testsupport.test-util]) (:require [clojure.test :refer :all] [lambdacd.internal.default-pipeline-state-persistence :refer :all] [lambdacd.presentation.pipeline-structure-test :as pipeline-structure-test] ...
f428e6199f64076d5ad2c28c421bef0c9e179f3c1f5cb8bbabcc5e81f3780a16
fpco/unliftio
UnliftIO.hs
-- | Please see the README.md file for information on using this package at < > . module UnliftIO ( module Control.Monad.IO.Unlift , module UnliftIO.Async , module UnliftIO.Chan , module UnliftIO.Exception , module UnliftIO.IO , module UnliftIO.IORef , module UnliftIO.Memoize , module UnliftIO.MVar ...
null
https://raw.githubusercontent.com/fpco/unliftio/d7ac43b9ae69efea0ca911aa556852e9f95af128/unliftio/src/UnliftIO.hs
haskell
| Please see the README.md file for information on using this
package at < > . module UnliftIO ( module Control.Monad.IO.Unlift , module UnliftIO.Async , module UnliftIO.Chan , module UnliftIO.Exception , module UnliftIO.IO , module UnliftIO.IORef , module UnliftIO.Memoize , module UnliftIO.MVar , module UnliftIO.QSem , module UnliftIO.QSemN , module Unli...
88edc715949e2bd52273aea552599ffa7d9672c97d216de6caac56a15e415553
webyrd/n-grams-for-synthesis
generators.scm
(module srfi-121 () (import scheme) Provide necessary R7RS - small identifiers (import (only chicken use include case-lambda call/cc when define-values open-input-string)) (import (only extras read-line)) (require-library srfi-4) (import (only srfi-4 u8vector-ref u8vector-length)) (export gene...
null
https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-121/generators/generators.scm
scheme
(module srfi-121 () (import scheme) Provide necessary R7RS - small identifiers (import (only chicken use include case-lambda call/cc when define-values open-input-string)) (import (only extras read-line)) (require-library srfi-4) (import (only srfi-4 u8vector-ref u8vector-length)) (export gene...
50811bb104d08d264ba44e5f41d71c435d75aa045a099946b95c40832b126214
softwarelanguageslab/maf
R5RS_scp1_third-root-4.scm
; Changes: * removed : 0 * added : 1 * swaps : 0 ; * negated predicates: 0 ; * swapped branches: 0 * calls to i d fun : 1 (letrec ((derde-machtswortel (lambda (x) (letrec ((epsilon 1.000000e-02) (hulp-derde-machtswortel (lambda (y) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_third-root-4.scm
scheme
Changes: * negated predicates: 0 * swapped branches: 0
* removed : 0 * added : 1 * swaps : 0 * calls to i d fun : 1 (letrec ((derde-machtswortel (lambda (x) (letrec ((epsilon 1.000000e-02) (hulp-derde-machtswortel (lambda (y) (if...
7ea9b7df4b0b7a0ea76005817693226791251b0b52e770af73b42fde8e0e6628
nuprl/gradual-typing-performance
ukkonen.rkt
#lang typed/racket/base Much of this comes from reading Algorithms on ;; strings, trees, and sequences: computer science and computational ;; biology. (require (except-in (submod "typed-data.rkt" unsafe) make-label) benchmark-util typed/racket/unsafe ) (unsafe-require/typed "label.rkt" [label-length (-> Lab...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/boundary-configurations/suffixtree/configuration000001-c/ukkonen.rkt
racket
strings, trees, and sequences: computer science and computational biology. skip-count: node label -> (values node number) Follows down the node using the skip-count rule until we exhaust the label. Assumes that there does exist a labeled path starting from the node that exactly matches label. Utility function ...
#lang typed/racket/base Much of this comes from reading Algorithms on (require (except-in (submod "typed-data.rkt" unsafe) make-label) benchmark-util typed/racket/unsafe ) (unsafe-require/typed "label.rkt" [label-length (-> Label Index)] [label-ref (-> Label Integer (U Symbol Char))] [label->string (-> ...
dda4ad79049b178c45aaae5459ea534bbcefd253dae44da84ec2036b4da389d2
cljsinfo/cljs.info
threading_macro.cljs
(ns cljsinfo-client.threading-macro (:require-macros [hiccups.core :as hiccups]) (:require hiccups.runtime [cljsinfo-client.dom :refer [by-id set-html! show-el! hide-el!]] [cljsinfo-client.util :refer [js-log log]])) (def $ js/jQuery) (defn- half [x] (/ x 2)) (defn- twice [x] (* 2 x)) (defn- one...
null
https://raw.githubusercontent.com/cljsinfo/cljs.info/32c21c4cceb8b74fdfc47adc33170868ea2e8162/cljs-client/cljsinfo_client/threading_macro.cljs
clojure
------------------------------------------------------------------------------ Helpers ------------------------------------------------------------------------------ TODO: I'm sure this could be combined with the functions below ------------------------------------------------------------------------------ ----------...
(ns cljsinfo-client.threading-macro (:require-macros [hiccups.core :as hiccups]) (:require hiccups.runtime [cljsinfo-client.dom :refer [by-id set-html! show-el! hide-el!]] [cljsinfo-client.util :refer [js-log log]])) (def $ js/jQuery) (defn- half [x] (/ x 2)) (defn- twice [x] (* 2 x)) (defn- one...
d12252d67d52be7c7a836e0cbf5964d97369ad25d90f3f557993c3aa9a038ccd
clojure-dus/chess
moves_api.clj
(ns chess.movelogic.vector2d.moves-api (:require [chess.movelogic.protocol :as proto]) (:require [chess.movelogic.vector2d.moves-impl :as impl]) (:require [chess.movelogic.vector2d.core :as core]) (:import ( chess.movelogic.vector2d.core GameState))) (defn check? [game-state] "checks if the given boar...
null
https://raw.githubusercontent.com/clojure-dus/chess/7eb0e5bf15290f520f31e7eb3f2b7742c7f27729/src/chess/movelogic/vector2d/moves_api.clj
clojure
(ns chess.movelogic.vector2d.moves-api (:require [chess.movelogic.protocol :as proto]) (:require [chess.movelogic.vector2d.moves-impl :as impl]) (:require [chess.movelogic.vector2d.core :as core]) (:import ( chess.movelogic.vector2d.core GameState))) (defn check? [game-state] "checks if the given boar...
1e24b8c1524f5f58cf9c07fd9e3d07a819373378025ad96847e8791bae252d8b
dhleong/wish
shadow.cljs
(ns wish.util.shadow "Auto-reconnect for shadow-cljs; ONLY to be used in debug mode" (:require-macros [wish.util.log :refer [log]]) (:require [clojure.string :as str] #_[shadow.cljs.devtools.client.browser :as shadow] #_[shadow.cljs.devtools.client.hud :as shadow-hud])) (defonce ^:private...
null
https://raw.githubusercontent.com/dhleong/wish/9036f9da3706bfcc1e4b4736558b6f7309f53b7b/src/cljs/wish/util/shadow.cljs
clojure
(ns wish.util.shadow "Auto-reconnect for shadow-cljs; ONLY to be used in debug mode" (:require-macros [wish.util.log :refer [log]]) (:require [clojure.string :as str] #_[shadow.cljs.devtools.client.browser :as shadow] #_[shadow.cljs.devtools.client.hud :as shadow-hud])) (defonce ^:private...
e310c1abb1171712196c84cd30715c017f39d69fd1076c8df6a81d657cf7c93b
abooij/sudbury
Protocol.hs
| Module : Graphics . Sudbury . CABI.Protocol Description : Read protocol data from a foreign pointer to a libwayland ` wl_interface ` Copyright : ( c ) , 2015 - 2017 License : MIT Maintainer : Stability : experimental Module : Graphics.Sudbury.CABI.Protocol Description : Read p...
null
https://raw.githubusercontent.com/abooij/sudbury/a9ab559728487d78469db73ecf516d145b6c21ec/Graphics/Sudbury/CABI/Protocol.hs
haskell
enum data not provided by C ABI. TODO explain why we can pretend there are none destructor data not provided. TODO why can we pretend this is false? enum data not provided. TODO explain why we can pretend there is none
| Module : Graphics . Sudbury . CABI.Protocol Description : Read protocol data from a foreign pointer to a libwayland ` wl_interface ` Copyright : ( c ) , 2015 - 2017 License : MIT Maintainer : Stability : experimental Module : Graphics.Sudbury.CABI.Protocol Description : Read p...