_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 |
|---|---|---|---|---|---|---|---|---|
9f0ea6d9da43f079e554e45b0c54263d7f71d5b8ca212dcfb190b005c8b7cd38 | alanz/ghc-exactprint | T10134a.hs | # LANGUAGE KindSignatures #
{-# LANGUAGE GADTs #-}
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module T10134a where
import GHC.TypeLits
data Vec :: Nat -> Type -> Type where
Nil :: Vec 0 a
(:>) :: a -> Vec n a -> Vec (n + 1) a
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc86/T10134a.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE KindSignatures #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module T10134a where
import GHC.TypeLits
data Vec :: Nat -> Type -> Type where
Nil :: Vec 0 a
(:>) :: a -> Vec n a -> Vec (n + 1) a
|
500ea5c5070e42b1c1dcc4bb265fd3772100466f7cb100d3eda0fbec7428f622 | jonasseglare/geex | type_test.clj | (ns geex.ebmd.type-test
(:require [geex.ebmd.type :as type]
[bluebell.utils.ebmd :as ebmd]
[clojure.test :refer :all]
[geex.core.seed :as seed]))
(deftest primitive-test
(is (ebmd/matches-arg-spec? ::type/double-value 3.0))
(is (ebmd/matches-arg-spec? ::type/float-value (float... | null | https://raw.githubusercontent.com/jonasseglare/geex/f1a48c14c983c054c91fb221b91f42de5fa8eee0/test/geex/ebmd/type_test.clj | clojure | (ns geex.ebmd.type-test
(:require [geex.ebmd.type :as type]
[bluebell.utils.ebmd :as ebmd]
[clojure.test :refer :all]
[geex.core.seed :as seed]))
(deftest primitive-test
(is (ebmd/matches-arg-spec? ::type/double-value 3.0))
(is (ebmd/matches-arg-spec? ::type/float-value (float... | |
94a2c2bcab42a711888d71ae1c533772af24235d4c4f175cb93aa87e1161fa9c | ctford/overtunes | organ_cornet.clj | (ns overtunes.instruments.organ-cornet
(:use [overtone.live])
)
From by .
(defcgen triangle-osc [freq phase {:default 0.0} harmonics {:default 40}]
(:ar (let
[
harmonic-numbers (take harmonics (iterate (partial + 2) 1))
every 4n -1 is
;; there a better way?!
... | null | https://raw.githubusercontent.com/ctford/overtunes/44dc2d6482315e1893cf19000cfe3381a2c41da4/src/overtunes/instruments/organ_cornet.clj | clojure | there a better way?!
harmonics
inverse square ampl
conditional phase shift by pi | (ns overtunes.instruments.organ-cornet
(:use [overtone.live])
)
From by .
(defcgen triangle-osc [freq phase {:default 0.0} harmonics {:default 40}]
(:ar (let
[
harmonic-numbers (take harmonics (iterate (partial + 2) 1))
every 4n -1 is
]
(klang [
... |
68d13471b6a6badb3d6dfe2075489c6c1524d12e4eefd1eba627d912654d5a9e | k0ral/hbro | Core.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Hbro.Core (
-- * Types
CaseSensitivity(..)
, Direction(..)
, Wrap(..)
, ZoomDirecti... | null | https://raw.githubusercontent.com/k0ral/hbro/8926b53960eb7136c4dec94eb31f2426fa34c726/library/Hbro/Core.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
* Types
* Getters
* Browsing
* Other
{{{ Imports
}}}
{{{ Types
}}}
{{{ Getters
| Return the HTML code of the current webpage.
}}}
{{{ Browsing
void . logErrors $ do
currentURI <- getURI
guard (curre... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Hbro.Core (
CaseSensitivity(..)
, Direction(..)
, Wrap(..)
, ZoomDirection(..)
, getCurrentURI
, getFaviconURI
, getFavicon
, getLoadProgress
, getPageTitle
, getPageData... |
0d579afdfefab93b07ad819c59d8d34ce5caf1f5945b7c856dd1811381796983 | quil-lang/qvm | grovel-system-constants.lisp | (in-package #:qvm)
#+unix
(progn
(include "unistd.h")
(constant ($sc-nprocessors-onln "_SC_NPROCESSORS_ONLN") :optional nil)
(constant ($sc-page-size "_SC_PAGE_SIZE") :optional nil)
)
| null | https://raw.githubusercontent.com/quil-lang/qvm/de95ead6e7df70a1f8e0212455a802bd0cef201c/src/grovel-system-constants.lisp | lisp | (in-package #:qvm)
#+unix
(progn
(include "unistd.h")
(constant ($sc-nprocessors-onln "_SC_NPROCESSORS_ONLN") :optional nil)
(constant ($sc-page-size "_SC_PAGE_SIZE") :optional nil)
)
| |
f33609a72d3bb72dfacf376201fde2acda0ef8f728342d989f397b1d75eab144 | godfat/sandbox | fib.hs | fib = 0 : 1 : [x+y | (x, y) <- zip fib (tail fib)]
combos = [(x, y) | x <- [0..1], y <- [2..3]]
fib = [ 0 , 1 ] + List[lambda{|x , y| } ]
combos = List[->(x , y){[x , y ] } , 0 .. 1 , 2 .. 3 ]
fib = [0, 1] + List[lambda{|x,y|}]
combos = List[->(x,y){[x,y]}, 0..1, 2..3]
-}
| null | https://raw.githubusercontent.com/godfat/sandbox/eb6294238f92543339adfdfb4ba88586ba0e82b8/haskell/fib.hs | haskell | fib = 0 : 1 : [x+y | (x, y) <- zip fib (tail fib)]
combos = [(x, y) | x <- [0..1], y <- [2..3]]
fib = [ 0 , 1 ] + List[lambda{|x , y| } ]
combos = List[->(x , y){[x , y ] } , 0 .. 1 , 2 .. 3 ]
fib = [0, 1] + List[lambda{|x,y|}]
combos = List[->(x,y){[x,y]}, 0..1, 2..3]
-}
| |
357aff64fe7df4c011ddfdbfd4963ccd8f584dd5caea4be2a5d4c0b3fbc3344d | kayhide/wakame | Wakame.hs | module Wakame
( module X
) where
import Wakame.Generics ()
import Wakame.Keys as X
import Wakame.Lacks as X
import Wakame.Merge as X
import Wakame.Nub as X
import Wakame.Row as X
import Wakame.Union as X
| null | https://raw.githubusercontent.com/kayhide/wakame/4d16ecf2221655300b5db588c2775cfc0b8d92cd/src/Wakame.hs | haskell | module Wakame
( module X
) where
import Wakame.Generics ()
import Wakame.Keys as X
import Wakame.Lacks as X
import Wakame.Merge as X
import Wakame.Nub as X
import Wakame.Row as X
import Wakame.Union as X
| |
a041822e86f220c2e5f9839529bb58aa8b72ecbf43e4eb6e654c89864564a5ab | markcox80/specialization-store | packages.lisp | (defpackage "SPECIALIZATION-STORE.TESTS"
(:use "COMMON-LISP"
"SPECIALIZATION-STORE"
"5AM")
(:export "ALL-TESTS"
"PROCESS-SYNTAX-LAYER-TESTS"))
(defpackage "SPECIALIZATION-STORE.LAMBDA-LISTS.TESTS"
(:use "COMMON-LISP"
"SPECIALIZATION-STORE.LAMBDA-LISTS"
"5AM")
(:export "LAMBDA-LIST-TESTS"))
(def... | null | https://raw.githubusercontent.com/markcox80/specialization-store/8d39a866a6f24986aad3cc52349e9cb2653496f3/tests/packages.lisp | lisp | (defpackage "SPECIALIZATION-STORE.TESTS"
(:use "COMMON-LISP"
"SPECIALIZATION-STORE"
"5AM")
(:export "ALL-TESTS"
"PROCESS-SYNTAX-LAYER-TESTS"))
(defpackage "SPECIALIZATION-STORE.LAMBDA-LISTS.TESTS"
(:use "COMMON-LISP"
"SPECIALIZATION-STORE.LAMBDA-LISTS"
"5AM")
(:export "LAMBDA-LIST-TESTS"))
(def... | |
dddcc95c97a7199545ec98788cca5f1a3182669b08b4bfeb3d4f65e7bfa7c1ee | mimoo/nixbyexample | main.ml | let () = Byexample.main ()
| null | https://raw.githubusercontent.com/mimoo/nixbyexample/d5575b796ba2e0022af069d1fc71cfa20f8c8754/tools/bin/main.ml | ocaml | let () = Byexample.main ()
| |
9a6ce3b95a77148ffaf1b859ae1deb22d185bf3b9c6e9135053c7b485bbba430 | ku-fpg/hermit | DataKinds.hs | # LANGUAGE GADTs , KindSignatures , DataKinds , TypeFamilies , TypeOperators #
module Main where
import Prelude hiding ((++),zipWith)
data Nat = Zero | Succ Nat
data Vec :: * -> Nat -> * where
Nil :: Vec a Zero
Cons :: a -> Vec a n -> Vec a (Succ n)
type family (m :: Nat) :+: (n :: Nat) :... | null | https://raw.githubusercontent.com/ku-fpg/hermit/3e7be430fae74a9e3860b8b574f36efbf9648dec/examples/Talks/interact-with-hermit/DataKinds.hs | haskell | ----------------------------------------------
---------------------------------------------- | # LANGUAGE GADTs , KindSignatures , DataKinds , TypeFamilies , TypeOperators #
module Main where
import Prelude hiding ((++),zipWith)
data Nat = Zero | Succ Nat
data Vec :: * -> Nat -> * where
Nil :: Vec a Zero
Cons :: a -> Vec a n -> Vec a (Succ n)
type family (m :: Nat) :+: (n :: Nat) :... |
1307412f709b867d0bf99d88c653ca300311a7996a3097dbc79e172eb8ffd143 | BinaryAnalysisPlatform/bap | emit_ida_script_main.ml | open Core_kernel[@@warning "-D"]
open Bap.Std
open Format
include Self()
module Buffer = Caml.Buffer
* uses a strange color coding , bgr , IIRC
let idacode_of_color = function
| `black -> 0x000000
| `red -> 0xCCCCFF
| `green -> 0x99FF99
| `yellow -> 0xC2FFFF
| `blue -> 0xFFB2B2
| `magenta -... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/cbdf732d46c8e38df79d9942fc49bcb97915c657/plugins/emit_ida_script/emit_ida_script_main.ml | ocaml | * this is emitted at the start of the script
* this is emitted at the end of the script
* [emit_attr buffer sub_name insn_addr attr] emits into the [buffer]
a python code that corresponds to the given attribute [attr], that
is attached to a term that occurs in the scope of a function with
a name [sub_name... | open Core_kernel[@@warning "-D"]
open Bap.Std
open Format
include Self()
module Buffer = Caml.Buffer
* uses a strange color coding , bgr , IIRC
let idacode_of_color = function
| `black -> 0x000000
| `red -> 0xCCCCFF
| `green -> 0x99FF99
| `yellow -> 0xC2FFFF
| `blue -> 0xFFB2B2
| `magenta -... |
b16c0954c00baebb5a0c74932dee33d6857efc0e288de04da42cd679163f483c | practicalli/clojure-through-code | live_demo.clj | Get Functional with Clojure
;;;;;;;;;;;;;;;;;;;;;;;
What is Clojure
;; A general purpose programming language
;; - a modern LISP
- hosted on the Java Virtual Machine ( JVM ) , Microsoft CLR , JavaScript Engines ( V8 , Node )
;;;;;;;;;;;;;;;;;;;;;;;
;; Why Clojure
;; Functional
;; - all functions return a valu... | null | https://raw.githubusercontent.com/practicalli/clojure-through-code/82834cdab6b5315aea630386c851200f98d5e48f/src/clojure_through_code/live_demo.clj | clojure |
A general purpose programming language
- a modern LISP
Why Clojure
Functional
- all functions return a value & can be used as arguments / parameters
- deterministic: given the same input you get the same result
- types: making it faster to develop & test ideas
- runtime: continuously compiling & running code ... | Get Functional with Clojure
What is Clojure
- hosted on the Java Virtual Machine ( JVM ) , Microsoft CLR , JavaScript Engines ( V8 , Node )
Dynamic
Extensibility & Interop
- use other libraries on the hosted runtime ( JVM , CLR , JS )
Namespaces encourage a modular / component approach to Cl... |
a8e39f30fe17bba4779d7498cdb28b5e7f3dd94525b0511202a7abd6f723531d | kappelmann/eidi2_repetitorium_tum | ha14.ml | open Ha14_angabe
let master bind_addr port tickets = failwith "Todo" | null | https://raw.githubusercontent.com/kappelmann/eidi2_repetitorium_tum/1d16bbc498487a85960e0d83152249eb13944611/additional_exercises/2016_17/Blatt%2014%20L%C3%B6sungen/ocaml/ha14.ml | ocaml | open Ha14_angabe
let master bind_addr port tickets = failwith "Todo" | |
4f9ddb9436f2e577564072cd3ae49db43280b7b34630280c36392772db3021bd | opencog/opencog | nn.scm | ;
; "He stood at the goal line."
(define nn
(BindLink
(VariableList
(var-decl "$a-parse" "ParseNode")
(var-decl "$N1" "WordInstanceNode")
(var-decl "$N2" "WordInstanceNode")
(var-decl "$N1-lemma" "WordNode")
(var-decl "$N2-lemma" "WordNode")
)
(AndLink
(word-in-parse "$N1" "$a-parse")
(word-... | null | https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/opencog/nlp/relex2logic/rules/nn.scm | scheme |
"He stood at the goal line." | (define nn
(BindLink
(VariableList
(var-decl "$a-parse" "ParseNode")
(var-decl "$N1" "WordInstanceNode")
(var-decl "$N2" "WordInstanceNode")
(var-decl "$N1-lemma" "WordNode")
(var-decl "$N2-lemma" "WordNode")
)
(AndLink
(word-in-parse "$N1" "$a-parse")
(word-in-parse "$N2" "$a-parse")
(wo... |
a3a8ca2a1e9381ba26d774d72fbdf2b62fc191cce7ebd28170763ed7482ca175 | cyverse-archive/DiscoveryEnvironmentBackend | reference_genome.clj | (ns metadactyl.routes.domain.reference-genome
(:use [common-swagger-api.schema :only [->optional-param describe]]
[metadactyl.routes.params]
[schema.core :only [defschema optional-key]])
(:import [java.util Date UUID]))
(def ReferenceGenomeIdParam (describe UUID "A UUID that is used to identify the... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/metadactyl-clj/src/metadactyl/routes/domain/reference_genome.clj | clojure | (ns metadactyl.routes.domain.reference-genome
(:use [common-swagger-api.schema :only [->optional-param describe]]
[metadactyl.routes.params]
[schema.core :only [defschema optional-key]])
(:import [java.util Date UUID]))
(def ReferenceGenomeIdParam (describe UUID "A UUID that is used to identify the... | |
abf627320d8fc7f5cda2b8b4c93f8ee180c87107a5c5681c0517567ea7ae725e | samoht/camloo | lam.scm | ;; Le module
(module
__caml_lam
(library camloo-runtime)
(import
__caml_misc
__caml_const
__caml_lambda
__caml_prim
__caml_globals)
(export
(string_for_C_read_34@lam x1)
current_out_stream_102@lam
(ps_179@lam x1)
(pn_129@lam x1)
(pc_182@lam x1)
(pi_71@lam x1)
(pf... | null | https://raw.githubusercontent.com/samoht/camloo/29a578a152fa23a3125a2a5b23e325b6d45d3abd/src/camloo/Llib.bootstrap/lam.scm | scheme | Le module
Les variables globales
Les expressions globales | (module
__caml_lam
(library camloo-runtime)
(import
__caml_misc
__caml_const
__caml_lambda
__caml_prim
__caml_globals)
(export
(string_for_C_read_34@lam x1)
current_out_stream_102@lam
(ps_179@lam x1)
(pn_129@lam x1)
(pc_182@lam x1)
(pi_71@lam x1)
(pf_249@lam x1)
... |
3d31829140eb98860d2f8b2525a47db9fae31ed38d8e8078003a75cc7de33552 | simplegeo/erlang | naughty_child.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2002 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/simplegeo/erlang/15eda8de27ba73d176c7eeb3a70a64167f50e2c4/lib/stdlib/test/naughty_child.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2002 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(naughty_child).
-behaviour(gen_s... |
e935b76792203e7ff918c4c0a1c126456160e25df8e780c2e97d01a4b433c0b8 | gas2serra/cldk | medium.lisp | (in-package :cldk-raster-image)
;;;
;;; Medium
;;;
(defclass raster-image-medium (render-medium-mixin basic-medium)
())
| null | https://raw.githubusercontent.com/gas2serra/cldk/63c8322aedac44249ff8f28cd4f5f59a48ab1441/mcclim/Backends/RasterImage/medium.lisp | lisp |
Medium
| (in-package :cldk-raster-image)
(defclass raster-image-medium (render-medium-mixin basic-medium)
())
|
9205db9dd951d1b54c4edb36be9cb766209c66ac1d4b213da462848f376cbbed | nivertech/github-backup | Git.hs | git repository handling
-
- This is written to be completely independant of git - annex and should be
- suitable for other uses .
-
- Copyright 2010 , 2011 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- This is written to be completely independant of git-annex and should be
... | null | https://raw.githubusercontent.com/nivertech/github-backup/490bc0e1fe0395a54e70de5aa0201c81d1a64476/Git.hs | haskell | User-visible description of a git repo.
Location of the repo, either as a path or url.
Some code needs to vary between URL and normal repos,
- or bare and non-bare, these functions help with that.
git treats these the same as ssh
Path to a repository's gitattributes file.
Path to a repository's .git director... | git repository handling
-
- This is written to be completely independant of git - annex and should be
- suitable for other uses .
-
- Copyright 2010 , 2011 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- This is written to be completely independant of git-annex and should be
... |
2e17e8132aaf65ee4cbafc2b6e8c8ce2e9df8c5f3ba0d31f949c003763f64a14 | lichtblau/CommonQt | t12.lisp | ;;; -*- show-trailing-whitespace: t; indent-tabs-mode: nil -*-
;;; -t12.html
(defpackage :qt-tutorial-12
(:use :cl :qt)
(:export #:main))
(in-package :qt-tutorial-12)
(named-readtables:in-readtable :qt)
(defvar *qapp*)
(defclass cannon-field ()
((current-angle :initform 45
:accessor cur... | null | https://raw.githubusercontent.com/lichtblau/CommonQt/fa14472594b2b2b34695ec3fff6f858a03ec5813/tutorial/old/t12.lisp | lisp | -*- show-trailing-whitespace: t; indent-tabs-mode: nil -*-
-t12.html |
(defpackage :qt-tutorial-12
(:use :cl :qt)
(:export #:main))
(in-package :qt-tutorial-12)
(named-readtables:in-readtable :qt)
(defvar *qapp*)
(defclass cannon-field ()
((current-angle :initform 45
:accessor current-angle)
(current-force :initform 0
:accessor cur... |
4d2e228cc94ba753b664c73154712189e99bf0d2515f992ab7cc1e863a6cc811 | tek/ribosome | Persist.hs | -- |Persisting data across vim sessions
module Ribosome.Effect.Persist where
import Path (File, Path, Rel)
-- |This effect abstracts storing data of type @a@ in the file system to allow loading it when a plugin starts.
--
-- Each distinct type corresponds to a separate copy of this effect. When the same type should b... | null | https://raw.githubusercontent.com/tek/ribosome/a676b4f0085916777bfdacdcc761f82d933edb80/packages/ribosome/lib/Ribosome/Effect/Persist.hs | haskell | |Persisting data across vim sessions
|This effect abstracts storing data of type @a@ in the file system to allow loading it when a plugin starts.
Each distinct type corresponds to a separate copy of this effect. When the same type should be stored in separate
files for different components of the plugin, use 'Tagg... | module Ribosome.Effect.Persist where
import Path (File, Path, Rel)
The default interpreter delegates file path resolution to the effect ' Ribosome . Persist . PersistPath ' and uses JSON to
data Persist a :: Effect where
|Store a value in the persistence file or , if the first argument is ' Just ' , in that file ... |
42061c95bbc78e2ae6cfa05142d45500bc95956be738d496e19a9571d55fd4b9 | MaskRay/OJHaskell | jabuke.hs | import Control.Applicative
import Control.Monad
import Control.Monad.State
import Data.Char
import Data.Maybe
import Data.List
import qualified Data.ByteString.Char8 as B
data T x y = T !x !y
parse = do
_ <- readInt
m <- readInt
j <- readInt
xs <- replicateM j readInt
return (m,xs)
where
readInt = sta... | null | https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Croatian%20Open%20Competition%20in%20Informatics/2011-2012/contest%20%231/jabuke.hs | haskell | import Control.Applicative
import Control.Monad
import Control.Monad.State
import Data.Char
import Data.Maybe
import Data.List
import qualified Data.ByteString.Char8 as B
data T x y = T !x !y
parse = do
_ <- readInt
m <- readInt
j <- readInt
xs <- replicateM j readInt
return (m,xs)
where
readInt = sta... | |
857f3e45ce5c347bf7ca36ab4433d238f6d0a16b3687ef72e7be6b4450d1f01c | racket/typed-racket | tc-app-contracts.rkt | #lang racket/unit
;; This module provides custom type-checking rules for the expansion
;; of contracted values
(require "../../utils/utils.rkt"
"signatures.rkt"
"utils.rkt"
syntax/parse
"../signatures.rkt"
(only-in typed-racket/types/type-table add-typeof-expr)
(o... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-contracts.rkt | racket | This module provides custom type-checking rules for the expansion
of contracted values
shift -1 because it's provided +1
check that this is an application from the contract system
Assume that the contracted thing is of the same type the type
environment assigned to the exported identifier. Note that this
is only... | #lang racket/unit
(require "../../utils/utils.rkt"
"signatures.rkt"
"utils.rkt"
syntax/parse
"../signatures.rkt"
(only-in typed-racket/types/type-table add-typeof-expr)
(only-in typed-racket/types/tc-result ret)
(for-template racket/base
... |
f0fe1f3c27c5a34cf4b9ff3d729c7979619a09a5ad8d272d9ae02e6a3963f37c | fmthoma/shell-scripting-with-haskell | my-application-helpful.hs | #!/usr/bin/env stack
-- stack runhaskell --resolver=lts-8.0 --package=optparse-generic
# LANGUAGE DataKinds , DeriveGeneric , OverloadedStrings , TypeOperators #
import Options.Generic
data Command
= Foo
| Bar (Text <?> "Enter text here.")
(Maybe Text <?> "Some more text, if you want")
| ... | null | https://raw.githubusercontent.com/fmthoma/shell-scripting-with-haskell/bf7738fbbc806d3a9a072809fe2a91ec5865d8ec/optparse/my-application-helpful.hs | haskell | stack runhaskell --resolver=lts-8.0 --package=optparse-generic | #!/usr/bin/env stack
# LANGUAGE DataKinds , DeriveGeneric , OverloadedStrings , TypeOperators #
import Options.Generic
data Command
= Foo
| Bar (Text <?> "Enter text here.")
(Maybe Text <?> "Some more text, if you want")
| Baz { switch :: Bool <?> "Turn it on!"
, volume :: Int ... |
e36b91f01da5cd0486f03c92736957efa70880d0c4885d3f0aae2cb0892a2804 | toothbrush/dotfs | Datatypes.hs | {-# LANGUAGE GADTs, ExistentialQuantification, FlexibleInstances #-}
module System.DotFS.Core.Datatypes where
import Data.Maybe
import Text.ParserCombinators.Parsec.Prim
import Data.Map (lookup, fromList, Map)
import Data.Char (toLower)
import Prelude hiding (lookup)
data Conf = C FilePath deriving Show
-- our thre... | null | https://raw.githubusercontent.com/toothbrush/dotfs/36c7e62bda235728ffbb501fe1d2c34210a870a8/System/DotFS/Core/Datatypes.hs | haskell | # LANGUAGE GADTs, ExistentialQuantification, FlexibleInstances #
our threaded parser type
and the results
| primitives
| a config file is either just a normal file, to be passed
through unchanged, or else it's an annotated file with a header
and a body.
| the body is either a conditional block (shown depending o... | module System.DotFS.Core.Datatypes where
import Data.Maybe
import Text.ParserCombinators.Parsec.Prim
import Data.Map (lookup, fromList, Map)
import Data.Char (toLower)
import Prelude hiding (lookup)
data Conf = C FilePath deriving Show
type VarParser a = GenParser Char DFSState a
type VarName = String
type DFSSta... |
c52ea727d7e48f4db71a3325e205a8ed6803509fd724b176b6ec416ac68df014 | pfdietz/ansi-test | loop12.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Nov 17 08:47:43 2002
Contains : Tests for ALWAYS , NEVER , THEREIS
;;; Tests of ALWAYS clauses
(deftest loop.12.1
(loop for i in '(1 2 3 4) always (< i 10))
t)
(deftest loop.12.2
(loop for i in nil always nil)
t)
(deftest loop.12.3
(loop for i ... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/iteration/loop12.lsp | lisp | -*- Mode: Lisp -*-
Tests of ALWAYS clauses
Tests of NEVER
Tests of THEREIS
Error cases
Non-error cases
Test that explicit calls to macroexpand in subforms
are done in the correct environment | Author :
Created : Sun Nov 17 08:47:43 2002
Contains : Tests for ALWAYS , NEVER , THEREIS
(deftest loop.12.1
(loop for i in '(1 2 3 4) always (< i 10))
t)
(deftest loop.12.2
(loop for i in nil always nil)
t)
(deftest loop.12.3
(loop for i in '(a) always nil)
nil)
(deftest loop.12.4
(lo... |
6ece7e215050036d6eb0c878ecb01e4c97b951994641bd4bf518002d2d24c893 | footprintanalytics/footprint-web | on_demand_test.clj | (ns metabase.models.on-demand-test
"Tests for On-Demand FieldValues updating behavior for Cards and Dashboards."
(:require [clojure.test :refer :all]
[metabase.models.card :refer [Card]]
[metabase.models.dashboard :as dashboard :refer [Dashboard]]
[metabase.models.database :refer... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/models/on_demand_test.clj | clojure | +----------------------------------------------------------------------------------------------------------------+
| CARDS |
+--------------------------------------------------------------------------------------... | (ns metabase.models.on-demand-test
"Tests for On-Demand FieldValues updating behavior for Cards and Dashboards."
(:require [clojure.test :refer :all]
[metabase.models.card :refer [Card]]
[metabase.models.dashboard :as dashboard :refer [Dashboard]]
[metabase.models.database :refer... |
0e4a13d8a975b0b17df08665a5f287c69d92147b4b67744765f7cc3220d43af3 | ilevd/compile-time | core.clj | (ns compile-time.core)
(defmacro run
"Pass body to evaluate it at compile time.
All forms will be evaluated and the result of evaluating the last form will be returned."
[& forms]
(run! eval (butlast forms))
(eval (last forms)))
(defmacro run-fn
"Pass function and args to evaluate it at compile time."
... | null | https://raw.githubusercontent.com/ilevd/compile-time/b63f30ab00a667fd4aee21af49335f0b12e89a85/src/compile_time/core.clj | clojure | (ns compile-time.core)
(defmacro run
"Pass body to evaluate it at compile time.
All forms will be evaluated and the result of evaluating the last form will be returned."
[& forms]
(run! eval (butlast forms))
(eval (last forms)))
(defmacro run-fn
"Pass function and args to evaluate it at compile time."
... | |
8278ec8fd6f907f956b247c586ac5e8bed854e2ed2b677fd9dc620c79a686de0 | RichiH/git-annex | LockPool.hs | Wraps Utility . LockPool , making pid locks be used when git - annex is so
- configured .
-
- Copyright 2015 < >
-
- Licensed under the GNU GPL version 3 or higher .
- configured.
-
- Copyright 2015 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
modul... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Annex/LockPool.hs | haskell | Wraps Utility . LockPool , making pid locks be used when git - annex is so
- configured .
-
- Copyright 2015 < >
-
- Licensed under the GNU GPL version 3 or higher .
- configured.
-
- Copyright 2015 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
modul... | |
59b55f920b0f281f33684d9c279688ed9a8af8b93018b256daecbaa836e58a5f | stschiff/sequenceTools | smartpca_wrapper.hs | #!/usr/bin/env stack
-- stack script --resolver lts-14.1 --package turtle
{-# LANGUAGE OverloadedStrings #-}
import Control.Applicative (optional)
import Prelude hiding (FilePath)
import Turtle
data Options = Options {
optGeno :: FilePath,
optSnp :: FilePath,
optInd :: FilePath,
optOutPrefix :: FilePa... | null | https://raw.githubusercontent.com/stschiff/sequenceTools/7bdebf13937d8f6dff7da8b67091d57b6d4c47c4/scripts/smartpca_wrapper.hs | haskell | stack script --resolver lts-14.1 --package turtle
# LANGUAGE OverloadedStrings # | #!/usr/bin/env stack
import Control.Applicative (optional)
import Prelude hiding (FilePath)
import Turtle
data Options = Options {
optGeno :: FilePath,
optSnp :: FilePath,
optInd :: FilePath,
optOutPrefix :: FilePath,
optLSQproject :: Bool,
optPopList :: Maybe FilePath
}
main = do
args <-... |
13050f31a2f3ad027bcc436b3283ae00f2e33e6c36fd1cd5c84090c40527227c | yzh44yzh/practical_erlang | list_zipper.erl | -module(list_zipper).
-export([from_list/1, to_list/1,
left/1, left/2,
right/1, right/2,
get/1, set/2, position/1,
find/2, find_left/2, find_right/2
]).
-type lz() :: {[any()], any(), [any()], pos_integer()}.
-export_type([lz/0]).
%%% Module API
-spec from_list(list()) -... | null | https://raw.githubusercontent.com/yzh44yzh/practical_erlang/c9eec8cf44e152bf50d9bc6d5cb87fee4764f609/final_exercise/src/list_zipper.erl | erlang | Module API
Inner Functions | -module(list_zipper).
-export([from_list/1, to_list/1,
left/1, left/2,
right/1, right/2,
get/1, set/2, position/1,
find/2, find_left/2, find_right/2
]).
-type lz() :: {[any()], any(), [any()], pos_integer()}.
-export_type([lz/0]).
-spec from_list(list()) -> lz().
from_li... |
a24c70bbf047b75816230556384027e833eac72218317add6b4d6f5e8cdabf8f | myaosato/clcm | thematic-break.lisp | (defpackage :clcm/nodes/thematic-break
(:use :cl
:clcm/line
:clcm/node)
(:import-from :cl-ppcre
:scan)
(:export :thematic-break-node
:is-thematic-break-line
:attach-thematic-break!?))
(in-package :clcm/nodes/thematic-break)
;;
(defclass thematic-break-node (n... | null | https://raw.githubusercontent.com/myaosato/clcm/fd0390bedf00c5be3f5c2eb8176ff73bede797b0/src/nodes/thematic-break.lisp | lisp |
close not use
(defmethod close!? ((node thematic-break-node) line offset) nil)
add not use
(defmethod add!? ((node thematic-break-node) line offset) nil)
->html
| (defpackage :clcm/nodes/thematic-break
(:use :cl
:clcm/line
:clcm/node)
(:import-from :cl-ppcre
:scan)
(:export :thematic-break-node
:is-thematic-break-line
:attach-thematic-break!?))
(in-package :clcm/nodes/thematic-break)
(defclass thematic-break-node (node... |
224009bb68d866be98bceb9f389dfca13a39f76426e51d01940170ee194c7f12 | haskell/haskell-language-server | Main.hs | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
GHC no longer exports def in GHC 8.6 and above
# LANGUAGE TemplateHaskell #
module Main(main) where
import Arguments (Arguments (..),
... | null | https://raw.githubusercontent.com/haskell/haskell-language-server/6f5a73507f8d9266a486feaf8695c052362b9b95/ghcide/exe/Main.hs | haskell | stderr recorder just for plugin cli commands
WARNING: If you write to stdout before runLanguageServer
then the language server will not work
see WARNING above
if user uses --cwd option we need to make this path absolute (and set the current directory to it)
This plugin just installs a handler for the `i... | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
GHC no longer exports def in GHC 8.6 and above
# LANGUAGE TemplateHaskell #
module Main(main) where
import Arguments (Arguments (..),
... |
09bfda67282947f20037999a536f868654aaf982cc7b764d69175b675feed7a4 | Drup/dowsing | Hullot.mli | (** Hullot trees.
Allow to quickly iterates through bitsets that must
be both "large enough" and "small enough".
Parametrized by a bitvector module.
*)
module type S = sig
type bitset
(** [iter ~len ~big ~small] returns the sequence of
bitset [bs] of size [n] such that each [large bs]
and... | null | https://raw.githubusercontent.com/Drup/dowsing/ddb1c5c3f5c89e1b3ee95bc449ab456f7af19719/lib/unification/Hullot.mli | ocaml | * Hullot trees.
Allow to quickly iterates through bitsets that must
be both "large enough" and "small enough".
Parametrized by a bitvector module.
* [iter ~len ~big ~small] returns the sequence of
bitset [bs] of size [n] such that each [large bs]
and [small bs] are both true.
We assume th... |
module type S = sig
type bitset
val iter : len:int -> small:(bitset -> bool) -> large:(bitset -> bool) -> bitset Iter.t
end
include S with type bitset = Bitv.t
module Default : S with type bitset = Bitv.t
module Make (M : Bitv.S) : S with type bitset = M.t
|
b27ed61b42d722fe8aed2e756fef33bf91cb8f4bd0d0abfb7d907079390f308d | AshleyYakeley/Truth | FullNameRef.hs | module Pinafore.Language.Name.FullNameRef where
import Pinafore.Language.Name.FullName
import Pinafore.Language.Name.Name
import Pinafore.Language.Name.Namespace
import Pinafore.Language.Name.NamespaceRef
import Pinafore.Language.Name.ToText
import Shapes
data FullNameRef = MkFullNameRef
{ fnName :: Name
, fn... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/f567d19253bb471cbd8c39095fb414229b27706a/Pinafore/pinafore-language/lib/Pinafore/Language/Name/FullNameRef.hs | haskell | module Pinafore.Language.Name.FullNameRef where
import Pinafore.Language.Name.FullName
import Pinafore.Language.Name.Name
import Pinafore.Language.Name.Namespace
import Pinafore.Language.Name.NamespaceRef
import Pinafore.Language.Name.ToText
import Shapes
data FullNameRef = MkFullNameRef
{ fnName :: Name
, fn... | |
45bf879599ea4334edd1d736793913c124f4f250bc1708c15c3ca2c68d8e3b55 | axolotl-lang/axolotl | ArbitraryBlock.hs | module Analyser.Analysers.ArbitraryBlock where
import Analyser.Util (AnalyserResult, Env, getTypeOfExpr, hUnion)
import Control.Monad.State
( MonadIO (liftIO),
MonadState (get),
StateT (runStateT),
)
import qualified Data.HashTable.IO as H
import qualified Data.Text as T
import Parser.Ast (Expr (ArbitraryB... | null | https://raw.githubusercontent.com/axolotl-lang/axolotl/5567faebca0625eb46eba79d973fe8d2459c827e/src/Analyser/Analysers/ArbitraryBlock.hs | haskell |
Analysing arbitrary blocks means we need to analyse
all the expressions inside that arbitrary block, so
we just run it thorugh analyseExprs.
body :: [Expr] -> the set of exprs that the block is formed by
we now need to union the definitions made inside
this scope with the definitions ma... | module Analyser.Analysers.ArbitraryBlock where
import Analyser.Util (AnalyserResult, Env, getTypeOfExpr, hUnion)
import Control.Monad.State
( MonadIO (liftIO),
MonadState (get),
StateT (runStateT),
)
import qualified Data.HashTable.IO as H
import qualified Data.Text as T
import Parser.Ast (Expr (ArbitraryB... |
cebea420a5e470b0ed473b0b5ec8d8d343cbacd6be9d90586037d673cdbdf745 | INRIA/zelus | translate.ml | (***********************************************************************)
(* *)
(* *)
(* Zelus, a synchronous language for hybrid systems *)
(* ... | null | https://raw.githubusercontent.com/INRIA/zelus/685428574b0f9100ad5a41bbaa416cd7a2506d5e/compiler/gencode/translate.ml | ocaml | *********************************************************************
Zelus, a synchronous language for hybrid systems
... | ( c ) 2020 Paris ( see the file )
Automatique . All rights reserved . This file is distributed under
the terms of the INRIA Non - Commercial License Agreement ( see the
translation from zelus code to obc
open Zmisc
open Zident
open Global
open Deftypes
open Obc
let ap... |
d04774b7883912f6c024d4155a287893a9811b6013b1fd19c4acc7bca4fd636c | screenshotbot/screenshotbot-oss | test-object.lisp | ;;;; Copyright 2018-Present Modern Interpreters Inc.
;;;;
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(uiop:define-package :screenshotbot/model/test-object
(:use #:cl #:alexandria)
(:... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/053a95a8ac234b20b12d4182dccc3065e594ee53/src/screenshotbot/model/test-object.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
| This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(uiop:define-package :screenshotbot/model/test-object
(:use #:cl #:alexandria)
(:import-from #:bknr.datastore
#:store-objec... |
34018ffbb4b8c32d27d8c53c15e25c94fc3bd10dc08c9b3977ca869d57e20cd6 | dsheets/gloc | jssl.ml | open Printf
open Quot
type ('c,'sv,'dv) repr = ('c,'sv,'dv) code
let bool b = literal (string_of_bool b)
let float f = literal (string_of_float f)
let lam fn = func fn
let app = function
| `Fn f ->
if f#bound then (fun a -> literal (sprintf "%s(%s)" f#name (v a)))
else f#fn
| `Lit _ -> raise (Type_error "... | null | https://raw.githubusercontent.com/dsheets/gloc/d5917c072ec314ae93a61344da2407f520fac1b5/sketch/jssl.ml | ocaml | open Printf
open Quot
type ('c,'sv,'dv) repr = ('c,'sv,'dv) code
let bool b = literal (string_of_bool b)
let float f = literal (string_of_float f)
let lam fn = func fn
let app = function
| `Fn f ->
if f#bound then (fun a -> literal (sprintf "%s(%s)" f#name (v a)))
else f#fn
| `Lit _ -> raise (Type_error "... | |
680854f3f85f251e9367452877a276da0137bb27e1a4de552c3c6c294cab900f | diagrams/diagrams-lib | Align.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeFamilies #-}
-----------------------------------------------------------------------------
-- |
-- Module : Diagrams.ThreeD.Align
Copyright : ( c ) 2013 diagrams - lib team ( see LICENSE )
-- License : BSD-style (see LICENSE)
-- Maintainer :
--
... | null | https://raw.githubusercontent.com/diagrams/diagrams-lib/6f66ce6bd5aed81d8a1330c143ea012724dbac3c/src/Diagrams/ThreeD/Align.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE TypeFamilies #
---------------------------------------------------------------------------
|
Module : Diagrams.ThreeD.Align
License : BSD-style (see LICENSE)
Maintainer :
The basic idea is that alignment is achieved by moving diagrams'
local origins relat... |
Copyright : ( c ) 2013 diagrams - lib team ( see LICENSE )
Alignment combinators specialized for three dimensions . See
" Diagrams . Align " for more general alignment combinators .
their tops , we first move their local origins to the upper edge of
from " Diagrams . Combinators " ) .
module Diagrams... |
1295d76c7dd84743f91258b8a11c7aa78320663ff83d50c1377de3067e1dd7a2 | jaspervdj/b-tree | Invariants.hs | -- | A number of invariant checks on the B-tree type
module Data.BTree.Invariants
( invariants
, nodeSizeInvariant
, balancingInvariant
) where
import Data.BTree.Internal
import qualified Data.BTree.Array as A
-- | Check all invariants
invariants :: BTree k v -> Bool
invariants btree = all ($ btree) [... | null | https://raw.githubusercontent.com/jaspervdj/b-tree/0f1cc1ccf9538c399fe4f7979565ad132b81764a/tests/Data/BTree/Invariants.hs | haskell | | A number of invariant checks on the B-tree type
| Check all invariants
| Size of the root node (number of keys in it)
| Get the children of the root node as a list
| Check if a tree is a leaf
| Check that each node contains enough keys
| Check for perfect balancing
Check if all elements in a list are equal
D... | module Data.BTree.Invariants
( invariants
, nodeSizeInvariant
, balancingInvariant
) where
import Data.BTree.Internal
import qualified Data.BTree.Array as A
invariants :: BTree k v -> Bool
invariants btree = all ($ btree) [nodeSizeInvariant, balancingInvariant]
rootSize :: BTree k v -> Int
rootSize (... |
a69e86293f17956b0d0561339742303cad845794ff2d4d5f328089c4dd43e72e | ghcjs/ghcjs | conc008.hs |
module Main where
import Control.Concurrent
import Control.Exception
Send ourselves a KillThread signal , catch it and recover .
main = do
id <- myThreadId
Control.Exception.catch (killThread id) $
\e -> putStr (show (e::SomeException))
| null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/concurrent/conc008.hs | haskell |
module Main where
import Control.Concurrent
import Control.Exception
Send ourselves a KillThread signal , catch it and recover .
main = do
id <- myThreadId
Control.Exception.catch (killThread id) $
\e -> putStr (show (e::SomeException))
| |
bc3fed9680d6b6512819363580bd26a93c889577c7fd29e6f489220787b9128c | manuel-serrano/hop | interface.scm | ;*=====================================================================*/
* Author : * /
* Copyright : 2007 - 2009 , see LICENSE file * /
;* ------------------------------------------------------------- */
* This file is part of Scheme2Js . ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/scheme2js/runtime/interface.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* */
* but WITHOUT ANY WARRANTY; without even the implied warranty of */
* MERCHANTABILITY or FITNE... | * Author : * /
* Copyright : 2007 - 2009 , see LICENSE file * /
* This file is part of Scheme2Js . * /
* Scheme2Js is distributed in the hope that it will be useful , * /
(module interface
(main my-main... |
d943d20d5b6ebe2aa7c072e2ef4aa2150450f9f782067095d449296c9fe994a0 | katydid/katydid-haskell | Spec.hs | # LANGUAGE FlexibleInstances #
-- |
-- This module runs the relapse parsing and validation tests.
module Main where
import qualified Test.Tasty as T
import qualified Test.Tasty.HUnit as HUnit
import qualified ParserSpec
import qualified Suite
import qualified RelapseSpec
import qualif... | null | https://raw.githubusercontent.com/katydid/katydid-haskell/4588cd8676628cd15c671d61b65bdc2f3a199a38/test/Spec.hs | haskell | |
This module runs the relapse parsing and validation tests. | # LANGUAGE FlexibleInstances #
module Main where
import qualified Test.Tasty as T
import qualified Test.Tasty.HUnit as HUnit
import qualified ParserSpec
import qualified Suite
import qualified RelapseSpec
import qualified DeriveSpec
import qualified Data.Katydid.Parser.Protobuf.Descri... |
6fc8524bc214f10de40c50a7dbb222962bb2abc3461ae34619d98e3d1a45b8e4 | release-project/benchmarks | ant_colony.erl | %% A single ant colony: spawns a set of ants, loops round getting them to construct new solutions
-module(ant_colony).
-export([init/5]).
-include ("types.hrl").
% The value 'none' below is used to represent the state at the very start
% when we don't have a current best solution.
-spec best_solution (solution(), s... | null | https://raw.githubusercontent.com/release-project/benchmarks/55f042dca3a2c680e2967c59edc9636456047bd5/ACO/TL-ACO/ant_colony.erl | erlang | A single ant colony: spawns a set of ants, loops round getting them to construct new solutions
The value 'none' below is used to represent the state at the very start
when we don't have a current best solution.
or use lists:foldl.
io:format ("Colony ~p got new solution~n",[self()]),
io:format ("~p: receive... |
-module(ant_colony).
-export([init/5]).
-include ("types.hrl").
-spec best_solution (solution(), solution()|none) -> solution().
best_solution(Solution, none) -> Solution;
best_solution(S1 = {Cost1, _}, S2 = {Cost2, _}) ->
if
Cost1 =< Cost2 -> S1;
true -> S2
end.
-spec collect_ants(non_neg_integer(... |
5c9ebd81973abf4241fc860422c8b7533b81cb5dd2ee967f206a2c3a033c707b | K2InformaticsGmbH/imem | imem_sql.erl | -module(imem_sql).
-include("imem_sql.hrl").
-define(MaxChar,16#FFFFFF).
-export([ exec/5
, parse/1
, prune_fields/2
]).
-export([ escape_sql/1
, un_escape_sql/1
, meta_rec/4
, params_from_opts/2
, statement_class/1
, parse_sql_name/1
, physica... | null | https://raw.githubusercontent.com/K2InformaticsGmbH/imem/602b6cd31ea1af00041a9318119ab0c3e4d5b59a/src/imem_sql.erl | erlang | remote query of a simple table/partition on another node
local query (mapped to "" in GUI)
cluster sharded query, simple table/partition across all nodes
remote partitioned, time partitions on another node
partitioned, time partitions on local node
cluster partitioned, all partitions on all nodes
rr(imem_stateme... | -module(imem_sql).
-include("imem_sql.hrl").
-define(MaxChar,16#FFFFFF).
-export([ exec/5
, parse/1
, prune_fields/2
]).
-export([ escape_sql/1
, un_escape_sql/1
, meta_rec/4
, params_from_opts/2
, statement_class/1
, parse_sql_name/1
, physica... |
fd71e21d39702c9c70e1c7e5b921806dd3bf713defe3408814e1e519711eda53 | xh4/web-toolkit | wrapper-example.lisp | (in-package #:cffi-example)
(defwrapper* "b0" :long ((x :long)) "return x;")
(defwrapper* "b1" :long ((x :long)) "return x;")
(defwrapper* "b2" :long ((x :long)) "return x;")
(defwrapper* "b3" :long ((x :long)) "return x;")
(defwrapper* "b4" :long ((x :long)) "return x;")
(define "b0_cffi_wrap(x)"
"b0_cffi_wrap(b1_... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/cffi_0.20.1/examples/wrapper-example.lisp | lisp | (define "b3_cffi_wrap(x)"
"b0_cffi_wrap(b1_cffi_wrap(b2_cffi_wrap(b3_cffi_wrap(b4_cffi_wrap(+x+x)))))")
"b0_cffi_wrap(b1_cffi_wrap(b2_cffi_wrap(b3_cffi_wrap(b4_cffi_wrap(+x+x)))))") | (in-package #:cffi-example)
(defwrapper* "b0" :long ((x :long)) "return x;")
(defwrapper* "b1" :long ((x :long)) "return x;")
(defwrapper* "b2" :long ((x :long)) "return x;")
(defwrapper* "b3" :long ((x :long)) "return x;")
(defwrapper* "b4" :long ((x :long)) "return x;")
(define "b0_cffi_wrap(x)"
"b0_cffi_wrap(b1_... |
9b29f5289ca8a58e7c0df1e752c23bf88de36895f370b154310ac778b7a3e5a5 | dongcarl/guix | monitoring.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2016 , 2021 , 2021 < >
Copyright © 2018 < >
Copyright © 2017 , 2018 , 2019 , 2020 < >
Copyright © 2018 , 2020 , 2021 < >
Copyright © 2018 < >
Copyright © 2018 , 2019 , 2020 < >
Copyright © 2020 < >
Copyright © 202... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/monitoring.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2016 , 2021 , 2021 < >
Copyright © 2018 < >
Copyright © 2017 , 2018 , 2019 , 2020 < >
Copyright © 2018 , 2020 , 2021 < >
Copyright © 2018 < >
Copyright © 2018 , 2019 , 2020 < >
Copyright © 2020 < >
Copyright © 2020 < >
Copyright © 2021 < >
Copyright © 2021... |
6c121947f139a1afa7fc349974eab16491925358f64c3b2486a7caae06603c0c | mbj/stratosphere | Table.hs | module Stratosphere.Timestream.Table (
module Exports, Table(..), mkTable
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Timestream.Table.MagneticStoreWritePropertiesProperty as Exports
import {-# S... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/timestream/gen/Stratosphere/Timestream/Table.hs | haskell | # SOURCE #
# SOURCE # | module Stratosphere.Timestream.Table (
module Exports, Table(..), mkTable
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Table
= Table {d... |
292f8c954a8c5c56b0f0fcb1c58cffec863444ba0e9d142a5e024326097efa80 | reactiveml/rml | lk_ast.ml | (**********************************************************************)
(* *)
(* ReactiveML *)
(* *)
(* ... | null | https://raw.githubusercontent.com/reactiveml/rml/d3ac141bd9c6e3333b678716166d988ce04b5c80/compiler/lk/lk_ast.ml | ocaml | ********************************************************************
ReactiveML
... | Copyright 2002 , 2007 . All rights reserved .
version 1.0 .
- theme SPI , Laboratoire d'Informatique de Paris 6 ( 2002 - 2005 )
- Verimag , CNRS Grenoble ( 2005 - 2006 )
- projet , ( 2006 - 2007 ) ... |
8e15ac4c455cf532027698220c5b4547fe250e3cba7682a1ce1ce90f0c5c9a5e | docker-in-aws/docker-in-aws | form_configs.cljs | (ns swarmpit.component.service.form-configs
(:require [material.component :as comp]
[material.component.form :as form]
[material.component.list-table-form :as list]
[swarmpit.component.state :as state]
[swarmpit.ajax :as ajax]
[swarmpit.routes :as routes]
... | null | https://raw.githubusercontent.com/docker-in-aws/docker-in-aws/bfc7e82ac82ea158bfb03445da6aec167b1a14a3/ch16/swarmpit/src/cljs/swarmpit/component/service/form_configs.cljs | clojure | (ns swarmpit.component.service.form-configs
(:require [material.component :as comp]
[material.component.form :as form]
[material.component.list-table-form :as list]
[swarmpit.component.state :as state]
[swarmpit.ajax :as ajax]
[swarmpit.routes :as routes]
... | |
5c139ab2f948c414d7a32a9f296947fcd36fc09e43f607694d8a8b4f3c915fb4 | CryptoKami/cryptokami-core | Lang.hs | -- | Language.
# OPTIONS_GHC -F -pgmF autoexporter #
| null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/auxx/src/Lang.hs | haskell | | Language. |
# OPTIONS_GHC -F -pgmF autoexporter #
|
7b84e38b9a3b2a423d395f008d3ed2b96bf9d154526fccc4dd93cb948338ded3 | airalab/hs-web3 | Engine.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : Network.Polkadot.Rpc.Engine
Copyright : 2016 - 2021
-- License : Apache-2.0
--
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
-- Polkadot RPC methods with `engine` prefix.
--
module... | null | https://raw.githubusercontent.com/airalab/hs-web3/c03b86eb621f963886a78c39ee18bcec753f17ac/packages/polkadot/src/Network/Polkadot/Rpc/Engine.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module : Network.Polkadot.Rpc.Engine
License : Apache-2.0
Maintainer :
Stability : experimental
Portability : portable
Polkadot RPC methods with `engine` prefix.
| Instructs the manual-seal authorship task to create a new block.
^ Create empty
^ Finalize
... | # LANGUAGE FlexibleContexts #
Copyright : 2016 - 2021
module Network.Polkadot.Rpc.Engine where
import Data.ByteArray.HexString (HexString)
import Network.JsonRpc.TinyClient (JsonRpc (..))
import Network.Polkadot.Rpc.Types (CreatedBlock)
createBlock :: JsonRpc m
... |
f8769a544de555126fd5bcae57688e254c56215a6be00b3acca9e72d0b1438d1 | lsrcz/grisette | SimpleMergeable.hs | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE PatternSynonyms #
# LANGUAGE QuantifiedConstraints #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE Trustworthy #
# LANGUAGE TypeOpe... | null | https://raw.githubusercontent.com/lsrcz/grisette/a6de4acb2ffd43315b6a34def85860e4cd8c7c8a/src/Grisette/Core/Data/Class/SimpleMergeable.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
|
License : BSD-3-Clause (see the LICENSE file)
Maintainer :
Stability : Experimental
* Simple mergeable types
* UnionLike operations
# SOURCE #
$setup
| Auxiliary class for the generic derivation for the 'SimpleMergeable' class.
| This class indicates ... | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE PatternSynonyms #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE Trustworthy #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# LANGUA... |
0b019f2fc29e9d0860256b642f150f0aacba4ad52c2bb3dbd754cc8f26119b86 | ryzhyk/cocoon | Parse.hs |
Copyrights ( c ) 2016 . Samsung Electronics Ltd. All right reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in ... | null | https://raw.githubusercontent.com/ryzhyk/cocoon/409d10b848a4512e7cf653d5b6cf6ecf247eb794/cocoon/Parse.hs | haskell | semiSep = T.semiSep lexer
semiSep1 = T.semiSep1 lexer
stringLit = T.stringLiteral lexer
charLit = T.charLiteral lexer
<*> ((fst . head . readDec) <$> many1 digit) |
Copyrights ( c ) 2016 . Samsung Electronics Ltd. All right reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in ... |
39d0d0a463047837bdbe5a838902e895a1231e6462a62cb02d75cc5521e1f7c6 | ranjitjhala/sprite-lang | Prims.hs | {-# LANGUAGE OverloadedStrings #-}
module Language.Sprite.L3.Prims where
import qualified Data.Maybe as Mb
import qualified Data.Map as M
import qualified Language.Fixpoint.Types as F
import qualified Language.Sprite.Common.UX as UX
import qualified Language . Sprite . Com... | null | https://raw.githubusercontent.com/ranjitjhala/sprite-lang/bebfa8a8de6d558853145cbed8c511daa9bda3c7/src/Language/Sprite/L3/Prims.hs | haskell | # LANGUAGE OverloadedStrings #
| Primitive Types --------------------------------------------------
Misc.traceShow "mkTy" . |
module Language.Sprite.L3.Prims where
import qualified Data.Maybe as Mb
import qualified Data.Map as M
import qualified Language.Fixpoint.Types as F
import qualified Language.Sprite.Common.UX as UX
import qualified Language . Sprite . Common . Misc as Misc
import ... |
2e6b6173357d3b0dbb0e0cff7f21d3ea4042a317ec66d3328ffe791a11d2710e | BillHallahan/G2 | LetFloating5.hs | module LetFloating4 where
f :: Int -> Int -> Int
f x y = x + g y
where
# NOINLINE g #
g :: Int -> Int
g z =
let
# NOINLINE h #
h = \q -> q + 1
in
z + h z
output19 :: Int -> Int -> Int -> Bool
output19 _ _ = (19 ==)
| null | https://raw.githubusercontent.com/BillHallahan/G2/dfd377793dcccdc7126a9f4a65b58249673e8a70/tests/TestFiles/LetFloating/LetFloating5.hs | haskell | module LetFloating4 where
f :: Int -> Int -> Int
f x y = x + g y
where
# NOINLINE g #
g :: Int -> Int
g z =
let
# NOINLINE h #
h = \q -> q + 1
in
z + h z
output19 :: Int -> Int -> Int -> Bool
output19 _ _ = (19 ==)
| |
dda83b551cf1dab83c9500c22cbe044ddb422d0c126e852a1acfd53710dd2198 | owlbarn/owl_ode | ode.ml |
* OWL - OCaml Scientific and Engineering Computing
* OWL - ODE - Ordinary Differential Equation Solvers
*
* Copyright ( c ) 2019 >
* Copyright ( c ) 2019 < >
* OWL - OCaml Scientific and Engineering Computing
* OWL-ODE - Ordinary Differential Equation Solvers
*
* Copyright (c) 2019 Ta-Chu... | null | https://raw.githubusercontent.com/owlbarn/owl_ode/5d934fbff87eea9f060d6c949bf78467024d8791/src/base/ode.ml | ocaml |
* OWL - OCaml Scientific and Engineering Computing
* OWL - ODE - Ordinary Differential Equation Solvers
*
* Copyright ( c ) 2019 >
* Copyright ( c ) 2019 < >
* OWL - OCaml Scientific and Engineering Computing
* OWL-ODE - Ordinary Differential Equation Solvers
*
* Copyright (c) 2019 Ta-Chu... | |
a7f3cbdd2cf34f58b6d5e4bf53dd05aebffbf2eb75ad74995240bf9b64fb123b | metabase/hawk | parallel.clj | (ns mb.hawk.parallel
"Code related to running parallel tests, and utilities for disallowing dangerous stuff inside them."
(:require
[clojure.test :as t]
[eftest.runner]))
(defn parallel?
"Whether `test-var` can be ran in parallel with other parallel tests."
[test-var]
(let [metta (meta test-var)]
(... | null | https://raw.githubusercontent.com/metabase/hawk/47e3abf80d04d12f229aabffcf496f02cd9fffd5/src/mb/hawk/parallel.clj | clojure | (ns mb.hawk.parallel
"Code related to running parallel tests, and utilities for disallowing dangerous stuff inside them."
(:require
[clojure.test :as t]
[eftest.runner]))
(defn parallel?
"Whether `test-var` can be ran in parallel with other parallel tests."
[test-var]
(let [metta (meta test-var)]
(... | |
e24de364621265d5e585039fa5fbfa866bfaeeefdf72d6ec9bf072ace69b069a | huangz1990/SICP-answers | 60-intersection-set.scm | ;;; 60-intersection-set.scm
(load "p103-element-of-set.scm")
(define (intersection-set set another)
(define (iter set result)
(if (or (null? set) (null? another))
(reverse result)
(let ((current-element (car set))
(remain-element (cdr set)))
(if (a... | null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/60-intersection-set.scm | scheme | 60-intersection-set.scm |
(load "p103-element-of-set.scm")
(define (intersection-set set another)
(define (iter set result)
(if (or (null? set) (null? another))
(reverse result)
(let ((current-element (car set))
(remain-element (cdr set)))
(if (and (element-of-set? current-... |
8e24610eef2d1ae402f588cf88bf8af80d3be607dce550addd77e4a1ad6b9ae7 | facebook/duckling | Tests.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.
module Duckling.Ordinal.MN.Tests
( tests ) where
import Prelude
import Data.String
import Test.Tasty
imp... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/tests/Duckling/Ordinal/MN/Tests.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. | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Ordinal.MN.Tests
( tests ) where
import Prelude
import Data.String
import Test.Tasty
import Duckling.Dimensions.Types
import Duckling.Ordinal.MN.Corpus
import Duckling.Testing.Asserts
tests :: TestTree
tests = testGroup "MN Tests"
[ makeCorpusT... |
bc2993f8659d44f677500bd76523f9e7f8b836352efae4ff85dc2c25d60cb9fd | informatimago/lisp | manifest.lisp | -*- mode : lisp;coding : utf-8 -*-
;;;;**************************************************************************
FILE : manifest.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; Check the licenses of the dependencies, wr... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/tools/manifest.lisp | lisp | coding : utf-8 -*-
**************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
Check the licenses of the dependencies, write a manifest.
LEGAL
This program is free software: you can redistribute it and/or modify
(... | FILE : manifest.lisp
USER - INTERFACE :
< PJB > < >
MODIFICATIONS
2012 - 03 - 14 < PJB > Extracted from generate-cli.lisp
2014 - 02 - 21 < PJB > Exported print - manifest .
AGPL3
Copyright 2012 - 2016
it under the terms of the GNU Affero General Public License... |
2022911ed675954c68f8b8e92b2a1ab5da947befdc2d4adcfcbbe25b6c5042ff | dfordivam/tenjinreader | TopWidget.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecursiveDo #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE CPP #
module TopWidget
(topWidget
... | null | https://raw.githubusercontent.com/dfordivam/tenjinreader/894a6f6b23d52c9c048740c0ea62f4c0f47d9561/frontend/src/TopWidget.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE ConstraintKinds #
# LANGUAGE RankNTypes #
from package common
close event
reconnect
navigation with visibility control
TODO: Fix this | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecursiveDo #
# LANGUAGE CPP #
module TopWidget
(topWidget
, readable_bootstrap_css
, custom_css)
where
import FrontendCommon
import SrsWidget
import ... |
7ae0cd87b5b62e8df5879f799457d1768dd256ec487478ba5005c641fd0ab824 | potetm/tire-iron | browser_other.cljs | (ns com.potetm.browser-other)
(defn my-fun []
(println "FUN"))
| null | https://raw.githubusercontent.com/potetm/tire-iron/f26e3f68c137ea10e42645ea2977e9c755558b08/src/dev/browser/com/potetm/browser_other.cljs | clojure | (ns com.potetm.browser-other)
(defn my-fun []
(println "FUN"))
| |
5bf9afff47716dc6fbcd359bff2cf2d8f1d93e4d7aca71bb1bf8455cc2be2796 | macourtney/drift | test_args.clj | (ns drift.test-args
(:use clojure.test drift.args))
(deftest test-split-args
(is (= (split-args ["foo" "-v" "bar" "baz"] #{"-v"} )
[["foo"] ["-v" "bar" "baz"]]))
(is (= (split-args ["foo" "bar" "baz"] #{"-v"} )
[["foo" "bar" "baz"] []])))
(deftest test-remove-opt
(is (= (remove-opt ["-v... | null | https://raw.githubusercontent.com/macourtney/drift/b5cf735ab41ff2c95b0b1d9cf990faa342353171/test/drift/test_args.clj | clojure | (ns drift.test-args
(:use clojure.test drift.args))
(deftest test-split-args
(is (= (split-args ["foo" "-v" "bar" "baz"] #{"-v"} )
[["foo"] ["-v" "bar" "baz"]]))
(is (= (split-args ["foo" "bar" "baz"] #{"-v"} )
[["foo" "bar" "baz"] []])))
(deftest test-remove-opt
(is (= (remove-opt ["-v... | |
f2d162743a722a7653d01ec1abc859baab9114a163ec8c6c931386d1b5e5bd71 | serokell/ariadne | Hspec.hs | | Wrappers around hspec functionality that uses ' Buildable ' instead of
' Show ' to better fit in with the rest of the Cardano codebase
--
Intended as a drop - in replacement for " Test . HSpec " .
module Util.Buildable.Hspec (
* Wrappers around Test . HSpec . Expectations
shouldSatisfy
, shouldBe
, sh... | null | https://raw.githubusercontent.com/serokell/ariadne/5f49ee53b6bbaf332cb6f110c75f7b971acdd452/ariadne/cardano/test/backend/Util/Buildable/Hspec.hs | haskell |
* Working with Validated
* Re-exports
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------------------------------------------------------------------------}
---------------------------------------------... | | Wrappers around hspec functionality that uses ' Buildable ' instead of
' Show ' to better fit in with the rest of the Cardano codebase
Intended as a drop - in replacement for " Test . HSpec " .
module Util.Buildable.Hspec (
* Wrappers around Test . HSpec . Expectations
shouldSatisfy
, shouldBe
, shoul... |
016ac45066e966b46ae09fc74197550a90ee0dda044cb2107d3024c600a2bb8a | OtpChatBot/Ybot | talker_app_client.erl | %%%-----------------------------------------------------------------------------
%%% @author 0xAX <>
%%% @doc
Talkerapp transport client .
%%% @end
%%%-----------------------------------------------------------------------------
-module(talker_app_client).
-behaviour(gen_server).
-export([start_link/5]).
%% gen_... | null | https://raw.githubusercontent.com/OtpChatBot/Ybot/5ce05fea0eb9001d1c0ff89702729f4c80743872/src/transport/talkerapp/talker_app_client.erl | erlang | -----------------------------------------------------------------------------
@author 0xAX <>
@doc
@end
-----------------------------------------------------------------------------
gen_server callbacks
@doc Internal state.
callback module with handler
connected socket
user access token
Bot nick
talkerapp roo... | Talkerapp transport client .
-module(talker_app_client).
-behaviour(gen_server).
-export([start_link/5]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
@doc Default port for Talkerapp .
-define(PORT, 8500).
-record(sta... |
b2e5adbbc3015f5a74302cf124413c83038bce27e5c62a1f5b61cc959679af92 | vikram/lisplibraries | counter.lisp | ;; -*- lisp -*-
(in-package :it.bese.ucw-user)
First we 'll define the main component for our application . It
;;;; will hold the current value and a boolean specifying whether we
;;;; want to accept negative values or not.
(defcomponent counter (template-component)
two slots , both are backtracked .
((value :... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/ucw-boxset/ucw_dev/examples/counter.lisp | lisp | -*- lisp -*-
will hold the current value and a boolean specifying whether we
want to accept negative values or not.
This action will just increment the current value of the counter.
This action will decrement the counter. However if the user tries
to give the counter a negative value we ask for if they're
sure. ... |
(in-package :it.bese.ucw-user)
First we 'll define the main component for our application . It
(defcomponent counter (template-component)
two slots , both are backtracked .
((value :accessor value
:initarg :value
:initform 0)
(allow-negatives :accessor allow-negatives
:inita... |
889754bbb113e4ba5bab9a9b2d6b6d6f6d44c37d1afd5ba2e106bea85f9366b6 | informatimago/lisp | sedit2.lisp | -*- mode : lisp;coding : utf-8 -*-
;;;;**************************************************************************
FILE : sedit.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; A simple sexp editor.
;;;;
;;;; It is invo... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/small-cl-pgms/sedit/sedit2.lisp | lisp | coding : utf-8 -*-
**************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
A simple sexp editor.
It is invoked as (sedit sexp), and returns the modified sexp.
(The sexp is modified destructively).
(sedit (... | FILE : sedit.lisp
USER - INTERFACE :
b backward p previous to select the sexp preceding the selection ( or out ) .
< PJB > < >
MODIFICATIONS
2010 - 09 - 08 < PJB > Created .
AGPL3
Copyright 2010 - 2016
it under the terms of the GNU Affero General Public Licen... |
fc1e39c046b6c5cbe5064612285d9dcd2f5bcf9207ab5f793e0078201bcbf1f8 | kadena-io/pact | Types.hs | # LANGUAGE DeriveFunctor #
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TemplateHaskell #-}
| Types related to pars... | null | https://raw.githubusercontent.com/kadena-io/pact/e2f3dd1fd1952bb4f736042083769b52dbb2a819/src-tool/Pact/Analyze/Parse/Types.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE TemplateHaskell #
literals
identifiers
In conversion from @Exp@ to @PreProp@ we maintain a distinction between
bound and unbound variables. Bound (@PreVar@) variables are bound inside
definiti... | # LANGUAGE DeriveFunctor #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
| Types related to parsing from ' Exp ' to ' Prop ' and ' Invariant ' .
module Pact.Analyze.Parse.Types where
import Control.Applicative (Alternative)
import ... |
e28513f372a556203a6f02af0c19da458c1b2aefd5d21ff8d16bccd5b10f116b | modular-macros/ocaml-macros | t090-acc6.ml | open Lib;;
let x = true in
let y = false in
let z = false in
let a = false in
let b = false in
let c = false in
let d = false in
();
if not x then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 CONST1
10 PUSHCONST0
11 PUS... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/tool-ocaml/t090-acc6.ml | ocaml | open Lib;;
let x = true in
let y = false in
let z = false in
let a = false in
let b = false in
let c = false in
let d = false in
();
if not x then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 CONST1
10 PUSHCONST0
11 PUS... | |
1559fb3726eff1a4ceb4ceeff9c2a9f51ff96806ed08e55497df5bc1b11b612b | bravit/hid-examples | STExcept.hs | {-# LANGUAGE DeriveAnyClass #-}
module STExcept where
import Data.Text (Text)
import Control.Monad.Catch
import Network.HTTP.Req
import qualified Network.HTTP.Client as NC
import Types
data RequestError = EmptyRequest | WrongDay Text
deriving Show
data SunInfoException = UnknownLocation Text
... | null | https://raw.githubusercontent.com/bravit/hid-examples/913e116b7ee9c7971bba10fe70ae0b61bfb9391b/suntimes/STExcept.hs | haskell | # LANGUAGE DeriveAnyClass # |
module STExcept where
import Data.Text (Text)
import Control.Monad.Catch
import Network.HTTP.Req
import qualified Network.HTTP.Client as NC
import Types
data RequestError = EmptyRequest | WrongDay Text
deriving Show
data SunInfoException = UnknownLocation Text
| UnknownTime GeoCoords
... |
3940c2cfd2bc75d0e249e8cabcc419f1ab53b0c62defd2e5afe38bf8afba9a92 | aumouvantsillage/Hydromel-lang | main.rkt | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
#lang racket
(require
"lib/expander.rkt"
"lib/checker.rkt"
"lib/std.rkt")
(provide
(all-from-out "lib/expander.rkt")
(all-from-out ... | null | https://raw.githubusercontent.com/aumouvantsillage/Hydromel-lang/e5416cdbdf07dd8f47cda48273f5ff2d0fee5007/hydromel/main.rkt | racket | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
#lang racket
(require
"lib/expander.rkt"
"lib/checker.rkt"
"lib/std.rkt")
(provide
(all-from-out "lib/expander.rkt")
(all-from-out ... | |
518b6c5cc20a406d98ddc3ff10928009b8fac9778531ff1b794229f8f2f68f5b | PuercoPop/Movitz | special-operators-cl.lisp | ;;;;------------------------------------------------------------------
;;;;
Copyright ( C ) 2000 - 2005 ,
Department of Computer Science , University of Tromso , Norway
;;;;
;;;; Filename: special-operators-cl.lisp
;;;; Description: Special operators in the COMMON-LISP package.
Author : ... | null | https://raw.githubusercontent.com/PuercoPop/Movitz/7ffc41896c1e054aa43f44d64bbe9eaf3fcfa777/special-operators-cl.lisp | lisp | ------------------------------------------------------------------
Filename: special-operators-cl.lisp
Description: Special operators in the COMMON-LISP package.
Distribution: See the accompanying file COPYING.
------------------------------------------------------------... | Copyright ( C ) 2000 - 2005 ,
Department of Computer Science , University of Tromso , Norway
Author : < >
Created at : Fri Nov 24 16:31:11 2000
$ I d : special - operators - cl.lisp , v 1.55 2008 - 07 - 09 19:57:02 Exp $
(in-package movitz)
(define-special-operator progn (&all all &fo... |
b22960ced858d27ff4e7991844e5047b8958fb06bc9a9c9fa506962a56646d84 | rvantonder/hack_parallel | hack_core_list.ml | module UnlabeledList = List
module List = StdLabels.List
module String = StdLabels.String
let invalid_argf = Hack_core_printf.invalid_argf
module T = struct
type 'a t = 'a list
end
include T
let of_list t = t
let range ?(stride=1) ?(start=`inclusive) ?(stop=`exclusive) start_i stop_i =
if stride = 0 then
i... | null | https://raw.githubusercontent.com/rvantonder/hack_parallel/c9d0714785adc100345835c1989f7c657e01f629/src/third-party/hack_core/hack_core_list.ml | ocaml | Generate the range from the last element, so that we do not need to rev it
Standard functions
This is a copy of the standard library assq function.
* changing the order of arguments on some standard [List] functions.
* For the container interface.
* Tail recursive versions of standard [List] module
* Additiona... | module UnlabeledList = List
module List = StdLabels.List
module String = StdLabels.String
let invalid_argf = Hack_core_printf.invalid_argf
module T = struct
type 'a t = 'a list
end
include T
let of_list t = t
let range ?(stride=1) ?(start=`inclusive) ?(stop=`exclusive) start_i stop_i =
if stride = 0 then
i... |
46654541ce19d27dfbcaf878fc6c4d1661bee9c22694c07988d2970890e35656 | repl-electric/.sonic-pi | reverb.sps | #key: reverb
#point_line:1
#point_index:2
# --
with_fx(:reverb, room: 0.6, mix: 0.4, damp: 0.5) do |r_fx|
end
| null | https://raw.githubusercontent.com/repl-electric/.sonic-pi/a00c733f0a5fa1fa0aa65bf06fe7ab71654d2da9/snippets/reverb.sps | scheme | #key: reverb
#point_line:1
#point_index:2
# --
with_fx(:reverb, room: 0.6, mix: 0.4, damp: 0.5) do |r_fx|
end
| |
97819e5ef9133316c0d6d7b7009cddfe20753aadaaacd98e8cbf8b627e9a72ed | deverl-ide/deverl | deverl_lib_widgets.erl | %% =====================================================================
%% This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
%% (at your option) any later vers... | null | https://raw.githubusercontent.com/deverl-ide/deverl/69216c7720ce2a32344711f5526c0eb9676bcae0/deverl/src/deverl_lib_widgets.erl | erlang | =====================================================================
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTAB... | it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
@author < >
@author < >
, 2014
-module(deverl_lib_widgets).
-include_lib("wx/include/wx.hrl"... |
28538ee17a94b0f03e49e75eaa17565247b9ccd15ef562a3b270870846338cae | metabase/metabase | query.cljc | (ns metabase.lib.query
(:require
[malli.core :as mc]
[metabase.lib.dispatch :as lib.dispatch]
[metabase.lib.metadata :as lib.metadata]
[metabase.lib.options :as lib.options]
[metabase.lib.schema :as lib.schema]
[metabase.lib.util :as lib.util]
[metabase.util.malli :as mu]))
(def ^:private Metada... | null | https://raw.githubusercontent.com/metabase/metabase/02e9aa420ef910138b9b5e05f74c96e31286bcf2/src/metabase/lib/query.cljc | clojure | for a native query.
or results metadata? | (ns metabase.lib.query
(:require
[malli.core :as mc]
[metabase.lib.dispatch :as lib.dispatch]
[metabase.lib.metadata :as lib.metadata]
[metabase.lib.options :as lib.options]
[metabase.lib.schema :as lib.schema]
[metabase.lib.util :as lib.util]
[metabase.util.malli :as mu]))
(def ^:private Metada... |
35e9d5486928ec3daf6cc991b8476711aadea98536c382ee9ba213633119b573 | vehicle-lang/vehicle | DeBruijn.hs | # LANGUAGE GeneralizedNewtypeDeriving #
module Vehicle.Expr.DeBruijn
( DBBinding,
DBIndex (..),
DBLevel (..),
DBBinder,
DBArg,
DBType,
DBExpr,
DBDecl,
DBProg,
DBTelescope,
Substitution,
substituteDB,
substDBInto,
substDBIntoAtLevel,
substDBAll,
liftDBIndice... | null | https://raw.githubusercontent.com/vehicle-lang/vehicle/3a3548f9b48c3969212ccb51e954d4d4556ea815/vehicle/src/Vehicle/Expr/DeBruijn.hs | haskell | ------------------------------------------------------------------------------
Definitions
counting from the variable position upwards.
When used as a variable refers to the binder at that level.
level `l`.
------------------------------------------------------------------------------
Expressions
-----------------... | # LANGUAGE GeneralizedNewtypeDeriving #
module Vehicle.Expr.DeBruijn
( DBBinding,
DBIndex (..),
DBLevel (..),
DBBinder,
DBArg,
DBType,
DBExpr,
DBDecl,
DBProg,
DBTelescope,
Substitution,
substituteDB,
substDBInto,
substDBIntoAtLevel,
substDBAll,
liftDBIndice... |
c963e42d9b5158db2224f61ba6044a8e66d8091045335b681f309ae027d5ba98 | gebi/jungerl | prfNet.erl | %%%-------------------------------------------------------------------
%%% File : prfNet.erl
Author : Mats < locmacr@mwlx084 >
Description : prf collector of net_kernel info
%%%
Created : 18 Oct 2005 by Mats < locmacr@mwlx084 >
%%%-------------------------------------------------------------------
-module(... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/prf/src/prfNet.erl | erlang | -------------------------------------------------------------------
File : prfNet.erl
------------------------------------------------------------------- | Author : Mats < locmacr@mwlx084 >
Description : prf collector of net_kernel info
Created : 18 Oct 2005 by Mats < locmacr@mwlx084 >
-module(prfNet).
-export([collect/1]).
-include("prf.hrl").
returns { State , Data }
collect(State) -> {State, {?MODULE, data()}}.
data() ->
case catch net_kernel:nodes_i... |
662f063dd5d551084602416f9451febd2824409d95f0c590b8ffbb624a9a6243 | gethop-dev/hydrogen.duct-template | routes.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
;; file, You can obtain one at /
{{=<< >>=}}
(ns <<namespace>>.client.routes
(:require-macros [secretary.core :refer [defroute]])
(:import goog.History)
(:require <<#hydro... | null | https://raw.githubusercontent.com/gethop-dev/hydrogen.duct-template/34d56aa499af1e673d9587b7da0cca2b126ff106/resources/core/cljs/routes.cljs | clojure | file, You can obtain one at /
This part takes a vector for new view to navigate to.
By convention we recommend using a namespaced one with 'view' as a name (e.g. ::shop/view).
The optional remaining arguments of that view vector are arguments to the view.
- New view always is composed into ::*/view.enter event
-... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
{{=<< >>=}}
(ns <<namespace>>.client.routes
(:require-macros [secretary.core :refer [defroute]])
(:import goog.History)
(:require <<#hydrogen-session?>>[clojure.spec.alpha... |
1302cb563a3d39d10c390f46b96f8d2826321e7e5971a5e31d36947bebb646c0 | PLTools/OCanren | test_noinjected.mli | val addo : int * int * int [@@noinjected]
| null | https://raw.githubusercontent.com/PLTools/OCanren/1ead64bde16b0eb339a6bf790ea871e19bbaccd0/regression_ppx/test_noinjected.mli | ocaml | val addo : int * int * int [@@noinjected]
| |
42c580cccf01e0c83e62e67044db9780c76a77e02b2a03a6a2ef6ccc51261a54 | fishcakez/sbroker | sbroker_app.erl | %%-------------------------------------------------------------------
%%
Copyright ( c ) 2016 , < >
%%
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 License at
%%
%% -2.0
... | null | https://raw.githubusercontent.com/fishcakez/sbroker/10f7e3970d0a296fbf08b1d1a94c88979a7deb5e/src/sbroker_app.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the Lic... | Copyright ( c ) 2016 , < >
This file is provided to you under the Apache License ,
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
@private
-module(sbroker_app).
-behaviour(application).
-export([start/2]).
-export([stop/1]).
start(... |
93f47bd9761f27dd7421664afa3eb79c149e925dbfa1b47d936cbf4ff8f493f0 | dwayne/eopl3 | parser.test.rkt | #lang racket
(require "./parser.rkt")
(require rackunit)
(check-equal?
(parse "1")
(a-program (const-exp 1)))
(check-equal?
(parse "x")
(a-program (var-exp 'x)))
(check-equal?
(parse "-(5, y)")
(a-program (diff-exp (const-exp 5) (var-exp 'y))))
(check-equal?
(parse "zero?(z)")
(a-program (zero?-exp (var-e... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/04-ch4/interpreters/racket/IMPLICIT-REFS-4.21/parser.test.rkt | racket | #lang racket
(require "./parser.rkt")
(require rackunit)
(check-equal?
(parse "1")
(a-program (const-exp 1)))
(check-equal?
(parse "x")
(a-program (var-exp 'x)))
(check-equal?
(parse "-(5, y)")
(a-program (diff-exp (const-exp 5) (var-exp 'y))))
(check-equal?
(parse "zero?(z)")
(a-program (zero?-exp (var-e... | |
610e793593aa91fb1c7cb8d2bfe7c618c8b22621c390fa44fcc5a094491fe30e | dmitryvk/sbcl-win32-threads | compiler.pure-cload.lisp | ;;;; miscellaneous tests of compiling toplevel forms
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;;
;;;; This soft... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/tests/compiler.pure-cload.lisp | lisp | miscellaneous tests of compiling toplevel forms
more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information.
Exercise a compiler bug (by causing a call ... |
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(in-package :cl-user)
(let ((a 1) (b 1))
(declare (type (mod 1000) a b))
(let ((tmp (= 10 (+ (incf a) (incf a) (incf b) (incf b)))))
(or tmp (error "TMP not t... |
edfa5d435f33cabe0b8c39454bc2e797d7fc68aef2fbf520ef9523e3d69b0966 | hiredman/clojurebot | derby.clj | (ns clojurebot.triples.derby
(:require [clojure.java.jdbc :as sql]
[clojure.tools.logging]))
(defmacro with-c [db & body]
`(sql/with-connection ~db
~@body))
(defn derby [name]
{:classname "org.apache.derby.jdbc.EmbeddedDriver"
:create true
:subname name
:subprotocol "derby"})
(declare... | null | https://raw.githubusercontent.com/hiredman/clojurebot/1e8bde92f2dd45bb7928d4db17de8ec48557ead1/clojurebot-facts/src/clojurebot/triples/derby.clj | clojure | (ns clojurebot.triples.derby
(:require [clojure.java.jdbc :as sql]
[clojure.tools.logging]))
(defmacro with-c [db & body]
`(sql/with-connection ~db
~@body))
(defn derby [name]
{:classname "org.apache.derby.jdbc.EmbeddedDriver"
:create true
:subname name
:subprotocol "derby"})
(declare... | |
aaedefa643a1ad68e3797710ff4bac19a502e1abec9a6183872ffd8bfcf25383 | adventuring/tootsville.net | redirect.lisp | ;;;; -*- lisp -*-
;;;
src / redirect.lisp is part of
;;;
Copyright © 2008 - 2017 Bruce - Robert Pocock ; © 2018 - 2021 The
Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) .
;;;
This program is Free Software : you can redistribute it and/or
modify it under the t... | null | https://raw.githubusercontent.com/adventuring/tootsville.net/985c11a91dd1a21b77d7378362d86cf1c031b22c/src/redirect.lisp | lisp | -*- lisp -*-
© 2018 - 2021 The
either version 3 of
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more det... | src / redirect.lisp is part of
Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) .
This program is Free Software : you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License
the License , or ( at your option ) any later version .
You sh... |
c1a0c54183f8e91ff97092f76920730a8329c84bc197a88e607104129e6b0cf8 | AbstractMachinesLab/caramel | daemonize.mli | (** Start, stop and synchronize with a daemon *)
(** The daemonize function will fork a daemon running the given function,
guaranteeing that at most one instance will run at any given time. The
daemon has to call a given callback to indicate that it has successfully
started, unlocking all other potential s... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/vendor/stdune/daemonize.mli | ocaml | * Start, stop and synchronize with a daemon
* The daemonize function will fork a daemon running the given function,
guaranteeing that at most one instance will run at any given time. The
daemon has to call a given callback to indicate that it has successfully
started, unlocking all other potential start at... |
type status =
| Started of
{ daemon_info : string
; pid : Pid.t
}
| Already_running of
{ daemon_info : string
; pid : Pid.t
}
val daemonize :
* The path to chdir to
-> ?foreground:bool
-> (status, string) Result.t
val stop : Path.t -> (unit, string) Result.t
|
4e58e69fd05d82e943a19f4b40c47a78e448fa5dfe5d88e6db05a225fec19a01 | neeraj9/hello-erlang-rump | helloer_loader.erl | %%%-------------------------------------------------------------------
@author nsharma
( C ) 2016 ,
%%% @doc
%%%
%%% @end
Copyright ( c ) 2016 , < > .
%%% All rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the followi... | null | https://raw.githubusercontent.com/neeraj9/hello-erlang-rump/304d2f0faaef64677de22d9a3495297e08d90a3f/apps/helloer/src/helloer_loader.erl | erlang | -------------------------------------------------------------------
@doc
@end
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
... | @author nsharma
( C ) 2016 ,
Copyright ( c ) 2016 , < > .
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVI... |
6bf804a6bd71c3c248ed1156f355b4df30695f8e3db904cb5032209e3ecf4940 | hiroshi-unno/coar | affineTerm.ml | open Core
open Common.Ext
open LogicOld
let is_affine term =
Term.funsyms_of term
|> Set.Poly.for_all
~f:(function T_int.Add | T_int.Sub | T_int.Neg | T_int.Mult | T_int.Int _-> true | _ -> false)
let coeff_of is_v t =
let ret = ref (None) in
Term.iter_term t ~f:( fun t ->
if Option.is_none !ret the... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/ast/affineTerm.ml | ocaml | open Core
open Common.Ext
open LogicOld
let is_affine term =
Term.funsyms_of term
|> Set.Poly.for_all
~f:(function T_int.Add | T_int.Sub | T_int.Neg | T_int.Mult | T_int.Int _-> true | _ -> false)
let coeff_of is_v t =
let ret = ref (None) in
Term.iter_term t ~f:( fun t ->
if Option.is_none !ret the... | |
ffc108ecde12054d9f7ef533516dd723d6017f864699c3d66fab6bef0bd74ce7 | spurious/sagittarius-scheme-mirror | paraffins.scm | ;;; PARAFFINS -- Compute how many paraffins exist with N carbon atoms.
(define (gen n)
(let* ((n/2 (quotient n 2))
(radicals (make-vector (+ n/2 1) '(H))))
(define (rads-of-size n)
(let loop1 ((ps
(three-partitions (- n 1)))
(lst
'()))
... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/bench/gambit-benchmarks/paraffins.scm | scheme | PARAFFINS -- Compute how many paraffins exist with N carbon atoms. |
(define (gen n)
(let* ((n/2 (quotient n 2))
(radicals (make-vector (+ n/2 1) '(H))))
(define (rads-of-size n)
(let loop1 ((ps
(three-partitions (- n 1)))
(lst
'()))
(if (null? ps)
lst
(let* ((p (car ps))
... |
ef2802fa2990fddc85d84eebbe3934288a2debff5895344772d38ebfa3017f11 | the-language/zKanren | goal.rkt | : MicroKanren with Constraints and noto
Copyright ( C ) 2017
;; 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 ... | null | https://raw.githubusercontent.com/the-language/zKanren/98df0700cb8935d1bde417ccb7f00b0417e00f6b/goal.rkt | racket | This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero Gen... | : MicroKanren with Constraints and noto
Copyright ( C ) 2017
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
You should have received a copy of the GNU Affero General Public License
#lang racket
(provid... |
0342241b61e34fc966eb9fb8eca706565d317d43500ddfa427db3293e03f2503 | fold-lang/fold | Pratt.ml | open Pure
open Base
open Lex
module M = Map.Make(Token)
type error =
| Empty
| Unexpected_end of { expected : token }
| Unexpected_token of { expected : token; actual : token }
| Failed_satisfy of token
| With_message of string
let error_to_string e =
match e with
| Empty -> "empty"
| Unexpe... | null | https://raw.githubusercontent.com/fold-lang/fold/78720f6295aa1fc99e18d853f8f1576b974e707f/src/Pratt.ml | ocaml | Base parser
Alternative
|> define_infix Lex.eof ((fun g left -> error Empty), 0)
join :: List a -> a
*
* - parse many
* - get prefix for token
* - parse prefix
* -
*
let rec many p =
default []
(p >>= fun x ->
print "y";
many p >>= fun xs ->
print "n";
pure (x :: xs))
* ... | open Pure
open Base
open Lex
module M = Map.Make(Token)
type error =
| Empty
| Unexpected_end of { expected : token }
| Unexpected_token of { expected : token; actual : token }
| Failed_satisfy of token
| With_message of string
let error_to_string e =
match e with
| Empty -> "empty"
| Unexpe... |
c38f9d952d70952b000f25366ff0cdf2b899429acf9b4d2358815a00d955358e | PrincetonUniversity/lucid | Span.mli | type t =
{ fname : string
; start : int
; finish : int
; spid : int
}
[@@deriving show, ord]
val extend : t -> t -> t
val default : t
val to_string : t -> string
| null | https://raw.githubusercontent.com/PrincetonUniversity/lucid/dc51a0f781e8f1edb7e9689203fdf57daa7ffd10/src/lib/frontend/datastructures/Span.mli | ocaml | type t =
{ fname : string
; start : int
; finish : int
; spid : int
}
[@@deriving show, ord]
val extend : t -> t -> t
val default : t
val to_string : t -> string
| |
1b78bc0d4539dc7a39ed7e9dd318c08142cf57d81c7aac1010e97991f2a79d88 | huangjs/cl | zhbmv.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l ,... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/lapack/blas/zhbmv.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l , v 1.48 2008/08/24 00:56:27 rt... |
c1f213619cd3ed2e66bd24c0ab93ac53e0bfccd461ca1739d2ab970f6793bd33 | skypher/cl-store | custom.lisp | -*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;; See the file LICENCE for licence information.
(in-package :cl-store)
; special floats
(defun create-float-values (value &rest codes)
"Returns a alist of special float to float code mappings."
(sb-int:with-float-traps-masked (:overflow :invalid)
... | null | https://raw.githubusercontent.com/skypher/cl-store/8fbdb07810fee42b1e8be3fe268a5ab9226befb9/sbcl/custom.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
See the file LICENCE for licence information.
special floats
Custom structure storing |
(in-package :cl-store)
(defun create-float-values (value &rest codes)
"Returns a alist of special float to float code mappings."
(sb-int:with-float-traps-masked (:overflow :invalid)
(let ((neg-inf (expt value 3)))
(mapcar 'cons
(list (expt (abs value) 2)
neg-inf
... |
43bf410b8c750bdad84436fb82aaa695899f890150d4ff7b3b25b1c81cfcc437 | toyokumo/tarayo | helper.clj | (ns helper
(:import
(com.dumbster.smtp
SimpleSmtpServer)))
(def test-message
{:from ""
:to ""
:subject "hello"
:body "world"})
(defmacro with-test-smtp-server
[[server-sym port-sym] & body]
`(with-open [~server-sym (SimpleSmtpServer/start SimpleSmtpServer/AUTO_SMTP_PORT)]
(let [~port-sym ... | null | https://raw.githubusercontent.com/toyokumo/tarayo/f9b10b85b7bc1a188d808c3955e258916cd0b38a/benchmark/helper/helper.clj | clojure | (ns helper
(:import
(com.dumbster.smtp
SimpleSmtpServer)))
(def test-message
{:from ""
:to ""
:subject "hello"
:body "world"})
(defmacro with-test-smtp-server
[[server-sym port-sym] & body]
`(with-open [~server-sym (SimpleSmtpServer/start SimpleSmtpServer/AUTO_SMTP_PORT)]
(let [~port-sym ... | |
59be4ba721417a0b6d6be7e92ca173040c83f1012ba562e2e6f7b148645a3c72 | naoiwata/sicp | q2.01.scm | ;;
;; @author naoiwata
SICP Chapter2
question 2.1
;;
(add-load-path "." :relative)
(load "pages/2.1.1.scm")
(define (make-rat n d)
(let
((g (gcd n d))
(s (if (< d 0) -1 1)))
(cons
(* s (/ n g))
(* s (/ d g)))))
; test
(define (test1) (make-rat -3 1))
(define (test2) (make-rat 1 -3))
(newline)
(print... | null | https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter2/q2.01.scm | scheme |
@author naoiwata
test
-1/3
END | SICP Chapter2
question 2.1
(add-load-path "." :relative)
(load "pages/2.1.1.scm")
(define (make-rat n d)
(let
((g (gcd n d))
(s (if (< d 0) -1 1)))
(cons
(* s (/ n g))
(* s (/ d g)))))
(define (test1) (make-rat -3 1))
(define (test2) (make-rat 1 -3))
(newline)
(print-rat (test1))
|
6d6aeffcfa0c71d924f59a4682f2ac5099775fcaca3dd9192f0fe1980df8ade2 | papachan/data-covid19-colombia | core.cljs | (ns frontend.core
(:require [re-frame.core :as re-frame]
[reagent.core :as reagent]
[reagent.dom :as rd]
[frontend.events :as events]
[frontend.views :as views :refer [home]]))
(defn ^:dev/after-load mount-root []
(re-frame/clear-subscription-cache!)
(let [root-el... | null | https://raw.githubusercontent.com/papachan/data-covid19-colombia/e7e8f72336a0ad9d7d0561332dd1ce8248bfe7e4/src/cljs/frontend/core.cljs | clojure | stop is called before any code is reloaded
this is controlled by :before-load in the config
init is called ONCE when the page loads
this is called in the index.html and must be exported
so it is available even in :advanced release builds | (ns frontend.core
(:require [re-frame.core :as re-frame]
[reagent.core :as reagent]
[reagent.dom :as rd]
[frontend.events :as events]
[frontend.views :as views :refer [home]]))
(defn ^:dev/after-load mount-root []
(re-frame/clear-subscription-cache!)
(let [root-el... |
b2087e2b51f36048a05aa4df4ca5f6f71c7030a03247063ff9b818153cc99807 | avik-das/garlic | let.scm | (define a 4)
(display
(let ((a 1)
(b 2))
(+ a b))) (newline)
(display a) (newline)
; The current binding should be available in its own definition in order to
; allow for recursion.
(display
(let ((fac (lambda (n) (if (= n 0) 1 (* n (fac (- n 1))) )) ))
(fac 5)) ) (newline)
; Again, we hoist def... | null | https://raw.githubusercontent.com/avik-das/garlic/5545f5a70f33c2ff9ec449ef66e6acc7881419dc/test/success/let.scm | scheme | The current binding should be available in its own definition in order to
allow for recursion.
Again, we hoist definitions inside the let body, as well as multiple
statements. | (define a 4)
(display
(let ((a 1)
(b 2))
(+ a b))) (newline)
(display a) (newline)
(display
(let ((fac (lambda (n) (if (= n 0) 1 (* n (fac (- n 1))) )) ))
(fac 5)) ) (newline)
(let ((hello "hello"))
(display hello)
(display " ")
(display world)
(newline)
(define w... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.