_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 |
|---|---|---|---|---|---|---|---|---|
99c481c7a3bac58718da6ec148789c290a2953589a4b2033a65bf1acde0fd097 | jimweirich/sicp-study | ex1_12_test.scm | SICP 1.12 tests
(test-case "Ex 1.12 Pascal Elements"
(assert-equal 1 (pascal-element 1 1))
(assert-equal 1 (pascal-element 2 1))
(assert-equal 1 (pascal-element 2 2))
(assert-equal 1 (pascal-element 3 1))
(assert-equal 2 (pascal-element 3 2))
(assert-... | null | https://raw.githubusercontent.com/jimweirich/sicp-study/bc5190e04ed6ae321107ed6149241f26efc1b8c8/scheme/chapter1/ex1_12_test.scm | scheme | SICP 1.12 tests
(test-case "Ex 1.12 Pascal Elements"
(assert-equal 1 (pascal-element 1 1))
(assert-equal 1 (pascal-element 2 1))
(assert-equal 1 (pascal-element 2 2))
(assert-equal 1 (pascal-element 3 1))
(assert-equal 2 (pascal-element 3 2))
(assert-... | |
338f7a83be2c7ca1437b96923b1bb8ac71ec837783755acfb0dbbad7a268eb1d | tvraman/aster-math | cross-references.lisp | ;;; -*- Mode: LISP -*- ;;;
Copyright ( C ) 1990 , 1991 , 1992 , 1993 , 1994by T. V. Raman
;;; All Rights Reserved
;;;
(in-package :aster)
Mon Dec 28 14:02:10 EST 1992 Cross references . When a label is
;;; seen, install it in the label table along with a pointer to the
;;; object being labelled. When a ... | null | https://raw.githubusercontent.com/tvraman/aster-math/2aed0feb6aa1d551e36c83a29d3768607914874e/lisp/browse/cross-references.lisp | lisp | -*- Mode: LISP -*- ;;;
All Rights Reserved
seen, install it in the label table along with a pointer to the
object being labelled. When a reference is seen, retrieve the
corresponding label and the object pointed to from the table and
call the method read-cross-reference on that object. This method
can ... |
Copyright ( C ) 1990 , 1991 , 1992 , 1993 , 1994by T. V. Raman
(in-package :aster)
Mon Dec 28 14:02:10 EST 1992 Cross references . When a label is
(defparameter *follow-cross-ref-wait* 0
"Follow cross reference behaviour. ")
(defun follow-cross-reference?()
"Prompt user for following cross reference. If y... |
c02c65634da816503415d5eb0280e9f72ee1ef620c8fd46007e23476e4e9c7f6 | zadean/xqerl | prod_FLWORExpr_SUITE.erl | -module('prod_FLWORExpr_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['ForExprType010'/1]).
-export(['ForExprType025'/1]).
-export(['ForExprType026'/1... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/prod/prod_FLWORExpr_SUITE.erl | erlang | -module('prod_FLWORExpr_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['ForExprType010'/1]).
-export(['ForExprType025'/1]).
-export(['ForExprType026'/1... | |
4fc55e8afaabaaa3ac84e296295c815b58e63bed76383b43e72f89fe8ebcd125 | charlieg/Sparser | money-words.lisp | ALGERIAN DINAR <type(['DZD'])> MONEY
ALGERIAN DINARS <type(['DZD'])> MONEY
ANDORRAN PESETA <type(['ADP'])> MONEY
ANDORRAN PESETAS <type(['ADP'])> MONEY
ANGOLAN KWANZA <type(['AOK'])> MONEY
ANGOLAN KWANZAS <type(['AOK'])> MONEY
ARGENTINIAN AUSTRAL <type(['ARP'])> MONEY
ARGENTINIAN AUSTRALS <type(['ARP'])> MONEY
ASIAN CU... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/model/dossiers/money-words.lisp | lisp | ALGERIAN DINAR <type(['DZD'])> MONEY
ALGERIAN DINARS <type(['DZD'])> MONEY
ANDORRAN PESETA <type(['ADP'])> MONEY
ANDORRAN PESETAS <type(['ADP'])> MONEY
ANGOLAN KWANZA <type(['AOK'])> MONEY
ANGOLAN KWANZAS <type(['AOK'])> MONEY
ARGENTINIAN AUSTRAL <type(['ARP'])> MONEY
ARGENTINIAN AUSTRALS <type(['ARP'])> MONEY
ASIAN CU... | |
af9266043e1aeb8b80b72ff8e4e9a4dd45e347a20129d16e42ffe9bc8b9c22e6 | moby/vpnkit | bind.mli | module Make(Socket: Sig.SOCKETS): Sig.SOCKETS
| null | https://raw.githubusercontent.com/moby/vpnkit/7bfcba6e59c1e5450b667a392bf56371faae58b2/src/bin/bind.mli | ocaml | module Make(Socket: Sig.SOCKETS): Sig.SOCKETS
| |
6db712bcbcf196d232947bd1115289f25f3b19f60b8526386eeff1e984b949a1 | fdlk/advent-2019 | day04.clj | (ns advent-2019.day04 (:require [clojure.string :refer [join]]))
(def input (range 402328 (inc 864247)))
(def digit-counts
(->> input
(map str)
(filter (fn is-monotonous [password] (= password (join (sort password)))))
(map frequencies)
(map vals)
(map set)))
(def part1 (count (f... | null | https://raw.githubusercontent.com/fdlk/advent-2019/e7496448f9b67a550ac091f0df24d9890f437766/src/advent_2019/day04.clj | clojure | (ns advent-2019.day04 (:require [clojure.string :refer [join]]))
(def input (range 402328 (inc 864247)))
(def digit-counts
(->> input
(map str)
(filter (fn is-monotonous [password] (= password (join (sort password)))))
(map frequencies)
(map vals)
(map set)))
(def part1 (count (f... | |
c1dfb6156e030de61428cd60a720bd9557cc48d2b3f8fb597b46919b16eb46ee | 2600hz/kazoo | j5_limits.erl | %%%-----------------------------------------------------------------------------
( C ) 2012 - 2020 , 2600Hz
%%% @doc
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 /.
%%%
%%% @end
%%%--------... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/applications/jonny5/src/j5_limits.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------------------
------------------------------------------------------------------------------
@doc
@end
------------------------------------------------------------... | ( C ) 2012 - 2020 , 2600Hz
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 /.
-module(j5_limits).
-export([get/1]).
-export([fetch/1]).
-export([cached/0]).
-export([to_props/1]).
-export([ac... |
63f4bf04c715f156c349804d01fcf26c169dd49e2e8b8e543ae96b389eef3435 | well-typed-lightbulbs/ocaml-esp32 | error_highlighting_use3.ml | let x = (1
+
2 in
();;
| null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/tool-toplevel/error_highlighting_use3.ml | ocaml | let x = (1
+
2 in
();;
| |
709d4cd5195ef818a4f3adda9064ada3439b648d88028d429f27704ba40a4175 | lspitzner/brittany | Test397.hs | -- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
func = f
where
# INLINE f #
f = id
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test397.hs | haskell | brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } | func = f
where
# INLINE f #
f = id
|
176d8857c7cb1ffdcb3e451a6248a4650d9ed62d2f8b6c93ddc32ea027cd5faf | kraison/vivace-graph | triples-interface.lisp | (in-package #:vivace-graph)
(defmethod make-new-triple ((graph graph) subject (predicate predicate) object
&key (index-immediate? t) (certainty-factor +cf-true+) derived?
(enqueue-for-rules-check? nil))
"Add a new triple to the datastore."
(or (lookup-triple subject predicate object)
(let ((tri... | null | https://raw.githubusercontent.com/kraison/vivace-graph/6b5b5eca3e2613e48846da326ecf36cd9dcd7ceb/triples-interface.lisp | lisp | (incf-ref-count subject)
(incf-ref-count object)
(make-new-node :value (elt tuple 0)))
(make-new-node :value (elt tuple 2)))
(incf-ref-count s)
(incf-ref-count o)
this actually marks the triple as deleted and adds it to the delete-queue. The | (in-package #:vivace-graph)
(defmethod make-new-triple ((graph graph) subject (predicate predicate) object
&key (index-immediate? t) (certainty-factor +cf-true+) derived?
(enqueue-for-rules-check? nil))
"Add a new triple to the datastore."
(or (lookup-triple subject predicate object)
(let ((tri... |
965de211e9e7255a463d3a9c0aadfa2b81a0ec9488880395d6b0e08028d8cbac | ocaml-ppx/ocamlformat | wrap_invalid_doc_comments.ml | * - Item 1
- Item 2 , that contains two block elements : { v v }
- Item 2, that contains two block elements: {v v} *)
| null | https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/8706e7ac301805d390b935774774d679b6fcf871/test/passing/tests/wrap_invalid_doc_comments.ml | ocaml | * - Item 1
- Item 2 , that contains two block elements : { v v }
- Item 2, that contains two block elements: {v v} *)
| |
ca1ebb163c1d18db85aae3042fbf171b3a7173f186027cd6b881ccbb008e453d | valderman/haste-compiler | IORef.hs | module Tests.IORef where
import Data.IORef
runTest :: IO ()
runTest = do
ref <- newIORef 23
atomicModifyIORef ref $ \ _ -> (42, ())
print =<< readIORef ref
| null | https://raw.githubusercontent.com/valderman/haste-compiler/47d942521570eb4b8b6828b0aa38e1f6b9c3e8a8/Tests/IORef.hs | haskell | module Tests.IORef where
import Data.IORef
runTest :: IO ()
runTest = do
ref <- newIORef 23
atomicModifyIORef ref $ \ _ -> (42, ())
print =<< readIORef ref
| |
e58050e6057634cb00c9e0d2e36dd98e8423dc1ccf97e981845cd49718b8a8a8 | skynet-gh/skylobby | user_test.clj | (ns skylobby.fx.user-test
(:require
[cljfx.api :as fx]
[clojure.test :refer [deftest is]]
[skylobby.fx.user :as fx.user]))
(set! *warn-on-reflection* true)
(deftest users-view
(is (map?
(fx.user/users-view-impl
{:fx/context (fx/create-context nil)}))))
(deftest users-table
(is... | null | https://raw.githubusercontent.com/skynet-gh/skylobby/7895ad30d992b790ffbffcd2d7be2cf17f8df794/test/clj/skylobby/fx/user_test.clj | clojure | (ns skylobby.fx.user-test
(:require
[cljfx.api :as fx]
[clojure.test :refer [deftest is]]
[skylobby.fx.user :as fx.user]))
(set! *warn-on-reflection* true)
(deftest users-view
(is (map?
(fx.user/users-view-impl
{:fx/context (fx/create-context nil)}))))
(deftest users-table
(is... | |
72d07a978338535b2286e01b76f167b9d2aca49d0445c6162b77794431dd1150 | mbillingr/lisp-in-small-pieces | scan-out-defines.scm |
(define (scan-out-defines body)
(define (initializations exprs)
(cond ((null? exprs)
'())
((definition? (car exprs))
(cons (list (definition-variable (car exprs))
'*unassigned*)
(initializations (cdr exprs))))
(else (initialization... | null | https://raw.githubusercontent.com/mbillingr/lisp-in-small-pieces/b2b158dfa91dc95d75af4bd7d93f8df22219047e/09-macros/scan-out-defines.scm | scheme |
(define (scan-out-defines body)
(define (initializations exprs)
(cond ((null? exprs)
'())
((definition? (car exprs))
(cons (list (definition-variable (car exprs))
'*unassigned*)
(initializations (cdr exprs))))
(else (initialization... | |
f14993c8f28bbefa0edd07ddb734b29c315fddef715f3841a72bd006fefc5278 | kunik/sorting-algorithms | Insertion.hs | module Sorting.Insertion
(
sort
) where
import Data.List (insert)
sort :: (Ord a) => [a] -> [a]
sort [] = []
sort xs = foldr (\x result -> insert x result) [] xs
--where
-- insert a [] = [a]
-- insert a (x:xs)
-- | a > x = x:(insert a xs)
-- | otherwise = a:x:xs | null | https://raw.githubusercontent.com/kunik/sorting-algorithms/0ada50e08fff8a420a55d912acf084f21616082f/Sorting/Insertion.hs | haskell | where
insert a [] = [a]
insert a (x:xs)
| a > x = x:(insert a xs)
| otherwise = a:x:xs | module Sorting.Insertion
(
sort
) where
import Data.List (insert)
sort :: (Ord a) => [a] -> [a]
sort [] = []
sort xs = foldr (\x result -> insert x result) [] xs |
c59c3a4024ee7d2a270c6f14bd1d64365d30ee86e3aa2d8b03bc9c434f0ca023 | racket/typed-racket | object-untyped.rkt | #lang typed/racket/shallow
Copied from TR -test / fail/ directory
(module u racket
(define c%
(class object%
(super-new)
(define/public (f x) '(+ x 1))))
(provide c%))
(define-type C% (Class (f (-> Integer Integer))))
(require typed/rackunit)
(require/typed (submod "." u)
(c% C%))
(: g (-> ... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/shallow/object-untyped.rkt | racket | #lang typed/racket/shallow
Copied from TR -test / fail/ directory
(module u racket
(define c%
(class object%
(super-new)
(define/public (f x) '(+ x 1))))
(provide c%))
(define-type C% (Class (f (-> Integer Integer))))
(require typed/rackunit)
(require/typed (submod "." u)
(c% C%))
(: g (-> ... | |
1e11b38d7e4de9a28b8cd226dafe755fe6d35b01d86e38b19aa3a8d7a1d6238f | TerrorJack/ghc-alter | openFile001.hs | -- !!! test that a file opened in ReadMode can't be written to
import System.IO
import System.IO.Error
main = do
hIn <- openFile "openFile001.hs" ReadMode
hPutStr hIn "test" `catchIOError` \ err ->
if isIllegalOperation err
then putStrLn "ok."
else error "Oh dear\n"
| null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/IO/openFile001.hs | haskell | !!! test that a file opened in ReadMode can't be written to |
import System.IO
import System.IO.Error
main = do
hIn <- openFile "openFile001.hs" ReadMode
hPutStr hIn "test" `catchIOError` \ err ->
if isIllegalOperation err
then putStrLn "ok."
else error "Oh dear\n"
|
536c33f14e63edd008f55da2030b650aaabdb5c03714a532a30aee654cb2baee | dannywillems/types-and-programming-languages-pierce-implementation | test.ml | open Term
let identity var context_size =
TermAbs(var, TermVar(0, context_size + 1))
let () =
print_term
[("x", NameBinding)]
(TermVar(0, 1));
print_term
[]
(TermAbs("x",
TermVar(0, 1)
)
);
print_term
[("x", NameBinding)]
(TermAbs("x",
TermVar(... | null | https://raw.githubusercontent.com/dannywillems/types-and-programming-languages-pierce-implementation/f3b48d44adc59fd957909b9157e0ff104dea1959/OCaml/chapter07/test.ml | ocaml | open Term
let identity var context_size =
TermAbs(var, TermVar(0, context_size + 1))
let () =
print_term
[("x", NameBinding)]
(TermVar(0, 1));
print_term
[]
(TermAbs("x",
TermVar(0, 1)
)
);
print_term
[("x", NameBinding)]
(TermAbs("x",
TermVar(... | |
cfb6b2f0e65e44a69d9695e0a18721a367df5d4256f6b250b8c6c78157c128a5 | kappelmann/engaging-large-scale-functional-programming | Exercise12.hs | module Exercise12 where
main :: IO ()
main = undefined
| null | https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/28905255605b55353de2d06239f79448c6fe4230/resources/io_mocking/stocks/assignment/src/Exercise12.hs | haskell | module Exercise12 where
main :: IO ()
main = undefined
| |
c7f9ad1b9f4d3c50c7dd97fe71bf6ea193a5f7064f5f924a9d9022bb0734f22d | DaveWM/lobster-writer | remote_storage.cljs | (ns lobster-writer.remote-storage)
(def remote-storage (js/LWRemoteStorage. (clj->js {:cache false})))
(def client (.scope remote-storage "/lobster-writer/"))
(defn save! [path data]
(.storeFile client "application/edn" path (pr-str data)))
(defn get! [path]
(.getFile client path false))
(defn get-all! [path]
... | null | https://raw.githubusercontent.com/DaveWM/lobster-writer/67e575e4a954210245545ad583a4ca0db7f254a2/src/cljs/lobster_writer/remote_storage.cljs | clojure | (ns lobster-writer.remote-storage)
(def remote-storage (js/LWRemoteStorage. (clj->js {:cache false})))
(def client (.scope remote-storage "/lobster-writer/"))
(defn save! [path data]
(.storeFile client "application/edn" path (pr-str data)))
(defn get! [path]
(.getFile client path false))
(defn get-all! [path]
... | |
51b6b4f861c6e9ce238577a9179d9a827346145e1f9398b971f2f42e4dab178c | GaloisInc/saw-script | SAW.hs | |
Module : Verifier . SAW
Copyright : Galois , Inc. 2012 - 2015
License : :
Stability : experimental
Portability : non - portable ( language extensions )
Module : Verifier.SAW
Copyright : Galois, Inc. 2012-2015
License : BSD3
Maintainer :
Stability : experimental
Port... | null | https://raw.githubusercontent.com/GaloisInc/saw-script/fdb8987f09999439833d5cb573f69197bdf2cb7f/saw-core/src/Verifier/SAW.hs | haskell | |
Module : Verifier . SAW
Copyright : Galois , Inc. 2012 - 2015
License : :
Stability : experimental
Portability : non - portable ( language extensions )
Module : Verifier.SAW
Copyright : Galois, Inc. 2012-2015
License : BSD3
Maintainer :
Stability : experimental
Port... | |
4f3f47b89143cde378a665c1ed07cd67027e37cafee629ab7fcb2f6d3eed34d6 | ghc/testsuite | tcfail006.hs | module ShouldFail where
(j,k) = case (if True then True else False) of
True -> (True,1)
False -> (1,True)
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail006.hs | haskell | module ShouldFail where
(j,k) = case (if True then True else False) of
True -> (True,1)
False -> (1,True)
| |
6e9854b4f6048e1400a8d77a639591967e651dbb8aaf01827f11b19b1ca1351e | ghcjs/ghcjs-dom | SVGPathSegCurvetoCubicRel.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.SVGPathSegCurvetoCubicRel
(js_setX, setX, js_getX, getX, js_setY, setY, js_getY, getY,
... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGPathSegCurvetoCubicRel.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/SVGPathSegCurvetoCubicRel.y1 Mozilla SVGPathSegCurvetoCubicRel.y1 documentation>
| <-US/docs/Web/API/SVGPathSegCurvetoCubicRel.y1 Mozilla SVGPathSegCurvetoCubicRel.y1 documentation>
| <-US/docs/Web/API/... | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.SVGPathSegCurvetoCubicRel
(js_setX, setX, js_getX, getX, js_setY, setY, js_getY, getY,
js_setX1, setX1, js_getX1, getX1, js_setY1, setY1, js_getY1, getY1,
js_setX2, setX2... |
715a82e368b57155e84476e230923607c749cf4b3722b628419ae3ef680f969a | chris-taylor/SICP-in-Haskell | section2.hs | import System.Random (Random, randomRIO)
import System.CPUTime (getCPUTime)
import Control.Monad
1.9
add :: (Enum a, Num a) => a -> a -> a
add 0 b = b
add a b = succ $ add (pred a) b
add' :: (Enum a, Num a) => a -> a -> a
add' 0 b = b
add' a b = add' (pred a) (succ b)
1.10 n / a
1.11
f :: Integral a => a -> a... | null | https://raw.githubusercontent.com/chris-taylor/SICP-in-Haskell/d0a10b5c5990081b4acaaae9f01ced5513ea9368/ch1/section2.hs | haskell | 1.21 n/a
isPrimeIO :: Integral a => a -> IO Bool
isPrimeIO n = return (isPrime n) | import System.Random (Random, randomRIO)
import System.CPUTime (getCPUTime)
import Control.Monad
1.9
add :: (Enum a, Num a) => a -> a -> a
add 0 b = b
add a b = succ $ add (pred a) b
add' :: (Enum a, Num a) => a -> a -> a
add' 0 b = b
add' a b = add' (pred a) (succ b)
1.10 n / a
1.11
f :: Integral a => a -> a... |
e141575e7a3e3cf0f34c623c3de07b70273ffea6e334dd2b3bd0a364b8c52193 | Jarzka/stylefy | dom.cljs | (ns stylefy.impl.dom
(:require [dommy.core :as dommy]
[garden.core :refer [css]]
[cljs.core.async :as async] ; Mandatory for running tests
[stylefy.impl.cache :as cache]
[stylefy.impl.log :as log]
[stylefy.impl.state :as state])
(:require-macros
[cljs.... | null | https://raw.githubusercontent.com/Jarzka/stylefy/c4c3a9b1d230605e2d08a769d83d632e696d84a0/src/cljs/stylefy/impl/dom.cljs | clojure | Mandatory for running tests
Used when running multiple instances of stylefy on the same page
Used when running multiple instances of stylefy on the same page
Add styles
The main purpose of this "dummy" handler is to save the styles
Add styles | (ns stylefy.impl.dom
(:require [dommy.core :as dommy]
[garden.core :refer [css]]
[stylefy.impl.cache :as cache]
[stylefy.impl.log :as log]
[stylefy.impl.state :as state])
(:require-macros
[cljs.core.async.macros :refer [go]]))
(def stylefy-node-id "#_stylefy-styl... |
f0fa1c6f96b2fb5fc68dc2f8071f91d3f9ef070762e7a9c930b6496eed9e5128 | twosigma/Cook | token_bucket_filter.clj | ;;
Copyright ( c ) Two Sigma Open Source , LLC
;;
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 writing, software... | null | https://raw.githubusercontent.com/twosigma/Cook/9e561b847827adf2a775220d1fc435d8089fc41d/scheduler/test/cook/test/rate_limit/token_bucket_filter.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permi... | Copyright ( c ) Two Sigma Open Source , LLC
distributed under the License is distributed on an " AS IS " BASIS ,
(ns cook.test.rate-limit.token-bucket-filter
(:require [clojure.test :refer :all]
[cook.rate-limit.token-bucket-filter :as tbf]))
(defn approx=
"Approximately equal"
([^Double a ^Doubl... |
f2b3503c26e0492411be7732e5172d2357a10ee342a7b4b90413366f3e11b284 | etorreborre/registry | Exercise4.hs | # LANGUAGE DataKinds #
# LANGUAGE PartialTypeSignatures #
# OPTIONS_GHC -fno - warn - partial - type - signatures #
module Test.Tutorial.Exercise4 where
import Data.Registry
import Protolude
import Test.Tutorial.Application
import Test.Tutorial.Exercise2
import Test.Tutorial.Exercise3
printApp :: IO ()
printApp =
... | null | https://raw.githubusercontent.com/etorreborre/registry/bab2b9c0388e7ccbdf59423ddb9951c4c8279297/test/Test/Tutorial/Exercise4.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE PartialTypeSignatures #
# OPTIONS_GHC -fno - warn - partial - type - signatures #
module Test.Tutorial.Exercise4 where
import Data.Registry
import Protolude
import Test.Tutorial.Application
import Test.Tutorial.Exercise2
import Test.Tutorial.Exercise3
printApp :: IO ()
printApp =
... | |
6fbe76d4185a74fe7b62f34c1d7b13595da3a55142b394aa032315903bf16ed4 | cyga/real-world-haskell | MonadPlus.hs | file : ch15 / MonadPlus.hs
mzero >>= f == mzero
file : ch15 / MonadPlus.hs
v >> mzero == mzero
file : ch15 / MonadPlus.hs
guard :: (MonadPlus m) => Bool -> m ()
guard True = return ()
guard False = mzero
file : ch15 / MonadPlus.hs
x `zeroMod` n = guard ((x `mod` n) == 0) >> return x
| null | https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch15/MonadPlus.hs | haskell | file : ch15 / MonadPlus.hs
mzero >>= f == mzero
file : ch15 / MonadPlus.hs
v >> mzero == mzero
file : ch15 / MonadPlus.hs
guard :: (MonadPlus m) => Bool -> m ()
guard True = return ()
guard False = mzero
file : ch15 / MonadPlus.hs
x `zeroMod` n = guard ((x `mod` n) == 0) >> return x
| |
9f4bfd590362c7e23d1137705ad2b3f3e6c620886112e466a8dfe41e91074d5f | ocaml-sf/learn-ocaml-corpus | bind_wrong_failure_cont.ml | let return (x : 'a) : 'a m =
let compute s f = s x f in
{ compute }
let (>>=) (m1 : 'a m) (f2 : 'a -> 'b m) : 'b m =
let compute s f =
m1.compute (fun x f' -> (f2 x).compute s f (* wrong: should be [f'] *)) f
in
{ compute }
let fail : 'a m =
let compute s f = f() in
{ compute }
let choose (m1 : 'a ... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/nondet_monad_cont/wrong/bind_wrong_failure_cont.ml | ocaml | wrong: should be [f'] | let return (x : 'a) : 'a m =
let compute s f = s x f in
{ compute }
let (>>=) (m1 : 'a m) (f2 : 'a -> 'b m) : 'b m =
let compute s f =
in
{ compute }
let fail : 'a m =
let compute s f = f() in
{ compute }
let choose (m1 : 'a m) (m2 : 'a m) : 'a m =
let compute s f = m1.compute s (fun () -> m2.compute... |
24c4e86cf72099b914d272bcd9d3c144884a639b5ac3629de468587581bdaa85 | phylogeography/spread | scalars.clj | (ns api.scalars)
(defn parse-big-int
[string]
(bigint string))
(defn serialize-big-int
[big-int]
(str big-int))
| null | https://raw.githubusercontent.com/phylogeography/spread/56f3500e6d83e0ebd50041dc336ffa0697d7baf8/src/clj/api/scalars.clj | clojure | (ns api.scalars)
(defn parse-big-int
[string]
(bigint string))
(defn serialize-big-int
[big-int]
(str big-int))
| |
4602c4565d5803b8cef3ba7ba5a1483c9095aa35990c32bd59263d620921c364 | brendanhay/amazonka | GetUserAccessLoggingSettings.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused -... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workspaces-web/gen/Amazonka/WorkSpacesWeb/GetUserAccessLoggingSettings.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Gets user access logging settings.
* Creating a Request
* Request Lenses
* Destructuring the Response
* Response Lenses
| /See:/ 'newGetUserAccessLoggingSettings' smart constructor.
|
The following record fields are avail... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
De... |
a92918eddcc7434df916d951bb2e7b011f309578521e7d247fae661ea48a0028 | thheller/shadow-experiments | env.cljs | (ns todomvc.split.env
(:require
[shadow.experiments.grove.db :as db]
[shadow.experiments.grove.runtime :as rt]
[todomvc.model :as m]))
(defonce data-ref
(-> {::m/id-seq 101
::m/editing nil
::m/current-filter :all}
(db/configure m/schema)
(atom)))
(defonce rt-ref
(-> {}
... | null | https://raw.githubusercontent.com/thheller/shadow-experiments/a2170c2214778b6b9a9253166383396d64d395a4/src/dev/todomvc/split/env.cljs | clojure | (ns todomvc.split.env
(:require
[shadow.experiments.grove.db :as db]
[shadow.experiments.grove.runtime :as rt]
[todomvc.model :as m]))
(defonce data-ref
(-> {::m/id-seq 101
::m/editing nil
::m/current-filter :all}
(db/configure m/schema)
(atom)))
(defonce rt-ref
(-> {}
... | |
b3654a635bc800f8cf96eafdf28e76c60a7e4ac48a55436500c71a3cffb3c798 | jeapostrophe/c | info.rkt | #lang setup/infotab
(define name "C")
(define blurb
(list "A #lang for C"))
(define scribblings '(["c.scrbl" (multi-page) (experimental)]))
(define categories '(devtools))
(define primary-file "main.rkt")
(define release-notes
(list
'(ul (li "Initial release"))))
(define repositories '("4.x"))
| null | https://raw.githubusercontent.com/jeapostrophe/c/c2efa315c13e420e6cf77ba8d5ce1f7eb9dbdc2c/c/lang/info.rkt | racket | #lang setup/infotab
(define name "C")
(define blurb
(list "A #lang for C"))
(define scribblings '(["c.scrbl" (multi-page) (experimental)]))
(define categories '(devtools))
(define primary-file "main.rkt")
(define release-notes
(list
'(ul (li "Initial release"))))
(define repositories '("4.x"))
| |
7c257dbe319ffd203650583e9017cf687268491be53f1c56b9b004f9a54235c4 | haskell/lsp | Decoding.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TupleSections #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
{-# LANGUAGE TypeInType #-}
module Language.LSP.Test.Decoding where
import Prelude hiding ( id )
import Data.Aeson
import Data.Aeson.Types
import Data... | null | https://raw.githubusercontent.com/haskell/lsp/6804c539340bfebfe26392dba75b72846feda817/lsp-test/src/Language/LSP/Test/Decoding.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE GADTs #
# LANGUAGE TypeInType #
| Fetches the next message bytes based on
the Content-Length header | # LANGUAGE TupleSections #
# LANGUAGE KindSignatures #
module Language.LSP.Test.Decoding where
import Prelude hiding ( id )
import Data.Aeson
import Data.Aeson.Types
import Data.Foldable
import Data.Functor.Product
import Data.Functor.Const
im... |
dcced49157fc983fa3125b0871ff48d9a3a25b12184ee7f8f6220a653c075ceb | samrushing/irken-compiler | t_lognot.scm | ;; -*- Mode: Irken -*-
(include "lib/core.scm")
(lognot 1921)
| null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_lognot.scm | scheme | -*- Mode: Irken -*- |
(include "lib/core.scm")
(lognot 1921)
|
06374eb0708e74a4f0fe871341fe54a94c2c9edbb5c05a2ee2ed76a1896d0a80 | Octachron/babilim | untyped.ml |
module Internal = CamlinternalFormatBasics
exception Dynamic_type_error of string
open Metafmt
module W = Witness
module Cfmt = struct
type s = { label:string; pa:int; pr:string; mode:string }
type ('fmter,'mid,'fin) t =
Dyn: ('a,'fmter,'mid,'d,'e,'fin) Internal.fmt ->
('fmter,'mid,'fin) t
type u... | null | https://raw.githubusercontent.com/Octachron/babilim/46b0412cd6efef5efe26bfd379566688bf7ab571/metaprintf/untyped.ml | ocaml | Error messages |
module Internal = CamlinternalFormatBasics
exception Dynamic_type_error of string
open Metafmt
module W = Witness
module Cfmt = struct
type s = { label:string; pa:int; pr:string; mode:string }
type ('fmter,'mid,'fin) t =
Dyn: ('a,'fmter,'mid,'d,'e,'fin) Internal.fmt ->
('fmter,'mid,'fin) t
type u... |
afa09aebd582de5c1d835fc8d586161894cc9e676de504c74ac44388c0bee4c3 | aroemers/mount-lite | data_driven.clj | (ns mount.extensions.data-driven
"Start a system based on a data configuration."
(:require [mount.lite :as mount]))
(defn with-config*
[{:keys [only except substitutes]} f]
(let [states (cond->> @mount/*states*
(seq only) (filter (set (map keyword only)))
(seq... | null | https://raw.githubusercontent.com/aroemers/mount-lite/f75a4592c256e1d97b79458a342acc9754270622/src/mount/extensions/data_driven.clj | clojure | (ns mount.extensions.data-driven
"Start a system based on a data configuration."
(:require [mount.lite :as mount]))
(defn with-config*
[{:keys [only except substitutes]} f]
(let [states (cond->> @mount/*states*
(seq only) (filter (set (map keyword only)))
(seq... | |
65e9c75177199890cab2aad77ca45ea8f9fa73744b64df2a7d46ef6ae36ad1a8 | logicmoo/wam_common_lisp | sanity-test-3.lisp | 3.6 Subclasses and inheritance
(defclass animal ()
((legs :reader leg-count :initarg :legs)
(comes-from :reader comes-from :initarg :comes-from)))
(defparameter my-animal (make-instance 'animal))
(defclass mammal (animal)
((diet :initform 'antelopes :initarg :diet)))
(defparameter my-mammal (make-instance ... | null | https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/t/sanity-test-3.lisp | lisp | ACL needs to instantiate a class before its precedence-list becomes visible
ACL needs to instantiate a class before its precedence-list becomes visible | 3.6 Subclasses and inheritance
(defclass animal ()
((legs :reader leg-count :initarg :legs)
(comes-from :reader comes-from :initarg :comes-from)))
(defparameter my-animal (make-instance 'animal))
(defclass mammal (animal)
((diet :initform 'antelopes :initarg :diet)))
(defparameter my-mammal (make-instance ... |
f9ce9de671c154fc5cf4d97eefbc9f58894cb191c57db618fe3efd473b22a7ae | nasa/pvslib | basic-strats.lisp | ;;****
Copyright ( C ) 2016 , Michigan Technological University and .
;; GNU LGPL information:
;; ---------------------
This code 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 . This code is distributed ... | null | https://raw.githubusercontent.com/nasa/pvslib/2be465b36f4d884c33cbd49a37939c4664db74eb/Riemann/basic-strats.lisp | lisp | ****
GNU LGPL information:
---------------------
without even the impliedwarranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
****
****
****
****
****
****
****
****
****
This if was added to accommodate riemann-numerical
****
the auxiliary steps ... | Copyright ( C ) 2016 , Michigan Technological University and .
This code is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License
auxiliary step 1 :
(defstep simple-integral-inclusion ()
(then (lemma "Simple_Riemann_Soundness")(skosimp*)
... |
85e83d8910194442909198b82248496de43d8c54cf9bdb3830fcd8361e4ec19a | jphmrst/cl-org-sampler | sampler.lisp | (in-package :org-sampler)
(defvar *no-edit-message* "DO NOT EDIT --- generated from source code."
"Message printed at the top of ")
(defvar *index-writer* t
"Should be left as =t=: used to indicate which outermost function API call should invoke =write-index-org=.")
(defparameter *generate-html* t
"If non-nil, ... | null | https://raw.githubusercontent.com/jphmrst/cl-org-sampler/ee135a417750e5b1d810bb9574eb85223cb3038a/sampler.lisp | lisp | needed.
Store the path for this use of the symbol.
-----------------------------------------------------------------
others essentially forbid it. The =documentation*=
----------------------------------------------------------------- | (in-package :org-sampler)
(defvar *no-edit-message* "DO NOT EDIT --- generated from source code."
"Message printed at the top of ")
(defvar *index-writer* t
"Should be left as =t=: used to indicate which outermost function API call should invoke =write-index-org=.")
(defparameter *generate-html* t
"If non-nil, ... |
8b182e58d62abd0040f3a2fd6555c443955e56a1e37f0b4d1e4b5e627fcbd907 | haskell/network-uri | URI.hs | #if __GLASGOW_HASKELL__ < 800
# LANGUAGE RecordWildCards #
#endif
# LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 800
{-# LANGUAGE DeriveLift, StandaloneDeriving #-}
#else
# LANGUAGE TemplateHaskell #
#endif
#if MIN_VERSION_template_haskell(2,12,0) && MIN_VERSION_parsec(3,1,13)
{-# LANGUAGE Safe #-}
#elif __GLASGOW_HASKELL... | null | https://raw.githubusercontent.com/haskell/network-uri/9aa68d10c543d70ebc0326f5c4bcff209c69a47d/Network/URI.hs | haskell | # LANGUAGE DeriveLift, StandaloneDeriving #
# LANGUAGE Safe #
------------------------------------------------------------------------------
|
Module : Network.URI
License : BSD-style (see end of this file)
Stability : provisional
Portability : portable
This module defines functions for hand... | #if __GLASGOW_HASKELL__ < 800
# LANGUAGE RecordWildCards #
#endif
# LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 800
#else
# LANGUAGE TemplateHaskell #
#endif
#if MIN_VERSION_template_haskell(2,12,0) && MIN_VERSION_parsec(3,1,13)
#elif __GLASGOW_HASKELL__ >= 702
# LANGUAGE Trustworthy #
#endif
Copyright : ( c ) 2... |
532af87bd64c8b566f3436bc830a4abb500201816196a47fe75962692b0fbf1d | phadej/cabal-fmt | Prelude.hs | -- |
-- License: GPL-3.0-or-later
Copyright :
--
-- Fat-prelude.
module CabalFmt.Prelude (
-- * Control.Arrow
(&&&),
-- * Control.Monad
when, unless, void,
-- * Data.Bifunctor
bimap,
* Data .
toLower,
-- * Data.Either
partitionEithers,
-- * Data.Foldable
toList, traver... | null | https://raw.githubusercontent.com/phadej/cabal-fmt/9a558a307dbbce77c31bdaff876720723cd8cd7b/src/CabalFmt/Prelude.hs | haskell | |
License: GPL-3.0-or-later
Fat-prelude.
* Control.Arrow
* Control.Monad
* Data.Bifunctor
* Data.Either
* Data.Foldable
* Data.Function
* Data.List
* Data.Maybe
* Packages
** bytestring
** containers
** directory
** exceptions
* Extras
** Lens | Copyright :
module CabalFmt.Prelude (
(&&&),
when, unless, void,
bimap,
* Data .
toLower,
partitionEithers,
toList, traverse_, asum, for_,
on, (&),
intercalate, sortOn, sortBy, nub,
catMaybes,
fromMaybe,
isJust,
isNothing,
ByteString,
* *
C.fromUTF8BS, C... |
11867c416cdb8d1bd8b0da5b012da76d0732952c23a73c8e37fa27d0f5b6b693 | WorksHub/client | core.cljs | (ns wh.company.profile.core
(:require
[cljs.loader :as loader]
[re-frame.core :refer [dispatch dispatch-sync reg-event-db]]
[wh.company.articles.views :as articles]
[wh.company.jobs.events :as jobs-events]
[wh.company.jobs.views :as jobs]
[wh.company.listing.db :as listing-db]
[wh.company.... | null | https://raw.githubusercontent.com/WorksHub/client/77e4212a69dad049a9e784143915058acd918982/client/src/wh/company/profile/core.cljs | clojure | load extra symbols | (ns wh.company.profile.core
(:require
[cljs.loader :as loader]
[re-frame.core :refer [dispatch dispatch-sync reg-event-db]]
[wh.company.articles.views :as articles]
[wh.company.jobs.events :as jobs-events]
[wh.company.jobs.views :as jobs]
[wh.company.listing.db :as listing-db]
[wh.company.... |
aecc9e425351bde9e603e5ded3d0bfb7309ad80e773350ea70daa8f2c1263f23 | bpiel/guildsman | tabs.cljs | (ns re-com.tabs
(:require-macros [re-com.core :refer [handler-fn]])
(:require [re-com.util :refer [deref-or-value]]
[re-com.box :refer [flex-child-style]]
[re-com.validate :refer [css-style? vector-of-maps?] :refer-macros [validate-args-macro]]))
;;-------------------------... | null | https://raw.githubusercontent.com/bpiel/guildsman/59c9a7459de19525cfc54112f02127e0777a00ce/resources/public/js/compiled/out/re_com/tabs.cljs | clojure | --------------------------------------------------------------------------------------------------
Component: horizontal-tabs
--------------------------------------------------------------------------------------------------
must use current instead of @model to avoid reagent warnings
----------------------------... | (ns re-com.tabs
(:require-macros [re-com.core :refer [handler-fn]])
(:require [re-com.util :refer [deref-or-value]]
[re-com.box :refer [flex-child-style]]
[re-com.validate :refer [css-style? vector-of-maps?] :refer-macros [validate-args-macro]]))
(def tabs-args-desc
[{... |
b360a81dd884f8eb928f040433cd046c47cc6db9b4bc42b5863c8e56e39a8271 | poseidon-framework/poseidon-hs | Init.hs | {-# LANGUAGE OverloadedStrings #-}
module Poseidon.CLI.Init where
import Poseidon.BibFile (dummyBibEntry, writeBibTeXFile)
import Poseidon.GenotypeData (GenotypeDataSpec (..), loadIndividuals)
import Poseidon.Janno (writeJannoFile)
import Poseidon.Package (... | null | https://raw.githubusercontent.com/poseidon-framework/poseidon-hs/aa24e9753e5a44ba82fc691421c6a25ecb6316b6/src/Poseidon/CLI/Init.hs | haskell | # LANGUAGE OverloadedStrings #
create new directory
compile genotype data structure
genotype data
create new package
janno
bib |
module Poseidon.CLI.Init where
import Poseidon.BibFile (dummyBibEntry, writeBibTeXFile)
import Poseidon.GenotypeData (GenotypeDataSpec (..), loadIndividuals)
import Poseidon.Janno (writeJannoFile)
import Poseidon.Package (PoseidonPackage (..),
... |
b72a6212344784e171d162243b6becdfaa0dd0ee0b83446e6d1412714ff0d42b | well-typed-lightbulbs/ocaml-esp32 | stack.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/stdlib/stack.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type 'a t = { mutable c : 'a list; mutable len : int; }
exception Empty
let create () = { c = []; len =... |
27fcbca9506c1189779d8c2379f04ecf301a06ac0564923d840adc16fdd58a0d | MLstate/opalang | infixOperator.mli |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/infixOperator.mli | ocaml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | |
0a14d936fdf67bfd39e2c156ea0fed41dded13f023f1a33b4befae8d21e0c1f3 | fpco/ide-backend | License.hs | {-# LANGUAGE DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.License
Copyright : 2003 - 2005
2008
--
-- Maintainer :
-- Portability : portable
--
-- The License datatype. For more information about ... | null | https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/inputs/Cabal-1.18.1.5/Distribution/License.hs | haskell | # LANGUAGE DeriveDataTypeable #
---------------------------------------------------------------------------
|
Module : Distribution.License
Maintainer :
Portability : portable
The License datatype. For more information about these and other
open-source licenses, you may visit </>.
The @.cabal@ file... | Copyright : 2003 - 2005
2008
includes ' GPL ' , ' AGPL ' , ' LGPL ' , ' Apache 2.0 ' , ' MIT ' and ' BSD3 ' licenses .
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are
... |
aeb2eb4ed42ce52d4c33cb5d4e101ec870e383cbdac2b57dfd0078f2ae6a0f34 | seckcoder/iu_c311 | interp.rkt | #lang eopl
(require "../base/utils.rkt")
(require "store.rkt")
(require "grammar.rkt")
(require "ds.rkt")
(require "thread.rkt")
(require data/queue)
(provide interp)
(define ready-queue (make-queue))
(define apply-proc
(lambda (proc1 arg cont)
(cases
proc proc1
(closure
(var body env)
... | null | https://raw.githubusercontent.com/seckcoder/iu_c311/a1215983b6ab08df32058ef1e089cb294419e567/racket/thread/interp.rkt | racket | all actions finished
start the next thread, current thread is dropped
(println "replace current thread with:~s" (thread-name (current-thread)))
any solution to fix this?
duplicate code. ugly
the start of evil...
(println "thread:~s expired; replace with:~s"
(thread-name cur-thd)
... | #lang eopl
(require "../base/utils.rkt")
(require "store.rkt")
(require "grammar.rkt")
(require "ds.rkt")
(require "thread.rkt")
(require data/queue)
(provide interp)
(define ready-queue (make-queue))
(define apply-proc
(lambda (proc1 arg cont)
(cases
proc proc1
(closure
(var body env)
... |
214849d754307699fa7ee631a5fb67007a0e27c480304df2c3aa583cf930d040 | Shirakumo/kandria | fishing.lisp | (in-package #:org.shirakumo.fraf.kandria)
(define-shader-entity fishing-buoy (lit-sprite moving)
((texture :initform (// 'kandria 'items))
(fishing-line :accessor fishing-line)
(size :initform (vec 8 8))
(layer-index :initform +base-layer+)
(offset :initform (vec 0 24))
(tries :initform 0 :accessor tr... | null | https://raw.githubusercontent.com/Shirakumo/kandria/458e21adec1088483f238565979cff2d58bbc3fe/fishing.lisp | lisp | (in-package #:org.shirakumo.fraf.kandria)
(define-shader-entity fishing-buoy (lit-sprite moving)
((texture :initform (// 'kandria 'items))
(fishing-line :accessor fishing-line)
(size :initform (vec 8 8))
(layer-index :initform +base-layer+)
(offset :initform (vec 0 24))
(tries :initform 0 :accessor tr... | |
3ca7c557f00f04e9a8de5197355d8c3133cd636de133492427a2e7a578d6ef3f | jrh13/hol-light | binomial.ml | (* ========================================================================= *)
(* Binomial coefficients and the binomial theorem. *)
(* ========================================================================= *)
let binom = define
`(!n. binom(n,0) = 1) /\
(!k. binom(0,SUC(k)) = 0) /\
... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/Library/binomial.ml | ocaml | =========================================================================
Binomial coefficients and the binomial theorem.
=========================================================================
-------------------------------------------------------------------------
More potentiall... |
let binom = define
`(!n. binom(n,0) = 1) /\
(!k. binom(0,SUC(k)) = 0) /\
(!n k. binom(SUC(n),SUC(k)) = binom(n,SUC(k)) + binom(n,k))`;;
let BINOM_0 = prove
(`!n. binom(0,n) = if n = 0 then 1 else 0`,
INDUCT_TAC THEN REWRITE_TAC[binom; NOT_SUC]);;
let BINOM_LT = prove
(`!n k. n < k ==> binom(n,k) = 0`,
... |
1e39f3ee8ba271bbab96d9ddc6c1967c5d42e79ae95f0193d3c50b19737f73c8 | glv2/cl-monero-tools | daemon.lisp | ;;;; This file is part of monero-tools
Copyright 2016 - 2020
Distributed under the GNU GPL v3 or later .
;;;; See the file LICENSE for terms of use and distribution.
(in-package :monero-binary-rpc)
(defbinrpc get-blocks.bin ("get_blocks.bin" block-ids &key start-height prune no-miner-transaction)
"Get all ... | null | https://raw.githubusercontent.com/glv2/cl-monero-tools/ab972ac3a7c5489cf23e3bdaa5d390d5cff1732b/monero-binary-rpc/daemon.lisp | lisp | This file is part of monero-tools
See the file LICENSE for terms of use and distribution.
(get-blocks.bin (list "771fbcd656ec1464d3a02ead5e18644030007a0fc664c0a964d30922821a8148" "418015bb9ae982a1975da7d79277c2705727a56894ba0fb246adaabb1f4632e3"))
(get-hashes.bin (list "771fbcd656ec1464d3a02ead5e18644030007a0fc664c... | Copyright 2016 - 2020
Distributed under the GNU GPL v3 or later .
(in-package :monero-binary-rpc)
(defbinrpc get-blocks.bin ("get_blocks.bin" block-ids &key start-height prune no-miner-transaction)
"Get all blocks info."
(let ((hex-block-ids (with-output-to-string (s)
(dolist (id... |
e05dae2cfe7002da774d0d11181627af14915d2d351ac10bfb3cc26250040cd8 | ejgallego/HOARe2 | arlc.ml | Copyright ( c ) 2013 , The Trustees of the University of Pennsylvania
Copyright ( c ) 2013 , The IMDEA Software Institute
All rights reserved .
LICENSE : 3 - clause BSD style .
See the LICENSE file for details on licensing .
Copyright (c) 2013, The IMDEA Software Institute
All rights re... | null | https://raw.githubusercontent.com/ejgallego/HOARe2/48d8760696fdf4b8a3eda5a4d2a53eeba53072d8/src/arlc.ml | ocaml | open Eval
Parse the input
At some point we must use this
=== The main function ===
Setup the pretty printing engine
Don't ever ask
Set up the common-lib dir
Read the command-line arguments
Print the results of the parsing phase
let program = Parsetree.exp_uncurry program in
=== Call the main functi... | Copyright ( c ) 2013 , The Trustees of the University of Pennsylvania
Copyright ( c ) 2013 , The IMDEA Software Institute
All rights reserved .
LICENSE : 3 - clause BSD style .
See the LICENSE file for details on licensing .
Copyright (c) 2013, The IMDEA Software Institute
All rights re... |
0b3a66407c7148cc964c5810d9f203c71b0b6b757d071d3c971eda7f34a8fc3e | gedge-platform/gedge-platform | rabbit_channel_interceptor.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_channel_interceptor).
-include_li... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit/src/rabbit_channel_interceptor.erl | erlang |
Derive some initial state from the channel. This will be passed back
Check no non-empty pairwise intersection in a list of sets
keep dialyzer happy | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_channel_interceptor).
-include_lib("rab... |
2c443d9482b70b888e0cf31013e191ca737b16f135cd26ff208f1bab9f5d4b2f | onedata/op-worker | atm_openfaas_config.erl | %%%-------------------------------------------------------------------
@author
( C ) 2022 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% This module provides interface to ... | null | https://raw.githubusercontent.com/onedata/op-worker/166ab14f1f2ac34c4bca582b5651248a12f63081/src/modules/automation/task/executor/platforms/openfaas/config/atm_openfaas_config.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
This module provides interface to inspect OpenFaaS service configuration.
@end
-------------------------------------------------------------------
API
==================... | @author
( C ) 2022 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(atm_openfaas_config).
-author("Bartosz Walkowicz").
-include("modules/automation/atm_execution.hrl").
-include_lib("ctool/include/http/headers.hrl").
-export([
get/0,
get_endpoint... |
c078733adadb4a3e9c43a6a9d1553ea5b66a6233ec190b0225aec7af280f0784 | racket/honu | common.rkt | #lang racket/base
(require honu-parse
(for-syntax syntax/parse
racket/base
honu-parse))
(provide sqr)
(define (sqr x) (* x x))
;; convert a float to an integer
(provide integer)
(define (integer x)
(inexact->exact (round x)))
(provide honu-cond)
(define-honu-synt... | null | https://raw.githubusercontent.com/racket/honu/b36b9aeda8be22bf7fda177e831f42ac1a1de79b/honu/private/common.rkt | racket | convert a float to an integer | #lang racket/base
(require honu-parse
(for-syntax syntax/parse
racket/base
honu-parse))
(provide sqr)
(define (sqr x) (* x x))
(provide integer)
(define (integer x)
(inexact->exact (round x)))
(provide honu-cond)
(define-honu-syntax honu-cond
(lambda (code)
... |
5539640b45c78749f865c67f9537c879d75f72db626859bbbbf3651322aabf3e | moby/vpnkit | active_list.ml | open Lwt.Infix
let src =
let src = Logs.Src.create "ofs" ~doc:"active_list" in
Logs.Src.set_level src (Some Logs.Info);
src
module Log = (val Logs.src_log src : Logs.LOG)
module Var = struct
type 'a t = {
mutable thing: 'a option;
c: unit Lwt_condition.t;
}
let create () =
let c = Lwt_condi... | null | https://raw.githubusercontent.com/moby/vpnkit/6dda85cda59e36875fcc6324205aaf0c7056ff0a/src/ofs/active_list.ml | ocaml | We manage a list of named entries
TODO: wrong for regular files
local_port is resolved | open Lwt.Infix
let src =
let src = Logs.Src.create "ofs" ~doc:"active_list" in
Logs.Src.set_level src (Some Logs.Info);
src
module Log = (val Logs.src_log src : Logs.LOG)
module Var = struct
type 'a t = {
mutable thing: 'a option;
c: unit Lwt_condition.t;
}
let create () =
let c = Lwt_condi... |
a8320aa85208299434adefa57d4f44de1f4e4c3ea3783eb2affae6a75e7dad3c | lemonidas/Alan-Compiler | Types.mli | type typ = TYPE_none (* no type (should not be used) *)
| TYPE_int (* int *)
| TYPE_byte (* byte *)
| TYPE_array of (* array *)
typ * (* element typ... | null | https://raw.githubusercontent.com/lemonidas/Alan-Compiler/bbedcbf91028d45a2e26839790df2a1347e8bc52/Types.mli | ocaml | no type (should not be used)
int
byte
array
element type
proc (return type) | size of array , if known , or zero
| TYPE_pointer of
typ
val sizeOfType : typ -> int
val extractType : typ -> typ
val equalType : typ -> typ -> bool
val sizeOfArrayElem : typ -> int
|
7737aef72de47bf3cbfae9f4f981eb1cbc60856a15e5841b96b7ca5ef7f49fa8 | eeng/shevek | metadata.clj | (ns shevek.engine.druid-native.metadata
(:require [shevek.driver.druid :refer [datasources send-query]]
[shevek.lib.time :refer [parse-time]]
[shevek.lib.time.ext :refer [minus-period]]))
(defn time-boundary [driver cube]
(let [query {:queryType "timeBoundary" :dataSource cube}
{:ke... | null | https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/src/clj/shevek/engine/druid_native/metadata.clj | clojure | Examples | (ns shevek.engine.druid-native.metadata
(:require [shevek.driver.druid :refer [datasources send-query]]
[shevek.lib.time :refer [parse-time]]
[shevek.lib.time.ext :refer [minus-period]]))
(defn time-boundary [driver cube]
(let [query {:queryType "timeBoundary" :dataSource cube}
{:ke... |
adae85badf88909f7aba3698744e8de9f7d9e37168ef553af0e23615570361b6 | reborg/reclojure | persistent_stack.clj | (ns reclojure.lang.protocols.persistent-stack
(:refer-clojure :exclude [peek pop]))
(defprotocol PersistentStack
(peek [this])
(pop [this]))
| null | https://raw.githubusercontent.com/reborg/reclojure/c8aae4cc384d59262569cbc9c332e08619f292ef/src/reclojure/lang/protocols/persistent_stack.clj | clojure | (ns reclojure.lang.protocols.persistent-stack
(:refer-clojure :exclude [peek pop]))
(defprotocol PersistentStack
(peek [this])
(pop [this]))
| |
e016a197f636832e458be11d7470297a741016c6fd30cb3aa4a5dc2eae9d9ffa | erlang/sourcer | sourcer_open_tests.erl | %% coding: latin-1
%% Author: jakob
Created : 7 may 2013
-module(sourcer_open_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("sourcer_open.hrl").
internal_split_test_() ->
[
?_assertEqual({"abcd",2}, split("ab&cd")),
?_assertEqual({"cd",0}, split("&cd")),
?_assertEqual({"ab",2}, sp... | null | https://raw.githubusercontent.com/erlang/sourcer/27ea9c63998b9e694eb7b654dd05b831b989e69e/apps/sourcer/test2/sourcer_open_tests.erl | erlang | coding: latin-1
Author: jakob | Created : 7 may 2013
-module(sourcer_open_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("sourcer_open.hrl").
internal_split_test_() ->
[
?_assertEqual({"abcd",2}, split("ab&cd")),
?_assertEqual({"cd",0}, split("&cd")),
?_assertEqual({"ab",2}, split("ab&")),
?_assertEqual({"ab... |
68e01c3e0ea8fdb09f0ce433438f49880bfe3670da5b9d9c9b51725018b28836 | scalaris-team/scalaris | jsonrpc.erl | Copyright ( C ) 2006 < >
< >
%% All rights reserved.
%%
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions
%% are met:
%%
1 . Redistributions of source code must retain the above copyright
%% no... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/contrib/yaws/src/jsonrpc.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
copyright notice, this list of conditions and the following
disclaimer in t... | Copyright ( C ) 2006 < >
< >
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS '' AND ANY EXPRESS
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR ... |
f30b9df7e26e66656f26d0ebfd815494f6e77475e4f9f1bc29b5e5aee2552cf1 | jarohen/simple-brepl | handler.clj | (ns sample-project.handler
(:require [ring.util.response :refer [response]]
[compojure.core :refer [defroutes GET routes]]
[compojure.route :refer [resources]]
[compojure.handler :refer [api]]
[hiccup.page :refer [html5 include-css include-js]]
[simple-brepl... | null | https://raw.githubusercontent.com/jarohen/simple-brepl/01169c5f650e768f8f65df238d452afa099537f7/sample-project/src/clojure/sample_project/handler.clj | clojure | (ns sample-project.handler
(:require [ring.util.response :refer [response]]
[compojure.core :refer [defroutes GET routes]]
[compojure.route :refer [resources]]
[compojure.handler :refer [api]]
[hiccup.page :refer [html5 include-css include-js]]
[simple-brepl... | |
8ea809872073e3304ce7e699b95f9cf7d00467d679f80dccb5709d371d50b13a | ChrisTitusTech/gimphelp | 210_photo_film-grain.scm | 210_photo_film-grain.scm
last modified / tested by [ gimphelp.org ]
05/11/2019 on GIMP 2.10.10
;==================================================
;
; Installation:
; This script should be placed in the user or system-wide script folder.
;
; Windows 7/10
C:\Program Files\GIMP 2\share\gimp\2.0\scripts
; or
C... | null | https://raw.githubusercontent.com/ChrisTitusTech/gimphelp/fdbc7e3671ce6bd74cefd83ecf7216e5ee0f1542/gimp_scripts-2.10/210_photo_film-grain.scm | scheme | ==================================================
Installation:
This script should be placed in the user or system-wide script folder.
Windows 7/10
or
Linux
/home/yourname/.config/GIMP/2.10/scripts
or
Linux system-wide
/usr/share/gimp/2.0/scripts
==================================================
... | 210_photo_film-grain.scm
last modified / tested by [ gimphelp.org ]
05/11/2019 on GIMP 2.10.10
C:\Program Files\GIMP 2\share\gimp\2.0\scripts
C:\Users\YOUR - NAME\AppData\Roaming\GIMP\2.10\scripts
and convert to RGB if needed , leave more grain in colors option
it under the terms of the GNU General ... |
22fb26a0759b2809d69006544740277f92fc976cb353151b997dd4fc14aec4d7 | archaelus/erms | erms_db.erl | %%%-------------------------------------------------------------------
@copyright Catalyst IT Ltd ( )
%%%
@author nt < >
%% @version {@vsn}, {@date} {@time}
%% @doc Mnesia DB utility module
%% @end
%%%-------------------------------------------------------------------
-module(erms_db).
-include_lib("mnesia_mode... | null | https://raw.githubusercontent.com/archaelus/erms/5dbe5e79516a16e461e7a2a345dd80fbf92ef6fa/src/erms_db.erl | erlang | -------------------------------------------------------------------
@version {@vsn}, {@date} {@time}
@doc Mnesia DB utility module
@end
-------------------------------------------------------------------
API
====================================================================
API
=================================... | @copyright Catalyst IT Ltd ( )
@author nt < >
-module(erms_db).
-include_lib("mnesia_model.hrl").
-export([recreate_db/0, recreate_db/1, dump/0,
backup/0, backup/1, default_backup_name/0,
change_node_name/4, change_node_name/5,
drop_tables/0, init_node/0, init_node/1,
restor... |
04767ae30948a27fa8e96c5db0a4e6cced2d692ad523f7936b08c998681e7c60 | YoshikuniJujo/test_haskell | try-cairo-layout.hs | # LANGUAGE BlockArguments #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import Data.Maybe
import Data.Angle
import Data.Color
import Data.ImageData
import Data.ImageData.Text hiding (Rectangle)
import Trial.TryCairo
import Trial.MakePng
main :: IO ()
main = (`makePng` "pngs/try-cairo-layout.png") =<< ... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/e88587c5aef3023cacbd9db2b6dea869e3d1ebbd/themes/gui/cairo/try-image-data/app/try-cairo-layout.hs | haskell | # LANGUAGE BlockArguments #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import Data.Maybe
import Data.Angle
import Data.Color
import Data.ImageData
import Data.ImageData.Text hiding (Rectangle)
import Trial.TryCairo
import Trial.MakePng
main :: IO ()
main = (`makePng` "pngs/try-cairo-layout.png") =<< ... | |
10b9a778ab737bd2fdf436d874c35a25ead03fe0f9154ec4eea0434ae3952734 | agrafix/users | Spec.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Web.Users.TestSpec
import Web.Users.Persistent
import System.IO.Temp
import System.IO
import Control.Monad.Logger
import Database.Persist.Sqlite
import Test.Hspec
import qualified Data.Text as T
main :: IO ()
main =
withSystemTempFile "tempBaseXXX.db" $... | null | https://raw.githubusercontent.com/agrafix/users/55fb8571aa6a6a0a20eb696635734defb09f0da1/users-persistent/test/Spec.hs | haskell | # LANGUAGE OverloadedStrings # | module Main where
import Web.Users.TestSpec
import Web.Users.Persistent
import System.IO.Temp
import System.IO
import Control.Monad.Logger
import Database.Persist.Sqlite
import Test.Hspec
import qualified Data.Text as T
main :: IO ()
main =
withSystemTempFile "tempBaseXXX.db" $ \fp hdl ->
do hClose hdl
... |
2fea06835bd1530282b10daf9a667c1ed111282da3f4d01bda69873c96c45cf4 | esl/tracerl | test_driver.erl | -module(test_driver).
-export([load/1, start_link/2, stop/1, unload/1]).
-export([foo/3, bar/3]).
load(Driver) ->
Dir = case code:priv_dir(tracerl) of
{error, bad_name} -> "priv";
Path -> Path
end,
case erl_ddll:load_driver(Dir, Driver) of
ok -> ok;
{error, already_load... | null | https://raw.githubusercontent.com/esl/tracerl/8ebc649ccd7a3013aa310e4f71d35ef65fb3286b/test/test_driver.erl | erlang | -module(test_driver).
-export([load/1, start_link/2, stop/1, unload/1]).
-export([foo/3, bar/3]).
load(Driver) ->
Dir = case code:priv_dir(tracerl) of
{error, bad_name} -> "priv";
Path -> Path
end,
case erl_ddll:load_driver(Dir, Driver) of
ok -> ok;
{error, already_load... | |
b6f1023a5c669a879d067bf55fcdfb4ab73d9663956b0cba7053eee4b2c8d66d | dongcarl/guix | gnu-maintenance.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2010 , 2011 , 2012 , 2013 , 2014 , 2015 , 2016 , 2017 , 2018 , 2019 , 2020 , 2021 < >
Copyright © 2012 , 2013 < >
Copyright © 2021 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or mod... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/guix/gnu-maintenance.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 © 2010 , 2011 , 2012 , 2013 , 2014 , 2015 , 2016 , 2017 , 2018 , 2019 , 2020 , 2021 < >
Copyright © 2012 , 2013 < >
Copyright © 2021 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . ... |
c6efa49c68c7c23c510f1386950658cfc6a8af52c2f2a83e06032da4076eafe5 | ghc/testsuite | T7126.hs | # LANGUAGE FlexibleInstances , UndecidableInstances #
module Main where
main :: IO ()
main = do
let k1 = func1 1 :: Int
print $ show k1
let k2 = outer :: Int
print $ show k2
outer :: Class3 a => a
outer = func1 1
class Class1 a where
func1 :: Int -> a
class Class1 a => Class2 a where
func2 :: Int -> a... | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_run/T7126.hs | haskell |
tests: <<loop>> | # LANGUAGE FlexibleInstances , UndecidableInstances #
module Main where
main :: IO ()
main = do
let k1 = func1 1 :: Int
print $ show k1
let k2 = outer :: Int
print $ show k2
outer :: Class3 a => a
outer = func1 1
class Class1 a where
func1 :: Int -> a
class Class1 a => Class2 a where
func2 :: Int -> a... |
7859a4215e8baee4232acb6360c42f5ce5afd2d81da5f06bbb1b896598c41287 | EFanZh/EOPL-Exercises | exercise-6.16-test.rkt | #lang racket/base
(require rackunit)
(require "../solutions/exercise-6.16.rkt")
(check-equal? (run "11") (num-val 11))
(check-equal? (run "-33") (num-val -33))
(check-equal? (run "-(44, 33)") (num-val 11))
(check-equal? (run "-(-(44, 33), 22)") (num-val -11))
(check-equal? (run "-(55, -(22, 11))") (num-val 44))
(che... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-6.16-test.rkt | racket | #lang racket/base
(require rackunit)
(require "../solutions/exercise-6.16.rkt")
(check-equal? (run "11") (num-val 11))
(check-equal? (run "-33") (num-val -33))
(check-equal? (run "-(44, 33)") (num-val 11))
(check-equal? (run "-(-(44, 33), 22)") (num-val -11))
(check-equal? (run "-(55, -(22, 11))") (num-val 44))
(che... | |
4c91613c5c8317c3281d3730472442de92e96ad52db7ecdd30ad2d48ce0f0171 | uw-unsat/jitsynth | fig-8.rkt | #lang rosette
(require "bpf/exec-count.rkt"
"ams/machine.rkt"
"common/data-structures.rkt"
"common/data-utils.rkt"
"common/case-hex.rkt"
"common/instructions.rkt"
"common/symbolic-ops.rkt")
(require (only-in "common/debug.rkt" [debugln common:debugln]))
(require ... | null | https://raw.githubusercontent.com/uw-unsat/jitsynth/69529e18d4a8d4dace884bfde91aa26b549523fa/fig-8.rkt | racket | #lang rosette
(require "bpf/exec-count.rkt"
"ams/machine.rkt"
"common/data-structures.rkt"
"common/data-utils.rkt"
"common/case-hex.rkt"
"common/instructions.rkt"
"common/symbolic-ops.rkt")
(require (only-in "common/debug.rkt" [debugln common:debugln]))
(require ... | |
6081a8adb583d39b870c43608e0326b148147f35812c45f0900a6188b4590105 | metaocaml/ber-metaocaml | arrays_in_major.ml | (* TEST
flags = "-g"
compare_programs = "false"
*)
open Gc.Memprof
let root = ref []
let[@inline never] allocate_arrays lo hi cnt keep =
assert (lo >= 300); (* Will be allocated in major heap. *)
for j = 0 to cnt-1 do
for i = lo to hi do
root := Array.make i 0 :: !root
done;
if not keep t... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/statmemprof/arrays_in_major.ml | ocaml | TEST
flags = "-g"
compare_programs = "false"
Will be allocated in major heap.
This assertion has probability to fail close to 1e-8. |
open Gc.Memprof
let root = ref []
let[@inline never] allocate_arrays lo hi cnt keep =
for j = 0 to cnt-1 do
for i = lo to hi do
root := Array.make i 0 :: !root
done;
if not keep then root := []
done
let check_nosample () =
Printf.printf "check_nosample\n%!";
let alloc _ =
Printf.printf ... |
3dce1917a26ccbb2e5b94f2e08f013a3fa686539668c9c6395d5c61a0785240c | ogaml/ogaml | program.mli | * This module provides an high - level , type - safe and optimized
* way to manipulate programs ( groups of GLSL shaders ) .
*
* way to manipulate programs (groups of GLSL shaders).
**)
* Thrown at GLSL failure
exception Program_error of string
(** This module provides a low-level access to uniforms *)
modul... | null | https://raw.githubusercontent.com/ogaml/ogaml/5e74597521abf7ba2833a9247e55780eabfbab78/src/graphics/program/program.mli | ocaml | * This module provides a low-level access to uniforms
* Type of a uniform
* Returns the name of a uniform
* Returns the type of a uniform
* Returns the location of a uniform.
* This is a low-level value and should only be
* used internally
* This module provides a low-level access to attributes
* Type of ... | * This module provides an high - level , type - safe and optimized
* way to manipulate programs ( groups of GLSL shaders ) .
*
* way to manipulate programs (groups of GLSL shaders).
**)
* Thrown at GLSL failure
exception Program_error of string
module Uniform : sig
type t
val name : t -> string
val... |
b84a194463640b58c895c15aa8b6a14439d057e357b9240f0e5b5fe330a7ba14 | aws-beam/aws-erlang | aws_docdb.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
%% @doc Amazon DocumentDB API documentation
-module(aws_docdb).
-export([add_source_identifier_to_subscription/2,
add_source_identifier_to_subscription/3,
add_tags_to_resource/2,
add_tags_to_resource/3,... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_docdb.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
@doc Amazon DocumentDB API documentation
====================================================================
API
====================================================================
@doc Adds a source identifier to an existing event notification
subscription.
You can u... | See -beam/aws-codegen for more details .
-module(aws_docdb).
-export([add_source_identifier_to_subscription/2,
add_source_identifier_to_subscription/3,
add_tags_to_resource/2,
add_tags_to_resource/3,
apply_pending_maintenance_action/2,
apply_pending_maintenance_action/3,... |
58688c754a27a37b37d7cc31810dfdcfe353557eb357ea01967057bf352dd0e3 | mzp/coq-ide-for-ios | declaremods.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/library/declaremods.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
modules and components
currently ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : declaremods.ml 1332... |
e6054d84fdd676ff4ca85f3b673bf6ea0c0dec27f7c2a8e7dd91c7452488e345 | pmundkur/flowcaml | ident.mli | (**************************************************************************)
(* *)
(* *)
, Projet C... | null | https://raw.githubusercontent.com/pmundkur/flowcaml/ddfa8a37e1cb60f42650bed8030036ac313e048a/src-flowcaml/types/ident.mli | ocaml | ************************************************************************
et en Automatique. All ri... |
, Projet Cristal , INRIA Rocquencourt
Copyright 2002 , 2003 Institut National de Recherche en Informatique
under the terms of the Q Public License version 1.0 .
$ I d : ident.mli , v 1.2 2003/06/26 13... |
8c0a89cfe525fafd7fc6e605e01998aa62f75051eb95b52af0b615a332c86a9e | PEZ/rich4clojure | problem_096.clj | (ns rich4clojure.easy.problem-096
(:require [hyperfiddle.rcf :refer [tests]]))
= Beauty is Symmetry =
By 4Clojure user :
;; Difficulty: Easy
;; Tags: [trees]
;;
;; Let us define a binary tree as "symmetric" if the left
half of the tree is the mirror image of the right half
;; of the tree. Write a predicate t... | null | https://raw.githubusercontent.com/PEZ/rich4clojure/28ea575ede8677f3a97437a646cdb3376a28ebc9/src/rich4clojure/easy/problem_096.clj | clojure | Difficulty: Easy
Tags: [trees]
Let us define a binary tree as "symmetric" if the left
of the tree. Write a predicate to determine whether or
not a given binary tree is symmetric. (see To Tree, or
not to Tree for a reminder on the tree representation
we're using).
Share your solution, and/or check how others d... | (ns rich4clojure.easy.problem-096
(:require [hyperfiddle.rcf :refer [tests]]))
= Beauty is Symmetry =
By 4Clojure user :
half of the tree is the mirror image of the right half
(def __ :tests-will-fail)
(comment
)
(tests
(__ '(:a (:b nil nil) (:b nil nil))) := true
(__ '(:a (:b nil nil) nil)) := fa... |
662f2566999775096ba91bacc936bee956b67976d741886594ffca0bd3355454 | SquidDev/urn | string.lisp | (define-native byte :bind-to "string.byte" :pure)
(define-native char :bind-to "string.char" :pure)
(define-native dump :bind-to "string.dump" :pure)
(define-native find :bind-to "string.find" :pure)
(define-native format :bind-to "string.format" :pure)
(define-native gsub :bind-to "string.... | null | https://raw.githubusercontent.com/SquidDev/urn/6e6717cf1376b0950e569e3771cb7e287aed291d/lib/lua/string.lisp | lisp | (define-native byte :bind-to "string.byte" :pure)
(define-native char :bind-to "string.char" :pure)
(define-native dump :bind-to "string.dump" :pure)
(define-native find :bind-to "string.find" :pure)
(define-native format :bind-to "string.format" :pure)
(define-native gsub :bind-to "string.... | |
9d023af7d80887ab16fc0a8d8285cee68ff3f73701e497cb0eee69e09f3742a2 | rtoy/cmucl | text.lisp | ;;; -*- Log: hemlock.log; Package: Hemlock -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
(ext:file-comment
"$Header: src/hemlock/text.lis... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/hemlock/text.lisp | lisp | -*- Log: hemlock.log; Package: Hemlock -*-
**********************************************************************
**********************************************************************
This file contains stuff that operates on units of texts, such as
paragraphs, sentences, lines, and words.
-- New Variab... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
(ext:file-comment
"$Header: src/hemlock/text.lisp $")
Written by
(in-package "HEMLOCK")
(defhvar "Paragraph Delimiter Function"
"The function that returns whether or ... |
39ab8bdc0ae6a4f7d1543bffe071541cd1d0020f8bb7976d996692708ba52499 | avik-das/garlic | syntax-invalid-integer.scm | (display 123-456)
| null | https://raw.githubusercontent.com/avik-das/garlic/b5f0698f287239eca6b1dd10b2d69d760f3e2e55/test/failure-compile/syntax-invalid-integer.scm | scheme | (display 123-456)
| |
7e7af79aa83c484c718cdf2820c712bc130a6e3c9cf7f19fced9818a211edf3b | trainline/optimus | async_task.clj | Copyright ( c ) Trainline Limited , 2017 . All rights reserved .
See LICENSE.txt in the project root for license information
(ns optimus.service.async-task
"This namespace contains functions required to setup and run the background
task which handles events published by the core namespace."
(:require [clojur... | null | https://raw.githubusercontent.com/trainline/optimus/caf4d065f40d5edef87eeb60d767b8379465501e/service/src/optimus/service/async_task.clj | clojure |
;;
;
;;
;;
;
... | Copyright ( c ) Trainline Limited , 2017 . All rights reserved .
See LICENSE.txt in the project root for license information
(ns optimus.service.async-task
"This namespace contains functions required to setup and run the background
task which handles events published by the core namespace."
(:require [clojur... |
0854baa3b9374bf4fdd7e0fd2de863819287f81d766d6becc34f19cf3dce2548 | chumsley/jwacs | source-transformations.lisp | ;;;; source-transformations.lisp
;;;
;;; Define the base functionality for source transformations.
;;; The TRANSFORM generic function is defined, as well as some
;;; transformation-related utility functions. The main source
;;; transformations will implement methods on TRANSFORM in their
;;; own source files.
;;;
Co... | null | https://raw.githubusercontent.com/chumsley/jwacs/c25adb3bb31fc2dc6e8c8a58346949ee400633d7/source-transformations.lisp | lisp | source-transformations.lisp
Define the base functionality for source transformations.
The TRANSFORM generic function is defined, as well as some
transformation-related utility functions. The main source
transformations will implement methods on TRANSFORM in their
own source files.
See LICENSE for full licensi... | Copyright ( c ) 2005
(in-package :jwacs)
Utilities
(defun structure-slots (object)
"Returns a list of the slot-names of the provided structure object"
#+openmcl
(let* ((sd (gethash (class-name (class-of object)) ccl::%defstructs%))
(slots (if sd (ccl::sd-slots sd))))
(mapcar #'car (if (symbolp (caar ... |
d48959f5887801fe9338564cc62514f9c555db64f2e33242aeeb02065b149c04 | plum-umd/oblivml | section.ml | open Core
open Stdio
type t =
{ l_pos : Position.t
; r_pos : Position.t
}
let to_string s =
Printf.sprintf
"%s - %s"
(Position.to_string s.l_pos)
(Position.to_string s.r_pos)
let pp f s = Format.pp_print_text f (to_string s)
| null | https://raw.githubusercontent.com/plum-umd/oblivml/f699dc49df7b36d550fcb045eff081435136f804/src/section.ml | ocaml | open Core
open Stdio
type t =
{ l_pos : Position.t
; r_pos : Position.t
}
let to_string s =
Printf.sprintf
"%s - %s"
(Position.to_string s.l_pos)
(Position.to_string s.r_pos)
let pp f s = Format.pp_print_text f (to_string s)
| |
dad96c6e36b31c731c0081cff021d329e2b0939b8d585e2089456d027d742c78 | Agda-zh/PLFA-zh | Book.hs | module Buildfile.Book where
import Control.Monad ((<=<))
import Data.Aeson.Types (FromJSON (..), ToJSON (..), object, withObject, (.!=), (.:), (.:?), (.=))
import Data.Bimap qualified as Bimap
import Data.Text (Text)
newtype Book = Book
{ bookParts :: [Part]
}
deriving (Show)
instance FromJSON Book where
par... | null | https://raw.githubusercontent.com/Agda-zh/PLFA-zh/259216ef384fb780c0dbae2cf1ebe79db3cc09be/tools/Buildfile/Book.hs | haskell | module Buildfile.Book where
import Control.Monad ((<=<))
import Data.Aeson.Types (FromJSON (..), ToJSON (..), object, withObject, (.!=), (.:), (.:?), (.=))
import Data.Bimap qualified as Bimap
import Data.Text (Text)
newtype Book = Book
{ bookParts :: [Part]
}
deriving (Show)
instance FromJSON Book where
par... | |
13caf176ef77e2d8bb7a99d79ad0e46981706c7b005bb6212c511bf271f95acc | ghcjs/jsaddle-dom | HTMLVideoElement.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.HTMLVideoElement
(webkitEnterFullscreen, webkitExitFullscreen,
webkitEnterFullScreen, webkitExitFullScreen,... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/HTMLVideoElement.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/HTMLVideoElement.webkitEnterFullscreen Mozilla HTMLVideoElement.webkitEnterFullscreen documentation>
| <-US/docs/Web/API/HTMLVideoElement.webkitEnterFullScreen Mozilla HTMLVideoElement.webkitEnterFullScre... | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.HTMLVideoElement
(webkitEnterFullscreen, webkitExitFullscreen,
webkitEnterFullScreen, webkitExitFullScreen,
webkitSupportsPresentationMode, webkitSupportsPresentationMode_,
webkitSetPresenta... |
3817be2cdd4bf7f0c1f1c5057665b86ba5b5d02274bf16ccdd9f534d51df855a | ashinn/alschemist | main.scm | ; main.scm - Sassy's main
Copyright ( C ) 2005
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version .
; Thi... | null | https://raw.githubusercontent.com/ashinn/alschemist/13d7105c1291a881b8d8d69c8e60e045428c04b1/jkode/sassy/main.scm | scheme | main.scm - Sassy's main
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A P... | Copyright ( C ) 2005
version 2.1 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin St , Fifth Floor , Boston , MA 02110 - 1301 USA
Sunnyside , NY 11104
see file COPYING in the top of Sass... |
9e2f6304f407e228883731b783ae2d3e9a83d881ff16e61d2c117b437b4b47aa | abakst/Brisk | Internal.hs | # LANGUAGE TemplateHaskell #
module Control.Distributed.BriskStatic.Internal where
import Language.Haskell.TH
castEffect :: a -> b -> a
castEffect x y = x
castName :: Name
castName = 'castEffect
| null | https://raw.githubusercontent.com/abakst/Brisk/3e4ce790a742d3e3b786dba45d36f715ea0e61ef/src/Control/Distributed/BriskStatic/Internal.hs | haskell | # LANGUAGE TemplateHaskell #
module Control.Distributed.BriskStatic.Internal where
import Language.Haskell.TH
castEffect :: a -> b -> a
castEffect x y = x
castName :: Name
castName = 'castEffect
| |
dcb4c6973eff3dbe4b29c59726a92bb99f42fe0ca2a95d0eb16987fa3c304304 | Clojure2D/clojure2d-examples | forces_2_1.clj | (ns examples.NOC.ch02.forces-2-1
(:require [clojure2d.core :refer :all]
[fastmath.core :as m]
[fastmath.vector :as v])
(:import fastmath.vector.Vec2))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(def ^:const ^int w 640)
(def ^:const ^int h 360)
(def wind (Vec2.... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/NOC/ch02/forces_2_1.clj | clojure | (ns examples.NOC.ch02.forces-2-1
(:require [clojure2d.core :refer :all]
[fastmath.core :as m]
[fastmath.vector :as v])
(:import fastmath.vector.Vec2))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(def ^:const ^int w 640)
(def ^:const ^int h 360)
(def wind (Vec2.... | |
025972c239ab6fef89fedbf76861ce2cb670e52b67100c0a717ec95549b580d6 | wangsix/VMO_repeated_themes_discovery | converter.lisp |
;(in-package :common-lisp-user)
(load
(concatenate
'string
*lisp-code-root* "/File conversion"
"/csv-files.lisp"))
(load
(concatenate
'string
*lisp-code-root* "/File conversion"
"/humdrum-by-col.lisp"))
(load
(concatenate
'string
*lisp-code-root* "/File conversion"
"/midi-save.lisp"))
(setq
*pa... | null | https://raw.githubusercontent.com/wangsix/VMO_repeated_themes_discovery/0082b3c55e64ed447c8b68bcb705fd6da8e3541f/JKUPDD-Oct2013/groundTruth/gibbonsSilverSwan1612/polyphonic/deadSym/repeatedPatterns/tomCollins/C/script/converter.lisp | lisp | (in-package :common-lisp-user) |
(load
(concatenate
'string
*lisp-code-root* "/File conversion"
"/csv-files.lisp"))
(load
(concatenate
'string
*lisp-code-root* "/File conversion"
"/humdrum-by-col.lisp"))
(load
(concatenate
'string
*lisp-code-root* "/File conversion"
"/midi-save.lisp"))
(setq
*path&name*
(concatenate
'string... |
de819684237360c7768484f5d7b4d8d182a0c238f8784c75553f5b2fc921d9fc | opencog/opencog | pre-process-#3.scm | ;; target is "enough" and there does not exist "of" after it.
(define pre-process-#3
(BindLink
(VariableList
(TypedVariableLink
(VariableNode "$target")
(TypeNode "WordInstanceNode")
)
(TypedVariableLink
(VariableNode "$wor... | null | https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/opencog/nlp/anaphora/rules/pre-process/pre-process-%233.scm | scheme | target is "enough" and there does not exist "of" after it. |
(define pre-process-#3
(BindLink
(VariableList
(TypedVariableLink
(VariableNode "$target")
(TypeNode "WordInstanceNode")
)
(TypedVariableLink
(VariableNode "$word")
(TypeNode "WordInstanceNode")
... |
83d04c5c856ac1ad76a3b92638c1db1fb9c37c53eccb6f8334024acb70f54752 | gmartinezramirez/USACH-Paradigmas-Programacion | TDA_user_system.rkt | #lang racket
Escenario : sistema X que contiene usuarios . Implementar el TDA de usuario
Un usuario tiene username , edad , password y un estado que representa si esta logueado
;; o no el sistema.
Capa constructor ; ;
Vamos a representar el TDA usuario como una lista que contiene los siguientes datos :
u... | null | https://raw.githubusercontent.com/gmartinezramirez/USACH-Paradigmas-Programacion/9970f9893d75d26a176230da7a4990c1fe83f838/2021-01/01-FP/01-TDA/TDA_user_system.rkt | racket | o no el sistema.
;
Rec: usuario <list>
Rec: true or false <boolean>
;
Dom: usuario <user>
Rec: username <str>
Dom: usuario <user>
Rec: age <number>
Dom: usuario <user>
Rec: password <str>
Dom: usuario <user>
Rec: login status <boolean>
;
Dom: usuario <user>, username <str>
Dom: usuario <user>, passwor... | #lang racket
Escenario : sistema X que contiene usuarios . Implementar el TDA de usuario
Un usuario tiene username , edad , password y un estado que representa si esta logueado
Vamos a representar el TDA usuario como una lista que contiene los siguientes datos :
username , del tipo string
edad , llamado ... |
8776b73f4f8e8a190d463cf3f8b4bae5e5d45b335288555eb5b5337fc42e79ab | fortytools/holumbus | Output.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
-- ------------------------------------------------------------
module Hayoo.Hunt.Output
where
import Control.Applicative
import Control.Monad.IO.Class
import Data.Aeson
import ... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/Hayoo/HayooIndexer/Hayoo/Hunt/Output.hs | haskell | # LANGUAGE FlexibleContexts #
------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------
disable trace output
--------------... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
module Hayoo.Hunt.Output
where
import Control.Applicative
import Control.Monad.IO.Class
import Data.Aeson
import Data.Aeson.Encode.Pretty
import qualified Data.ByteString.Lazy as LB
import qualified D... |
a856327f18baadf04368db758c72441ded1713b80638b988435d4d872eca9fb2 | RolfRolles/PandemicML | AVM2cpool_info.mli | open AVM2Pervasives
type t =
{ int_count: u30;
integer: s32 array;
uint_count: u30;
uinteger: u32 array;
double_count: u30;
double: d64 array; (* Should use floats here? *)
string_count: u30;
string_info: AVM2string_info.t array;
namespace_count: u30;
namespace: AVM2namespace_info.t array;
ns_set_c... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/Incubator/AVM2/AVM2cpool_info.mli | ocaml | Should use floats here? | open AVM2Pervasives
type t =
{ int_count: u30;
integer: s32 array;
uint_count: u30;
uinteger: u32 array;
double_count: u30;
string_count: u30;
string_info: AVM2string_info.t array;
namespace_count: u30;
namespace: AVM2namespace_info.t array;
ns_set_count: u30;
ns_set: AVM2ns_set_info.t array
mult... |
85fbf0113e26fd3d78b87e2a3a2f36a607126662acb03fcdeaf764e779d6897d | camllight/camllight | report.ml | (* Report globals from protocol to tk *)
let OpenTk = OpenTk
and OpenTkClass = OpenTkClass
and OpenTkDisplayClass = OpenTkDisplayClass
and CloseTk = CloseTk
and MainLoop = MainLoop
;;
let add_fileinput = add_fileinput
and remove_fileinput = remove_fileinput
;;
let CAMLtoTKWidget table w =
check_widget_class w tabl... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/camltk/libsupport/report.ml | ocaml | Report globals from protocol to tk | let OpenTk = OpenTk
and OpenTkClass = OpenTkClass
and OpenTkDisplayClass = OpenTkDisplayClass
and CloseTk = CloseTk
and MainLoop = MainLoop
;;
let add_fileinput = add_fileinput
and remove_fileinput = remove_fileinput
;;
let CAMLtoTKWidget table w =
check_widget_class w table;
TkToken (widget_name w)
;;
|
2c64eee0b38217944e06671dcad0756d51b2d744c97d0f7a0b548b16da3a60f0 | kumarshantanu/promenade | project.clj | (defproject promenade "0.8.0"
:description "Take program design oddities in stride with Clojure/ClojureScript"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies []
:java-source-paths ["src-java"]
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
... | null | https://raw.githubusercontent.com/kumarshantanu/promenade/f9f8ad9382a8c6e8bdbbbe7b7dbfe2a2036fd9b8/project.clj | clojure | (defproject promenade "0.8.0"
:description "Take program design oddities in stride with Clojure/ClojureScript"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies []
:java-source-paths ["src-java"]
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
... | |
321b476501f7cd246d39fef8fcfeb2fd88dff2cd1eccb2939a95aa56f86d6da2 | brownplt/LambdaS5 | ljs_fold_const.ml | open Prelude
open Ljs_syntax
open Ljs_opt
module EU = Exp_util
(* TODO: should the opt phase check type error? e.g.
to check the op1 args has the right type for op1.
*)
(* try to simplify the op1,
* return new exp in option on success, None otherwise.
* Note: the e should be a simplified exp.
*)
let fold_cons... | null | https://raw.githubusercontent.com/brownplt/LambdaS5/f0bf5c7baf1daa4ead4e398ba7d430bedb7de9cf/src/optimization/ljs_fold_const.ml | ocaml | TODO: should the opt phase check type error? e.g.
to check the op1 args has the right type for op1.
try to simplify the op1,
* return new exp in option on success, None otherwise.
* Note: the e should be a simplified exp.
| open Prelude
open Ljs_syntax
open Ljs_opt
module EU = Exp_util
let fold_const_op1 (p : Pos.t) (op : string) (e : exp) : exp option =
EU.apply_op1 p op e
let fold_const_op2 (p : Pos.t) (op : string) (e1 : exp) (e2 : exp) : exp option =
EU.apply_op2 p op e1 e2
let fold_eqeq (e1 : exp) (e2 : exp) : exp option =
... |
2e7cc09c4757c31e5177243cc7960be3a6716a2621fa6a6bc2889f3e9fd53b45 | hipsleek/hipsleek | bind_inference.ml | #include "xdebug.cppo"
open VarGen
open Ast
open Lexing
open Globals
exception FieldNotFound ;;
(********************************************)
(*********** PRINTING FUNCTIONS *************)
(********************************************)
(* function to print a boolean value *)
let print_bool =
function true ->... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/bef_indent/bind_inference.ml | ocaml | ******************************************
********** PRINTING FUNCTIONS ************
******************************************
function to print a boolean value
function to print a list of strings l separated by sep
function to print the name of a type t (being primitive or not)
function to print a data declara... | #include "xdebug.cppo"
open VarGen
open Ast
open Lexing
open Globals
exception FieldNotFound ;;
let print_bool =
function true -> print_string "true"
| false -> print_string "false"
;;
let rec print_string_list l sep =
match l with
[] -> print_string ""
| h::[] -> print_stri... |
9dccf1be63c15946abebbde4d0c265b2917fe60a044c60de265e92a6b1ca3a0f | Ptival/language-ocaml | TestUtils.hs | module Language.OCaml.PrettyPrinter.TestUtils
( DebugPrettyPrinter (..),
debugPrettyPrinter,
mkPrettyPrinterTest,
parseAndPrettyPrint,
parseMaybe,
pretty,
roundtrip,
)
where
import Language . OCaml .
import Language.OCaml.Parser
import Prettyprinter
import Test.Tasty
import Test.Tasty.HU... | null | https://raw.githubusercontent.com/Ptival/language-ocaml/7b07fd3cc466bb2ad2cac4bfe3099505cb63a4f4/test/Language/OCaml/PrettyPrinter/TestUtils.hs | haskell | module Language.OCaml.PrettyPrinter.TestUtils
( DebugPrettyPrinter (..),
debugPrettyPrinter,
mkPrettyPrinterTest,
parseAndPrettyPrint,
parseMaybe,
pretty,
roundtrip,
)
where
import Language . OCaml .
import Language.OCaml.Parser
import Prettyprinter
import Test.Tasty
import Test.Tasty.HU... | |
a2d403327e4e3db9466826096c6906a1526f4719648272f5f7c01d2199441a8b | phadej/language-pts | Golden.hs | {-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Data.ByteString.Lazy.UTF8 (fromString)
import Test.Tasty (defaultMain, testGroup)
import Test.Tasty.Golden (goldenVsString)
import Language.PTS.Examples
import Language.PTS.Script
import Language.PTS.Systems
main :: IO ()
main ... | null | https://raw.githubusercontent.com/phadej/language-pts/761e5b92b14506b75164bd3162487df2d7fbfa93/test/Golden.hs | haskell | # LANGUAGE OverloadedStrings # | module Main (main) where
import Data.ByteString.Lazy.UTF8 (fromString)
import Test.Tasty (defaultMain, testGroup)
import Test.Tasty.Golden (goldenVsString)
import Language.PTS.Examples
import Language.PTS.Script
import Language.PTS.Systems
main :: IO ()
main = defaultMain $ testGroup "Girard's... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.