_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 |
|---|---|---|---|---|---|---|---|---|
d44ee09112ce81602826e671daa1e8a62f11bac447bcd990344c17e155815ac9 | snoyberg/file-embed | FileEmbed.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
| This module uses template . Following is a simplified explanation of usage for those unfamiliar with calling functions .
--
-- The function @embedFile@ in this modules embeds a file into the executable
that you can use it at runti... | null | https://raw.githubusercontent.com/snoyberg/file-embed/548430d2a79bb6f4cb4256768761071f59909aa5/Data/FileEmbed.hs | haskell | # LANGUAGE OverloadedStrings #
The function @embedFile@ in this modules embeds a file into the executable
However, as you can see below, the type signature indicates a value of type
> $(embedFile "myfile.txt")
This expression will have type @ByteString@. Be certain to enable the
top of your module:
> {-# LANG... | # LANGUAGE TemplateHaskell #
# LANGUAGE CPP #
| This module uses template . Following is a simplified explanation of usage for those unfamiliar with calling functions .
that you can use it at runtime . A file is represented as a @ByteString@.
@Q Exp@ will be returned . In order to convert this into a @ByteStri... |
641945864df459f98131ca0c675eda427ad3941c5f72cf1cfbee4ab9b053c9ce | Jannis/om-next-kanban-demo | lane.cljs | (ns kanban.components.lane
(:require [goog.object :as gobj]
[om.next :as om :refer-macros [defui]]
[om.dom :as dom]
[kanban.components.card :refer [Card card]]))
(defui Lane
static om/Ident
(ident [this props]
[:lane/by-id (:id props)])
static om/IQuery
(query [this]
... | null | https://raw.githubusercontent.com/Jannis/om-next-kanban-demo/84719bfb161d82f1d4405e263f258730277c7783/src/kanban/components/lane.cljs | clojure | (ns kanban.components.lane
(:require [goog.object :as gobj]
[om.next :as om :refer-macros [defui]]
[om.dom :as dom]
[kanban.components.card :refer [Card card]]))
(defui Lane
static om/Ident
(ident [this props]
[:lane/by-id (:id props)])
static om/IQuery
(query [this]
... | |
54839c53afaba17f0adc32ea3d0b75ef13c18193067396d93f0762699dd2b178 | ivan-m/graphviz | Util.hs | # LANGUAGE CPP , OverloadedStrings , PatternGuards #
{-# OPTIONS_HADDOCK hide #-}
|
Module : Data . GraphViz . Internal . Util
Description : Internal utility functions
Copyright : ( c )
License : 3 - Clause BSD - style
Maintainer :
This module defines internal utili... | null | https://raw.githubusercontent.com/ivan-m/graphviz/42dbb6312d7edf789d7055079de7b4fa099a4acc/Data/GraphViz/Internal/Util.hs | haskell | # OPTIONS_HADDOCK hide #
-----------------------------------------------------------------------------
| The rest of a non-quoted 'String' must match this.
| Determine if this String represents a number. Boolean parameter
determines if exponents are considered part of numbers for this.
Can't use Data.Text.Lazy.... | # LANGUAGE CPP , OverloadedStrings , PatternGuards #
|
Module : Data . GraphViz . Internal . Util
Description : Internal utility functions
Copyright : ( c )
License : 3 - Clause BSD - style
Maintainer :
This module defines internal utility functions .
Module ... |
383f3c61fcf6fba545a56665789336d92cad09b9a8bcd4754c46c97ca3d322d3 | adrieng/melitte | Options.ml | let use_unicode = ref true
let type_in_type = ref false
let debug = ref false
let verbose = ref false
| null | https://raw.githubusercontent.com/adrieng/melitte/b1191e2ac50a2cc64650559553aab948945da50d/src/Options.ml | ocaml | let use_unicode = ref true
let type_in_type = ref false
let debug = ref false
let verbose = ref false
| |
8bdf59c5dba7f8781d530b23d5370b61fe690239c15456eb60f22b23bcf3b782 | k-bx/protocol-buffers | ProtoCompile.hs | | This is the Main module for the command line program ' hprotoc '
module Main where
import Control.Monad(unless,forM_,foldM,forM)
import Control.Monad.State(State, execState, modify)
import qualified Data.ByteString.Lazy.Char8 as LC (hGetContents, hPut, pack, unpack)
import Data.Foldable (toList)
import Data.Maybe ... | null | https://raw.githubusercontent.com/k-bx/protocol-buffers/313eb8e69c665dadc46cd5ebf12ac6e934f00d0a/hprotoc/Text/ProtocolBuffers/ProtoCompile.hs | haskell | | 'setAs' puts both the full path and the basename as keys into the association list
myMode = PPHsMode 2 2 2 2 4 1 True PPOffsideRule False -- True
True
This is the part that uses the (optional) package name
DEBUG
There might be several modules | | This is the Main module for the command line program ' hprotoc '
module Main where
import Control.Monad(unless,forM_,foldM,forM)
import Control.Monad.State(State, execState, modify)
import qualified Data.ByteString.Lazy.Char8 as LC (hGetContents, hPut, pack, unpack)
import Data.Foldable (toList)
import Data.Maybe ... |
453ab5f58d7d32bc5c34d039df5cc1c6682c07709b0d39c8e2b9119b738bd534 | hackwaly/ocamlearlybird | state_initialized.ml | *
* Copyright ( C ) 2021
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation , either version 3 of the
* License , or ( at your option ) any later version .
*
* Th... | null | https://raw.githubusercontent.com/hackwaly/ocamlearlybird/165174e3cc749ba416ec7ebfb4b521e5fac744db/src/adapter/state_initialized.ml | ocaml | *
* Copyright ( C ) 2021
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation , either version 3 of the
* License , or ( at your option ) any later version .
*
* Th... | |
84d46a6b1a6a1ed7a62ad3dc9d5f8a231c7734fc9f3131c807a5020945a7760d | malcolmreynolds/GSLL | nonlinear-least-squares.lisp | ;; Nonlinear least squares fitting.
, 2008 - 02 - 09 12:59:16EST nonlinear-least-squares.lisp
Time - stamp : < 2009 - 06 - 06 16:47:47EDT nonlinear-least-squares.lisp >
$ Id$
(in-package :gsl)
;;; /usr/include/gsl/gsl_multifit_nlin.h
;;;;***********************************************************************... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/solve-minimize-fit/nonlinear-least-squares.lisp | lisp | Nonlinear least squares fitting.
/usr/include/gsl/gsl_multifit_nlin.h
****************************************************************************
Function-only solver object
****************************************************************************
so this is moot for now.
number-of-observations
number-of-para... | , 2008 - 02 - 09 12:59:16EST nonlinear-least-squares.lisp
Time - stamp : < 2009 - 06 - 06 16:47:47EDT nonlinear-least-squares.lisp >
$ Id$
(in-package :gsl)
Note that GSL currently provides no derivative - free solvers ,
(defmobject nonlinear-ffit "gsl_multifit_fsolver"
((solver-type :pointer)
"nonli... |
6d2509a7ec88f8d4e4e56e0f2c57183401720a7fd216ec62788a5b1ae9eeec73 | alanzplus/EOPL | implicit-refs-interpreter.rkt | #lang eopl
(require "./implicit-refs-spec.rkt")
(provide run)
(provide num-val)
(provide bool-val)
(provide proc-val)
(provide expval->num)
(provide expval->bool)
(provide expval->proc)
(provide procedure)
(provide apply-procedure)
(provide newref)
(provide setref!)
; ------------------------------------------------... | null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch4/implicit-refs-interpreter.rkt | racket | -----------------------------------------------------------------------------
Expression Value Representation
-----------------------------------------------------------------------------
ExpVal -> num
ExpVal -> bool
ExpVal -> Procedure
----------------------------------------------------------------------------... | #lang eopl
(require "./implicit-refs-spec.rkt")
(provide run)
(provide num-val)
(provide bool-val)
(provide proc-val)
(provide expval->num)
(provide expval->bool)
(provide expval->proc)
(provide procedure)
(provide apply-procedure)
(provide newref)
(provide setref!)
(define-datatype expval expval?
(num-val
(nu... |
b6b30cab18ee77ce127b6ffb2fabc06bd2dee09eb9d81dfed231946e4f84d4f2 | reflex-frp/patch | Map.hs | # LANGUAGE CPP #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
{-|
Description: A basic 'Patch' on 'Map'
Patches... | null | https://raw.githubusercontent.com/reflex-frp/patch/c556fce899cd0024129da4cdfd13fe5ce0c755af/src/Data/Patch/Map.hs | haskell | # LANGUAGE DeriveTraversable #
|
Description: A basic 'Patch' on 'Map'
Patches of this type consist only of insertions (including overwrites) and
deletions.
| A set of changes to a 'Map'. Any element may be inserted/updated or
deletions are represented as 'Nothing's
| 'fmap'ping a 'PatchMap' will alter all of the... | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
module Data.Patch.Map where
import Data.Patch.Class
import Control.Lens hiding (Fu... |
ba355ebdb4331701c8164affa7aacbbc9ffc0ebd6275c26958cd36f0e68ffabd | lowasser/TrieMap | Search.hs | # LANGUAGE CPP , BangPatterns , ViewPatterns , FlexibleInstances , TypeOperators , FlexibleContexts , TypeSynonymInstances #
# LANGUAGE MultiParamTypeClasses , PatternGuards #
#if __GLASGOW_HASKELL__ >= 700
# OPTIONS -fllvm #
#endif
module Data.TrieMap.RadixTrie.Search (insertEdge) where
import Control.Monad.Unpack
im... | null | https://raw.githubusercontent.com/lowasser/TrieMap/1ab52b8d83469974a629f2aa577a85de3f9e867a/Data/TrieMap/RadixTrie/Search.hs | haskell | # INLINE search #
# INLINE search # | # LANGUAGE CPP , BangPatterns , ViewPatterns , FlexibleInstances , TypeOperators , FlexibleContexts , TypeSynonymInstances #
# LANGUAGE MultiParamTypeClasses , PatternGuards #
#if __GLASGOW_HASKELL__ >= 700
# OPTIONS -fllvm #
#endif
module Data.TrieMap.RadixTrie.Search (insertEdge) where
import Control.Monad.Unpack
im... |
e41627bce8dcd29615c9d9ec761930e92f61f25c9b74a242eedf618c0c8b6c6d | exercism/haskell | Strain.hs | module Strain (keep, discard) where
discard :: (a -> Bool) -> [a] -> [a]
discard p xs = error "You need to implement this function."
keep :: (a -> Bool) -> [a] -> [a]
keep p xs = error "You need to implement this function."
| null | https://raw.githubusercontent.com/exercism/haskell/2b98084efc7d5ab098975c462f7977ee19c2fd29/exercises/practice/strain/src/Strain.hs | haskell | module Strain (keep, discard) where
discard :: (a -> Bool) -> [a] -> [a]
discard p xs = error "You need to implement this function."
keep :: (a -> Bool) -> [a] -> [a]
keep p xs = error "You need to implement this function."
| |
e54bf04b8fcba7c01a13506ce1189358f0a482813ad038b92eecb3edf66adebb | nikita-volkov/vector-builder | Prelude.hs | module VectorBuilder.Prelude
( module Exports,
strict,
)
where
import Control.Applicative as Exports
import Control.Arrow as Exports hiding (first, second)
import Control.Category as Exports
import Control.Concurrent as Exports
import Control.Exception as Exports
import Control.Monad as Exports hiding (fail, f... | null | https://raw.githubusercontent.com/nikita-volkov/vector-builder/83f733476ba99bccbbe1e832b668a3f07b639938/library/VectorBuilder/Prelude.hs | haskell | module VectorBuilder.Prelude
( module Exports,
strict,
)
where
import Control.Applicative as Exports
import Control.Arrow as Exports hiding (first, second)
import Control.Category as Exports
import Control.Concurrent as Exports
import Control.Exception as Exports
import Control.Monad as Exports hiding (fail, f... | |
d06f9ec8e53d3a1c2c2d3840b50851a7eb6a628b1b2bf86ce9a0579cf7c06b0f | fare/lisp-interface-library | tree.lisp | ;;;;; Stateful trees - interface
(uiop:define-package :lil/stateful/tree
(:use :closer-common-lisp
:lil/core
:lil/interface/base
:lil/interface/order)
(:use-reexport
:lil/interface/tree
:lil/stateful/map)
(:shadow #:<tree> #:<binary-tree> #:<avl-tree> #:<heighted-binary-tree> #:<num... | null | https://raw.githubusercontent.com/fare/lisp-interface-library/ac2e0063dc65feb805f0c57715d52fda28d4dcd8/stateful/tree.lisp | lisp | Stateful trees - interface
Trees in general
handles all the empty-object cases so we don't have to.
only write the key when copying a key-value pair.
writable value, not writable key.
Balancing trees
We really ought to either do *everything* in detached interface-passing style,
*or* keep it in subject-oriented ... |
(uiop:define-package :lil/stateful/tree
(:use :closer-common-lisp
:lil/core
:lil/interface/base
:lil/interface/order)
(:use-reexport
:lil/interface/tree
:lil/stateful/map)
(:shadow #:<tree> #:<binary-tree> #:<avl-tree> #:<heighted-binary-tree> #:<number-map>
#:association... |
fd664fba47654808cffa925f9ba7f6e6cec533ac88bce11f90f3e78153bd0bb9 | clojure/core.typed | dyn_propagate.clj | (ns clojure.core.typed.test.dyn-propagate
(:require [clojure.core.typed :as t]))
(t/tc-ignore
(def a {:a 1}))
(defn b [local]
(let [i a
l (:a a)
id (identity a)
]
(t/print-env "there")
(inc l)))
| null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/test/clojure/core/typed/test/dyn_propagate.clj | clojure | (ns clojure.core.typed.test.dyn-propagate
(:require [clojure.core.typed :as t]))
(t/tc-ignore
(def a {:a 1}))
(defn b [local]
(let [i a
l (:a a)
id (identity a)
]
(t/print-env "there")
(inc l)))
| |
db7c48a262dcd310d899ce2e075b7e9e30aba491f2e909c6d069e30e18a4c876 | dbuenzli/ptime | B0.ml | open B0_kit.V000
open Result.Syntax
(* OCaml library names *)
let compiler_libs_toplevel = B0_ocaml.libname "compiler-libs.toplevel"
let unix = B0_ocaml.libname "unix"
let ptime = B0_ocaml.libname "ptime"
let ptime_top = B0_ocaml.libname "ptime.top"
let ptime_clock = B0_ocaml.libname "ptime.clock"
let ptime_clock_os... | null | https://raw.githubusercontent.com/dbuenzli/ptime/a034cdcbd3c54587dba60ecb0527427afe279215/B0.ml | ocaml | OCaml library names
Libraries
Tests
Packs | open B0_kit.V000
open Result.Syntax
let compiler_libs_toplevel = B0_ocaml.libname "compiler-libs.toplevel"
let unix = B0_ocaml.libname "unix"
let ptime = B0_ocaml.libname "ptime"
let ptime_top = B0_ocaml.libname "ptime.top"
let ptime_clock = B0_ocaml.libname "ptime.clock"
let ptime_clock_os = B0_ocaml.libname "ptime... |
80be681349c9576573f699b5b2266c4e204c3f816bbd8a0ac2326d241efd8fd7 | 5HT/ant | FontMetric.mli |
open XNum;
open Unicode.Types;
open Dim;
open Graphic;
open Substitute;
open GlyphMetric;
(* font metrics *)
type font_parameter =
{
hyphen_glyph : glyph_desc;
skew_glyph : glyph_desc;
margin_glyph : glyph_desc;
space_glyph : glyph_desc;
foreign_glyph : glyph_desc;
slant ... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Runtime/FontMetric.mli | ocaml | font metrics
User specified modifications of font parameters.
scale font to this size
overrides built in encoding
specifies the skew glyph
a complete font_parameter
additional letter spacing
additional kerning pairs and ligatures
additional kerning pairs and ligatures
kerning with border gly... |
open XNum;
open Unicode.Types;
open Dim;
open Graphic;
open Substitute;
open GlyphMetric;
type font_parameter =
{
hyphen_glyph : glyph_desc;
skew_glyph : glyph_desc;
margin_glyph : glyph_desc;
space_glyph : glyph_desc;
foreign_glyph : glyph_desc;
slant : num;
space ... |
22f356a29c44a87959afdc070cb1003a75d2c4960b4adeb5960533a892266fed | tvraman/aster-math | new-environment-methods.lisp | ;;; -*- Mode: LISP -*- ;;;
(in-package :aster)
;;; Separating methods on new-environments into their own file:
(defun caption-p (self)
(typep self 'caption))
(defmethod caption ((figure figure ))
"Extract the caption from a figure if any. "
(find-if #'caption-p (contents figure )))
(defmethod caption ... | null | https://raw.githubusercontent.com/tvraman/aster-math/efbf8536dd781604bf6166ded62795564b1e6ec5/lisp/read-aloud/new-environment-methods.lisp | lisp | -*- Mode: LISP -*- ;;;
Separating methods on new-environments into their own file: |
(in-package :aster)
(defun caption-p (self)
(typep self 'caption))
(defmethod caption ((figure figure ))
"Extract the caption from a figure if any. "
(find-if #'caption-p (contents figure )))
(defmethod caption ((table table))
"Extract the caption from a table if any. "
(find-if #'caption-p (contents ta... |
19099970137286eec425cafc682b400715e11016ea711629b65f8f819193baaf | cky/guile | decompile-bytecode.scm | ;;; Guile VM code converters
Copyright ( C ) 2001 , 2009 , 2010 , 2013 Free Software Foundation , Inc.
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the... | null | https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/module/language/assembly/decompile-bytecode.scm | scheme | Guile VM code converters
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR ... |
Copyright ( C ) 2001 , 2009 , 2010 , 2013 Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA
(define-module (language ass... |
7bf5552c5d5e8d5706d882b1191914feeb74ee2a38097b20905382020a82e74b | mpickering/apply-refact | Default8.hs | yes = if f a then True else b | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Default8.hs | haskell | yes = if f a then True else b | |
8c49f35a8de6f7f34f386bbccad3fd4553823db68202dd65f5b02d0be0acfcc6 | acieroid/scala-am | philosophers6.scm | ;; Dining philosophers problem
(letrec ((n 6) ; number of philosophers
(turns 5) ; number of turns to run
(forks (vector (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock)))
(pickup (lambda (left right)
(acquire (vector-ref forks (min left right)))
... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/threads/variations/philosophers6.scm | scheme | Dining philosophers problem
number of philosophers
number of turns to run | (forks (vector (new-lock) (new-lock) (new-lock) (new-lock) (new-lock) (new-lock)))
(pickup (lambda (left right)
(acquire (vector-ref forks (min left right)))
(acquire (vector-ref forks (max left right)))))
(putdown (lambda (left right)
... |
1299e0ebeb4acf7ae5c0d5cd8fc89e7f916ed5955411477816971a97ba773e9a | typeable/octopod | Large.hs | module Frontend.UIKit.Button.Large
( largeButton,
LargeButtonType (..),
LargeButtonConfig (..),
LargeButtonStyle (..),
LargeButtonPriority (..),
BaseButtonTag (..),
)
where
import Control.Lens
import Data.Default
import Data.Generics.Labels ()
import Data.Text (Text)
import Frontend.Classes
imp... | null | https://raw.githubusercontent.com/typeable/octopod/857a4ee74b12cc061a45ca1e033f230cbbccce99/octopod-frontend/src/Frontend/UIKit/Button/Large.hs | haskell | module Frontend.UIKit.Button.Large
( largeButton,
LargeButtonType (..),
LargeButtonConfig (..),
LargeButtonStyle (..),
LargeButtonPriority (..),
BaseButtonTag (..),
)
where
import Control.Lens
import Data.Default
import Data.Generics.Labels ()
import Data.Text (Text)
import Frontend.Classes
imp... | |
1aed4afdb95e9f55b1fec365314670a09d58d5ae4863a23835a3d02ab78393c1 | mzp/coq-ruby | ind_tables.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/toplevel/ind_tables.ml | 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 _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : ind_tables.ml 107... |
62c8ade9352832e2024587da5cb294ccbcba90470314fd6b70ff1335fa0be274 | holyjak/fulcro-billing-app | billing_data.clj | (ns billing-app.components.billing-data
(:require
[billing-app.model.cache :as dev]
[billing-app.components.fake-domain-client :as fake-domain-client]
[next.jdbc :as jdbc]
[next.jdbc.result-set :as jdbc.rs]))
(defn ^:static accept-all [_] true)
(defn invoice-batches-raw-categorized
"Raw batches ba... | null | https://raw.githubusercontent.com/holyjak/fulcro-billing-app/568bf28552989e1e611773b2d946c9990e1edc3d/src/shared/billing_app/components/billing_data.clj | clojure | NOTE: We cannot cache this to disk because it contains `meta` that we need
See what billing-app.model.billing.invoice.charge/charge-view needs
:kd/charge-type nil
NOTE: Metadata cannot be cached so we need to return everything interesting as raw data | (ns billing-app.components.billing-data
(:require
[billing-app.model.cache :as dev]
[billing-app.components.fake-domain-client :as fake-domain-client]
[next.jdbc :as jdbc]
[next.jdbc.result-set :as jdbc.rs]))
(defn ^:static accept-all [_] true)
(defn invoice-batches-raw-categorized
"Raw batches ba... |
206523dd4a924ac24100f598f0f808cb986ab682891985117c43b802ec59fa2d | np/ling | Prelude.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TypeFamilies #
module Ling.Prelude (module Ling.Prelude, module X) where
import Control.Applicative... | null | https://raw.githubusercontent.com/np/ling/5a49fb5fdaef04b56e26c3ff1cd613e2800b4c23/Ling/Prelude.hs | haskell | # LANGUAGE LambdaCase #
# LANGUAGE Rank2Types #
# LANGUAGE TemplateHaskell #
infixed = match "_[^_]*_"
Reverse infix form of "fromMaybe"
Given a list of sets, return the set of elements which are redundant, namely appear more than
once. `redudant` can be used to check the disjointness of... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
module Ling.Prelude (module Ling.Prelude, module X) where
import Control.Applicative as X
import Control.Lens as X hiding (Empty)
import Control.Lens.Extras ... |
f823617c8e549b04ba44a3cd4ea398935a657abeb43415c2b13123f0d0026e14 | zoomhub/zoomhub | ContentState.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module ZoomHub.Types.ContentState
( ContentState (..),
fromString,
isCompleted,
)
where
import Data.Maybe (fromJust)
import Da... | null | https://raw.githubusercontent.com/zoomhub/zoomhub/65aa2ab63902d6425785caf7655f60afe5df37a6/src/ZoomHub/Types/ContentState.hs | haskell | # LANGUAGE OverloadedStrings #
Squeal / PostgreSQL
TODO: What if database value is not a valid? | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module ZoomHub.Types.ContentState
( ContentState (..),
fromString,
isCompleted,
)
where
import Data.Maybe (fromJust)
import Data.String (IsString)
import qualifi... |
a2c670b4cf1234f5f7b0ad8b71800d29b88cce154f9af7b39c2986eb1180698b | clojure-interop/java-jdk | StreamReaderDelegate.clj | (ns javax.xml.stream.util.StreamReaderDelegate
"This is the base class for deriving an XMLStreamReader filter
This class is designed to sit between an XMLStreamReader and an
application's XMLStreamReader. By default each method
does nothing but call the corresponding method on the
parent interface."
(:re... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/stream/util/StreamReaderDelegate.clj | clojure | (ns javax.xml.stream.util.StreamReaderDelegate
"This is the base class for deriving an XMLStreamReader filter
This class is designed to sit between an XMLStreamReader and an
application's XMLStreamReader. By default each method
does nothing but call the corresponding method on the
parent interface."
(:re... | |
2c8c81b32dc8eab0166646a5b0ffee6156c6a9ecb2785729adc257b3dfd9446d | EwenG/muance | utils_test.cljs | (ns muance.utils-test
(:require [goog.dom :as gdom]
[muance.core :as m]
[muance.print :as mprint]
[muance.dom :as dom]))
(defonce v-state (atom nil))
(defn update-v-state [vtree]
(reset! v-state (mprint/format-vtree vtree)))
(defn new-root []
(when-let [root (.getElementById... | null | https://raw.githubusercontent.com/EwenG/muance/11315603060aa57f8614e8f5fcecefa0cd0db17a/test/muance/utils_test.cljs | clojure | (ns muance.utils-test
(:require [goog.dom :as gdom]
[muance.core :as m]
[muance.print :as mprint]
[muance.dom :as dom]))
(defonce v-state (atom nil))
(defn update-v-state [vtree]
(reset! v-state (mprint/format-vtree vtree)))
(defn new-root []
(when-let [root (.getElementById... | |
aa1ef5687b5f28aecf07e4adcfb753558f4a4f2c4e9c0afac98b29c5c8e04017 | fgalassi/cs61a-sp11 | h7.4.scm | (load "obj")
(define-class (miss-manners obj)
(method (please meth arg)
(ask obj meth arg)))
| null | https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/homework/h7.4.scm | scheme | (load "obj")
(define-class (miss-manners obj)
(method (please meth arg)
(ask obj meth arg)))
| |
3e59771a14b4ede5bc7aa06ff93d7a1e1136e7b7deda6e765fe004781afcacf7 | jonascarpay/apecs | Util.hs | For Data . Semigroup compatibility
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE Strict #-}
# LANGUAGE TypeFamilies ... | null | https://raw.githubusercontent.com/jonascarpay/apecs/19c9dc15b31bfd4173230a327dec98e2aa959936/apecs/src/Apecs/Util.hs | haskell | # LANGUAGE Strict #
* Utility
| Convenience entity, for use in places where the entity value does not matter, i.e. a global store.
Automatically added to any world created with @makeWorld@
# INLINE nextEntity #
| Writes the given components to a new entity, and yields that entity.
The return ... | For Data . Semigroup compatibility
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Apecs.Util (
runGC, global,... |
4acf2c8ec6056b009cd180b3ace02153c50982df482d49535bb755fc1276d1fa | cnuernber/dtype-next | nio_buffer.clj | (ns tech.v3.datatype.nio-buffer
(:require [tech.v3.datatype.array-buffer :as array-buffer]
[tech.v3.datatype.native-buffer :as native-buffer]
[tech.v3.datatype.protocols :as dtype-proto]
[tech.v3.datatype.casting :as casting]
[tech.v3.datatype.base :as dtype-base]
... | null | https://raw.githubusercontent.com/cnuernber/dtype-next/71477752fc376fad4b678fa9607ef54a40b2b1ff/src/tech/v3/datatype/nio_buffer.clj | clojure | (ns tech.v3.datatype.nio-buffer
(:require [tech.v3.datatype.array-buffer :as array-buffer]
[tech.v3.datatype.native-buffer :as native-buffer]
[tech.v3.datatype.protocols :as dtype-proto]
[tech.v3.datatype.casting :as casting]
[tech.v3.datatype.base :as dtype-base]
... | |
c6ef5b9317f92c4b24a1f2dab400358f8b5e59e96474e3e6b19aa77d31b2c5c9 | pallix/tikkba | writefile.clj | (ns tikkba.examples.writefile
(:use [analemma svg charts xml]
[tikkba swing dom]
tikkba.utils.xml)
(:require [tikkba.utils.dom :as dom]))
(defn create-svg
"Creates a SVG representation with the Analemma functions"
[]
(svg
(-> (rect 20 30 100 400 :id "rect0")
(style :fill "white" :st... | null | https://raw.githubusercontent.com/pallix/tikkba/86fda7f97c3b1ff835f02c2b1c0337f3e134fd2c/src/tikkba/examples/writefile.clj | clojure | and writes it to a file | (ns tikkba.examples.writefile
(:use [analemma svg charts xml]
[tikkba swing dom]
tikkba.utils.xml)
(:require [tikkba.utils.dom :as dom]))
(defn create-svg
"Creates a SVG representation with the Analemma functions"
[]
(svg
(-> (rect 20 30 100 400 :id "rect0")
(style :fill "white" :st... |
8bf6e84b2533d017c074663c6a94ce0ad944db913473246e62b69969218d08bc | facebook/duckling | HE_XX.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory .
-------------... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Ranking/Classifiers/HE_XX.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
---------------------------------------------------------------
Auto-generated by regenClassifiers
DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW W... | Copyright ( c ) 2016 - present , Facebook , Inc.
of patent rights can be found in the PATENTS file in the same directory .
@generated
module Duckling.Ranking.Classifiers.HE_XX (classifiers) where
import Data.String
import Prelude
import qualified Data.HashMap.Strict as HashMap
import Duckling.Ranking.Types
cla... |
5f43d4955e34fb02990f180d333ae213186557f443552a6d0e31e1bd8d1870ba | yoriyuki/Camomile | stringPrep.ml | Copyright ( C ) 2010
(* 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 of
the License , or ( at your option ) any later version .
As a special exception ... | null | https://raw.githubusercontent.com/yoriyuki/Camomile/d7d8843c88fae774f513610f8e09a613778e64b3/Camomile/public/stringPrep.ml | ocaml | This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
may link, statically or dynamically, a "work that uses this library"
with a publicly distributed version of this library to produce an
executable file containing portions of this lib... | Copyright ( C ) 2010
as published by the Free Software Foundation ; either version 2 of
the License , or ( at your option ) any later version .
As a special exception to the GNU Library General Public License , you
additional requirements listed in clause 6 of the GNU Library General
we mean either the ... |
49f087a1d18545c5eec8f56249ee6282aee8911abdab313e4f981db1504d6ded | karlhof26/gimp-scheme | hexmap.scm | ; hexmap.scm
by < >
based on hex_grid by
;
Version 1.0 ( 2015 )
Uodated for GIMP-2.10.22 by ( Jan 2021 )
;
; Description
;
; Build hex map with nice options
;
;
; Issues
;
you must first select the pencil tool beforce calling this script ? ! ? ? ! ? ! ?
;
;
; License:
;
Copyright ( c ) < 2015 > < ... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/f5515e4f1f7d41872bf97761f2d5242eb8047b9a/hexmap.scm | scheme | hexmap.scm
Description
Build hex map with nice options
Issues
License:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
... | by < >
based on hex_grid by
Version 1.0 ( 2015 )
Uodated for GIMP-2.10.22 by ( Jan 2021 )
you must first select the pencil tool beforce calling this script ? ! ? ? ! ? ! ?
Copyright ( c ) < 2015 > < >
in the Software without restriction , including without limitation the rights
copies of the So... |
eea62f351a98083de46ba94ad9cc7c435df424b364477bc843c58a12df57bb9c | VitorCBSB/HetrisV2 | Constants.hs | module Constants
( introScreenTime,
fieldHeight,
visibleFieldHeight,
fieldWidth,
cellSize,
softDropSpeed,
timeToLock,
moveRotationLimit,
timeToRestart,
clearingLinesTime,
linesLevelUp,
gamePosition,
windowSize,
)
where
introScreenTime :: Double
introScreenTime = 4
f... | null | https://raw.githubusercontent.com/VitorCBSB/HetrisV2/2544e8ce56a4d0daba9126642118f0504215f742/app/Constants.hs | haskell | Line clears needed to level up
Move / rotation limit.
How many moves or rotations we can perform before
a piece locks into place instantly. | module Constants
( introScreenTime,
fieldHeight,
visibleFieldHeight,
fieldWidth,
cellSize,
softDropSpeed,
timeToLock,
moveRotationLimit,
timeToRestart,
clearingLinesTime,
linesLevelUp,
gamePosition,
windowSize,
)
where
introScreenTime :: Double
introScreenTime = 4
f... |
db1493cb2c33984575c4d7fd449cb739e92e5d3a2d99b22d6e1d5c00fe54ff93 | FundingCircle/jackdaw | fixtures_test.clj | (ns jackdaw.test.fixtures-test
(:require
[clojure.test :refer [deftest is]]
[jackdaw.test.fixtures :refer [list-topics reset-application-fixture topic-fixture with-fixtures]])
(:import
(org.apache.kafka.clients.admin AdminClient)))
(set! *warn-on-reflection* false)
(def topic-foo
{:topic-name "foo"
... | null | https://raw.githubusercontent.com/FundingCircle/jackdaw/e0c66d386277282219e070cfbd0fe2ffa3c9dca5/test/jackdaw/test/fixtures_test.clj | clojure | invoke the reset-application fixture with the sample test-fn | (ns jackdaw.test.fixtures-test
(:require
[clojure.test :refer [deftest is]]
[jackdaw.test.fixtures :refer [list-topics reset-application-fixture topic-fixture with-fixtures]])
(:import
(org.apache.kafka.clients.admin AdminClient)))
(set! *warn-on-reflection* false)
(def topic-foo
{:topic-name "foo"
... |
3d14e47c7e4ec9111c8ed1ae10ee6310601be92c68801fbd2ea471fe4cbf448f | effectfully/tiny-lang | Main.hs | module Main where
import qualified Field.Axioms as Field (test_fields)
import qualified Field.Raw.Textual as Raw (gen_test_parsing)
import qualified Field.Renaming as Field (test_free_variables, test_renaming)
import qualified Field.Textual as Field (gen_test_roundtrip, test_textual)
import qualifi... | null | https://raw.githubusercontent.com/effectfully/tiny-lang/3dbb730d3595a76f087a33da3b353783ff2a27e9/test/Main.hs | haskell | module Main where
import qualified Field.Axioms as Field (test_fields)
import qualified Field.Raw.Textual as Raw (gen_test_parsing)
import qualified Field.Renaming as Field (test_free_variables, test_renaming)
import qualified Field.Textual as Field (gen_test_roundtrip, test_textual)
import qualifi... | |
eee57d0b2edc0cab76ff5119abba60981156b18820675ffef52022c4dd3a3c7e | stackbuilders/atomic-write | BinarySpec.hs | module System.AtomicWrite.Writer.ByteString.BinarySpec (spec) where
import Test.Hspec (Spec, describe,
it, shouldBe)
import System.AtomicWrite.Writer.ByteString.Binary (atomicWriteFile, atomicWriteFileW... | null | https://raw.githubusercontent.com/stackbuilders/atomic-write/50976b9d249134d05191c4e430343594fdb034fb/spec/System/AtomicWrite/Writer/ByteString/BinarySpec.hs | haskell | Create a new file once different mask is set and make sure that mask
is applied.
reset mask to not break subsequent specs
Fails when using atomic mv command unless apply perms on initial file
Set somewhat distinctive defaults for test
We don't know what the default file permissions are, so create a
file to sampl... | module System.AtomicWrite.Writer.ByteString.BinarySpec (spec) where
import Test.Hspec (Spec, describe,
it, shouldBe)
import System.AtomicWrite.Writer.ByteString.Binary (atomicWriteFile, atomicWriteFileW... |
ee8386ecb15d8f8e9e69d7e7feadc043828d44ca3c550d2c7770ff52bd754029 | mojombo/egitd | server.erl | -module(server).
-export([start_link/0, init/1]).
start_link() ->
proc_lib:start_link(?MODULE, init, [self()]).
init(Parent) ->
ets:new(db, [set, named_table]),
read_conf(),
init_log(),
log:write("start", ["ok"]),
LSock = try_listen(10),
proc_lib:init_ack(Parent, {ok, self()}),
loop(LSock).
read_co... | null | https://raw.githubusercontent.com/mojombo/egitd/5309fe5f9a5908cd741f8dedf13790eea5d7528d/elibs/server.erl | erlang | get the requested host and method
io:format("header = ~p~n", [Header]),
dispatch | -module(server).
-export([start_link/0, init/1]).
start_link() ->
proc_lib:start_link(?MODULE, init, [self()]).
init(Parent) ->
ets:new(db, [set, named_table]),
read_conf(),
init_log(),
log:write("start", ["ok"]),
LSock = try_listen(10),
proc_lib:init_ack(Parent, {ok, self()}),
loop(LSock).
read_co... |
e2291d3f8e07b7c448817bc3853d484764f8454774ed5f8c52d4aed85161ebf1 | Mathnerd314/stroscot | Laziness.hs | import Data.List.Ordered (minus, union, unionAll)
-- Generators/streams:
fromThenTo n m
| n > m = []
| otherwise = n:(fromThenTo (n+1) m)
fromThen n = n:(fromThen (n+1))
Sieve of Eratosthenes
primes = 2 : 3 : minus [5,7..] (unionAll [[p*p, p*p+2*p..] | p <- tail primes])
-- composition, like Unix pipes.
composit... | null | https://raw.githubusercontent.com/Mathnerd314/stroscot/c5999489dffe00454bcdafb9a7e5edb9d4c673ec/tests/Laziness.hs | haskell | Generators/streams:
composition, like Unix pipes.
Oh!! BTW, lazy lists also allows the programmer to code things that s/he would
need 'static' variables for in 'C' -- like a random number generator -- since
there's no place for the 'seed' in a purely applicative order program. A lazy
program could define randoms() a... | import Data.List.Ordered (minus, union, unionAll)
fromThenTo n m
| n > m = []
| otherwise = n:(fromThenTo (n+1) m)
fromThen n = n:(fromThen (n+1))
Sieve of Eratosthenes
primes = 2 : 3 : minus [5,7..] (unionAll [[p*p, p*p+2*p..] | p <- tail primes])
composition = take 10 primes
Hamming numbers example ( quoted... |
5fe2d395f8993a26b82c7e5c86ff1c25939a08c1b56f5c397ae90c0926f277c5 | roryk/bcbio.rnaseq | project.clj | (defproject bcbio.rnaseq "1.2.0"
:description "Quality control and differential expression of bcbio RNA-seq runs"
:dependencies [[org.clojure/clojure "1.7.0"]
[de.ubercode.clostache/clostache "1.4.0"]
[version-clj "0.1.2"]
[incanter "1.5.5"]
[clj-s... | null | https://raw.githubusercontent.com/roryk/bcbio.rnaseq/66c629eb737c9a0096082d6683657bf9d89eb271/project.clj | clojure | (defproject bcbio.rnaseq "1.2.0"
:description "Quality control and differential expression of bcbio RNA-seq runs"
:dependencies [[org.clojure/clojure "1.7.0"]
[de.ubercode.clostache/clostache "1.4.0"]
[version-clj "0.1.2"]
[incanter "1.5.5"]
[clj-s... | |
27af93e2fb730e689721ae40aa7e79db9916bba3aa7aab726ee50b3d0974236f | kelsey-sorrels/robinson | materials.clj | ;; Functions for generating random items.
(ns robinson.materials
(:require [taoensso.timbre :as log]
[taoensso.timbre :as log]
[datascript.core :as d]))
(def material-schema {
::isa {:db/valueType :db.type/ref
:db/cardinality :db.cardinality/many}
::properties {:db/... | null | https://raw.githubusercontent.com/kelsey-sorrels/robinson/337fd2646882708331257d1f3db78a3074ccc67a/src/robinson/materials.clj | clojure | Functions for generating random items.
execute query: item | (ns robinson.materials
(:require [taoensso.timbre :as log]
[taoensso.timbre :as log]
[datascript.core :as d]))
(def material-schema {
::isa {:db/valueType :db.type/ref
:db/cardinality :db.cardinality/many}
::properties {:db/cardinality :db.cardinality/many}})
(def ... |
312760e62a8f09a1ee6d175e7598957be261e1c001fdbc6af2cc53d863873e37 | bburdette/chordster | PlaySong.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
module PlaySong where
import Import
import Control.Concurrent
import Sound.OSC.FD
import Control.Monad
import SongControl
import Data.Ratio
import Data.List
import Data.Int
import Data.Maybe
import Data.IORef
import qualified Data.Text as T
import Control.... | null | https://raw.githubusercontent.com/bburdette/chordster/70d235f1ca379e5ecd4a8f39dc1e734e2d50978b/PlaySong.hs | haskell | # LANGUAGE OverloadedStrings #
tempo is Beats per minute.
set current song id.
set current song id.
on chord change, set the root and the scale.
delay N times for N beats, flashing the lights each time.
delay for a beat. | # LANGUAGE DeriveGeneric #
module PlaySong where
import Import
import Control.Concurrent
import Sound.OSC.FD
import Control.Monad
import SongControl
import Data.Ratio
import Data.List
import Data.Int
import Data.Maybe
import Data.IORef
import qualified Data.Text as T
import Control.Concurrent.STM.TChan
import Control... |
c7697724ee3e360b38db76d416bf08f71d8029e5a7adb1b4fb1d49856aaf8742 | 0install/0install | common.ml | Copyright ( C ) 2013 , the README file for details , or visit .
* See the README file for details, or visit .
*)
(** Common types and functions. This module is intended to be opened. *)
type filepath = string
(** Raise this to exit the program. Allows finally blocks to run. *)
exception System_exit of i... | null | https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/support/common.ml | ocaml | * Common types and functions. This module is intended to be opened.
* Raise this to exit the program. Allows finally blocks to run.
* Define an interface for interacting with the system, so we can replace it
in unit-tests.
* Returns [false] for a broken symlink.
* Low-level interface, in case you need to proces... | Copyright ( C ) 2013 , the README file for details , or visit .
* See the README file for details, or visit .
*)
type filepath = string
exception System_exit of int
module Platform =
struct
type t = {
* OS , e.g. " Linux "
* OS version , e.g. " 3.10.3 - 1 - ARCH "
* CPU type , e.g. " x86_64 "
... |
5ad40411c1a59586b35b4f68e5459cd5191f117cad43862e51e1b51298772c31 | robertluo/fun-map | fun_map_test.cljc | (ns robertluo.fun-map-test
(:require
[clojure.test :refer [deftest testing is]]
#?(:clj
[robertluo.fun-map :refer [fun-map? fnk fw fun-map closeable life-cycle-map touch halt! lookup]]
:cljs
[robertluo.fun-map
:as fm
:refer [fun-map? fun-map touch life-cycle-map closeable halt!]... | null | https://raw.githubusercontent.com/robertluo/fun-map/ea2d418dac2b77171f877c4d6fbc4d14d72ea04d/test/robertluo/fun_map_test.cljc | clojure | (ns robertluo.fun-map-test
(:require
[clojure.test :refer [deftest testing is]]
#?(:clj
[robertluo.fun-map :refer [fun-map? fnk fw fun-map closeable life-cycle-map touch halt! lookup]]
:cljs
[robertluo.fun-map
:as fm
:refer [fun-map? fun-map touch life-cycle-map closeable halt!]... | |
5457480c11d2d0936dfb9c0f88b014c48fb2584856d909efe305d9e01ac97eed | Palmik/data-store | TSSO.hs | module Main
where
import Control.DeepSeq (NFData(rnf))
import Common
import qualified Data.List
import qualified TS.B01
import qualified Data.Table as T
main :: IO ()
main = do
return $! rnf elements
return $! rnf test
test :: TS.B01.TS
test = fromList elements
elements :: [C01]
elements = map (\x -> C01 x (x `... | null | https://raw.githubusercontent.com/Palmik/data-store/20131a9d6d310c29b57fd9e3b508f0335e1113b4/benchmarks/src/TSSO.hs | haskell | module Main
where
import Control.DeepSeq (NFData(rnf))
import Common
import qualified Data.List
import qualified TS.B01
import qualified Data.Table as T
main :: IO ()
main = do
return $! rnf elements
return $! rnf test
test :: TS.B01.TS
test = fromList elements
elements :: [C01]
elements = map (\x -> C01 x (x `... | |
43c9522a9755e9bd1919c70ae16ad9f937ba739fc062917f7d4e3803e4ed7d5c | carotene/carotene | redis_subscriber.erl | -module(redis_subscriber).
-behaviour(gen_server).
-export([start_link/1, start/1, stop/1]).
-export([init/1, handle_call/3, handle_cast/2, terminate/2, handle_info/2, code_change/3]).
-record(state, {client, channel, reply_pid}).
start_link(Client) ->
Opts = [],
gen_server:start_link(?MODULE, [Client], Opts... | null | https://raw.githubusercontent.com/carotene/carotene/963ecad344ec1c318c173ad828a5af3c000ddbfc/src/redis_subscriber.erl | erlang | -module(redis_subscriber).
-behaviour(gen_server).
-export([start_link/1, start/1, stop/1]).
-export([init/1, handle_call/3, handle_cast/2, terminate/2, handle_info/2, code_change/3]).
-record(state, {client, channel, reply_pid}).
start_link(Client) ->
Opts = [],
gen_server:start_link(?MODULE, [Client], Opts... | |
ec6a0c65845839e12832acf1859249ef8b01876929e3305d81229038d9f6ccad | benrady/specific | test_double.clj | (ns specific.test-double
(:require [specific.gene :as gene]
[clojure.string :as string]
[clojure.test :as ctest]
[clojure.spec.test.alpha :as stest]
[clojure.spec.alpha :as spec]))
(defn- report-fail [m]
(ctest/do-report (assoc m :type :fail)))
(defn- record-calls [... | null | https://raw.githubusercontent.com/benrady/specific/e1b790f2be2d577e49817472177bcc0136a2545a/src/specific/test_double.clj | clojure | (ns specific.test-double
(:require [specific.gene :as gene]
[clojure.string :as string]
[clojure.test :as ctest]
[clojure.spec.test.alpha :as stest]
[clojure.spec.alpha :as spec]))
(defn- report-fail [m]
(ctest/do-report (assoc m :type :fail)))
(defn- record-calls [... | |
5bae2045fe9b48a7ba107ed50b4db8ab5a81152f28f7916caad2f0fa18592bb7 | hadolint/hadolint | DL3057.hs | module Hadolint.Rule.DL3057 (rule) where
import qualified Data.Sequence as Seq
import qualified Data.Set as Set
import qualified Data.Text as Text
import Hadolint.Rule
import Language.Docker.Syntax
data StageID = StageID
{ src :: Text.Text,
name :: Text.Text,
line :: Linenumber
} deriving (Show, Eq, Ord)... | null | https://raw.githubusercontent.com/hadolint/hadolint/be6658f1a3a4f5f02d04f990e69fb28680491b71/src/Hadolint/Rule/DL3057.hs | haskell | bad stages to be marked good
bad stages not to be marked good | module Hadolint.Rule.DL3057 (rule) where
import qualified Data.Sequence as Seq
import qualified Data.Set as Set
import qualified Data.Text as Text
import Hadolint.Rule
import Language.Docker.Syntax
data StageID = StageID
{ src :: Text.Text,
name :: Text.Text,
line :: Linenumber
} deriving (Show, Eq, Ord)... |
62058da252e1ce44e66c24f1554c945df2ff7633fc4cd62150d3ec3154aea106 | jeromesimeon/Galax | compile_annotate.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/compile/compile_annotate.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
val annotate_algebraic_expression : ('a, 'b) Xquery_algebra_ast.aalgop_expr -> unit
val reannotate_algebraic_expression : ('a, 'b) Xquery_algebra_ast.aalgop_expr -> unit
val annotate_algebraic_module : ('a, 'b, 'c) Xquery_algebra_ast... |
57346cf693aff63c7b9589e500759745b0353ca074634dd06dcfa1537e6f6d9b | haskus/packages | Shift.hs | # LANGUAGE MagicHash #
# LANGUAGE CPP #
-- | Bit shifts
module Haskus.Binary.Bits.Shift
( ShiftableBits (..)
, SignedShiftableBits (..)
)
where
import Haskus.Number.Word
import Haskus.Number.Int
import GHC.Exts
import GHC.Num
#include "MachDeps.h"
#if !MIN_VERSION_GLASGOW_HASKELL (9,0,0,0)
wordToInt# :: Wo... | null | https://raw.githubusercontent.com/haskus/packages/7f013d16d984923668447a628598b7335408afd4/haskus-binary/src/lib/Haskus/Binary/Bits/Shift.hs | haskell | | Bit shifts
| Bit shifts
"Checked" means that there is an additional test to ensure that the shift
offset is valid (less than the bit count). If you are sure that the offset is
valid, use the "unchecked" version which should be faster.
To shift signed numbers, see `SignedShiftableBits` class methods.
| Checke... | # LANGUAGE MagicHash #
# LANGUAGE CPP #
module Haskus.Binary.Bits.Shift
( ShiftableBits (..)
, SignedShiftableBits (..)
)
where
import Haskus.Number.Word
import Haskus.Number.Int
import GHC.Exts
import GHC.Num
#include "MachDeps.h"
#if !MIN_VERSION_GLASGOW_HASKELL (9,0,0,0)
wordToInt# :: Word -> Int#
wordT... |
ac223853516166a5698e96f202fec7651f01992305ae86290fd9ab4cb7499090 | basho/machi | seq0.erl | -module(seq0).
%% -------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2014 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the... | null | https://raw.githubusercontent.com/basho/machi/e87bd59a9777d805b00f9e9981467eb28e28390c/prototype/demo-day-hack/seq0.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | -module(seq0).
Copyright ( c ) 2007 - 2014 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CON... |
8baa83d2b9229454d976d0fa1981379a29724cc363bd3266a517cbb931926cbe | kkinnear/zprint | optionfn.cljc | (ns ^:no-doc zprint.optionfn
#?@(:cljs [[:require-macros
[zprint.macros :refer
[dbg dbg-s dbg-pr dbg-s-pr dbg-form dbg-print zfuture]]]])
(:require #?@(:clj [[zprint.macros :refer
[dbg-pr dbg-s-pr dbg dbg-s dbg-form dbg-print zfuture]]])
[zprint.rewrit... | null | https://raw.githubusercontent.com/kkinnear/zprint/c5806b5c7a7455f626a0fd26a36367da94af09a6/src/zprint/optionfn.cljc | clojure |
Contains functions which can be called with {:option-fn <fn>} to produce
The optionfns here are called the same way, but just produce a basic
option map.
If you call an option-fn with partial because it has its own options map,
the "no-argument" arity must include the options map!
Since we have released this be... | (ns ^:no-doc zprint.optionfn
#?@(:cljs [[:require-macros
[zprint.macros :refer
[dbg dbg-s dbg-pr dbg-s-pr dbg-form dbg-print zfuture]]]])
(:require #?@(:clj [[zprint.macros :refer
[dbg-pr dbg-s-pr dbg dbg-s dbg-form dbg-print zfuture]]])
[zprint.rewrit... |
36c2b6b34b079a44844e5ba82e9e83aa4a44dd7ed2e8d8d547e48da4d91f7b8a | staples-sparx/clj-schema | contracts.clj | (ns clj-schema.contracts
"Unobtrusively apply contracts to functions vars"
(:use [clj-schema.schema :refer [def-map-schema optional-path schema? sequence-of]]
[clj-schema.simple-schemas :refer [Anything]]
[clj-schema.validation :refer [validation-errors]])
(:require [robert.hooke :as hooke]))
(d... | null | https://raw.githubusercontent.com/staples-sparx/clj-schema/398cd9cbd40f6bdcf3304ebf471e989497541471/src/clj_schema/contracts.clj | clojure | or ... :sampling-rate (fn [a b c] (sampling-rate a b c))
... can take a fn here that gets the args sent to the fn (#'f) | (ns clj-schema.contracts
"Unobtrusively apply contracts to functions vars"
(:use [clj-schema.schema :refer [def-map-schema optional-path schema? sequence-of]]
[clj-schema.simple-schemas :refer [Anything]]
[clj-schema.validation :refer [validation-errors]])
(:require [robert.hooke :as hooke]))
(d... |
47bfc806fe074378aaf9bf27b53331a2720da5ae3be68b31dbed8acb6a8461f6 | imandra-ai/ocaml-cimgui | types_gen_c.ml |
let prelude = {|
#include <stddef.h>
//#include "imgui.h"
#include "cimgui.h"
#include "cimgui_impl.h"
union anon_union1 {
int val_i; float val_f; void* val_p;
};
|}
let () =
print_endline prelude;
Cstubs_structs.write_c Format.std_formatter (module Imgui_generated_types.Make);
()
| null | https://raw.githubusercontent.com/imandra-ai/ocaml-cimgui/55c71078705099ea60d91630610f6d750fd07abb/src/bindgen/types_gen_c.ml | ocaml |
let prelude = {|
#include <stddef.h>
//#include "imgui.h"
#include "cimgui.h"
#include "cimgui_impl.h"
union anon_union1 {
int val_i; float val_f; void* val_p;
};
|}
let () =
print_endline prelude;
Cstubs_structs.write_c Format.std_formatter (module Imgui_generated_types.Make);
()
| |
f60139c7fb6a722d0dab9307e812c063f15b8e0854e4ca9aa8db917509136bf6 | stepcut/plugins | Main.hs |
import System.Plugins
import System.Directory
a = "Foo.hs" -- uesr code
b = "Bar.hs" -- trusted code. Result is "Bar.o"
c = "Out.hs"
main = do
status <- mergeTo a b c
f <- case status of
MergeFailure e -> error "mergeto failure"
MergeSuccess _ _ f -> retu... | null | https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/makewith/mergeto0/Main.hs | haskell | uesr code
trusted code. Result is "Bar.o"
good, not req |
import System.Plugins
import System.Directory
c = "Out.hs"
main = do
status <- mergeTo a b c
f <- case status of
MergeFailure e -> error "mergeto failure"
MergeSuccess _ _ f -> return f
print $ f == c
status <- mergeTo a b c
f' <- case ... |
7ddae65d9fa6df8d20fa07104ae56a1d6a18b3633edf22d3ca84b2393a56de68 | basho/riak_test | ts_cluster_riak_shell_regression_log.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2016 Basho Technologies , Inc.
%%
This file is provided 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 Li... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/ts_cluster_riak_shell_regression_log.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2016 Basho Technologies , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(ts_cluster_riak_shell_re... |
435bf9ad5a1e3c419704e2dcaedbc0fe5c41326d82becac96aa75f45ee05d3ee | sky-big/RabbitMQ | rabbit_mgmt_wm_bindings.erl | The contents of this file are subject to the Mozilla Public License
Version 1.1 ( the " License " ) ; you may not use this file except in
%% compliance with the License. You may obtain a copy of the License at
%% /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITH... | null | https://raw.githubusercontent.com/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_bindings.erl | erlang | compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
--------------------------------------------------------------------
---... | The contents of this file are subject to the Mozilla Public License
Version 1.1 ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ Management Plugin .
The Initial Developer of the Original Code... |
68572567ae237358f1aa269d8ae7a092347d4e5db1dac942c0f4c9cce1464790 | GrammaTech/sel | html.lisp | (defpackage :software-evolution-library/software/html
(:nicknames :sel/software/html :sel/sw/html)
(:use :gt/full
:software-evolution-library
:software-evolution-library/software/tree-sitter-base
:software-evolution-library/software/template))
(in-package :software-evolution-library/softwar... | null | https://raw.githubusercontent.com/GrammaTech/sel/d7b297361ff8418805a228504a5365cd05ed55f8/software/html.lisp | lisp | ===================================================
Generate the language definitions
===================================================
===================================================
#+:TREE-SITTER-HTML | (defpackage :software-evolution-library/software/html
(:nicknames :sel/software/html :sel/sw/html)
(:use :gt/full
:software-evolution-library
:software-evolution-library/software/tree-sitter-base
:software-evolution-library/software/template))
(in-package :software-evolution-library/softwar... |
a9b7b17c2f38a85ead20a82dfc9febac1e08a26dba0f643c133e2940fe463ba8 | pallet/pallet | providers.clj | (ns pallet.task.providers
"Provide information on the supported and enabled providers."
(:require
[pallet.compute :refer [supported-providers]]))
(defn providers
"Provide information on the supported and enabled providers."
{:no-service-required true}
[& _]
(println "Pallet uses its own and jcloud's pro... | null | https://raw.githubusercontent.com/pallet/pallet/30226008d243c1072dcfa1f27150173d6d71c36d/src/pallet/task/providers.clj | clojure | (ns pallet.task.providers
"Provide information on the supported and enabled providers."
(:require
[pallet.compute :refer [supported-providers]]))
(defn providers
"Provide information on the supported and enabled providers."
{:no-service-required true}
[& _]
(println "Pallet uses its own and jcloud's pro... | |
20ec81a005c281c0e7c1013b020357248cf8cd5857bfd2bf11ce3abc89b565aa | mk270/archipelago | test_main.ml |
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012
This programme is free software ; you may redistribute and/or modify
it under the terms of the GNU Affero General Public Licence as published by
the Free Software Foundation , either version 3 of said Licence , or
( ... | null | https://raw.githubusercontent.com/mk270/archipelago/4241bdc994da6d846637bcc079051405ee905c9b/src/main/test_main.ml | ocaml | let room_name = "Main Room", Name.Definite, Name.Singular in
let room = Model.Create.create_room room_name ~desc:"A room.\n" in
let _ = test_main ()
|
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012
This programme is free software ; you may redistribute and/or modify
it under the terms of the GNU Affero General Public Licence as published by
the Free Software Foundation , either version 3 of said Licence , or
( ... |
c83e6f9d924409a3ad1fcc2bd31963216b5b87f02f1578731cb435e1dc8b96ed | imitator-model-checker/imitator | ModelConverter.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Laboratoire Spécification et Vérification ( ENS Cachan & CNRS , France )
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine ,... | null | https://raw.githubusercontent.com/imitator-model-checker/imitator/105408ae2bd8c3e3291f286e4d127defd492a58b/src/ModelConverter.mli | ocaml | **************************************************************
* Modules
**************************************************************
**************************************************************
* Exceptions
**************************************************************
*******************************************... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Laboratoire Spécification et Vérification ( ENS Cachan & CNRS , France )
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine ,... |
822875dbd328eef4d99f4be88135468c3ba17f33ef4b30167f629450a8fcacc5 | grin-compiler/grin | AST.hs | # LANGUAGE TupleSections , LambdaCase , OverloadedStrings #
module Grin.ExtendedSyntax.Parse.AST
( parseGrin
, parseProg
, parseDef
, parseExpr
) where
import Data.Char
import Data.Void
import Data.Text (Text)
import qualified Data.Text as T
import Control.Applicative (empty)
import Control.Monad (void, mz... | null | https://raw.githubusercontent.com/grin-compiler/grin/572fc24b2a89ad15c058b363aa26c6913b1b1765/grin/src/Grin/ExtendedSyntax/Parse/AST.hs | haskell | grin syntax
FIXME: remove '$' from app syntax, fix 'value' parser with using 'lineFold' instead
NOTE: The parser `value` already handles the parentheses around "complex" values,
and we don't want to parenthesize variables, literals and units.
#undefined can hold simple types as well as node types
externals
top-l... | # LANGUAGE TupleSections , LambdaCase , OverloadedStrings #
module Grin.ExtendedSyntax.Parse.AST
( parseGrin
, parseProg
, parseDef
, parseExpr
) where
import Data.Char
import Data.Void
import Data.Text (Text)
import qualified Data.Text as T
import Control.Applicative (empty)
import Control.Monad (void, mz... |
ce4cf788194cdeabdf435c41ee938a8038fa3e1444b4163ee38a08803d39f64a | tarides/dune-release | config.ml | open Dune_release
let invalid_config_key key =
Rresult.R.error_msgf "%S is not a valid global config field" key
let show_val = function None -> "<unset>" | Some x -> x
let log_val s =
Logs.app (fun l -> l "%s" s);
Ok ()
let log_val_opt string_opt =
Logs.app (fun l -> l "%s" (show_val string_opt));
Ok ()
... | null | https://raw.githubusercontent.com/tarides/dune-release/6bfed0f299b82c0931c78d4e216fd0efedff0673/bin/config.ml | ocaml | open Dune_release
let invalid_config_key key =
Rresult.R.error_msgf "%S is not a valid global config field" key
let show_val = function None -> "<unset>" | Some x -> x
let log_val s =
Logs.app (fun l -> l "%s" s);
Ok ()
let log_val_opt string_opt =
Logs.app (fun l -> l "%s" (show_val string_opt));
Ok ()
... | |
07e346293a14d603dadf37cfd999a49022854c036c9d484fff98892478ee9558 | SuzanneSoy/type-expander | main.rkt | #lang racket/base
(require racket/require
(subtract-in typed/racket type-expander)
type-expander)
(provide (all-from-out typed/racket
type-expander))
(module reader syntax/module-reader
type-expander/lang/main) | null | https://raw.githubusercontent.com/SuzanneSoy/type-expander/b182b9422083bf8adee71d6543f78372ad801ede/lang/main.rkt | racket | #lang racket/base
(require racket/require
(subtract-in typed/racket type-expander)
type-expander)
(provide (all-from-out typed/racket
type-expander))
(module reader syntax/module-reader
type-expander/lang/main) | |
63b2aabb3bff9b96096c64567644a87d4a33ed7734b460e5bf710e5bdbca6687 | runtimeverification/haskell-backend | InfoExecBreadth.hs | # LANGUAGE NoStrict #
# LANGUAGE NoStrictData #
|
Copyright : ( c ) Runtime Verification , 2020 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2020-2021
License : BSD-3-Clause
-}
module Kore.Log.InfoExecBreadth (
InfoExecBreadth,
ExecBreadth (..),
infoExecBreadt... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/c86e9d2c0a2d7800a3cb49443d962463f88175d1/kore/src/Kore/Log/InfoExecBreadth.hs | haskell | # LANGUAGE NoStrict #
# LANGUAGE NoStrictData #
|
Copyright : ( c ) Runtime Verification , 2020 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2020-2021
License : BSD-3-Clause
-}
module Kore.Log.InfoExecBreadth (
InfoExecBreadth,
ExecBreadth (..),
infoExecBreadt... | |
f7d7a2f58d3f466be24768a26d009dcebbe6fdd4316721c77ea5fc209352b432 | 3b/cl-vulkan | vkinfo.lisp | (in-package #:vk)
(vk:with-instance (instance)
(when instance
(let ((devices (enumerate-physical-devices instance)))
(format t "~&instance layers: ~s~%"
(enumerate-instance-layer-properties))
(format t "~&instance extensions: ~s~%"
(enumerate-instance-extension-pro... | null | https://raw.githubusercontent.com/3b/cl-vulkan/6514a1dfd168ac8d50acd923044bea79881a2685/examples/vkinfo.lisp | lisp | (in-package #:vk)
(vk:with-instance (instance)
(when instance
(let ((devices (enumerate-physical-devices instance)))
(format t "~&instance layers: ~s~%"
(enumerate-instance-layer-properties))
(format t "~&instance extensions: ~s~%"
(enumerate-instance-extension-pro... | |
1d55f89becd7151eb3e8e677134c8045562f06f5081f11a188da3c633e9dc36d | lgessler/glam | session.cljs | (ns glam.models.session
(:require
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.fulcro.mutations :as m :refer [defmutation]]
[com.fulcrologic.fulcro.routing.dynamic-routing :as dr]
[com.fulcrologic.fulcro.ui-state-machines :as sm]
[com.fulcrologic.guardrails.core :re... | null | https://raw.githubusercontent.com/lgessler/glam/9789168d7fe46814d2b09ad2f2e980f96c2b3633/src/main/glam/models/session.cljs | clojure | For local state that doesn't need to go to the server
todo adapt this to load all app start data - including session
signup | (ns glam.models.session
(:require
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.fulcro.mutations :as m :refer [defmutation]]
[com.fulcrologic.fulcro.routing.dynamic-routing :as dr]
[com.fulcrologic.fulcro.ui-state-machines :as sm]
[com.fulcrologic.guardrails.core :re... |
854aba5d5d822afab023506e127bbccfaa80d63259d8803bb762686c4e2a41af | arcfide/oleg | packages.scm | Interface definitions first
Utilities
(define-interface parser-errors-interface
(export parser-error
parser-error?))
(define-interface input-parses-interface
(export peek-next-char
assert-curr-char
skip-until skip-while
next-token next-token-of
read-text-line
read-string
parser-error))
... | null | https://raw.githubusercontent.com/arcfide/oleg/c6826870436925fd4c873c01d7fcc24a7a7f95dc/ssax/lib/packages.scm | scheme | The Meat
Structures
ERROR
The Meat
ERROR
OPEN-INPUT-STRING
LET-VALUES
ERROR | Interface definitions first
Utilities
(define-interface parser-errors-interface
(export parser-error
parser-error?))
(define-interface input-parses-interface
(export peek-next-char
assert-curr-char
skip-until skip-while
next-token next-token-of
read-text-line
read-string
parser-error))
... |
af0d17c69737370022b68dbee614b3018861e48890c88bf43cec0c4ba5deb249 | JustusAdam/schedule-planner | App.hs | # LANGUAGE FlexibleContexts #
|
Module : $ Header$
Description : Connector from IO to logic
Copyright : ( c ) , 2015
License : LGPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Sort of the Main script for all the common operations , independant of the
program inst... | null | https://raw.githubusercontent.com/JustusAdam/schedule-planner/ba501c4c8332b5e11379fb500d867fdc8082d482/src/SchedulePlanner/App.hs | haskell | |Print a string if debug is enabled
|
Calculation on internal data structures.
|
Calculation wrapped into server I/O compatible data structures.
|
Evaluates the transformed json, compiles (useful) error messages, runs the algorithm
and returns a writer of any output created.
|
perform the calculation and ... | # LANGUAGE FlexibleContexts #
|
Module : $ Header$
Description : Connector from IO to logic
Copyright : ( c ) , 2015
License : LGPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Sort of the Main script for all the common operations , independant of the
program inst... |
2a2e0d0b1934931dbe91f0d80f645d401dff08ad6e80d64eaab05bf9fb70452e | BardurArantsson/cqrs | PersistedEvent.hs | module Data.CQRS.Types.PersistedEvent
( PersistedEvent(..)
, PersistedEvent'(..)
) where
import Data.CQRS.Internal.PersistedEvent
| null | https://raw.githubusercontent.com/BardurArantsson/cqrs/2491d83e2bcd68c883aaea33cdce6c5ea8c0cd1a/cqrs-core/src/Data/CQRS/Types/PersistedEvent.hs | haskell | module Data.CQRS.Types.PersistedEvent
( PersistedEvent(..)
, PersistedEvent'(..)
) where
import Data.CQRS.Internal.PersistedEvent
| |
ae8c2ce61d3d86c45ae257dc689ea0d37e2727b82249e2bbb20ddd1a282da77b | ajnsit/wai-routes | Types.hs | # LANGUAGE DeriveFunctor #
{-# LANGUAGE DeriveLift #-}
-- | Warning! This module is considered internal and may have breaking changes
module Routes.TH.Types
( -- * Data types
Resource (..)
, ResourceTree (..)
, Piece (..)
, Dispatch (..)
, CheckOverlap
, FlatResource (..)
-- ** Helpe... | null | https://raw.githubusercontent.com/ajnsit/wai-routes/4d6b240af57a95353373ddba81c4905db0234459/src/Routes/TH/Types.hs | haskell | # LANGUAGE DeriveLift #
| Warning! This module is considered internal and may have breaking changes
* Data types
** Helper functions
^ type of the multi piece at the end
^ supported request methods | # LANGUAGE DeriveFunctor #
module Routes.TH.Types
Resource (..)
, ResourceTree (..)
, Piece (..)
, Dispatch (..)
, CheckOverlap
, FlatResource (..)
, resourceMulti
, resourceTreePieces
, resourceTreeName
, flatten
) where
import Language.Haskell.TH.Syntax
data ResourceTre... |
9435f7368adb1a6cc6323484f1a7380a9a598e9696622c822b09734a17efb58f | fission-codes/fission | Types.hs | module Fission.Error.Types
( module Fission.Error.NotFound.Types
, module Fission.Error.AlreadyExists.Types
, module Fission.Error.InvalidURL.Types
, module Fission.Error.Mismatch.Types
, module Fission.Error.ParseError.Types
) where
import Fission.Error.AlreadyExists.Types
import Fissi... | null | https://raw.githubusercontent.com/fission-codes/fission/afaae0dc5f83f4e35a3d4fdbdea2608a8d49bef8/fission-core/library/Fission/Error/Types.hs | haskell | module Fission.Error.Types
( module Fission.Error.NotFound.Types
, module Fission.Error.AlreadyExists.Types
, module Fission.Error.InvalidURL.Types
, module Fission.Error.Mismatch.Types
, module Fission.Error.ParseError.Types
) where
import Fission.Error.AlreadyExists.Types
import Fissi... | |
8987fb4d489b4c93613982990597c4ed22e632960cce47bfa9ac2807c06c27ab | theodormoroianu/SecondYearCourses | HaskellChurch_20210415103439.hs | {-# LANGUAGE RankNTypes #-}
module HaskellChurch where
A boolean is any way to choose between two alternatives
newtype CBool = CBool {cIf :: forall t. t -> t -> t}
instance Show CBool where
show b = show $ cIf b True False
| null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurch_20210415103439.hs | haskell | # LANGUAGE RankNTypes # | module HaskellChurch where
A boolean is any way to choose between two alternatives
newtype CBool = CBool {cIf :: forall t. t -> t -> t}
instance Show CBool where
show b = show $ cIf b True False
|
8aa890c314487c7422664be269c91d4961762e3d46b6c8abaa5465ec190d462c | sol/hpack | Haskell.hs | module Hpack.Haskell (
isModule
, isModuleNameComponent
, isQualifiedIdentifier
, isIdentifier
) where
import Data.Char
isModule :: [String] -> Bool
isModule name = (not . null) name && all isModuleNameComponent name
isModuleNameComponent :: String -> Bool
isModuleNameComponent name = case name of
x : ... | null | https://raw.githubusercontent.com/sol/hpack/f1aa0c48eb696d66be8c1bcf68528253eab09178/src/Hpack/Haskell.hs | haskell | module Hpack.Haskell (
isModule
, isModuleNameComponent
, isQualifiedIdentifier
, isIdentifier
) where
import Data.Char
isModule :: [String] -> Bool
isModule name = (not . null) name && all isModuleNameComponent name
isModuleNameComponent :: String -> Bool
isModuleNameComponent name = case name of
x : ... | |
77127a6770b0615aa37acd26a4f2d50e0ef52477a1697bb79eefeeaa619662e3 | kanaka/instacheck | reduce.cljc | (ns instacheck.reduce
(:require [clojure.pprint :refer [pprint]]
[clojure.set :as set]
[instacheck.util :as util]
[instacheck.grammar :as grammar]
[instacheck.weights :as weights]
[instacheck.codegen :as codegen]))
(def memoized-distance-trek
(memoize wei... | null | https://raw.githubusercontent.com/kanaka/instacheck/ba2095f9b9691812342c54100cd7de83a5b9a74d/src/instacheck/reduce.cljc | clojure | start-weight). Must eventually return 0.
_ (prn :node node :kids kids :kid-weights kid-weights)
nparents is weighted child edges of parents leading
to node. all-nparents is the same but includes the
grammar root path if there is no weighted path
between node and the root.
big-nparents is reduction can... | (ns instacheck.reduce
(:require [clojure.pprint :refer [pprint]]
[clojure.set :as set]
[instacheck.util :as util]
[instacheck.grammar :as grammar]
[instacheck.weights :as weights]
[instacheck.codegen :as codegen]))
(def memoized-distance-trek
(memoize wei... |
00bdefee377bb9042a2ac95c274c80a548740ca88bb4cc85df4e7d91edb85403 | vbmithr/ocaml-binance | binance_rest.ml | open Core
open Fastrest
open Json_encoding
open Binance
let url = Uri.make ~scheme:"https" ~host:"api.binance.com" ()
let or_error enc =
let encoding =
conv (fun _ -> assert false)
(fun (code, msg) -> Error.createf "%d: %s" code msg)
(obj2 (req "code" int) (req "msg" string)) in
union [
... | null | https://raw.githubusercontent.com/vbmithr/ocaml-binance/8ee18a9f87423d592a9c9b06a816acb028800fbb/src/binance_rest.ml | ocaml | open Core
open Fastrest
open Json_encoding
open Binance
let url = Uri.make ~scheme:"https" ~host:"api.binance.com" ()
let or_error enc =
let encoding =
conv (fun _ -> assert false)
(fun (code, msg) -> Error.createf "%d: %s" code msg)
(obj2 (req "code" int) (req "msg" string)) in
union [
... | |
cae3ed6595aaaed6cfb7a6684fdf936fd8830083a0ff06b6b152979456fb6a79 | mabragor/cg-llvm | high-level-structure.lisp |
(in-package #:cg-llvm)
(cl-interpol:enable-interpol-syntax)
(enable-read-macro-tokens)
(quasiquote-2.0:enable-quasiquote-2.0)
(define-cg-llvm-rule symbol-table-entry ()
(|| target-datalayout
target-triple
inline-assembly
attribute-group
metadata-entry
(fail-parse "Not implemented")))
... | null | https://raw.githubusercontent.com/mabragor/cg-llvm/4a8375316d8ebf36125929c5d1a872721099d29c/src/high-level-structure.lisp | lisp |
(in-package #:cg-llvm)
(cl-interpol:enable-interpol-syntax)
(enable-read-macro-tokens)
(quasiquote-2.0:enable-quasiquote-2.0)
(define-cg-llvm-rule symbol-table-entry ()
(|| target-datalayout
target-triple
inline-assembly
attribute-group
metadata-entry
(fail-parse "Not implemented")))
... | |
79fa38701d16245dc7c29b4d226c5ad4708d6772850b96c9fbd98acb9129250d | dajac/react | semaphore_test.clj | (ns react.semaphore-test
(:use clojure.test)
(:require [react.semaphore :as semaphore]))
(deftest semaphore-test
(testing "Idle"
(let [s (semaphore/async-semaphore 1)]
(is (= (-> s .state deref :permits) 1))
(is (= (-> s .state deref :waiters count) 0))))
(testing "Acquire / Release"
(... | null | https://raw.githubusercontent.com/dajac/react/b45d549d0f8be0167c8c814418358ae82afe4ce8/test/react/semaphore_test.clj | clojure | (ns react.semaphore-test
(:use clojure.test)
(:require [react.semaphore :as semaphore]))
(deftest semaphore-test
(testing "Idle"
(let [s (semaphore/async-semaphore 1)]
(is (= (-> s .state deref :permits) 1))
(is (= (-> s .state deref :waiters count) 0))))
(testing "Acquire / Release"
(... | |
41fd55a11b053a7726585bd762e812c8c5c74b2047a73ecd1609e78645c0d79f | may-liu/qtalk | make_muc_pic.erl | -module(make_muc_pic).
-export([make_muc_pic/2]).
-include("logger.hrl").
-include("qunar_ejabberd_extend.hrl").
-export([send_update_muc_pic/3]).
make_muc_pic(Server,Muc) ->
case catch ets:lookup(muc_users,Muc) of
[] ->
ok;
[{Muc,L}] ->
case http_make_new_pic(Server,Muc,L) of
null ->
ok;
Muc_Pic ->
... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/make_muc_pic.erl | erlang | Key = str:concat(Muc,str:concat(<<"_">>,integer_to_binary(Num))), | -module(make_muc_pic).
-export([make_muc_pic/2]).
-include("logger.hrl").
-include("qunar_ejabberd_extend.hrl").
-export([send_update_muc_pic/3]).
make_muc_pic(Server,Muc) ->
case catch ets:lookup(muc_users,Muc) of
[] ->
ok;
[{Muc,L}] ->
case http_make_new_pic(Server,Muc,L) of
null ->
ok;
Muc_Pic ->
... |
d2cbb2867e01fe93576459d1051445c48199ab5db96961adf3be0f60534c70e1 | soupi/sdl2-snake | Snake.hs | | This is an example application of the sdl2 package .
We will implement the game ' Snake ' .
This module is composed of the following parts :
1 . Main Loop
Contains boilerplate code that is common to most games . Responsible for the lifecycle of the game .
2 . Types and Constants
The model of the gam... | null | https://raw.githubusercontent.com/soupi/sdl2-snake/84a4129d946f02d864592d3c9e40e272752c501b/src/Snake.hs | haskell | -------------
-------------
black background
measure ticks at the start
the pattern
measure ticks at the end and regulate FPS
decide whether to continue or not
| Will wait until ticks pass
threadDelay works in microseconds
-----------------------
Types and Constants --
-----------------------
we model the sna... | | This is an example application of the sdl2 package .
We will implement the game ' Snake ' .
This module is composed of the following parts :
1 . Main Loop
Contains boilerplate code that is common to most games . Responsible for the lifecycle of the game .
2 . Types and Constants
The model of the gam... |
3f4a4589e1407e7d59fb5d58de4e277b2f79bc5ca54d3be8ffd1d00a1a4fd23c | let-def/menhir | packedIntArray.mli | (**************************************************************************)
(* *)
Menhir
(* *)
, INRIA Ro... | null | https://raw.githubusercontent.com/let-def/menhir/e8ba7bef219acd355798072c42abbd11335ecf09/src/packedIntArray.mli | ocaml | ************************************************************************
et en Automatique. All rig... | Menhir
, INRIA Rocquencourt
, PPS , Université Paris Diderot
Copyright 2005 - 2008 Institut National de Recherche en Informatique
under the terms of the GNU Library General Pu... |
8688feef3f8f79905e54bc9c1e10146f573e97a89c2dd68d939925a08c190c80 | racket/redex | poly-stlc-4.rkt | #lang racket/base
(require redex/benchmark
"util.rkt"
redex/reduction-semantics)
(provide (all-defined-out))
(define the-error "the type of cons is incorrect")
(define-rewrite bug4
(∀ a (a → ((list a) → (list a))))
==>
(∀ a (a → ((list a) → a)))
#:context (define-metafunction)
#:once-only... | null | https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-benchmark/redex/benchmark/models/poly-stlc/poly-stlc-4.rkt | racket | #lang racket/base
(require redex/benchmark
"util.rkt"
redex/reduction-semantics)
(provide (all-defined-out))
(define the-error "the type of cons is incorrect")
(define-rewrite bug4
(∀ a (a → ((list a) → (list a))))
==>
(∀ a (a → ((list a) → a)))
#:context (define-metafunction)
#:once-only... | |
889efd83910d8c1c71c669562d5256baeda5823e29a74737bc18824af811cdd1 | mightybyte/zeus | Db.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ImpredicativeTypes #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoMonomorphismRestriction #
# OPTIONS_GHC -fno - warn - missin... | null | https://raw.githubusercontent.com/mightybyte/zeus/5566e3244f1ab0cd245e4c36be315a5abddb5810/backend/src/Backend/Db.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE GADTs #
# LANGUAGE ImpredicativeTypes #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE TypeSynonymInstances #
----------------------------------------------------------------------------
---------------------------------------------------------------------------... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoMonomorphismRestriction #
# OPTIONS_GHC -fno - warn - missing - signatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAG... |
6753b7929075614278bf7c094291f5d16ebab4028e3935ce17753e41a67403c0 | billstclair/trubanc-lisp | square.lisp | square.lisp -- implementation of the Square block cipher
based on a public domain implementation by ( FIXME ! )
(in-package :crypto)
(declaim (type (simple-array (unsigned-byte 8) (256))
alogtable logtable))
(eval-when (:compile-toplevel :load-toplevel :execute)
(defconst alogtable
#.(let ((... | null | https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/ironclad_0.26/square.lisp | lisp | this function only runs during the key generation process, so consing
is acceptable.
hack for stupid C array punning
initial key addition
full rounds
last round | square.lisp -- implementation of the Square block cipher
based on a public domain implementation by ( FIXME ! )
(in-package :crypto)
(declaim (type (simple-array (unsigned-byte 8) (256))
alogtable logtable))
(eval-when (:compile-toplevel :load-toplevel :execute)
(defconst alogtable
#.(let ((... |
ec38c504ac1d3736693e8a19b693cd5ed794b1552b008727cafd34b12f768114 | ghollisjr/cl-ana | h5ex-t-arrayatt.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/datatypes/h5ex-t-arrayatt.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 array datatypes
of dimension ADIM0xADI... | Copyright by The HDF Group .
This file is part of hdf5 - cffi .
The full hdf5 - cffi copyright notice , including terms governing
to an attribute . The program first writes integers arrays
of DIM0 , then closes the file . Next , it reopens the
(in-pac... |
e1acdb26d1fca58ae050e6c53115e98652f15fb777651204b05d0402ff3db4fe | RyanMcG/incise | incise_layout.clj | (ns incise.transformers.impl.incise-layout
(:require (incise.transformers [layout :refer [repartial use-layout
deflayout defpartial]]
[core :refer [register]])
[stefon.core :refer [link-to-asset]]
[robert.hooke :... | null | https://raw.githubusercontent.com/RyanMcG/incise/fc34f5715cb7555ea575f665a2f4ec76bc9e012e/src/incise/transformers/impl/incise_layout.clj | clojure | This nav is duplicated in README.md
Necessary to remove old favicon | (ns incise.transformers.impl.incise-layout
(:require (incise.transformers [layout :refer [repartial use-layout
deflayout defpartial]]
[core :refer [register]])
[stefon.core :refer [link-to-asset]]
[robert.hooke :... |
ded79628f7a62a0a3e89bcb6cdc0b8829e0469c8cab92cffb87cf6d510114848 | twosigma/waiter | kubernetes_scheduler_integration_test.clj | (ns waiter.kubernetes-scheduler-integration-test
(:require [clojure.data.json :as json]
[clojure.string :as str]
[clojure.test :refer :all]
[clojure.tools.logging :as log]
[clojure.walk :as walk]
[waiter.status-codes :refer :all]
[waiter.util.cli... | null | https://raw.githubusercontent.com/twosigma/waiter/84b99f66aab5ac9faae14287d728605f47508bcc/waiter/integration/waiter/kubernetes_scheduler_integration_test.clj | clojure | Test that the active instances' logs are available.
wait for scale up
wait for scale down
Test that the killed instance's logs were persisted to S3.
This portion of the test logic was modified from the active-instances tests above.
matches run-as-user when default-namespace resolves to run-as-user
blank when def... | (ns waiter.kubernetes-scheduler-integration-test
(:require [clojure.data.json :as json]
[clojure.string :as str]
[clojure.test :refer :all]
[clojure.tools.logging :as log]
[clojure.walk :as walk]
[waiter.status-codes :refer :all]
[waiter.util.cli... |
becbc7c0b5046b06a5625a230e9c149eb49e4b8dbc725734f872d57972e47036 | hannesm/patch | patch_command.ml | (** For now this command is only used for testing,
in particular it is not installed to the user.
(If we wanted to install it, it would need
a better name.)
*)
let usage =
"Simplified patch utility for single-file patches;\n
./patch.exe <input-file> <unififed-diff-file> -o <output-file>"
let exit_com... | null | https://raw.githubusercontent.com/hannesm/patch/29b7c70327f30fd618ac487116d3010d5b99d189/src/patch_command.ml | ocaml | * For now this command is only used for testing,
in particular it is not installed to the user.
(If we wanted to install it, it would need
a better name.)
|
let usage =
"Simplified patch utility for single-file patches;\n
./patch.exe <input-file> <unififed-diff-file> -o <output-file>"
let exit_command_line_error = 1
let exit_open_error = 2
let exit_several_chunks = 3
let exit_patch_failure = 4
let run ~input ~diff =
match Patch.to_diffs diff with
| [] -> input
... |
7cc782d1d7e0e6b12e1711598d8b26728ce4993e6a82fcc938fd6ce8079a5dce | gigasquid/speech-acts-classifier | core_test.clj | (ns speech-acts-classifier.core-test
(:require [clojure.test :refer :all]
[speech-acts-classifier.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/gigasquid/speech-acts-classifier/4052f3b20a5fbbcacb298005fcaedf6f7df9b731/test/speech_acts_classifier/core_test.clj | clojure | (ns speech-acts-classifier.core-test
(:require [clojure.test :refer :all]
[speech-acts-classifier.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
2c7f69d23891e54a5d8e6108d7311f436cd987c1d88c8c16e7221d87963bf848 | yuriy-chumak/ol | xpm.scm | (define-library (file xpm)
(import
(otus lisp)
(only (lang intern) string->symbol)
(only (lang sexp) list->number)
(file parser))
(export
xpm-parser
xpm-parse-file)
parsed xpm is :
; vector of vectors of colors
(begin
(define (block-comment)
(either
(let-parse* (
... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/libraries/file/xpm.scm | scheme | vector of vectors of colors
header:
parameters:
color table
bitmap
(out get-byte) | (define-library (file xpm)
(import
(otus lisp)
(only (lang intern) string->symbol)
(only (lang sexp) list->number)
(file parser))
(export
xpm-parser
xpm-parse-file)
parsed xpm is :
(begin
(define (block-comment)
(either
(let-parse* (
(skip (get-imm #\*))
... |
510eca2840740f9f4874f3db1af4413860e80980374ee80dc992c9929ef9e8f5 | scheme/edwin48 | weak-pair.scm | ;;; -*- Mode: Scheme; scheme48-package: weak-pair -*-
(define-record-type* weak-pair
(make-weak-pair (car) (cdr))
())
(define (weak-cons car cdr)
(make-weak-pair (make-weak-pointer car) cdr))
(define (weak-pair/car? pair)
(weak-pointer-ref (weak-pair-car pair)))
(define (weak-car pair)
(if (weak-pair/car?... | null | https://raw.githubusercontent.com/scheme/edwin48/fbe3c7ca14f1418eafddebd35f78ad12e42ea851/edwin48/scsh/weak-pair.scm | scheme | -*- Mode: Scheme; scheme48-package: weak-pair -*- |
(define-record-type* weak-pair
(make-weak-pair (car) (cdr))
())
(define (weak-cons car cdr)
(make-weak-pair (make-weak-pointer car) cdr))
(define (weak-pair/car? pair)
(weak-pointer-ref (weak-pair-car pair)))
(define (weak-car pair)
(if (weak-pair/car? pair)
(weak-pointer-ref (weak-pair-car pair))
... |
5a7c18ecf7546a56c20ee10a889a4bf687e9bcf2f4bc9fd2097377b60563b946 | bobzhang/fan | btyp.ml |
type 'a t =
{u: int}
(* local variables: *)
(* compile-command: "ocamlc.opt -c btyp.ml" *)
(* end: *)
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/unitest/btyp.ml | ocaml | local variables:
compile-command: "ocamlc.opt -c btyp.ml"
end: |
type 'a t =
{u: int}
|
9e47e7752ff83c0b1611061634e102b8d6e7566a302038dcf0e0a720b51d8ac5 | Kappa-Dev/KappaTools | jsonUtil.ml | (******************************************************************************)
(* _ __ * The Kappa Language *)
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
(* | ' / ********************************************************************... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/777835b82f449d3d379713df76ff25fd5926b762/core/dataStructures/jsonUtil.ml | ocaml | ****************************************************************************
_ __ * The Kappa Language
| ' / ********************************************************************
| . \ * This file is distributed under the terms of the
|_|\_\ * GN... | | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
let initial_buffer_size = 0x1000
let write_to_channel f d x =
let b = Buffer.create initial_buffer_size in
let () = f b x in
Buffer.output_buffer d b
let string_of_write f ?(len = 1024) x =
let ob = Buffer.create len in
let () ... |
a749feaf43ad78bf98f527a3f8f466b83564c236b8ae1a9f21344637a3e34e1f | GianlucaGuarini/fortytwo | MultiselectExample.hs | module MultiselectExample where
import FortyTwo (multiselect, multiselectWithDefault)
main :: IO [String]
main = do
multiselect "Which kind of sports do you like?" ["Soccer", "Tennis", "Golf"]
multiselectWithDefault
"What are your \nfavourite books?"
["1984", "Multi\nline\nentry", "Moby Dick", "The Hitchh... | null | https://raw.githubusercontent.com/GianlucaGuarini/fortytwo/6d8d801f85e1dd993ee4cae6490a638872a14b47/demo/MultiselectExample.hs | haskell | module MultiselectExample where
import FortyTwo (multiselect, multiselectWithDefault)
main :: IO [String]
main = do
multiselect "Which kind of sports do you like?" ["Soccer", "Tennis", "Golf"]
multiselectWithDefault
"What are your \nfavourite books?"
["1984", "Multi\nline\nentry", "Moby Dick", "The Hitchh... | |
f163f1e5aa508941cd771deedcc97139bc52a3a524320c95620d6fa663658be0 | realworldocaml/book | response_file.ml | open Import
type t =
| Not_supported
| Zero_terminated_strings of string
(* This mutable table is safe under the assumption that a program path always
points to the binary with the same version. While the assumption seems likely
to hold, it would be better to avoid the need for it to simplify
reasoning. ... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_engine/response_file.ml | ocaml | This mutable table is safe under the assumption that a program path always
points to the binary with the same version. While the assumption seems likely
to hold, it would be better to avoid the need for it to simplify
reasoning. | open Import
type t =
| Not_supported
| Zero_terminated_strings of string
let registry = Table.create (module Path) 128
let get ~prog = Option.value (Table.find registry prog) ~default:Not_supported
let set ~prog t = Table.set registry prog t
|
14d94cdcb171f91922d5835894e207e11d095d9ded07bbec19832f3d344856b3 | ucsd-progsys/dsolve | vec_all.ml | type 'a t =
Empty
| Node of 'a t * int * 'a * 'a t * int * int
let empty = Empty
let height t =
match t with
Empty -> 0
| Node(_, _, _, _, _, h) -> h
let length t =
match t with
Empty -> 0
| Node (_, cl, _, _, cr, _) -> 1 + cl + cr
let makenode l d r =
let (hl, cl) = match l ... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/proceedings-demos/ml/vec_all.ml | ocaml | defer this particular property to runtime
invalid_arg "Vec.remove_min_elt" | type 'a t =
Empty
| Node of 'a t * int * 'a * 'a t * int * int
let empty = Empty
let height t =
match t with
Empty -> 0
| Node(_, _, _, _, _, h) -> h
let length t =
match t with
Empty -> 0
| Node (_, cl, _, _, cr, _) -> 1 + cl + cr
let makenode l d r =
let (hl, cl) = match l ... |
86a845bccd3af81c2ed55d520a878bc01bbe8406cc603e9c7d17baca8c78c4de | josefs/Gradualizer | opaque_fail.erl | -module(opaque_fail).
-export([use_external/2]).
-spec use_external(user_types:my_opaque(), integer() | undefined) -> integer().
use_external(I, undefined) -> I;
use_external(_, I) -> I.
| null | https://raw.githubusercontent.com/josefs/Gradualizer/208f5816b0157f282212fc036ba7560f0822f9fc/test/should_fail/opaque_fail.erl | erlang | -module(opaque_fail).
-export([use_external/2]).
-spec use_external(user_types:my_opaque(), integer() | undefined) -> integer().
use_external(I, undefined) -> I;
use_external(_, I) -> I.
| |
7acf2427819fa7f87a98180c803a1580ab4bde99bfb59eb8a9a234d789aef48f | reanimate/reanimate | doc_oscillateS.hs | #!/usr/bin/env stack
-- stack runghc --package reanimate
module Main(main) where
import Reanimate
import Reanimate.Builtin.Documentation
main :: IO ()
main = reanimate $ docEnv $ signalA oscillateS drawProgress
| null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/doc_oscillateS.hs | haskell | stack runghc --package reanimate | #!/usr/bin/env stack
module Main(main) where
import Reanimate
import Reanimate.Builtin.Documentation
main :: IO ()
main = reanimate $ docEnv $ signalA oscillateS drawProgress
|
e818a4369b127df606de53ab1309c37ee29a548df8702dec48725ae56d969157 | nuprl/gradual-typing-performance | array-struct-build-array.rkt | #lang racket/base
(provide build-array)
;; -----------------------------------------------------------------------------
(require
"data-array.rkt"
(only-in "array-utils-check-array-shape.rkt"
check-array-shape)
(only-in "array-struct-array-default-strict.rkt"
array-default-strict!)
(only-in "array-str... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/micro/synth/untyped/array-struct-build-array.rkt | racket | -----------------------------------------------------------------------------
============================================================================= | #lang racket/base
(provide build-array)
(require
"data-array.rkt"
(only-in "array-utils-check-array-shape.rkt"
check-array-shape)
(only-in "array-struct-array-default-strict.rkt"
array-default-strict!)
(only-in "array-struct-unsafe-build-array.rkt"
unsafe-build-array))
(define (build-array ds proc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.