_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 |
|---|---|---|---|---|---|---|---|---|
2b6938538dcba12b3f8b2daa81617729f56a77b9633219be47d7c56a31bf6b19 | cbaggers/tamei | test-package.lisp | #||
- Public Service Announcement -
Now you may be thinking 'This is a package in a directory called 'test' and the
file has test in the name, this clearly means he thinks this is good practice.
No! It means this is how he thinks all lisp should be written. I must leap on
the internet to tell everyone how unbelievabl... | null | https://raw.githubusercontent.com/cbaggers/tamei/e3c6500bd01a4c8af86e85839c31272b38f4f89b/test/test-package.lisp | lisp |
- Public Service Announcement -
Now you may be thinking 'This is a package in a directory called 'test' and the
file has test in the name, this clearly means he thinks this is good practice.
No! It means this is how he thinks all lisp should be written. I must leap on
the internet to tell everyone how unbelievably s... |
(uiop:define-package #:purer (:use #:tamei.functions.pure #:tamei.constants
#:tamei.uncategorized.types
#:tamei.uncategorized.symbols)
(:reexport #:tamei.functions.pure #:tamei.constants
#:tamei.uncategorized.types #:tamei.uncategori... |
8b23013d2141babf04c72cfc5f82634bf003017cbc41fd7007d8c1abc4fbf8a8 | sordina/haskell_workshop | decompression.hs |
module Main ( main ) where
-- Internal Imports
--
import Text.Compression.Simple
import GHC.Word
-- External Imports
--
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BSL
import qualified Data.ByteString.Lazy.Char8 as BSC
import qualified Data.Binary a... | null | https://raw.githubusercontent.com/sordina/haskell_workshop/b7cc1f75c740ae655caaf3165a409a6f3851a721/scaffold/compression/decompression.hs | haskell | Internal Imports
External Imports
Main
|
module Main ( main ) where
import Text.Compression.Simple
import GHC.Word
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BSL
import qualified Data.ByteString.Lazy.Char8 as BSC
import qualified Data.Binary as B
main :: IO ()
main = do
input <- BSL.ge... |
0cecb6029360989ed1af2e6a0636448c03352dc73fb668d7bb9c9e26203b572a | ghc/ghc | Main.hs | {-# LANGUAGE PackageImports #-}
module Main (main) where
import "my-package-a" LibB (someFuncB)
--import LibB (someFuncB)
main :: IO ()
main = print someFuncB
| null | https://raw.githubusercontent.com/ghc/ghc/03ed0b95147ef6da99ac60302fea282d4df5f072/testsuite/tests/cabal/t22333/my-exe/app/Main.hs | haskell | # LANGUAGE PackageImports #
import LibB (someFuncB) |
module Main (main) where
import "my-package-a" LibB (someFuncB)
main :: IO ()
main = print someFuncB
|
f0501fc62ff878de7bb6ba5e9d2205d6978150ac01c760bc58d7a2f0196b49f1 | eholk/harlan | generate-kernel-calls.scm | (library
(harlan middle generate-kernel-calls)
(export generate-kernel-calls)
(import
(rnrs)
(nanopass)
(except (elegant-weapons helpers) ident?)
(elegant-weapons print-c)
(harlan compile-opts)
(harlan middle languages M8)
(harlan middle languages M9)
(harlan helpers))
(define-pass genera... | null | https://raw.githubusercontent.com/eholk/harlan/3afd95b1c3ad02a354481774585e866857a687b8/harlan/middle/generate-kernel-calls.scm | scheme | global size
; local size
global size | (library
(harlan middle generate-kernel-calls)
(export generate-kernel-calls)
(import
(rnrs)
(nanopass)
(except (elegant-weapons helpers) ident?)
(elegant-weapons print-c)
(harlan compile-opts)
(harlan middle languages M8)
(harlan middle languages M9)
(harlan helpers))
(define-pass genera... |
859528a859ba957285bd02b52da0a3ace5573f54ee2fc9db55495faf0a17ff22 | jb55/elm-export-persistent | Ent.hs | -- |
-- Module : Elm.Export.Persist.Ent
Copyright : ( C ) 2016 - 17
License : MIT
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable
# LANGUAGE FlexibleContexts #
# LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}... | null | https://raw.githubusercontent.com/jb55/elm-export-persistent/eabb242caa79f8c779388bb5b66c044838835c4b/src/Elm/Export/Persist/Ent.hs | haskell | |
Module : Elm.Export.Persist.Ent
Stability : experimental
Portability : non-portable
# LANGUAGE OverloadedStrings #
>>> toElmTypeSource (Proxy :: Proxy (Ent "userId" User))
"type alias User = { userName : String, userId : Int }"
| 'Ent' alias, using "id" as the key
>>> toElmTypeSource (Proxy :: Pr... | Copyright : ( C ) 2016 - 17
License : MIT
Maintainer : < >
# LANGUAGE FlexibleContexts #
# LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE DeriveGeneric #
# LANGUAGE DataKinds #
module Elm.Export.Persist.Ent
( Ent(..)
, EntId
) where
import Database.Persis... |
06bf09ce395564e44af3f42b8f21fb8554cba99157178bb8523a4be0f1bb2d9d | OCamlPro/alt-ergo | arrays_rel.ml | (******************************************************************************)
(* *)
(* The Alt-Ergo theorem prover *)
Copyright ( C ) 2006 - 2013 ... | null | https://raw.githubusercontent.com/OCamlPro/alt-ergo/695466427b5c3d48e92e90485b12c130c2bce2c1/src/lib/reasoners/arrays_rel.ml | ocaml | ****************************************************************************
The Alt-Ergo theorem prover
... | Copyright ( C ) 2006 - 2013
... |
aacc2a508c2a95fe3d2392b3ed5af62db3ba38560a2f31534965b282ca525188 | bmeurer/ocaml-arm | program_management.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Cr... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/debugger/program_management.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
OCaml port by and
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
... |
ea5a23bd8c11de2b8596201c0669a10856a0e9fbd3e6104764d1ee2a3bd65f4b | borkdude/aoc2017 | day12.clj | (ns day12
(:require
[clojure.edn :as edn]
[clojure.string :as str]
[util :refer [resource-reducible]]))
(defn data
[]
(into {}
(comp
(map #(format "[%s]" %1))
(map edn/read-string)
(map (fn [[from _arrow & tos]]
[from (disj (set tos) from)])))
(... | null | https://raw.githubusercontent.com/borkdude/aoc2017/0f5bce5e496d65d0e53a8983e71ea3462aa0569c/src/day12.clj | clojure | Borrowed from -of-clojure-2016/blob/master/src/advent_of_clojure_2017/day12.clj#L23.
Scratch | (ns day12
(:require
[clojure.edn :as edn]
[clojure.string :as str]
[util :refer [resource-reducible]]))
(defn data
[]
(into {}
(comp
(map #(format "[%s]" %1))
(map edn/read-string)
(map (fn [[from _arrow & tos]]
[from (disj (set tos) from)])))
(... |
2fb7bbf1f6f70c9203c6b423d760166125c98faa648c5f2455b53b599c489a96 | lambdamikel/DLMAPS | test.lsp | (load "FaCT")
(load "RandGen/Hustadt/genmodal")
(load "RandGen/Hustadt/hustadt-test")
(load "RandGen/Hustadt/execute_tests.lsp")
| null | https://raw.githubusercontent.com/lambdamikel/DLMAPS/7f8dbb9432069d41e6a7d9c13dc5b25602ad35dc/src/prover/dl-benchmark-suite/FaCT-1-11/RandGen/Hustadt/test.lsp | lisp | (load "FaCT")
(load "RandGen/Hustadt/genmodal")
(load "RandGen/Hustadt/hustadt-test")
(load "RandGen/Hustadt/execute_tests.lsp")
| |
1f66fe676bf958d78d430f67bcfa9be3e3b6fef30e2c2691015a6da8b1ef10c7 | kmi/irs | cs-invocation.lisp | (in-package :irs.tests)
;;;; Unit tests
(in-package :irs.tests)
(def-suite cs-invocation
:description "Tests for the context sensitive invocation.")
(in-suite cs-invocation)
(test cs-invocation-test
(finishes
(with-output-to-string (str)
(ip::cs-irs-select-ws 'ocml::booking-request
... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/tests/cs-invocation.lisp | lisp | Unit tests
Testing from a web browser: | (in-package :irs.tests)
(in-package :irs.tests)
(def-suite cs-invocation
:description "Tests for the context sensitive invocation.")
(in-suite cs-invocation)
(test cs-invocation-test
(finishes
(with-output-to-string (str)
(ip::cs-irs-select-ws 'ocml::booking-request
'oc... |
8d3f44cd37daf184477523d3dbbc3e6be6a4d4a0ae09d3946c4832ea886a802f | sp3ctum/solitaire | logic_test.cljc | (ns solitaire.core.logic-test
#?(:cljs
(:require [solitaire.core.logic :as l]
[cljs.test :as test])
:clj
(:require [solitaire.core.logic :as l]
[clojure.test :as test :refer (is deftest)]))
#?(:cljs
(:require-macros [cljs.test :refer (is deftest)])))
;; tests
(deft... | null | https://raw.githubusercontent.com/sp3ctum/solitaire/c5b29dac4a4b01526febdd1f5790bd82f273a512/test/solitaire/core/logic_test.cljc | clojure | tests
todos/ideas:
win screen
moving card animation
touch device support (swipes)
same rank -> no
same suite -> no
different rank but same suite -> no
different suite but same rank -> no
different suite and rank, rank is ascending -> no
different suite and rank, rank is descending -> yes!
different suite ->... | (ns solitaire.core.logic-test
#?(:cljs
(:require [solitaire.core.logic :as l]
[cljs.test :as test])
:clj
(:require [solitaire.core.logic :as l]
[clojure.test :as test :refer (is deftest)]))
#?(:cljs
(:require-macros [cljs.test :refer (is deftest)])))
(deftest same-... |
b06fddd493c245de1c8712856cfedd60e00bb98d5ab929418a411660fa54cbff | yuriy-chumak/ol | message-dialog.scm | (define-library (lib gtk-3 message-dialog)
(export
GtkMessageDialog
GtkMessageDialog*
gtk_message_dialog_new
GtkButtonsType
GTK_BUTTONS_NONE
GTK_BUTTONS_OK
GTK_BUTTONS_CLOSE
GTK_BUTTONS_CANCEL
GTK_BUTTONS_YES_NO
GTK_BUTTONS_OK_CANCEL
GtkMessageType... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/ad2a3ad7b6ca4ee481777a7f18a8f4eeacb12457/libraries/lib/gtk-3/message-dialog.scm | scheme | (define-library (lib gtk-3 message-dialog)
(export
GtkMessageDialog
GtkMessageDialog*
gtk_message_dialog_new
GtkButtonsType
GTK_BUTTONS_NONE
GTK_BUTTONS_OK
GTK_BUTTONS_CLOSE
GTK_BUTTONS_CANCEL
GTK_BUTTONS_YES_NO
GTK_BUTTONS_OK_CANCEL
GtkMessageType... | |
3c154e5f39a3ae45d5ad632af6297f11ea7fc70fa0e1ed7ffe80ac207338a121 | greglook/cljstyle | whitespace.clj | (ns cljstyle.format.whitespace
"Whitespace and blank-line formatting rules."
(:require
[cljstyle.format.zloc :as zl]
[rewrite-clj.node :as n]
[rewrite-clj.zip :as z]
[rewrite-clj.zip.whitespace :as ws]))
# # Rule : Surrounding Whitespace
(defn- surrounding?
"True if the predicate applies to `... | null | https://raw.githubusercontent.com/greglook/cljstyle/1f58e2e7af4c193aa77ad0695f6c2b9ac2c5c5ec/src/cljstyle/format/whitespace.clj | clojure | allow abutting namespaced maps | (ns cljstyle.format.whitespace
"Whitespace and blank-line formatting rules."
(:require
[cljstyle.format.zloc :as zl]
[rewrite-clj.node :as n]
[rewrite-clj.zip :as z]
[rewrite-clj.zip.whitespace :as ws]))
# # Rule : Surrounding Whitespace
(defn- surrounding?
"True if the predicate applies to `... |
2f43af1f016257ee6be4734615b5eee2ce93577dac1a4a0e2ed16755b6796965 | lexi-lambda/hackett | kernel.rkt | #lang curly-fn racket/base
(require (for-syntax hackett/private/infix
racket/base
syntax/parse/class/paren-shape
syntax/parse/experimental/template
threading)
syntax/parse/define
(rename-in hackett/private/base
... | null | https://raw.githubusercontent.com/lexi-lambda/hackett/e90ace9e4a056ec0a2a267f220cb29b756cbefce/hackett-lib/hackett/private/kernel.rkt | racket | Explicitly make 'paren-shape #f on the new application form to avoid the #\{ value | #lang curly-fn racket/base
(require (for-syntax hackett/private/infix
racket/base
syntax/parse/class/paren-shape
syntax/parse/experimental/template
threading)
syntax/parse/define
(rename-in hackett/private/base
... |
f53380cab93a05a10ec1cc2da2ba3247b7b0318ee08d7ebcf23bf61ed231d03b | sethalves/snow2-client | match.scm | match.scm -- portable hygienic pattern matcher -*- coding : utf-8 -*-
;;
This code is written by and placed in the
;; Public Domain. All warranties are disclaimed.
;;> \example-import[(srfi 9)]
;;> A portable hygienic pattern matcher.
;;> This is a full superset of the popular \hyperlink[
;;> "-repository/cod... | null | https://raw.githubusercontent.com/sethalves/snow2-client/b70c3ca5522a666a71a4c8992f771d5faaceccd6/chibi/match/match.scm | scheme |
Public Domain. All warranties are disclaimed.
> \example-import[(srfi 9)]
> A portable hygienic pattern matcher.
> This is a full superset of the popular \hyperlink[
> "-repository/code.match.html"]{match}
> and thus preserving hygiene.
> patterns - patterns in which the same identifier occurs multiple
> times, tail... | match.scm -- portable hygienic pattern matcher -*- coding : utf-8 -*-
This code is written by and placed in the
> package by , written in fully portable \scheme{syntax - rules }
> The most notable extensions are the ability to use \emph{non - linear }
> turn , and the corresponding body is evaluated for... |
687274a7cce18b1720b83659112f1d61d9ca88f6fb667815c75e50349b2a1260 | igorhvr/bedlam | srfi-22.scm | (define (srfi-22-prepare environment source-file)
(case environment
((scheme-srfi-0)
(eval '(import srfi-0)))
((scheme-srfi-7)
(eval '(import srfi-7))))
(call-with-input-file source-file
(lambda (in)
(do ((c (read-char in) (read-char in)))
((or (eqv? c #\newline)
(eof-ob... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-1.16.6/full-src/sisc/src/sisc/modules/srfi/srfi-22/srfi-22.scm | scheme | Default main, so ordinary "whole bunch 'o scheme code" scripts
will work | (define (srfi-22-prepare environment source-file)
(case environment
((scheme-srfi-0)
(eval '(import srfi-0)))
((scheme-srfi-7)
(eval '(import srfi-7))))
(call-with-input-file source-file
(lambda (in)
(do ((c (read-char in) (read-char in)))
((or (eqv? c #\newline)
(eof-ob... |
1b21f1e464c10840aaecf3468339e7cc10684939833724b64e5b8193874f98ce | albertoruiz/easyVision | trail.hs | {-# LANGUAGE Arrows, RecursiveDo #-}
import Vision.GUI
import Image.Processing
main = run $ arr grayf
>>> optDo "-v" (observe "source" id)
>>> mix 3 ( tempdiff 3
>>> optDo "-v" (observe "tempdiff" gg)
>>> drift 0.95
>>> o... | null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/examples/trail.hs | haskell | # LANGUAGE Arrows, RecursiveDo # |
import Vision.GUI
import Image.Processing
main = run $ arr grayf
>>> optDo "-v" (observe "source" id)
>>> mix 3 ( tempdiff 3
>>> optDo "-v" (observe "tempdiff" gg)
>>> drift 0.95
>>> optDo "-v" (observe "drift" (5 .*))
... |
c02dc2676c2ddd2a2d1f16200dde7c2e43d25fa194315d87c6d67fb87f15d251 | MinaProtocol/mina | composition_types.ml | open Pickles_types
module Scalar_challenge = Kimchi_backend_common.Scalar_challenge
module Bulletproof_challenge = Bulletproof_challenge
module Branch_data = Branch_data
module Digest = Digest
module Spec = Spec
module Opt = Plonk_types.Opt
open Core_kernel
type 'f impl = 'f Spec.impl
let index_to_field_elements =
... | null | https://raw.githubusercontent.com/MinaProtocol/mina/a4e030878c166014f8731c356b48ce362abd6f90/src/lib/pickles/composition_types/composition_types.ml | ocaml | * This module contains structures which contain the scalar-field elements that
are required to finalize the verification of a proof that is partially verified inside
a circuit.
Each verifier circuit starts by verifying the parts of a proof involving group operations.
At the end, there i... | open Pickles_types
module Scalar_challenge = Kimchi_backend_common.Scalar_challenge
module Bulletproof_challenge = Bulletproof_challenge
module Branch_data = Branch_data
module Digest = Digest
module Spec = Spec
module Opt = Plonk_types.Opt
open Core_kernel
type 'f impl = 'f Spec.impl
let index_to_field_elements =
... |
93d5725359ee0c48415119d98c1f818a9e5323a71941ea99a08b19cec45e9c65 | flavioc/cl-hurd | io-read.lisp |
(in-package :translator-test)
(defun %my-io-read (file result &key (offset +minus-one-ll+)
(amount 2048))
(assert-equal result
(octets-to-string
(io-read file
:offset offset
:amount amount))))
(def-test... | null | https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/tests/io-read.lisp | lisp | Try to read everything.
Read byte by byte
Now without seeking
Read outside
Read last byte
Read in the middle
Read sizeable pieces |
(in-package :translator-test)
(defun %my-io-read (file result &key (offset +minus-one-ll+)
(amount 2048))
(assert-equal result
(octets-to-string
(io-read file
:offset offset
:amount amount))))
(def-test... |
e146bba1a24ff8ad93b954693f15eaa97387295997bbd779b0e33b084e882d6d | RT-Anderson/ant-colony-optimizer | core_test.clj | (ns ant-colony-optimizer.core-test
(:require [clojure.test :refer :all]
[ant-colony-optimizer.core :refer :all]))
| null | https://raw.githubusercontent.com/RT-Anderson/ant-colony-optimizer/fb6cab97a1125987733532eb8961ef6455436722/test/ant_colony_optimizer/core_test.clj | clojure | (ns ant-colony-optimizer.core-test
(:require [clojure.test :refer :all]
[ant-colony-optimizer.core :refer :all]))
| |
27960e940b348c57e0516a5e051ce88bff841370ded4f06b39fd7475b0be0375 | sathyavijayan/upit | upit.clj | (ns sats.upit
(:require [sats.upit.utils :refer [defalias]]
[sats.upit.core :as core]))
(defalias up! core/up!)
(defalias down! core/down!)
| null | https://raw.githubusercontent.com/sathyavijayan/upit/119fe88fafd6d1e1e50e9a4fd1c7244f25e67411/src/sats/upit.clj | clojure | (ns sats.upit
(:require [sats.upit.utils :refer [defalias]]
[sats.upit.core :as core]))
(defalias up! core/up!)
(defalias down! core/down!)
| |
b8a89da67f7ea990280feb2aeefdd32df08a7a3dd48c2ef42e8254f301a05f44 | reasonml/reason | eol_detect.ml | type eol =
| LF
| CRLF
let show eol = match eol with | LF -> "lf" | CRLF -> "crlf"
let default_eol = match Sys.win32 with | true -> CRLF | _ -> LF
let get_eol_for_file filename =
let ic = open_in_bin filename in
let line = ref "" in
let c = ref ' ' in
let prev = ref None in
try
while (!c) <> '\n' do... | null | https://raw.githubusercontent.com/reasonml/reason/daa11255cb4716ce1c370925251021bd6e3bd974/src/refmt/eol_detect.ml | ocaml | type eol =
| LF
| CRLF
let show eol = match eol with | LF -> "lf" | CRLF -> "crlf"
let default_eol = match Sys.win32 with | true -> CRLF | _ -> LF
let get_eol_for_file filename =
let ic = open_in_bin filename in
let line = ref "" in
let c = ref ' ' in
let prev = ref None in
try
while (!c) <> '\n' do... | |
631efd6b8f01a3cb6219365645d7dea9e5ede5585e0f388b172c4caef99673ec | KingMob/clojure-trie-performance | trie07.clj | (ns modulo-lotus.trie.trie07
(:require
[clojure.string :refer (split triml)]
[modulo-lotus.trie.helpers :refer [alpha-idx]]
[modulo-lotus.trie.trie-node :as tr :refer [TrieNode add-substring count-w-prefix count-words prefix]]
[taoensso.tufte :as tufte :refer (defnp p profiled profile)]))
Like 06 , but... | null | https://raw.githubusercontent.com/KingMob/clojure-trie-performance/4c0c77799a0763c670fdde70b737e0af936a2bb8/src/modulo_lotus/trie/trie07.clj | clojure | (ns modulo-lotus.trie.trie07
(:require
[clojure.string :refer (split triml)]
[modulo-lotus.trie.helpers :refer [alpha-idx]]
[modulo-lotus.trie.trie-node :as tr :refer [TrieNode add-substring count-w-prefix count-words prefix]]
[taoensso.tufte :as tufte :refer (defnp p profiled profile)]))
Like 06 , but... | |
4385cb4e7d5d1e98adf141f5a43ba47d9352f2c353b30cc6364026bc0f4bc66b | webyrd/wreckto-verseo | test-numbers.scm | (test "test 1"
(let ((N2 (build-num 2))
(N3 (build-num 3)))
(run* (q) (*o N2 N3 q)))
'((0 1 1)))
(test "test 2"
(let ((N6 (build-num 6)))
(run* (q)
(fresh (n m)
(*o n m N6)
(== `(,n ,m) q))))
'(((1) (0 1 1)) ((0 1 1) (1)) ((0 1) (1 1)) ((1 1) (0 1))))
(test "sums"
(run 5 (... | null | https://raw.githubusercontent.com/webyrd/wreckto-verseo/45ce27643a18ff7d6a8080f37a3e5d2ec984b051/faster-minikanren/test-numbers.scm | scheme | (test "test 1"
(let ((N2 (build-num 2))
(N3 (build-num 3)))
(run* (q) (*o N2 N3 q)))
'((0 1 1)))
(test "test 2"
(let ((N6 (build-num 6)))
(run* (q)
(fresh (n m)
(*o n m N6)
(== `(,n ,m) q))))
'(((1) (0 1 1)) ((0 1 1) (1)) ((0 1) (1 1)) ((1 1) (0 1))))
(test "sums"
(run 5 (... | |
0f4151db771e978171e7fc4c39ea24d31eee09b0e11f7eeb67302fca4379c58a | aantron/dream | live_reload.ml | let live_reload_script = {js|
var socketUrl = "ws://" + location.host + "/_live-reload"
var socket = new WebSocket(socketUrl);
socket.onclose = function(event) {
const intervalMs = 100;
const attempts = 100;
let attempt = 0;
function reload() {
++attempt;
if(attempt > attempts) {
console.error... | null | https://raw.githubusercontent.com/aantron/dream/9bec26f837febae64e37a5eb39f7ef66914db4b1/example/w-live-reload/live_reload.ml | ocaml | let live_reload_script = {js|
var socketUrl = "ws://" + location.host + "/_live-reload"
var socket = new WebSocket(socketUrl);
socket.onclose = function(event) {
const intervalMs = 100;
const attempts = 100;
let attempt = 0;
function reload() {
++attempt;
if(attempt > attempts) {
console.error... | |
064f0f699070c9203967456f558d908a1937c9ff30e70181b4d62223b9edae29 | BinaryAnalysisPlatform/bap | x86_prefix.ml | open Core_kernel[@@warning "-D"]
open Or_error
open Bap.Std
type t = [
| `xF0 (** LOCK *)
*
| `xF3 (** REP/REPE *)
| `x2E (** CS segment override *)
* SS segment override
| `x3E (** DS segment override *)
| `x26 (** ES segment override *)
* FS segment override
* GS s... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/plugins/x86/x86_prefix.ml | ocaml | * LOCK
* REP/REPE
* CS segment override
* DS segment override
* ES segment override
* operand override
* address override | open Core_kernel[@@warning "-D"]
open Or_error
open Bap.Std
type t = [
*
* SS segment override
* FS segment override
* GS segment override
] [@@deriving bin_io, sexp, compare, enumerate]
let to_known_prefix = function
| 0xF0 -> Some `xF0
| 0xF2 -> Some `xF2
| 0xF3 -> Some `xF3
| 0x2E -> Some `... |
c2f5475b6f162cc3600a68979153ca40114ec94a061453bb3921c2f40dbaa0de | bostonaholic/ring-okta | predicates_test.clj | (ns ring.ring-okta.predicates-test
(:require [clojure.test :refer [deftest testing is]]
[clojure.test.helpers :refer [is-not]]
[ring.mock.request :refer [request]]
[ring.ring-okta.predicates :as p]))
(deftest test-login?
(testing "match method and route"
(is (p/login? (reque... | null | https://raw.githubusercontent.com/bostonaholic/ring-okta/dad8e7c90ce080cc1f0c1a7fb37c70c706a7a040/test/ring/ring_okta/predicates_test.clj | clojure | (ns ring.ring-okta.predicates-test
(:require [clojure.test :refer [deftest testing is]]
[clojure.test.helpers :refer [is-not]]
[ring.mock.request :refer [request]]
[ring.ring-okta.predicates :as p]))
(deftest test-login?
(testing "match method and route"
(is (p/login? (reque... | |
8aab56ba9adb6b4887b6b0c89b6588ba41cb6b0de641c567c0bf3d4c374ff8cb | janestreet/hardcaml | test_blackbox.ml | open! Import
open Signal
let f_coefs = Test_fir_filter.f (List.init 4 ~f:(fun _ -> random ~width:16))
let%expect_test "top level blackbox" =
let module Circuit = Circuit.With_interface (Test_fir_filter.I) (Test_fir_filter.O) in
let circuit = Circuit.create_exn ~name:"fir_filter_blackbox" f_coefs in
Rtl.print ~b... | null | https://raw.githubusercontent.com/janestreet/hardcaml/1cdb35da263479bb4149c0f5550462163b7439d1/test/lib/test_blackbox.ml | ocaml | Print the whole thing, include the fir filter sub-circuit.
Now just print the top level module, plus black boxes for the instantiations | open! Import
open Signal
let f_coefs = Test_fir_filter.f (List.init 4 ~f:(fun _ -> random ~width:16))
let%expect_test "top level blackbox" =
let module Circuit = Circuit.With_interface (Test_fir_filter.I) (Test_fir_filter.O) in
let circuit = Circuit.create_exn ~name:"fir_filter_blackbox" f_coefs in
Rtl.print ~b... |
0486b59772b4d8f3a5a22d655cf7f63dd9b2a08cab6c092e26d2c5abc8308e2d | janestreet/universe | parsexp_vs_sexplib.ml | open Core_kernel
open Poly
module Unix = Caml_unix
let data =
let data_fn = "data.sexp" in
if Sys.file_exists data_fn
then sprintf "(%s)" (In_channel.read_all data_fn)
else (
(* Collect all the jbuilds in ${ROOT}/lib *)
let ic = Unix.open_process_in "find ../../../lib -name jbuild -exec cat {} \\;" in... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/parsexp/bench/parsexp_vs_sexplib.ml | ocaml | Collect all the jbuilds in ${ROOT}/lib
To make sure the input is valid before starting the bench
Obj.tag is a C call so the compiler can't consider the value as dead-code | open Core_kernel
open Poly
module Unix = Caml_unix
let data =
let data_fn = "data.sexp" in
if Sys.file_exists data_fn
then sprintf "(%s)" (In_channel.read_all data_fn)
else (
let ic = Unix.open_process_in "find ../../../lib -name jbuild -exec cat {} \\;" in
let s = In_channel.input_all ic in
asser... |
e9520d44337f565307a15e6e8e8e0f81029c7cbffc325a61ed1a1cf3fcfd76ac | olivermg/owlisp | evaluator.lisp | (in-package :owlisp/evaluator/tests)
(def-suite owlisp/evaluator/tests)
(in-suite owlisp/evaluator/tests)
(test constant
(is (= (evaluate-form 5
(env.d.extend '())
(env.b.extend '())
(make-machine))
5)))
(test quote
(is (eql (evaluate-form ''xyz
(env.d.extend '())
(env.b.extend '())
... | null | https://raw.githubusercontent.com/olivermg/owlisp/dbf6d1d9e813f16124c170a0e1bfe155752e017b/tests/evaluator.lisp | lisp | (in-package :owlisp/evaluator/tests)
(def-suite owlisp/evaluator/tests)
(in-suite owlisp/evaluator/tests)
(test constant
(is (= (evaluate-form 5
(env.d.extend '())
(env.b.extend '())
(make-machine))
5)))
(test quote
(is (eql (evaluate-form ''xyz
(env.d.extend '())
(env.b.extend '())
... | |
7db01c373c90edd2e4e4859bd3b56366b9d4d2f8dfb574570b41824e1198f286 | softlab-ntua/bencherl | gossip_SUITE.erl | 2010 - 2011 Zuse Institute Berlin
% @end
%
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, softw... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/scalaris/test/gossip_SUITE.erl | erlang | @end
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 lang... | 2010 - 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
Created : 29 Mar 2010 by < >
@version $ I d : gossip_SUITE.erl 2618 2011 - 12 - 29 14:35:15Z $
-module(gossip... |
f1d06ad1786b8f15dde54787e02aefa045b27513ac53a45ff02c7994ec03558c | LambdaCon/2015 | hackney_sup.erl | %%% -*- erlang -*-
%%%
This file is part of hackney released under the Apache 2 license .
%%% See the NOTICE for more information.
%%%
Copyright ( c ) 2012 - 2014 < >
%%%
-module(hackney_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
%% Helper macro ... | null | https://raw.githubusercontent.com/LambdaCon/2015/0149877454b88815b9fcb9cba8ffd9b37c149026/Elixir%20love%20at%20first%20sip/src/demos/currencies_skeleton/deps/hackney/src/hackney_app/hackney_sup.erl | erlang | -*- erlang -*-
See the NOTICE for more information.
API
Supervisor callbacks
Helper macro for declaring children of supervisor
===================================================================
API functions
===================================================================
start the pool handler
finish ... | This file is part of hackney released under the Apache 2 license .
Copyright ( c ) 2012 - 2014 < >
-module(hackney_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
start_link() ->
{ok, Pid} = superv... |
9b81aefab1f597ccc06e6b0349d1d607a249843f079794b987300dc46d74d8c6 | helium/gateway-config | gateway_gatt_char_wifi_connect.erl | -module(gateway_gatt_char_wifi_connect).
-include("gateway_gatt.hrl").
-include("pb/gateway_gatt_char_wifi_connect_pb.hrl").
-behavior(gatt_characteristic).
-export([
init/2,
uuid/1,
flags/1,
read_value/2,
write_value/2,
start_notify/1,
stop_notify/1,
handle_info/2
]).
-record(state,... | null | https://raw.githubusercontent.com/helium/gateway-config/5a98da0d2711a87f67c80ec6ea9f710dbed727ff/src/gateway_gatt_char_wifi_connect.erl | erlang | Already notifying
Already not notifying
Calling start_notify again has no effect | -module(gateway_gatt_char_wifi_connect).
-include("gateway_gatt.hrl").
-include("pb/gateway_gatt_char_wifi_connect_pb.hrl").
-behavior(gatt_characteristic).
-export([
init/2,
uuid/1,
flags/1,
read_value/2,
write_value/2,
start_notify/1,
stop_notify/1,
handle_info/2
]).
-record(state,... |
abfa52930102bf7d764a4fe7f43c19cf1e986baad9d968233b50c035002d89cd | phadej/cabal-fmt | Refactoring.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
-- |
-- License: GPL-3.0-or-later
Copyright :
module CabalFmt.Refactoring (
CommentsPragmas,
refactor,
) where
import qualified Distribution.Fields as C
import CabalFmt.Monad
import CabalFmt.Refactoring.ExpandExposedModules
import C... | null | https://raw.githubusercontent.com/phadej/cabal-fmt/ead940a3dd955a2c7b32b8817b03885ff550c128/src/CabalFmt/Refactoring.hs | haskell | # LANGUAGE OverloadedStrings #
|
License: GPL-3.0-or-later
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
| Try refactorings in turn,
considering it done if one applies. | # LANGUAGE ScopedTypeVariables #
Copyright :
module CabalFmt.Refactoring (
CommentsPragmas,
refactor,
) where
import qualified Distribution.Fields as C
import CabalFmt.Monad
import CabalFmt.Refactoring.ExpandExposedModules
import CabalFmt.Refactoring.Fragments
import CabalFmt.Refactoring.GlobFiles
imp... |
c8ea944deb33fa7443790573a0ae4142dd5ae7f9935d528154cd69404ddb2f6d | hopv/MoCHi | effect.ml | open Syntax
open Term_util
open Type
open Util
module Debug = Debug.Make(struct let check = Flag.Debug.make_check __MODULE__ end)
type env =
{mutable constraints: (effect * effect) list;
mutable counter: int;
for_cps: bool}
let initial_env for_cps =
let counter = 0 in
let constraints = [] in
{counter; ... | null | https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/src/effect.ml | ocaml | open Syntax
open Term_util
open Type
open Util
module Debug = Debug.Make(struct let check = Flag.Debug.make_check __MODULE__ end)
type env =
{mutable constraints: (effect * effect) list;
mutable counter: int;
for_cps: bool}
let initial_env for_cps =
let counter = 0 in
let constraints = [] in
{counter; ... | |
2f2c22e7e0286e20272794458277d0a851d004ff5744fc960d6cdd045514e734 | onyx-platform/onyx-datomic | datomic.clj | (ns onyx.plugin.datomic
(:require [clojure.core.async :refer [chan >! >!! <!! poll! offer! close!
thread timeout alts!! go-loop
sliding-buffer]]
[onyx.types :as t]
[onyx.plugin.protocols :as p]
[onyx.st... | null | https://raw.githubusercontent.com/onyx-platform/onyx-datomic/85b8c1dcaab9e86b9661c2f181fe08d5795f9607/src/onyx/plugin/datomic.clj | clojure | Helpers
;;;;;;;;;;;;;
;;;;;;;;;;;;;
;; input plugins
;;;;;;;;;;;;;
;;;;;;;;;;;;;
;; read log plugin
strip out transaction functions as they are not serializable in onyx
Poll for more messages
output plugins
params lifecycles | (ns onyx.plugin.datomic
(:require [clojure.core.async :refer [chan >! >!! <!! poll! offer! close!
thread timeout alts!! go-loop
sliding-buffer]]
[onyx.types :as t]
[onyx.plugin.protocols :as p]
[onyx.st... |
a378c9572ec81d618a2a5edae6fee3012188f7cfcdbedd7722d9b1cb954b95cc | ygrek/mldonkey | array2.ml | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/utils/cdk/array2.ml | ocaml | based on Array.fold_left code | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
... |
5778728be4a1fd92e0f96bc692acd2211bfc000aaff3da21fc2670c8b8739df9 | alvatar/spheres | alpha-kanren.scm | ! ! ! : Nominal Logic Programming
Implementation of the paper alphaKanren : A Fresh Name in Nominal Logic Programming
.author , 2014
.author , 2015
.license MIT
;;
The MIT License ( MIT )
;;
Copyright ( c ) 2014
;;
;; Permission is hereby granted, free of charge, to any person obtaining a copy of... | null | https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/spheres/logic/alpha-kanren.scm | scheme |
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
subject to the following conditions:
The above copyright notice and this... | ! ! ! : Nominal Logic Programming
Implementation of the paper alphaKanren : A Fresh Name in Nominal Logic Programming
.author , 2014
.author , 2015
.license MIT
The MIT License ( MIT )
Copyright ( c ) 2014
the Software without restriction , including without limitation the rights to
the Softw... |
09deca54c5ac549f075f0f05c55f8c0eb3ea2bbdeb91c209c7a29533e7401ab7 | batebobo/fp1819 | 4-bin-to-dec.rkt | #lang racket
(require rackunit)
(require rackunit/text-ui)
; Искаме да обърнем число от двоична в десетична бройна система
(define tests (test-suite
"binary to decimal tests"
(test-case "zero" (check-equal? (bin-to-dec 0) 0))
(test-case "one" (check-equal? (bin-to-dec 1) 1))
(test-case "rip" (check-equal? (b... | null | https://raw.githubusercontent.com/batebobo/fp1819/2061b7e62a1a9ade3a5fff9753f9fe0da5684275/scheme/2/4-bin-to-dec.rkt | racket | Искаме да обърнем число от двоична в десетична бройна система | #lang racket
(require rackunit)
(require rackunit/text-ui)
(define tests (test-suite
"binary to decimal tests"
(test-case "zero" (check-equal? (bin-to-dec 0) 0))
(test-case "one" (check-equal? (bin-to-dec 1) 1))
(test-case "rip" (check-equal? (bin-to-dec 1010010110000) 5296))
(test-case "power of 2" (check... |
6f9e83721b1e7de0c46efad606284c7f31913eabb6468867ab9e5f755b0c8f46 | mfp/extprot | buffer_pool.mli | (** Buffer pools. *)
* [ make_buffer_pool ~min_size ~max_size make capacity ]
* returns two functions [ ` Round_up f ] and [ ` Exact g ] that are invoked as
* in [ f wanted_size ] and return a buffer of the wanted size and a function
* to release the buffer and return it to the pool . These functions do no... | null | https://raw.githubusercontent.com/mfp/extprot/11ef436c7a1f267f301f4507c05c0a3bb8beda4f/compiler/buffer_pool.mli | ocaml | * Buffer pools. |
* [ make_buffer_pool ~min_size ~max_size make capacity ]
* returns two functions [ ` Round_up f ] and [ ` Exact g ] that are invoked as
* in [ f wanted_size ] and return a buffer of the wanted size and a function
* to release the buffer and return it to the pool . These functions do not
* block and wil... |
d36307f7c960d0aa20b80ae8f40b5e476a2903a19620cd9de66ae0646bd5c2a7 | 414owen/phage | Interpreter.hs | module Interpreter
( interpret
, eval
, block
, lastBlock
, tr
, apply
, BlockRes
) where
import Err
import Val
import Safe
import Debug.Trace
import Data.Monoid
import Data.Maybe
import Data.Tuple.Lazy
import Control.Monad
import Control.Monad.Trans.Except
import Data.Map hiding (null)... | null | https://raw.githubusercontent.com/414owen/phage/30d266c4a359c0d33afe99e0bd4d551fe91ed862/src/Interpreter.hs | haskell | module Interpreter
( interpret
, eval
, block
, lastBlock
, tr
, apply
, BlockRes
) where
import Err
import Val
import Safe
import Debug.Trace
import Data.Monoid
import Data.Maybe
import Data.Tuple.Lazy
import Control.Monad
import Control.Monad.Trans.Except
import Data.Map hiding (null)... | |
5a5dfa06cac85829b319f3c541641652fd7737123662b75d31b564db6b746079 | davelambert/porky | reasoner.lisp | -*- package : ; Syntax : Common - lisp ; Base : 10 -*-
;;;
;;;; reasoner.lisp
;;;
;;;
;;; --------------------------------------------------------------------------------------
;;;
;;; The contents of this file are subject to the NOKOS License Version 1.0a (the
;;; "License"); you may not use this file except ... | null | https://raw.githubusercontent.com/davelambert/porky/44a4ff0e791de23f723bfd93072fcef5f8523c8a/src/core/reasoner.lisp | lisp | Syntax : Common - lisp ; Base : 10 -*-
reasoner.lisp
--------------------------------------------------------------------------------------
The contents of this file are subject to the NOKOS License Version 1.0a (the
"License"); you may not use this file except in compliance with the License.
WARRANT... |
Software distributed under the License is distributed on an " AS IS " basis , WITHOUT
The Original Software is
WILBUR2 : Nokia Semantic Web Toolkit for CLOS
Copyright ( c ) 2001 - 2005 Nokia and others . All Rights Reserved .
Portions Copyright ( c ) 1989 - 1992 . All Rights Reserved .
Cont... |
edd28e0c29bba11a10aa973f50bcaaec9fffb89535cfd446e1582f168731269e | Netflix/PigPen | fold_test.clj | ;;
;;
Copyright 2013 - 2015 Netflix , Inc.
;;
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 ... | null | https://raw.githubusercontent.com/Netflix/PigPen/18d461d9b2ee6c1bb7eee7324889d32757fc7513/pigpen-core/src/test/clojure/pigpen/fold_test.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 speci... | Copyright 2013 - 2015 Netflix , Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns pigpen.fold-test
(:require [clojure.test :refer :all]
[pigpen.fold]))
|
18ad55ec1432d54f625db37151f563b296e4e37f3e7eb4ae0ca9093cea43db1b | TaktInc/freer | Eff.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE CPP #
|
Module : Eff
Description : Freer - an extensible effects library
Copyright : Allele Dev 2016
License : BSD-3
Maintainer :
Stability : experimental
Portability : POSIX
Module : Eff
D... | null | https://raw.githubusercontent.com/TaktInc/freer/b1e4911832ad12ef0b9b23883548dcf44ea3bd59/src/Eff.hs | haskell | # LANGUAGE RankNTypes # | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE CPP #
|
Module : Eff
Description : Freer - an extensible effects library
Copyright : Allele Dev 2016
License : BSD-3
Maintainer :
Stability : experimental
Portability : POSIX
Module : Eff
Description : Freer - an exte... |
26c25ce222544fdae6b8fa410c4e48bc399be8285a4132864e931107152724f8 | clojure-interop/google-cloud-clients | StorageOptions$DefaultStorageRpcFactory.clj | (ns com.google.cloud.storage.StorageOptions$DefaultStorageRpcFactory
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.storage StorageOptions$DefaultStorageRpcFactory]))
(defn ->default-storage-rpc-factory
"Constructor."
(^StorageOptions$DefaultStorageRpcFactory []
(new StorageOpt... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.storage/src/com/google/cloud/storage/StorageOptions%24DefaultStorageRpcFactory.clj | clojure | (ns com.google.cloud.storage.StorageOptions$DefaultStorageRpcFactory
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.storage StorageOptions$DefaultStorageRpcFactory]))
(defn ->default-storage-rpc-factory
"Constructor."
(^StorageOptions$DefaultStorageRpcFactory []
(new StorageOpt... | |
cf8507ce0c866ac94c08ef2c06678d78eb748724aee594d901a835996e870403 | atlas-engineer/nyxt | utilities.lisp | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(uiop:define-package :nyxt/utilities
(:use :cl)
(:import-from :serapeum #:export-always #:->))
(in-package :nyxt/utilities)
(serapeum:eval-always
(trivial-package-local-nicknames:add-package-local-nickname :alex :alex... | null | https://raw.githubusercontent.com/atlas-engineer/nyxt/4001cdf98cbf89d17e8e3afcff76b7df04645d0f/source/utilities.lisp | lisp | Ensure the top-level exported forms are alphabetically sorted.
TODO: Replace with -cache?
Parse the functions' arguments and store the parameters in a hash table
This block is here to catch the return-from
NAME and cache it too.
TODO: Better way? Maybe use methods and
:around qualifiers?
REVIEW: Returns (:macr... | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(uiop:define-package :nyxt/utilities
(:use :cl)
(:import-from :serapeum #:export-always #:->))
(in-package :nyxt/utilities)
(serapeum:eval-always
(trivial-package-local-nicknames:add-package-local-nickname :alex :alex... |
f648a0e734cdc4df8c21d0ebde03c1615ba853d151e93a0acd570c703df73730 | erlang/otp | mnesia_config_test.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1997 - 2023 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/mnesia/test/mnesia_config_test.erl | erlang |
%CopyrightBegin%
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 lan... | Copyright Ericsson AB 1997 - 2023 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(mnesia_config_test).
-author('').
-include("mnesia_test_lib.hrl").
-record(test_table,{i,a1,a2,a3}).
-rec... |
ae5fe8e6928d8fdc2421ef45eac3230b96615e06f4b82540920f58079da69d97 | Cantido/horizons | numbers.clj | (ns horizons.parsing.transform.numbers
"Parses and transforms numeric values")
(defn- string->int [s]
(Integer/parseInt s))
(defn- sci-not-coll->bigdec [significand-coll mantissa-coll]
(->> [significand-coll mantissa-coll]
(map last)
(interpose "E")
(apply str)
bigdec))
(defn- sci-not->bigdec [... | null | https://raw.githubusercontent.com/Cantido/horizons/989e0964d5eebb82c3968049ffd05649625bc25d/src/horizons/parsing/transform/numbers.clj | clojure | (ns horizons.parsing.transform.numbers
"Parses and transforms numeric values")
(defn- string->int [s]
(Integer/parseInt s))
(defn- sci-not-coll->bigdec [significand-coll mantissa-coll]
(->> [significand-coll mantissa-coll]
(map last)
(interpose "E")
(apply str)
bigdec))
(defn- sci-not->bigdec [... | |
7d8c4f17a789096d95b6286a79fe3543d44af39198921895e234c200dcdb56b3 | softlab-ntua/bencherl | scheduling_one_periodic_actor_test.erl | Copyright ( C ) 2008 - 2014 EDF R&D
This file is part of Sim - Diasca .
Sim - Diasca is free software : you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation , either version 3 of
the License , or ( at your option ) a... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/sim-diasca/src/core/src/scheduling/tests/scheduling_one_periodic_actor_test.erl | erlang | it under the terms of the GNU Lesser General Public License as
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
If not, see </>.
Overall unit test of the Sim-Diasca deployment and scheduling framework.
termination. Therefore the simulation... | Copyright ( C ) 2008 - 2014 EDF R&D
This file is part of Sim - Diasca .
Sim - Diasca is free software : you can redistribute it and/or modify
published by the Free Software Foundation , either version 3 of
the License , or ( at your option ) any later version .
Sim - Diasca is distributed in the hope tha... |
7bf7f96c86f415bc0b103376b405f8da191f7059d0e2a699d58a2e414205acb4 | falsetru/htdp | 17.8.4.scm | (define (contains xs x)
(cond [(empty? xs) false]
[(= (first xs) x) true]
[else (contains (rest xs) x)]))
(define (remove-all xs x)
(cond [(empty? xs) xs]
[(= (first xs) x) (remove-all (rest xs) x)]
[else (cons (first xs) (remove-all (rest xs) x))]))
(define (contains-same-numbers ... | null | https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/17/17.8.4.scm | scheme | ?
? | (define (contains xs x)
(cond [(empty? xs) false]
[(= (first xs) x) true]
[else (contains (rest xs) x)]))
(define (remove-all xs x)
(cond [(empty? xs) xs]
[(= (first xs) x) (remove-all (rest xs) x)]
[else (cons (first xs) (remove-all (rest xs) x))]))
(define (contains-same-numbers ... |
4f303826337aee5d213ce99dd43af342929b07220d9a1c1091439745fa6cd602 | blindglobe/clocc | htmlgen.lisp | ;;; HTML generation
;;;
Copyright ( C ) 2000 - 2004 , 2007 - 2008 by
This is Free Software , covered by the GNU GPL ( v2 + )
;;; See
;;;
$ I d : , v 1.22 2008/06/16 16:02:33 sds Exp $
;;; $Source: /cvsroot/clocc/clocc/src/cllib/htmlgen.lisp,v $
(eval-when (:compile-toplevel :load-toplevel :execute)
(requir... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/cllib/htmlgen.lisp | lisp | HTML generation
See
$Source: /cvsroot/clocc/clocc/src/cllib/htmlgen.lisp,v $
`dttm->string' - needed only for `directory-index'
"Gray streams"
preparation
HTML generation
print the comment
this is an example on how to use `with-open-html' and `with-tag'.
| Copyright ( C ) 2000 - 2004 , 2007 - 2008 by
This is Free Software , covered by the GNU GPL ( v2 + )
$ I d : , v 1.22 2008/06/16 16:02:33 sds Exp $
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :cllib-base (translate-logical-pathname "clocc:src;cllib;base"))
( require : cllib - date ( tr... |
a15d8b189f0683378414a07e17c92694b2444ed324a032e6199faa067c364652 | jaked/orpc | mm_proto_multiplier.ml | module type Sync =
sig
val ping : unit -> unit
val test_multiply : int -> int -> int -> unit
Creates a test matrix with random values and multiplies them .
are : ( l_rows , r_cols , l_cols = r_rows )
Args are: (l_rows, r_cols, l_cols = r_rows)
*)
end
module type Lwt =
sig
val ping ... | null | https://raw.githubusercontent.com/jaked/orpc/ecb5df8ec928070cd89cf035167fcedf3623ee3c/examples/matrixmult/mm_proto_multiplier.ml | ocaml | module type Sync =
sig
val ping : unit -> unit
val test_multiply : int -> int -> int -> unit
Creates a test matrix with random values and multiplies them .
are : ( l_rows , r_cols , l_cols = r_rows )
Args are: (l_rows, r_cols, l_cols = r_rows)
*)
end
module type Lwt =
sig
val ping ... | |
d0abf4ab43c2225e5a0f1511da6040e89f5b35a016c476dee339f8e1a431a3ce | sdiehl/pairing | Curve.hs | module Test.Curve where
import Protolude
import Data.Curve
import Data.Group
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tasty.QuickCheck
import Test.Field
doubleIdentities :: (Eq a, Eq b) => (a -> b) -> (b -> a) -> a -> b -> Bool
doubleIdentities f t e e' = f e == e' && t e' == e
doubleDefined :: (a -> ... | null | https://raw.githubusercontent.com/sdiehl/pairing/9e3fd026fb43fd64917a3b267d0d8d351eba77cc/test/Test/Curve.hs | haskell | module Test.Curve where
import Protolude
import Data.Curve
import Data.Group
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tasty.QuickCheck
import Test.Field
doubleIdentities :: (Eq a, Eq b) => (a -> b) -> (b -> a) -> a -> b -> Bool
doubleIdentities f t e e' = f e == e' && t e' == e
doubleDefined :: (a -> ... | |
d3eb2529453a9dbd6eda1a9d38cf46c7ddaa53a0d4ba3496d1dc9e26020c66fe | okuoku/nausicaa | compile-all.ikarus.sps | ;;;
Part of : / GPGME
Contents : compile script for Ikarus Scheme
Date : Fri Jan 15 , 2010
;;;
;;;Abstract
;;;
;;;
;;;
Copyright ( c ) 2010 < >
;;;
;;;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 Foun... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/gpgme/src/libraries/compile-all.ikarus.sps | scheme |
Abstract
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
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 warra... | Part of : / GPGME
Contents : compile script for Ikarus Scheme
Date : Fri Jan 15 , 2010
Copyright ( c ) 2010 < >
the Free Software Foundation , either version 3 of the License , or ( at
General Public License for more details .
You should have received a copy of the GNU General Public License
(import
(onl... |
0d9b023c9c634cee24647df52fcc7289e15bdc2d48ddeb859081469ae7ab10df | technomancy/slamhound | util.clj | (ns slam.hound.test.util
(:require [clojure.java.io :as io]
[clojure.test :as t])
(:import (java.io File)))
(defmacro with-tempfile
{:requires [File]}
[tmp-sym & body]
`(let [~tmp-sym (File/createTempFile "slamhound_test" ".clj")]
(try
~@body
(finally
(.delete ~tmp-sym... | null | https://raw.githubusercontent.com/technomancy/slamhound/68bad50282b8b559eb012d6574ef6a0e1485b3a2/test/slam/hound/test/util.clj | clojure | (ns slam.hound.test.util
(:require [clojure.java.io :as io]
[clojure.test :as t])
(:import (java.io File)))
(defmacro with-tempfile
{:requires [File]}
[tmp-sym & body]
`(let [~tmp-sym (File/createTempFile "slamhound_test" ".clj")]
(try
~@body
(finally
(.delete ~tmp-sym... | |
faf471d6b8b0269f65ec05086c84ef16429777b87831d20b6cbe241301314027 | technomancy/slamhound | prettify_test.clj | (ns slam.hound.prettify-test
(:require [clojure.java.io :as io]
[clojure.pprint :refer [*print-right-margin*]]
[clojure.test :refer [deftest is testing]]
[slam.hound.prettify :as p]))
(defn prettify [form]
(binding [*print-right-margin* 72]
(p/prettify form)))
(deftest ^:un... | null | https://raw.githubusercontent.com/technomancy/slamhound/68bad50282b8b559eb012d6574ef6a0e1485b3a2/test/slam/hound/prettify_test.clj | clojure | (ns slam.hound.prettify-test
(:require [clojure.java.io :as io]
[clojure.pprint :refer [*print-right-margin*]]
[clojure.test :refer [deftest is testing]]
[slam.hound.prettify :as p]))
(defn prettify [form]
(binding [*print-right-margin* 72]
(p/prettify form)))
(deftest ^:un... | |
bb133d1a6f122c15ffca89161301bec72afdc34ba80629c2ec0501ef7d598acd | dktr0/estuary | AudioMap.hs | # LANGUAGE RecursiveDo , OverloadedStrings #
module Estuary.Widgets.AudioMap (audioMapWidget) where
import Reflex
import Reflex.Dom
import Data.Map as Map
import Data.IntMap as IntMap
import Data.Text
import TextShow
import Data.List (nub)
import Data.Tuple.Select
import Control.Monad.Fix (MonadFix)
import Estuary.W... | null | https://raw.githubusercontent.com/dktr0/estuary/c08a4790533c983ba236468e0ae197df50f2109f/client/src/Estuary/Widgets/AudioMap.hs | haskell | :: Dynamic t (LocMap Text) | # LANGUAGE RecursiveDo , OverloadedStrings #
module Estuary.Widgets.AudioMap (audioMapWidget) where
import Reflex
import Reflex.Dom
import Data.Map as Map
import Data.IntMap as IntMap
import Data.Text
import TextShow
import Data.List (nub)
import Data.Tuple.Select
import Control.Monad.Fix (MonadFix)
import Estuary.W... |
568d53d6375fbe875794598e7c254c37ca7c588c12cc1d1873867a145923648c | alanz/ghc-exactprint | B.hs |
foo x = case (odd x) of
True -> "Odd"
False -> "Even"
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc710/B.hs | haskell |
foo x = case (odd x) of
True -> "Odd"
False -> "Even"
| |
26b2a719140395f0717d61c0f15e23bfb1ca48cb44f3a02a553f629b9148eeb3 | bytekid/mkbtt | typeIntroduction.ml | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 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 ve... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/processors/src/transformation/typeIntroduction.ml | ocaml | ** OPENS *******************************************************************
a type variable
argument types -> result type
** TYPES *******************************************************************
** GLOBALS *****************************************************************
** FUNCTIONS **************************... | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 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 ve... |
7a8ca590c049f3c504b6d6b62f33eccd3223aede1449198060343b4e065407a7 | danwerner/cairotrix | project.clj | (defproject cairotrix "1.0.0-SNAPSHOT"
:description "A Pajitnovian falling blocks game built on Clojure, GTK+ and Cairo"
:main "org.segfaulted.cairotrix.core"
:dependencies [[org.clojure/clojure "[1.4]"]]
:dev-dependencies [[vimclojure/server "2.3.4"]]
)
| null | https://raw.githubusercontent.com/danwerner/cairotrix/fc989e8c91a29dc5814ce7faf1f5a85bac049754/project.clj | clojure | (defproject cairotrix "1.0.0-SNAPSHOT"
:description "A Pajitnovian falling blocks game built on Clojure, GTK+ and Cairo"
:main "org.segfaulted.cairotrix.core"
:dependencies [[org.clojure/clojure "[1.4]"]]
:dev-dependencies [[vimclojure/server "2.3.4"]]
)
| |
63cf593d3747281a3be59be16dedc87a077feb06b47cc8e1c9d227bf12e959ba | ice1000/learn | all-balanced-parentheses.hs | module Balanced.Parens where
solve :: Int -> Int -> [String]
solve _ 0 = []
solve 0 n = ('(' :) <$> solve 1 (n - 1)
solve c n1
|c < n = (('(' :) <$> solve (c + 1) n)
++ ((')' :) <$> solve (c - 1) n)
|otherwise = [take n [')', ')' ..]]
where n = n1 - 1
--
balancedParens :: Int -> [String]
balancedPa... | null | https://raw.githubusercontent.com/ice1000/learn/4ce5ea1897c97f7b5b3aee46ccd994e3613a58dd/Haskell/CW-Kata/all-balanced-parentheses.hs | haskell | module Balanced.Parens where
solve :: Int -> Int -> [String]
solve _ 0 = []
solve 0 n = ('(' :) <$> solve 1 (n - 1)
solve c n1
|c < n = (('(' :) <$> solve (c + 1) n)
++ ((')' :) <$> solve (c - 1) n)
|otherwise = [take n [')', ')' ..]]
where n = n1 - 1
balancedParens :: Int -> [String]
balancedParen... | |
b98a713caf3eca101161bb84431c38bcbf19c1cc5caab71e9c1b111ce472c468 | erdos/stencil | log.clj | (ns stencil.log)
(def ^org.slf4j.Logger get-logger
(memoize (fn [^String name] (.getLogger (org.slf4j.LoggerFactory/getILoggerFactory) name))))
(defmacro ^:private def-log-level [level]
`(defmacro ~level
([^String msg#]
(assert (string? msg#))
(assert (not (.contains msg# "{}")))
(list '. (... | null | https://raw.githubusercontent.com/erdos/stencil/9263f1a14f9f6b801cc69d372a27ccb431be8afa/src/stencil/log.clj | clojure | (ns stencil.log)
(def ^org.slf4j.Logger get-logger
(memoize (fn [^String name] (.getLogger (org.slf4j.LoggerFactory/getILoggerFactory) name))))
(defmacro ^:private def-log-level [level]
`(defmacro ~level
([^String msg#]
(assert (string? msg#))
(assert (not (.contains msg# "{}")))
(list '. (... | |
bfc83ed8966609ce9954c5f2e06289827bdcdf26133f62af5db7d67a1a5183c9 | alphagov/govuk-guix | admin-environment-style.scm | (define-module (gds services govuk admin-environment-style)
#:use-module (gnu services)
#:use-module (gds services)
#:export (use-govuk-admin-template-environment-label))
(define (use-govuk-admin-template-environment-label services label)
(map
(lambda (s)
(service
(service-kind s)
(if
... | null | https://raw.githubusercontent.com/alphagov/govuk-guix/dea8c26d2ae882d0278be5c745e23abb25d4a4e2/gds/services/govuk/admin-environment-style.scm | scheme | (define-module (gds services govuk admin-environment-style)
#:use-module (gnu services)
#:use-module (gds services)
#:export (use-govuk-admin-template-environment-label))
(define (use-govuk-admin-template-environment-label services label)
(map
(lambda (s)
(service
(service-kind s)
(if
... | |
0a187715aa8748099b4cbc9f799a42a1f586f06371270177e6c3d30f856a3de1 | bodil/clojurescript-all-the-way-down | dom.cljs | (ns tbd.dom)
(defn q [selector] (.querySelector js/document selector))
(defn domready [handler]
(.addEventListener js/window "DOMContentLoaded" handler))
(defn target [event] (.-target event))
(defn- el-in-nodelist [l el]
(some #(= el %) (map #(.item l %) (range (.-length l)))))
(defn watch [event selector han... | null | https://raw.githubusercontent.com/bodil/clojurescript-all-the-way-down/6b15059a16b7c194f32e62fbc8130ac09bd07350/src/client/dom.cljs | clojure | (ns tbd.dom)
(defn q [selector] (.querySelector js/document selector))
(defn domready [handler]
(.addEventListener js/window "DOMContentLoaded" handler))
(defn target [event] (.-target event))
(defn- el-in-nodelist [l el]
(some #(= el %) (map #(.item l %) (range (.-length l)))))
(defn watch [event selector han... | |
50fe450f81b6206a1476cf9b1a15a07a44047e4e6614e049b61ddba2f0172146 | instedd/planwise | build.clj | (ns build
(:require [hawk.core :as hawk]
[shadow.cljs.devtools.api :as shadow]
[build.sass :as sass]))
(def sass-options
{:source-paths ["resources/sass"]
:output-path "target/planwise/public/css"
:include-paths ["node_modules"]
:output-style :nested
:source-map? true})
(... | null | https://raw.githubusercontent.com/instedd/planwise/1bc2a5742ae3dc377dddf1f9e9bb60f0d2f59084/client/dev/src/build.clj | clojure | (ns build
(:require [hawk.core :as hawk]
[shadow.cljs.devtools.api :as shadow]
[build.sass :as sass]))
(def sass-options
{:source-paths ["resources/sass"]
:output-path "target/planwise/public/css"
:include-paths ["node_modules"]
:output-style :nested
:source-map? true})
(... | |
5e44e94e7e0d772ae4b21d4f6e9e48411cca6a9135a07917376060d133b16cc2 | hexlet-basics/exercises-clojure | test.clj | (ns chars-test
(:require [test-helper :refer [assert-solution]]
[index :refer [next-chars]]))
(assert-solution
[["abc"] [""] ["12345"] ["12345abc"]]
["bcd" "" "23456" "23456bcd"]
next-chars)
| null | https://raw.githubusercontent.com/hexlet-basics/exercises-clojure/349576fd498aa9ad971fc560c35d2eec3071c737/modules/30-strings/20-chars/test.clj | clojure | (ns chars-test
(:require [test-helper :refer [assert-solution]]
[index :refer [next-chars]]))
(assert-solution
[["abc"] [""] ["12345"] ["12345abc"]]
["bcd" "" "23456" "23456bcd"]
next-chars)
| |
42f58c6e794eb466ebb5af3fb761c3f83e7cee6cc43caf756f911f32c76e516e | funcool/struct | tools.clj | (require '[clojure.java.shell :as shell]
'[clojure.main])
(require '[rebel-readline.core]
'[rebel-readline.clojure.main]
'[rebel-readline.clojure.line-reader]
'[rebel-readline.clojure.service.local]
'[rebel-readline.cljs.service.local]
'[rebel-readline.cljs.repl]
... | null | https://raw.githubusercontent.com/funcool/struct/d8aff68ee55176182b2511b57afa9fb674b2f1ce/tools.clj | clojure | prompt is handled by line-reader
prompt is handled by line-reader
Build script entrypoint. This should be the last expression. | (require '[clojure.java.shell :as shell]
'[clojure.main])
(require '[rebel-readline.core]
'[rebel-readline.clojure.main]
'[rebel-readline.clojure.line-reader]
'[rebel-readline.clojure.service.local]
'[rebel-readline.cljs.service.local]
'[rebel-readline.cljs.repl]
... |
e83913889538515162bdde5bb83fce451b257a74e9b496b75d6884c7b9ab1dfa | processone/p1_mysql | p1_mysql_app.erl | %%%----------------------------------------------------------------------
%%% File : p1_mysql_app.erl
Author : < >
%%% Purpose : MySQL erlang driver application
Created : 15 May 2013 by < >
%%%
%%%
p1_mysql , Copyright ( C ) 2002 - 2023 ProcessOne
%%%
%%% This program is free software; you can redis... | null | https://raw.githubusercontent.com/processone/p1_mysql/cd9ee538f1819dcca8a8890ed718df226463ff21/src/p1_mysql_app.erl | erlang | ----------------------------------------------------------------------
File : p1_mysql_app.erl
Purpose : MySQL erlang driver application
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be usefu... | Author : < >
Created : 15 May 2013 by < >
p1_mysql , Copyright ( C ) 2002 - 2023 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License
Founda... |
6667581939d026dd620756a01b8b7cac8cb6ea40e1de5f7822d258bb66777299 | serokell/blockchain-util | ChangeSet.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
module Test.Snowdrop.Core.ChangeSet
( changeSetTests
) where
import Universum
import Data.Default (def)
import Hedgehog (MonadGen, Property, PropertyT, forAll, property, (===))
import qualified Hedgehog.Gen as Ge... | null | https://raw.githubusercontent.com/serokell/blockchain-util/a6428c6841e7002605a115002f58eff78ff9f128/snowdrop-core/test/Test/Snowdrop/Core/ChangeSet.hs | haskell | 'Int' is used in types for simplicity.
| The semigroup associativity axiom:
@
x <> (y <> z) ≡ (x <> y) <> z
@
| 'ChangeSet' custom mappend law.
--------------------------------------------------------------------------
Generate values
--------------------------------------------------------------------------
|... | # LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
module Test.Snowdrop.Core.ChangeSet
( changeSetTests
) where
import Universum
import Data.Default (def)
import Hedgehog (MonadGen, Property, PropertyT, forAll, property, (===))
import qualified Hedgehog.Gen as Ge... |
f4cdb8553f13f9a1c387d8812b840af68484ca8611838a9e24d783b4e71a02a9 | deadpendency/deadpendency | PkgGoDevRepositorySpec.hs | # OPTIONS_GHC -fno - warn - orphans #
module Effect.FetchRegistryRepoInfo.Backend.LanguageRegistryFiles.PkgGoDev.PkgGoDevRepositorySpec (spec) where
import Common.Model.Dependency.DependencyName
import Common.Model.Git.QualifiedRepo
import Common.Model.Git.RepoHost
import Common.Model.Git.RepoName
import Common.Model... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/dependency-fetcher/test/Effect/FetchRegistryRepoInfo/Backend/LanguageRegistryFiles/PkgGoDev/PkgGoDevRepositorySpec.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Effect.FetchRegistryRepoInfo.Backend.LanguageRegistryFiles.PkgGoDev.PkgGoDevRepositorySpec (spec) where
import Common.Model.Dependency.DependencyName
import Common.Model.Git.QualifiedRepo
import Common.Model.Git.RepoHost
import Common.Model.Git.RepoName
import Common.Model... | |
89c0ff6044d387aa29d31e2c915f32e48666147e501aa626c4050e7c1163ff4d | informatica-unica/lip | binary-search-tree.ml | type 'a btree = Empty | Node of 'a * 'a btree * 'a btree;;
let t0 =
Node(7,
Node(4,
Node(1,Empty,Empty),
Node(5,Empty,Empty)),
Node(10,Empty,Empty))
;;
let t1 =
Node(8,
Node(4,
Node(1,Empty,Empty),
Node(5,Empty,Empty)),
Node(10,Empty,Empty))
;;
compare 1 2;;
let rec lt_tree n t comp = match ... | null | https://raw.githubusercontent.com/informatica-unica/lip/a11e3bbee128547a9c842eb4bd6c606ce7ad11ab/ocaml-basics/binary-search-tree/binary-search-tree.ml | ocaml | type 'a btree = Empty | Node of 'a * 'a btree * 'a btree;;
let t0 =
Node(7,
Node(4,
Node(1,Empty,Empty),
Node(5,Empty,Empty)),
Node(10,Empty,Empty))
;;
let t1 =
Node(8,
Node(4,
Node(1,Empty,Empty),
Node(5,Empty,Empty)),
Node(10,Empty,Empty))
;;
compare 1 2;;
let rec lt_tree n t comp = match ... | |
17f5b43bdd872d51b828ee887532a4a077fa7eb4e2aec363a86c4018a26d4bfb | nibbula/yew | unzip-cmds.lisp | ;;;
;;; unzip-cmds.lisp - Commands for unzip.
;;;
(in-package :unzip)
(lish:defcommand unzip
((overwrite boolean :short-arg #\o
:help "True to overwrite files without asking.")
(never-overwrite boolean :short-arg #\n
:help "True to never overwrite.")
(list-p boolean :short-arg #\l
:help "True to l... | null | https://raw.githubusercontent.com/nibbula/yew/a62473dae637fb33a92aa75f260bf77b34cdbcfd/los/unzip-cmds.lisp | lisp |
unzip-cmds.lisp - Commands for unzip.
End |
(in-package :unzip)
(lish:defcommand unzip
((overwrite boolean :short-arg #\o
:help "True to overwrite files without asking.")
(never-overwrite boolean :short-arg #\n
:help "True to never overwrite.")
(list-p boolean :short-arg #\l
:help "True to list archive members in short format.")
(verbose... |
60bcefd1acc4c4bbd56ed75f842dd08ec9afca9e31288f6a740422a9cfd191b2 | janestreet/core | char.mli | * This module extends { { ! Base . Char}[Base . ] } , adding [ Identifiable ] for making char
identifiers and [ Quickcheckable ] to facilitate automated testing with pseudorandom
data .
identifiers and [Quickcheckable] to facilitate automated testing with pseudorandom
data.
*)
type t = char [@@d... | null | https://raw.githubusercontent.com/janestreet/core/b0be1daa71b662bd38ef2bb406f7b3e70d63d05f/core/src/char.mli | ocaml | * {2 Extensions}
* [Caseless] compares and hashes characters ignoring case, so that for example
[Caseless.equal 'A' 'a'] and [Caseless.('a' < 'B')] are [true], and
[Caseless.Map], [Caseless.Table] lookup and [Caseless.Set] membership is
case-insensitive.
* Generates characters between the given inclusive ... | * This module extends { { ! Base . Char}[Base . ] } , adding [ Identifiable ] for making char
identifiers and [ Quickcheckable ] to facilitate automated testing with pseudorandom
data .
identifiers and [Quickcheckable] to facilitate automated testing with pseudorandom
data.
*)
type t = char [@@d... |
8efed1e5c90723504f2d4d67840ae0809e6c1393d4dd2afd166e76bffa5dd6c6 | Zulu-Inuoe/clution | vector.lisp | ;;;enumerable-tests - tests for the enumerable library
Written in 2018 by < >
;;;
;;;To the extent possible under law, the author(s) have dedicated all copyright
;;;and related and neighboring rights to this software to the public domain
;;;worldwide. This software is distributed without any warranty.
You s... | null | https://raw.githubusercontent.com/Zulu-Inuoe/clution/b72f7afe5f770ff68a066184a389c23551863f7f/cl-clution/qlfile-libs/enumerable-master/t/vector/vector.lisp | lisp | enumerable-tests - tests for the enumerable library
To the extent possible under law, the author(s) have dedicated all copyright
and related and neighboring rights to this software to the public domain
worldwide. This software is distributed without any warranty.
with this software. If not, see
</>.
No observab... | Written in 2018 by < >
You should have received a copy of the CC0 Public Domain Dedication along
(in-package #:enumerable-tests.vector)
(5am:def-suite expressions.vector
:description "Tests the enumerable expressions with vectors."
:in expressions)
(5am:in-suite expressions.vector)
(5am:test a... |
c9f437a929d2564d22ef83777b53cc74ef9228bca411cf5114af12425668ee4d | grin-compiler/ghc-wpc-sample-programs | Records.hs | # LANGUAGE NondecreasingIndentation #
module Agda.TypeChecking.Records where
import Control.Monad
import Control.Monad.Trans.Maybe
import qualified Data.List as List
import Data.Maybe
import qualified Data.Set as Set
import qualified Data.HashMap.Strict as HMap
import Data.Traversable (traverse)
import Agda.Syntax.... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/Agda-2.6.1/src/full/Agda/TypeChecking/Records.hs | haskell | instance only
# SOURCE #
| Order the fields of a record construction.
^ Name of record type (for error message).
^ How to fill a missing field.
^ Field names of the record type.
^ Provided fields with content in the record expression.
^ Content arranged in official order.
official fields (accord. record type)
... | # LANGUAGE NondecreasingIndentation #
module Agda.TypeChecking.Records where
import Control.Monad
import Control.Monad.Trans.Maybe
import qualified Data.List as List
import Data.Maybe
import qualified Data.Set as Set
import qualified Data.HashMap.Strict as HMap
import Data.Traversable (traverse)
import Agda.Syntax.... |
09b5b8f99475177519f0a1fa7eee4856b58bcb6be18b0104245bd52821ce9ba2 | noinia/hgeometry | Inflate.hs | --------------------------------------------------------------------------------
-- |
Module : Geometry . Polygon . Inflate
Copyright : ( C )
-- License : see the LICENSE file
Maintainer :
--------------------------------------------------------------------------------
module Geometry.Po... | null | https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry/src/Geometry/Polygon/Inflate.hs | haskell | ------------------------------------------------------------------------------
|
License : see the LICENSE file
------------------------------------------------------------------------------
--------------------------------------------------
Implementation
| Points annotated with an 'Arc' indicate that the edg... | Module : Geometry . Polygon . Inflate
Copyright : ( C )
Maintainer :
module Geometry.Polygon.Inflate
( Arc(..)
, inflate
) where
import Algorithms.Geometry.SSSP (SSSP, sssp, triangulate)
import Control.Lens
import Data.Ext
import Geometry.Line ... |
be7eb7ee531b4083c0f51987c8716ed8d4064e63aa734ee114a72cb19b2d978a | hipsleek/hipsleek | token.ml | #include "xdebug.cppo"
open Camlp4.PreCast
type lemma_kind_t = TLEM_TEST | TLEM_PROP | TLEM_SPLIT | TLEM_TEST_NEW | TLEM | TLEM_UNSAFE | TLEM_INFER | TLEM_INFER_PRED | TLEM_SAFE
type sleek_token =
| IDENTIFIER of string
| INT_LITER of int * string
| FLOAT_LIT of float * string
| FRAC_LIT of Frac.... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/token.ml | ocaml | | COMMENT of string
keywords
[4/10/2011] An Hoa
to derive pre-predicate into view
to derive post-predicate into view
should be PRED_ELIM_USELESS
An Hoa [22/08/2011] : inline keyword for inline field declaration in structures
| PRINT_VIEW
| REQUIRESC
| TREL_INFER change to INFER_AT_TERM
operators
... | #include "xdebug.cppo"
open Camlp4.PreCast
type lemma_kind_t = TLEM_TEST | TLEM_PROP | TLEM_SPLIT | TLEM_TEST_NEW | TLEM | TLEM_UNSAFE | TLEM_INFER | TLEM_INFER_PRED | TLEM_SAFE
type sleek_token =
| IDENTIFIER of string
| INT_LITER of int * string
| FLOAT_LIT of float * string
| FRAC_LIT of Frac.... |
cd068438432132aea0bb3cbc79cef60676a906dac9fa486eb805227afcf76b36 | ygmpkk/house | GraphicsCore.hs | module GraphicsCore
(
GraphicsDC
= ( Int , Int )
= ( Int , Int )
, Angle -- = Double
, Time -- = Word32
, RGB(..) -- = RGB Word8 Word8 Word8
, Alignment -- = (HAlign, VAlign)
deriving ( ,... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/hslibs/graphics/lib/x11/GraphicsCore.hs | haskell | = Double
= Word32
= RGB Word8 Word8 Word8
= (HAlign, VAlign)
:: RGB -> (Brush -> Draw a) -> Draw a
:: Style -> Int -> RGB -> IO Pen
:: Style -> Int -> RGB -> (Pen -> Draw a) -> Draw a
:: Font -> Draw Font
:: RGB -> Draw RGB
:: Alignment -> Draw Alignment
:: RGB ... | module GraphicsCore
(
GraphicsDC
= ( Int , Int )
= ( Int , Int )
deriving ( , Eq , Ord , Ix , Show )
deriving ( , Eq , Ord , Ix , Show )
, BkMode(Opaque,Transparent)
, Brush
, Draw
, ioToDraw
, Pen
, Style(Solid,Dash,Dot,DashDot,DashDotDot,Null,Inside... |
8714c8b4a44d8b064251a062e22efe48a6475c6fa7dc3f63c1bcb7c1a415726c | 40ants/setup-lisp | changelog.lisp | (defpackage #:project-docs/changelog
(:use #:cl)
(:import-from #:40ants-doc/changelog
#:defchangelog))
(in-package project-docs/changelog)
(defchangelog (:ignore-words ("ASDF"))
(2.1.0 2022-11-10
"Moved to newer action msys2/setup-msys2@2.14.2 where a warning about stale Node.js version... | null | https://raw.githubusercontent.com/40ants/setup-lisp/74b15495bb7a3b4d125439fa609f7500310aa73e/changelog.lisp | lisp | (defpackage #:project-docs/changelog
(:use #:cl)
(:import-from #:40ants-doc/changelog
#:defchangelog))
(in-package project-docs/changelog)
(defchangelog (:ignore-words ("ASDF"))
(2.1.0 2022-11-10
"Moved to newer action msys2/setup-msys2@2.14.2 where a warning about stale Node.js version... | |
638a851b5986e618b2214b936cfe5510ba3b445a411e03177901ae4f58a14b86 | snowdriftcoop/snowdrift | ReadConfig.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
-- | Gather connection info from a config file, rather than the environment.
This expects the same sort of config file that does . An example looks
-- like:
-- @@
ConfigOption :
-- user: usernamestuff
-- name: databasenamestuff
-- server: localhost... | null | https://raw.githubusercontent.com/snowdriftcoop/snowdrift/91fd1b84fea5d9c4aa2c419d91d790d886b3d100/run-persist/ReadConfig.hs | haskell | | Gather connection info from a config file, rather than the environment.
like:
@@
user: usernamestuff
name: databasenamestuff
server: localhost
pass: passwordlol
@@
| Given a config file and a named config, find it | # LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
This expects the same sort of config file that does . An example looks
ConfigOption :
port : 5432
module ReadConfig (readYamlConfig, RunPersistConfig(..)) where
import Control.Lens
import Control.Monad.Trans.Maybe
import Data.Aeson.Lens
import Data.... |
90ae8561f60821ffa6c7b2ef5a40da45e62e7d3be01375bdd4c89f85a9d17cdb | jsinglet/cam | Lexer.hs | module Lexer where
data Token
= TokenBooleanLiteral Bool
| TokenIntegerLiteral Int
| TokenStringLiteral String
| TokenEquals -- i.e., ==
| TokenLt
| TokenGt
| TokenAssign -- i.e., =
| TokenAdd
| TokenMinus
| TokenMultiply
| TokenDivide
| TokenOpenPa... | null | https://raw.githubusercontent.com/jsinglet/cam/bca0e53fe428baf7b5e489569df2355f77ea3484/src/Lexer.hs | haskell | i.e., ==
i.e., =
"let rec"
always adding a padding space makes
the pattern matching equations just shorter and nicer
we need to look ahead one if we have a minus, just in case we have an
arrow operator
we stop accumulating when we hit a non alpha character
we stop accumulating when we hit a non alpha charact... | module Lexer where
data Token
= TokenBooleanLiteral Bool
| TokenIntegerLiteral Int
| TokenStringLiteral String
| TokenLt
| TokenGt
| TokenAdd
| TokenMinus
| TokenMultiply
| TokenDivide
| TokenOpenParen
| TokenCloseParen
| TokenOpenPair
| TokenClosePair
| TokenI... |
6e5adb4f0b2695569a6ef4176febf056bad28796555dacf37bc2f0316a23aa66 | mbj/stratosphere | PublicAccessBlockConfigurationProperty.hs | module Stratosphere.S3.MultiRegionAccessPoint.PublicAccessBlockConfigurationProperty (
PublicAccessBlockConfigurationProperty(..),
mkPublicAccessBlockConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/s3/gen/Stratosphere/S3/MultiRegionAccessPoint/PublicAccessBlockConfigurationProperty.hs | haskell | module Stratosphere.S3.MultiRegionAccessPoint.PublicAccessBlockConfigurationProperty (
PublicAccessBlockConfigurationProperty(..),
mkPublicAccessBlockConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import... | |
ba033c229d46e6757a16e66fe1644622f851170047b00527bde34beb1d879bc7 | samply/blaze | list.clj | (ns blaze.elm.list
"Implementation of the list type."
(:require
[blaze.anomaly :as ba :refer [throw-anom]]
[blaze.elm.concept :as concept]
[blaze.elm.protocols :as p])
(:import
[clojure.lang PersistentVector IReduceInit]))
(set! *warn-on-reflection* true)
12.1 . Equal
;;
We ca n't use the ... | null | https://raw.githubusercontent.com/samply/blaze/693d07d8fbf9ac4e11af6684978e108bbd193780/modules/cql/src/blaze/elm/list.clj | clojure |
TODO: implementation is O(n)
TODO: implementation is O(n^2)
TODO: implementation is O(n^2)
TODO: implementation is O(n^2) | (ns blaze.elm.list
"Implementation of the list type."
(:require
[blaze.anomaly :as ba :refer [throw-anom]]
[blaze.elm.concept :as concept]
[blaze.elm.protocols :as p])
(:import
[clojure.lang PersistentVector IReduceInit]))
(set! *warn-on-reflection* true)
12.1 . Equal
We ca n't use the Clo... |
51deacd9539b254a255cb9f8cbc56f714a996ae881014c74383873f9e14a9419 | cbaggers/rtg-math | base-matrices.lisp | (in-package :rtg-math.base-matrices)
(labels ((convert (x)
(coerce x 'single-float)))
(defun m! (&rest components)
(let* ((components
(loop :for c :in components
:if (listp c)
:append (loop :for e :in c
:collect (coerce e 'single-floa... | null | https://raw.githubusercontent.com/cbaggers/rtg-math/29fc5b3d0028a4a11a82355ecc8cca62662c69e0/matrices/base/base-matrices.lisp | lisp | (in-package :rtg-math.base-matrices)
(labels ((convert (x)
(coerce x 'single-float)))
(defun m! (&rest components)
(let* ((components
(loop :for c :in components
:if (listp c)
:append (loop :for e :in c
:collect (coerce e 'single-floa... | |
7f1f9ccf92b5777a7f80a86a734464455489e541223a02e0fdabe8ae115cbdd5 | ekmett/linear | Quaternion.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE PatternGuards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE CPP #
# LANGUAGE TypeFamilies #
# LANGUAGE Trustworthy #
# LANGUAGE DeriveGeneric #
# LANGUAGE DataKinds #
{-# LANGUAGE DeriveLift #-}
#ifndef MIN... | null | https://raw.githubusercontent.com/ekmett/linear/3efe225e20948703f5b62039b38018f1ffa8a652/src/Linear/Quaternion.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveLift #
---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : non-portable
Quaternions
---------------------------------------------------------------... | # LANGUAGE PatternGuards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE CPP #
# LANGUAGE TypeFamilies #
# LANGUAGE Trustworthy #
# LANGUAGE DeriveGeneric #
# LANGUAGE DataKinds #
#ifndef MIN_VERSION_hashable
#define MIN_VERSION_hashable(x,y,z) 1
#endif
... |
85f7caff2d11cdc6f9a218ff3912156c54bd8679929edaa2d6d9d94f3c1ac625 | CloudI/CloudI | folsom_metrics_gauge.erl | %%%
Copyright 2011 , Boundary
%%%
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
dist... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_folsom/src/folsom_metrics_gauge.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright 2011 , Boundary
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
-module(folsom_metrics_gauge).
-behaviour(gen_server).
-export([new/1,
update/2,
clear/1,
get_va... |
531625ddd1d9c07acf3d2dacd8b01389410a5b827f540393a3ff1c8ff644a112 | torkve/melange-seawar | board.ml | type result_t = Message.Message.ShotResult.result_t;;
type state_t = [
|`Missed
|`Damaged of int
|`Killed of int
|`Normal of int
|`Unknown
];;
type callback_t = int -> int -> string -> unit;;
type t = {
mutable fields: state_t array array;
mutable ships: (int * int * state_t) list arr... | null | https://raw.githubusercontent.com/torkve/melange-seawar/e1633ef088a2dbf893536a7ba2fa8a72eac198ec/board.ml | ocaml | Create new empty board
Shot the field and get the result of shot
Left only points of the ship that are not current point
Left only points that have `Normal state
Just mark the field of board as missed/damaged/killed
generate new board with the ships | type result_t = Message.Message.ShotResult.result_t;;
type state_t = [
|`Missed
|`Damaged of int
|`Killed of int
|`Normal of int
|`Unknown
];;
type callback_t = int -> int -> string -> unit;;
type t = {
mutable fields: state_t array array;
mutable ships: (int * int * state_t) list arr... |
a14408618d58aa21dc7078c00beb844c35a90dbdbce1509ed5d96983012f884c | OCamlPro/ocamlexc | printf.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/OCamlPro/ocamlexc/a9ddcfff6f376f5dd6c5fcc3211b8f89e36f79fe/stdlib/printf.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
$ I d : printf.ml , v 1.1 1998/08/19 13:29:09 pessaux Exp $
external format_int: string[`a] <[`b]-> int[`c] <... |
67fda64a38a01ceef36baf701631fa86dd9934aedaf1bc0eb40eab6fe13a0152 | finnishtransportagency/harja | vienti.clj | (ns harja.palvelin.integraatiot.sampo.vienti
(:require [taoensso.timbre :as log]
[hiccup.core :refer [html]]
[clj-time.core :as t]
[harja.kyselyt.maksuerat :as qm]
[harja.kyselyt.kustannussuunnitelmat :as qk]
[harja.palvelin.integraatiot.sampo.sanomat.kuitta... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/af09d60911ed31ea98634a9d5c7f4b062e63504f/src/clj/harja/palvelin/integraatiot/sampo/vienti.clj | clojure | (if (xml/validi-xml? +xsd-polku+ "status.xsd" kuittaus-xml) | (ns harja.palvelin.integraatiot.sampo.vienti
(:require [taoensso.timbre :as log]
[hiccup.core :refer [html]]
[clj-time.core :as t]
[harja.kyselyt.maksuerat :as qm]
[harja.kyselyt.kustannussuunnitelmat :as qk]
[harja.palvelin.integraatiot.sampo.sanomat.kuitta... |
ce14ce0e210fe5846205f72b944f8cedb82358e6ac8c453248572352ac9155df | dbuenzli/otfm | otfm.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2013 The otfm programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/otfm/b61821751f807663818034b883e500ccaa856088/src/otfm.ml | ocaml | Error strings
Unsafe string byte manipulations.
If you don't believe the author's invariants, replacing with safe
versions makes everything safe in the module. He won't be
upset.
Pretty printers
may happen in the wild.
Required common tables tags
Optional tables.
Functions
Unicode code points
... | ---------------------------------------------------------------------------
Copyright ( c ) 2013 The otfm programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) ... |
52996d351b7d24e7c967a19eb179f576b4c4d63842341d3b810b497c3ab606fd | JHU-PL-Lab/jaylang | ast_wellformedness.ml | (** This module contains a number of routines to validate the well-formedness of
an AST. *)
open Batteries
open Ast
open Ast_pp
open Ast_tools
type illformedness =
| Duplicate_variable_binding of var
| Variable_not_in_scope of var * var
[@@deriving eq, ord, show]
module Illformedness_order = struct
type t ... | null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/da5775f91994333ec0d8c06b8226dbf75add0d77/src/lang-jayil/ast_wellformedness.ml | ocaml | * This module contains a number of routines to validate the well-formedness of
an AST.
* Determines if an expression is well-formed.
Raises `Illformedness_found' with list of illformednesses found, if given
expression is not well-formed. |
open Batteries
open Ast
open Ast_pp
open Ast_tools
type illformedness =
| Duplicate_variable_binding of var
| Variable_not_in_scope of var * var
[@@deriving eq, ord, show]
module Illformedness_order = struct
type t = illformedness
let compare = compare_illformedness
end
module Illformedness_set = Set.Make ... |
5f29bd9e5d7b216d88bc3ac93ecb8c634245f6f7200095757433134293600494 | ocaml-batteries-team/batteries-included | bench_finger_tree_enum.ml | cd .. & & / bench_finger_tree_enum.native & & _ build / benchsuite / bench_finger_tree_enum.native
module Fg = BatFingerTree
let test_input =
let s = ref Fg.empty in
for i = 0 to 999_999 do
s := Fg.snoc !s i;
done;
!s
let () =
assert (BatList.of_enum (Fg.enum test_input) = Fg.to_list test_input)... | null | https://raw.githubusercontent.com/ocaml-batteries-team/batteries-included/f143ef5ec583d87d538b8f06f06d046d64555e90/benchsuite/bench_finger_tree_enum.ml | ocaml | cd .. & & / bench_finger_tree_enum.native & & _ build / benchsuite / bench_finger_tree_enum.native
module Fg = BatFingerTree
let test_input =
let s = ref Fg.empty in
for i = 0 to 999_999 do
s := Fg.snoc !s i;
done;
!s
let () =
assert (BatList.of_enum (Fg.enum test_input) = Fg.to_list test_input)... | |
b254a47c1c2cce5e31689ae586d0731bbb91ea1d79dc2226a33a9cb0247b507c | jship/monad-logger-aeson | Aeson.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
module Control.Monad.Logger.Aeson
( -- * Synopsis
-- $synopsis
-- * Types
Message(..)
, SeriesElem
, LoggedMessage(..)
-- * Logging functions
-- ** Implicit c... | null | https://raw.githubusercontent.com/jship/monad-logger-aeson/209a4f8cea11ac25721d5fe06783e4ce461c1d70/monad-logger-aeson/library/Control/Monad/Logger/Aeson.hs | haskell | # LANGUAGE OverloadedStrings #
* Synopsis
$synopsis
* Types
* Logging functions
** Implicit call stack, no @LogSource@
** Explicit call stack, no @LogSource@
** Implicit call stack, with @LogSource@
** Convenience aliases
** Thread context
* @LoggingT@ runners
* Utilities for defining our own loggers
* Re-e... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
module Control.Monad.Logger.Aeson
Message(..)
, SeriesElem
, LoggedMessage(..)
, logDebug
, logInfo
, logWarn
, logError
, logOther
, logDebugCS
, logInfoCS
, logWarnCS
, logErrorCS
, logOthe... |
6bcd5cf50f866cbdf5616eb8976de5c3581b835c6ae1c8a20f79906362882743 | caisah/sicp-exercises-and-examples | ex_1.38.scm | In 1737 , the Swiss mathematician published a memoir
Continuis , which included a continued fraction expansion for e - 2 , where e is the
base of the natural logarithms . In this fraction , the Ni are all 1 and the are
successively 1 , 2 , 1 , 1 , 4 , 1 , 1 , 6 , 1 , 1 , 8 , .... Write a program that uses ... | null | https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/1.3.3-procedures_as_general_methods/ex_1.38.scm | scheme | In 1737 , the Swiss mathematician published a memoir
Continuis , which included a continued fraction expansion for e - 2 , where e is the
base of the natural logarithms . In this fraction , the Ni are all 1 and the are
successively 1 , 2 , 1 , 1 , 4 , 1 , 1 , 6 , 1 , 1 , 8 , .... Write a program that uses ... | |
d001d1d2c3802a2323fdf9a76ed763bccb4f66ac4a9abb7eff72a81ffd3cd2ef | jakemcc/backgammon | subs.cljs | (ns bg.subs
(:require [re-frame.core :as rf]
[bg.game :as game]))
(rf/reg-sub
:db
(fn [db]
db))
(rf/reg-sub
:me
(fn [db]
(:me db)))
(rf/reg-sub
:game-id
(fn [db]
(:game-id db)))
(rf/reg-sub
:external
(fn [db]
(:external db)))
(rf/reg-sub
:game
(fn [_]
(rf/subscribe [:external... | null | https://raw.githubusercontent.com/jakemcc/backgammon/ddd9bdafbf004fa2e6f4582a198060234b346735/src/cljs/bg/subs.cljs | clojure | (ns bg.subs
(:require [re-frame.core :as rf]
[bg.game :as game]))
(rf/reg-sub
:db
(fn [db]
db))
(rf/reg-sub
:me
(fn [db]
(:me db)))
(rf/reg-sub
:game-id
(fn [db]
(:game-id db)))
(rf/reg-sub
:external
(fn [db]
(:external db)))
(rf/reg-sub
:game
(fn [_]
(rf/subscribe [:external... | |
4e2f70cf9c9affef5f8e2c9d83f60d4fe421a2c4b7a1d4087c36f64ea4292d35 | owickstrom/gi-gtk-declarative | State.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE GADTs #
# LANGUAGE KindSignatures #
{-# LANGUAGE RankNTypes #-}
| The ' StateTree ' and ' SomeState ' form a " shadow state "
-- representation, used in patching. Declarative widgets can return,
-- and later on reuse, its underlying GTK+ widget, collected
-- pr... | null | https://raw.githubusercontent.com/owickstrom/gi-gtk-declarative/205351a54698be7b583dd34d189a89470ee2b11b/gi-gtk-declarative/src/GI/Gtk/Declarative/State.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE RankNTypes #
representation, used in patching. Declarative widgets can return,
and later on reuse, its underlying GTK+ widget, collected
properties and classes, style context, custom internal state, and
child states. This reduces the need for querying GTK+ widgets
excessi... | # LANGUAGE GADTs #
# LANGUAGE KindSignatures #
| The ' StateTree ' and ' SomeState ' form a " shadow state "
module GI.Gtk.Declarative.State where
import Data.Typeable
import Data.Vector (Vector)
import qualified GI.Gtk as Gt... |
0d1574025c70c2edf3cb5cdac55b8fe2961353a1363e8e93698a10341ecfc949 | bittide/bittide-hardware | RVFI.hs | SPDX - FileCopyrightText : 2022 Google LLC
SPDX - FileCopyrightText : 2020
--
SPDX - License - Identifier : Apache-2.0
|
RISC - V Formal Interface ( RVFI )
See
RISC-V Formal Interface (RVFI)
See -formal/blob/master/docs/rvfi.md
-}
module Contranomy.RVFI where
import Clash.Prelude
import Contranomy.I... | null | https://raw.githubusercontent.com/bittide/bittide-hardware/b44dac8ee0fb14b0c6a94fcbe830fdd8d140bec4/contranomy/src/Contranomy/RVFI.hs | haskell | SPDX - FileCopyrightText : 2022 Google LLC
SPDX - FileCopyrightText : 2020
SPDX - License - Identifier : Apache-2.0
|
RISC - V Formal Interface ( RVFI )
See
RISC-V Formal Interface (RVFI)
See -formal/blob/master/docs/rvfi.md
-}
module Contranomy.RVFI where
import Clash.Prelude
import Contranomy.Inst... | |
a6eee9727688841bce2d4adf91a974a0997e33a7870aff7dc9635a25990141b0 | janestreet/bonsai | devbar_style.ml | include Devbar_style__generated
| null | https://raw.githubusercontent.com/janestreet/bonsai/8643e8b3717b035386ac36f2bcfa4a05bca0d64f/web_ui/view/kado/devbar_style.ml | ocaml | include Devbar_style__generated
| |
4b33b7931a9ed177cbe5c0d795a4387d2763cd0167e85dd6667d69723c92b99d | alephcloud/hs-configuration-tools | TestTools.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
# LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UnicodeSyntax #
-- |
Module : TestTools
-- Description: Tools for testing pro... | null | https://raw.githubusercontent.com/alephcloud/hs-configuration-tools/987cc513206b76ad9e7426c33713a659d28229ae/test/TestTools.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
|
Description: Tools for testing program configurations
Stability: experimental
Tools for testing program configurations
* Very Simple Debugging
* Configuration Assertions for Testing
* Test Execution
* Test Configuration Files
-------... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UnicodeSyntax #
Module : TestTools
Copyright : Copyright © 2015 PivotCloud , Inc.
License : MIT
Maintainer : < >
module TestTools
(
enableDebug
, debug
... |
4a9e20d3eab8cc98f9a539b0f4eaef9f8ddc6c622313d74c279a9bd547295126 | caisah/sicp-exercises-and-examples | ex_2.24.scm | Suppose we evaluate the expression ( list 1 ( list 2 ( list 3 4 ) ) ) . Give the result
;; printed by the interpreter, the corresponding box-and-pointer structure, and the
;; interpretation of this as a tree.
;; ^
;; / \
1 ^
;; / \
... | null | https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/2.2.2-heirarchical_structures/ex_2.24.scm | scheme | printed by the interpreter, the corresponding box-and-pointer structure, and the
interpretation of this as a tree.
^
/ \
/ \
/ \ | Suppose we evaluate the expression ( list 1 ( list 2 ( list 3 4 ) ) ) . Give the result
1 ^
2 ^
3 4
(list 1 (list 2 (list 3 4)))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.