_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 |
|---|---|---|---|---|---|---|---|---|
203673a0d836a6c7cb55094bb902076ec3a882e0f099492ac3b84e6e97882379 | keera-studios/avatar-generator | Main.hs | -- To create a program that cna be invoked from CLI
import System.Environment
import System.Random
import System.IO
import System.Exit
-- Avatar generator
import AvatarGenerator
main :: IO ()
main = do
args <- getArgs
case args of
[f] -> do gen <- getStdGen
let list = randomRs (False, True... | null | https://raw.githubusercontent.com/keera-studios/avatar-generator/d3bb707e0a30de5ac01b95f68b7e64a30b3f3b9c/src/Main.hs | haskell | To create a program that cna be invoked from CLI
Avatar generator | import System.Environment
import System.Random
import System.IO
import System.Exit
import AvatarGenerator
main :: IO ()
main = do
args <- getArgs
case args of
[f] -> do gen <- getStdGen
let list = randomRs (False, True) gen
(r:g:b:_) = randomRs (0, 255) gen
... |
0c25642d83221242157b69bc107d9c72a7ec45fa0ae69e1e17de52c17d346ea9 | facebook/pyre-check | buildSystem.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/96b0abeb307bc7dfa08ff8e205c1c1c145275435/source/server/buildSystem.ml | ocaml | Derived field of `build_map`. Do not update manually.
This module defines how `State.t` will be preserved in the saved state.
Both `integers` and `normals` are functions that return a list instead of a list directly,
since some of the logging may depend on the return value of `f`.
NOTE (grievejia): For save... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
cffc2493271ba1fa1cc8f6559a58d43d4d41ec0a8cba07492bad2d51167a1111 | Gbury/archsat | quant.ml | This file is free software , part of Archsat . See file " LICENSE " for more details .
let section = Section.make ~parent:Proof.section "quant"
let tag ?dk ?coq id =
CCOpt.iter (fun s -> Expr.Id.tag id Dedukti.Print.name @@ Pretty.Exact s) dk;
CCOpt.iter (fun s -> Expr.Id.tag id Coq.Print.name @@ Pretty.Exact s... | null | https://raw.githubusercontent.com/Gbury/archsat/322fbefa4a58023ddafb3fa1a51f8199c25cde3d/src/proof/quant.ml | ocaml | ************************************************************************
Useful constants for instanciation
************************************************************************
Quantified formula matching
************************************************************************
***************************... | This file is free software , part of Archsat . See file " LICENSE " for more details .
let section = Section.make ~parent:Proof.section "quant"
let tag ?dk ?coq id =
CCOpt.iter (fun s -> Expr.Id.tag id Dedukti.Print.name @@ Pretty.Exact s) dk;
CCOpt.iter (fun s -> Expr.Id.tag id Coq.Print.name @@ Pretty.Exact s... |
2e33fa82975d531d6654a087a6d12b0fb7bf23f0997ef744b63cf038717eda9d | sdiehl/write-you-a-haskell | Eval.hs | module Eval (
runEval,
TermEnv,
emptyTmenv
) where
import Syntax
import Control.Monad.Identity
import qualified Data.Map as Map
data Value
= VInt Integer
| VBool Bool
| VClosure String Expr TermEnv
type TermEnv = Map.Map String Value
type Interpreter t = Identity t
emptyTmenv :: TermEnv
emptyTmenv = M... | null | https://raw.githubusercontent.com/sdiehl/write-you-a-haskell/ae73485e045ef38f50846b62bd91777a9943d1f7/chapter7/poly/src/Eval.hs | haskell | module Eval (
runEval,
TermEnv,
emptyTmenv
) where
import Syntax
import Control.Monad.Identity
import qualified Data.Map as Map
data Value
= VInt Integer
| VBool Bool
| VClosure String Expr TermEnv
type TermEnv = Map.Map String Value
type Interpreter t = Identity t
emptyTmenv :: TermEnv
emptyTmenv = M... | |
50fb14dc9c3ae1418e585c229b3ad4bcc9d5d0905fc51a1c960e16c3962ca510 | robert-strandh/Cluster | mul.lisp | (in-package #:cluster)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Mnemonic MUL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
Multiply the AL GPR ( destination ) by the contents of an 8 - bit GPR
;;; or memory location (source), and store the result in the AX GP... | null | https://raw.githubusercontent.com/robert-strandh/Cluster/370410b1c685f2afd77f959a46ba49923a31a33c/x86-instruction-database/mul.lisp | lisp |
Mnemonic MUL
or memory location (source), and store the result in the AX GPR.
(source), and store the result in the AX GPR.
memory location (source), and store the result in the AX GPR.
Multiply the A GPR (16/32/64) (destination) by the contents of a
GPR or memory location (16/32/64) (source), and store th... | (in-package #:cluster)
Multiply the AL GPR ( destination ) by the contents of an 8 - bit GPR
Opcodes : F6
Multiply the AL GPR ( destination ) by the contents of an 8 - bit GPR
(define-instruction "MUL"
:modes (32 64)
:operands ((gpr-a 8) (gpr 8))
:opcodes (#xF6)
:opcode-extension 4
:encoding (- modrm... |
964e6abbd2d9bbcc624765eb6e732a9052dff69c74c55572a95aae109f69e11a | roddyyaga/finch | data.ml | open Base
type t = { file: string; yaml: (string * Yaml.value) list; markdown: string }
let of_string file yaml markdown =
let pairs = Load.frontmatter_of_string yaml in
let yaml = pairs in
{ yaml; markdown; file }
let of_file { Load.yaml; markdown; file } =
match yaml with
| Some yaml -> of_string file ya... | null | https://raw.githubusercontent.com/roddyyaga/finch/685b661b987c7b57fe07e1e67b0ce4f688d87d67/lib/data.ml | ocaml | open Base
type t = { file: string; yaml: (string * Yaml.value) list; markdown: string }
let of_string file yaml markdown =
let pairs = Load.frontmatter_of_string yaml in
let yaml = pairs in
{ yaml; markdown; file }
let of_file { Load.yaml; markdown; file } =
match yaml with
| Some yaml -> of_string file ya... | |
1476a57e9cdccce0473b6e6b1e255e7a6dd41e746351a0b6dc0da88985e2a377 | turquoise-hexagon/euler | solution.scm | (define (solve lim n d)
(let loop
((ln 0) (ld 1) ;; low
(hn 1) (hd 1) ;; high
(mn 0) (md 0)) ;; middle
(if (> (+ ld hd) lim)
(list mn md)
(let ((mn (+ ln hn))
(md (+ ld hd)))
(if (or (= (/ mn md) (/ n d))
(> (* mn d) (* md n)))
(loop ln ld ... | null | https://raw.githubusercontent.com/turquoise-hexagon/euler/592c5f4f45fe8e8b82102be9fe11b3b1134d98fc/src/071/solution.scm | scheme | low
high
middle | (define (solve lim n d)
(let loop
(if (> (+ ld hd) lim)
(list mn md)
(let ((mn (+ ln hn))
(md (+ ld hd)))
(if (or (= (/ mn md) (/ n d))
(> (* mn d) (* md n)))
(loop ln ld mn md mn md)
(loop mn md hn hd mn md))))))
(let ((_ (car (solve #e1e6 3 7)... |
50a3513635545a09f7be9e4138ac06211b52aef7d51fffa963d92bed814030a5 | kappelmann/engaging-large-scale-functional-programming | Exercise07.hs | module Exercise07 where
import Data.List (sortBy, sort)
import Data.Maybe
main :: IO ()
main =
do
line <- getLine
let num = getNumber line 0
do
ps <- readLoop num 1 []
let res = find (sort ps) [] []
maybe (print "-1") printRes res
find : : [... | null | https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/8ed2c056fbd611f1531230648497cb5436d489e4/resources/contest/example_data/07/uploads/functional0programators/Exercise07.hs | haskell | module Exercise07 where
import Data.List (sortBy, sort)
import Data.Maybe
main :: IO ()
main =
do
line <- getLine
let num = getNumber line 0
do
ps <- readLoop num 1 []
let res = find (sort ps) [] []
maybe (print "-1") printRes res
find : : [... | |
382772d0895db3765549888892f2a3777591afa2eabb4e78834f48accc31e9ae | OCamlPro/alt-ergo | steps.ml | (******************************************************************************)
(* *)
(* The Alt-Ergo theorem prover *)
Copyright ( C ) 2006 - 2013 ... | null | https://raw.githubusercontent.com/OCamlPro/alt-ergo/43c4cb3a4d194399eea91f09f84f4092d6d87019/src/lib/util/steps.ml | ocaml | ****************************************************************************
The Alt-Ergo theorem prover
... | Copyright ( C ) 2006 - 2013
... |
4d3a4ef745c26b3e82926f5ffe8d7351986ba35ca14cea99491a9952dd2662b2 | heralden/heckendorf | ui.cljs | (ns heckendorf.ui
(:require [clojure.string :as s]
[dumdom.core :refer [defcomponent]]
[heckendorf.data :refer [inv->pots inv->weps item->vec]]
[heckendorf.styles.core :as styled]
[heckendorf.components.dialog :as dialog]))
(def real-tileset-width 128)
(def real-tile-s... | null | https://raw.githubusercontent.com/heralden/heckendorf/b5d7e75f9072dddf39598aa48bb4aacfeed5fc81/src/cljs/heckendorf/ui.cljs | clojure | (ns heckendorf.ui
(:require [clojure.string :as s]
[dumdom.core :refer [defcomponent]]
[heckendorf.data :refer [inv->pots inv->weps item->vec]]
[heckendorf.styles.core :as styled]
[heckendorf.components.dialog :as dialog]))
(def real-tileset-width 128)
(def real-tile-s... | |
9fa20bcb06aacde1ac5f326bd5d57182480451ed015a33cf05dec9fd65bab104 | ghc/ghc | ManyUbxSums_Addr.hs | # LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
# LANGUAGE UnboxedSums #
# OPTIONS_GHC -Wno - missing - methods #
module ManyUbxSums_Addr where
import GHC.Exts
import GHC.Word
-- import GHC.Int
import GHC.Utils . Misc
data Addr = Addr Addr#
instance Eq Addr where
(Addr x) == (Addr y) = case (eqAddr# x y) o... | null | https://raw.githubusercontent.com/ghc/ghc/31462d98c31e3ef48af2f6c6f2d379d74ccc63f5/testsuite/tests/unboxedsums/ManyUbxSums_Addr.hs | haskell | import GHC.Int | # LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
# LANGUAGE UnboxedSums #
# OPTIONS_GHC -Wno - missing - methods #
module ManyUbxSums_Addr where
import GHC.Exts
import GHC.Word
import GHC.Utils . Misc
data Addr = Addr Addr#
instance Eq Addr where
(Addr x) == (Addr y) = case (eqAddr# x y) of
1# -> True... |
7aa657f15ed3b5c0bfe17c493f0333662d6839edebd5761001490fe5acc3c6e4 | reborg/clojure-essential-reference | 5.clj | (import '(java.util UUID))
< 1 >
'({:description "Pencil Dress" :type :dress
:color :blue :price 60}
{:description "Asymmetric Lace Dress" :type :dress
:color :blue :price 70}
{:description "Short ... | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Vectors/vec/5.clj | clojure | <3>
[{'description':'Pencil Dress', 'price':'60'}] | (import '(java.util UUID))
< 1 >
'({:description "Pencil Dress" :type :dress
:color :blue :price 60}
{:description "Asymmetric Lace Dress" :type :dress
:color :blue :price 70}
{:description "Short ... |
56bf69bccf504d3d4a132fab8f1b2a6a9e3541e5ca9253669cc87ee6bfa4bb16 | ohua-dev/ohua-core | DFGraph.hs | -- |
-- Module : $Header$
-- Description : The low level dataflow graph that the compiler produces in the end.
Copyright : ( c ) and 2017 . All Rights Reserved .
-- License : EPL-1.0
Maintainer : ,
-- Stability : experimental
This source code is licensed under the terms described in the asso... | null | https://raw.githubusercontent.com/ohua-dev/ohua-core/978fa3369922f86cc3fc474d5f2c554cc87fd60a/core/src/Ohua/DFGraph.hs | haskell | |
Module : $Header$
Description : The low level dataflow graph that the compiler produces in the end.
License : EPL-1.0
Stability : experimental
'target' field is the constant '()' and the 'source' is some operator at some
index. Mostly this is used when dataflow operators that implement the
argument... | Copyright : ( c ) and 2017 . All Rights Reserved .
Maintainer : ,
This source code is licensed under the terms described in the associated LICENSE.TXT file
module Ohua.DFGraph where
import Ohua.Prelude
import qualified Data.HashMap.Strict as HM
import qualified Data.HashSet as HS
import Ohua.DFLang.L... |
3a557acbd31b0f11cd7557789981a4c07bf03e14bb127f4fc26255cfb50138b2 | coccinelle/coccinelle | git_grep.mli |
* This file is part of Coccinelle , licensed under the terms of the GPL v2 .
* See copyright.txt in the Coccinelle source code for more information .
* The Coccinelle source code can be obtained at
* This file is part of Coccinelle, licensed under the terms of the GPL v2.
* See copyright.txt in the Cocci... | null | https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/parsing_cocci/git_grep.mli | ocaml |
* This file is part of Coccinelle , licensed under the terms of the GPL v2 .
* See copyright.txt in the Coccinelle source code for more information .
* The Coccinelle source code can be obtained at
* This file is part of Coccinelle, licensed under the terms of the GPL v2.
* See copyright.txt in the Cocci... | |
7dd79757c6397063bc02016189f67be3e8af227b8b788845cc5ac9c978fdd8ed | DATX02-17-26/DATX02-17-26 | AST.hs | DATX02 - 17 - 26 , automated assessment of imperative programs .
- Copyright , 2017 , see AUTHORS.md .
-
- 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
- ... | null | https://raw.githubusercontent.com/DATX02-17-26/DATX02-17-26/f5eeec0b2034d5b1adcc66071f8cb5cd1b089acb/libsrc/CoreS/AST.hs | haskell | ------------------------------------------------------------------------------
Names and identifiers:
------------------------------------------------------------------------------
| Ident: Identifier of a variable, class, method, etc.
^ The actual name of the identifier.
| Name: Qualified identifier.
^ Identifier... | DATX02 - 17 - 26 , automated assessment of imperative programs .
- Copyright , 2017 , see AUTHORS.md .
-
- 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
- ... |
35b0144b29f72d660f2224a287232c5026a17e3ff176050ff7fc71f5e3fb3944 | altsun/My-Lisps | (TBC) Tinh trung binh cong cac Text.lsp | : ,
(defun C:TBC ( / ED ENAMET ENTTEXTGHI LOOP LTS N NOIDUNG TBC1 TONG)
(setq loop T)
(setq Lts (list))
(while loop
(setq EnameT (Car (Entsel "\nCh\U+1ECDn t\U+1EEBng Text: ")))
(cond
(T
(if EnameT
(progn
(setq Noidung (cdr (assoc 1 (entget EnameT))))
(if (distof Noidung 2)
... | null | https://raw.githubusercontent.com/altsun/My-Lisps/85476bb09b79ef5e966402cc5158978d1cebd7eb/Text-Dim-Leader/Calculate/(TBC)%20Tinh%20trung%20binh%20cong%20cac%20Text.lsp | lisp | : ,
(defun C:TBC ( / ED ENAMET ENTTEXTGHI LOOP LTS N NOIDUNG TBC1 TONG)
(setq loop T)
(setq Lts (list))
(while loop
(setq EnameT (Car (Entsel "\nCh\U+1ECDn t\U+1EEBng Text: ")))
(cond
(T
(if EnameT
(progn
(setq Noidung (cdr (assoc 1 (entget EnameT))))
(if (distof Noidung 2)
... | |
2d0b0c91b2f038db9f5592c7729a0d2bc50f8f5e64c02ca5a70de66f3cabd9d3 | NaOHman/XMonadPlus | DynamicBars.hs | {-# LANGUAGE DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
Module : XMonad . Hooks . DynamicBars
Copyright : ( c ) 2012
License : BSD - style ( as xmonad )
--
-- Maintainer :
-- Stability : unstable
-- Portability : unportabl... | null | https://raw.githubusercontent.com/NaOHman/XMonadPlus/1495e102ae3304817d1897a393e1f31fef71d41f/xmonad-contrib-darcs/XMonad/Hooks/DynamicBars.hs | haskell | # LANGUAGE DeriveDataTypeable #
---------------------------------------------------------------------------
|
Maintainer :
Stability : unstable
Portability : unportable
Manage per-screen status bars.
---------------------------------------------------------------------------
* Usage
$usage
$usage
Pro... | Module : XMonad . Hooks . DynamicBars
Copyright : ( c ) 2012
License : BSD - style ( as xmonad )
module XMonad.Hooks.DynamicBars (
DynamicStatusBar
, DynamicStatusBarCleanup
, dynStatusBarStartup
, dynStatusBarEventHook
, multiPP
) where
import Prelude
import Control.Monad
i... |
1136a2676889b0ca38120b9d4eac0111efb64cea73bc3af8297f3cc8d928b2d1 | fp-works/2019-winter-Haskell-school | Scrabble.hs | # OPTIONS_GHC -Wall #
# LANGUAGE GeneralizedNewtypeDeriving #
module Scrabble where
import qualified Data.Map as Map
import qualified Data.Char as Char
newtype Score = Score Int
deriving (Eq, Ord, Show, Num)
instance Semigroup Score where
(<>) = (+)
instance Monoid Score where
mempty = Score 0
getScore :: S... | null | https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week7/zhansongl/Scrabble.hs | haskell | # OPTIONS_GHC -Wall #
# LANGUAGE GeneralizedNewtypeDeriving #
module Scrabble where
import qualified Data.Map as Map
import qualified Data.Char as Char
newtype Score = Score Int
deriving (Eq, Ord, Show, Num)
instance Semigroup Score where
(<>) = (+)
instance Monoid Score where
mempty = Score 0
getScore :: S... | |
bd3669fc879a5865e629d0aac03b0bb9bafd4c3b92aaf54dee7fad1853377792 | amiller/haskell-saucy | ProcessIO.hs | # LANGUAGE Rank2Types , , ConstraintKinds
#
#-}
Haskell - SaUCy Process Model
This defines a model of probabilistic , polynomial time , channel
passing processes . It is similar in spirit to the Interactive Turing
Machines model ( ITMs ) , and to the equivalent processes in ILC - SaUCy ,
... | null | https://raw.githubusercontent.com/amiller/haskell-saucy/d86890997f9c4e230ab84bfc5e63fb818534811d/ProcessIO.hs | haskell | - Typeclass for ITMs -
- Communicating over channels -
- Haskell-SaUCy processes can make use of the
writeChan
readChan
newChan
fork
features from Control.Concurrent.MonadIO. -
Multiplexes two "read" channels into a single new read channel
Multiplexes two "write" channels into a single read ch... | # LANGUAGE Rank2Types , , ConstraintKinds
#
#-}
Haskell - SaUCy Process Model
This defines a model of probabilistic , polynomial time , channel
passing processes . It is similar in spirit to the Interactive Turing
Machines model ( ITMs ) , and to the equivalent processes in ILC - SaUCy ,
... |
8c4bcab891f0fc8be8e8a033ecde63ae5c7a2ad13b69976d33d76fa933cf0654 | tomjridge/kv-hash | bucket_store_intf.ml | (** A store of buckets, backed by a file/mmap *)
module type BUCKET_STORE = sig
= Bucket.t
type t
type bucket = {
index:int;
raw_bucket:raw_bucket
}
val create : ?sz:int -> fn:string -> unit -> t
(** [create] takes an optional sz parameter, which is the number of
buckets initially al... | null | https://raw.githubusercontent.com/tomjridge/kv-hash/fcb7fdc044514ac795465c6cae4b5168288189b7/src/bucket_store_intf.ml | ocaml | * A store of buckets, backed by a file/mmap
* [create] takes an optional sz parameter, which is the number of
buckets initially allocated in the file |
module type BUCKET_STORE = sig
= Bucket.t
type t
type bucket = {
index:int;
raw_bucket:raw_bucket
}
val create : ?sz:int -> fn:string -> unit -> t
val open_ : fn:string -> t
val read_bucket : t -> int -> bucket
val write_bucket : t -> bucket -> unit
val sync : t -> ... |
bed8955e70626536bd73ce4b2d98bfc65a7c9062720b4859427c2318a2e17078 | tatut/ripley | js.clj | (ns ripley.js
"JavaScript helpers"
(:require [ripley.live.protocols :as p]
[ripley.impl.dynamic :as dyn]
[ripley.html :as h]))
(defrecord JSCallback [callback-fn condition js-params debounce-ms]
p/Callback
(callback-js-params [_] js-params)
(callback-fn [_] callback-fn)
(callback-de... | null | https://raw.githubusercontent.com/tatut/ripley/531ff0917809cf14063f7ec819fb1d70b8b03759/src/ripley/js.clj | clojure | (ns ripley.js
"JavaScript helpers"
(:require [ripley.live.protocols :as p]
[ripley.impl.dynamic :as dyn]
[ripley.html :as h]))
(defrecord JSCallback [callback-fn condition js-params debounce-ms]
p/Callback
(callback-js-params [_] js-params)
(callback-fn [_] callback-fn)
(callback-de... | |
ae59ce4e68318cf6a1b4a366062838f41cc4eb42695c4bc92db8de3514b0ebae | emqx/emqx | emqx_resource_utils.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. 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 o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_resource/src/emqx_resource_utils.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 ... | Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_resource_utils).
|
692ab80961f1d04d31051eebd28cb1995caea18932a56ca451369caf989114f3 | noinia/hgeometry | ConvexHull3DSpec.hs | module Algorithms.Geometry.ConvexHull.ConvexHull3DSpec where
import Data.Coerce
import qualified Data.Foldable as F
import Geometry.Boundary (PointLocationResult(..))
import Geometry.HalfSpace
import Geometry.HyperPlane
import Prelude hiding (filter)
import W... | null | https://raw.githubusercontent.com/noinia/hgeometry/46084245edc2b335c809f6ebc04ff5e52731a436/hgeometry-devel/test/Algorithms/Geometry/ConvexHull/ConvexHull3DSpec.hs | haskell | import Algorithms.Util
------------------------------------------------------------------------------
test :: Fractional r => IO [Triangle 3 Int r]
test = Minimalist.lowerHull' <$> samplePoints
------------------------------------------------------------------------------
type R = Symbolic SoSI RBase
it ... | module Algorithms.Geometry.ConvexHull.ConvexHull3DSpec where
import Data.Coerce
import qualified Data.Foldable as F
import Geometry.Boundary (PointLocationResult(..))
import Geometry.HalfSpace
import Geometry.HyperPlane
import Prelude hiding (filter)
import W... |
dd27e078377e7407a312a3ab9f509c7174a03cee201591482387c7e1586b18ed | BranchTaken/Hemlock | test_utf8.ml | open! Basis.Rudiments
open! Basis
open Codepoint
let pp_uns_x u formatter =
formatter |> Uns.fmt ~alt:true ~zpad:true ~width:16L ~radix:Radix.Hex u
let pp_x cp formatter =
formatter |> pp_uns_x (extend_to_uns cp)
let test () =
let open Utf8 in
let rec test_codepoints = function
| [] -> ()
| codepoint... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/codepoint/test_utf8.ml | ocaml | <
«
‡
𐆗 | open! Basis.Rudiments
open! Basis
open Codepoint
let pp_uns_x u formatter =
formatter |> Uns.fmt ~alt:true ~zpad:true ~width:16L ~radix:Radix.Hex u
let pp_x cp formatter =
formatter |> pp_uns_x (extend_to_uns cp)
let test () =
let open Utf8 in
let rec test_codepoints = function
| [] -> ()
| codepoint... |
9517d343fd3aa14707650503d8d6725fa5e6d4bc3dc2a97ab1c56e5fc7635153 | dmitryvk/sbcl-win32-threads | defpackage.lisp | (defpackage :sb-cltl2
(:use :cl :sb-c :sb-int :sb-kernel)
(:export #:compiler-let
#:macroexpand-all
;; environment access
#:variable-information
#:function-information
#:declaration-information
#:augment-environment
#:define-declaration
... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/contrib/sb-cltl2/defpackage.lisp | lisp | environment access | (defpackage :sb-cltl2
(:use :cl :sb-c :sb-int :sb-kernel)
(:export #:compiler-let
#:macroexpand-all
#:variable-information
#:function-information
#:declaration-information
#:augment-environment
#:define-declaration
#:parse-macro
... |
fb773c50c795cf19781dca3153416c1c0e68fb14b0db7ae833d0d914bc2ae3ae | opencog/opencog | data_#2.scm | Test # 2
;; anaphor is reflexive
;; The parse tree structure is:
;; verb
;; / \
;; antecedent anaphor
;; Expected result:
;; Acceptance
Connection between two clauses
(ListLink
(AnchorNode "CurrentResolution")
(WordInstanceNode "anaphor")
(WordInstanceNode "antecedent")
)
(Lis... | null | https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/tests/nlp/anaphora/data/propose/filter-%2314/data_%232.scm | scheme | anaphor is reflexive
The parse tree structure is:
verb
/ \
antecedent anaphor
Expected result:
Acceptance
filter tests | Test # 2
Connection between two clauses
(ListLink
(AnchorNode "CurrentResolution")
(WordInstanceNode "anaphor")
(WordInstanceNode "antecedent")
)
(ListLink
(AnchorNode "CurrentPronoun")
(WordInstanceNode "anaphor")
)
(ListLink
(AnchorNode "CurrentProposal")
(WordInstanceNode "antece... |
41840c0b22254c99bb623ec72924eb53ce6eabc32501df7c8c4ae0cd0eda63fa | lorepub/moot | Main.hs | module Main where
import Prelude (IO)
import Model (runDevDB)
import Model.Fixtures (truncateAllTables)
main :: IO ()
main =
runDevDB truncateAllTables
| null | https://raw.githubusercontent.com/lorepub/moot/793c72d046762ec01a250416667e041b35eec7f8/app/truncate/Main.hs | haskell | module Main where
import Prelude (IO)
import Model (runDevDB)
import Model.Fixtures (truncateAllTables)
main :: IO ()
main =
runDevDB truncateAllTables
| |
1befd440292f12c788a8ddfb55b8421db231aabfffc25ca810826df81b93e394 | kupl/LearnML | patch.ml | type aexp =
| Const of int
| Var of string
| Power of (string * int)
| Times of aexp list
| Sum of aexp list
let rec diff ((aexp : aexp), (x : string)) : aexp =
match aexp with
| Const n -> Const 0
| Var str -> if str = x then Const 1 else Const 0
| Power (str, n) ->
if str = x then Times [ Con... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/diff/sub43/patch.ml | ocaml | type aexp =
| Const of int
| Var of string
| Power of (string * int)
| Times of aexp list
| Sum of aexp list
let rec diff ((aexp : aexp), (x : string)) : aexp =
match aexp with
| Const n -> Const 0
| Var str -> if str = x then Const 1 else Const 0
| Power (str, n) ->
if str = x then Times [ Con... | |
f776f67faccb6441d8129bb6ec94b31a09ffb403af8f950729c4cbff04d9cb66 | xxyzz/SICP | Exercise_3_19.rkt | #lang racket/base
(define (last-pair x)
(if (null? (mcdr x)) x (last-pair (mcdr x))))
(define (make-cycle x)
(set-mcdr! (last-pair x) x)
x)
; Floyd's cycle-finding algorithm
;
(define (next-pair x)
(if (null? x)
null
(mcdr x)))
(define (contain-cycle x)
(let ([tortoise x]
[hare (next-... | null | https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/3_Modularity_Objects_and_State/3.3_Modeling_with_Mutable_Data/Exercise_3_19.rkt | racket | Floyd's cycle-finding algorithm
#f
#t | #lang racket/base
(define (last-pair x)
(if (null? (mcdr x)) x (last-pair (mcdr x))))
(define (make-cycle x)
(set-mcdr! (last-pair x) x)
x)
(define (next-pair x)
(if (null? x)
null
(mcdr x)))
(define (contain-cycle x)
(let ([tortoise x]
[hare (next-pair (next-pair x))])
(define (it... |
33b17190e76881b203058471f608ce8cf685b9acf53b57230098ed73738128be | coq/coq | minilib.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/e0de9db708817cc08efb20d65b9819d8f2b0ea68/ide/coqide/minilib.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
a2dc835e904312227e578cd146b67569e84160f205d0d3b6bb5277716fffa58b | den1k/vimsical | user.cljc | (ns vimsical.queries.user
(:require
[vimsical.queries.settings :as settings]
[vimsical.queries.vims :as vims]
[vimsical.user :as user]))
(def pull-query
[:db/uid
::user/first-name
::user/last-name
::user/email
::user/password
{::user/vimsae vims/pull-query}
{::user/settings settings/pull... | null | https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/src/common/vimsical/queries/user.cljc | clojure | (ns vimsical.queries.user
(:require
[vimsical.queries.settings :as settings]
[vimsical.queries.vims :as vims]
[vimsical.user :as user]))
(def pull-query
[:db/uid
::user/first-name
::user/last-name
::user/email
::user/password
{::user/vimsae vims/pull-query}
{::user/settings settings/pull... | |
b109b6dabc968e7fc57ecc24838a551b3ecd2066877cfd764e956c6fc0315a5d | jepsen-io/jepsen | ignite.clj | (ns jepsen.ignite
(:require [clojure.tools.logging :refer :all]
[clojure.string :as str]
[clojure.java.shell :as shell]
[clojure.java.io :as io]
[jepsen [core :as jepsen]
[checker :as checker]
... | null | https://raw.githubusercontent.com/jepsen-io/jepsen/a75d5a50dd5fa8d639a622c124bf61253460b754/ignite/src/jepsen/ignite.clj | clojure | OS-level polymorphic functions for Ignite
TODO: figure out the yum invocation we need here
User should be created manually
either passing through the test's URL, or | (ns jepsen.ignite
(:require [clojure.tools.logging :refer :all]
[clojure.string :as str]
[clojure.java.shell :as shell]
[clojure.java.io :as io]
[jepsen [core :as jepsen]
[checker :as checker]
... |
5ce53256e9a46448f87feacc87f61344a170a34a4c31c0f1a033b4355499a4ad | vikram/lisplibraries | types.lisp | Copyright ( c ) 2006 , All Rights Reserved
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list of conditions... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/skippy-1.3.1/types.lisp | lisp |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form ... | Copyright ( c ) 2006 , All Rights Reserved
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
$ I d : , v 1.3 2006/12/10 22:56:08 xach Exp $
(in-package #:skippy)
(deftype octet ()
'(unsigned-byte 8))
(deftype buffer-off... |
ec34ca28d85efa874b39a5c8bfae0e9a32dc118601880926cd0dfabbbac32d8e | bmeurer/ocamljit2 | btype.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/typing/btype.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Asttypes
open Types
val... |
11e724b5c550661d44195637f972abd4fdac9c113d1af0fa55c3daee74116a1c | yuriy-chumak/ol | version-1-0.scm | OpenCL 1.0 ( 2009 )
(define-library (OpenCL version-1-0)
(export
CL_VERSION_1_0
CL_LIBRARY ;internal variable
CL base types
signed 8 - bit
unsigned 8 - bit
signed 16 - bit
unsigned 16 - bit
signed 32 - bit
unsigned 32 - bit
signed 64 - bit
unsigned 64 - bit
unsigned 1... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/c005c96f4dd17fc7dcf78560c8878e002b0f3b38/libraries/OpenCL/version-1-0.scm | scheme | internal variable
cl_platform_id*
cl_device_id*
cl_context*
cl_command_queue*
cl_mem*
cl_program*
cl_kernel*
cl_event*
cl_sampler*
GLvoid GLvoid*
...
clCreateProgramWithBinary
clRetainProgram
clReleaseProgram
clUnloadCompiler
==============================... | OpenCL 1.0 ( 2009 )
(define-library (OpenCL version-1-0)
(export
CL_VERSION_1_0
CL base types
signed 8 - bit
unsigned 8 - bit
signed 16 - bit
unsigned 16 - bit
signed 32 - bit
unsigned 32 - bit
signed 64 - bit
unsigned 64 - bit
unsigned 16 - bit
floating 32 - bit
floatin... |
d5152150517b498f7839bda1a70378da4748d686c5788ae60cce8c9fd697fb01 | bos/rwh | Ternary.hs |
{-- snippet ternary --}
data Ternary
= Yes
| No
| Unknown
deriving (Eq,Show)
{-- /snippet ternary --}
| null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch11/Ternary.hs | haskell | - snippet ternary -
- /snippet ternary - |
data Ternary
= Yes
| No
| Unknown
deriving (Eq,Show)
|
63f9b2c44e47c4c439570299beef7c0362243bac739cd0a3515a411f1f7f51de | cram2/cram | utils.lisp |
(in-package :prolog)
(defun prolog-type-p (variable type)
(alexandria:ignore-some-conditions (simple-error)
(typep variable type)))
(defun query-var (var function query &rest args)
"Executes `function' with `query' as its first parameter and `args'
as additional parameters and returns the value of `var' in... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_core/cram_prolog/src/utils.lisp | lisp |
(in-package :prolog)
(defun prolog-type-p (variable type)
(alexandria:ignore-some-conditions (simple-error)
(typep variable type)))
(defun query-var (var function query &rest args)
"Executes `function' with `query' as its first parameter and `args'
as additional parameters and returns the value of `var' in... | |
011683937ea5ca078bb62683462bb5180878e9ceefd764a70903e2629c0f9536 | heraldry/heraldicon | query.cljs | (ns heraldicon.frontend.repository.query)
(def ^:private queries
(atom #{}))
(defn register [id]
(swap! queries conj id))
(defn running? [id]
(contains? @queries id))
(defn unregister [id]
(swap! queries disj id))
| null | https://raw.githubusercontent.com/heraldry/heraldicon/4a4d7c860fbe5bed8b0a16acef428b186e27199b/src/heraldicon/frontend/repository/query.cljs | clojure | (ns heraldicon.frontend.repository.query)
(def ^:private queries
(atom #{}))
(defn register [id]
(swap! queries conj id))
(defn running? [id]
(contains? @queries id))
(defn unregister [id]
(swap! queries disj id))
| |
bdd6c1cdc998df568fbc0dbe93b544c3c0f305cb8bd990c9acf38c6f5a820a48 | janestreet/krb | handshake_error.ml | open Core
open Async
open! Import
module Kind = struct
type t =
| Incompatible_client
| Unexpected_or_no_client_bytes
| Unexpected_exception
[@@deriving sexp]
end
type t = Kind.t * Error.t [@@deriving sexp]
let of_error ~kind error = kind, error
let of_result ~kind r = Deferred.Result.map_error r ~f:... | null | https://raw.githubusercontent.com/janestreet/krb/e3f1bfde3610a742e4f5421321e5bd27f6987fc5/src/handshake_error.ml | ocaml | open Core
open Async
open! Import
module Kind = struct
type t =
| Incompatible_client
| Unexpected_or_no_client_bytes
| Unexpected_exception
[@@deriving sexp]
end
type t = Kind.t * Error.t [@@deriving sexp]
let of_error ~kind error = kind, error
let of_result ~kind r = Deferred.Result.map_error r ~f:... | |
9eae90dd8f1e048a06ab43d222ee132af13feea4a47013d620a4700921aa53f9 | stevenvar/OMicroB | circuits.ml | (*******************************************************************************)
(* *)
(* Generic circuit representation library *)
(* ... | null | https://raw.githubusercontent.com/stevenvar/OMicroB/453e078ca3c67eddaa1e2dc07fc5564839261c64/src/stdlib/circuits.ml | ocaml | *****************************************************************************
Generic circuit representation library
********... | , Sorbonne Université
module type MCUConnection = sig
type 'a pin
type level
type mode
val high: level
val low: level
val input_mode: mode
val output_mode: mode
val pin_mode: 'a pin -> mode -> unit
val digital_write: [ `DWRITE ] pin -> level -> unit
va... |
1a15a1ed3596afc8fbe8d0c28ef67d337decf08b45ab2f256664b3ea669045b5 | exercism/clojurescript | hamming.cljs | (ns hamming)
(defn distance [a b])
| null | https://raw.githubusercontent.com/exercism/clojurescript/7700a33e17a798f6320aad01fb59a637bd21e12b/exercises/practice/hamming/src/hamming.cljs | clojure | (ns hamming)
(defn distance [a b])
| |
8f76f70b8d66b0688ab1ffe84c6b909060ce8df8d45b98d8267d420e2aa7d30b | piranha/showkr | project.clj | (defproject showkr "0.1.0-SNAPSHOT"
:description "Showkr"
:url "/"
:plugins [[lein-cljsbuild "1.0.3"]
[lein-figwheel "0.2.0-SNAPSHOT"]
[lein-npm "0.4.0"]]
:dependencies [[org.clojure/clojurescript "0.0-2511"]
[com.facebook/react "0.11.1"]
[quiescent "0... | null | https://raw.githubusercontent.com/piranha/showkr/f40786ca145390c103e452cdef0ee57e2de95b79/project.clj | clojure | (defproject showkr "0.1.0-SNAPSHOT"
:description "Showkr"
:url "/"
:plugins [[lein-cljsbuild "1.0.3"]
[lein-figwheel "0.2.0-SNAPSHOT"]
[lein-npm "0.4.0"]]
:dependencies [[org.clojure/clojurescript "0.0-2511"]
[com.facebook/react "0.11.1"]
[quiescent "0... | |
ddb6c6665d5c18231603921743dd65e58b8097d25476a8b0e641605574185a79 | Soostone/katip | Main.hs | # LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -fno - warn - orphans #
module Main
( main,
)
where
-------------------------------------------------------------------------------
import Control.DeepSeq
import Control.Monad
import Criterion.... | null | https://raw.githubusercontent.com/Soostone/katip/d868c431b435dc7e11a3888e2b333653514c1cd8/katip-elasticsearch/bench/Main.hs | haskell | # LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-------------------------------------------------------... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -fno - warn - orphans #
module Main
( main,
)
where
import Control.DeepSeq
import Control.Monad
import Criterion.Main
import Data.Aeson
import qualified Data.HashMap.Strict as HM
import Data.Proxy (Proxy (..))
import qualified D... |
d3574c16b4b286bb4683165dc512cdc8a1bf22a3218ea69451de1dcaa01ee68e | SquidDev/illuaminate | lint_spacing.mli | * Checks for whitespace around basic punctuation such as " , " , " ; " , " = " and all binary operators .
Note that this is rather un - configurable right now , as it is either " on " or " off " . Ideally this
would be more configurable in the future .
{ 1 TODO : Future improvements }
- Ensur... | null | https://raw.githubusercontent.com/SquidDev/illuaminate/da18b101b4710881b71c42554d70a3a7d17c3cd6/src/lint/lint_spacing.mli | ocaml | * Checks for whitespace around basic punctuation such as " , " , " ; " , " = " and all binary operators .
Note that this is rather un - configurable right now , as it is either " on " or " off " . Ideally this
would be more configurable in the future .
{ 1 TODO : Future improvements }
- Ensur... | |
dbec950a614d50ceaadc3594e7b4e0a2a75f74bc533f58e8d548af443f4030ae | Ericson2314/lighthouse | Screen.hs | -- STILL NEEDS SOME CONVERSION WORK TO MATCH PAPER
module Kernel.Driver.IA32.Screen
( launchConsoleDriver
) where
import Control.Monad ( when )
import Data.Char ( ord )
import Data.Word
import Data.Bits
import Kernel.Types.Console
import H.Monad(H)
import H.Concurrency(forkH,newChan,readChan,newMVar,newLock)... | null | https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/kernel/Kernel/Driver/IA32/Screen.hs | haskell | STILL NEEDS SOME CONVERSION WORK TO MATCH PAPER
From:
Put low bytes then
scrollUp :: H ()
source
byte count |
module Kernel.Driver.IA32.Screen
( launchConsoleDriver
) where
import Control.Monad ( when )
import Data.Char ( ord )
import Data.Word
import Data.Bits
import Kernel.Types.Console
import H.Monad(H)
import H.Concurrency(forkH,newChan,readChan,newMVar,newLock)
import H.IOPorts
import H.AdHocMem(absolutePtr)
im... |
c5aff62261ab24e4f547041522f9868fef197d3fb937e4f2087bcbc2bc507ebf | emqx/emqx | emqx_exhook_api_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. 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 o... | null | https://raw.githubusercontent.com/emqx/emqx/a26c05f4f6d332364aa4195818ee0d6d95dadbbe/apps/emqx_exhook/test/emqx_exhook_api_SUITE.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 ... | Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_exhook_api_SUITE).
-compile(export_all).
-compile(nowarn_export_all).
-include_li... |
27984dbc4829f5ff90bf17f8b4cb50d2c7a525fdd2860f63544ecf592fdce1e4 | clojang/clojang | dev.clj | (ns clojang.dev
"A development namespace that imports other useful namespaces for easy
prototyping, &c. The intended use is for this to be the initial namespace
when running ``lein repl`` from the Clojang project directory."
(:require [clojang.agent.startup :as startup]
[clojang.caller :refer [call ... | null | https://raw.githubusercontent.com/clojang/clojang/d248e22f3ba2488fd1f16f7bb99bdd63d324d3e6/dev-resources/src/clojang/dev.clj | clojure | (ns clojang.dev
"A development namespace that imports other useful namespaces for easy
prototyping, &c. The intended use is for this to be the initial namespace
when running ``lein repl`` from the Clojang project directory."
(:require [clojang.agent.startup :as startup]
[clojang.caller :refer [call ... | |
b79a714f6e600ae0252c2360b94abadacbd317908618002fbe37a6dc2bf3ac2b | cmsc430/www | translate.rkt | #lang racket
(provide translate)
(require "ast.rkt")
type =
;; | (Eof)
| ( Int Integer )
| ( )
| ( )
| ( )
| ( Prim1 )
| ( Prim2 Op2 )
| ( If )
| ( Begin IExpr IExpr )
| ( Let ' _ )
| ( )
type Addr = Natural
type LEnv = ( I d )
;; Expr -> IExpr
(define (translate e)
(tr... | null | https://raw.githubusercontent.com/cmsc430/www/0809867532b8ef516029ac38093a145db5b424ea/langs/fraud/translate.rkt | racket | | (Eof)
Expr -> IExpr
Expr LEnv -> IExpr
Id LEnv -> Addr | #lang racket
(provide translate)
(require "ast.rkt")
type =
| ( Int Integer )
| ( )
| ( )
| ( )
| ( Prim1 )
| ( Prim2 Op2 )
| ( If )
| ( Begin IExpr IExpr )
| ( Let ' _ )
| ( )
type Addr = Natural
type LEnv = ( I d )
(define (translate e)
(translate-e e '()))
(define (... |
d667039c6ba308c2b4dfdc392aebf65894a2c94d3c83e3eb096fdf688b89713e | databrary/databrary | Routes.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
| This module describes the routes served by .
--
-- It is a tale of systems that evolve over time. Writi... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Routes.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
It is a tale of systems that evolve over time. Writing these words on
routes are still served by the original system, web-inv-routes; and ~30 are
served by Wai.Route as a temporary stopgap.
This module glues the API description to a particular service impleme... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
| This module describes the routes served by .
2018 - 05 - 23 , I am beginning to serve routes with Servant . Meanwhile , ~90
module Routes
(
routeMapWai
, ro... |
85d4eb680f76965777ca0fe096a5665fdece2cb5cd091ac140c47982f000bae5 | ejgallego/coq-serapi | ser_environ.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ejgallego/coq-serapi/61d2a5c092c1918312b8a92f43a374639d1786f9/serlib/ser_environ.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Copyright 2016 MINES ParisT... |
5618d2e8701fd988dd953527cd310f23942195edd622186a9a3ebcbe15e64f62 | gregr/experiments | 01-eval.rkt | #lang racket
(define env-empty '())
(define (env-lookup-default env name default)
(match env
(`((,n ,val) . ,env)
(if (eq? n name)
val ;; Reference binding
Traverse environment
('() (default))))
(define (env-lookup env name) (env-lookup-default env name (l... | null | https://raw.githubusercontent.com/gregr/experiments/cd4c7953f45102539081077bbd6195cf834ba2fa/stlc/01-eval.rkt | racket | Reference binding
Close over environment
Apply closure
Symbolic application
(cons A nil) ==> (lambda (c n) (c A n))
(cons B (cons A nil)) ==> (lambda (c n) (c B (c A n)))
c = (lambda (a b) (f b)) ==> church numerals
c = (lambda (a b) a) ==> car
c = (lambda (a b) b) ==> n
cdr == subtraction
n == our initial... | #lang racket
(define env-empty '())
(define (env-lookup-default env name default)
(match env
(`((,n ,val) . ,env)
(if (eq? n name)
Traverse environment
('() (default))))
(define (env-lookup env name) (env-lookup-default env name (lambda () name)))
(define (env-lookup-fail env name)
(env-lookup-def... |
835ab600d782d070eb198c1f39f5a02cb3e7c4e7e8576fb6450e710d781203ca | xapi-project/xen-api | http_svr.mli |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/c7eea2c95322ecf8253dd77b1d6a237c1cef41e7/ocaml/libs/http-svr/http_svr.mli | ocaml | * A very very simple HTTP server
* A URI path used to index handlers
* A handler is a function which takes a request and produces a response
* Statistics recorded per-handler
* Total number of requests processed
* Total number of connections accepted
* using the more efficient framed protocol
* Represents an HTT... |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking describe... |
4744d1443c1a4007a7b6982a546c1080eb25e412dc7ebe2c5a2b4ac3ecb8cf36 | ocurrent/ocaml-docs-ci | voodoo.mli | type t
val v : Config.t -> t Current.t
val cache : Obuilder_spec.Cache.t list
val digest : t -> string
module Prep : sig
type voodoo = t
type t
val spec : base:Spec.t -> t -> Spec.t
val v : voodoo -> t
val digest : t -> string
val commit : t -> Current_git.Commit_id.t
end
module Do : sig
type voodoo =... | null | https://raw.githubusercontent.com/ocurrent/ocaml-docs-ci/cb5d4a54a7fd9883aec066b4bd1fcb50ca42e7bc/src/lib/voodoo.mli | ocaml | type t
val v : Config.t -> t Current.t
val cache : Obuilder_spec.Cache.t list
val digest : t -> string
module Prep : sig
type voodoo = t
type t
val spec : base:Spec.t -> t -> Spec.t
val v : voodoo -> t
val digest : t -> string
val commit : t -> Current_git.Commit_id.t
end
module Do : sig
type voodoo =... | |
4374c94e7f9fdd1b3335e3a93e87a86dfb9f4b0c9711ec7df8ab2e3519b1b93c | jimrthy/frereth | session_socket.cljs | (ns frereth.apps.shared.session-socket
"Wires all the session/socket/worker pieces together"
(:require
[cljs.core.async :as async]
[clojure.spec.alpha :as s]
[frereth.apps.shared.window-manager :as window-manager]
[frereth.apps.shared.lamport :as lamport]
[frereth.apps.shared.serialization :as serial... | null | https://raw.githubusercontent.com/jimrthy/frereth/e1c4a5c031355ff1ff3bb60741eb03dff2377e1d/apps/racing/roadblocks/src/cljs/frereth/apps/shared/session_socket.cljs | clojure |
Q: Is this worth keeping after creation?
Q: Why is this referenced in here?
This is a bit redundant.
The ::worker/manager consists
::worker/workers.
Then again, we should probably
treat it as a black box here.
The duplication is really just
an implementation detail.
Implementation
Most of these should prob... | (ns frereth.apps.shared.session-socket
"Wires all the session/socket/worker pieces together"
(:require
[cljs.core.async :as async]
[clojure.spec.alpha :as s]
[frereth.apps.shared.window-manager :as window-manager]
[frereth.apps.shared.lamport :as lamport]
[frereth.apps.shared.serialization :as serial... |
0805820db58621f80271a6b104292568e1f3d175fee5ecbe8b5bd65ff6b2224f | brunjlar/protop | Setoids.hs | {-# Language TypeFamilies #-}
{-# Language FlexibleInstances #-}
{-# Language FlexibleContexts #-}
{-# Language GADTs #-}
{-# Language ScopedTypeVariables #-}
{-# Language ConstraintKinds #-}
{-# Language StandaloneDeriving #-}
{-# Language TypeOperators #-}
-- | This module defines /setoids/, which are types with an ... | null | https://raw.githubusercontent.com/brunjlar/protop/9f520aeb4dd9baf9ebed8751584e33e3a3e23df6/src/Protop/Core/Setoids.hs | haskell | # Language TypeFamilies #
# Language FlexibleInstances #
# Language FlexibleContexts #
# Language GADTs #
# Language ScopedTypeVariables #
# Language ConstraintKinds #
# Language StandaloneDeriving #
# Language TypeOperators #
| This module defines /setoids/, which are types with an associated
"explicit equality".
w... |
module Protop.Core.Setoids
( IsSetoid(..)
, Functoid(..)
, onPoints, onProofs
, setId
, setComp
, setPr1
, setPr2
, setProd
, Star
, star
, setT
, setZero
, setSucc
, setRec
, setCurry
, setUncurry
, SetEql(..)
, setInj
) where
import Control... |
fae309dbd22e0e03d5f66518f52e022153c793da8f672842591c2ff88f57fc9e | tek/ribosome | MenuUiWindow.hs | module Ribosome.Menu.Interpreter.MenuUiWindow where
import Conc (Consume, Gate, Gates, interpretAtomic, interpretEventsChan, interpretScopedRWith, withAsyncGated_)
import Control.Lens.Regex.Text (group, match, regex)
import qualified Data.Text as Text
import Exon (exon)
import qualified Log
import Polysemy.Conc.Gate (... | null | https://raw.githubusercontent.com/tek/ribosome/b2a57703dc0df5ff4c5e25a51b283a2b17f03f41/packages/menu/lib/Ribosome/Menu/Interpreter/MenuUiWindow.hs | haskell | @<esc>@.
| module Ribosome.Menu.Interpreter.MenuUiWindow where
import Conc (Consume, Gate, Gates, interpretAtomic, interpretEventsChan, interpretScopedRWith, withAsyncGated_)
import Control.Lens.Regex.Text (group, match, regex)
import qualified Data.Text as Text
import Exon (exon)
import qualified Log
import Polysemy.Conc.Gate (... |
788a15e3b168d22c570f6bf86e77edb48d503f4214b7391f5b2203953a358504 | ninenines/cowboy | ws_echo_timer.erl | %% Feel free to use, reuse and abuse the code in this file.
-module(ws_echo_timer).
-export([init/2]).
-export([websocket_init/1]).
-export([websocket_handle/2]).
-export([websocket_info/2]).
init(Req, _) ->
{cowboy_websocket, Req, undefined}.
websocket_init(State) ->
erlang:start_timer(1000, self(), <<"websocket... | null | https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/test/ws_SUITE_data/ws_echo_timer.erl | erlang | Feel free to use, reuse and abuse the code in this file. |
-module(ws_echo_timer).
-export([init/2]).
-export([websocket_init/1]).
-export([websocket_handle/2]).
-export([websocket_info/2]).
init(Req, _) ->
{cowboy_websocket, Req, undefined}.
websocket_init(State) ->
erlang:start_timer(1000, self(), <<"websocket_init">>),
{[], State}.
websocket_handle({text, Data}, Sta... |
34458bc4adc8420b3e7c558a41a2342f73d7168ab1b5e2ee30fdc34787258743 | gonzojive/elephant | package.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;
src / db - clsql / package.lisp - imports for the CLSQL data store
;;;
Initial version 10/12/2005 by
;;; <>
;;;
;;; part of
;;;
Elephant : an object - oriented database for Common Lisp
;;;
Copyright ( c ) 2005 by
;;;
;;; Elephant user... | null | https://raw.githubusercontent.com/gonzojive/elephant/b29a012ab75ccea2fc7fc4f1e9d5e821f0bd60bf/src/contrib/rread/db-clsql/package.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
<>
part of
Elephant users are granted the rights to distribute and use this software
(), also known as the LLGPL.
| src / db - clsql / package.lisp - imports for the CLSQL data store
Initial version 10/12/2005 by
Elephant : an object - oriented database for Common Lisp
Copyright ( c ) 2005 by
as governed by the terms of the Lisp Lesser GNU Public License
(in-package :elephant)
(defpackage db-clsql
(:use :common-l... |
54e5ea6c9c40c6f56c2b8f70b3772791feb6ac7acf3ab0b635992993bfa960b8 | waymonad/waymonad | Navigation2D.hs |
waymonad A wayland compositor in the spirit of xmonad
Copyright ( C ) 2018
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 2.1 of the License , or ( at your op... | null | https://raw.githubusercontent.com/waymonad/waymonad/18ab493710dd54c330fb4d122ed35bc3a59585df/src/Waymonad/Navigation2D.hs | haskell | # LANGUAGE OverloadedStrings # |
waymonad A wayland compositor in the spirit of xmonad
Copyright ( C ) 2018
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 2.1 of the License , or ( at your op... |
f6cee7ca096900f70ed12196c05b02f04e8e74322c81962a1c6204572ec35213 | BardurArantsson/cqrs | EventStoreTest.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
module Data.CQRS.Test.Internal.EventStoreTest
( mkEventStoreSpec
) where
import Control.Exception.Lifted (try)
import Control.Monad (forM_)
import Control.Monad.IO.Class (liftIO)
import Data.ByteString (Byt... | null | https://raw.githubusercontent.com/BardurArantsson/cqrs/2491d83e2bcd68c883aaea33cdce6c5ea8c0cd1a/cqrs-testkit/src/Data/CQRS/Test/Internal/EventStoreTest.hs | haskell | # LANGUAGE OverloadedStrings #
Ambient data for test scope for each spec.
Store given events in exactly the order given.
Read all events for a given aggregate.
Retrieve the stored events.
Assert that we've retrieved the expected events in order.
Make sure we didn't actually store any events
Write a single event
... | # LANGUAGE FlexibleContexts #
module Data.CQRS.Test.Internal.EventStoreTest
( mkEventStoreSpec
) where
import Control.Exception.Lifted (try)
import Control.Monad (forM_)
import Control.Monad.IO.Class (liftIO)
import Data.ByteString (ByteString)
import Data.CQRS... |
2c8efb2c28f875b2d49ebd0f1f25a885ee0395d6c90896dd0459ba7310bc1e5d | TrustInSoft/tis-kernel | pdg_state.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/pdg/pdg_state.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
de977a6a3fbb6000afce380dea245cdb23fb5d263dfd5d7a43701415ff0aa8d4 | Simre1/haskell-game | Input.hs | | User input functions covering much of the GLFW _ _ Input guide _ _ :
-- <>.
--
Actions are in the ' . ' monad when a window handle is required ,
otherwise they are bare reexported IO actions which can be lifted into the ' GPipe . ' monad .
The ' Window ' taken by many of these functions is the window reso... | null | https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/GPipe-GLFW/GPipe-GLFW/src/Graphics/GPipe/Context/GLFW/Input.hs | haskell | <>.
* Event processing
| Learn more: #events
* `glfwPollEvents`
* `glfwWaitEvents`
GLFW Events are processed after each buffer swap by default. To change
event processing construct a 'HandleConfig' for 'runContextT'. For greater
* Keyboard input
| Learn more: #input_keyboard
** Key input
** Text i... | | User input functions covering much of the GLFW _ _ Input guide _ _ :
Actions are in the ' . ' monad when a window handle is required ,
otherwise they are bare reexported IO actions which can be lifted into the ' GPipe . ' monad .
The ' Window ' taken by many of these functions is the window resource from ... |
4d8bea6affa51738692bf714a7816b249eb605cfd48d6a4061776c058e2156cc | ayato-p/intro-web-clojure | response.clj | (ns todo-clj.util.response
(:require [potemkin :as p]
[ring.util.http-response :as res]))
(defmacro import-ns [ns-sym]
(do
`(p/import-vars
[~ns-sym
~@(map first (ns-publics ns-sym))])))
(import-ns ring.util.http-response)
(defn html [res]
(res/content-type res "text/html; charset=u... | null | https://raw.githubusercontent.com/ayato-p/intro-web-clojure/3567218b62d6d9445c7ca8e5cc3ced5133a8166c/todo-clj/src/todo_clj/util/response.clj | clojure | (ns todo-clj.util.response
(:require [potemkin :as p]
[ring.util.http-response :as res]))
(defmacro import-ns [ns-sym]
(do
`(p/import-vars
[~ns-sym
~@(map first (ns-publics ns-sym))])))
(import-ns ring.util.http-response)
(defn html [res]
(res/content-type res "text/html; charset=u... | |
7d84af0cd399a5429613764ae5ac113029ad2169e7d15980af335c38eef384ec | eschulte/software-evolution | lisp-ext.lisp | ;;; lisp-exe.lisp --- software rep of Lisp code (external eval)
Copyright ( C ) 2011
;;; License:
;; 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 , or ( at your optio... | null | https://raw.githubusercontent.com/eschulte/software-evolution/dbf5900d1eef834b93eeb00eca34eb7c80e701b6/software/lisp-ext.lisp | lisp | lisp-exe.lisp --- software rep of Lisp code (external eval)
License:
This program is free software; you can redistribute it and/or modify
either version 3 , or ( at your option )
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied... |
Copyright ( C ) 2011
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Free Software Foundation , Inc. , 51 Franklin Street , Fifth Floor ,
Boston , , USA .
(in-package :software-evolution)
(defclass lisp-exe ... |
6007ff833d3d3017e396ccb7f68f7a908a38014a7911dbead266983fa0c101a2 | chenyukang/eopl | 05.scm | (load-relative "../libs/init.scm")
(load-relative "./base/test.scm")
(load-relative "./base/equal-type.scm")
(load-relative "./base/data-structures.scm")
(load-relative "./base/cases.scm")
(load-relative "./base/simplemodule-lang.scm")
(define-datatype environment environment?
(empty-env)
(extend-env
(bvar symb... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch8/05.scm | scheme | new stuff
new stuff
new expression:
new types
no changes in grammar below here
sllgen boilerplate ;;;;;;;;;;;;;;;;
lookup-module-name-in-env : Sym * Env -> Typed-Module
value-of-module-body : ModuleBody * Env -> TypedModule
interface-of : ModuleBody * Tenv -> Iface | (load-relative "../libs/init.scm")
(load-relative "./base/test.scm")
(load-relative "./base/equal-type.scm")
(load-relative "./base/data-structures.scm")
(load-relative "./base/cases.scm")
(load-relative "./base/simplemodule-lang.scm")
(define-datatype environment environment?
(empty-env)
(extend-env
(bvar symb... |
b26830740356ef7246a4c8482c6625b221623bba310ed6c7639ab3f88e7e7a47 | hasura/graphql-data-specification | SelectGroup.hs | module Schema.Model.Operation.SelectGroup
( definition,
)
where
import DDL qualified
import Language.GraphQL.Draft.Syntax qualified as GraphQL
import Schema.Context
import Schema.Model.ListArguments qualified as ListArguments
import Schema.NamingConvention
definition ::
GraphQL.Name ->
DDL.ModelDTO ->
Gener... | null | https://raw.githubusercontent.com/hasura/graphql-data-specification/b82b899a7d015c810a571d31322619aff2154b81/tooling/lib/Schema/Model/Operation/SelectGroup.hs | haskell | module Schema.Model.Operation.SelectGroup
( definition,
)
where
import DDL qualified
import Language.GraphQL.Draft.Syntax qualified as GraphQL
import Schema.Context
import Schema.Model.ListArguments qualified as ListArguments
import Schema.NamingConvention
definition ::
GraphQL.Name ->
DDL.ModelDTO ->
Gener... | |
6db312d1dbee2bc427baaff17f2aa55cd671e48c125a03d0e64d268ecb3657c1 | plumatic/plumbing | graph_test.cljc | (ns plumbing.graph-test
(:require
[plumbing.core :as plumbing :include-macros true]
[plumbing.graph :as graph :include-macros true]
[clojure.walk :as walk]
[schema.core :as s]
[schema.test :as schema-test]
[plumbing.fnk.pfnk :as pfnk]
#?@(:clj [[plumbing.fnk.impl :as fnk-impl]
[plumb... | null | https://raw.githubusercontent.com/plumatic/plumbing/e0fbe3dbe47a7d52e7bfbf2e94edffbed5351308/test/plumbing/graph_test.cljc | clojure |
Ordinary fnks.
Nested graphs.
input schema
output schema
Graphs modified at runtime
eager-compile outputs records rather than ordinary maps as outputs.
graphs equal or smaller than positional/max-graph-size, eager-compile returns records
above positional/max-graph-size, eager-compile returns ordinary maps
tes... | (ns plumbing.graph-test
(:require
[plumbing.core :as plumbing :include-macros true]
[plumbing.graph :as graph :include-macros true]
[clojure.walk :as walk]
[schema.core :as s]
[schema.test :as schema-test]
[plumbing.fnk.pfnk :as pfnk]
#?@(:clj [[plumbing.fnk.impl :as fnk-impl]
[plumb... |
007047ac5ef203fb847e2e3e6e7f909fff42ae8a78d3c5312f763c7185f318cf | janestreet/ppx_type_directed_value | type_directed_equal.ml | open Core
open Ppx_type_directed_value_runtime
(* $MDX part-begin=equals_sig *)
type 'a t = 'a -> 'a -> bool
type 'a attribute =
| CustomCmp of ('a -> 'a -> bool)
| Ignore
module T = struct
type nonrec 'a t = 'a t
type nonrec 'a attribute = 'a attribute
end
(* $MDX part-end *)
let apply_iso instanc... | null | https://raw.githubusercontent.com/janestreet/ppx_type_directed_value/f85693cc6d0ad8a9bc3bad55fed22a3d78e1fcaf/examples/type_directed_equal.ml | ocaml | $MDX part-begin=equals_sig
$MDX part-end
$MDX part-end | open Core
open Ppx_type_directed_value_runtime
type 'a t = 'a -> 'a -> bool
type 'a attribute =
| CustomCmp of ('a -> 'a -> bool)
| Ignore
module T = struct
type nonrec 'a t = 'a t
type nonrec 'a attribute = 'a attribute
end
let apply_iso instance _forward backward x y = instance (backward x) (back... |
128705e2356ad13d3a2f21d247caa47a7d029a7eec6219717415e8427399c35c | dakrone/denverclojure | core.clj | (ns denverclojure.core
(:require [clojure.java.io :refer [resource]]
[noir.core :refer :all]
[noir.options :as options]
[hiccup.core :refer :all]
[hiccup.page :refer :all]
[hiccup.form :refer :all]
[hiccup.element :refer :all]
[cheshi... | null | https://raw.githubusercontent.com/dakrone/denverclojure/e81b0bdef910addc61e9ce8211a9f6749ac04814/src/denverclojure/core.clj | clojure | (ns denverclojure.core
(:require [clojure.java.io :refer [resource]]
[noir.core :refer :all]
[noir.options :as options]
[hiccup.core :refer :all]
[hiccup.page :refer :all]
[hiccup.form :refer :all]
[hiccup.element :refer :all]
[cheshi... | |
9bfdd6b04f38e3c354407ea5282c7784ae1d1a4e85780ddbb4a1bd72604af702 | relevance/labrepl | unified_update_model.clj | (ns ^{:next "Zero Sum" :next-url "/labs/zero-sum"
:prev "Mini Browser" :prev-url "/labs/mini-browser"}
labs.unified-update-model
(:refer-clojure :exclude [get])
(:use [labrepl.util :only (c repl-code showme repl-showme code source)]
[solutions.fight :only (google-search-base
... | null | https://raw.githubusercontent.com/relevance/labrepl/51909dcb3eeb9f148eeae109316f7d73cc81512a/src/labs/unified_update_model.clj | clojure | (ns ^{:next "Zero Sum" :next-url "/labs/zero-sum"
:prev "Mini Browser" :prev-url "/labs/mini-browser"}
labs.unified-update-model
(:refer-clojure :exclude [get])
(:use [labrepl.util :only (c repl-code showme repl-showme code source)]
[solutions.fight :only (google-search-base
... | |
3af96a154244fb03dcca98aa3ac7345483c12804b72dadd511f1f0ac03358227 | rurban/clisp | spanish.lisp | Spanish translations of DEFINTERNATIONALed values .
,
(in-package "I18N")
(common-lisp:export 'ESPAÑOL)
(common-lisp:import 'ESPAÑOL "EXT")
(common-lisp:export 'ESPAÑOL "EXT")
(common-lisp:in-package "SYSTEM")
(deflanguage ESPAÑOL)
(deflocalized y-or-n ESPAÑOL '((#\N) . (#\S #\Y)))
(deflocalized yes-or-no E... | null | https://raw.githubusercontent.com/rurban/clisp/75ed2995ff8f5364bcc18727cde9438cca4e7c2c/src/spanish.lisp | lisp | Spanish translations of DEFINTERNATIONALed values .
,
(in-package "I18N")
(common-lisp:export 'ESPAÑOL)
(common-lisp:import 'ESPAÑOL "EXT")
(common-lisp:export 'ESPAÑOL "EXT")
(common-lisp:in-package "SYSTEM")
(deflanguage ESPAÑOL)
(deflocalized y-or-n ESPAÑOL '((#\N) . (#\S #\Y)))
(deflocalized yes-or-no E... | |
f90e937b4fc8b052a3ad73749f29505a2cd0048a8f93ae175110f397e2afa135 | modular-macros/ocaml-macros | core_array_reduced_ok.ml | type sexp = A of string | L of sexp list
type 'a t = 'a array
let _ = fun (_ : 'a t) -> ()
let array_of_sexp _ _ = [| |]
let sexp_of_array _ _ = A "foo"
let sexp_of_int _ = A "42"
let int_of_sexp _ = 42
let t_of_sexp : 'a . (sexp -> 'a) -> sexp -> 'a t=
let _tp_loc = "core_array.ml.t" in
fun _of_a -> fun t -> ... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/typing-misc-bugs/core_array_reduced_ok.ml | ocaml | type sexp = A of string | L of sexp list
type 'a t = 'a array
let _ = fun (_ : 'a t) -> ()
let array_of_sexp _ _ = [| |]
let sexp_of_array _ _ = A "foo"
let sexp_of_int _ = A "42"
let int_of_sexp _ = 42
let t_of_sexp : 'a . (sexp -> 'a) -> sexp -> 'a t=
let _tp_loc = "core_array.ml.t" in
fun _of_a -> fun t -> ... | |
ea475b1b82e2154abd408628fdf649a93306d5a2bfb0c15e8b31905b531635e1 | pa-ba/compdata | HaskellStrict.hs | # LANGUAGE CPP #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
{-# LANGUAGE TypeOperators #-}
--------------------------------------------------------------------------------
-- |
Module : Data . Comp . Derive . HaskellStrict
Copyright : ... | null | https://raw.githubusercontent.com/pa-ba/compdata/5783d0e11129097e045cabba61643114b154e3f2/src/Data/Comp/Derive/HaskellStrict.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE TypeOperators #
------------------------------------------------------------------------------
|
License : BSD3
Stability : experimental
Automatically derive instances of @HaskellStrict@.
--------------------------------------------------------------------------... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
Module : Data . Comp . Derive . HaskellStrict
Copyright : ( c ) 2011
Maintainer : < >
Portability : non - portable ( GHC Extensions )
module Data.Comp.Derive.HaskellStrict
(
makeHaskellS... |
4a67990b08467f8f8c9074db2cd8f79fa7d5e70e230e75f4c0d0e7bae3162056 | ghcjs/ghcjs-dom | WebKitAnimationEvent.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.WebKitAnimationEvent
(js_newWebKitAnimationEvent, newWebKitAnimationEvent,
js_g... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/WebKitAnimationEvent.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.WebKitAnimationEvent
(js_newWebKitAnimationEvent, newWebKitAnimationEvent,
js_getAnimationName, getAnimationName, js_getElapsedTime,
getElapsedTime, WebKitAnimationEvent(... |
1816f8803add436835df97bcec61b3ccc25d2c193f24453b50a297d945ab27a9 | reborg/clojure-essential-reference | 5.clj | < 1 >
(meta *ns*)
;; {:doc "The default user namespace"} | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/OtherFunctions/VarsandNamespaces/meta%2Cwith-meta%2Cvary-meta%2Calter-meta!andreset-meta!/5.clj | clojure | {:doc "The default user namespace"} | < 1 >
(meta *ns*) |
252a172d95e30bed7e12cdd2d02313b7322e3d87ae325e7d82203718392f6f15 | cmsc430/www | 1.rkt | #lang racket
1
| null | https://raw.githubusercontent.com/cmsc430/www/0809867532b8ef516029ac38093a145db5b424ea/langs/test-programs/abscond/1.rkt | racket | #lang racket
1
| |
be159c299e046468f8c3682a40217347f1abbb29bc0165af440c962271dc0b99 | Vonmo/eapa | eapa_int_performance_SUITE.erl | -module(eapa_int_performance_SUITE).
-compile(export_all).
-import(ct_helper, [config/2]).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
all() ->
[
{group, perf}
].
groups() ->
[
{perf,
[shuffle],
[with_val, to_float, add, sub, mul, divp]}
].
%% ===... | null | https://raw.githubusercontent.com/Vonmo/eapa/7c577851e3598c8c524999b89c89f9267e769e24/test/eapa_int_performance_SUITE.erl | erlang | =============================================================================
init
=============================================================================
=============================================================================
end
=======================================================================... | -module(eapa_int_performance_SUITE).
-compile(export_all).
-import(ct_helper, [config/2]).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
all() ->
[
{group, perf}
].
groups() ->
[
{perf,
[shuffle],
[with_val, to_float, add, sub, mul, divp]}
].
init_p... |
39ed0b91d76f7b52103c0997b25db7937aecca6dd8456cd4b26448094dcd2415 | jeffshrager/biobike | clos-utils.lisp | -*- Package : utils ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
(in-package :utils)
;;; +=========================================================================+
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
;;; | |
;;... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Utils/clos-utils.lisp | lisp | mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and as... |
(in-package :utils)
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do so , subject to ... |
8a2b0497722d9c69543d91ab55f5d91d7a3ae10fa2753ba00c81f2fcf2377808 | jixiuf/helloerlang | test.erl | %%%-------------------------------------------------------------------
@author 纪秀峰 < >
%%% @doc
%%%
%%% @end
Created : 2013 - 01 - 06 14:07 by 纪秀峰 < >
Last Updated : 纪秀峰 2013 - 01 - 06 14:17:40 星期日
%%%-------------------------------------------------------------------
-module(test).
-export([test/1,test_mochig... | null | https://raw.githubusercontent.com/jixiuf/helloerlang/3960eb4237b026f98edf35d6064539259a816d58/mochiglobal_ets_benchmark/src/test.erl | erlang | -------------------------------------------------------------------
@doc
@end
------------------------------------------------------------------- | @author 纪秀峰 < >
Created : 2013 - 01 - 06 14:07 by 纪秀峰 < >
Last Updated : 纪秀峰 2013 - 01 - 06 14:17:40 星期日
-module(test).
-export([test/1,test_mochiglobal/1,test_ets/1]).
test(N)->
test_ets(N),
test_mochiglobal(N)
.
test_ets(N)->
ets:new(ets_tab,[named_table,set,{read_concurrency,true}]),
et... |
bd0a6525d64be97aabd0a07906cf4780984c3fbfb806bf8d653cdbb7b5e24071 | flipstone/orville | MigrateTest.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE CPP #
module Migrations.MigrateTest where
#if MIN_VERSION_GLASGOW_HASKELL(8,0,0,0) && MIN_VERSION_base(4,5,0)
import GHC.Stack (HasCallStack)
#endif
import qualified Database.Orville.PostgreSQL as O
import Data.Int (Int32, Int64)
import qualified Data.List as List
import Test.T... | null | https://raw.githubusercontent.com/flipstone/orville/aee8d7a47ab3a7b442fdb274dbb5a95d687a23ce/orville-postgresql/test/Migrations/MigrateTest.hs | haskell | # LANGUAGE RankNTypes #
Test postgreSQL reserved words can be used as column names
given a column name, test the correct migrations are generated for it. | # LANGUAGE CPP #
module Migrations.MigrateTest where
#if MIN_VERSION_GLASGOW_HASKELL(8,0,0,0) && MIN_VERSION_base(4,5,0)
import GHC.Stack (HasCallStack)
#endif
import qualified Database.Orville.PostgreSQL as O
import Data.Int (Int32, Int64)
import qualified Data.List as List
import Test.Tasty (TestTree, testGroup)
i... |
5e214c2f6c246e1d2bc8c071478d1fae71fe98e27483f1fd2628622ef981b2f5 | ocurrent/current_incr | queue.ml | (* A queue implemented as a circular double-linked list:
- The root of type ['a t] is represented by a node holding no value.
- The [prev]/[next] pointers forms a loop, with the root acting as a sentinel. *)
type 'a value =
| Root
| Value of 'a
type 'a elt = {
value: 'a value;
mutable prev: 'a elt;
mu... | null | https://raw.githubusercontent.com/ocurrent/current_incr/ff628b182d1381d40f0cd8d070efcbb7dfd2b0bd/lib_incr/queue.ml | ocaml | A queue implemented as a circular double-linked list:
- The root of type ['a t] is represented by a node holding no value.
- The [prev]/[next] pointers forms a loop, with the root acting as a sentinel.
Such that its value = Root |
type 'a value =
| Root
| Value of 'a
type 'a elt = {
value: 'a value;
mutable prev: 'a elt;
mutable next: 'a elt;
}
let is_root q = q.value = Root
let create () =
let rec root = { value = Root; prev = root; next = root } in
root
let add x q =
assert (is_root q);
let elt = { value = Value x; prev... |
2d62eedcc62bc0709114486addc4b38bc609b3fe017649094ac75d314ac0e4fc | replikativ/replikativ | js.cljs | (ns replikativ.js
"Experimental JavaScript API."
(:require [replikativ.peer :as peer]
[replikativ.stage :as stage]
[replikativ.crdt.lwwr.stage :as lwwr-stage]
[replikativ.crdt.ormap.stage :as ormap-stage]
[goog.net.WebSocket]
[goog.Uri]
[goog.e... | null | https://raw.githubusercontent.com/replikativ/replikativ/1533a7e43e46bfb70e8c8eb34dc5708e611a478d/src/replikativ/js.cljs | clojure | TODO: check params if binary | (ns replikativ.js
"Experimental JavaScript API."
(:require [replikativ.peer :as peer]
[replikativ.stage :as stage]
[replikativ.crdt.lwwr.stage :as lwwr-stage]
[replikativ.crdt.ormap.stage :as ormap-stage]
[goog.net.WebSocket]
[goog.Uri]
[goog.e... |
f765111abae833ac802fde39a60d36ebdcbc5e01e551a5fe858f45bfe5210b2b | binsec/haunted | normalize_instructions.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/static/ai/base/normalize_instructions.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
9d24a95c4fbf37bcf3416a99af41c548a858390f578a526ab50f67990779f8c8 | fukamachi/dexador | util.lisp | (in-package :cl-user)
(defpackage dexador.util
(:use :cl)
(:import-from :fast-io
:with-fast-output
:fast-write-byte
:fast-write-sequence)
(:import-from :quri
:uri-path
:uri-query
:uri-host
:uri-port
... | null | https://raw.githubusercontent.com/fukamachi/dexador/398241fe3f61f0546606712f2e9e40201dbee55a/src/util.lisp | lisp | (in-package :cl-user)
(defpackage dexador.util
(:use :cl)
(:import-from :fast-io
:with-fast-output
:fast-write-byte
:fast-write-sequence)
(:import-from :quri
:uri-path
:uri-query
:uri-host
:uri-port
... | |
9a6f60c2cb30795d7e3af76b521f6bad2ae475606c5c46183f3b12d486315a68 | yakaz/yamerl | ex_6.7_block_folding.erl | -module('ex_6.7_block_folding').
-include_lib("eunit/include/eunit.hrl").
-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").
single_test_() ->
?_assertMatch(
{yamerl_parser,
{file,?FILENAME},
[],
<<>>,
26,
true,
[],
0,
27,
7,
... | null | https://raw.githubusercontent.com/yakaz/yamerl/0032607a7b27fa2b548fc9a02d7ae6b53469c0c5/test/parsing/ex_6.7_block_folding.erl | erlang | -module('ex_6.7_block_folding').
-include_lib("eunit/include/eunit.hrl").
-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").
single_test_() ->
?_assertMatch(
{yamerl_parser,
{file,?FILENAME},
[],
<<>>,
26,
true,
[],
0,
27,
7,
... | |
b68053c4add4c395b0b8b1255544477e5b9c9efaffee6fb0e311cc69d2ab3e9b | erlang-ls/erlang_ls | diagnostics.erl | -module(diagnostics).
-include("diagnostics.hrl").
-include("broken_diagnostics.hrl").
-spec main(defined_type()) -> undefined_type().
main(X) ->
X.
| null | https://raw.githubusercontent.com/erlang-ls/erlang_ls/36bf0815e35db5d25a76e80f98f306f25fff7d8c/apps/els_lsp/priv/code_navigation/src/diagnostics.erl | erlang | -module(diagnostics).
-include("diagnostics.hrl").
-include("broken_diagnostics.hrl").
-spec main(defined_type()) -> undefined_type().
main(X) ->
X.
| |
cfcc33d16562849341d22202091a46c52b9403d8a9b16e83252ad95adf9c5b50 | acl2/acl2 | guard-theorem-no-simplify-dollar-tests.lisp | Standard System Library
;
Copyright ( C ) 2023 Kestrel Institute ( )
;
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "ACL2")
(include-book "guard-theorem-no-simp... | null | https://raw.githubusercontent.com/acl2/acl2/6fd484a7de945d1882c21fa68da6f48521012c7b/books/kestrel/std/system/guard-theorem-no-simplify-dollar-tests.lisp | lisp | Standard System Library
Copyright ( C ) 2023 Kestrel Institute ( )
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
Author : ( )
(in-package "ACL2")
(include-book "guard-theorem-no-simplify-dollar")
(include-book "std/testing/assert-equal" :dir :system)
(include-book "st... | |
17aa716c89ea68189cbe16bd34aeb47fcaceba88fe0441a169df85b642276dda | Opetushallitus/aipal | kysely_util.clj | Copyright ( c ) 2015 The Finnish National Board of Education - Opetushallitus
;;
This program is free software : Licensed under the EUPL , Version 1.1 or - as
soon as they will be approved by the European Commission - subsequent versions
of the EUPL ( the " Licence " ) ;
;;
;; You may not use this work except... | null | https://raw.githubusercontent.com/Opetushallitus/aipal/767bd14ec7153dc97fdf688443b9687cdb70082f/aipal/src/clj/aipal/arkisto/kysely_util.clj | clojure |
You may not use this work except in compliance with the Licence.
You may obtain a copy of the Licence at: /
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | Copyright ( c ) 2015 The Finnish National Board of Education - Opetushallitus
This program is free software : Licensed under the EUPL , Version 1.1 or - as
soon as they will be approved by the European Commission - subsequent versions
European Union Public Licence for more details .
(ns aipal.arkisto.kysely-... |
fbda6c5a2c7d6d92c67a702b1d01f84d4f133fd363aed74535afadc2f4ebe5b8 | Innf107/polaris | unique.mli | type t
val fresh : unit -> t
val equal : t -> t -> bool
Provided to allow storing Unique.t 's in a Map
val compare : t -> t -> int
val display : t -> string
| null | https://raw.githubusercontent.com/Innf107/polaris/d273b97fa607dd4c70a17a07abd230a921e3817c/src/unique.mli | ocaml | type t
val fresh : unit -> t
val equal : t -> t -> bool
Provided to allow storing Unique.t 's in a Map
val compare : t -> t -> int
val display : t -> string
| |
da014c99d03a085f331cedec3635fb5add1d93b7c8918b8b1233b103d501e9bd | clj-commons/rewrite-clj | coercer_test.cljc | (ns rewrite-clj.node.coercer-test
(:require [clojure.test :refer [deftest testing is are]]
[rewrite-clj.node :as node]
[rewrite-clj.node.protocols :as protocols]
[rewrite-clj.node.regex :as regex]
[rewrite-clj.parser :as p]))
(deftest t-sexpr->node->sexpr-roundtrip
(... | null | https://raw.githubusercontent.com/clj-commons/rewrite-clj/621fd5dbc0861807da9ff854bfc3df541f79446f/test/rewrite_clj/node/coercer_test.cljc | clojure | numbers
note that we do have an integer-node, but rewrite-clj never parses to it
so we never coerce to it either
symbol/keyword/string/...
date
we do not restore to original map (hash-map or array-map),
checking if we convert to any map is sufficient
sci, by design has its own var type, so skip this one for sci... | (ns rewrite-clj.node.coercer-test
(:require [clojure.test :refer [deftest testing is are]]
[rewrite-clj.node :as node]
[rewrite-clj.node.protocols :as protocols]
[rewrite-clj.node.regex :as regex]
[rewrite-clj.parser :as p]))
(deftest t-sexpr->node->sexpr-roundtrip
(... |
6e38b8856579b78669bc0db2ef6736489f27044def6748ac977ad85ea49526dc | hammerlab/prohlatype | setup_benchmarks.ml | (* Extract reads from a result that were particularly well aligned.
*
* These reads were used for the benchmarking test.
* *)
let j =
Post_analysis.of_json_file
"FILL ME/205673_1.json"
let j_bl = Post_analysis.reads_by_loci j
let j_bl_A = assoc_exn Nomenclature.A j_bl
let j_bl_B = assoc_exn Nomenclature.B j... | null | https://raw.githubusercontent.com/hammerlab/prohlatype/3acaf7154f93675fc729971d4c76c2b133e90ce6/src/scraps/setup_benchmarks.ml | ocaml | Extract reads from a result that were particularly well aligned.
*
* These reads were used for the benchmarking test.
* |
let j =
Post_analysis.of_json_file
"FILL ME/205673_1.json"
let j_bl = Post_analysis.reads_by_loci j
let j_bl_A = assoc_exn Nomenclature.A j_bl
let j_bl_B = assoc_exn Nomenclature.B j_bl
let j_bl_C = assoc_exn Nomenclature.C j_bl
let select_reads l =
let open Post_analysis in
let open ParPHMM_drivers in
... |
8fd3878b32c186c788cd8ce09cd7cbb296489cff9f8f0e3c7530212d964f16c6 | singnet/snet-minting-policy | Game.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TypeApplications #
# LANGUAGE NumericUnderscores #
{-# LANGUAGE OverloadedStrings #-}
module Spec.Game
( tests
) where
import Control.Monad (void)
import Ledger (ValidationError(Sc... | null | https://raw.githubusercontent.com/singnet/snet-minting-policy/1eb6ce64d408318e715d809cbe2e32a302aaabeb/examples/test/Spec/Game.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE OverloadedStrings #
No funds locked, so W2 (and other wallets) should not have access to guess endpoint | # LANGUAGE TypeApplications #
# LANGUAGE NumericUnderscores #
module Spec.Game
( tests
) where
import Control.Monad (void)
import Ledger (ValidationError(ScriptFailure))
import qualified Ledger.Ada as Ada
import Plutus.Contract (Contract... |
c6f8a20b79ed141ba7b03016d28ea8ba69faa97f68acf15379c58b24689d735e | seckcoder/iu_c311 | ds.rkt | #lang eopl
(require "grammar.rkt")
(require "store.rkt")
(require "../base/queue.rkt")
(require "../base/utils.rkt")
(require "queue.rkt")
(provide (all-defined-out))
; expval := Int | Bool | Proc
; during the implemention, I find this datatype actually
; useless...
(define-datatype
expval expval?
(numval
(in... | null | https://raw.githubusercontent.com/seckcoder/iu_c311/a1215983b6ab08df32058ef1e089cb294419e567/racket/thread2/ds.rkt | racket | expval := Int | Bool | Proc
during the implemention, I find this datatype actually
useless...
(println "update current thread id as:~s" id)
(println "create thread:~s in thread:~s" tid (current-thread-id))
(println "start thread:~s" (thread-id thd))
used when reput the thread into ready queue
(println "remake threa... | #lang eopl
(require "grammar.rkt")
(require "store.rkt")
(require "../base/queue.rkt")
(require "../base/utils.rkt")
(require "queue.rkt")
(provide (all-defined-out))
(define-datatype
expval expval?
(numval
(int integer?))
(boolval
(bool boolean?))
(listval
(list list?))
(procval
(proc proc?... |
6c292c63b59b763d7aa7a73073eccd98cac9acb1a5120ec04a934a3c1e06042d | may-liu/qtalk | mod_msg_id_queue.erl | -module(mod_msg_id_queue).
-behaviour(gen_mod).
-define(PROCNAME, mod_msg_id_queue).
-define(SERVER, ?MODULE).
-include("ejabberd.hrl").
-include("logger.hrl").
-export([start/2,stop/1]).
-export([start_link/2,init/1]).
-export([add_pid/2, remove_pid/2,get_pids/1, get_random_pid/1,get_pid_by_id/2]).
-define(DEFAULT... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/mod_msg_id_queue.erl | erlang | -module(mod_msg_id_queue).
-behaviour(gen_mod).
-define(PROCNAME, mod_msg_id_queue).
-define(SERVER, ?MODULE).
-include("ejabberd.hrl").
-include("logger.hrl").
-export([start/2,stop/1]).
-export([start_link/2,init/1]).
-export([add_pid/2, remove_pid/2,get_pids/1, get_random_pid/1,get_pid_by_id/2]).
-define(DEFAULT... | |
2de4afe3dd8704d941609fac430485642d4f1880215ca0ed1e1a7a7b9961d529 | TyOverby/mono | form_with_submit.mli | open! Core
open! Bonsai_web
val component : Vdom.Node.t Computation.t
| null | https://raw.githubusercontent.com/TyOverby/mono/9f361de248f67441dd1486419ba19044b6fa4fad/app/bonsai-examples/forms/form_with_submit.mli | ocaml | open! Core
open! Bonsai_web
val component : Vdom.Node.t Computation.t
| |
216d26d8d9e173cecdc5f6341301bba2ee87ff6647d152a20647c7a128de367c | psholtz/MIT-SICP | exercise-02.scm | ;;
;; Working definitions
;;
(define (or? exp)
(and (pair? exp) (eq? (car exp) 'or)))
(define (make-or exp1 exp2)
(list 'or exp1 exp2))
(define (or-first exp)
(cadr exp))
(define (or-second exp)
(caddr exp))
(define (and? exp)
(and (pair? exp) (eq? (car exp) 'and)))
(define (make-and exp1 exp2)
(list 'and ... | null | https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Recitations-F2007/Recitation-08/mit-scheme/exercise-02.scm | scheme |
Working definitions
Write selectors, constructor and predicate for "not".
| (define (or? exp)
(and (pair? exp) (eq? (car exp) 'or)))
(define (make-or exp1 exp2)
(list 'or exp1 exp2))
(define (or-first exp)
(cadr exp))
(define (or-second exp)
(caddr exp))
(define (and? exp)
(and (pair? exp) (eq? (car exp) 'and)))
(define (make-and exp1 exp2)
(list 'and exp1 exp2))
(define (and-firs... |
c2f63134e703235438e0c47ae5fde88bc4d698ba0c0bb829d9b376a081699cf3 | josefs/Gradualizer | user_types.erl | -module(user_types).
-compile([export_all, nowarn_export_all]).
%% these exported types are used in remote_types module
-export_type([my_tuple/0, my_list/0, my_union/0, my_opaque/0,
my_empty_record/0, my_refined_record/0, my_generic/1]).
-record(r, {}).
-type my_empty_record() :: #r{}.
-record(refined_... | null | https://raw.githubusercontent.com/josefs/Gradualizer/bd92da1e47a0fdb8bd22009da10bd73f0422e066/test/should_pass/user_types.erl | erlang | these exported types are used in remote_types module
v-- Either a local type (my_tuple) to this module or a remote user type
A type to be shadowed by a type with the same name in a local module.
i.e. `user_types:my_generic(my_shadowed_type())` where `my_shadowed_type()`
is defined in the module using the remoty ty... | -module(user_types).
-compile([export_all, nowarn_export_all]).
-export_type([my_tuple/0, my_list/0, my_union/0, my_opaque/0,
my_empty_record/0, my_refined_record/0, my_generic/1]).
-record(r, {}).
-type my_empty_record() :: #r{}.
-record(refined_r, {a, b}).
-type my_refined_record() :: #refined_r{a ::... |
b264e4c908e936469ad0c4b3cea4f0becd46af817fa72c92cfbe908d2b705eda | mokus0/hs-hdf5 | Link.hs | # LANGUAGE ForeignFunctionInterface #
module Bindings.HDF5.Link
( createHardLink
, createSoftLink
, createExternalLink
, doesLinkExist
, moveLink
, copyLink
, deleteLink
, LinkType(..)
, LinkInfo(..)
, getLinkInfo
, getSymLinkVal
, iterateLinks
... | null | https://raw.githubusercontent.com/mokus0/hs-hdf5/196e0d714a34e97358be9a907af0b93b4c7922e3/src/Bindings/HDF5/Link.hs | haskell | TODO: this will leak memory if an exception is thrown | # LANGUAGE ForeignFunctionInterface #
module Bindings.HDF5.Link
( createHardLink
, createSoftLink
, createExternalLink
, doesLinkExist
, moveLink
, copyLink
, deleteLink
, LinkType(..)
, LinkInfo(..)
, getLinkInfo
, getSymLinkVal
, iterateLinks
... |
39ac0c8856df7ddaf43be3f79b5587e997602ae2232712a2d623892fccdebee5 | ocsigen/ocaml-eliom | output.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/tool-lexyacc/output.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
Generating a DFA as a set of mutually recursive functions
open Syntax
let ic = ref stdin
let oc = ref... |
6db71dc4f8c81a04dc6a783f6cfde1238c67d2030d3e93dfae5a5578d024393f | ygrek/mldonkey | fileTPProtocol.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/fileTPProtocol.ml | ocaml | "bytes */X"
bytes x-
"bytes x-y/*"
bytes x-y/len | 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
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.