_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 |
|---|---|---|---|---|---|---|---|---|
07296f4d16ba940732eec77505b5e5943ae648ea64d21154a663717f1ee85439 | mmcguill/haskell-2048 | MainScotty.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Web.Scotty
import Network.Wai.Middleware.Static
import Network.Wai.Middleware.RequestLogger
import System.Random
import Data.Monoid (mconcat)
import Control.Monad.Trans
import System.Directory
import GameModel
import GameModel as GM
import Logic
import Data.... | null | https://raw.githubusercontent.com/mmcguill/haskell-2048/0a2032f95037bb644888327f28bba86ee2554252/src/MainScotty.hs | haskell | # LANGUAGE OverloadedStrings #
Debug...
Scrap
get "/pwd" $ do |
module Main where
import Web.Scotty
import Network.Wai.Middleware.Static
import Network.Wai.Middleware.RequestLogger
import System.Random
import Data.Monoid (mconcat)
import Control.Monad.Trans
import System.Directory
import GameModel
import GameModel as GM
import Logic
import Data.Text.Lazy
import Control.Concurrent... |
70c51192b59b2a1cd81792c08d81f1bf57a63cd47f79c1fc365a33e72aa16570 | nikomatsakis/a-mir-formality | cosld-solve.rkt | #lang racket
(require redex/reduction-semantics
(prefix-in logic: "cosld-solve/prove.rkt")
"solution.rkt"
"solution-simplify.rkt"
"grammar.rkt"
)
(provide logic:prove-top-level-goal/cosld
solve-top-level-query-goal
)
(define-judgment-form formality-logic
... | null | https://raw.githubusercontent.com/nikomatsakis/a-mir-formality/9932f8621db162160215c60c323acad56903a4ca/racket-src/logic/cosld-solve.rkt | racket | Prove the query goal and construct a solution. | #lang racket
(require redex/reduction-semantics
(prefix-in logic: "cosld-solve/prove.rkt")
"solution.rkt"
"solution-simplify.rkt"
"grammar.rkt"
)
(provide logic:prove-top-level-goal/cosld
solve-top-level-query-goal
)
(define-judgment-form formality-logic
... |
56ea8527d5aec21ff55a29234edb740f9f25c9c2a027c6983f24a8ca7ce20fdb | Holworth/SICP_Solutions | exercise2-35.rkt | #lang sicp
(define (reduce op init items)
(cond ((null? items) init)
(else (op (car items)
(reduce op init (cdr items))))))
(define (count-leaves t)
(reduce (lambda (x y) (+ x y)) 0
(map (lambda (x)
(if (not (pair? x))
... | null | https://raw.githubusercontent.com/Holworth/SICP_Solutions/da4041d4c48a04df7c17ea840458d8044ae6c9fb/solutions/chap2/code/exercise2-35.rkt | racket | #lang sicp
(define (reduce op init items)
(cond ((null? items) init)
(else (op (car items)
(reduce op init (cdr items))))))
(define (count-leaves t)
(reduce (lambda (x y) (+ x y)) 0
(map (lambda (x)
(if (not (pair? x))
... | |
27a31668953936010f52c2a2f1b3b8f1bdb7dc5fe3da7ef16100700a10e9f640 | thomasblanc/curry-flavor | bigset.ml | module Int =
struct
type t = int
let compare (a:t) b = compare a b
end
module M = CurrySet.Nest (Int) (CurrySet.Nest (Int) (CurrySet.Make (Int) ) )
open M
let myset =
empty
|> add 0 0 0
|> add 0 1 1
|> add 1 0 1
|> add 1 1 1
let () = iter (Printf.printf "%d %d %d") myset
| null | https://raw.githubusercontent.com/thomasblanc/curry-flavor/821c56e5485889570e0835627b43c47f5001cd43/examples/bigset.ml | ocaml | module Int =
struct
type t = int
let compare (a:t) b = compare a b
end
module M = CurrySet.Nest (Int) (CurrySet.Nest (Int) (CurrySet.Make (Int) ) )
open M
let myset =
empty
|> add 0 0 0
|> add 0 1 1
|> add 1 0 1
|> add 1 1 1
let () = iter (Printf.printf "%d %d %d") myset
| |
f9bd2422561d7028ff2e2813d952ef6e87e99310938e9d2f13655da1572db975 | sixohsix/tak | Selection.hs | module Tak.Editor.Selection where
import Tak.Types
import Tak.GlobalState
import Tak.Buffer
import qualified Tak.Buffer.Line as L
import Tak.Range
import Tak.Editor.Cursor
import Tak.Editor.Undo (pushUndo)
import Data.List (sort)
import qualified Data.Sequence as Seq
import Control.Arrow ( (>>>) )
import Control.Lens
... | null | https://raw.githubusercontent.com/sixohsix/tak/6310d19faa683156933dde38666c11dc087d79ea/src/Tak/Editor/Selection.hs | haskell | module Tak.Editor.Selection where
import Tak.Types
import Tak.GlobalState
import Tak.Buffer
import qualified Tak.Buffer.Line as L
import Tak.Range
import Tak.Editor.Cursor
import Tak.Editor.Undo (pushUndo)
import Data.List (sort)
import qualified Data.Sequence as Seq
import Control.Arrow ( (>>>) )
import Control.Lens
... | |
30378279910f99fb3728c19956fcc9eb27dc5fe0470f6c665640c00d0d28493d | ocamllabs/ocaml-modular-implicits | typedtreeMap.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/typing/typedtreeMap.ml | ocaml | *********************************************************************
OCaml
... | , INRIA Saclay
Copyright 2012 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Typedtree
module type MapArgument = sig... |
e3d49411b17726376a0cfbfc1cbf07b7f2ebc754d5cb47d2f7659ae6b543ccc6 | haskell/cabal | setup-external.test.hs | import Test.Cabal.Prelude
main = setupAndCabalTest $ do
skipUnlessGhcVersion ">= 8.1"
ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.* || == 9.6.*"
expectBrokenIf ghc 7987 $ do
withPackageDb $ do
withDirectory "mylib" $ setup_install_with_docs ["--ipid", "mylib-0.1.0.0"]
withDirectory "mysql"... | null | https://raw.githubusercontent.com/haskell/cabal/0eb638fb18e4ef215413d1a1c25b5175e54f2158/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.test.hs | haskell | import Test.Cabal.Prelude
main = setupAndCabalTest $ do
skipUnlessGhcVersion ">= 8.1"
ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.* || == 9.6.*"
expectBrokenIf ghc 7987 $ do
withPackageDb $ do
withDirectory "mylib" $ setup_install_with_docs ["--ipid", "mylib-0.1.0.0"]
withDirectory "mysql"... | |
265b69140551c9eb8eefdd1f7ea6bfd4e2a682f17efbb4a2b57d3a54ed30743b | ghollisjr/cl-ana | h5ex-d-hyper.lisp | Copyright by The HDF Group .
;;;; All rights reserved.
;;;;
This file is part of hdf5 - cffi .
The full hdf5 - cffi copyright notice , including terms governing
;;;; use, modification, and redistribution, is contained in the file COPYING,
;;;; which can be found at th... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/hdf-cffi/examples/datasets/h5ex-d-hyper.lisp | lisp | All rights reserved.
use, modification, and redistribution, is contained in the file COPYING,
which can be found at the root of the source code distribution tree.
If you do not have access to this file, you may request a copy from
.
This example shows how to read and write data to a
in a hyperslab selection to ... | Copyright by The HDF Group .
This file is part of hdf5 - cffi .
The full hdf5 - cffi copyright notice , including terms governing
dataset by hyberslabs . The program first writes integers
dimensions of DIM0xDIM1 , then closes the file . Next , it
different ... |
d2bf42cdbfcab793894514fa6134ecf0edddcf1164275a62de66f1eae2fe7e7c | zeniuseducation/poly-euler | two.clj | (ns alfa.beta.two)
(defn ^longs jumfak
[^long lim]
(let [llim (int (Math/sqrt lim))
faks (int-array (+ lim 1) 1)]
(loop [i (int 2)]
(if (> i llim)
(filterv #(> (aget faks %) %) (range 12 (+ lim 1)))
(do (let [isqr (* i i)]
(do (aset faks isqr (+ (aget faks isqr) i))
... | null | https://raw.githubusercontent.com/zeniuseducation/poly-euler/734fdcf1ddd096a8730600b684bf7398d071d499/Alfa/src/alfa/beta/two.clj | clojure | (ns alfa.beta.two)
(defn ^longs jumfak
[^long lim]
(let [llim (int (Math/sqrt lim))
faks (int-array (+ lim 1) 1)]
(loop [i (int 2)]
(if (> i llim)
(filterv #(> (aget faks %) %) (range 12 (+ lim 1)))
(do (let [isqr (* i i)]
(do (aset faks isqr (+ (aget faks isqr) i))
... | |
51a4667d05d0307ec2497331a031a333af5524cb03a5701d69cae6a45a59288d | soren-n/bidi-higher-rank-poly | Tests.ml | open Bhrp_shared
open Back
open Front
open Poly
open Expr
open Simple
let parse input return =
return (Parser.input Lexer.token (Lexing.from_string input))
let print layout =
Typeset.compile layout @@ fun doc ->
Typeset.render doc 2 80 @@ fun msg ->
print_endline msg
let (<:) left right =
Check.subtype lef... | null | https://raw.githubusercontent.com/soren-n/bidi-higher-rank-poly/73cb66a31d8d432cfbc344f29681b536a983f3d5/back/test/Tests.ml | ocaml | Define tests
Run tests
; synth_type_sound_l
; synth_type_sound_r
; check_type_sound
; generalize_sound | open Bhrp_shared
open Back
open Front
open Poly
open Expr
open Simple
let parse input return =
return (Parser.input Lexer.token (Lexing.from_string input))
let print layout =
Typeset.compile layout @@ fun doc ->
Typeset.render doc 2 80 @@ fun msg ->
print_endline msg
let (<:) left right =
Check.subtype lef... |
6e881003e1967f1e29725daf60000474aad27fd441c1954469b9221f6b2e5697 | pkhuong/Napa-FFT3 | test-support.lisp | (in-package "NAPA-FFT.TESTS")
(defun impulse (i n)
(let ((vec (make-array n :element-type 'complex-sample
:initial-element (complex 0d0 0d0))))
(setf (aref vec i) (complex 1d0 0d0))
vec))
(defun iota (n)
(let ((count 0))
(map-into (make-array n :element-type 'complex-sample)... | null | https://raw.githubusercontent.com/pkhuong/Napa-FFT3/f2d9614c7167da327c9ceebefb04ff6eae2d2236/test-support.lisp | lisp | (in-package "NAPA-FFT.TESTS")
(defun impulse (i n)
(let ((vec (make-array n :element-type 'complex-sample
:initial-element (complex 0d0 0d0))))
(setf (aref vec i) (complex 1d0 0d0))
vec))
(defun iota (n)
(let ((count 0))
(map-into (make-array n :element-type 'complex-sample)... | |
4aa397df59e4d58e1d5522a77929befa4aec07dcdb896f3d4210e19bf155805b | hyper-systems/rescript-sx | Main.ml | open Bos
module String_set = Set.Make (String)
let rev_lines_of_chan chan =
let rec loop acc chan =
match input_line chan with
| line -> loop (line :: acc) chan
| exception End_of_file ->
close_in chan;
acc
in
loop [] chan
let rescript_toplevel_modules =
lazy
(let mlmap_pat = Fpat... | null | https://raw.githubusercontent.com/hyper-systems/rescript-sx/fcd0e71332d0f8e777d2850eeac3326c1dfdc95a/sx.ppx/Main.ml | ocaml | -lang/rescript-compiler/blob/b4d5caea15e9594f95f6f8ac6620417540986c20/jscomp/core/js_implementation.ml#L254 | open Bos
module String_set = Set.Make (String)
let rev_lines_of_chan chan =
let rec loop acc chan =
match input_line chan with
| line -> loop (line :: acc) chan
| exception End_of_file ->
close_in chan;
acc
in
loop [] chan
let rescript_toplevel_modules =
lazy
(let mlmap_pat = Fpat... |
6f56cc4cc8a94a787445189a588dbd23162045961f4b6b72afc9ccef5266bc15 | patoline/patoline | Document.ml |
Copyright Florian Hatat , , ,
Pierre - Etienne Meunier , , 2012 .
This file is part of Patoline .
Patoline 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 th... | null | https://raw.githubusercontent.com/patoline/patoline/3dcd41fdff64895d795d4a78baa27d572b161081/typography/Document.ml | ocaml | doit etre de taille 8
* Environments. These are typically folded on document trees, and
control many different things about the fonts, counters, or
labels.
* {2 Document content}
* Main type used to hold document contents.
* A contents list depending on the environment. This may be used to
typeset the... |
Copyright Florian Hatat , , ,
Pierre - Etienne Meunier , , 2012 .
This file is part of Patoline .
Patoline 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 th... |
1a86561ac225fe12882cab3292a261e05f7c36151d4b8a6b240590e5c577f56b | yihming/aihaskell | Main.hs | module Main where
import System.Environment
import FrontEnd as FE
import SemanticsAnalysis as SA
import Plot as PLT
main :: IO ()
main = do
args <- getArgs
let filename = head args
src <- readFile filename
let t = FE.parseInterproc src
--putStrLn $ show t
let outFileDot = filename ++ ".dot"
PLT.genDotF... | null | https://raw.githubusercontent.com/yihming/aihaskell/5d4539a0f093914e32bda7e797f502626b8f2d93/Main.hs | haskell | putStrLn $ show t | module Main where
import System.Environment
import FrontEnd as FE
import SemanticsAnalysis as SA
import Plot as PLT
main :: IO ()
main = do
args <- getArgs
let filename = head args
src <- readFile filename
let t = FE.parseInterproc src
let outFileDot = filename ++ ".dot"
PLT.genDotFile outFileDot t
new... |
9d3a459fe4dc255522ca55b858bc678b84d8385a7add5d4df120d5c78c16e4fd | zadean/xqerl | xqldb_dml.erl | Copyright ( c ) 2018 - 2020 .
SPDX - FileCopyrightText : 2022
%
SPDX - License - Identifier : Apache-2.0
-module(xqldb_dml).
%% Reading functions set the read locks in the function.
%% Writing functions should only be called from a Pending Update List
%% where the write locks have already been acquir... | null | https://raw.githubusercontent.com/zadean/xqerl/06c651ec832d0ac2b77bef92c1b4ab14d8da8883/src/xqldb_dml.erl | erlang |
Reading functions set the read locks in the function.
Writing functions should only be called from a Pending Update List
where the write locks have already been acquired.
====================================================================
API functions
==========================================================... | Copyright ( c ) 2018 - 2020 .
SPDX - FileCopyrightText : 2022
SPDX - License - Identifier : Apache-2.0
-module(xqldb_dml).
-include("xqerl_db.hrl").
-export([analyze/1]).
-export([
commit/1,
select_paths/2,
select_collection/2, select_collection/3,
delete_collection/1, delete_colle... |
2364928a82aa58096b0925b5c5a6b72e060f5c0b68569b923263e0928929c7e2 | oshyshko/adventofcode | D13.hs | module Y15.D13 where
import qualified Data.HashMap.Strict as M
import Imports
import Parser
type Guest = String
type Attr = ((Guest, Guest), Int) -- (from, to), attractiveness)
would lose 75 happiness units by sitting next to .
would gain 71 happiness units by sitting next to .
attrs :: ... | null | https://raw.githubusercontent.com/oshyshko/adventofcode/fc0ce87c1dfffc30647763fa5b84ff9fcf58b8b3/src/Y15/D13.hs | haskell | (from, to), attractiveness)
gain / lose
(from, to) -> attractiveness | module Y15.D13 where
import qualified Data.HashMap.Strict as M
import Imports
import Parser
type Guest = String
would lose 75 happiness units by sitting next to .
would gain 71 happiness units by sitting next to .
attrs :: Parser [Attr]
attrs =
attr `endBy` eol
where
attr :: Pa... |
b55e710d3009593a80e42f4a9c246f2f0b7255509b42fd71403e739d98bcc6ac | iokasimov/pandora | Contravariant.hs | module Pandora.Pattern.Functor.Contravariant where
import Pandora.Pattern.Category (Category)
import Pandora.Pattern.Betwixt (Betwixt)
infixl 1 >-|------
infixl 2 >-|-----
infixl 3 >-|----
infixl 4 >-|---, >-|-|-
infixl 5 >-|--
infixl 6 >-|-
{- |
> When providing a new instance, you should ensure it satisfies:
> * E... | null | https://raw.githubusercontent.com/iokasimov/pandora/578ec3b831aaad201e1d32eed72f4ca7229b4bea/Pandora/Pattern/Functor/Contravariant.hs | haskell | ----
---
--
-, >-|-|-
|
> When providing a new instance, you should ensure it satisfies:
> * Exactly morphism: (identity >-|-) ≡ identity
> * Interpreted of morphisms: (f >-|-) . (g >-|-) ≡ (g . f >-|-)
), (>-|---), (>-|----), (>-|-----), (>-|------), (>-|-------), (>-|--------) :: source a b -> target (t b) (t a)
)... | module Pandora.Pattern.Functor.Contravariant where
import Pandora.Pattern.Category (Category)
import Pandora.Pattern.Betwixt (Betwixt)
infixl 6 >-|-
class (Category source, Category target) => Contravariant source target t where
(>-|-) :: source a b -> target (t b) (t a)
(>-|-|-) :: (Contravariant source (Betwi... |
0d568a29bfaa270aeff92ebea441c5efa8447ea5031484b3497edf25d9fdaad8 | mfikes/chivorcam | core.cljc | (ns chivorcam.core
(:refer-clojure :exclude [defmacro])
(:require
[cljs.env :as env]
[cljs.analyzer :as ana :refer [*cljs-ns*]]))
(defn- eval-form
[form ns]
(when-not (find-ns ns)
#?(:clj (create-ns ns)
:cljs (eval `(~'ns ~ns))))
(binding #?(:clj [*ns* (the-ns ns)]
:cljs [*ns... | null | https://raw.githubusercontent.com/mfikes/chivorcam/3e833bc090eb12613a4ed3be0d95ff12ef789788/src/chivorcam/core.cljc | clojure | (ns chivorcam.core
(:refer-clojure :exclude [defmacro])
(:require
[cljs.env :as env]
[cljs.analyzer :as ana :refer [*cljs-ns*]]))
(defn- eval-form
[form ns]
(when-not (find-ns ns)
#?(:clj (create-ns ns)
:cljs (eval `(~'ns ~ns))))
(binding #?(:clj [*ns* (the-ns ns)]
:cljs [*ns... | |
3a3824fda74e00a285ec732925fa9fc3833d0e8f12582473ae3b5ae9e2b142f1 | metabase/metabase | search.clj | (ns metabase.api.search
(:require
[compojure.core :refer [GET]]
[flatland.ordered.map :as ordered-map]
[honey.sql.helpers :as sql.helpers]
[medley.core :as m]
[metabase.api.common :as api]
[metabase.db :as mdb]
[metabase.db.query :as mdb.query]
[metabase.models.collection :as collection]
[m... | null | https://raw.githubusercontent.com/metabase/metabase/6e17ce37d2dd739d3d5e1b493d60a8805160e516/src/metabase/api/search.clj | clojure | +----------------------------------------------------------------------------------------------------------------+
| Columns for each Entity |
+--------------------------------------------------------------------------------------... | (ns metabase.api.search
(:require
[compojure.core :refer [GET]]
[flatland.ordered.map :as ordered-map]
[honey.sql.helpers :as sql.helpers]
[medley.core :as m]
[metabase.api.common :as api]
[metabase.db :as mdb]
[metabase.db.query :as mdb.query]
[metabase.models.collection :as collection]
[m... |
b382c281dc8288fa09e1a48f9771513296cf605b409c1d9e42948d82e7425f00 | jeffshrager/biobike | ec2go.lsp |
("2.4.99.4" "0003836")
("3.4.16.5" "0004186" "0004258")
("2.3.1.139" "0004173")
("3.5.1.14" "0004046")
("4.99.1.1" "0004325")
("3.4.21.21" "0003802")
("1.3.3.4" "0004729")
("3.2.2.23" "0003907")
("2.4.2.31" "0003956")
("3.2.1.46" "0004336")
("4.2.1.46" "0008460")
("2.6.1.62" "0004015")
("3.1.2.15" "0004221... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/biolingua/ec2go.lsp | lisp |
("2.4.99.4" "0003836")
("3.4.16.5" "0004186" "0004258")
("2.3.1.139" "0004173")
("3.5.1.14" "0004046")
("4.99.1.1" "0004325")
("3.4.21.21" "0003802")
("1.3.3.4" "0004729")
("3.2.2.23" "0003907")
("2.4.2.31" "0003956")
("3.2.1.46" "0004336")
("4.2.1.46" "0008460")
("2.6.1.62" "0004015")
("3.1.2.15" "0004221... | |
98853869c1ef9cfa58387bf74f99a7d445d918b442f2ee52e0d5e4c8873040a5 | nsg-ethz/O4 | variable.rkt | #lang racket/base
; Variable Context
; ---------------------------------------
(provide dec-variable
get-variable
set-variable
set-variables
substitute-variable)
; Implementation
; ---------------------------------------
(require o4/context/base)
; Struct
; -
; For variables, we s... | null | https://raw.githubusercontent.com/nsg-ethz/O4/870f6f78a6f7bb1e9e1502e29ff0048e5e1723c5/o4/context/variable.rkt | racket | Variable Context
---------------------------------------
Implementation
---------------------------------------
Struct
-
For variables, we store its string and value representation, as well as a flag denoting if the variable should be in-place replaced.
Getter
Check that returned declare is of type variable
S... | #lang racket/base
(provide dec-variable
get-variable
set-variable
set-variables
substitute-variable)
(require o4/context/base)
(struct dec-variable (string value f-replace) #:transparent)
(define (get-variable ctx name)
(let ([dec (get-declare ctx name)])
(if (dec-variable?... |
fba8b716b0a1cb42452d14c542d5e2b6c2dc39bb246f8d29f045d916772a45c6 | anuyts/menkar | WHN.hs | module Menkar.Systems.Reldtt.WHN where
import Menkar.Basic
import Menkar.Analyzer
import Menkar.WHN
import Menkar.System.Fine
import Menkar.System.Scoper
import Menkar.System.WHN
import Menkar.Fine
import Menkar.Monad
import Menkar.Systems.Reldtt.Basic
import Menkar.Systems.Reldtt.Fine
import Menkar.Systems.Reldtt.Ana... | null | https://raw.githubusercontent.com/anuyts/menkar/1f00e9febd1e9ed70c138ae8232b1c72a17d31da/menkar/src/Menkar/Systems/Reldtt/WHN.hs | haskell | both empty
both empty
both empty
both discrete
both empty
both discrete
both empty
both empty
both forget
both forget
both empty
both discrete
both forget
both forget
non-Top-discreteness is less than continuity
but not equal if tails are whn.
The only way that @ModLeq@ can be false, is when the left s... | module Menkar.Systems.Reldtt.WHN where
import Menkar.Basic
import Menkar.Analyzer
import Menkar.WHN
import Menkar.System.Fine
import Menkar.System.Scoper
import Menkar.System.WHN
import Menkar.Fine
import Menkar.Monad
import Menkar.Systems.Reldtt.Basic
import Menkar.Systems.Reldtt.Fine
import Menkar.Systems.Reldtt.Ana... |
70fbe4369b42f257684380b8f85faa42ac9157ca21462a6371e3f80a22602a40 | andrejbauer/marshall | typecheck.ml | \section{Type checking ( module [ ] ) }
module Make = functor (D : Dyadic.DYADIC) ->
struct
module I = Interval.Make(D)
module S = Syntax.Make(D)
open S
let error = Message.typecheck_error
let check_segment i =
if not (I.forward i) then error "illegal interval"
let check_compact_segment i =
i... | null | https://raw.githubusercontent.com/andrejbauer/marshall/1e630b34b7ae880835aca31fd2b3eda562348b2e/src/typecheck.ml | ocaml | [type_of ctx e] computes the type of expression [e] in context [ctx].
Does [e] have type [ty] in context [ctx]? | \section{Type checking ( module [ ] ) }
module Make = functor (D : Dyadic.DYADIC) ->
struct
module I = Interval.Make(D)
module S = Syntax.Make(D)
open S
let error = Message.typecheck_error
let check_segment i =
if not (I.forward i) then error "illegal interval"
let check_compact_segment i =
i... |
78deed2e8a8f20011f24ed3c9fc7dc87914ea67788cc8ab7079a825bd02c7884 | jabber-at/ejabberd-contrib | mod_post_log.erl | %%%----------------------------------------------------------------------
%%% File : mod_post_log.erl
Author : < >
%%% Purpose : POST user messages to server via HTTP
Created : 02 Aug 2014 by < >
%%%
Based on mod_service_log.erl
%%%----------------------------------------------------------------------
... | null | https://raw.githubusercontent.com/jabber-at/ejabberd-contrib/d5eb036b786c822d9fd56f881d27e31688ec6e91/mod_post_log/src/mod_post_log.erl | erlang | ----------------------------------------------------------------------
File : mod_post_log.erl
Purpose : POST user messages to server via HTTP
----------------------------------------------------------------------
conversion necessary
Example:
{1385,388790,334905}
-becomes- | Author : < >
Created : 02 Aug 2014 by < >
Based on mod_service_log.erl
-module(mod_post_log).
-author('').
-behaviour(gen_mod).
-export([start/2,
stop/1,
depends/2,
mod_opt_type/1,
log_user_send/1,
log_user_send/4,
post_result/1]).
-include("xmpp.hrl").
start(Host, _O... |
236f5e15f2e16a88c124a2177dc3917b5f464cdbdb43bf8dbac7accf8d27480a | geremih/xcljb | ir.clj | (ns xcljb.xmlgen.ir
(:require [clojure.string :as string]))
(defn beautify [name type]
(case type
:ns-name (string/replace name #"_" "-")
:arg (-> name
(string/replace #"_" "-")
(string/replace #"([a-z])([A-Z])" "$1-$2")
(string/lower-case))
:enum (-> name
... | null | https://raw.githubusercontent.com/geremih/xcljb/59e9ff795bf00595a3d46231a7bb4ec976852396/src/xcljb/xmlgen/ir.clj | clojure | Expressions.
Primitives.
Valueparam.
Struct.
Request, Reply, Event, Error.
Avoid naming conflict with java.lang.Error.
Xcb. | (ns xcljb.xmlgen.ir
(:require [clojure.string :as string]))
(defn beautify [name type]
(case type
:ns-name (string/replace name #"_" "-")
:arg (-> name
(string/replace #"_" "-")
(string/replace #"([a-z])([A-Z])" "$1-$2")
(string/lower-case))
:enum (-> name
... |
12bf3156f8c65e69a58fe34b0f66ca9449be8264d03e8972e5c86c5452bf4582 | Deep-Symmetry/dysentery | vcdj.clj | (ns dysentery.vcdj
"Provides the ability to create a virtual CDJ device that can lurk
on a Pro DJ Link network and receive packets sent to players, so
details about the other players can be monitored."
{:author "James Elliott"}
(:require [clojure.math.numeric-tower :as math]
[dysentery.util :as ut... | null | https://raw.githubusercontent.com/Deep-Symmetry/dysentery/0460d68a771c68f50c1cb1dcdf184a39d033f0e5/src/dysentery/vcdj.clj | clojure | For now just stash the most recent packet and data into our state.
if you try
individually, but there isn't infrastructure to support that in dysentery, and this works for testing.
individually, but there isn't infrastructure to support that in dysentery, and this works for testing.
0x28
0x30
0x68
0x70
0x78
0... | (ns dysentery.vcdj
"Provides the ability to create a virtual CDJ device that can lurk
on a Pro DJ Link network and receive packets sent to players, so
details about the other players can be monitored."
{:author "James Elliott"}
(:require [clojure.math.numeric-tower :as math]
[dysentery.util :as ut... |
e30fdeb1c791390a4fd2662d799ac2784b5fefeced41c688c01fb53ef14c8202 | haskell-compat/base-compat | Repl.hs | {-# LANGUAGE PackageImports #-}
# OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports #
-- | Reexports "Data.Either.Compat"
-- from a globally unique namespace.
module Data.Either.Compat.Repl (
module Data.Either.Compat
) where
import "this" Data.Either.Compat
| null | https://raw.githubusercontent.com/haskell-compat/base-compat/847aa35c4142f529525ffc645cd035ddb23ce8ee/base-compat/src/Data/Either/Compat/Repl.hs | haskell | # LANGUAGE PackageImports #
| Reexports "Data.Either.Compat"
from a globally unique namespace. | # OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports #
module Data.Either.Compat.Repl (
module Data.Either.Compat
) where
import "this" Data.Either.Compat
|
b5d3fdf3a0378beb3167d888990a7d62cfe597070ff39d07cffd3ae8d28735f3 | gfngfn/SATySFi | loadJpeg.mli |
type file_path = string
val make_xobject : Pdf.t -> Pdf.pdfobject -> int -> int -> file_path -> Pdf.pdfobject
| null | https://raw.githubusercontent.com/gfngfn/SATySFi/9dbd61df0ab05943b3394830c371e927df45251a/src/backend/loadJpeg.mli | ocaml |
type file_path = string
val make_xobject : Pdf.t -> Pdf.pdfobject -> int -> int -> file_path -> Pdf.pdfobject
| |
d9a2ec0efdeec41679253e66e61dc440074da93a000c9f97fbecfc740d5b0b56 | mschuldt/ga144 | ga144.rkt | #lang racket ;; -*- lexical-binding: t -*-
(define _PORT-DEBUG? false)
(define DISPLAY_STATE? false)
(define port-debug-list '(1 2))
(define (PORT-DEBUG? coord) (and _PORT-DEBUG? (member coord port-debug-list)))
(define ga-run-sim t) ;;global variable used for halting the simulation
(define (ga-stop-sim!)
(set! ga-... | null | https://raw.githubusercontent.com/mschuldt/ga144/5b327b958f5d35cf5a015044e6ee62f46446169f/src/ga144.rkt | racket | -*- lexical-binding: t -*-
global variable used for halting the simulation
set to t when a breakpoint is reached
node where breakpoint originated
set by map when it wants the node to update the map with its activity
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8x18 node matrix
TODO: ... |
(define _PORT-DEBUG? false)
(define DISPLAY_STATE? false)
(define port-debug-list '(1 2))
(define (PORT-DEBUG? coord) (and _PORT-DEBUG? (member coord port-debug-list)))
(define (ga-stop-sim!)
(set! ga-run-sim nil))
(define (make-ga144 name_ (interactive_ false) (source-buffer_ false))
(new ga144% name_ interacti... |
e6c7789d77d5ebc764adc7793949b17afa71a0f610b8dfdad3dc34ddf6d679b0 | zwizwa/staapl | macro.rkt | #lang racket/base
(require
"../sig.rkt"
;; "sig.rkt"
"../coma/macro.rkt"
"../control/op.rkt"
"asm.rkt")
(provide (all-defined-out))
| null | https://raw.githubusercontent.com/zwizwa/staapl/e30e6ae6ac45de7141b97ad3cebf9b5a51bcda52/arm/macro.rkt | racket | "sig.rkt" | #lang racket/base
(require
"../sig.rkt"
"../coma/macro.rkt"
"../control/op.rkt"
"asm.rkt")
(provide (all-defined-out))
|
7aa6aa3b282ee18a14b475b9f0128e6599f641923be0db2cb5b68b7fdac9ddf3 | chaoxu/mgccl-haskell | qrt.hs | import System.IO
import Data.Set (fromList, toList)
main :: IO ()
main = do list <- getLine
p <- loop []
let l = words list
putStr $ unlines $ map printQuartets $ (toList.fromList) $ concatMap (\x->quartets $ part x l ([],[])) p
where part [] _ z = z
part (x:p) (y:l) (zer... | null | https://raw.githubusercontent.com/chaoxu/mgccl-haskell/bb03e39ae43f410bd2a673ac2b438929ab8ef7a1/rosalind/qrt.hs | haskell | import System.IO
import Data.Set (fromList, toList)
main :: IO ()
main = do list <- getLine
p <- loop []
let l = words list
putStr $ unlines $ map printQuartets $ (toList.fromList) $ concatMap (\x->quartets $ part x l ([],[])) p
where part [] _ z = z
part (x:p) (y:l) (zer... | |
6190d9cffb9d60c540607e90d490482c43677e73e4e5c171df37872c3579c70a | MalloZup/missile | core_test.clj | (ns missile.core-test
(:require [clojure.test :refer :all]
[missile.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/MalloZup/missile/1d6085e5a19747a1fe585d9fa274bd7cf438d180/test/missile/core_test.clj | clojure | (ns missile.core-test
(:require [clojure.test :refer :all]
[missile.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
38c56e77052a5e212357390acb84f42454b7ccfe18d44d6da2192113aa7d6739 | tweag/ormolu | preserve-empty-lines.hs | {- ORMOLU_DISABLE -}
bar :: Int
bar = 2
baz :: Int
baz = 3
ORMOLU_ENABLE
foo :: Int
foo = 1
| null | https://raw.githubusercontent.com/tweag/ormolu/897e6736ec17d7e359091abe3c24f4abfec015c4/data/examples/other/disabling/preserve-empty-lines.hs | haskell | ORMOLU_DISABLE | bar :: Int
bar = 2
baz :: Int
baz = 3
ORMOLU_ENABLE
foo :: Int
foo = 1
|
0c71ea23537eaa6fa647ab76dc830046fd2115e79c61cb1d402e6473d9f55c4c | jablo/cablesim | dhcp_util.erl | %%%-------------------------------------------------------------------
%%% File : dhcp_lib.erl
Author : < >
%%% Description :
%%%
Created : 17 Apr 2006 by < >
%%%-------------------------------------------------------------------
-module(dhcp_util).
%% API
-export([optsearch/2, get_client_id/1, fmt_cli... | null | https://raw.githubusercontent.com/jablo/cablesim/da6628190f9ec5c426df73e921ff575470d1a078/src/dhcp_util.erl | erlang | -------------------------------------------------------------------
File : dhcp_lib.erl
Description :
-------------------------------------------------------------------
API | Author : < >
Created : 17 Apr 2006 by < >
-module(dhcp_util).
-export([optsearch/2, get_client_id/1, fmt_clientid/1, fmt_gateway/1, fmt_ip/1,
fmt_hostname/1,
get_tftpserver/1, get_tftpfile/1]).
-include("dhcp.hrl").
optsearch(Option, D) when is_record(D, dhcp) ->
case lists:keysearch(O... |
77efb2793c50423f2cd7599fd477544ef1c8086294ce1531d44a02442e9cb696 | commercialhaskell/stack | Foo.hs | module Foo where
import Control.Monad.STM
import Files
foo :: IO String
foo = atomically $ pure $ "foo using " ++ files
| null | https://raw.githubusercontent.com/commercialhaskell/stack/b846eae85d9f30d28d7a4fa33fea139e7d1420c7/test/integration/tests/internal-libraries/files/src-foo/Foo.hs | haskell | module Foo where
import Control.Monad.STM
import Files
foo :: IO String
foo = atomically $ pure $ "foo using " ++ files
| |
cafbfedc938cc39f456848eb22d5715870a2eededea6d23ababf9efb73c48768 | dwango/fialyzer | main.ml | open Obeam
open Base
open Result
open Fialyzer
open Common
let extract_debug_info_buf beam_filename layout =
let {
Beam.cl_abst = opt_abst;
Beam.cl_dbgi = opt_dbgi;
} = layout in
match opt_abst with
| Some abst ->
abst.Beam.abst_buf
| None ->
begin
match opt_dbgi with
| Some d... | null | https://raw.githubusercontent.com/dwango/fialyzer/3c4b4fc2dacf84008910135bfef16e4ce79f9c89/bin/main.ml | ocaml | open Obeam
open Base
open Result
open Fialyzer
open Common
let extract_debug_info_buf beam_filename layout =
let {
Beam.cl_abst = opt_abst;
Beam.cl_dbgi = opt_dbgi;
} = layout in
match opt_abst with
| Some abst ->
abst.Beam.abst_buf
| None ->
begin
match opt_dbgi with
| Some d... | |
edca003dd652818670636aea024b3b281ec9744423da3c893e1e653bf8ea3278 | TorXakis/TorXakis | CstrId.hs |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
# LANGUAGE FlexibleContexts #
----------... | null | https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/txs-compiler/src/TorXakis/Compiler/ValExpr/CstrId.hs | haskell | ------------------------------------------------------------------------------
|
Stability : experimental
Portability : portable
------------------------------------------------------------------------------
constructor declaration, to their corresponding constructor id's. |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
# LANGUAGE FlexibleContexts #
Module ... |
6f9c692dcab859a228b4c2cd0af61590033df61a7110a2b640dcfe8efe26d5b0 | gergoerdi/tandoori | tuple.hs | id x = x
idPair x = (id x, id x)
class Funktor f where
fmap :: (a -> b) -> f a -> f b
instance Funktor ((,) a) where
fmap f (x, y) = (x, f y)
fmap :: (b -> c) -> ((,) a) b -> ((,) a) c
fmap f (x, y) = (x, f y)
| null | https://raw.githubusercontent.com/gergoerdi/tandoori/515142ce76b96efa75d7044c9077d85394585556/input/tuple.hs | haskell | id x = x
idPair x = (id x, id x)
class Funktor f where
fmap :: (a -> b) -> f a -> f b
instance Funktor ((,) a) where
fmap f (x, y) = (x, f y)
fmap :: (b -> c) -> ((,) a) b -> ((,) a) c
fmap f (x, y) = (x, f y)
| |
39ecdcf0af34ef98aea028775cb3d9e0115d00e45950cb88ccc85a21f31b10ab | slyrus/clem | matrix-classes.lisp |
(in-package :clem)
taken from KMR 's clsql package
(eval-when (:compile-toplevel :load-toplevel :execute)
(declaim (inline delistify))
(defun delistify (list)
"Some MOPs, like openmcl 0.14.2, cons attribute values in a list."
(if (and (listp list) (null (cdr list)))
(car list)
list)))
(... | null | https://raw.githubusercontent.com/slyrus/clem/5eb055bb3f45840b24fd44825b975aa36bd6d97c/src/matrix-classes.lisp | lisp |
(in-package :clem)
taken from KMR 's clsql package
(eval-when (:compile-toplevel :load-toplevel :execute)
(declaim (inline delistify))
(defun delistify (list)
"Some MOPs, like openmcl 0.14.2, cons attribute values in a list."
(if (and (listp list) (null (cdr list)))
(car list)
list)))
(... | |
780bb4447a3389775e68b5126db91daa89d7aa2859ce973580d9750af3536378 | paurkedal/ocaml-prime | prime_io.mli | Copyright ( C ) 2014 - -2022 Petter A. Urkedal < >
*
* 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 , or ( at your
* option ) any la... | null | https://raw.githubusercontent.com/paurkedal/ocaml-prime/42efa85317069d726e8e3989e51c24ba03c56b47/lib/prime_io.mli | ocaml | * Helpers for standard library channels.
* [with_file_in f fp] is [f ic] where [ic] is a channel opened for input
from the file at [fp]. [ic] is closed when [f] returns or raises an
exception.
* [with_file_out f fp] calls [f oc] where [oc] is a channel opened for
output to [fp]. [oc] is closed when [f] ... | Copyright ( C ) 2014 - -2022 Petter A. Urkedal < >
*
* 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 , or ( at your
* option ) any la... |
f6888d1ec2deea4877146cd2c4dbf1f3cd00ae2795a291a2491a958b49f1b2cc | patricoferris/try-eio | worker_rpc.mli | (* Worker_rpc *)
* Functions to facilitate RPC calls to web workers .
The assumption made in this module is that RPCs are answered in the order
they are made .
The assumption made in this module is that RPCs are answered in the order
they are made. *)
type context
(** Represents the channel used... | null | https://raw.githubusercontent.com/patricoferris/try-eio/206ec0f422c44d89a1bc1c1c0114e748ad9324b0/src/worker_rpc.mli | ocaml | Worker_rpc
* Represents the channel used to communicate with the worker
* When RPC calls take too long, the Lwt promise is set to failed state with
this exception.
* [rpc context call] returns a promise containing the result from the worker.
If we wait longer than the timeout specified in [context] for a re... |
* Functions to facilitate RPC calls to web workers .
The assumption made in this module is that RPCs are answered in the order
they are made .
The assumption made in this module is that RPCs are answered in the order
they are made. *)
type context
exception Timeout
val start : Brr_webworkers.W... |
32fbc84aa13b3daea91629935c0d9d5040d25a68736d4cf66bfba13d689226a4 | khibino/haskell-relational-record | Aggregate.hs | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE MultiParamTypeClasses #
-- |
Module : Database . Relational . . Aggregate
Copyright : 2013 - 2019
-- License : BSD3
--
-- Maintainer :
-- Stability ... | null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/relational-query/src/Database/Relational/Monad/Aggregate.hs | haskell | # LANGUAGE TypeSynonymInstances #
|
License : BSD3
Maintainer :
Stability : experimental
Portability : unknown
This module contains definitions about aggregated query type.
* Aggregated Query
| Aggregated query monad type.
| Partition monad type for partition-by clause.
| Restricted 'MonadRestrict' ... | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
Module : Database . Relational . . Aggregate
Copyright : 2013 - 2019
module Database.Relational.Monad.Aggregate (
QueryAggregate,
AggregatedQuery,
toSQL,
toSub... |
6f82e7bcb9b327c4e278cffb1a6fce75dec75ee96817a10231b7eb6e1a77a68b | pveber/bistro | console_logger.mli | val create : unit -> Bistro_engine.Logger.t
| null | https://raw.githubusercontent.com/pveber/bistro/da0ebc969c8c5ca091905366875cbf8366622280/lib/utils/console_logger.mli | ocaml | val create : unit -> Bistro_engine.Logger.t
| |
be21c5a44011ac84730abbd1f88ebe3edfcb03f5e594f5916d65bbf36d34a391 | Clozure/ccl | packages.lisp | (defpackage "ELISP"
(:shadow "=" "DEFUN" "LET" "IF" "SETQ" "ASSOC" "COMMANDP" "AREF")
(:use "COMMON-LISP" "HEMLOCK-INTERNALS")
(:export
"%"
"="
"ABORT-RECURSIVE-EDIT"
"AREF"
"ASET"
"ASSQ"
"ASSOC"
"AUTOLOAD"
"BOBP"
"BODY"
"BOLP"
"BOOL-VECTOR-P"
"BUFFER-LOCAL-P"
"CAR-LESS-T... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/cocoa-ide/hemlock/unused/archive/elisp/packages.lisp | lisp | (defpackage "ELISP"
(:shadow "=" "DEFUN" "LET" "IF" "SETQ" "ASSOC" "COMMANDP" "AREF")
(:use "COMMON-LISP" "HEMLOCK-INTERNALS")
(:export
"%"
"="
"ABORT-RECURSIVE-EDIT"
"AREF"
"ASET"
"ASSQ"
"ASSOC"
"AUTOLOAD"
"BOBP"
"BODY"
"BOLP"
"BOOL-VECTOR-P"
"BUFFER-LOCAL-P"
"CAR-LESS-T... | |
352b5fa04ae8362894e213797028da12737f97cc911f66a86ace43201b6670b2 | andorp/mini-grin | Env.hs | # LANGUAGE DeriveFunctor #
module Grin.Interpreter.Env where
import Data.List (foldl')
import Data.Maybe (fromMaybe)
import Grin.Pretty
import Grin.Value
import qualified Data.Map.Strict as Map
-- * Env
-- | Environment mapping names to abstract values.
newtype Env v = Env (Map.Map Name v)
deriving (Eq, Show, Ord,... | null | https://raw.githubusercontent.com/andorp/mini-grin/99913efa0f81cb2a76893d3e48c6d025df9c40c9/grin/src/Grin/Interpreter/Env.hs | haskell | * Env
| Environment mapping names to abstract values.
Explicit instance!! different from default | # LANGUAGE DeriveFunctor #
module Grin.Interpreter.Env where
import Data.List (foldl')
import Data.Maybe (fromMaybe)
import Grin.Pretty
import Grin.Value
import qualified Data.Map.Strict as Map
newtype Env v = Env (Map.Map Name v)
deriving (Eq, Show, Ord, Functor)
empty :: Env v
empty = Env mempty
lookup :: (Env... |
9611dfffcbf9d85dafd3ee4cdfbb4e6dbc2e6828049ec0b5d547e99d14f12a5f | david-vanderson/warp | upgrade.rkt | #lang racket/base
(require racket/class
racket/draw)
(require "defs.rkt"
"utils.rkt"
"draw-utils.rkt")
(provide (all-defined-out))
(define (upgrade-radius space u)
5)
(define (upgrade-alive? space u)
(or (not (upgrade-life u))
((obj-age space u) . <= . (upgrade-life u))))
(d... | null | https://raw.githubusercontent.com/david-vanderson/warp/cdc1d0bd942780fb5360dc6a34a2a06cf9518408/upgrade.rkt | racket | return a list of changes
speed
threshold | #lang racket/base
(require racket/class
racket/draw)
(require "defs.rkt"
"utils.rkt"
"draw-utils.rkt")
(provide (all-defined-out))
(define (upgrade-radius space u)
5)
(define (upgrade-alive? space u)
(or (not (upgrade-life u))
((obj-age space u) . <= . (upgrade-life u))))
(d... |
0b5d2e077696d565da87d75d11da6fa29038faba03e3ee55a470ae92e62f6de2 | input-output-hk/rscoin-haskell | Config.hs | # LANGUAGE TemplateHaskell #
-- | Configuration for rscoin-deploy.
module Config
( DeployConfig (..)
, readDeployConfig
) where
import qualified Data.Aeson.TH as A
import qualified Data.Yaml as Y
import RSCoin.Core (Severity)
import Serokell... | null | https://raw.githubusercontent.com/input-output-hk/rscoin-haskell/109d8f6f226e9d0b360fcaac14c5a90da112a810/src/Deploy/Config.hs | haskell | | Configuration for rscoin-deploy. | # LANGUAGE TemplateHaskell #
module Config
( DeployConfig (..)
, readDeployConfig
) where
import qualified Data.Aeson.TH as A
import qualified Data.Yaml as Y
import RSCoin.Core (Severity)
import Serokell.Aeson.Options (defaultOptions, leaveT... |
a46bb0afdf33756bdfbd47b04b631c5c0b2713ba383c23ba420748bd26f8f4f8 | LCBH/UKano | reduction_bipro.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | null | https://raw.githubusercontent.com/LCBH/UKano/13c046ddaca48b45d3652c3ea08e21599e051527/proverif2.01/src/reduction_bipro.ml | ocaml | TO DO Test phases
Should I use evaluated terms in the "comment" field?
This exception is raise when the derivation prevents executing
a step
This exception is used in reduction_nobacktrack
It is raised after a bunch of reductions to
to get the final state after these reductions,
while preventing ba... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... |
5a3243bd5613d32be5b8d72edaa25f7e8c5798ef119acf3e7932fadd036c9c6c | patricoferris/ocaml-multicore-monorepo | unsafe_pre407.ml | external get_int32_ne : bytes -> int -> int32 = "%caml_string_get32"
| null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/eqaf/check/unsafe_pre407.ml | ocaml | external get_int32_ne : bytes -> int -> int32 = "%caml_string_get32"
| |
16b629482025df0f244a872875d771baee575485e7311507a16219f2272f299a | Plutonomicon/plutarch-plutus | Test.hs | | Common functions for testing Plutarch code
module Plutarch.Test (
-- * Plutarch specific `Expectation` operators
passert,
passertNot,
pfails,
psucceeds,
ptraces,
pshouldBe,
(#@?=),
-- * Budget expectation
psatisfyWithinBenchmark,
-- * Golden testing
(@|),
(@\),
(@->),
(@:->),
(@==)... | null | https://raw.githubusercontent.com/Plutonomicon/plutarch-plutus/9b83892057f2aaaed76e3af6193ad1ae242244cc/plutarch-test/Plutarch/Test.hs | haskell | * Plutarch specific `Expectation` operators
* Budget expectation
* Golden testing
* Benchmark type for use in `(@:->)`
* Test runner related utilities
|
Like `pshouldBe` but on `Script`
| Asserts the term to be true
| Asserts the term to be false
| Asserts the term evaluates successfully without failing
| ... | | Common functions for testing Plutarch code
module Plutarch.Test (
passert,
passertNot,
pfails,
psucceeds,
ptraces,
pshouldBe,
(#@?=),
psatisfyWithinBenchmark,
(@|),
(@\),
(@->),
(@:->),
(@==),
pgoldenSpec,
pgoldenSpec',
PlutarchGoldens,
GoldenConf (..),
GoldenTest (..),
Benc... |
39df2c73465311e8a4355c07254fef31c6daa275dab147d5d70a04ea28df2f52 | disteph/cdsat | literals.mli | open Format
open Top
open Interfaces_basic
open Basic
open Specs
module LitF : sig
type t [@@deriving eq,hash,ord,show]
val id : t -> int
val print_in_fmt : ?print_atom:(formatter -> int -> unit)
-> formatter -> t -> unit
val pp : formatter -> t -> unit
val clear : unit -> unit
type r... | null | https://raw.githubusercontent.com/disteph/cdsat/1b569f3eae59802148f4274186746a9ed3e667ed/src/kernel/kernel.mld/termstructures.mld/literals/literals.mli | ocaml | open Format
open Top
open Interfaces_basic
open Basic
open Specs
module LitF : sig
type t [@@deriving eq,hash,ord,show]
val id : t -> int
val print_in_fmt : ?print_atom:(formatter -> int -> unit)
-> formatter -> t -> unit
val pp : formatter -> t -> unit
val clear : unit -> unit
type r... | |
9bf5dab6a1408eb915dd021e9551bf07a8f50594e8c9aa93b332bd20ce86f9ba | esl/MongooseIM | mod_http_upload_s3.erl | %%==============================================================================
Copyright 2016 Erlang Solutions Ltd.
%%
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
%%
... | null | https://raw.githubusercontent.com/esl/MongooseIM/40b349deae239d02b76a32a650dbbb7adbc11d67/src/http_upload/mod_http_upload_s3.erl | erlang | ==============================================================================
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either ex... | Copyright 2016 Erlang Solutions Ltd.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(mod_http_upload_s3).
-author('').
-behaviour(mod_http_upload_backend).
-export([create_slot/6]).
-spec create_slot(UTCDateTime... |
547d1fcf090adc9129d06c90ebf9ad88b411da6062fe28d21776a91b0daa403a | CloudI/CloudI | cloudi_service_test_http_req.erl | -*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*-
ex : set utf-8 sts=4 ts=4 sw=4 et nomod :
%%%
%%%------------------------------------------------------------------------
%%% @doc
= = CloudI Service for the http_req Test==
%%% @end
%%%
MIT License
%%%
Copyright ... | null | https://raw.githubusercontent.com/CloudI/CloudI/ec951deffbedcce823b16f82cef89e768f2ac07c/src/tests/http_req/erlang/src/cloudi_service_test_http_req.erl | erlang |
------------------------------------------------------------------------
@doc
@end
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, merge, publish, distribute, sublicense,
Softwar... | -*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*-
ex : set utf-8 sts=4 ts=4 sw=4 et nomod :
= = CloudI Service for the http_req Test==
MIT License
Copyright ( c ) 2011 - 2022 < mjtruog at protonmail dot com >
to deal in the Software without restriction , incl... |
1907739b3fac6c93a93e835746da3abdc5335d2b079edcc00dc7091b7386f21d | manutter51/woolybear | catalog.cljs | (ns woolybear.ad.catalog
(:require [re-frame.core :as re-frame]
[woolybear.ad.buttons :as buttons]
[woolybear.ad.layout :as layout]
[woolybear.packs.flex-panel :as flex]
[woolybear.packs.tab-panel :as tab-panel]
[woolybear.ad.catalog.layouts :as layout-demo]... | null | https://raw.githubusercontent.com/manutter51/woolybear/a7f820dfb2f51636122d56d1500baefe5733eb25/src/cljs/woolybear/ad/catalog.cljs | clojure | (ns woolybear.ad.catalog
(:require [re-frame.core :as re-frame]
[woolybear.ad.buttons :as buttons]
[woolybear.ad.layout :as layout]
[woolybear.packs.flex-panel :as flex]
[woolybear.packs.tab-panel :as tab-panel]
[woolybear.ad.catalog.layouts :as layout-demo]... | |
8b610df85a203632c7f002a794ef09670359891721a8173a9cccd81e0c9c34e7 | mightybyte/zeus | Backend.hs | # LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Backend where
------------------------------------------------------------------------------
import Con... | null | https://raw.githubusercontent.com/mightybyte/zeus/6a69c6145560be20ba684630ab531272205206be/backend/src/Backend.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------... | # LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Backend where
import Control.Concurrent
import Control.Error
import qualified Control.Exception as E
import Control.Lens
import qualified Control.... |
6204e652b3f47d85a14f7d7b4e343ed092c32d709abd6056fc39c0e97267f596 | mokus0/junkbox | gadt_dependent.hs |
- ` ` gadt_dependent ''
- ( c ) 2009 , , Inc.
-
- dependent types using rank - N quantification , GADTs , and
- continuation - passing style ( to avoid escaping types )
- ``gadt_dependent''
- (c) 2009 Cook, J. MR SSD, Inc.
-
- dependent types using rank-N quantification... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/TypeExperiments/gadt_dependent.hs | haskell | the next smaller ordinal itself
an element of the next smaller ordinal
can this be written it a way that it will actually execute?
I suspect not... |
- ` ` gadt_dependent ''
- ( c ) 2009 , , Inc.
-
- dependent types using rank - N quantification , GADTs , and
- continuation - passing style ( to avoid escaping types )
- ``gadt_dependent''
- (c) 2009 Cook, J. MR SSD, Inc.
-
- dependent types using rank-N quantification... |
aca7bdab2886a5a093f694843272b44e62f57ff8637549aade8d7c9fcf53c70a | kazu-yamamoto/quic | Parameters.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE PatternSynonyms #
module Network.QUIC.Parameters (
Parameters(..)
, defaultParameters
only for Connection
, encodeParameters
, decodeParameters
, AuthCIDs(..)
, defaultAuthCIDs
, setCIDsToParameters
, getCIDsToParameters
)... | null | https://raw.githubusercontent.com/kazu-yamamoto/quic/9dee8dd6f77d636c347ce755e01257d058fdd572/Network/QUIC/Parameters.hs | haskell | # LANGUAGE OverloadedStrings #
| QUIC transport parameters.
fixme
| The default value for QUIC transport parameters.
disabled
never reach
for grease
| An example parameters obsoleted in the near future. | # LANGUAGE RecordWildCards #
# LANGUAGE PatternSynonyms #
module Network.QUIC.Parameters (
Parameters(..)
, defaultParameters
only for Connection
, encodeParameters
, decodeParameters
, AuthCIDs(..)
, defaultAuthCIDs
, setCIDsToParameters
, getCIDsToParameters
) where
import qualified Data.ByteS... |
9f3e5f199f321fc519dfab211b3f7b5851428295e07e5ffcf8a253f8253d2f43 | jeroanan/rkt-coreutils | stat.rkt | #lang typed/racket/base
(provide Stat%)
(define-type Stat%
(Class
[get-owner-has-rwx? (-> Boolean)]
[get-owner-has-r? (-> Boolean)]
[get-owner-has-w? (-> Boolean)]
[get-owner-has-x? (-> Boolean)]
[get-group-has-rwx? (-> Boolean)]
[get-group-has-r? (-> Boolean)]
[get-group-has-w? (-> Boolean)]
... | null | https://raw.githubusercontent.com/jeroanan/rkt-coreutils/571629d1e2562c557ba258b31ce454add2e93dd9/src/repl/typedef/stat.rkt | racket | #lang typed/racket/base
(provide Stat%)
(define-type Stat%
(Class
[get-owner-has-rwx? (-> Boolean)]
[get-owner-has-r? (-> Boolean)]
[get-owner-has-w? (-> Boolean)]
[get-owner-has-x? (-> Boolean)]
[get-group-has-rwx? (-> Boolean)]
[get-group-has-r? (-> Boolean)]
[get-group-has-w? (-> Boolean)]
... | |
9729248ea91a53f2a9a4139cc18486571138bfcd280b92e14f96b3f8e41e7eab | conal/lambda-ccc | Bitonic.hs | {-# LANGUAGE GADTs #-}
# OPTIONS_GHC -Wall #
{ - # OPTIONS_GHC -fno - warn - unused - imports # - } -- TEMP
{ - # OPTIONS_GHC -fno - warn - unused - binds # - } -- TEMP
----------------------------------------------------------------------
-- |
-- Module : LambdaCCC.Bitonic
Copyright : ( c ) 2014 ... | null | https://raw.githubusercontent.com/conal/lambda-ccc/141a713456d447d27dbe440fa27a9372cd44dc7f/src/LambdaCCC/Bitonic.hs | haskell | # LANGUAGE GADTs #
TEMP
TEMP
--------------------------------------------------------------------
|
Module : LambdaCCC.Bitonic
Maintainer :
Stability : experimental
--------------------------------------------------------------------
TODO: explicit exports
Equivalently,
-------------------------... | # OPTIONS_GHC -Wall #
Copyright : ( c ) 2014 Tabula , Inc.
Bitonic sort
module LambdaCCC.Bitonic where
import Prelude hiding (reverse)
import Data.Functor ((<$>))
import Data.Foldable (toList)
import TypeUnary.TyNat (N1,N2,N3,N4)
import TypeUnary.Nat (IsNat(..),Nat(..))
import Circat.Pair
import Circat... |
4204d51c53797fbeb83ceb10d7b94a6a3678cc1f105f082a1281d46d60cb9b9b | keera-studios/haskell-titan | ModelEvents.hs | -- |
--
Copyright : ( C ) Keera Studios Ltd , 2018
-- License : GPL-3
Maintainer :
module Model.ReactiveModel.ModelEvents where
import qualified Hails.MVC.Model.ReactiveModel as GRM
import Hails.MVC.Model.ReactiveModel.Events
-- Implement this interface if you want automatic update notification
-- impor... | null | https://raw.githubusercontent.com/keera-studios/haskell-titan/958ddd2b468af00db46004a683c1c7aebe81526c/titan/src/Model/ReactiveModel/ModelEvents.hs | haskell | |
License : GPL-3
Implement this interface if you want automatic update notification
import Hails.MVC.Model.ProtectedModel.UpdatableModel
updateNotificationEvent = MaxVersionAvailable | Copyright : ( C ) Keera Studios Ltd , 2018
Maintainer :
module Model.ReactiveModel.ModelEvents where
import qualified Hails.MVC.Model.ReactiveModel as GRM
import Hails.MVC.Model.ReactiveModel.Events
data ModelEvent = UncapturedEvent
| Initialised
| SelectedFrameChanged
... |
32726346b7e6a0dfcd1d545ae97d94ae632dfd52e597f4365bd84bea40bcdce1 | xnning/haskell-programming-from-first-principles | Main.hs | module Main where
import Control.Monad (forever)
import Data.Char (toLower)
import Data.Maybe (isJust)
import Data.List (intersperse)
import System.Exit (exitSuccess)
import System.Random (randomRIO)
import System.IO
newtype WordList = WordList [String]
allWords :: IO WordList
allWords = do
dict <- readFile "../da... | null | https://raw.githubusercontent.com/xnning/haskell-programming-from-first-principles/0c49f799cfb6bf2dc05fa1265af3887b795dc5a0/projs/hangman/src/Main.hs | haskell | module Main where
import Control.Monad (forever)
import Data.Char (toLower)
import Data.Maybe (isJust)
import Data.List (intersperse)
import System.Exit (exitSuccess)
import System.Random (randomRIO)
import System.IO
newtype WordList = WordList [String]
allWords :: IO WordList
allWords = do
dict <- readFile "../da... | |
50f7854c90128ac82a30d03e5ee67e43106bff92e203870db5a22dc6d126ce35 | goldfirere/glambda | Type.hs | # LANGUAGE DataKinds , TypeOperators , PolyKinds ,
GADTs , RankNTypes , FlexibleInstances #
GADTs, RankNTypes, FlexibleInstances #-}
-----------------------------------------------------------------------------
-- |
-- Module : Language.Glambda.Type
Copyright : ( C ) 2015
-- ... | null | https://raw.githubusercontent.com/goldfirere/glambda/b1bd8306ccbb2aef865e8b092aed0b26aa5ba0d6/src/Language/Glambda/Type.hs | haskell | ---------------------------------------------------------------------------
|
Module : Language.Glambda.Type
License : BSD-style (see LICENSE)
Stability : experimental
Defines types
--------------------------------------------------------------------------
| Representation of a glambda type
^ A f... | # LANGUAGE DataKinds , TypeOperators , PolyKinds ,
GADTs , RankNTypes , FlexibleInstances #
GADTs, RankNTypes, FlexibleInstances #-}
Copyright : ( C ) 2015
Maintainer : ( )
module Language.Glambda.Type (
* Glambda types to be used in Haskell terms
Ty(..), readTyCon,
... |
945568b7b4a2ce691c4f985a4438e28196dba0403632bf639e7313870cf09c02 | uxbox/uxbox-backend | users.clj | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
Copyright ( c ) 2016 < >
(ns uxbox.frontend.users
(:require [clojure.spec :as s]
[promesa.core :as p]
[catacu... | null | https://raw.githubusercontent.com/uxbox/uxbox-backend/036c42db8424be3ac34c38be80577ee279141681/src/uxbox/frontend/users.clj | clojure |
--- Helpers
--- Retrieve Profile
--- Update Profile
--- Update Password
--- Update Profile Photo
--- Register User
--- Request Password Recovery
FIXME: rename for consistency
--- Password Recovery
FIXME: rename for consistency
--- Valiadate Recovery Token | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2016 < >
(ns uxbox.frontend.users
(:require [clojure.spec :as s]
[promesa.core :as p]
[catacumba... |
9ffa48398734f28dacfda0f2e3662aacc6ff83123f2da8b536b8252b058f9fe6 | input-output-hk/project-icarus-importer | OutboundQueueSpec.hs | # LANGUAGE ScopedTypeVariables #
module Test.Network.Broadcast.OutboundQueueSpec
( spec
TODO define elsewhere .
, arbitraryNodeType
, arbitraryRoutes
, arbitraryPeers
) where
import Control.Monad
import Data.List (delete)
import Data.Map.Strict (Map)
i... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/networking/test/Test/Network/Broadcast/OutboundQueueSpec.hs | haskell | | An arbitrary 'Routes nid' must respect the invariant that an 'nid' does
not appear in multiple classifications.
You also get the map classifying each node in the routes.
Now randomly spread them into conjunctinos of disjunctions.
None of the lists will be empty.
| There are invariants of 'Peers nid' that must b... | # LANGUAGE ScopedTypeVariables #
module Test.Network.Broadcast.OutboundQueueSpec
( spec
TODO define elsewhere .
, arbitraryNodeType
, arbitraryRoutes
, arbitraryPeers
) where
import Control.Monad
import Data.List (delete)
import Data.Map.Strict (Map)
i... |
c7a35e6c4752c6bdb110e14d134f0ae4798d3126321c99228c8df646c7aa3317 | roman01la/advent-of-code-2018 | day3.clj | (ns aoc2018.day3)
(defn read-id [s]
(->> (re-matches #"#(\d+) @ (\d+),(\d+): (\d+)x(\d+)" s)
rest
(map read-string)
(zipmap [:id :x :y :w :h])))
(def input
(->> (slurp "resources/aoc2018/day3.txt")
clojure.string/split-lines
(map read-id)))
(defn rect->area [{:keys [x y w h]}]
... | null | https://raw.githubusercontent.com/roman01la/advent-of-code-2018/be377fa2fe25653760e20d6872e598695f7f3de7/src/aoc2018/day3.clj | clojure | (ns aoc2018.day3)
(defn read-id [s]
(->> (re-matches #"#(\d+) @ (\d+),(\d+): (\d+)x(\d+)" s)
rest
(map read-string)
(zipmap [:id :x :y :w :h])))
(def input
(->> (slurp "resources/aoc2018/day3.txt")
clojure.string/split-lines
(map read-id)))
(defn rect->area [{:keys [x y w h]}]
... | |
f5230e1a61a5f69485fb336c1e316da75577916bfca89a5eeac2f085bfbc6a89 | dsheets/ocaml-unix-unistd | unix_unistd_bindings.ml |
* Copyright ( c ) 2016
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR ... | null | https://raw.githubusercontent.com/dsheets/ocaml-unix-unistd/20187eb4d160703bdd872d2b5df87c4da9de81c7/lib_gen/unix_unistd_bindings.ml | ocaml |
* Copyright ( c ) 2016
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR ... | |
69516afe67b971c59fbe962bde2b135ad7f3966c8bbe120bda7622fd0639204d | yetibot/core | profiles.sample.clj | Sample profiles.clj for Yetibot configuration .
equivalent to config.sample.edn
;;
;; It defines a dev profile, but you may want to share much of the configuration
between dev and prod , using Composite Profiles , optionally overriding
;; specific differences between dev and prod:
;; #composite-profiles
;;
Conf... | null | https://raw.githubusercontent.com/yetibot/core/254da5c7a5c62353da5e7eaeb6ab7066a62dbb25/config/profiles.sample.clj | clojure |
It defines a dev profile, but you may want to share much of the configuration
specific differences between dev and prod:
#composite-profiles
And exploded into nested maps using `dec`:
Whether or not embedded commands should be globally available (enabled by
default)
Whether to enable having a fallback command... | Sample profiles.clj for Yetibot configuration .
equivalent to config.sample.edn
between dev and prod , using Composite Profiles , optionally overriding
Config is loaded using ` environ : `
{:dev
{:env
{:yetibot-log-level "debug"
:yetibot-log-path "/var/log/yetibot/yetibot.log"
:yetibot-log-rolling-en... |
e3a22f132ff1b6e6c9398bf91d00a5ac13e5284c5efd3182f487231a387d4529 | WhatsApp/erlt | map_ffi.erl | -file("elm_core/src/map_ffi.erlt", 1).
-module(map_ffi).
-eqwalizer_unchecked([{empty, 0},
{filter, 2},
{fold, 3},
{from_list, 1},
{get, 2},
{insert, 3},
{keys, 1},
... | null | https://raw.githubusercontent.com/WhatsApp/erlt/616a4adc628ca8754112e659701e57f1cd7fecd1/tests/elm_core/ir-spec/map_ffi.erl | erlang | -file("elm_core/src/map_ffi.erlt", 1).
-module(map_ffi).
-eqwalizer_unchecked([{empty, 0},
{filter, 2},
{fold, 3},
{from_list, 1},
{get, 2},
{insert, 3},
{keys, 1},
... | |
5435233d0eb1583527f42672a3e97b41ea052cbce34e7872021ee194a26ee201 | phronmophobic/membrane | basic_components.cljc | (ns membrane.basic-components
#?(:cljs
(:require-macros [membrane.ui :refer [maybe-key-event]]
[membrane.component :refer [defui defeffect]]))
(:require [membrane.component :refer [#?(:clj defui)
#?(:clj defeffect)]
:as component]
... | null | https://raw.githubusercontent.com/phronmophobic/membrane/507a212a2ac855b886d82bb839f197cb012b26d8/src/membrane/basic_components.cljc | clojure | down-pos
mpos
last-click
else
mouse up | (ns membrane.basic-components
#?(:cljs
(:require-macros [membrane.ui :refer [maybe-key-event]]
[membrane.component :refer [defui defeffect]]))
(:require [membrane.component :refer [#?(:clj defui)
#?(:clj defeffect)]
:as component]
... |
c9d172436bfdfa056b19172d0135cb56c705cd866799b088a7d9df37e12615a4 | bittide/bittide-hardware | Domain.hs | SPDX - FileCopyrightText : 2022 Google LLC
--
SPDX - License - Identifier : Apache-2.0
# OPTIONS_GHC -fno - warn - orphans #
module Bittide.Domain where
import Clash.Explicit.Prelude
import Bittide.ClockControl (ClockControlConfig, defClockConfig)
createDomain vSystem{
vName="Bittide"
, vPeriod=hzToPerio... | null | https://raw.githubusercontent.com/bittide/bittide-hardware/c0d45b7c64451b4897a9a91dddd75add99340a28/elastic-buffer-sim/src/Bittide/Domain.hs | haskell | SPDX - FileCopyrightText : 2022 Google LLC
SPDX - License - Identifier : Apache-2.0
# OPTIONS_GHC -fno - warn - orphans #
module Bittide.Domain where
import Clash.Explicit.Prelude
import Bittide.ClockControl (ClockControlConfig, defClockConfig)
createDomain vSystem{
vName="Bittide"
, vPeriod=hzToPeriod 2... | |
d9d7fcb1160de7232f8ff20ceb78f495bb70de4eef214a0a1ce2810f828db932 | B-Lang-org/bsc | ANoInline.hs | module ANoInline (aNoInline) where
import Util(itos)
import Position(noPosition)
import Flags(Flags)
import Id(mkId, getIdBaseString)
import FStringCompat(mkFString)
import Control.Monad.State
import qualified Data.Map as M
import ASyntax
import ASyntaxUtil(mapMAExprs)
import SignalNaming
-- ===============
-- Namin... | null | https://raw.githubusercontent.com/B-Lang-org/bsc/bd141b505394edc5a4bdd3db442a9b0a8c101f0f/src/comp/ANoInline.hs | haskell | ===============
Naming conventions
instances of noinline functions will be named with this prefix
===============
unique name generator
definitions processed so far
to avoid creating new ids for the exprs which already have ids
Monad Util
Adds a processed def
Generates a new Id from the expression to give to ... | module ANoInline (aNoInline) where
import Util(itos)
import Position(noPosition)
import Flags(Flags)
import Id(mkId, getIdBaseString)
import FStringCompat(mkFString)
import Control.Monad.State
import qualified Data.Map as M
import ASyntax
import ASyntaxUtil(mapMAExprs)
import SignalNaming
new defs generated in th... |
a7b9d2da2fec00307bd10a178b8719c3f447a55a6f44bd93949e43756067a8b5 | TrustInSoft/tis-interpreter | gui_parameters.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/gui/gui_parameters.mli | 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... |
9e6740528dc562836403dcdb9fba0259e82fe0c8c9ff5168aaba994312a9fc30 | acl2/acl2 | conjuncts-of-uterm.lisp | ; Getting the conjuncts of an untranslated term
;
Copyright ( C ) 2022 - 2023 Kestrel Institute
;
License : A 3 - clause BSD license . See the file books/3BSD - mod.txt .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "ACL2")
(include-book "kestre... | null | https://raw.githubusercontent.com/acl2/acl2/e90629124ac135ff1b2be79af4f77b0ecf636f85/books/kestrel/untranslated-terms/conjuncts-of-uterm.lisp | lisp | Getting the conjuncts of an untranslated term
TODO: Consider treating a negated disjunction as a conjunction
untranslated
done below
(if <x> <y> nil) is (and <x> <y>)
for guards
todo: Handle (if <x> nil <y>)?
untranslated | Copyright ( C ) 2022 - 2023 Kestrel Institute
License : A 3 - clause BSD license . See the file books/3BSD - mod.txt .
Author : ( )
(in-package "ACL2")
(include-book "kestrel/utilities/forms" :dir :system)
(include-book "kestrel/lists-light/union-equal-alt" :dir :system)
(include-book "tools/flag" :dir :sys... |
359453343172f6d6aa0fd0fbaaa98cec0642e3cfd352ec7bed71682afc94ff9e | ghc/testsuite | tcfail189.hs | -- Checks that the correct type is used checking the using clause of
-- the group when a by clause is present
{-# OPTIONS_GHC -XTransformListComp #-}
module ShouldFail where
foo = [ length x
| x <- [1..10]
, then group by x using take 2
]
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail189.hs | haskell | Checks that the correct type is used checking the using clause of
the group when a by clause is present
# OPTIONS_GHC -XTransformListComp # |
module ShouldFail where
foo = [ length x
| x <- [1..10]
, then group by x using take 2
]
|
c36872254fbd9e92b13301adc4383febe20f4072c4b8e05f960f7a39a25ad7ac | mokus0/shapefile | ByParts.hs | # LANGUAGE RecordWildCards #
module Database.Shapefile.Shp.ByParts where
import Database.Shapefile.ShapeTypes (ESRIShapeType, getShapeType32le)
import Database.Shapefile.Shapes.ByParts
(ESRIShape, getShape, putShape, shapeType, contentLengthWords)
import Database.Shapefile.Shp (ShpFileHea... | null | https://raw.githubusercontent.com/mokus0/shapefile/9a3821e1c6aef08b9304ed3c79cccbba09970d7d/src/Database/Shapefile/Shp/ByParts.hs | haskell | sizes.
0 : Record Header
0 : Record Header | # LANGUAGE RecordWildCards #
module Database.Shapefile.Shp.ByParts where
import Database.Shapefile.ShapeTypes (ESRIShapeType, getShapeType32le)
import Database.Shapefile.Shapes.ByParts
(ESRIShape, getShape, putShape, shapeType, contentLengthWords)
import Database.Shapefile.Shp (ShpFileHea... |
173064d416b1773c19e5c9e6b0fbeeeb3244f0c4812afc0fa7f9e2248296a746 | target/theta-idl | Name.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveLift #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE NamedFieldPuns #-}
# LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ViewPatterns #-}
| A modu... | null | https://raw.githubusercontent.com/target/theta-idl/0fed73dc7f3963fd2c63cb408edcda0547a6d453/theta/src/Theta/Name.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveLift #
# LANGUAGE DerivingVia #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
* Definitions
| An identifier which can refer to types, or constructors.
All identifiers have a bas... | # LANGUAGE DeriveGeneric #
# LANGUAGE OverloadedLists #
| A module for working with names and namespaces in Theta .
module Theta.Name where
import qualified Data.Char as Char
import Data.Hashable (Hashable)
import qualified Data.Map as Map
import ... |
ea2cdeaa85bb67d41b010dd4e441cee8631f43d3aa7758714d75b5682fa23484 | rwmjones/guestfs-tools | perl_edit.ml | virt - builder
* Copyright ( C ) 2013 Red Hat Inc.
*
* 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 ver... | null | https://raw.githubusercontent.com/rwmjones/guestfs-tools/57423d907270526ea664ff15601cce956353820e/customize/perl_edit.ml | ocaml | Note we pass original 'g' even though it is not used by the
* callee. This is so that 'g' is kept as a root on the stack, and
* so cannot be garbage collected while we are in the c_edit_file
* function.
| virt - builder
* Copyright ( C ) 2013 Red Hat Inc.
*
* 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 ver... |
c6b8f612e6ead4df8da8521029495a6accc92be226e6691eed95d3b651be5d0b | gsakkas/rite | 0017.ml | LamG VarPatG (AppG [EmptyG])
fun fn -> x (fun a -> a)
fun c -> x c
fun x -> h (acc x)
fun a -> x a
fun el -> x (a q)
fun y -> x (a y)
fun q -> x (a q)
fun c -> x (a c)
fun i -> x (a i)
fun l -> x (a l)
fun z -> x (a z)
fun x -> a x
fun z -> a (x z)
fun p -> x (a p)
fun y -> a (x y)
fun y -> x y
fun b -> x (a b)
fun w -... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14/clusters/0017.ml | ocaml | LamG VarPatG (AppG [EmptyG])
fun fn -> x (fun a -> a)
fun c -> x c
fun x -> h (acc x)
fun a -> x a
fun el -> x (a q)
fun y -> x (a y)
fun q -> x (a q)
fun c -> x (a c)
fun i -> x (a i)
fun l -> x (a l)
fun z -> x (a z)
fun x -> a x
fun z -> a (x z)
fun p -> x (a p)
fun y -> a (x y)
fun y -> x y
fun b -> x (a b)
fun w -... | |
89ea5076e3e18d3314b905985998370f11341765fbac88a07afe2339c6575763 | incoherentsoftware/defect-process | Types.hs | module Enemy.DeathEffectData.Types
( EnemyDeathEffectData(..)
) where
import Data.Aeson.Types (FromJSON, genericParseJSON, parseJSON)
import GHC.Generics (Generic)
import Util
import Window.Graphics.Util
data EnemyDeathEffectData = EnemyDeathEffectData
{ _drawScale :: DrawScale
, _offset :: Ma... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/14ec46dec2c48135bc4e5965b7b75532ef19268e/src/Enemy/DeathEffectData/Types.hs | haskell | module Enemy.DeathEffectData.Types
( EnemyDeathEffectData(..)
) where
import Data.Aeson.Types (FromJSON, genericParseJSON, parseJSON)
import GHC.Generics (Generic)
import Util
import Window.Graphics.Util
data EnemyDeathEffectData = EnemyDeathEffectData
{ _drawScale :: DrawScale
, _offset :: Ma... | |
f270311f5e79808125f66a4eaf07fa6fd9d874306db9ec825606f6957e2000a6 | coccinelle/coccinelle | token_annot.mli | type annot_key =
Exclude_start
| Exclude_end
type annot_val =
Unit
type annots
val empty : annots
val get_annot : annots -> annot_key -> annot_val option
val put_annot : annot_key -> annot_val -> annots -> annots
val append_annots : annots -> annots -> annots
| null | https://raw.githubusercontent.com/coccinelle/coccinelle/b2a4b9b77157ef83a1bbf01bfa16ea9498f7c7ea/parsing_c/token_annot.mli | ocaml | type annot_key =
Exclude_start
| Exclude_end
type annot_val =
Unit
type annots
val empty : annots
val get_annot : annots -> annot_key -> annot_val option
val put_annot : annot_key -> annot_val -> annots -> annots
val append_annots : annots -> annots -> annots
| |
529efe79b5408a2afb5e77f72ff5a4cb7f198183369670baf82cf2cc305f126c | sirherrbatka/statistical-learning | variables.lisp | (cl:in-package #:statistical-learning.optimization)
(def <squared-error> (make 'squared-error-function))
(defconstant right t)
(defconstant left nil)
| null | https://raw.githubusercontent.com/sirherrbatka/statistical-learning/491a9c749f0bb09194793bc26487a10fae69dae0/source/optimization/variables.lisp | lisp | (cl:in-package #:statistical-learning.optimization)
(def <squared-error> (make 'squared-error-function))
(defconstant right t)
(defconstant left nil)
| |
bbc0560863c7161a9418aaa33398e427dbe15a3baad61be68961aa149d51ca28 | adobe/Chronikis | Translate.hs |
Copyright 2019 Adobe . All rights reserved . This file is licensed to you under
the Apache License , Version 2.0 ( the " License " ) ; you may not use this file
except in compliance with the License . You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , sof... | null | https://raw.githubusercontent.com/adobe/Chronikis/b83b9e38341cdc1539fc7625c6355c6fd176d8a3/compiler/src/Translate.hs | haskell |
Copyright 2019 Adobe . All rights reserved . This file is licensed to you under
the Apache License , Version 2.0 ( the " License " ) ; you may not use this file
except in compliance with the License . You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , sof... | |
ac364dd20c85af3b561fcac94742ed3d43238f47102c3c204b9fc46ab71374f8 | marcoheisig/Typo | type-checks.lisp | (in-package #:typo.vm)
(defmacro define-type-check (type)
(check-type type symbol)
(let ((name (intern (format nil "~@:(the-~A~)" type) #.*package*)))
`(progn
(eval-when (:compile-toplevel :load-toplevel :execute)
(declaim (inline ,name))
(defun ,name (object)
(check-type ob... | null | https://raw.githubusercontent.com/marcoheisig/Typo/ab83f62329b3f55846e6649ac9d8027e297f8c7b/code/vm/type-checks.lisp | lisp | Of course type checks are only pure in their respective
domains. But this is fine for us, since we do not consider
signaled conditions when it comes to types, only returned
values. | (in-package #:typo.vm)
(defmacro define-type-check (type)
(check-type type symbol)
(let ((name (intern (format nil "~@:(the-~A~)" type) #.*package*)))
`(progn
(eval-when (:compile-toplevel :load-toplevel :execute)
(declaim (inline ,name))
(defun ,name (object)
(check-type ob... |
4f158374a4414791148bf97eb3bbe8cfc775803506d6d5c931d6b3f6370035b5 | tezos/tezos-mirror | michelson_commands.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/b5f1d8664f1f91f7be11b15817805a26f4e2417d/src/proto_alpha/lib_benchmarks_proto/michelson_commands.ml | 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 A... |
356409d36a36425407bcf3de250ba95a94c98e9989f49054eda932467ca9438a | jeroanan/rkt-coreutils | tty.rkt | #lang s-exp "util/frontend-program.rkt"
(require "repl/tty.rkt")
(tty)
| null | https://raw.githubusercontent.com/jeroanan/rkt-coreutils/571629d1e2562c557ba258b31ce454add2e93dd9/src/tty.rkt | racket | #lang s-exp "util/frontend-program.rkt"
(require "repl/tty.rkt")
(tty)
| |
e79eca5ab7d19bda4f532056f66763a744eaa4d636455bc963f1310ff467c8fc | bennn/dissertation | quad-main.rkt | #lang typed/racket/base
(provide
typeset
)
;; ----------------------------------------------------------------------------
(require
require-typed-check
"../base/quad-types.rkt"
racket/class
(only-in racket/list append* split-at drop-right)
(only-in racket/sequence sequence->list)
(only-in math/flonum f... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/quadU/typed/quad-main.rkt | racket | ----------------------------------------------------------------------------
bg: should maybe import this
=============================================================================
-----------------------------------------------------------------------------
exclude last line from looseness calculation
todo: i... | #lang typed/racket/base
(provide
typeset
)
(require
require-typed-check
"../base/quad-types.rkt"
racket/class
(only-in racket/list append* split-at drop-right)
(only-in racket/sequence sequence->list)
(only-in math/flonum fl+ fl fl>))
(require/typed/check "quads.rkt"
(make-quadattrs (-> (Listof Any) ... |
ef4f51a805a2eaacb110f41a038448cec62b75bce01b9f8cd204280f1e776f1b | kupl/LearnML | patch.ml | let rec max (l : int list) : int =
match l with hd :: tl -> if hd > max tl then hd else max tl | [] -> min_int
| null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/max/sub10/patch.ml | ocaml | let rec max (l : int list) : int =
match l with hd :: tl -> if hd > max tl then hd else max tl | [] -> min_int
| |
a13a00f322a6afb2ce0c728cb4b2707c2f3c0d29492e4897df7ba0e6b1fe583e | coingaming/lnd-client | Lightning_Fields.hs | {- This file was auto-generated from lightning.proto by the proto-lens-protoc program. -}
# LANGUAGE ScopedTypeVariables , DataKinds , TypeFamilies , UndecidableInstances , GeneralizedNewtypeDeriving , MultiParamTypeClasses , FlexibleContexts , FlexibleInstances , PatternSynonyms , MagicHash , NoImplicitPrelude , BangP... | null | https://raw.githubusercontent.com/coingaming/lnd-client/98974c514cd82253dbd6111bafbbb2bbff6bffe2/src/Proto/Lightning_Fields.hs | haskell | This file was auto-generated from lightning.proto by the proto-lens-protoc program.
# OPTIONS_GHC -Wno-unused-imports#
# OPTIONS_GHC -Wno-duplicate-exports# | # LANGUAGE ScopedTypeVariables , DataKinds , TypeFamilies , UndecidableInstances , GeneralizedNewtypeDeriving , MultiParamTypeClasses , FlexibleContexts , FlexibleInstances , PatternSynonyms , MagicHash , NoImplicitPrelude , BangPatterns , TypeApplications , OverloadedStrings , DerivingStrategies , DeriveGeneric #
# OP... |
577093938a9090bf292c91c18f72c3475795ff3dbaa2ad05ad7a2c43c5346e44 | mbj/stratosphere | AwsVpcConfigurationProperty.hs | module Stratosphere.Scheduler.Schedule.AwsVpcConfigurationProperty (
AwsVpcConfigurationProperty(..), mkAwsVpcConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosp... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/scheduler/gen/Stratosphere/Scheduler/Schedule/AwsVpcConfigurationProperty.hs | haskell | module Stratosphere.Scheduler.Schedule.AwsVpcConfigurationProperty (
AwsVpcConfigurationProperty(..), mkAwsVpcConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosp... | |
0cd903949c66df0c1762eb53ade846c9fb0430100ca27b04df767882ef097815 | ekmett/ekmett.github.com | Char8.hs | # LANGUAGE CPP #
{-# OPTIONS_HADDOCK prune #-}
-- |
-- Module : Data.Buffer.Lazy.Char8
Copyright : ( c ) 2006
-- License : BSD-style
--
Maintainer :
-- Stability : experimental
Portability : non - portable ( imports Data . Buffer . Lazy )
--
Manipulate /lazy/ ' 's using ' ' o... | null | https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/buffer/Data/Buffer/Lazy/Char8.hs | haskell | # OPTIONS_HADDOCK prune #
|
Module : Data.Buffer.Lazy.Char8
License : BSD-style
Stability : experimental
run at identical speeds to their 'Data.Word.Word8' equivalents in
"Data.Buffer.Lazy".
This module is intended to be imported @qualified@, to avoid name
> import qualified Data.Buffe... | # LANGUAGE CPP #
Copyright : ( c ) 2006
Maintainer :
Portability : non - portable ( imports Data . Buffer . Lazy )
Manipulate /lazy/ ' 's using ' ' operations . All will
be truncated to 8 bits . It can be expected that these functions will
clashes with " Prelude " functions . eg .
... |
aa1bd1fc534ba6368c033f8e26c8cdbe3d2592ecfd3b7ff44933dcc85661d269 | sondresl/AdventOfCode | Day16.hs | module Day16 where
import Text.Regex.TDFA
import Data.List.Extra (splitOn)
constraints = [("children", 3),
("cats", 7),
("samoyeds", 2),
("pomeranians", 3),
("akitas", 0),
("vizslas", 0),
("goldfish", 5),
("trees"... | null | https://raw.githubusercontent.com/sondresl/AdventOfCode/224cf59354c7c1c31821f36884fe8909c5fdf9a6/2015/Haskell/src/Day16.hs | haskell | module Day16 where
import Text.Regex.TDFA
import Data.List.Extra (splitOn)
constraints = [("children", 3),
("cats", 7),
("samoyeds", 2),
("pomeranians", 3),
("akitas", 0),
("vizslas", 0),
("goldfish", 5),
("trees"... | |
c5fe35487cdda69c9887fb3d6a46520af645114bc6ef12f11b63965a59df310f | ghc/ghc | Lexeme.hs | -- (c) The GHC Team
--
-- Functions to evaluate whether or not a string is a valid identifier.
-- There is considerable overlap between the logic here and the logic
in GHC.Parser . , but sadly there seems to be no way to merge them .
module GHC.Utils.Lexeme (
* Lexical characteristics of names
| Use these fun... | null | https://raw.githubusercontent.com/ghc/ghc/37cfe3c0f4fb16189bbe3bb735f758cd6e3d9157/compiler/GHC/Utils/Lexeme.hs | haskell | (c) The GHC Team
Functions to evaluate whether or not a string is a valid identifier.
There is considerable overlap between the logic here and the logic
is valid.
* Validating identifiers
to make sure that the identifier is valid.
-----------
Prefix type or data constructors
Ordinary prefix identifiers
e... | in GHC.Parser . , but sadly there seems to be no way to merge them .
module GHC.Utils.Lexeme (
* Lexical characteristics of names
| Use these functions to figure what kind of name a ' FastString '
represents ; these functions do /not/ check that the identifier
isLexCon, isLexVar, isLexId, isLexSym,... |
cc2c0507f9414514086ede102fe6d9f1c4dd9911a22f441a4ca8a22e0bf34db5 | racket/typed-racket | check-within.rkt |
#lang typed/racket/optional
(require scheme/math typed/test-engine/scheme-tests)
(define-struct: circle ({radius : Number}))
(: circle-area (circle -> Number))
(check-within (+ 1 2.14) pi .1)
(check-range 2 1 3)
(check-member-of 'a 'b 'c 'd 'a 'z)
(check-error (error "fail") "fail")
(define (circle-area c)
(* pi ... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/optional/check-within.rkt | racket |
#lang typed/racket/optional
(require scheme/math typed/test-engine/scheme-tests)
(define-struct: circle ({radius : Number}))
(: circle-area (circle -> Number))
(check-within (+ 1 2.14) pi .1)
(check-range 2 1 3)
(check-member-of 'a 'b 'c 'd 'a 'z)
(check-error (error "fail") "fail")
(define (circle-area c)
(* pi ... | |
c201cb0acc0811af709359403af009bcfa70d75a19fc03a7a2571ece5adbf70a | jrslepak/Remora | info.rkt | #lang setup/infotab
(define scribblings '(("scribblings/remora.scrbl")))
| null | https://raw.githubusercontent.com/jrslepak/Remora/1a831dec554df9a7ef3eeb10f0d22036f1f86dbd/remora/info.rkt | racket | #lang setup/infotab
(define scribblings '(("scribblings/remora.scrbl")))
| |
6c3441bb13582d2d3ed4264589320e6dbe865ab2cd405ef1bd39af344fb60f86 | zotonic/zotonic | action_wires_alert.erl | @author < >
2009
%%
Based on code copyright ( c ) 2008 - 2009
Copyright 2009
%%
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 b... | null | https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_wires/src/actions/action_wires_alert.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | @author < >
2009
Based on code copyright ( c ) 2008 - 2009
Copyright 2009
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(action_wires_alert).
-include_lib("zotonic_core/include/zotonic.hrl").
-exp... |
9d3abeb86c6481f158e9505b70728a8502bf6ec41057b478383759a3de85fa59 | borkdude/jet | test_utils.clj | (ns jet.test-utils
(:require
[jet.main :as main]
[me.raynes.conch :refer [let-programs] :as sh]))
(set! *warn-on-reflection* true)
(defn jet-jvm [input & args]
(with-out-str
(with-in-str input
(apply main/-main args))))
(defn jet-native [input & args]
(let-programs [jet "./jet"]
(binding [s... | null | https://raw.githubusercontent.com/borkdude/jet/9b49ab4c3e2f84c862c76212e0a56bbc035e241c/test/jet/test_utils.clj | clojure | (ns jet.test-utils
(:require
[jet.main :as main]
[me.raynes.conch :refer [let-programs] :as sh]))
(set! *warn-on-reflection* true)
(defn jet-jvm [input & args]
(with-out-str
(with-in-str input
(apply main/-main args))))
(defn jet-native [input & args]
(let-programs [jet "./jet"]
(binding [s... | |
de1d76370f362278b21ebc6ede9ad5b1165b731081b16f960665aaf52dba0d35 | tcsprojects/pgsolver | switch_internal.ml | open Basics;;
open Stratimpralgs;;
open Paritygame;;
open Tcsset;;
open Tcsbasedata;;
open Univsolve;;
open Tcslist;;
open Tcsarray;;
let list_upfront l i =
let rec tile f t =
let j = List.hd t in
if j = i then (f, t) else tile (j::f) (List.tl t)
in
let (f, t) = tile [] l in
t @ (List.rev ... | null | https://raw.githubusercontent.com/tcsprojects/pgsolver/b0c31a8b367c405baed961385ad645d52f648325/src/solvers/stratimpralgs/switch_internal.ml | ocaml | Step3: Build combination strategy
Contains nodes that have been identified as non final;
We don't use cycles with potential escape edges leading to non-final-nodes
Contains edges that we have used as escape edges;
We don't use cycles with potential escape edges included in the set
strategy_improvement g... | open Basics;;
open Stratimpralgs;;
open Paritygame;;
open Tcsset;;
open Tcsbasedata;;
open Univsolve;;
open Tcslist;;
open Tcsarray;;
let list_upfront l i =
let rec tile f t =
let j = List.hd t in
if j = i then (f, t) else tile (j::f) (List.tl t)
in
let (f, t) = tile [] l in
t @ (List.rev ... |
7a3f5232c5b598da13afdfa088d40ba676cfa0060e70321224d0b9912893e0c5 | ocaml-multicore/multicoretests | lin_tests_dsl.ml | (* ************************************************************ *)
Tests of thread - safe [ Ephemeron ]
(* *)
(* Note that while the API is immutable and does not have *)
(* any toplevel state, the test fails. ... | null | https://raw.githubusercontent.com/ocaml-multicore/multicoretests/3e0f2ceb72eaf334e97252140ae5d40bf6461b96/src/ephemeron/lin_tests_dsl.ml | ocaml | ************************************************************
Note that while the API is immutable and does not have
any toplevel state, the test fails.
b... | Tests of thread - safe [ Ephemeron ]
The present guess is that it is because of the GC .
The linearazibilty check fails because we do n't have
control over the GC in order to reproduce its
module EConf =
struct
module E = Ephemeron.K1.Make... |
0bb07b7e4fe6c10c18603dc0e7620b2205454bbabcfbfde995bd067b7da8bf05 | fab13n/lamtez | typecheck_ctx.ml | open Utils
module A = Ast
module P = String_of_ast
let _DEBUG_ = ref false
module StringMap = Map.Make(String)
module ExprMap = Map.Make(struct type t = A.expr let compare=compare end)
type composite = {type_params: A.tvar list; cases: (A.tag*A.etype) list}
type substitutions = (A.tvar * A.etype) list
type t = {
... | null | https://raw.githubusercontent.com/fab13n/lamtez/ec0aab3093ca8380a4cd364f21cf763d729de25f/typecheck_ctx.ml | ocaml | type_params, (case, type)*
Replace tvars with their values as much as possible, deep into a typeT
print_endline("<"^String_of_ast.string_of_type t0^" U "^String_of_ast.string_of_type t1^">"); | open Utils
module A = Ast
module P = String_of_ast
let _DEBUG_ = ref false
module StringMap = Map.Make(String)
module ExprMap = Map.Make(struct type t = A.expr let compare=compare end)
type composite = {type_params: A.tvar list; cases: (A.tag*A.etype) list}
type substitutions = (A.tvar * A.etype) list
type t = {
... |
fe206d5e0e24ce4ca6b4414802522df5876fbcf199358759a343dc7ff8387e0d | active-group/sqlosure | time_test.clj | (ns sqlosure.time-test
(:require [sqlosure.time :refer :all]
[clojure.test :refer :all]))
(def d1 (java.time.LocalDate/of 1989 10 31))
(def t1 (java.time.LocalDateTime/of 1989 10 31 0 0))
(deftest make-date-test
(is (sqlosure.type/date? (make-date)))
(is (= (make-date 1989 10 31) d1))
(is (thrown?... | null | https://raw.githubusercontent.com/active-group/sqlosure/3cd74e90df4f3c49c841a1a75941acc7444c4bfb/test/sqlosure/time_test.clj | clojure | (ns sqlosure.time-test
(:require [sqlosure.time :refer :all]
[clojure.test :refer :all]))
(def d1 (java.time.LocalDate/of 1989 10 31))
(def t1 (java.time.LocalDateTime/of 1989 10 31 0 0))
(deftest make-date-test
(is (sqlosure.type/date? (make-date)))
(is (= (make-date 1989 10 31) d1))
(is (thrown?... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.