_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 |
|---|---|---|---|---|---|---|---|---|
8d548800f061cc0a7bddfa3c32045ec93eed4f23292d6a00efaf0f3996df0b41 | haroldcarr/learn-haskell-coq-ml-etc | Messages.hs | module Messages where
import Control.Concurrent (threadDelay)
import Control.Concurrent.MVar (MVar, readMVar)
import qualified Control.Distributed.Process as DP
import Control.Monad (replicateM, replicateM_)
import Control.Monad.Catch (bracket)... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/distributed/static-config/app/Messages.hs | haskell | ----------------------------------------------------------------------------
no recursive call to 'go', so 'messageHandler' returns
should only be sent by Client
should only be sent by Peer
----------------------------------------------------------------------------
--------------------------------------------------... | module Messages where
import Control.Concurrent (threadDelay)
import Control.Concurrent.MVar (MVar, readMVar)
import qualified Control.Distributed.Process as DP
import Control.Monad (replicateM, replicateM_)
import Control.Monad.Catch (bracket)... |
03761a042b4eea9761b8f5021ff57fde20a54d302db6c886f9e42e6232442547 | sdiehl/paris-fp | Driver.hs | module Driver (
driver
) where
import Protolude
import Text.Show.Pretty (ppShow)
import qualified Parser
import qualified Infer
import qualified Pretty
import qualified Transform
import qualified JIT
import qualified Compiler
import LLVM.General.Pretty (ppllvm)
driver :: LText -> IO ()
driver expr =
case Parser.... | null | https://raw.githubusercontent.com/sdiehl/paris-fp/d3ab8e0dde9035e17d755355d275ddc3c5bc57e7/src/Driver.hs | haskell | Compile LLVM | module Driver (
driver
) where
import Protolude
import Text.Show.Pretty (ppShow)
import qualified Parser
import qualified Infer
import qualified Pretty
import qualified Transform
import qualified JIT
import qualified Compiler
import LLVM.General.Pretty (ppllvm)
driver :: LText -> IO ()
driver expr =
case Parser.... |
ec16a39fa54e62dd9831424fcbe45812ae4cc1551fd14e4141c94d0aae889dee | ultralisp/ultralisp | landing.lisp | (defpackage #:ultralisp/widgets/landing
(:use #:cl)
(:import-from #:str
#:concat)
(:import-from #:ultralisp/widgets/projects)
(:import-from #:ultralisp/widgets/changelog)
(:import-from #:reblocks-lass)
(:import-from #:ultralisp/metadata)
(:import-from #:reblocks/widget
#:de... | null | https://raw.githubusercontent.com/ultralisp/ultralisp/37bd5d92b2cf751cd03ced69bac785bf4bcb6c15/src/widgets/landing.lisp | lisp | TODO: create a generic get-uri and define it for a version class
*
if there are more items in the database:
TODO: create a generic get-uri and define it for a version class
(version-uri ""
;; (format nil "/versions/~A" number)
)
(:a :href version-uri
number)
"Pending"
Taken from... | (defpackage #:ultralisp/widgets/landing
(:use #:cl)
(:import-from #:str
#:concat)
(:import-from #:ultralisp/widgets/projects)
(:import-from #:ultralisp/widgets/changelog)
(:import-from #:reblocks-lass)
(:import-from #:ultralisp/metadata)
(:import-from #:reblocks/widget
#:de... |
aa2d8426ef345f07c96f3ba7ad1d988fafd8d5c0ca8f5784fed5b6a751a1bfe1 | microsoft/hash-modulo-alpha | AlphaHashOptimizedHash16Bit.hs | | A copy of AlphaHashOptimizedHash.hs that uses a 16 - bit integer
-- type. Used only to empirically measure the frequency of hash
-- collisions.
{-# LANGUAGE BangPatterns #-}
# LANGUAGE LambdaCase #
module AlphaHashOptimizedHash16Bit where
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
impor... | null | https://raw.githubusercontent.com/microsoft/hash-modulo-alpha/7ff12dbee25595a141e197a4c0a3666c416abc4e/src/AlphaHashOptimizedHash16Bit.hs | haskell | type. Used only to empirically measure the frequency of hash
collisions.
# LANGUAGE BangPatterns #
----- Below are the differences from AlphaHashOptimizedHash -------
------------------------------------------------------------------- | | A copy of AlphaHashOptimizedHash.hs that uses a 16 - bit integer
# LANGUAGE LambdaCase #
module AlphaHashOptimizedHash16Bit where
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import qualified Data.Hashable
import Data.Bits (xor)
import Data.Hashable (Hashable)
import Data.List (foldl')
i... |
f2332a00f8117fc4e99a7adad54c40832874e622967beb48c9e8ea9743b27393 | Helium4Haskell/helium | List.hs | -----------------------------------------------------------------------------
Standard Library : List operations
--
-- Suitable for use with Helium
-----------------------------------------------------------------------------
module List where
import Maybe
find :: (a -> Bool) -> [a] -> Maybe a
f... | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/lib/simple/List.hs | haskell | ---------------------------------------------------------------------------
Suitable for use with Helium
---------------------------------------------------------------------------
groupBy splits its list argument into a list of lists of equal, adjacent
elements. e.g.,
---------------------------------------------... | Standard Library : List operations
module List where
import Maybe
find :: (a -> Bool) -> [a] -> Maybe a
find p = listToMaybe . filter p
findIndex :: (a -> Bool) -> [a] -> Maybe Int
findIndex p = listToMaybe . findIndices p
findIndices ::... |
f46a784923e543473fe4c5698fc9c1ecf446183209af3ff88f50e5ea52bec464 | aryx/xix | user.ml | (*s: version_control/user.ml *)
(*s: copyright ocaml-git *)
* Copyright ( c ) 2013 - 2017 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in a... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/version_control/user.ml | ocaml | s: version_control/user.ml
s: copyright ocaml-git
e: copyright ocaml-git
***************************************************************************
Prelude
***************************************************************************
*
* Most of the code below derives from: -git
*****************************... |
* Copyright ( c ) 2013 - 2017 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... |
0474158ed5a2f83d9327c66f6ef77d80cf6fc7cf7da543fb24ca672eeebf4334 | Apress/common-lisp-recipes | foo.lisp | (defpackage :foo
(:use :cl)
(:export :main))
(in-package :foo)
(defun foo-1 (n)
(loop for i below (* 1000 n) maximize i))
(defun foo-2 (n)
(loop for i below n sum i))
(defun foo-3 (n)
(loop for i below n sum (foo-2 i)))
(defun bar-1 (n)
(loop for i below n sum (foo-1 i)))
(defun bar-2 (n)
(loop for ... | null | https://raw.githubusercontent.com/Apress/common-lisp-recipes/211a8b6eabc48ac906010e8c5a185f03504b3867/code/chapter-17/foo.lisp | lisp | (defpackage :foo
(:use :cl)
(:export :main))
(in-package :foo)
(defun foo-1 (n)
(loop for i below (* 1000 n) maximize i))
(defun foo-2 (n)
(loop for i below n sum i))
(defun foo-3 (n)
(loop for i below n sum (foo-2 i)))
(defun bar-1 (n)
(loop for i below n sum (foo-1 i)))
(defun bar-2 (n)
(loop for ... | |
39f8777490329775d4c23138260889136d29cbf2a2d79aca40aea146208cd9e3 | chaoxu/fancy-walks | 39.hs |
import Data.Bits
import Data.List
import Data.Ord
import Control.Arrow ((&&&))
mysqrt :: Int -> Int
mysqrt n = helper n 1 (-1) where
helper n x xx = if x' == xx then min x x' else helper n x' x where x' = (x + div n x) `shiftR` 1
list limit = [ (a,b,c)
| a <- [1 .. div limit 3]
, b <- ... | null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/projecteuler.net/39.hs | haskell |
import Data.Bits
import Data.List
import Data.Ord
import Control.Arrow ((&&&))
mysqrt :: Int -> Int
mysqrt n = helper n 1 (-1) where
helper n x xx = if x' == xx then min x x' else helper n x' x where x' = (x + div n x) `shiftR` 1
list limit = [ (a,b,c)
| a <- [1 .. div limit 3]
, b <- ... | |
a7838c425ad75deaac5466806b8a75b28c8ab7e9b810d7879e33dd33967afffb | narkisr-deprecated/core | jobs.clj | (ns re-core.integration.jobs
(:require
[re-core.model :refer (operations)]
[re-core.fixtures.core :refer (with-conf)]
[re-core.jobs :refer (jobs apply-config initialize-workers workers)])
(:use midje.sweet))
(with-conf
(with-state-changes [(before :facts (reset! workers {}))]
(fact "workers c... | null | https://raw.githubusercontent.com/narkisr-deprecated/core/85b4a768ef4b3a4eae86695bce36d270dd51dbae/test/re_core/integration/jobs.clj | clojure | (ns re-core.integration.jobs
(:require
[re-core.model :refer (operations)]
[re-core.fixtures.core :refer (with-conf)]
[re-core.jobs :refer (jobs apply-config initialize-workers workers)])
(:use midje.sweet))
(with-conf
(with-state-changes [(before :facts (reset! workers {}))]
(fact "workers c... | |
5b76b1479f33e5df67fd604a026774888c5cec123b71083b5fb21aad99d4e178 | alanzplus/EOPL | 2.5-test.rkt | #lang eopl
(require rackunit "2.5.rkt")
(require rackunit/text-ui)
(define test-env
(extend-env
'a 10
(extend-env
'b 11
(extend-env
'c 12
(empty-env)))))
(define env-test
(test-suite
"Tests for env"
(check-equal? (empty-env) '())
(check-equal? (empty-env? (empty-en... | null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch2/2.5-test.rkt | racket | #lang eopl
(require rackunit "2.5.rkt")
(require rackunit/text-ui)
(define test-env
(extend-env
'a 10
(extend-env
'b 11
(extend-env
'c 12
(empty-env)))))
(define env-test
(test-suite
"Tests for env"
(check-equal? (empty-env) '())
(check-equal? (empty-env? (empty-en... | |
3cc0fbba683fe2b00dd2c4dad8aba9a647478960c096d136bf27d7e82e551b73 | ocsigen/ocsigenserver | ocsigen_messages.mli | Ocsigen
* Copyright ( C ) 2005
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your option... | null | https://raw.githubusercontent.com/ocsigen/ocsigenserver/d468cf464dcc9f05f820c35f346ffdbe6b9c7931/src/server/ocsigen_messages.mli | ocaml | * Writing messages in the logs
* Write a message in access.log
* Write a message in errors.log
* Write a message in the console (if not called in silent mode)
* Use that function for all impossible cases in exception handlers
([try ... with ... | e -> unexpected_exception ...] or [Lwt.catch ...]).
A message... | Ocsigen
* Copyright ( C ) 2005
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your option... |
ca3ebed55ed508214c10ab55a0164d90fa48ea5625531115f082e09e046bd6cd | Guest0x0/normalization-bench | NBE_Memo.ml |
open Common.Syntax
module V1 = struct
type value =
{ rep : value_rep
; mutable syn : (int * term) option }
and value_rep =
| VLvl of int
| VLam of (value list * term)
| VApp of value * value
let mkv rep = { rep; syn = None } [@@inline]
let rec eval env tm =
... | null | https://raw.githubusercontent.com/Guest0x0/normalization-bench/ed3a61c65c5ac3238f8905a020df671caac991fa/Normalizers/NBE_Memo.ml | ocaml |
open Common.Syntax
module V1 = struct
type value =
{ rep : value_rep
; mutable syn : (int * term) option }
and value_rep =
| VLvl of int
| VLam of (value list * term)
| VApp of value * value
let mkv rep = { rep; syn = None } [@@inline]
let rec eval env tm =
... | |
2225f2ddef9ea126e8ddf37075eed592deefe580f42589a04017375ceeefcc63 | alt-romes/ghengin | Hex.hs | module Ghengin.Component.Mesh.Hex where
import Geomancy.Vec3
-- | Hex face: the vertices and indices to form a face
data HexFace = HexFace Int Int -- ^ q and r coords
![Vec3] -- ^ vertices in this face
![Int] -- ^ indices for face and thick border
... | null | https://raw.githubusercontent.com/alt-romes/ghengin/d82a9152e95dee61d52c7a6114a0e16162fdc826/src/Ghengin/Component/Mesh/Hex.hs | haskell | | Hex face: the vertices and indices to form a face
^ q and r coords
^ vertices in this face
^ indices for face and thick border
| Make hexagon vertices and indices
Inner hex triangle faces
Quads between outer and inner triangle
^ The outer and inner hex coords respectively
| Lift a coordinate in hexagon grid ... | module Ghengin.Component.Mesh.Hex where
import Geomancy.Vec3
deriving Show
makeHexFace :: Float
-> Float
^ Hexagon ( Axial ) Coordinates
-> HexFace
makeHexFace size percent (q, r) =
let
WithVec3 cx _ cz = liftHexCoord size (q,r)
(innerCorners, outerCorners)
... |
feeda86319f8b5ffbc7163d93ee65c7b1b1255ac6efc6070edebe58fcae34964 | polymeris/cljs-aws | mobile_analytics.cljs | (ns cljs-aws.mobile-analytics
(:require [cljs-aws.base.requests])
(:require-macros [cljs-aws.base.service :refer [defservice]]))
(defservice "MobileAnalytics" "mobileanalytics-2014-06-05.min.json")
| null | https://raw.githubusercontent.com/polymeris/cljs-aws/3326e7c4db4dfc36dcb80770610c14c8a7fd0d66/src/cljs_aws/mobile_analytics.cljs | clojure | (ns cljs-aws.mobile-analytics
(:require [cljs-aws.base.requests])
(:require-macros [cljs-aws.base.service :refer [defservice]]))
(defservice "MobileAnalytics" "mobileanalytics-2014-06-05.min.json")
| |
fa33d0493faba8753f45e8324a2db7375fac754898a98e6e145d6d3a33e97590 | Kleidukos/Intrigue | Main.hs | You can benchmark your code quickly and effectively with Criterion . See its
-- website for help: </>.
import Criterion.Main
main :: IO ()
main = defaultMain [bench "const" (whnf const ())]
| null | https://raw.githubusercontent.com/Kleidukos/Intrigue/4cb606ba630540e2417e54d0bc845ac0f20c78fc/benchmark/Main.hs | haskell | website for help: </>. | You can benchmark your code quickly and effectively with Criterion . See its
import Criterion.Main
main :: IO ()
main = defaultMain [bench "const" (whnf const ())]
|
b033ef0e8f3f85f25a15d03a44bae1964b7bace23289fb39c11eb4664a15098f | ucsd-progsys/dsolve | balance.ml |
* ' a list(n ) is the type for lists of length n
* [ ] is assigned the type ' a list(0 )
* op : : is assigned the type { n : } ' a * ' a list(n ) - > ' a list(n+1 )
* 'a list(n) is the type for lists of length n
* [] is assigned the type 'a list(0)
* op:: is assigned the type {n:nat} 'a * 'a list(n) -> ... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/xiog/DMLex/balance.ml | ocaml | note that #"c" represents a constant character c |
* ' a list(n ) is the type for lists of length n
* [ ] is assigned the type ' a list(0 )
* op : : is assigned the type { n : } ' a * ' a list(n ) - > ' a list(n+1 )
* 'a list(n) is the type for lists of length n
* [] is assigned the type 'a list(0)
* op:: is assigned the type {n:nat} 'a * 'a list(n) -> ... |
6d63ee4b7e0b17fd41848c9a1fd0e812062526124718f248649e25c59a21988e | jeapostrophe/exp | fake-serve.rkt | #lang racket
(require web-server/web-server
(prefix-in files: web-server/dispatchers/dispatch-files)
racket/runtime-path)
(define-runtime-path the-file
"/Users/jay/Downloads/The_Out-Cast_ep18.mp3")
(serve
#:dispatch
(files:make
#:url->path
(λ (url)
(values
the-file
empty))
#:... | null | https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/fake-serve.rkt | racket | #lang racket
(require web-server/web-server
(prefix-in files: web-server/dispatchers/dispatch-files)
racket/runtime-path)
(define-runtime-path the-file
"/Users/jay/Downloads/The_Out-Cast_ep18.mp3")
(serve
#:dispatch
(files:make
#:url->path
(λ (url)
(values
the-file
empty))
#:... | |
65e297315844217f46260377edab7e31cca1653988e3b1b78e28ed2ce3c01794 | renanroberto/whatsyourquestion-bot | Main.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module Main where
import Control.Monad.IO.Class (liftIO)
import Data.Aeson (ToJSON, toJSON)
import qualified Data.Map.Strict as Map
import Data.Maybe (fromMaybe)
import GHC.Co... | null | https://raw.githubusercontent.com/renanroberto/whatsyourquestion-bot/374dffaa3869acd393b04748536be340e6e4a066/app/Main.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module Main where
import Control.Monad.IO.Class (liftIO)
import Data.Aeson (ToJSON, toJSON)
import qualified Data.Map.Strict as Map
import Data.Maybe (fromMaybe)
import GHC.Co... | |
2f88bbade99cfe17f0b544e895736223aad9d0f8afa1e05c791ccd31ae144d77 | TrustInSoft/tis-interpreter | from_register.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/from/from_register.ml | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
97dea3ef7c765d66e6bfc9811c3c7d4f5f258c36e1bc4d1c6f44932f4ac135bf | ku-fpg/haskino | ExprInt.hs | -------------------------------------------------------------------------------
-- |
Module : System . Hardware . Haskino . Test . ExprInt
Copyright : ( c ) University of Kansas
-- License : BSD3
-- Stability : experimental
--
-- Quick Check tests for Expressions returning a Expr Int
----------... | null | https://raw.githubusercontent.com/ku-fpg/haskino/9a0709c92c2da9b9371e292b00fd076e5539eb18/tests/ExprTests/ExprInt.hs | haskell | -----------------------------------------------------------------------------
|
License : BSD3
Stability : experimental
Quick Check tests for Expressions returning a Expr Int
-----------------------------------------------------------------------------
# LANGUAGE GADTs # | Module : System . Hardware . Haskino . Test . ExprInt
Copyright : ( c ) University of Kansas
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NegativeLiterals #
module System.Hardware.Haskino.Test.ExprInt where
import Prelude hiding
( quotRem, divMod, quot, rem, div, mod, properFraction, fromInteger, t... |
7d44b63c3dc7172769892d24bffd04f29d5e009977e4bdfdd057901fb24392ea | BranchTaken/Hemlock | test_fmt.ml | open! Basis.Rudiments
open! Basis
open U128
let test () =
let rec fn = function
| [] -> ()
| x :: xs' -> begin
let _ =
File.Fmt.stdout
|> pp x
|> Fmt.fmt " "
|> fmt ~alt:true ~zpad:true ~width:32L ~radix:Radix.Hex ~pretty:true x
|> Fmt.fmt "\n"
... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/u128/test_fmt.ml | ocaml | open! Basis.Rudiments
open! Basis
open U128
let test () =
let rec fn = function
| [] -> ()
| x :: xs' -> begin
let _ =
File.Fmt.stdout
|> pp x
|> Fmt.fmt " "
|> fmt ~alt:true ~zpad:true ~width:32L ~radix:Radix.Hex ~pretty:true x
|> Fmt.fmt "\n"
... | |
01b38808347645571844eb888990d6a258c873a7aa5034d27c461a3668921b2d | zack-bitcoin/verkle | precomputed_multi_exponent.erl | -module(precomputed_multi_exponent).
-export([
parameters/2,
doit/2,
test/1
]).
range(X, X) -> [X];
range(X, Y) when (X < Y) ->
[X|range(X+1, Y)].
multi_exponent_parameters2(_, X, 0) -> [X];
multi_exponent_parameters2(Base, X, Times) ->
N = ed:e_add(X, Base),
[X|multi_ex... | null | https://raw.githubusercontent.com/zack-bitcoin/verkle/5aa880bd9e1f8df95e04dff3f93830a39828fc86/src/crypto/precomputed_multi_exponent.erl | erlang | Rs0 is a list of fr encoded values.
we want to do part of the bucket algorithm, but since the generator points are all known ahead of time, we want to use precalculated values where possible.
io:fwrite(Rs),
of storage
true = (length(Domain) == length(Rs)),
of storage
of storage
5 %
Each row is an instance of a ... | -module(precomputed_multi_exponent).
-export([
parameters/2,
doit/2,
test/1
]).
range(X, X) -> [X];
range(X, Y) when (X < Y) ->
[X|range(X+1, Y)].
multi_exponent_parameters2(_, X, 0) -> [X];
multi_exponent_parameters2(Base, X, Times) ->
N = ed:e_add(X, Base),
[X|multi_ex... |
2558e44c2f94c3931589f142734aade1cf1a0a3ba746ebc774951007fe865a1e | reborg/clojure-essential-reference | 5.clj | < 1 >
(partition 200)
(mapcat #(drop 10 %))
(reduce +))
1222840 | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/ReducersandTransducers/Reducers/reducerandfolder/5.clj | clojure | < 1 >
(partition 200)
(mapcat #(drop 10 %))
(reduce +))
1222840 | |
b55ffb6714f043209a294db134ba90bbc51a9b3dfba443c3ffd0b7498f5d4362 | danielmiladinov/joy-of-clojure | quoting.clj | ;; Quoting
;; ---------------------------------------------------------------------------------------------------------------------
Using a special operator looks like calling a function -- a symbol as the first item of a list :
(quote age)
;; Each special operator has its own evaluation rules. The quote special ope... | null | https://raw.githubusercontent.com/danielmiladinov/joy-of-clojure/cad7d1851e153beb12a2cd536eb467be12cb7a73/src/joy-of-clojure/chapter2/quoting.clj | clojure | Quoting
---------------------------------------------------------------------------------------------------------------------
Each special operator has its own evaluation rules. The quote special operator prevents its argument from being
evaluated at all. Although the symbol age by itself might evaluate to the valu... | Using a special operator looks like calling a function -- a symbol as the first item of a list :
(quote age)
(def age 9)
(quote age)
(quote (cons 1 [2 3]))
= > ( cons 1 [ 2 3 ] ) )
list as a data collection without having Clojure try to call a function . We 've been careful to use vectors in the
(cons 1 (2 3))
... |
9a73cbc6eca74ee9431b811744048530252c6e30d56e92f17d2bf0ab2b57b5ab | ept/compsci | proof.ml | datatype atom = P|Q|R;
datatype formula = AND of formula*formula
| OR of formula*formula
| NOT of formula
| IMPL of formula*formula
| IFF of formula*formula
| ATOM of atom;
datatype interpr = CONS of atom*bool*interpr | NIL;
f... | null | https://raw.githubusercontent.com/ept/compsci/ed666bb4cf52ac2af5c2d13894870bdc23dca237/logic_proof/proof.ml | ocaml | datatype atom = P|Q|R;
datatype formula = AND of formula*formula
| OR of formula*formula
| NOT of formula
| IMPL of formula*formula
| IFF of formula*formula
| ATOM of atom;
datatype interpr = CONS of atom*bool*interpr | NIL;
f... | |
8b2c707ee3f137a1c7d32b9d138d27df5f539af87679fef66d852fe53a985c7c | agda/agda | Benchmark.hs | # LANGUAGE ExistentialQuantification #
# LANGUAGE NamedFieldPuns #
import Control.Applicative hiding (optional, many)
import Control.Monad
import System.Directory
import Text.ParserCombinators.ReadP
import Data.Char
import Data.List
import Text.PrettyPrint hiding (char)
import Text.Printf
import Data.Monoid
import Sys... | null | https://raw.githubusercontent.com/agda/agda/f50c14d3a4e92ed695783e26dbe11ad1ad7b73f7/benchmark/Benchmark.hs | haskell | Greedy version of many | # LANGUAGE ExistentialQuantification #
# LANGUAGE NamedFieldPuns #
import Control.Applicative hiding (optional, many)
import Control.Monad
import System.Directory
import Text.ParserCombinators.ReadP
import Data.Char
import Data.List
import Text.PrettyPrint hiding (char)
import Text.Printf
import Data.Monoid
import Sys... |
f5de44be15b39007917a7b7dfc21f460d17470ce2db700491c2b1d933d939fd6 | stepcut/plugins | Main.hs |
import System.Eval.Haskell
main = do i <- eval "1 + 6 :: Int" [] :: IO (Maybe Int)
if isJust i then putStrLn $ show (fromJust i) else return ()
| null | https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/eval/eval1/Main.hs | haskell |
import System.Eval.Haskell
main = do i <- eval "1 + 6 :: Int" [] :: IO (Maybe Int)
if isJust i then putStrLn $ show (fromJust i) else return ()
| |
4d0c78f0e8c1af5bbd0af688b338143ccee0e424c6fc1927b353be1c0ddf966f | ocaml/opam | opamVCS.mli | (**************************************************************************)
(* *)
Copyright 2012 - 2019 OCamlPro
Copyright 2012 INRIA
(* ... | null | https://raw.githubusercontent.com/ocaml/opam/ffbe2fb55e30e3815ca661848dea124c11a3d6f2/src/repository/opamVCS.mli | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2012 - 2019 OCamlPro
Copyright 2012 INRIA
GNU Lesser General Public License version 2.1 , with the special
open OpamTypes
module type VCS = sig
val name: OpamUrl.backend
val exists: dirname -> ... |
dd1403b396cf0df5544b0fd0452c0bd407bdb23109935a8d8c6479b3cc6b95c9 | anuragsoni/http_async | echo.ml | open! Core
open! Async
open Http_async
let () =
Command_unix.run
(Server.run_command ~summary:"echo" (fun _addr (_request, body) ->
let response = Response.create `Ok in
return (response, Body.Writer.stream (Body.Reader.pipe body))))
;;
| null | https://raw.githubusercontent.com/anuragsoni/http_async/602889e33b92a842ce7a64dcc259270f529231e3/example/echo.ml | ocaml | open! Core
open! Async
open Http_async
let () =
Command_unix.run
(Server.run_command ~summary:"echo" (fun _addr (_request, body) ->
let response = Response.create `Ok in
return (response, Body.Writer.stream (Body.Reader.pipe body))))
;;
| |
f648eb481c17e5f24df4e05ae453b515724ef0f55afe53730a76449e7be45f39 | wingo/fibers | memcached-client.scm | ;;; Simple memcached client implementation
Copyright ( C ) 2012 Free Software Foundation , Inc.
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the License ... | null | https://raw.githubusercontent.com/wingo/fibers/8f4ce08cd009926061d6ebfc55e4fa1e0b80ddd3/examples/memcached-client.scm | scheme | Simple memcached client implementation
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
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... |
Copyright ( C ) 2012 Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public License
(use-modules (rnrs bytevectors)
(fibers)
(fibers channels)
(ice-9 binary-po... |
b1fcda4c742e88e7bdfd0f838197cdf4ad8a740f7203dff37cc7910f8db2bea5 | well-typed/large-records | R010.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE PatternSynonyms #
{-# LANGUAGE ViewPatterns #-}
#if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
module Experiment.PatternSynonym_Default.Siz... | null | https://raw.githubusercontent.com/well-typed/large-records/c6c2b51af11e90f30822543d7ce4d1cb28cee294/large-records-benchmarks/bench/experiments/Experiment/PatternSynonym_Default/Sized/R010.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings # | # LANGUAGE PatternSynonyms #
#if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.PatternSynonym_Default.Sized.R010 where
import Bench.Types
data R
viewR :: R -> (
(T 00, T 01, T 02, T 03, T 04, T 05, T 06, T 07, T 08, T 09)
)
viewR = undefined
pattern MkR ::
T 00 -> T 01 -> T 02... |
8fcd9492e2a85550dca29f66e4bd2c2eec7f0214146fafe8fd599dd3691b864a | erlymon/erlymon | em_regexp.erl | %%%-------------------------------------------------------------------
@author
( C ) 2015 , < >
%%% @doc
Erlymon is an open source GPS tracking system for various GPS tracking devices .
%%%
Copyright ( C ) 2015 , < > .
%%%
This file is part of Erlymon .
%%%
Erlymon is free software : yo... | null | https://raw.githubusercontent.com/erlymon/erlymon/2250619783d6da1e33a502911a8fa52ce016c094/apps/erlymon/src/em_regexp/em_regexp.erl | erlang | -------------------------------------------------------------------
@doc
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
along with this program. If not, see </>.
@end
-------------------------------------------------------... | @author
( C ) 2015 , < >
Erlymon is an open source GPS tracking system for various GPS tracking devices .
Copyright ( C ) 2015 , < > .
This file is part of Erlymon .
Erlymon is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Publ... |
3bf21c91928b8f2c8345f39818c8844a887365446a212f36b69be11a218e53f4 | UnixJunkie/oranger | common.ml | open Printf
module L = BatList
module LO = Line_oriented
let train_test_split p lines =
assert(p >= 0.0 && p <= 1.0);
let n = float (L.length lines) in
let for_training = BatFloat.round_to_int (p *. n) in
let train, test = L.takedrop for_training lines in
assert(L.length train = for_training);
(train, tes... | null | https://raw.githubusercontent.com/UnixJunkie/oranger/58b40ab2db9589e29be20a998222fedad3370df0/src/common.ml | ocaml | dump molecules to csv file in dense format | open Printf
module L = BatList
module LO = Line_oriented
let train_test_split p lines =
assert(p >= 0.0 && p <= 1.0);
let n = float (L.length lines) in
let for_training = BatFloat.round_to_int (p *. n) in
let train, test = L.takedrop for_training lines in
assert(L.length train = for_training);
(train, tes... |
33f41756993b8c0de7f3f744ab581daeebf5d40c80521d6f96ad56238315e84c | stevenvar/OMicroB | analyser.ml | open OByteLib.Instr
open Pstack
type typevar = int
type codeptr = int
type blocktag = int
type closureofs = int
type closure = {
ptrs : codeptr list;
ofs : closureofs;
env : typevar list;
}
type value_descr =
| Unknown
| Int | Int32 | Int64 | Nativeint | Float
| Float_array | String
| Codeptr of codeptr
| Cl... | null | https://raw.githubusercontent.com/stevenvar/OMicroB/e4324d0736ac677b3086741dfdefb0e46775642b/src/bc2c/analyser.ml | ocaml | open OByteLib.Instr
open Pstack
type typevar = int
type codeptr = int
type blocktag = int
type closureofs = int
type closure = {
ptrs : codeptr list;
ofs : closureofs;
env : typevar list;
}
type value_descr =
| Unknown
| Int | Int32 | Int64 | Nativeint | Float
| Float_array | String
| Codeptr of codeptr
| Cl... | |
70d49f960357c634d69a34e21049d4ade453b8d117770e10b28b7463c2776184 | andrewthad/posix-api | Select.hs | module Posix.Select
(
) where
| null | https://raw.githubusercontent.com/andrewthad/posix-api/93fe162f68c53b70278de40649dbe20e3a5287d4/src/Posix/Select.hs | haskell | module Posix.Select
(
) where
| |
9bc98be3f3d2980aa70ed353cee294e120408f51d9a15cc2cb25a0b7c79d1ff8 | dinosaure/cri | channel.ml | type t = string
let for_all p str =
let res = ref true in
for i = 0 to String.length str - 1
do res := !res && p str.[i] done ; !res
module BNF = struct
open Angstrom
let chanstring = take_while1 @@ function
| '\x01' .. '\x07'
| '\x08' .. '\x09'
| '\x0b' .. '\x0c'
| '\x0e' .. '\x1f'
| '... | null | https://raw.githubusercontent.com/dinosaure/cri/ef0a05a9d8c18a0cd35b9ad4984d8ea01ee64f03/lib/channel.ml | ocaml | type t = string
let for_all p str =
let res = ref true in
for i = 0 to String.length str - 1
do res := !res && p str.[i] done ; !res
module BNF = struct
open Angstrom
let chanstring = take_while1 @@ function
| '\x01' .. '\x07'
| '\x08' .. '\x09'
| '\x0b' .. '\x0c'
| '\x0e' .. '\x1f'
| '... | |
99e36017cd5329908083bdd9a0f1508cd39ac4dff63311228c0e8903e4f0da7b | bet365/soap | soap_hrl2wsdl.erl | %%
%% %CopyrightBegin%
%%
Copyright Hillside Technology Ltd. 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by ap... | null | https://raw.githubusercontent.com/bet365/soap/856b5c418d8d40a6b5bcbbe3fd390c6a0b8d4f18/src/soap_hrl2wsdl.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 Hillside Technology Ltd. 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Translates an Erlang type specification to a WSDL .
-module(soap_hrl2wsdl).
-include("soap_wsdl_1_1.hrl").... |
06b7359586f1b46ace5166cc8025bcd0e6190d3b7fb83b4b38a3c71ac0b1c89b | anurudhp/CPHaskell | f.hs | -- AC
import Control.Arrow ((>>>))
main :: IO ()
main =
interact $
lines
>>> last
>>> solve 1 0 0 0
>>> show
>>> (++ "\n")
myMod :: Integer
myMod = 10 ^ 9 + 7
madd :: Integer -> Integer -> Integer
madd a b = (a + b) `mod` myMod
mmul :: Integer -> Integer -> Integer
mmul a b = (a * b)... | null | https://raw.githubusercontent.com/anurudhp/CPHaskell/01ae8dde6aab4f6ddfebd122ded0b42779dd16f1/contests/codeforces/1426/f.hs | haskell | AC |
import Control.Arrow ((>>>))
main :: IO ()
main =
interact $
lines
>>> last
>>> solve 1 0 0 0
>>> show
>>> (++ "\n")
myMod :: Integer
myMod = 10 ^ 9 + 7
madd :: Integer -> Integer -> Integer
madd a b = (a + b) `mod` myMod
mmul :: Integer -> Integer -> Integer
mmul a b = (a * b) `mod` ... |
8a3ae22c25b97f3ac121c9986723807f9b5d5a5f2dd95518ee00d198f44d6059 | hidaris/thinking-dumps | data-structures.rkt | (module data-structures (lib "eopl.ss" "eopl")
(require "lang.rkt") ; for expression?
(require "store.rkt") ; for reference?
(provide (all-defined-out)) ; too many things to list
;;;;;;;;;;;;;;;; expressed values ;;;;;;;;;;;;;;;;
;;; an expressed value is either ... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/eopl-solutions/chap4/4-18/implicit-refs/data-structures.rkt | racket | for expression?
for reference?
too many things to list
expressed values ;;;;;;;;;;;;;;;;
an expressed value is either a number, a boolean, a procval, or a
reference.
extractors:
procedures ;;;;;;;;;;;;;;;;
new for implicit-refs
env->list : Env -> List
used for pretty-printing and debugging
val is a denoted ... | (module data-structures (lib "eopl.ss" "eopl")
(define-datatype expval expval?
(num-val
(value number?))
(bool-val
(boolean boolean?))
(proc-val
(proc proc?))
(ref-val
(ref reference?))
)
(define expval->num
(lambda (v)
(cases expval v
(num-val (num) ... |
ee1f2db5289e5e2bad44d67f9aa8f9c57ce0419677002019118fbcfd49162ccc | snoyberg/http-client | ClientSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Network.HTTP.ClientSpec where
import Control.Concurrent (threadDelay)
import qualified Data.ByteString.Char8 as BS
import Network.HTTP.Client
import Network.HTTP.Client.Internal
import Network.HTTP.Types (status200, found30... | null | https://raw.githubusercontent.com/snoyberg/http-client/fa340a92badd50bcdd8e1d871068ccd5f8716226/http-client/test/Network/HTTP/ClientSpec.hs | haskell | # LANGUAGE OverloadedStrings #
orphan instance
Test the failure condition described in -client/issues/489
would close the connection even though we were not done reading.
Not ideal, but weak finalizers run on a separate thread, so it's racing with our drain
call
Calling `responseClose res` here prevents the early... | module Network.HTTP.ClientSpec where
import Control.Concurrent (threadDelay)
import qualified Data.ByteString.Char8 as BS
import Network.HTTP.Client
import Network.HTTP.Client.Internal
import Network.HTTP.Types (status200, found302, status405)
import Netw... |
5d01cb9ca693b6c8a41f3688ee5eaba63b9e8ee4ac5422ef5367994c818cf64e | mfp/extprot | protocol_types.ml | open Printf
open ExtList
type type_options = (string * string) list
let dump_type_options l =
let pr_list name l =
printf "%s options:\n" name;
List.iter (fun (k, v) -> printf "%s.%S = %S\n" name k v) l in
let dump_opt = function
`Global l -> pr_list "Global" l
| `OCaml l -> pr_list "OCaml" l
... | null | https://raw.githubusercontent.com/mfp/extprot/c69eb66398e35b964c4232a7c3c85151fb5eddbe/compiler/protocol_types.ml | ocaml | open Printf
open ExtList
type type_options = (string * string) list
let dump_type_options l =
let pr_list name l =
printf "%s options:\n" name;
List.iter (fun (k, v) -> printf "%s.%S = %S\n" name k v) l in
let dump_opt = function
`Global l -> pr_list "Global" l
| `OCaml l -> pr_list "OCaml" l
... | |
6cad8308c37a701025a5c75299fb6620940376043d6553fffbff35c87f812628 | erleans/vonnegut | cleanup_SUITE.erl | -module(cleanup_SUITE).
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
-compile(export_all).
-include("vg.hrl").
all() ->
[delete_policy].
init_per_testcase(_, Config) ->
PrivDir = ?config(priv_dir, Config),
application:load(vonnegut),
application:set_env(vonneg... | null | https://raw.githubusercontent.com/erleans/vonnegut/88693f192a4fc3da88e7b359e38e72cee25b3d24/test/cleanup_SUITE.erl | erlang | Execute the cleaner
| -module(cleanup_SUITE).
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
-compile(export_all).
-include("vg.hrl").
all() ->
[delete_policy].
init_per_testcase(_, Config) ->
PrivDir = ?config(priv_dir, Config),
application:load(vonnegut),
application:set_env(vonneg... |
efbedf3a4f9282f24add275c4227dd1ac1018091b43baea1ac87b508d68abba6 | GNOME/aisleriot | chessboard.scm | ; AisleRiot - chessboard.scm
Copyright ( C ) 2001 , 2003 < >
;
; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
; (at your option) any later version.
;
... | null | https://raw.githubusercontent.com/GNOME/aisleriot/5b04e58ba5f8df8223a3830d2c61325527d52237/games/chessboard.scm | scheme | AisleRiot - chessboard.scm
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. ... | Copyright ( C ) 2001 , 2003 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(use-modules (aisleriot interface) (aisleriot api))
(def-save-var BASE-V... |
8b3b4f904d3ebb607c9b1473630f4d058e657d6f5195a992532cda8e3b7fb4c7 | TyOverby/mono | response.ml | { { { Copyright ( c ) 2012 - 2013 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVI... | null | https://raw.githubusercontent.com/TyOverby/mono/8d6b3484d5db63f2f5472c7367986ea30290764d/vendor/mirage-ocaml-cohttp/cohttp/src/response.ml | ocaml | rfc7230#section-5.7.1
TODO Trailer header support | { { { Copyright ( c ) 2012 - 2013 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVI... |
1f9704b45f5f331176663ee9d93be8896df5aa2c71be95f2b5c60f163a5e3f5b | AngryLawyer/reactjs_of_ocaml | ReactAddonsTestUtils.mli | val render_into_document : ReactJS.react_element Js.t -> ReactDOM.react_component Js.t
| null | https://raw.githubusercontent.com/AngryLawyer/reactjs_of_ocaml/e89b077cc5c43b09021234478a82e66f2bfe5c37/lib/ReactAddonsTestUtils.mli | ocaml | val render_into_document : ReactJS.react_element Js.t -> ReactDOM.react_component Js.t
| |
7094557b4fa5a0fe0db3a52a9ddfcb227c59346c792b0ce4afece92d1942e5ed | nasa/Common-Metadata-Repository | ingest_events.clj | (ns cmr.metadata-db.data.ingest-events
"Allows broadcast of ingest events via the message queue"
(:require
[cmr.common.concepts :as cc]
[cmr.common.log :as log :refer (debug info warn error)]
[cmr.common.services.errors :as errors]
[cmr.message-queue.services.queue :as queue]
[cmr.metadata-db.config ... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/98b8c05fa0e0dbba5cec095aa4cc7fd7ebf1f912/metadata-db-app/src/cmr/metadata_db/data/ingest_events.clj | clojure | Note it's important that the format of this message match the ingest event format.
Note it's important that the format of this message match the ingest event format. | (ns cmr.metadata-db.data.ingest-events
"Allows broadcast of ingest events via the message queue"
(:require
[cmr.common.concepts :as cc]
[cmr.common.log :as log :refer (debug info warn error)]
[cmr.common.services.errors :as errors]
[cmr.message-queue.services.queue :as queue]
[cmr.metadata-db.config ... |
2134f49aea6276bb0f3eecbd78f6594d28a6cce0383e6d4c450a7b1c954fae89 | agda/agda2hs | AgdaInternals.hs | -- TODO: merge upstream, useful for other backends
# LANGUAGE TypeFamilies #
# LANGUAGE LambdaCase #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module AgdaInternals where
import Control.Monad.Writer
import Control.Monad.State
import Data.String
import Agda.Syntax.Internal
import Agda.TypeCheck... | null | https://raw.githubusercontent.com/agda/agda2hs/a248c10876ad7832da3c908535a1ddeff84d210e/src/AgdaInternals.hs | haskell | TODO: merge upstream, useful for other backends
runStConcreteNames :: StateT ConcreteNames (WriterT r m) a -> WriterT r m a | # LANGUAGE TypeFamilies #
# LANGUAGE LambdaCase #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module AgdaInternals where
import Control.Monad.Writer
import Control.Monad.State
import Data.String
import Agda.Syntax.Internal
import Agda.TypeChecking.Monad
import Agda.TypeChecking.Substitute
impor... |
b31e934b09c2f82a2278ba9e41c2f9bea7039e4fe395b2584d1c4105bfdf10f1 | Bogdanp/racket-lua | json.rkt | #lang racket/base
(require json
"error.rkt"
"nil.rkt"
"string.rkt"
"table.rkt")
(provide
make-json-module)
(define (make-json-module)
(make-table
`(#"decode" . ,decode)
`(#"encode" . ,encode)))
(define (decode s . _)
(jsexpr->lua-value (bytes->jsexpr s)))
(define (enc... | null | https://raw.githubusercontent.com/Bogdanp/racket-lua/ea5070c87a9595fcfe9945db147aa7a2f3930e4d/lua-lib/private/json.rkt | racket | TODO: Sparse check. | #lang racket/base
(require json
"error.rkt"
"nil.rkt"
"string.rkt"
"table.rkt")
(provide
make-json-module)
(define (make-json-module)
(make-table
`(#"decode" . ,decode)
`(#"encode" . ,encode)))
(define (decode s . _)
(jsexpr->lua-value (bytes->jsexpr s)))
(define (enc... |
c0b1015b1844e4660ba6137dd232618a65cbb29280d96eedc92c93a4266d3e6f | skynet-gh/skylobby | tasks_test.clj | (ns skylobby.fx.tasks-test
(:require
[cljfx.api :as fx]
[clojure.test :refer [deftest is]]
[skylobby.fx.tasks :as fx.tasks]))
(set! *warn-on-reflection* true)
(deftest tasks-root
(is (map?
(fx.tasks/tasks-root
{:fx/context (fx/create-context nil)
:screen-bounds {}})))
... | null | https://raw.githubusercontent.com/skynet-gh/skylobby/7895ad30d992b790ffbffcd2d7be2cf17f8df794/test/clj/skylobby/fx/tasks_test.clj | clojure | (ns skylobby.fx.tasks-test
(:require
[cljfx.api :as fx]
[clojure.test :refer [deftest is]]
[skylobby.fx.tasks :as fx.tasks]))
(set! *warn-on-reflection* true)
(deftest tasks-root
(is (map?
(fx.tasks/tasks-root
{:fx/context (fx/create-context nil)
:screen-bounds {}})))
... | |
c7ca1b9fbb8d16121e49dc2d3deb094702bd8d3d25816a8530874d08d4e00954 | heechul/crest-z3 | clexer.mli |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions... | null | https://raw.githubusercontent.com/heechul/crest-z3/cfcebadddb5e9d69e9956644fc37b46f6c2a21a0/cil/src/frontc/clexer.mli | ocaml | This is the main parser function
Start a context
Add a new string as a type name
Add a new string as a variable name
Remove all names added in this context |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions... |
b8e50cf95992da7e2574e38fc05bfe1574e04bae9fb72bfdff59ecb35bb08a28 | maralorn/kassandra | Prelude.hs | # OPTIONS_GHC -Wno - deprecations #
module Prelude (
module Relude,
module Optics,
module Optics.TH,
module Data.Text.Optics,
partitionEithersNE,
Task,
i,
(<$?>),
(<&?>),
Aeson.ToJSON,
Aeson.FromJSON,
getZonedTime,
addUTCTime,
utcToZonedTime,
zonedTimeZone,
zonedTimeToUTC,
firstJust,
... | null | https://raw.githubusercontent.com/maralorn/kassandra/598133b89ab4e4a6209da920636e9e6ee540f38a/apps/kassandra/kassandra/src/Prelude.hs | haskell | # OPTIONS_GHC -Wno - deprecations #
module Prelude (
module Relude,
module Optics,
module Optics.TH,
module Data.Text.Optics,
partitionEithersNE,
Task,
i,
(<$?>),
(<&?>),
Aeson.ToJSON,
Aeson.FromJSON,
getZonedTime,
addUTCTime,
utcToZonedTime,
zonedTimeZone,
zonedTimeToUTC,
firstJust,
... | |
1cda5b18b8a36eb086d9d14cc27769cfed25193103e0d4a78ba1e2992819ee7f | purescript/purescript | Exhaustive.hs | -- |
-- Module for exhaustivity checking over pattern matching definitions
The algorithm analyses the clauses of a definition one by one from top
-- to bottom, where in each step it has the cases already missing (uncovered),
-- and it generates the new set of missing cases.
--
module Language.PureScript.Linter.Exhaus... | null | https://raw.githubusercontent.com/purescript/purescript/b71cb532c7d8d97505376cb528080ca3046615fe/src/Language/PureScript/Linter/Exhaustive.hs | haskell | |
Module for exhaustivity checking over pattern matching definitions
to bottom, where in each step it has the cases already missing (uncovered),
and it generates the new set of missing cases.
|
Qualifies a propername from a given qualified propername and a default module name
|
Given an environment and a da... | The algorithm analyses the clauses of a definition one by one from top
module Language.PureScript.Linter.Exhaustive
( checkExhaustiveExpr
) where
import Prelude
import Protolude (ordNub)
import Control.Applicative
import Control.Arrow (first, second)
import Control.Monad (unless)
import Control.Monad.Writer.Cla... |
91807d3748a3c63b9d4d47518a90f0ff0d078be438db979144abcc9ea3ae3f1f | viercc/kitchen-sink-hs | Types.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE BangPatterns #-}
module Types where
import Prelude hiding (Word)
import qualified Data.Vector as V
import WordleLike ( Response(..) )
import Collection ( Collection(..) )
type Word = V.Vector Char
type Resp... | null | https://raw.githubusercontent.com/viercc/kitchen-sink-hs/04a718605229d8af668917598568393a7d7d3c6c/nerdle/wordle-solver/Types.hs | haskell | # LANGUAGE DeriveTraversable #
# LANGUAGE BangPatterns # | # LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
module Types where
import Prelude hiding (Word)
import qualified Data.Vector as V
import WordleLike ( Response(..) )
import Collection ( Collection(..) )
type Word = V.Vector Char
type Resp = V.Vector Response
showWordItem :: Collection Word i => i -> S... |
f5acf9d0bf44d01473ca8e0fe30a8e919a6cd74b5bc4895b5f89dc6fc4fb918c | darrenldl/ProVerif-ATP | syntax.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | null | https://raw.githubusercontent.com/darrenldl/ProVerif-ATP/7af6cfb9e0550ecdb072c471e15b8f22b07408bd/proverif2.00/src/syntax.ml | ocaml | Variables local to this module, to store elements of the t_horn_state we are going to return
Functions
Equations
Predicates
Names
Clauses | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... |
3b3e82aec55e9e783b9d2c397065212009724daf5e17a9dd58e5496c8a15696b | jsarracino/spyder | Spec.hs | module Language.Spyder.AST.Spec (
RelExpr(..)
, RelBop(..)
, RelUop(..)
, weakenPrev
, containsPrev
, inlinePrev
, hasCond
, desugConds
, gatherConds
) where
import Data.List
basically , the binary expression grammar from Imp , as well as foreaches .
-- TODO: figure out how to refactor.
data RelB... | null | https://raw.githubusercontent.com/jsarracino/spyder/a2f6d08eb2a3907d31a89ae3d942b50aaba96a88/Language/Spyder/AST/Spec.hs | haskell | TODO: figure out how to refactor.
Variables
Integers
index
Binary operations
function calls (not procedure calls)
prev(var, ifEmpty)
wo
numeric ops
TODO: maybe app
unfortunately we have to inline prev to make boogaloo succeed by command-line calls
convertImpl :: RelExpr -> RelExpr
convertImpl (RelBinop I... | module Language.Spyder.AST.Spec (
RelExpr(..)
, RelBop(..)
, RelUop(..)
, weakenPrev
, containsPrev
, inlinePrev
, hasCond
, desugConds
, gatherConds
) where
import Data.List
basically , the binary expression grammar from Imp , as well as foreaches .
data RelBop =
Plus | Minus | Mul | Div
| ... |
5f974d6d420e2c0c63a7e855f43d2c60f1ffff09cad9ea72995081191293bc37 | braintripping/lark | delta.cljs | (ns lark.structure.delta
(:refer-clojure :exclude [apply resolve])
(:require [chia.util :as u]
[lark.tree.emit :as emit] ;; for macro
[lark.structure.coords :as coords]
[cljs.spec.alpha :as s]
[cljs.pprint :as pp]
[lark.structure.pat... | null | https://raw.githubusercontent.com/braintripping/lark/95038a823068681c39453c46a309a3514cf48800/tools/test/lark/structure/delta.cljs | clojure | for macro | (ns lark.structure.delta
(:refer-clojure :exclude [apply resolve])
(:require [chia.util :as u]
[lark.structure.coords :as coords]
[cljs.spec.alpha :as s]
[cljs.pprint :as pp]
[lark.structure.path :as path]
[lark.fast-zip :as z])
(:require-macros [lark.s... |
006dbfcbcc14543714f45c151ae46ccbd66000c8e2887229bae4a438092d6379 | gfngfn/toy-macro-ml | typeenv.mli |
open Syntax
type bound_to =
| Primitive of mono_type
| Normal of mono_type * stage
| Late of mono_type
| Bindee of identifier * mono_type * mono_type
| Macro of macro_param_type list * mono_type
type t
val empty : t
val add : identifier -> bound_to -> t -> t
val find_opt : identifier -> t -> boun... | null | https://raw.githubusercontent.com/gfngfn/toy-macro-ml/7a5eecfc53691adbd91ceba78f8dac3ef8790054/src/typeenv.mli | ocaml |
open Syntax
type bound_to =
| Primitive of mono_type
| Normal of mono_type * stage
| Late of mono_type
| Bindee of identifier * mono_type * mono_type
| Macro of macro_param_type list * mono_type
type t
val empty : t
val add : identifier -> bound_to -> t -> t
val find_opt : identifier -> t -> boun... | |
0065948ca3c100ed4bd1858ec8aeca406faad9481ebc264717e42fa5e05a95eb | kupl/FixML | sub24.ml | type formula = TRUE
| FALSE
| NOT of formula
| ANDALSO of formula * formula
| ORELSE of formula * formula
| IMPLY of formula * formula
| LESS of expr * expr
and expr = NUM of int
| PLUS of expr * expr
| MINUS of expr * expr
let rec result : expr -> int = fun e ->
match e with
| NUM(n) -> n
| PLUS(n1... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/formula/formula/submissions/sub24.ml | ocaml | type formula = TRUE
| FALSE
| NOT of formula
| ANDALSO of formula * formula
| ORELSE of formula * formula
| IMPLY of formula * formula
| LESS of expr * expr
and expr = NUM of int
| PLUS of expr * expr
| MINUS of expr * expr
let rec result : expr -> int = fun e ->
match e with
| NUM(n) -> n
| PLUS(n1... | |
6353efba1a83b09972e84252f54e2e7509d00db1e56fed3b5af74e852743ce6c | ygrek/mldonkey | fileTPFTP.ml | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey 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
... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/networks/fileTP/fileTPFTP.ml | ocaml | ***********************************************************************
MAIN
********************************... | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey 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
... |
e01e8cc85754b08509f94dcac91f94b4246181756f04d8afda8e6ed3b74c99e2 | dhess/sicp-solutions | ex2.41.scm | (define nil (quote ()))
(define (filter predicate sequence)
(cond ((null? sequence) nil)
((predicate (car sequence))
(cons (car sequence)
(filter predicate (cdr sequence))))
(else (filter predicate (cdr sequence)))))
(define (enumerate-interval low high)
(if (> low high)
... | null | https://raw.githubusercontent.com/dhess/sicp-solutions/2cf78db98917e9cb1252efda76fddc8e45fe4140/chap2/ex2.41.scm | scheme | (define nil (quote ()))
(define (filter predicate sequence)
(cond ((null? sequence) nil)
((predicate (car sequence))
(cons (car sequence)
(filter predicate (cdr sequence))))
(else (filter predicate (cdr sequence)))))
(define (enumerate-interval low high)
(if (> low high)
... | |
a8aac6756cb5d9db286ecdc7f8e2bfd7b19075e3e6e13df9ba4f0223ec2780f1 | bsaleil/lc | config-debug.scm |
(define-macro (assert c err)
`(if (not ,c)
(begin
(println "!!! ERROR : " ,err)
(exit 1))))
| null | https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/config-debug.scm | scheme |
(define-macro (assert c err)
`(if (not ,c)
(begin
(println "!!! ERROR : " ,err)
(exit 1))))
| |
707bd5140653a1cb7ff81c95d49e0d41f2cdfc229162b0e2ebd9313ba27208e0 | LuKC1024/stacker | datatypes.rkt | #lang plait
(require "io.rkt")
(require "error.rkt")
(require "utilities.rkt")
(require (typed-in "show.rkt" [string-of-o : (Obs -> String)]))
(require (typed-in racket
[random : (Number -> Number)]
[list->vector : ((Listof 'a) -> (Vectorof 'a))]
[vector->list :... | null | https://raw.githubusercontent.com/LuKC1024/stacker/947184c38bf32c99601f5f1cba16e0d445b907f8/datatypes.rkt | racket | #lang plait
(require "io.rkt")
(require "error.rkt")
(require "utilities.rkt")
(require (typed-in "show.rkt" [string-of-o : (Obs -> String)]))
(require (typed-in racket
[random : (Number -> Number)]
[list->vector : ((Listof 'a) -> (Vectorof 'a))]
[vector->list :... | |
f14b679b584ea26e5cf7015951ef2c39dc16ca0c53b0c63123d8de56972b6066 | nponeccop/HNC | GraphCompiler.hs | # LANGUAGE FlexibleContexts , LambdaCase , NoMonomorphismRestriction , TypeFamilies #
module HN.Optimizer.GraphCompiler (compileGraph) where
import Compiler.Hoopl
import Control.Applicative
import Data.Functor.Foldable
import qualified Data.Map as M
import HN.Intermediate
import qualified HN.Optimizer.Node as N
impor... | null | https://raw.githubusercontent.com/nponeccop/HNC/d8447009a04c56ae2cba4c7c179e39384085ea00/HN/Optimizer/GraphCompiler.hs | haskell | compileLet :: LetIn -> LabelMapM ()
compileLet (In e) = compileExpr e
compileLet (Let def inner) = compileGraph def >> compileLet inner | # LANGUAGE FlexibleContexts , LambdaCase , NoMonomorphismRestriction , TypeFamilies #
module HN.Optimizer.GraphCompiler (compileGraph) where
import Compiler.Hoopl
import Control.Applicative
import Data.Functor.Foldable
import qualified Data.Map as M
import HN.Intermediate
import qualified HN.Optimizer.Node as N
impor... |
56fa85cc610530586e1885adaf4414ed55f2aeee689023f20a5d2a773671d942 | fukamachi/prove | asdf.lisp | (in-package :cl-user)
(defpackage prove.asdf
(:nicknames :prove-asdf)
(:use :cl
:asdf)
(:import-from :prove.output
:*test-result-output*
:*default-reporter*)
(:export :test-file
:run-test-system
:run
:*last-suite-report*))
(in-package :pr... | null | https://raw.githubusercontent.com/fukamachi/prove/5d71f02795b89e36f34e8c7d50e69b67ec6ca2de/src/asdf.lisp | lisp | do nothing | (in-package :cl-user)
(defpackage prove.asdf
(:nicknames :prove-asdf)
(:use :cl
:asdf)
(:import-from :prove.output
:*test-result-output*
:*default-reporter*)
(:export :test-file
:run-test-system
:run
:*last-suite-report*))
(in-package :pr... |
383c847b5ed64caa197fb1dbefd97acdee9f5e8d2d9479fc9c26da3e78fb854a | odis-labs/helix | Uplot.ml | module Element = Stdweb.Dom.Element
module Js = Helix.Js
type t = Js.t
let t = Js.global "uPlot"
let data_to_js =
let open Js.Encoder in
array (array float)
let make ~options ~data target =
let new3 = Js.Obj.new3 t Js.Encoder.js data_to_js Element.to_js in
new3 options data target
let set_data uplot data =... | null | https://raw.githubusercontent.com/odis-labs/helix/80e6f8c2d9993cfd6b0d8a53008e49d1d78dd6f9/examples/uplot-example/Uplot.ml | ocaml | module Element = Stdweb.Dom.Element
module Js = Helix.Js
type t = Js.t
let t = Js.global "uPlot"
let data_to_js =
let open Js.Encoder in
array (array float)
let make ~options ~data target =
let new3 = Js.Obj.new3 t Js.Encoder.js data_to_js Element.to_js in
new3 options data target
let set_data uplot data =... | |
6c21251f514bcb3a76fb3eb20af0dde48531874de7eba448d4413fc7d1a4e43e | travitch/llvm-analysis | AllocatorProfile.hs | {-# LANGUAGE OverloadedStrings #-}
-- | This module defines a number of allocation profiles that are
-- meant to be inputs to the points-to analyses. These profiles
-- identify the set of instructions that allocate *fresh* memory
-- locations (e.g., @malloc@).
--
-- Different profiles are useful for different language... | null | https://raw.githubusercontent.com/travitch/llvm-analysis/090c3484650552e620d02c5ddc7885267e04ac62/src/LLVM/Analysis/PointsTo/AllocatorProfile.hs | haskell | # LANGUAGE OverloadedStrings #
| This module defines a number of allocation profiles that are
meant to be inputs to the points-to analyses. These profiles
identify the set of instructions that allocate *fresh* memory
locations (e.g., @malloc@).
Different profiles are useful for different languages or setups.
Th... | module LLVM.Analysis.PointsTo.AllocatorProfile (
standardCProfile
) where
import LLVM.Analysis
@malloc@ , @calloc@ , and @alloca@ as allocators . @realloc@ is not
standardCProfile :: Instruction -> Bool
standardCProfile CallInst { callFunction = cf } =
case valueContent cf of
ExternalFunctionC ef ->
... |
930996c685a7226e1eb548c3c0b8344403a31636f00e78bf7af922494ac9f13e | shriram/cs019 | runtime-config.rkt | #lang racket/base
Uses collects / htdp / bsl / runtime.rkt from nightly build ~2011 - 09 - 05
combined with patch supplied by , 2011 - 09 - 01 ( " image snips and pretty - print " )
(require mzlib/pconvert
racket/pretty
lang/private/set-result
mrlib/image-core
racke... | null | https://raw.githubusercontent.com/shriram/cs019/3036e85450ae69dc5eb8efd2a0d878a0e03dcdde/runtime-config.rkt | racket | Set print-convert options:
(and (memq 'use-function-output-syntax options)
(named/undefined-handler
Set pretty-print options:
literal image constant
Set print handlers to use print-convert and pretty-write:
| #lang racket/base
Uses collects / htdp / bsl / runtime.rkt from nightly build ~2011 - 09 - 05
combined with patch supplied by , 2011 - 09 - 01 ( " image snips and pretty - print " )
(require mzlib/pconvert
racket/pretty
lang/private/set-result
mrlib/image-core
racke... |
c6298ad88d66ff4df4d555461848a51a8a08d1488d9ad4c4281b673dce5afd7b | saikyun/clobits | gen_c.clj | (ns clobits.gen-c
(:require [clojure.string :as str]
[clobits.util :as u :refer [add-prefix-to-sym create-subdirs!]]
[clojure.java.shell :refer [sh]]))
(defn get-arg
[i {:keys [sym]}]
(if-not sym (str "arg" i) sym))
(defn gen-args
[args]
(str/join ", " (map-indexed (fn [i {:keys [typ... | null | https://raw.githubusercontent.com/saikyun/clobits/67bc60cbf6bed8a5178d552d3485e4117fb4df10/src/clj/clobits/gen_c.clj | clojure |
=> "int _SHADOWING_SDL_Init(Uint32 flags) {\n return SDL_Init(flags);\n}" | (ns clobits.gen-c
(:require [clojure.string :as str]
[clobits.util :as u :refer [add-prefix-to-sym create-subdirs!]]
[clojure.java.shell :refer [sh]]))
(defn get-arg
[i {:keys [sym]}]
(if-not sym (str "arg" i) sym))
(defn gen-args
[args]
(str/join ", " (map-indexed (fn [i {:keys [typ... |
9f5bad75e4b872e9cd2df10ec70b0331978061a9b8d3b70136f3a3fdb67481f4 | ghcjs/ghcjs | overloadedlistsrun03.hs | # LANGUAGE OverloadedLists , TypeFamilies #
import GHC.Exts
-- This nonsensical instance is used to test if fromListN is used properly in
-- desugaring of explicit lists.
instance IsList Int where
type Item Int = Int
fromList _ = 0
toList _ = []
fromListN n _ = n
main = do print ([] :: Int)
print ([1... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/overloadedlists/overloadedlistsrun03.hs | haskell | This nonsensical instance is used to test if fromListN is used properly in
desugaring of explicit lists. | # LANGUAGE OverloadedLists , TypeFamilies #
import GHC.Exts
instance IsList Int where
type Item Int = Int
fromList _ = 0
toList _ = []
fromListN n _ = n
main = do print ([] :: Int)
print ([1,2,3,4,5] :: Int)
print ([1..3] :: Int)
print ([7] :: Int)
print ([1,3..] :: Int)... |
6f51613c5007a89af83483d8772346cf5513ca70f7d7c5ba57a2733732322198 | ocaml-community/yojson | test_monomorphic.mli | val equality : unit Alcotest.test_case list
| null | https://raw.githubusercontent.com/ocaml-community/yojson/b743857a28f02af68bcfadb515df0b21a9c6eb06/test/test_monomorphic.mli | ocaml | val equality : unit Alcotest.test_case list
| |
355b07c24dd40438e4d28bd58998abff6b3c1a04071e622946e08b190bc9a1a3 | arrdem/sad | ibnf.clj | (ns ^{:doc "An implementation of a lexer, parser and code gen for an
indentation and newline based BNF grammar as used here:
www2.informatik.uni-halle.de/lehre/pascal/sprache/pas_bnf.html"
:author "Reid McKenzie"
:added "0.1.5"}
me.arrdem.sad.grammars.ibnf
(:require [le... | null | https://raw.githubusercontent.com/arrdem/sad/11aca91ec38009069d6d7f50de7fd2326cc627b8/src/me/arrdem/sad/grammars/ibnf.clj | clojure | ------------------------------------------------------------------------------
Ditch junk tokens
Process special symbols
------------------------------------------------------------------------------
Declare & define productions
------------------------------------------------------------------------------
And thro... | (ns ^{:doc "An implementation of a lexer, parser and code gen for an
indentation and newline based BNF grammar as used here:
www2.informatik.uni-halle.de/lehre/pascal/sprache/pas_bnf.html"
:author "Reid McKenzie"
:added "0.1.5"}
me.arrdem.sad.grammars.ibnf
(:require [le... |
15a7b3b9d82463ab4c5ffbfa2b5a2c9aad5ecfaf475c5a4de874fb1df0a13dbe | hyperfiddle/electric | explorer_tests.cljc | (ns hyperfiddle.hfql.explorer-tests
(:require
[hyperfiddle.api :as hf :refer [hfql]]
[hyperfiddle.hfql :as hfql]
[hyperfiddle.hfql.explorer :as ex :refer [TreeToExplorer Sequence]]
[hyperfiddle.photon :as p]
[hyperfiddle.rcf :as rcf :refer [tests with tap %]]
[datascript.core :as d]
[clojure.stri... | null | https://raw.githubusercontent.com/hyperfiddle/electric/e633dc635cf84e0a2320b664ba722b696ce0067b/scratch/geoffrey/2022/explorer_tests.cljc | clojure | A renderer mappping and HFQL tree to an explorer compatible structure:
Flow[[Flow[depth, Flow[[Flow[col], …]], …]]
-----------------------------------------------------------------------------
note it didn’t throw
Function navigation
Binding conveyance | (ns hyperfiddle.hfql.explorer-tests
(:require
[hyperfiddle.api :as hf :refer [hfql]]
[hyperfiddle.hfql :as hfql]
[hyperfiddle.hfql.explorer :as ex :refer [TreeToExplorer Sequence]]
[hyperfiddle.photon :as p]
[hyperfiddle.rcf :as rcf :refer [tests with tap %]]
[datascript.core :as d]
[clojure.stri... |
5d56de5717de55654604e004ef759e9f28fe6e502fda60d6a2feeef58189d4c6 | ghc/ghc | Var.hs |
( c ) The University of Glasgow 2006
( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998
\section{@Vars@ : Variables }
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section{@Vars@: Variables}
-}
# LANGUAGE FlexibleContexts , MultiWayIf , FlexibleI... | null | https://raw.githubusercontent.com/ghc/ghc/3c3060e4645b12595b187e7dbaa758e8adda15e0/compiler/GHC/Types/Var.hs | haskell | |
#name_types#
details during typechecking.
to a data constructor, primitive operation, or record selectors.
(e.g. by a lambda) or at the top level of the module being compiled.
* The main data type and synonyms
* In and Out variants
** Constructing, taking apart, modifying 'Id's
** Predicates
... |
( c ) The University of Glasgow 2006
( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998
\section{@Vars@ : Variables }
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section{@Vars@: Variables}
-}
# LANGUAGE FlexibleContexts , MultiWayIf , FlexibleI... |
21ff2196b1ee6deb481793bbdb10367809e296a87e62760fd3bb58380ccfc539 | input-output-hk/marlowe-cardano | Contracts.hs | # LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE OverloadedLists #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
-- | This module defines a server for the /contracts REST API.
module Language.Marlowe.Runtime.Web.Server.REST.Contracts
where
import Cardano.Api (AsType(..), deserialiseFromTextEnvelo... | null | https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/0daada2f75d940a5b9b5eaee3c41d17b9fded03f/marlowe-runtime-web/server/Language/Marlowe/Runtime/Web/Server/REST/Contracts.hs | haskell | # LANGUAGE GADTs #
| This module defines a server for the /contracts REST API. | # LANGUAGE DataKinds #
# LANGUAGE OverloadedLists #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
module Language.Marlowe.Runtime.Web.Server.REST.Contracts
where
import Cardano.Api (AsType(..), deserialiseFromTextEnvelope, getTxBody)
import qualified Cardano.Api.SerialiseTextEnvelope as Cardano
import Co... |
322f94e545712274a0ba8cdbc1d7383cc419c3f020975e24f6fe67da79bbcec0 | Frama-C/Frama-C-snapshot | select_simple.ml | (* ledit bin/toplevel.top -deps tests/slicing/simple_intra_slice.c
* *)
include LibSelect ;;
let main _ =
ignore (test_select_data "f1" "G");
ignore (test_select_retres "f1");
Slicing.Api.set_modes ~calls:2 ();
ignore (test_select_retres "f2");
ignore (test_select_data "f6" "n");
ignore (test_select_retr... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/tests/slicing/select_simple.ml | ocaml | ledit bin/toplevel.top -deps tests/slicing/simple_intra_slice.c
* |
include LibSelect ;;
let main _ =
ignore (test_select_data "f1" "G");
ignore (test_select_retres "f1");
Slicing.Api.set_modes ~calls:2 ();
ignore (test_select_retres "f2");
ignore (test_select_data "f6" "n");
ignore (test_select_retres "f7");
ignore (test_select_data "f7" "S.a");
ignore (test_select_... |
8bcb8d1836ea2beebd7b3de45902b8a0c9ed312253803c6d911e592a7fb89797 | gator1/jepsen | core_test.clj | (ns uv3-e.core-test
(:require [clojure.test :refer :all]
[uv3-e.core :refer :all]
[uv3-e.nemesis :refer :all]
[jepsen.core :as jepsen]
[jepsen.generator :as gen]
[jepsen.checker :as checker]
[jepsen.tests :as tests]
[knossos.model :re... | null | https://raw.githubusercontent.com/gator1/jepsen/1932cbd72cbc1f6c2a27abe0fe347ea989f0cfbb/uv3-e/test/uv3_e/core_test.clj | clojure | (ns uv3-e.core-test
(:require [clojure.test :refer :all]
[uv3-e.core :refer :all]
[uv3-e.nemesis :refer :all]
[jepsen.core :as jepsen]
[jepsen.generator :as gen]
[jepsen.checker :as checker]
[jepsen.tests :as tests]
[knossos.model :re... | |
e65b1d9b9aa49584ace5cefb59bd615d87effa0fc3e7ecff6f8a5b4868693515 | grin-compiler/ghc-wpc-sample-programs | Meta.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
|
Module : Tests . Readers . Org . Meta
Copyright : © 2014 - 2020 License : GNU GPL , version 2 or above
Maintainer : >
Stability : alpha
Portability : portable
Tests parsing of org meta data ( mos... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/test/Tests/Readers/Org/Meta.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
|
Module : Tests . Readers . Org . Meta
Copyright : © 2014 - 2020 License : GNU GPL , version 2 or above
Maintainer : >
Stability : alpha
Portability : portable
Tests parsing of org meta data ( mostly lines starting with @#+@ ) .
... |
325a91bb8ac9277b36b4465f3d6f9912fb29e0b98e0e24bc9d7ea1bf729fd7be | active-group/sqlosure | type_test.clj | (ns sqlosure.type-test
(:require [sqlosure.type :refer :all]
[sqlosure.universe :as u]
[sqlosure.time :as time]
[clojure.test :refer :all]))
(deftest make-base-type-test
(let [test-universe (u/make-universe)
string-type (make-base-type 'string string? {:universe test-uni... | null | https://raw.githubusercontent.com/active-group/sqlosure/a3b2982e5ae2fe184432efb4af26fd440d27ffa4/test/sqlosure/type_test.clj | clojure | (ns sqlosure.type-test
(:require [sqlosure.type :refer :all]
[sqlosure.universe :as u]
[sqlosure.time :as time]
[clojure.test :refer :all]))
(deftest make-base-type-test
(let [test-universe (u/make-universe)
string-type (make-base-type 'string string? {:universe test-uni... | |
3e74ecf513565439ab2e27d6e9add1255cbaaaca6d6b8b63c11349ddde310026 | gafiatulin/codewars | EscapeTheMines.hs | -- Escape the Mines !
-- /
module EscapeTheMines where
import Data.List (delete)
import Data.Maybe (fromJust, listToMaybe, mapMaybe)
import Control.Arrow ((&&&), first, second)
type XY = (Int,Int)
data Move = U | D | R | L deriving (Eq, Show)
solve :: [[Bool]] -> XY -> XY -> [Move]
solve grid start = reverse . from... | null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/3%20kyu/EscapeTheMines.hs | haskell | Escape the Mines !
/ |
module EscapeTheMines where
import Data.List (delete)
import Data.Maybe (fromJust, listToMaybe, mapMaybe)
import Control.Arrow ((&&&), first, second)
type XY = (Int,Int)
data Move = U | D | R | L deriving (Eq, Show)
solve :: [[Bool]] -> XY -> XY -> [Move]
solve grid start = reverse . fromJust . path [U, D, R, L]
... |
e1107a022aa80535fd8f2ecbd2bc9298d51fefd603ab51fd689e8b851a11db62 | evdubs/oic-options-chains | transform-load.rkt | #lang racket/base
(require db
gregor
gregor/period
html-parsing
racket/cmdline
racket/list
racket/port
racket/sequence
racket/string
sxml
threading)
(struct option
(underlying
expiration
strike
call-put
bid
ask
... | null | https://raw.githubusercontent.com/evdubs/oic-options-chains/b77ded98b22cd1eb19db5bbf2c568777ebdccefd/transform-load.rkt | racket | #lang racket/base
(require db
gregor
gregor/period
html-parsing
racket/cmdline
racket/list
racket/port
racket/sequence
racket/string
sxml
threading)
(struct option
(underlying
expiration
strike
call-put
bid
ask
... | |
1601415620a1a93c85e5117fefa1098e5910eefabc88afe2aa34c5d73dca7bd9 | quchen/generative-art | Main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main (main, test) where
import Control.Concurrent.Async
import Control.Exception
import System.FilePath
import System.FilePath.Glob
import qualified Test.Data.Tree.Extended
import qualified Test.Draw
import qualified Test.Draw.Color
import qualified Test.Draw.Plotting
impo... | null | https://raw.githubusercontent.com/quchen/generative-art/2eb3597aef8f3f7e9577690f721800cf1035ee9e/test/testsuite/Main.hs | haskell | # LANGUAGE OverloadedStrings #
Useful in GHCi: no timeout |
module Main (main, test) where
import Control.Concurrent.Async
import Control.Exception
import System.FilePath
import System.FilePath.Glob
import qualified Test.Data.Tree.Extended
import qualified Test.Draw
import qualified Test.Draw.Color
import qualified Test.Draw.Plotting
import qualified Test.Draw.Text
import ... |
30dd2a6f121f0fd84599ca64c59f0bb35403df370798014778490c429592947d | MyDataFlow/ttalk-server | alarms_app.erl | %%%-------------------------------------------------------------------
@author
( C ) 2013 , Erlang Solutions Ltd.
%%% @doc A simple system monitoring utility
%%% for applications using mnesia.
%%%
%%% @end
Created : 16 Apr 2013 by
%%%-------------------------------------------------------------------
-... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/alarms/src/alarms_app.erl | erlang | -------------------------------------------------------------------
@doc A simple system monitoring utility
for applications using mnesia.
@end
-------------------------------------------------------------------
Application callbacks
===================================================================
Applic... | @author
( C ) 2013 , Erlang Solutions Ltd.
Created : 16 Apr 2013 by
-module(alarms_app).
-behaviour(application).
-export([start/2, stop/1]).
-include("alarms.hrl").
start(_StartType, _StartArgs) ->
gen_event:delete_handler(?EVENT_MANAGER, alarm_handler, []),
[ok = gen_event:add_handler(?EVENT_... |
8bf3adec8af3a6a7ddfd43631de4562b0f1242533c972540a87c31de3b7177f6 | 2600hz-archive/whistle | rebar_ct.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 et
%% -------------------------------------------------------------------
%%
rebar : Erlang Build Tools
%%
Copyright ( c ) 2009 ( )
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this softw... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/utils/rebar/src/rebar_ct.erl | erlang | ex: ts=4 sw=4 et
-------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sel... | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
rebar : Erlang Build Tools
Copyright ( c ) 2009 ( )
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the... |
abc1caaf14290007e8a17980240cb7ad239f2f962d986b878cf347f53e47553b | mzp/coq-ruby | declarations.mli | open Util
open Names
open Term
Bytecode
type values
type reloc_table
type to_patch_substituted
(*Retroknowledge *)
type action
type retroknowledge
(* Engagements *)
type engagement = ImpredicativeSet
(* Constants *)
type polymorphic_arity = {
poly_param_levels : Univ.universe option list;
poly_level : Univ.u... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/checker/declarations.mli | ocaml | Retroknowledge
Engagements
Constants
New: younger hyp at top
Primitive datas
Name of the type: [Ii]
Arity context of [Ii] with parameters: [forall params, Ui]
Arity sort, original user arity, and allowed elim sorts, if monomorphic
Names of the constructors: [cij]
Derived datas
Number of expected rea... | open Util
open Names
open Term
Bytecode
type values
type reloc_table
type to_patch_substituted
type action
type retroknowledge
type engagement = ImpredicativeSet
type polymorphic_arity = {
poly_param_levels : Univ.universe option list;
poly_level : Univ.universe;
}
type constant_type =
| NonPolymorphicTyp... |
9350a7ba9e56f52503d70e703be937f596b7b82904348b2b654283e2ff4004e8 | brendanhay/amazonka | DisassociateUserSettings.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused -... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workspaces-web/gen/Amazonka/WorkSpacesWeb/DisassociateUserSettings.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
* Creating a Request
* Request Lenses
* Destructuring the Response
* Response Lenses
| /See:/ 'newDisassociateUserSettings' smart constructor.
|
Create a value of 'DisassociateUserSettings' with all optional fields omitted.
... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
De... |
1dc2584ef6877455a47769ae1f0179aff5612b4b915205ec642dd22aab67da30 | maranget/hevea | imageManager.mli | (***********************************************************************)
(* *)
(* HEVEA *)
(* *)
, projet PARA , INR... | null | https://raw.githubusercontent.com/maranget/hevea/226eac8c506f82a600d453492fbc1b9784dd865f/imageManager.mli | ocaml | *********************************************************************
HEVEA
... | , projet PARA , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
module type S =
sig
val start : unit -> unit
val stop : unit -> unit
val restart : unit -> unit
... |
b598ebdda1b1bb33b4a6a985e4f4c37a9e422a57a571fd58e468d48bbf2d1ad8 | kupl/FixML | sub12.ml | type formula =
|True
|False
|Not of formula
|AndAlso of formula * formula
|OrElse of formula * formula
|Imply of formula * formula
|Equal of exp * exp
and exp =
|Num of int
|Plus of exp * exp
|Minus of exp * exp
let rec evalexp f =
match f with
|Num x -> x
|Plus (x,y)->(evalexp x)+(evalexp y)
|Minus (x,y)->(eval... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/formula/formula1/submissions/sub12.ml | ocaml | type formula =
|True
|False
|Not of formula
|AndAlso of formula * formula
|OrElse of formula * formula
|Imply of formula * formula
|Equal of exp * exp
and exp =
|Num of int
|Plus of exp * exp
|Minus of exp * exp
let rec evalexp f =
match f with
|Num x -> x
|Plus (x,y)->(evalexp x)+(evalexp y)
|Minus (x,y)->(eval... | |
c44787fac045eef8929aa5f7a0f09e138b3d9f7cb39e9ed2fe39937adff5d8cf | Deep-Symmetry/beat-link-trigger | nrepl.clj | (ns beat-link-trigger.nrepl
"Allows people to use more full-featured Clojure development
environments while working with Beat Link Trigger."
(:require [beat-link-trigger.prefs :as prefs]
[beat-link-trigger.util :as util]
[nrepl.server :as nrepl-server]
[seesaw.core :as seesaw]
... | null | https://raw.githubusercontent.com/Deep-Symmetry/beat-link-trigger/dbfbb2fa7e7bffe0d65befb2feaf0a331354f56c/src/beat_link_trigger/nrepl.clj | clojure | Assemble the window | (ns beat-link-trigger.nrepl
"Allows people to use more full-featured Clojure development
environments while working with Beat Link Trigger."
(:require [beat-link-trigger.prefs :as prefs]
[beat-link-trigger.util :as util]
[nrepl.server :as nrepl-server]
[seesaw.core :as seesaw]
... |
ea24b52a7fb7bfab72fa71a3d6e23e216db0a37c6acf44a85cf48a34b7240d77 | antoniogarrote/clojure-grizzly-trial | boot.clj | (def *framework-root* (. (new java.io.File ".") getCanonicalPath))
(ns com.agh.webserver.framework.boot)
(use 'com.agh.webserver)
(use 'com.agh.webserver.framework.logger)
(defn boot []
(do
(reload-framework)
(reset-logger-with-file-output :debug (str *framework-root* "/log/server.out"))
(log :info "fr... | null | https://raw.githubusercontent.com/antoniogarrote/clojure-grizzly-trial/9282179818cc5247b796dd6eb9ab6ccb721100a3/com/agh/webserver/framework/boot.clj | clojure | (def *framework-root* (. (new java.io.File ".") getCanonicalPath))
(ns com.agh.webserver.framework.boot)
(use 'com.agh.webserver)
(use 'com.agh.webserver.framework.logger)
(defn boot []
(do
(reload-framework)
(reset-logger-with-file-output :debug (str *framework-root* "/log/server.out"))
(log :info "fr... | |
314449255368a37312b024fe797fae2de9120530dfa6c61000cdef99227630c7 | ocaml-multicore/tezos | influxDB.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/tezt/lib_performance_regression/influxDB.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
592088fcae9fffbafc67e8d5e4979ad6dbda67655f739c05176b770b63a99a1b | elaforge/karya | WendyCarlos.hs | Copyright 2015
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
| Scales invented by . Derived from
-- <>
module Derive.Scale.WendyCarlos (scales) where
import qualified Data.Attoparsec.Text as Attoparsec.Text
import qualified Data.Char as Char
... | null | https://raw.githubusercontent.com/elaforge/karya/8d30186009ac22d1e66a5ba3e1a93159abb64cd1/Derive/Scale/WendyCarlos.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
<>
numbers?
| Frequency for a0.
Pass 0 for per_octave, since I'll be handling the octave here. | Copyright 2015
| Scales invented by . Derived from
module Derive.Scale.WendyCarlos (scales) where
import qualified Data.Attoparsec.Text as Attoparsec.Text
import qualified Data.Char as Char
import qualified Data.Map as Map
import qualified Data.Text as Text
import qualified Data.Vector as Vector
import qual... |
3723979e4c50dd2ec71d112207da2d8b14b974427463e46dfbae192392869e4d | altsun/My-Lisps | (LINEXP) Explode linetype.lsp | ;;
;;;
By
;;;
Modified original TXTEXP.LSP from Express Tools
Copyright © 1999 by Autodesk , Inc.
LINEXP.LSP modifications by XANADU
;;;
;;; Your use of this software is governed by the terms and conditions of the
License Agreement you accepted prior to installation of this s... | null | https://raw.githubusercontent.com/altsun/My-Lisps/0d23477fdd13385e086b0ed243c0956d352ddea1/Common/(LINEXP)%20Explode%20linetype.lsp | lisp |
Your use of this software is governed by the terms and conditions of the
"[c]opying of this computer program or its documentation except as
your country. If you copy this computer program without permission of
DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
--------------... | By
Modified original TXTEXP.LSP from Express Tools
Copyright © 1999 by Autodesk , Inc.
LINEXP.LSP modifications by XANADU
License Agreement you accepted prior to installation of this software .
Please note that pursuant to the License Agreement for this software ,
permi... |
81e0f158272ad3f8579c3d3cddb27aa23a733238237f867a1dc9c870b08edcb7 | batterseapower/supercompilation-by-evaluation | GHC.hs | # LANGUAGE ViewPatterns #
module GHC where
import Core.Syntax
import Utilities
import StaticFlags
import Control.Exception
import System.Directory
import System.Exit
import System.IO
import System.Process
termToHaskell :: Term -> String
termToHaskell = show . pPrintPrec haskellLevel 0
termToHaskellBinding :: Str... | null | https://raw.githubusercontent.com/batterseapower/supercompilation-by-evaluation/daeb3e12ca8319a5144dd48a763cf7e7825a1999/GHC.hs | haskell | # LANGUAGE ViewPatterns #
module GHC where
import Core.Syntax
import Utilities
import StaticFlags
import Control.Exception
import System.Directory
import System.Exit
import System.IO
import System.Process
termToHaskell :: Term -> String
termToHaskell = show . pPrintPrec haskellLevel 0
termToHaskellBinding :: Str... | |
e5915747ff3f857138bc13464c069b9d24bed230d15c044a27702ae00cda5634 | ChrisTitusTech/gimphelp | 210_sharpness-softer_soft-focus-simple.scm | ; 210_sharpness-softer_soft-focus-simple.scm
last modified / tested by [ gimphelp.org ]
05/11/2019 on GIMP 2.10.10
;==================================================
;
; Installation:
; This script should be placed in the user or system-wide script folder.
;
; Windows 7/10
C:\Program Files\GIMP 2\share\gimp\2.... | null | https://raw.githubusercontent.com/ChrisTitusTech/gimphelp/fdbc7e3671ce6bd74cefd83ecf7216e5ee0f1542/gimp_scripts-2.10/210_sharpness-softer_soft-focus-simple.scm | scheme | 210_sharpness-softer_soft-focus-simple.scm
==================================================
Installation:
This script should be placed in the user or system-wide script folder.
Windows 7/10
or
Linux
/home/yourname/.config/GIMP/2.10/scripts
or
Linux system-wide
/usr/share/gimp/2.0/scripts
=======... | last modified / tested by [ gimphelp.org ]
05/11/2019 on GIMP 2.10.10
C:\Program Files\GIMP 2\share\gimp\2.0\scripts
C:\Users\YOUR - NAME\AppData\Roaming\GIMP\2.10\scripts
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the Lice... |
203a57f156af4927f70c89de6226adacab66f71d2e6a3a474e23f905c939c978 | mnieper/unsyntax | source-location.scm | Copyright © ( 2020 ) .
;; This file is part of unsyntax.
;; Permission is hereby granted, free of charge, to any person
;; obtaining a copy of this software and associated documentation files
( the " Software " ) , to deal in the Software without restriction ,
;; including without limitation the rights to use... | null | https://raw.githubusercontent.com/mnieper/unsyntax/cd12891805a93229255ff0f2c46cf0e2b5316c7c/src/unsyntax/source-location.scm | scheme | This file is part of unsyntax.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
The above copyright notice and this permission n... | Copyright © ( 2020 ) .
( the " Software " ) , to deal in the Software without restriction ,
publish , distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Software is furnished to do so ,
portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITH... |
86c9798f0850fd23d3d6f1a89ef2f76ae5b5d38bff966f1d1d33cb0c66d056a8 | simplex-chat/simplexmq | ProtocolErrorTests.hs | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module CoreTests.ProtocolErrorTests where
import qualified Data.ByteString.Char8 as B
import qualified Data.Text as T
import Data.Text.Encoding (encodeUtf8)
import Simplex.Messaging.Agent.Protocol (AgentErrorType (..), BrokerErrorType (..))
import Simplex.Messa... | null | https://raw.githubusercontent.com/simplex-chat/simplexmq/e4aad7583f425765c605cd8042e3136e048bdbec/tests/CoreTests/ProtocolErrorTests.hs | haskell | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module CoreTests.ProtocolErrorTests where
import qualified Data.ByteString.Char8 as B
import qualified Data.Text as T
import Data.Text.Encoding (encodeUtf8)
import Simplex.Messaging.Agent.Protocol (AgentErrorType (..), BrokerErrorType (..))
import Simplex.Messa... | |
cc9d7b0bd47ff3c94d281d6e888bf0bfc539dcb389ad4ecb19e1f39fd4590e45 | returntocorp/semgrep | let_module.ml | dump_il file =
let module G = AST_generic in
let module V = Visitor_AST in
2
| null | https://raw.githubusercontent.com/returntocorp/semgrep/8c379c2c73b4ece1b1316655b00e21a8af3f00bb/tests/parsing/ocaml/let_module.ml | ocaml | dump_il file =
let module G = AST_generic in
let module V = Visitor_AST in
2
| |
d541cbe43785e384913a2035ec36a3533bf0331fca8d233685d666c63c571eed | nytimes/jsonlogic | jsonlogic.clj | (ns com.nytimes.jsonlogic
(:refer-clojure :rename {apply core-apply})
(:require
[clojure.string :as str]
[clojure.tools.logging :as log]
[clojure.walk :as walk])
(:import
(clojure.lang Symbol)
(java.util Collection List Map)))
(defn ^:no-doc dispatch-operate [op _env]
(log/debug :op (pr-str op))... | null | https://raw.githubusercontent.com/nytimes/jsonlogic/4aba90143cf2a4ddf956ca0cb49ce9b482b2f23a/src/com/nytimes/jsonlogic.clj | clojure | ----------------------------------------------------------------------
Coercion
----------------------------------------------------------------------
split up the args into test-value pairs. if there is no final test, aka an
else clause, inject true so it always succeeds.
In other words
becomes
Miscellaneous | (ns com.nytimes.jsonlogic
(:refer-clojure :rename {apply core-apply})
(:require
[clojure.string :as str]
[clojure.tools.logging :as log]
[clojure.walk :as walk])
(:import
(clojure.lang Symbol)
(java.util Collection List Map)))
(defn ^:no-doc dispatch-operate [op _env]
(log/debug :op (pr-str op))... |
d8df1163417574c37f3a4eabee695d8336e6e666d10ffc066ee0c9ab0c948d41 | lispci/fiveam | random.lisp | -*- Mode : LISP ; Syntax : Ansi - Common - Lisp ; Package : FIVEAM ; Base : 10 ; -*-
(in-package :it.bese.fiveam)
;;;; ** Random (QuickCheck-ish) testing
;;;; FiveAM provides the ability to automatically generate a
;;;; collection of random input data for a specific test and run a
;;;; test multiple times.
;;;; S... | null | https://raw.githubusercontent.com/lispci/fiveam/06d5257ef579b47dd0756895e39a2b760fe6f872/src/random.lisp | lisp | Syntax : Ansi - Common - Lisp ; Package : FIVEAM ; Base : 10 ; -*-
** Random (QuickCheck-ish) testing
FiveAM provides the ability to automatically generate a
collection of random input data for a specific test and run a
test multiple times.
Specification testing is done through the FOR-ALL macro. This
macro will... |
(in-package :it.bese.fiveam)
conditions and creating one random input based on the values of
(defparameter *num-trials* 100
"Number of times we attempt to run the body of the FOR-ALL test.")
(defparameter *max-trials* 10000
"Number of total times we attempt to run the body of the
FOR-ALL test including ... |
d8ee69b2de99d530a92b72f0c692084f1510a49ccdc6ff2469227e2bbfebed75 | pdarragh/parsing-with-zippers-paper-artifact | pwd_binary_opt.ml | open Pyast
open Pytokens
type token = token_pair
let false_token = (-1, "<empty-token>")
type node_tag = Empty_tag
| Eps_tag of (ast list Lazy.t)
| Token_tag of ((token -> bool) * string)
| Alt_tag
| Seq_tag
| Red_tag of (ast list -> ast list)
... | null | https://raw.githubusercontent.com/pdarragh/parsing-with-zippers-paper-artifact/c5c08306cfe4eec588237c7fa45b794649ccb68a/benchmark/pwz_bench/generate/static/pwd_binary_opt/pwd_binary_opt.ml | ocaml | open Pyast
open Pytokens
type token = token_pair
let false_token = (-1, "<empty-token>")
type node_tag = Empty_tag
| Eps_tag of (ast list Lazy.t)
| Token_tag of ((token -> bool) * string)
| Alt_tag
| Seq_tag
| Red_tag of (ast list -> ast list)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.