_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
76963ca811c2aafcd553bf814203b26a3d987d1f77ae1de2afe8610843394a20
caribou/caribou-core
debug.clj
(ns caribou.debug (:require [caribou.logger :as log])) (defmacro debug "Simple way to print the value of an expression while still evaluating to the same thing. Example: (debug (inc 3)) --> 4 *prints 4*" [x] `(let [x# ~x] (log/debug (str '~x " -> " x#)) x#)) (defn out "just output the value without th...
null
https://raw.githubusercontent.com/caribou/caribou-core/6ebd9db4e14cddb1d6b4e152e771e016fa9c55f6/src/caribou/debug.clj
clojure
(ns caribou.debug (:require [caribou.logger :as log])) (defmacro debug "Simple way to print the value of an expression while still evaluating to the same thing. Example: (debug (inc 3)) --> 4 *prints 4*" [x] `(let [x# ~x] (log/debug (str '~x " -> " x#)) x#)) (defn out "just output the value without th...
00532eff21b6ce6cab287a747683afaf88257c5bf99bc449774ac33abfdeb171
AlexKnauth/music
Bach-Goldberg-Canone-alla-Quarta.rkt
#lang agile (provide Bach-Goldberg-Canone-alla-Quarta) (require music/data/time/main music/data/note/main music/data/scale/main music/data/score/main (submod music/data/note/note example) (submod music/data/scale/scale-note example) (submod music/data/scale/scale-...
null
https://raw.githubusercontent.com/AlexKnauth/music/b4489c27d7c0f7116d769344c787fa76b479e5fa/music/example/Bach-Goldberg-Canone-alla-Quarta.rkt
racket
TODO: tie TODO: tie ------------------------------------------------------------------------ ------------------------------------------------------------------------
#lang agile (provide Bach-Goldberg-Canone-alla-Quarta) (require music/data/time/main music/data/note/main music/data/scale/main music/data/score/main (submod music/data/note/note example) (submod music/data/scale/scale-note example) (submod music/data/scale/scale-...
27e543972febe5e1854fb354526cdad2a3881c3de90d4beec6f4fba4a61afa02
haskus/packages
Picture.hs
# LANGUAGE RoleAnnotations # module Haskus.Graphics.Picture ( Picture (..) ) where import Data.Ratio import Haskus.Memory.Buffer -- | A picture (a 2D array of pixels) data Picture p = Picture { pictureWidth :: !Word -- ^ Width in pixels , pictureheight :: !Word -- ^ Height in pixels ...
null
https://raw.githubusercontent.com/haskus/packages/6d4a64dc26b55622af86b8b45a30a10f61d52e4d/haskus-graphics/src/lib/Haskus/Graphics/Picture.hs
haskell
| A picture (a 2D array of pixels) ^ Width in pixels ^ Height in pixels ^ Pixel width/height ratio (= 1 if square pixels)
# LANGUAGE RoleAnnotations # module Haskus.Graphics.Picture ( Picture (..) ) where import Data.Ratio import Haskus.Memory.Buffer data Picture p = Picture ^ Pixel data } type role Picture representational
876b534f67b9693f91132d80bb7559bff92da93a0369fb1cc1f178d0334398dc
anton-k/sharc-timbre
ContrabassClarinet.hs
module Sharc.Instruments.ContrabassClarinet (contrabassClarinet) where import Sharc.Types contrabassClarinet :: Instr contrabassClarinet = Instr "contrabass_clarinet" "Contrabass Clarinet" (Legend "McGill" "2" "13") (Range (InstrRange (HarmonicFreq 1 (Pitch 46.24 18 "f#1")) ...
null
https://raw.githubusercontent.com/anton-k/sharc-timbre/14be260021c02f31905b3e63269f582030a45c8d/src/Sharc/Instruments/ContrabassClarinet.hs
haskell
module Sharc.Instruments.ContrabassClarinet (contrabassClarinet) where import Sharc.Types contrabassClarinet :: Instr contrabassClarinet = Instr "contrabass_clarinet" "Contrabass Clarinet" (Legend "McGill" "2" "13") (Range (InstrRange (HarmonicFreq 1 (Pitch 46.24 18 "f#1")) ...
286abe098f36d2be5aaac0d8445ccde1c0574d207947cd50c4aebacf7a269497
cmsc430/www
fv.rkt
#lang racket (require "ast.rkt") (provide fv) Expr - > [ I d ] ;; List all of the free variables in e (define (fv e) (remove-duplicates (fv* e))) (define (fv* e) (match e [(Var x) (list x)] [(Prim p es) (append-map fv* es)] [(If e1 e2 e3) (append (fv* e1) (fv* e2) (fv* e3))...
null
https://raw.githubusercontent.com/cmsc430/www/33d32f0671f03f56da28ba4f9eb6e9686e27ece2/langs/neerdowell/fv.rkt
racket
List all of the free variables in e
#lang racket (require "ast.rkt") (provide fv) Expr - > [ I d ] (define (fv e) (remove-duplicates (fv* e))) (define (fv* e) (match e [(Var x) (list x)] [(Prim p es) (append-map fv* es)] [(If e1 e2 e3) (append (fv* e1) (fv* e2) (fv* e3))] [(Begin e1 e2) (append (fv* ...
d2cb380dce9cfd5e4ed78face1a89218ce2cf62ea4ec7d5ee42177ab4ccb86b1
GaloisInc/semmc
Arithmetic.hs
-- | Pseudocode definitions of arithmetic operations from H5.4 ( page AppxH-5072 ) of the ARMv8 Architecture Reference Manual . -- -- Much of what is here are trivial abstractions over the pseudocode, -- but can be affected by the underlying representational language within ... for example , pMOD is defined in ter...
null
https://raw.githubusercontent.com/GaloisInc/semmc/4dc4439720b3b0de8812a68f8156dc89da76da57/semmc-arm/src/SemMC/Architecture/ARM/BaseSemantics/Pseudocode/Arithmetic.hs
haskell
| Pseudocode definitions of arithmetic operations from H5.4 Much of what is here are trivial abstractions over the pseudocode, but can be affected by the underlying representational language these trivial abstractions are automatically eliminated during evaluation, but their use to match the documented semantics ...
( page AppxH-5072 ) of the ARMv8 Architecture Reference Manual . within ... for example , pMOD is defined in terms of under the assumption that has support for division . Many of # LANGUAGE BinaryLiterals # # LANGUAGE DataKinds # module SemMC.Architecture.ARM.BaseSemantics.Pseudocode.Arithmetic ( round...
5be580c11b26b72db5f1b456e856b4e68667b61232ee826776fa9403a1521ed3
hiroshi-unno/coar
z3interfaceNew.ml
open Core open Z3 open Ast open Ast.Logic let of_var ctx (Ident.Tvar var) = var |> String.escaped |> Symbol.mk_string ctx module type TermType = sig our Term to val of_sort: context -> Sort.t -> Z3.Sort.sort val of_nullary_con: context -> sym -> Z3.Expr.expr val of_con: context -> Expr.expr list -> sym ->...
null
https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/Z3Smt/z3interfaceNew.ml
ocaml
ToDo: remove ToDo: remove actually the sort of function doesn't matter for z3
open Core open Z3 open Ast open Ast.Logic let of_var ctx (Ident.Tvar var) = var |> String.escaped |> Symbol.mk_string ctx module type TermType = sig our Term to val of_sort: context -> Sort.t -> Z3.Sort.sort val of_nullary_con: context -> sym -> Z3.Expr.expr val of_con: context -> Expr.expr list -> sym ->...
d92e4c639728b6328eaf5e902c3e920680ae29e479d5754bc246d1669a9a22f3
rems-project/cerberus
milicore_label_inline.ml
open Core open Milicore open List open Pp_prelude open PPrint let inline_label oannots (label_sym, label_arg_syms_bts, label_body) args = if ((List.length label_arg_syms_bts) <> (List.length args)) then begin PPrint.ToChannel.compact stdout (!^"label:" ^^^ !^(Pp_symbol.to_string_pretty_cn label_sym...
null
https://raw.githubusercontent.com/rems-project/cerberus/965d4e46ae42e85141c2b32a647f11c6944493e3/ocaml_frontend/milicore_label_inline.ml
ocaml
this combines annotations looking at how remove_unspecs.ml works, copying, and adjusting TODO: check about largs
open Core open Milicore open List open Pp_prelude open PPrint let inline_label oannots (label_sym, label_arg_syms_bts, label_body) args = if ((List.length label_arg_syms_bts) <> (List.length args)) then begin PPrint.ToChannel.compact stdout (!^"label:" ^^^ !^(Pp_symbol.to_string_pretty_cn label_sym...
06befcb048d3ba76fa63a693e3defc92ac802a2a89d27c97c467a550bd2cd42b
nikita-volkov/theatre
Theatre.hs
-- | -- Minimalistic actor library. module Theatre ( Actor, -- * Construction spawnStateless, spawnStateful, -- * Usage tell, kill, wait, ) where import qualified Control.Concurrent.Chan.Unagi as E import qualified SlaveThread as F import Theatre.Prelude -- | -- Actor, which processe...
null
https://raw.githubusercontent.com/nikita-volkov/theatre/61dd1b07ee39ee347b9ebdd4befcb174a8868503/library/Theatre.hs
haskell
| Minimalistic actor library. * Construction * Usage | Actor, which processes the messages of type @message@. An abstraction over the message channel, thread-forking and killing. | Send a message to the actor. | Kill the actor. | Wait for the actor to die due to error or being killed. | An actor which cann...
module Theatre ( Actor, spawnStateless, spawnStateful, tell, kill, wait, ) where import qualified Control.Concurrent.Chan.Unagi as E import qualified SlaveThread as F import Theatre.Prelude data Actor message = Actor tell :: message -> IO (), kill :: IO (), wait :: IO () } ins...
dab82c32542b6db7f04f2d839d60ca93bf2985f1d2cfe61bbee9c4ea32dc4af7
mfikes/fifth-postulate
ns217.cljs
(ns fifth-postulate.ns217) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns217.cljs
clojure
(ns fifth-postulate.ns217) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
ebd0b4078956b1b6edac261df7190e2a731b8028b475175927eceef48990e773
sbcl/sbcl
map-refs.pure.lisp
;;; Make sure MAP-REFERENCING-OBJECTS doesn't spuriously treat raw bits as ;;; potential pointers. Also make sure it sees the SYMBOL-INFO slot. (defstruct afoo (slot nil :type sb-ext:word)) (defvar *afoo* (make-afoo :slot (sb-kernel:get-lisp-obj-address '*posix-argv*))) (with-test (:name :map-referencing-objs) (sb-vm...
null
https://raw.githubusercontent.com/sbcl/sbcl/ce126d3512f8146164c64353db4f879f5513a02b/tests/map-refs.pure.lisp
lisp
Make sure MAP-REFERENCING-OBJECTS doesn't spuriously treat raw bits as potential pointers. Also make sure it sees the SYMBOL-INFO slot. Don't crash, that's all
(defstruct afoo (slot nil :type sb-ext:word)) (defvar *afoo* (make-afoo :slot (sb-kernel:get-lisp-obj-address '*posix-argv*))) (with-test (:name :map-referencing-objs) (sb-vm::map-referencing-objects (lambda (x) (assert (not (typep x 'afoo)))) :dynamic '*posix-argv*) (let ((v (sb-k...
a50c5ca6a1d5928f48ef7d6686a81a7d606353c5aa0b47539cda0074006f06c7
vlacs/helmsman
helmsman.clj
(ns helmsman (:require [compojure.core] [taoensso.timbre :as timbre] [helmsman.router :as router])) (timbre/refer-timbre) (def create-ring-handler router/create-ring-handler) (defmacro handler " *** DEPRECATED, removing Compojure dep soon. *** Create a handler that uses compojure destru...
null
https://raw.githubusercontent.com/vlacs/helmsman/e2fe3e49801681b3f0b2d3192f222a5c579a9aaa/src/helmsman.clj
clojure
(ns helmsman (:require [compojure.core] [taoensso.timbre :as timbre] [helmsman.router :as router])) (timbre/refer-timbre) (def create-ring-handler router/create-ring-handler) (defmacro handler " *** DEPRECATED, removing Compojure dep soon. *** Create a handler that uses compojure destru...
90a4c3fe9dab2e91a9f248d0953c53cd95c923827a63731e611f5d549f075a05
ctford/Idris-Elba-Dev
CodegenCommon.hs
module IRTS.CodegenCommon where import Idris.Core.TT import IRTS.Simplified import Control.Exception import System.Environment data DbgLevel = NONE | DEBUG | TRACE deriving Eq data OutputType = Raw | Object | Executable | MavenProject deriving (Eq, Show) environment :: String -> IO (Maybe String) environment x = Co...
null
https://raw.githubusercontent.com/ctford/Idris-Elba-Dev/e915e1d6b7a5921ba43d2572a9ad9b980619b8ee/src/IRTS/CodegenCommon.hs
haskell
module IRTS.CodegenCommon where import Idris.Core.TT import IRTS.Simplified import Control.Exception import System.Environment data DbgLevel = NONE | DEBUG | TRACE deriving Eq data OutputType = Raw | Object | Executable | MavenProject deriving (Eq, Show) environment :: String -> IO (Maybe String) environment x = Co...
6a30b4845ba79063566865fea77098324faf0e512148c683c025319ce3c58465
davazp/cl-icalendar
conditions.lisp
;; error.lisp --- Error handling machinery ;; Copyrigth ( C ) 2010 , 2012 ;; This file is part of cl - icalendar . ;; ;; cl-icalendar is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of ...
null
https://raw.githubusercontent.com/davazp/cl-icalendar/b5295ac245f5d333fa593352039ca4fd6a52a058/conditions.lisp
lisp
error.lisp --- Error handling machinery cl-icalendar is free software: you can redistribute it and/or modify (at your option) any later version. cl-icalendar is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTI...
Copyrigth ( C ) 2010 , 2012 This file is part of cl - icalendar . it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (in-package :cl-icalendar) (define-co...
df1ebce05bf4612dcd255908a57f7782471845e727b07280b77383ad5101186b
BillHallahan/G2
FromInteger.hs
module FromInteger where simple :: Integer -> Int simple = fromInteger
null
https://raw.githubusercontent.com/BillHallahan/G2/dfd377793dcccdc7126a9f4a65b58249673e8a70/tests/TestFiles/FromInteger.hs
haskell
module FromInteger where simple :: Integer -> Int simple = fromInteger
152addd6cdec211b53a6c5f0ee5577add8a2634d15a00389654b86fb64b6fa8b
techascent/tech.compute
project.clj
(defproject techascent/tech.compute "4.51-1-SNAPSHOT" :description "Library designed to provide a generic compute abstraction to allow some level of shared implementation between a cpu, cuda, openCL, webworkers, etc." :url "-ascent/tech.compute" :license {:name "Eclipse Public License" :url "-v10.html...
null
https://raw.githubusercontent.com/techascent/tech.compute/716d270da7018915bcdb42d9942d33991b5931c8/project.clj
clojure
(defproject techascent/tech.compute "4.51-1-SNAPSHOT" :description "Library designed to provide a generic compute abstraction to allow some level of shared implementation between a cpu, cuda, openCL, webworkers, etc." :url "-ascent/tech.compute" :license {:name "Eclipse Public License" :url "-v10.html...
8c67f1aa9a255f33a45fc895366fee1a8f68df0bdc263566dab19cf2d0dfbbaf
melange-re/melange
bytes.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/stdlib-412/stdlib_modules/bytes.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the Byte sequence operations WARNING : Some functions in this file are duplicated in string.ml for ...
e699ea6bb5dbaa26cbc0895a149e2e05acf5b1ea604909efa53c12d1cf15dba5
rowangithub/DOrder
271_nested3.ml
let rec loopc i n = if i < n then loopc (i+1) n else () let rec loopb i n = if i < n then (assert (1 <= i); loopb (i+1) n) else () let rec loopa k l n = if k < n then (loopb l n; loopc l n; loopa (k+1) l n) else () let main l n = if l > 0 then loopa 1 l n else ()
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/mochi2/benchs/271_nested3.ml
ocaml
let rec loopc i n = if i < n then loopc (i+1) n else () let rec loopb i n = if i < n then (assert (1 <= i); loopb (i+1) n) else () let rec loopa k l n = if k < n then (loopb l n; loopc l n; loopa (k+1) l n) else () let main l n = if l > 0 then loopa 1 l n else ()
f2a0a352efbbadfbfcf4972d21cff2d3b959978406997d8642d7964701df2316
Rober-t/apxr_run
app_config_test.erl
-module(app_config_test). -include_lib("eunit/include/eunit.hrl"). %% runners app_config_test_() -> {setup, fun setup/0, [ fun app_config_subtest/0 ]}. %% tests app_config_subtest() -> % get_env/1 ?assertEqual(testing1, app_config:get_env(test)), % get_env/2 ?assertEqual(testing2, app_config...
null
https://raw.githubusercontent.com/Rober-t/apxr_run/9c62ab028af7ff3768ffe3f27b8eef1799540f05/test/app_config_test.erl
erlang
runners tests get_env/1 get_env/2 get_all/0 helpers
-module(app_config_test). -include_lib("eunit/include/eunit.hrl"). app_config_test_() -> {setup, fun setup/0, [ fun app_config_subtest/0 ]}. app_config_subtest() -> ?assertEqual(testing1, app_config:get_env(test)), ?assertEqual(testing2, app_config:get_env(other_space, test_two)), ?assertEqua...
57e0f9085ecbf510782bd4cd793ac51d5857045af1da0e2c1f1040a9a50b4054
achirkin/vulkan
VK_NV_framebuffer_mixed_samples.hs
# OPTIONS_HADDOCK not - home # {-# LANGUAGE DataKinds #-} {-# LANGUAGE MagicHash #-} # LANGUAGE PatternSynonyms # {-# LANGUAGE Strict #-} {-# LANGUAGE ViewPatterns #-} module Graphics.Vulkan.Ext.VK_NV_framebuffer_mixed_samples (AHardwareBuffer(), ANativeWindow(), CAMetalLayer(), VkBool32(...
null
https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_NV_framebuffer_mixed_samples.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE MagicHash # # LANGUAGE Strict # # LANGUAGE ViewPatterns # > #include "vk_platform.h"
# OPTIONS_HADDOCK not - home # # LANGUAGE PatternSynonyms # module Graphics.Vulkan.Ext.VK_NV_framebuffer_mixed_samples (AHardwareBuffer(), ANativeWindow(), CAMetalLayer(), VkBool32(..), VkDeviceAddress(..), VkDeviceSize(..), VkFlags(..), VkSampleMask(..), VkCoverageModulationModeNV(..), V...
d491e9019d141b3e16f2f07ba661668c222c92cb2adcf962f4a74f4a01cfd674
realworldocaml/book
section.mli
open Import type t = Dune_section.t = | Lib | Lib_root | Libexec | Libexec_root | Bin | Sbin | Toplevel | Share | Share_root | Etc | Doc | Stublibs | Man | Misc val compare : t -> t -> Ordering.t include Comparable_intf.S with type key := t val enum_decoder : (string * t) list val all :...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_engine/section.mli
ocaml
* [true] iff the executable bit should be set for files installed in this location. * A short description of the type, for use in user-facing error messages. For example "context name", "library name". * The string is always a correct module name, except not capitalized
open Import type t = Dune_section.t = | Lib | Lib_root | Libexec | Libexec_root | Bin | Sbin | Toplevel | Share | Share_root | Etc | Doc | Stublibs | Man | Misc val compare : t -> t -> Ordering.t include Comparable_intf.S with type key := t val enum_decoder : (string * t) list val all :...
52317b5ccd92b5c893b6de4e86e61a833ec6fa2906dd93121afda52d6fece45a
seagreen/hjsonschema
Shared.hs
module Shared where import Protolude import Control.Monad (fail) import Data.Aeson import Data.Aeson.TH (fieldLabelModifier) import qualified Data.ByteString as BS import Data.Char (toLower) import Data.List (stripPrefix, unlines) import qualified Data.Text ...
null
https://raw.githubusercontent.com/seagreen/hjsonschema/fde6e676f79f3f3320a558f20492ad816a2543a7/test/Shared.hs
haskell
Recursively return the contents of a directory (or return itself if given a file as an argument). Return paths are relative to that directory. Recursively return the contents of a directory (or return itself if given a file as an argument). All return paths start with the 'FilePath' argument. Check if it's a f...
module Shared where import Protolude import Control.Monad (fail) import Data.Aeson import Data.Aeson.TH (fieldLabelModifier) import qualified Data.ByteString as BS import Data.Char (toLower) import Data.List (stripPrefix, unlines) import qualified Data.Text ...
7b3cefd8ef69acdf959855689f04fd09fc0e8a7943d5605683ee7aea960a1afe
fxfactorial/ocaml-libgit2
git.ml
open Ctypes open Foreign module Common = struct let git_feature_t = typedef int64_t "git_feature_t" let git_libgit_2_opt_t = typedef int64_t "git_libgit2_opt_t" let git_libgit2_version = foreign "git_libgit2_version" (ptr int @-> ptr int @-> ptr int @-> returning void) let git_...
null
https://raw.githubusercontent.com/fxfactorial/ocaml-libgit2/0cd6977298b3c444af8e5b96825f71fc7016f92b/git.ml
ocaml
This needs a second varidic argument Stopped, please continue * Now the helpers
open Ctypes open Foreign module Common = struct let git_feature_t = typedef int64_t "git_feature_t" let git_libgit_2_opt_t = typedef int64_t "git_libgit2_opt_t" let git_libgit2_version = foreign "git_libgit2_version" (ptr int @-> ptr int @-> ptr int @-> returning void) let git_...
5548b7856665a5a882c7fd4d327f41fa93b85dbf5e6345fd66779867ec648328
dalmatinerdb/mstore
mstore_serialize_eqc.erl
-module(mstore_serialize_eqc). -include_lib("eqc/include/eqc.hrl"). -include_lib("eunit/include/eunit.hrl"). -include("../include/mstore.hrl"). -import(mstore_heler, [int_array/0, pos_int/0, non_neg_int/0, non_empty_int_list/0, defined_int_array/0]). -export([prop_fold_fully/0, prop_...
null
https://raw.githubusercontent.com/dalmatinerdb/mstore/3cefb9cfa0eb28ad53be023690b2a4a9a8d180b5/eqc/mstore_serialize_eqc.erl
erlang
-module(mstore_serialize_eqc). -include_lib("eqc/include/eqc.hrl"). -include_lib("eunit/include/eunit.hrl"). -include("../include/mstore.hrl"). -import(mstore_heler, [int_array/0, pos_int/0, non_neg_int/0, non_empty_int_list/0, defined_int_array/0]). -export([prop_fold_fully/0, prop_...
9d164c0a89dd7bbcdd2b91150f9a9b8ce4edaa0583a783ab8e723c851ed0157d
goodell/cppmem
main_js.ml
(*========================================================================*) (* *) cppmem model exploration tool (* *) ...
null
https://raw.githubusercontent.com/goodell/cppmem/eb3ce19b607a5d6ec81138cd8cacd236f9388e87/main_js.ml
ocaml
======================================================================== ...
cppmem model exploration tool This ...
400b8372ac8288673a31ddc342ea1a6eaa41b659c716a6a37b49a6cdd3067c9e
mejgun/haskell-tdlib
DeleteRevokedChatInviteLink.hs
{-# LANGUAGE OverloadedStrings #-} -- | module TD.Query.DeleteRevokedChatInviteLink where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U -- | -- Deletes revoked chat invite links. Requires administrator privileges and can_invite_users right in the chat for own lin...
null
https://raw.githubusercontent.com/mejgun/haskell-tdlib/81516bd04c25c7371d4a9a5c972499791111c407/src/TD/Query/DeleteRevokedChatInviteLink.hs
haskell
# LANGUAGE OverloadedStrings # | | Deletes revoked chat invite links. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links @chat_id Chat identifier @invite_link Invite link to revoke | |
module TD.Query.DeleteRevokedChatInviteLink where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U data DeleteRevokedChatInviteLink = DeleteRevokedChatInviteLink invite_link :: Maybe String, chat_id :: Maybe Int } deriving (Eq) instance Show DeleteRevok...
1f51fbce43e899ef8b53ce7160d03409e828f8e58171390ac5271ebaa5d7646e
tomfaulhaber/cl-format
format.clj
Copyright ( c ) , March 2009 . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be...
null
https://raw.githubusercontent.com/tomfaulhaber/cl-format/5b8d89951c33dfc81fdb7e717084b2debc802d30/com/infolace/format.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) , March 2009 . All rights reserved . (ns com.infolace.format (:use com.infolace.format.utilities) (:import [com.infolace.format PrettyWriter])) (load "pprint") (load "format_base") (load "dispatch") nil
0d582d1579c75037b64ee95563f2f39647ec95b93ab84f7d6360b0608077076b
yesodweb/persistent
TypeLitFieldDefsSpec.hs
# LANGUAGE DataKinds # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE OverloadedLabels # # LANGUAGE QuasiQuotes # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE UndecidableInstances # {-# OPTIONS_GHC -Wno-...
null
https://raw.githubusercontent.com/yesodweb/persistent/c3f057757c8406026b2134b0db3d1ec4a668c874/persistent/test/Database/Persist/TH/TypeLitFieldDefsSpec.hs
haskell
# LANGUAGE GADTs # # OPTIONS_GHC -Wno-unused-local-binds #
# LANGUAGE DataKinds # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE OverloadedLabels # # LANGUAGE QuasiQuotes # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE UndecidableInstances # module Database.Persist.TH.TypeLitFieldDefs...
d5c48d0796b2703e51477caa30371bca8a2ffeebd11cdae74b468cea5a4799c4
philnguyen/soft-contract
ex-6.rkt
#lang racket/base (require soft-contract/fake-contract) (define (f a b) (if (null? b) (g a '()) (f (cons (car b) a) (cdr b)))) (define (g c d) (if (null? c) d (g (cdr c) (cons (car c) d)))) (provide (contract-out [f (list? list? . -> . any/c #:total? #t)]))
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/termination/fo-sc/ex-6.rkt
racket
#lang racket/base (require soft-contract/fake-contract) (define (f a b) (if (null? b) (g a '()) (f (cons (car b) a) (cdr b)))) (define (g c d) (if (null? c) d (g (cdr c) (cons (car c) d)))) (provide (contract-out [f (list? list? . -> . any/c #:total? #t)]))
e743c249b5864e2955a3ea5ef167b172857220975075be95302ba7e78186db89
jabber-at/ejabberd
nodetree_tree_sql.erl
%%%---------------------------------------------------------------------- %%% File : nodetree_tree_sql.erl Author : Purpose : Standard node tree plugin with ODBC backend Created : 1 Dec 2007 by %%% %%% ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne %%% %%% This program is free software; y...
null
https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/nodetree_tree_sql.erl
erlang
---------------------------------------------------------------------- File : nodetree_tree_sql.erl 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 useful, but WITHOUT ANY WARRANTY; without ...
Author : Purpose : Standard node tree plugin with ODBC backend Created : 1 Dec 2007 by ejabberd , Copyright ( C ) 2002 - 2018 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 recei...
3675d3ab5f64d6e9315920ce8550553a69c37d66dcd38011b1f9239c00f40983
ajchemist/rum-mdl
mdl_macros.cljc
(ns rum.mdl-macros #?(:cljs (:require-macros rum.mdl-macros))) (defn- defmdlc-binding [binding] (-> binding (update 0 #(or % '_)) (update 1 #(or % '_)))) (defmacro defmdlc "binding must be a vector literal" {:arglists '([name mdl-type? docstring? mixin* binding & body])} [& xs] (let [ar...
null
https://raw.githubusercontent.com/ajchemist/rum-mdl/87376da0f73c5bcafa64bed0fa10c7b653bcf149/src/rum/mdl_macros.cljc
clojure
(ns rum.mdl-macros #?(:cljs (:require-macros rum.mdl-macros))) (defn- defmdlc-binding [binding] (-> binding (update 0 #(or % '_)) (update 1 #(or % '_)))) (defmacro defmdlc "binding must be a vector literal" {:arglists '([name mdl-type? docstring? mixin* binding & body])} [& xs] (let [ar...
f065c6116107c548d63d1bbc0898804d5a4dcc708c848d246aa71851eb7280ac
parsonsmatt/ghc-cache-buster
Foo.hs
module GCB.Types.Foo where data Foo = Foo String mkFoo :: String -> Foo mkFoo = Foo getFoo :: Foo -> String getFoo (Foo str) = str
null
https://raw.githubusercontent.com/parsonsmatt/ghc-cache-buster/1ee284c4ce1be7818ccec2eea7c12b638c477723/src/GCB/Types/Foo.hs
haskell
module GCB.Types.Foo where data Foo = Foo String mkFoo :: String -> Foo mkFoo = Foo getFoo :: Foo -> String getFoo (Foo str) = str
0f199e73527a5c6f9ba05c86d9af6ba896de6c94da07be0039658ae12ec5cd9b
tweag/ormolu
splice-out.hs
# LANGUAGE TemplateHaskell # type Foo = $(bar [t|Int|])
null
https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/type/splice-out.hs
haskell
# LANGUAGE TemplateHaskell # type Foo = $(bar [t|Int|])
589025f08ed4a91605e12b1c3ee5cec850b0748cbc9c6598ae0890421a66f214
racket/typed-racket
signatures.rkt
#lang racket/base (require "../utils/utils.rkt" racket/unit (contract-req) "../utils/unit-utils.rkt" "../rep/type-rep.rkt" "../types/utils.rkt") (provide (all-defined-out)) (define-signature tc-expr^ ([cond-contracted tc-expr (syntax? . -> . full-tc-results/c)] [cond-contracted tc-exp...
null
https://raw.githubusercontent.com/racket/typed-racket/2c52f708a517e5ff82c53a5e2a9347a397a7bd23/typed-racket-lib/typed-racket/typecheck/signatures.rkt
racket
i.e. a prefab struct instance
#lang racket/base (require "../utils/utils.rkt" racket/unit (contract-req) "../utils/unit-utils.rkt" "../rep/type-rep.rkt" "../types/utils.rkt") (provide (all-defined-out)) (define-signature tc-expr^ ([cond-contracted tc-expr (syntax? . -> . full-tc-results/c)] [cond-contracted tc-exp...
705d982f1589ac38c261370c04d4bdcc1a57c7bda2a91e9584d39b748cb87db1
frp-arduino/frp-arduino
Combine.hs
Copyright ( c ) 2014 Contributors as noted in the file -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or -- (at your option) any later version. -- -- T...
null
https://raw.githubusercontent.com/frp-arduino/frp-arduino/7489ada012efc404086043ee55a9933029647121/examples/Combine.hs
haskell
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public...
Copyright ( c ) 2014 Contributors as noted in the file it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License import Arduino.Uno main = compileProgram $ do ...
680d8381316e185c6d7906ed2f19a5c414894e7f009f3fe6106c84f63ffd1ae6
CompSciCabal/SMRTYPRTY
ndpar-5.3.rkt
#lang racket ;; ------------------------------------------------------- ;; Memory as Vectors ;; ------------------------------------------------------- Exercise 5.20 , p.539 ;; Assuming list procedure is defined as (define (list . x) (if (empty? x) null (cons (car x) (apply list (cdr x)))...
null
https://raw.githubusercontent.com/CompSciCabal/SMRTYPRTY/4a5550789c997c20fb7256b81469de1f1fce3514/sicp/v1/chapter-5.3/ndpar-5.3.rkt
racket
------------------------------------------------------- Memory as Vectors ------------------------------------------------------- Assuming list procedure is defined as Registers: the-cars │ │n1│p1│p1│ ├─┼──┼──┼──┼──┤ the-cdrs │ │n2│e0│p2│ free p4 x p1 y p3 -------------------...
#lang racket Exercise 5.20 , p.539 (define (list . x) (if (empty? x) null (cons (car x) (apply list (cdr x))))) (define x (cons 1 2)) (define y (list x x)) 0 1 2 3 4 ┌ ─ ┬ ─ ─ ┬ ─ ─ ┬ ─ ─ ┬ ─ ─ ┐ ─ ┴ ─ ─ ┴ ─ ─ ┴ ─ ─ ┴ ─ ─ ┘ (define count-leave...
74fc957be8e2a541172c066e2014d0f0135cfd82007257728c26a688e41c0c8e
qfpl/sv
Encoding.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Data.Sv.Example.Encoding where import Contravariant.Extras.Contrazip (contrazip6) import Control.Lens (makeLenses, makePrisms) import Control.Monad (when) import Data.ByteString (ByteString) import qualified Data.ByteString.Lazy as LBS import Data...
null
https://raw.githubusercontent.com/qfpl/sv/84debbf3a0ada497a736a6d595a943783a76f9d6/examples/src/Data/Sv/Example/Encoding.hs
haskell
# LANGUAGE OverloadedStrings # | Here's our data type to encode. It has a few standard types as well as some other algebraic data types we're about to define. | Here we're defining an encoder for a 'Product' by using the | Here we're defining an encoder for a 'Sum' using the 'choose' combinator. 'choose' takes a ...
# LANGUAGE TemplateHaskell # module Data.Sv.Example.Encoding where import Contravariant.Extras.Contrazip (contrazip6) import Control.Lens (makeLenses, makePrisms) import Control.Monad (when) import Data.ByteString (ByteString) import qualified Data.ByteString.Lazy as LBS import Data.Semigroup ((<>)) import Data.Text ...
91b43dd80b45b709738e5aec20a79cd9c61058475411a02d4531dfb2ab7b1a61
input-output-hk/cardano-sl
StakeholderId.hs
# OPTIONS_GHC -fno - warn - orphans # module Pos.Core.Common.StakeholderId ( StakeholderId ) where import Universum import Text.JSON.Canonical (FromObjectKey (..), JSValue (..), ReportSchemaErrors, ToObjectKey (..)) import Pos.Core.Common.AddressHash ...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/src/Pos/Core/Common/StakeholderId.hs
haskell
| Stakeholder identifier (stakeholders are identified by their public keys)
# OPTIONS_GHC -fno - warn - orphans # module Pos.Core.Common.StakeholderId ( StakeholderId ) where import Universum import Text.JSON.Canonical (FromObjectKey (..), JSValue (..), ReportSchemaErrors, ToObjectKey (..)) import Pos.Core.Common.AddressHash ...
8c795e9ecc1df592ccb858b7567159a852d3d291b498e4acb2a68baaba4f18a4
GaloisInc/daedalus
Utils.hs
module Daedalus.ParserGen.Utils where import System.IO import Data.List import Daedalus.ParserGen.AST import Daedalus.ParserGen.Action import Daedalus.ParserGen.Aut Generate a graphviz code that could be run with python3 and produce -- a graphical diagraph of an automaton autToGraphviz:: Aut a => a -> IO () autToG...
null
https://raw.githubusercontent.com/GaloisInc/daedalus/cd9b0288bace37190e489ffcaf5c4924162bf90b/src/Daedalus/ParserGen/Utils.hs
haskell
a graphical diagraph of an automaton "f.view()\n"
module Daedalus.ParserGen.Utils where import System.IO import Data.List import Daedalus.ParserGen.AST import Daedalus.ParserGen.Action import Daedalus.ParserGen.Aut Generate a graphviz code that could be run with python3 and produce autToGraphviz:: Aut a => a -> IO () autToGraphviz aut = do autFile <- openFi...
0dcd9f72e70aea224e3f60fcae1c6eff18743c6881be652006b152e8fa970b92
Smoltbob/Caml-Est-Belle
simple_call.ml
let x = 1 in print_int x
null
https://raw.githubusercontent.com/Smoltbob/Caml-Est-Belle/3d6f53d4e8e01bbae57a0a402b7c0f02f4ed767c/tests/typechecking/valid/simple_call.ml
ocaml
let x = 1 in print_int x
54836d4255098181f983047a4a7538c612e87eae03c2128f6d407272ca695d51
JeffreyBenjaminBrown/hode
TValid.hs
module Hode.Test.Rslt.TValid where import Data.Either import Test.HUnit import Hode.Rslt.Types import Hode.Rslt.Valid import qualified Hode.Test.Rslt.RData as D test_module_rslt_valid :: Test test_module_rslt_valid = TestList [ TestLabel "test_validRefExpr" test_validRefE...
null
https://raw.githubusercontent.com/JeffreyBenjaminBrown/hode/79a54a6796fa01570cde6903b398675c42954e62/hode-test/Hode/Test/Rslt/TValid.hs
haskell
TODO : test for what kind of Left, not just whether it is Left. Could do in a future-proof manner by using enum error types rather than strings, (But I checked by hand in GHCI; each `validRefExpr ...` expression below produces the correct kind of complaint.)
module Hode.Test.Rslt.TValid where import Data.Either import Test.HUnit import Hode.Rslt.Types import Hode.Rslt.Valid import qualified Hode.Test.Rslt.RData as D test_module_rslt_valid :: Test test_module_rslt_valid = TestList [ TestLabel "test_validRefExpr" test_validRefE...
0cd8bc571558883798c9c24862821baca99d57464650e76d7e45acf8535f1741
ghc/ghc
Instance.hs
( c ) The University of Glasgow 2006 ( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998 (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} # LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # # OPTIONS_GHC -Wno - incomplete - record - updates # ...
null
https://raw.githubusercontent.com/ghc/ghc/d0c7bbedb741e6bf947bcdc0e097070242ab56e1/compiler/GHC/Tc/TyCl/Instance.hs
haskell
| Typechecking instance declarations # INLINE [2] op1 # Method selectors Default methods get the 'self' dictionary as argument so they can call other methods at the same type Default methods get the same type as their method selector Note [Tricky type variable scoping] A top-level definition for each instance me...
( c ) The University of Glasgow 2006 ( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998 (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} # LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # # OPTIONS_GHC -Wno - incomplete - record - updates # ...
b202096937466249ba7a53350524047925a8fe515ebb71b088db408007d2d71c
TyGuS/hoogle_plus
HtmlOutput.hs
module Synquid.HtmlOutput ( docHtml, showDocHtml, renderHtmlNoHeader ) where import qualified Text.PrettyPrint.ANSI.Leijen as PP import System.Console.ANSI import Text.Html -- | Render a document into an html object. docHtml :: PP.SimpleDoc -> Html docHtml doc = splitLines [] 0 (PP.SSGR []) doc -- | Render...
null
https://raw.githubusercontent.com/TyGuS/hoogle_plus/d02a1466d98f872e78ddb2fb612cb67d4bd0ca18/src/Synquid/HtmlOutput.hs
haskell
| Render a document into an html object. | Render a document into a string that contains the html code. | Width in pixels of a single indentation position. | String that represents a CSS attribute with given key and value. | Apply a funtion to HTML content if it is non-empty while @next@ is the rest of the docume...
module Synquid.HtmlOutput ( docHtml, showDocHtml, renderHtmlNoHeader ) where import qualified Text.PrettyPrint.ANSI.Leijen as PP import System.Console.ANSI import Text.Html docHtml :: PP.SimpleDoc -> Html docHtml doc = splitLines [] 0 (PP.SSGR []) doc showDocHtml :: PP.SimpleDoc -> String showDocHtml = ren...
58c8328bb3e548a81bc3c4fb1bd09564d739a5a29077f5c145839e9e0f55bd75
haskell-tools/haskell-tools
Type.hs
# LANGUAGE FlexibleContexts # # LANGUAGE MonoLocalBinds # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Language.Haskell.Tools.Refactor.Utils.Type (typeExpr, appTypeMatches, literalType) where import Data.List import Control.Monad.State import Control.Reference imp...
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/refactor/Language/Haskell/Tools/Refactor/Utils/Type.hs
haskell
# LANGUAGE RankNTypes # in do args <- mapM resultType holes typeExpr' (AST.UTypeSig _ t) = -- TODO: evaluate type TODO: check instances
# LANGUAGE FlexibleContexts # # LANGUAGE MonoLocalBinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Language.Haskell.Tools.Refactor.Utils.Type (typeExpr, appTypeMatches, literalType) where import Data.List import Control.Monad.State import Control.Reference import GHC hiding (typeKind) im...
f19e8c61e4327f007a39fcb513c5858df09f129c015f311e14d157d41724ee10
alanz/ghc-exactprint
RedundantDo.hs
foo = case x of True -> foo False -> foo
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc710/RedundantDo.hs
haskell
foo = case x of True -> foo False -> foo
ff595f0cd835a6290c4a3bfc5d435cebe67361db411bb8b5acfdea27be4cf0db
mk270/archipelago
socket.ml
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012 This programme is free software ; you may redistribute and/or modify it under the terms of the GNU Affero General Public Licence as published by the Free Software Foundation , either version 3 of said Licence , or ( ...
null
https://raw.githubusercontent.com/mk270/archipelago/4241bdc994da6d846637bcc079051405ee905c9b/src/server/socket.ml
ocaml
e.g., tried to talk to a monster FIXME: we should probably catch/suppress these return new socket to multiplexer
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012 This programme is free software ; you may redistribute and/or modify it under the terms of the GNU Affero General Public Licence as published by the Free Software Foundation , either version 3 of said Licence , or ( ...
e72369acf6280e13184ae637aa57f995f5948dec8b93425af3e61429a1f7973d
diagrams/diagrams-lib
Matrix.hs
# LANGUAGE ScopedTypeVariables # -- | module Diagrams.Test.Transform.Matrix where import Test.Tasty import Test.Tasty.QuickCheck import Diagrams.Transform.Matrix import Diagrams.Prelude import Data.Distributive (distribute) import Instances tests :: TestTree tests...
null
https://raw.githubusercontent.com/diagrams/diagrams-lib/6f66ce6bd5aed81d8a1330c143ea012724dbac3c/test/Diagrams/Test/Transform/Matrix.hs
haskell
|
# LANGUAGE ScopedTypeVariables # module Diagrams.Test.Transform.Matrix where import Test.Tasty import Test.Tasty.QuickCheck import Diagrams.Transform.Matrix import Diagrams.Prelude import Data.Distributive (distribute) import Instances tests :: TestTree tests = te...
caf9b4a24a59fcd07fbf794688b79c1c1deedd26e8b78fe007fbedd78e7e53b2
nyu-acsys/drift
map.ml
x < = 3000 if x = 0 then 0 x < 0 & & 0 < x < = 3000 let main_p (n:int) = if n >= 0 then assert (map n = n) else () let main (w:unit) = let _ = main_p 30 in let _ = for i = 1 to 1000000 do main ( Random.int 1000 ) done for i = 1 to 1000000 do main (Random.int 1000) ...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks_call/r_type/first/map.ml
ocaml
x < = 3000 if x = 0 then 0 x < 0 & & 0 < x < = 3000 let main_p (n:int) = if n >= 0 then assert (map n = n) else () let main (w:unit) = let _ = main_p 30 in let _ = for i = 1 to 1000000 do main ( Random.int 1000 ) done for i = 1 to 1000000 do main (Random.int 1000) ...
c08660356dd0394f9f8160d53a066e6705a38d322874bd32fb70282c59b75b2a
obohrer/octia
core.clj
(ns octia.core (:require [octia.compojure-adapter :as compojure-adapter] [octia.endpoint :as endpoint] [octia.wrapper :as wrapper] [octia.doc :as doc] [clojure.string :as string])) (def default-group {:path "" :opts {}}) ...
null
https://raw.githubusercontent.com/obohrer/octia/9e0ee78350c5defcf1a2c141e100ea38bf4312e0/src/octia/core.clj
clojure
(ns octia.core (:require [octia.compojure-adapter :as compojure-adapter] [octia.endpoint :as endpoint] [octia.wrapper :as wrapper] [octia.doc :as doc] [clojure.string :as string])) (def default-group {:path "" :opts {}}) ...
d8cb20edf9acf15bd546f5123e2f8f322a7e9712bc17228273322b678d0597cf
jiangpengnju/htdp2e
abstractions-from-templates.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-reader.ss" "lang")((modname abstractions-from-templates) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constru...
null
https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/abstraction/designing-abstractions/abstractions-from-templates.rkt
racket
about the language level of this file in a form that our tools can easily process. Abstract from the templates directly. [List-of X] Y [X Y -> Y] -> Y [List-of Number] -> Number [List-of Number] -> Number
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-reader.ss" "lang")((modname abstractions-from-templates) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define (fun-for-l l) (cond [(emp...
cbd7b628f5a8af6f45a070d09f205dbf7800cf0785bee80ab0836ac8e4444dd6
greglook/cljstyle
indent.clj
(ns cljstyle.format.indent (:require [cljstyle.format.zloc :as zl] [clojure.string :as str] [rewrite-clj.node :as n] [rewrite-clj.zip :as z])) (def ^:private indent-size 2) (def ^:private start-element "Special symbols which precede certain types of elements." {:meta "^", :meta* "#^", :vector ...
null
https://raw.githubusercontent.com/greglook/cljstyle/1f58e2e7af4c193aa77ad0695f6c2b9ac2c5c5ec/src/cljstyle/format/indent.clj
clojure
if a namespaced map's body is on a newline, don't add the start-element to the list of indentation newline cannot be introduced by start-element ## Editing Functions
(ns cljstyle.format.indent (:require [cljstyle.format.zloc :as zl] [clojure.string :as str] [rewrite-clj.node :as n] [rewrite-clj.zip :as z])) (def ^:private indent-size 2) (def ^:private start-element "Special symbols which precede certain types of elements." {:meta "^", :meta* "#^", :vector ...
f0086bf4677a37b6614b26958fbdc58f853c2057a3e0eefb2eff1f85f3b25fe9
bobbae/gosling-emacs
mh-mline.ml
; Stuff to do with mode lines in mhe ; July 17, 1986 Glenn Trewitt ; Created. (declare-global mh-mode-line ; restore the mode line to this mhml-blank ; empty mode line ; Mode lines during message composition. mhml-comp-1 mhml-comp-2 ; -- for msg during composition. mhml-comp-done-1 mhml-co...
null
https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/maclib/mh-mline.ml
ocaml
; Stuff to do with mode lines in mhe ; July 17, 1986 Glenn Trewitt ; Created. (declare-global mh-mode-line ; restore the mode line to this mhml-blank ; empty mode line ; Mode lines during message composition. mhml-comp-1 mhml-comp-2 ; -- for msg during composition. mhml-comp-done-1 mhml-co...
5b0f596268dc73af47b22d964b388f79985707cf6cf6dfe9343e243b9286f947
dryewo/cyrus
http.clj
(ns {{namespace}}.lib.http (:require [dovetail.core :as log])) (defn compute-request-info "Creates a nice, readable request info text for logline prefixing." [request] (str (-> request :request-method name .toUpperCase) " " (:uri request) " <- " (if-let [x-forwarded-for (-> request :header...
null
https://raw.githubusercontent.com/dryewo/cyrus/880c842e0baa11887854ec3d912c044a2a500449/resources/leiningen/new/cyrus/src/_namespace_/lib/http.clj
clojure
(ns {{namespace}}.lib.http (:require [dovetail.core :as log])) (defn compute-request-info "Creates a nice, readable request info text for logline prefixing." [request] (str (-> request :request-method name .toUpperCase) " " (:uri request) " <- " (if-let [x-forwarded-for (-> request :header...
703bb5fb3d82783842b67be64f4894a48bb26effe93d1026587abd63e85bc076
cryptosense/pkcs11
pkcs11_CBC_ENCRYPT_DATA_PARAMS.ml
* Helper to define [ ] open Ctypes open Ctypes_helpers module type HIGHER = sig type t = { iv : string ; data : string } [@@deriving ord, yojson] end module type PARAM = sig val name : string val size : int end module Make (Param : PARAM) (Higher : HIGHER) = struct type _t type t = _t structu...
null
https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/driver/pkcs11_CBC_ENCRYPT_DATA_PARAMS.ml
ocaml
Build the variable length string Copy the fixed length string
* Helper to define [ ] open Ctypes open Ctypes_helpers module type HIGHER = sig type t = { iv : string ; data : string } [@@deriving ord, yojson] end module type PARAM = sig val name : string val size : int end module Make (Param : PARAM) (Higher : HIGHER) = struct type _t type t = _t structu...
6515d274612211c06fc08e78d95fd0f1ec73aa85672ec22e5a30067c0dc89565
janestreet/core_extended
row.ml
open Core type t = { header_map : int String.Map.t ; fields : string array } [@@deriving compare, fields] let is_empty t = Array.for_all t.fields ~f:String.is_empty let sexp_of_t t = let names_by_indices = Map.to_sequence t.header_map |> Sequence.fold ~init:Int.Map.empty ~f:(fun init (name, index) ->...
null
https://raw.githubusercontent.com/janestreet/core_extended/12904525fc31f3ef1177194d8755cd57811e91cf/delimited_kernel/src/row.ml
ocaml
open Core type t = { header_map : int String.Map.t ; fields : string array } [@@deriving compare, fields] let is_empty t = Array.for_all t.fields ~f:String.is_empty let sexp_of_t t = let names_by_indices = Map.to_sequence t.header_map |> Sequence.fold ~init:Int.Map.empty ~f:(fun init (name, index) ->...
1a4776fb82b028a2ce415f4dae528a13f77bb918469dfc3b54c971eb433e0019
thheller/shadow-grove
builder.cljs
(ns shadow.grove.others.builder (:require-macros [shadow.grove.builder]) (:require [shadow.grove.protocols :as p])) (def ^:dynamic ^not-native *instance* nil) (defn check-instance! [] (when-not *instance* (throw (ex-info "no shadow.grove.builder/*instance* set!" {})))) (defn fragment-start [fragment-id...
null
https://raw.githubusercontent.com/thheller/shadow-grove/2398f30b89aadd38f1c18081b9290bacf5f7d0e0/src/test/shadow/experiments/grove/others/builder.cljs
clojure
(ns shadow.grove.others.builder (:require-macros [shadow.grove.builder]) (:require [shadow.grove.protocols :as p])) (def ^:dynamic ^not-native *instance* nil) (defn check-instance! [] (when-not *instance* (throw (ex-info "no shadow.grove.builder/*instance* set!" {})))) (defn fragment-start [fragment-id...
841ca9bd66866934a0c3a9364bfa139099e4d9577d6554f8413609476e03a9ad
eyedouble/couchdb
couchdb_documents.erl
%% @doc The `couchdb_documents' module contains functionality listed under CouchDB API %% Reference section 1.4.1. %% Documents are CouchDB ’s central data structure . The idea behind a document is , %% unsurprisingly, that of a real-world document – a sheet of paper such as an invoice, %% a recipe, or a business ca...
null
https://raw.githubusercontent.com/eyedouble/couchdb/39830e536e803dfb492bfdb8b3644839cdd7e356/src/sections/couchdb_documents/couchdb_documents.erl
erlang
@doc The `couchdb_documents' module contains functionality listed under CouchDB API Reference section 1.4.1. unsurprisingly, that of a real-world document – a sheet of paper such as an invoice, a recipe, or a business card. We already learned that CouchDB uses the JSON format to store documents. %reference Co...
Documents are CouchDB ’s central data structure . The idea behind a document is , -module(couchdb_documents). -include("couchdb.hrl"). -include("../../dev.hrl"). -export([ exists/2 ,lookup_rev/2 ,lookup_rev/3 ,get/2 ,get/3 ,save/2 ,save/3 ,save/4 ,delete/2 ,delete/3 ]). -sp...
c3e717e309111ca0911936b457feebbc1cfa1b513cb55cd09801c015df72347a
klarna-incubator/system_monitor
system_monitor_tests.erl
-module(system_monitor_tests). -include_lib("eunit/include/eunit.hrl"). start_test() -> ?assertMatch({ok, _}, application:ensure_all_started(system_monitor)), application:stop(system_monitor). callback_is_started_when_configured_test() -> application:set_env(system_monitor, callback_mod, system_monitor_pg), ...
null
https://raw.githubusercontent.com/klarna-incubator/system_monitor/8c323a005417159b124f462e8722a7ea664a3b18/test/system_monitor_tests.erl
erlang
-module(system_monitor_tests). -include_lib("eunit/include/eunit.hrl"). start_test() -> ?assertMatch({ok, _}, application:ensure_all_started(system_monitor)), application:stop(system_monitor). callback_is_started_when_configured_test() -> application:set_env(system_monitor, callback_mod, system_monitor_pg), ...
2f4f0e71894ba6d4919c9001249e9f5443cd7839cb6bc93a022a4a11c4ed3c05
HugoPeters1024/hs-sleuth
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Prelude as P import Factorial (fac) import Unlines import Criterion.Main import Streaming import Tree triangular :: Int -> Int triangular 0 = 0 triangular n = n + triangular (n-1) data Duo = One Int | Two Char main :: IO () main = print $ Tree.makeImportan...
null
https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/91aa2806ea71b7a26add3801383b3133200971a5/test-project/app/Main.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import Prelude as P import Factorial (fac) import Unlines import Criterion.Main import Streaming import Tree triangular :: Int -> Int triangular 0 = 0 triangular n = n + triangular (n-1) data Duo = One Int | Two Char main :: IO () main = print $ Tree.makeImportant (Leaf 5) lorem_words = [ "Lor...
10fbab8db97e79a500e1c1237c65de8841a792327eb130786bcf20132e667d24
janestreet/virtual_dom
test_patch.ml
open! Core open! Import let%test "empty patch succeeds" = let previous = Node.div [] in let current = Node.div [] in let patch = Node.Patch.create ~previous ~current in Node.Patch.is_empty patch ;; let%test "non-empty patch fails" = let previous = Node.div [ Node.text "Hello" ] in let current = Node.div [...
null
https://raw.githubusercontent.com/janestreet/virtual_dom/c7b1c93db1b300431dc227a3eb647dfd8d354b2e/test/test_patch.ml
ocaml
open! Core open! Import let%test "empty patch succeeds" = let previous = Node.div [] in let current = Node.div [] in let patch = Node.Patch.create ~previous ~current in Node.Patch.is_empty patch ;; let%test "non-empty patch fails" = let previous = Node.div [ Node.text "Hello" ] in let current = Node.div [...
082da4dbfc584d700435bac8c86346ac8232706d49b3b3aae0fd60ea6bec7dbe
skanev/playground
08-tests.scm
(require rackunit rackunit/text-ui) (load-relative "../../support/eopl.scm") (load-relative "../08.scm") (load-relative "helpers/let.scm") (define eopl-3.08-tests (test-suite "Tests for EOPL exercise 3.08" (check-true (run "equal?(1, 1)")) (check-false (run "equal?(1, 2)")) (check-true (run "less?(...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/03/tests/08-tests.scm
scheme
(require rackunit rackunit/text-ui) (load-relative "../../support/eopl.scm") (load-relative "../08.scm") (load-relative "helpers/let.scm") (define eopl-3.08-tests (test-suite "Tests for EOPL exercise 3.08" (check-true (run "equal?(1, 1)")) (check-false (run "equal?(1, 2)")) (check-true (run "less?(...
64a1c59f59e5725865e25bcacf23a88f379860af5a61fe66ba3d782a6b7608ac
deepfire/holotype
As.hs
module Holo.Instances.As where import Control.Lens (Lens', Traversal') import Data.Text (Text) import Data.Proxy (Proxy(..)) import qualified GI.Pango as GIP import ...
null
https://raw.githubusercontent.com/deepfire/holotype/d33052f588b74616560b81616ffc4a0142f8a617/src/Holo/Instances/As.hs
haskell
# SOURCE # * TextS - TextVisual - TextLine - Text - Interp Text a XXX: non-total XXX: non-total liftIO $ putStrLn $ printf "setupVisual T.Text: %s → %s" (show _tsFontKey) (show font) drawableBindFontLayout allocates: released by FFI finalizers GIP.layoutNew gipc -- same as above * Switch - Bool - Inter...
module Holo.Instances.As where import Control.Lens (Lens', Traversal') import Data.Text (Text) import Data.Proxy (Proxy(..)) import qualified GI.Pango as GIP import ...
2a1e0d1936f29097a7fb957fa88b3cc327b65dcd718ca3f0e9295e148c28efd8
returntocorp/semgrep
Gitignore_filter.mli
(* Support for file tree filtering using the gitignore specification. This implements the full gitignore filtering specification, assuming the sources of gitignore patterns were already parsed and are provided as levels. The actual sources of gitignore patterns and levels are not specified here, allowin...
null
https://raw.githubusercontent.com/returntocorp/semgrep/88135d1c4affe447c98819b677160069fc4b3270/src/osemgrep/targeting/Gitignore_filter.mli
ocaml
Support for file tree filtering using the gitignore specification. This implements the full gitignore filtering specification, assuming the sources of gitignore patterns were already parsed and are provided as levels. The actual sources of gitignore patterns and levels are not specified here, allowing ...
type t type status = Not_ignored | Ignored val create : ?gitignore_filenames:string list -> ?higher_priority_levels:Gitignore_level.t list -> ?lower_priority_levels:Gitignore_level.t list -> project_root:Fpath.t -> unit -> t Examine a single absolute[1 ] path[2 ] and determine whether it is selecte...
b3b2a026f53aa2c8f96048e986d78602745638a9b3346ade1316e12509001269
tezos/tezos-mirror
RPC_directory_helpers.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2023 Nomadic Labs , < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/1b26ce0f9c2a9c508a65c45641a0a146d9b52fc7/src/proto_016_PtMumbai/lib_sc_rollup_node/RPC_directory_helpers.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2023 Nomadic Labs , < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN A...
2d466b09e20bbae88044ffa8e14397034b6a22af661e3dba6299fcb1cb84e80a
owlbarn/owl_ode
native_s.ml
* OWL - OCaml Scientific and Engineering Computing * OWL - ODE - Ordinary Differential Equation Solvers * * Copyright ( c ) 2019 > * Copyright ( c ) 2019 < > * OWL - OCaml Scientific and Engineering Computing * OWL-ODE - Ordinary Differential Equation Solvers * * Copyright (c) 2019 Ta-Chu...
null
https://raw.githubusercontent.com/owlbarn/owl_ode/5d934fbff87eea9f060d6c949bf78467024d8791/src/ode/native/native_s.ml
ocaml
* OWL - OCaml Scientific and Engineering Computing * OWL - ODE - Ordinary Differential Equation Solvers * * Copyright ( c ) 2019 > * Copyright ( c ) 2019 < > * OWL - OCaml Scientific and Engineering Computing * OWL-ODE - Ordinary Differential Equation Solvers * * Copyright (c) 2019 Ta-Chu...
e90b0105ccfbc206407d13d2f39c6a2b93831f382e07b6da4ee93448a8863844
adolenc/cl-neovim
manual-api.lisp
(in-package #:cl-neovim) (defmacro def-/s-and-/a (fn-name args &body body) "Defines sync and async versions of fn-name functions at the same time. Replaces all occurences of symbol %call% with either call/s or call/a (depending on the version), appends /a to async variant and appends instance argument to a...
null
https://raw.githubusercontent.com/adolenc/cl-neovim/7212d305206aaae331a3e2d0d2597b671cec01f4/src/manual-api.lisp
lisp
(in-package #:cl-neovim) (defmacro def-/s-and-/a (fn-name args &body body) "Defines sync and async versions of fn-name functions at the same time. Replaces all occurences of symbol %call% with either call/s or call/a (depending on the version), appends /a to async variant and appends instance argument to a...
78be160410eebf205cf42c1d28a4ee31adc4e5e107ab2fdf7f6f7747b092993e
jvanbruegge/Megarecord
RowList.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE PolyKinds # # LANGUAGE TypeFamilies # {-# LANGUAGE TypeInType #-} # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module Data.Kind.RowList ( RowList(..), RowToList ) where import GHC.TypeLits (Symbol)...
null
https://raw.githubusercontent.com/jvanbruegge/Megarecord/4b62620a57edf4162d4ac07ec0f527d54872d010/src/Data/Kind/RowList.hs
haskell
# LANGUAGE TypeInType #
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE PolyKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module Data.Kind.RowList ( RowList(..), RowToList ) where import GHC.TypeLits (Symbol) import Data.Kind.Row (Row)...
7bd6ad375c2ebaaa05ba0b1dc5e4ddb76ac3afd0423d7f31eb5d6f9329546dfd
grin-compiler/ghc-wpc-sample-programs
Writers.hs
# LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} | Module : Text . Pandoc Copyright : Copyright ( C ) 2006 - 2020 License : GNU GPL , version 2 or above Maintainer : < > Stability ...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/src/Text/Pandoc/Writers.hs
haskell
# LANGUAGE OverloadedStrings # | Association list of formats and writers.
# LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE ScopedTypeVariables # | Module : Text . Pandoc Copyright : Copyright ( C ) 2006 - 2020 License : GNU GPL , version 2 or above Maintainer : < > Stability : alpha Portability : portable ...
ffe77aa57333ceb14b4fab0172c1de72cc5818e6442be60dc5022fe3efcb7803
danr/hipspec
QuickSort.hs
# LANGUAGE DeriveDataTypeable , TemplateHaskell # module QuickSort where import Prelude(Bool(..),undefined,return,Eq,Ord) import HipSpec.Prelude import Definitions import Test.QuickSpec.Signature import Test.QuickCheck.All # NOINLINE whenSorted # whenSorted :: NList -> NList whenSorted xs = if sorted xs then xs else ...
null
https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/examples/old-examples/QuickSort.hs
haskell
Alternative definition of sorted prop_elem_qsort x xs = elem x xs =:= elem x (qsort xs) prop_count_qsort x xs = count x xs =:= count x (qsort xs)
# LANGUAGE DeriveDataTypeable , TemplateHaskell # module QuickSort where import Prelude(Bool(..),undefined,return,Eq,Ord) import HipSpec.Prelude import Definitions import Test.QuickSpec.Signature import Test.QuickCheck.All # NOINLINE whenSorted # whenSorted :: NList -> NList whenSorted xs = if sorted xs then xs else ...
54414e1681afd0eb509a29b635671ef8d76657fc50c8eb4fcb3b81d0813de194
GNOME/gimp-tiny-fu
selection-round.scm
; selection-rounded-rectangle.scm -*-scheme-*- ; GIMP - The GNU Image Manipulation Program Copyright ( C ) 1995 and ; ; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of ...
null
https://raw.githubusercontent.com/GNOME/gimp-tiny-fu/a64d85eec23b997e535488d67f55b44395ba3f2e/scripts/selection-round.scm
scheme
selection-rounded-rectangle.scm -*-scheme-*- GIMP - The GNU Image Manipulation Program This program is free software: you can redistribute it and/or modify either version 3 of the License , or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WA...
Copyright ( C ) 1995 and it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License 1.00 - initial release 1.01 - some code cleanup , no real changes 1.02 - made script undoable 2.01 - fixed to work if there was no current ...
4b9b0c94917ab4bc4dd72cf8a543df25d1b0da95cdb83086c02266285bcd1ce9
MastodonC/kixi.datastore
inmemory.clj
(ns kixi.datastore.schemastore.inmemory (:require [clojure [data :as data]] [clojure.spec.alpha :as s] [com.stuartsierra.component :as component] [kixi.comms :as c] [kixi.datastore [schema-creator :as sc] [schemastore :as ss :refer...
null
https://raw.githubusercontent.com/MastodonC/kixi.datastore/f33bba4b1fdd8c56cc7ac0f559ffe35254c9ca99/src/kixi/datastore/schemastore/inmemory.clj
clojure
should be at the command level
(ns kixi.datastore.schemastore.inmemory (:require [clojure [data :as data]] [clojure.spec.alpha :as s] [com.stuartsierra.component :as component] [kixi.comms :as c] [kixi.datastore [schema-creator :as sc] [schemastore :as ss :refer...
5ac6e4fc715cd31d7868b917b504d908b9d98c57908892a3ede88f5d97bd5f6a
lspitzner/brittany
Test262.hs
# LANGUAGE ImplicitParams # foo = let ?bar = Foo in value
null
https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test262.hs
haskell
# LANGUAGE ImplicitParams # foo = let ?bar = Foo in value
e1fb431090edd1036a15f1cf799120a3d8e85529c6f95b0c0bf34233d1ed6e0b
avsm/mirage-duniverse
syntax.ml
This module is a recursive descent parser for the ocamldoc syntax . The parser consumes a token stream of type [ Token.t Stream.t ] , provided by the lexer , and produces a comment AST of the type defined in [ Parser_.Ast ] . The AST has two main levels : inline elements , which can appear inside ...
null
https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/odoc/src/parser/syntax.ml
ocaml
{2 Input} The last token in the stream is always [`End], and it is never consumed by the parser, so the [None] case is impossible. Convenient abbreviation for use in patterns. {2 Paragraphs} After each line is parsed, decides whether to parse more lines. {3 Helper types} This is a no-op. It is needed ...
This module is a recursive descent parser for the ocamldoc syntax . The parser consumes a token stream of type [ Token.t Stream.t ] , provided by the lexer , and produces a comment AST of the type defined in [ Parser_.Ast ] . The AST has two main levels : inline elements , which can appear inside ...
dfbf5cad65b43fef2027044477948648c195c7963ea4da797863b2425f32d900
Ericson2314/lighthouse
Regex.hs
# OPTIONS_GHC -fno - warn - name - shadowing # ----------------------------------------------------------------------------- -- | -- Module : Text.Regex Copyright : ( c ) 2006 , derived from ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : -- ...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/regex-compat/Text/Regex.hs
haskell
--------------------------------------------------------------------------- | Module : Text.Regex License : BSD-style (see the file LICENSE) Maintainer : Stability : experimental Regular expression matching. Uses the POSIX regular expression --------------------------------------------------...
# OPTIONS_GHC -fno - warn - name - shadowing # Copyright : ( c ) 2006 , derived from ( c ) The University of Glasgow 2001 Portability : non - portable ( regex - base needs MPTC+FD ) interface in " Text . Regex . " . Modified by to be a thin layer over the regex - posix module Text.Regex ( Regex...
1310b68b670484823766763c53ce0abf7dd2cbb1a1ce6b61d779e5583a294dc7
lspitzner/brittany
Test7.hs
func :: (((((((((()))))))))) -- current output is.. funny. wonder if that can/needs to be improved..
null
https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test7.hs
haskell
current output is.. funny. wonder if that can/needs to be improved..
func :: (((((((((())))))))))
3483054e4649359b5d44a87f14467f5480c2c51989c182011eb8114e3d6192cc
unison-code/uni-instr-sel
Base.hs
| Copyright : Copyright ( c ) 2012 - 2017 , < > License : BSD3 ( see the LICENSE file ) Maintainer : Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <> License : BSD3 (see the LICENSE file) Maintainer : -} Main authors : < > Main authors: Gabriel Hjort ...
null
https://raw.githubusercontent.com/unison-code/uni-instr-sel/2edb2f3399ea43e75f33706261bd6b93bedc6762/hlib/instr-sel/Language/InstrSel/Utils/Base.hs
haskell
----------- Functions ----------- | Checks if an 'Either' is of type 'Left'. | Checks if an 'Either' is of type 'Right'. | Gets the data contained by a 'Left'. | Gets the data contained by a 'Right'. | Groups elements such that a set of elements, for which equality holds for every element pair in that set, are g...
| Copyright : Copyright ( c ) 2012 - 2017 , < > License : BSD3 ( see the LICENSE file ) Maintainer : Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <> License : BSD3 (see the LICENSE file) Maintainer : -} Main authors : < > Main authors: Gabriel Hjort ...
a9e29da5d35fd9ad9fc5b3623f6a17adc3c9357d014dcd41bb3c1cd03783fa3b
crategus/cl-cffi-gtk
pixbufs.lisp
;;;; pixbufs - 2021-11-11 ;;;; ;;;; A GdkPixbuf represents an image, normally in RGB or RGBA format. Pixbufs are normally used to load files from disk and perform ;;;; image scaling. ;;;; ;;;; This demo is not all that educational, but looks cool. It was written by Extreme Pixbuf Hacker and was translated to Lis...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/ba198f7d29cb06de1e8965e1b8a78522d5430516/demo/gtk-example/pixbufs.lisp
lisp
pixbufs - 2021-11-11 A GdkPixbuf represents an image, normally in RGB or RGBA format. image scaling. This demo is not all that educational, but looks cool. It was written simple animation. Look at the Image demo for additional pixbuf usage examples. Clear surface Load the images Start the timer for the ani...
Pixbufs are normally used to load files from disk and perform by Extreme Pixbuf Hacker and was translated to Lisp by . It also shows off how to use GtkDrawingArea to do a TODO : The center of the rotation is no longer at the ( 200,200 ) point ? Why ? (in-package #:gtk-example) (defvar *pixbufs-files* ...
070ee003251b90cc1d2e3493a6f1572a013a8115d4bcc54ea1222841f7b264a8
ertugrulcetin/code3dworld
config.clj
(ns backend-3d-scene.config (:require [cprop.core :refer [load-config]] [cprop.source :as source] [mount.core :refer [args defstate]])) (defstate config :start (->> [(args) (source/from-system-props) (source/from-env)] (load-config :merge) (into (sorted-map))))
null
https://raw.githubusercontent.com/ertugrulcetin/code3dworld/cf260462c2226e56bd648e80e0f4040e4a053b11/backend-3d-scene/src/backend_3d_scene/config.clj
clojure
(ns backend-3d-scene.config (:require [cprop.core :refer [load-config]] [cprop.source :as source] [mount.core :refer [args defstate]])) (defstate config :start (->> [(args) (source/from-system-props) (source/from-env)] (load-config :merge) (into (sorted-map))))
8c3a8e9d8434a4794a333dd3f0603e9dd1cdcb00fe8108ef5fc459f396b5e500
cfpb/qu
validation.clj
(ns qu.test.query.validation (:require [clojure.test :refer :all] [qu.test-util :refer :all] [qu.query :as query] [qu.query.validation :as v])) (deftest test-validate (let [slicedef {:dimensions ["state_abbr" "county" "county_code" "city" "city_abbr"] :metrics ...
null
https://raw.githubusercontent.com/cfpb/qu/f460d9ab2f05ac22f6d68a98a9641daf0f7c7ba4/test/qu/test/query/validation.clj
clojure
(run-tests)
(ns qu.test.query.validation (:require [clojure.test :refer :all] [qu.test-util :refer :all] [qu.query :as query] [qu.query.validation :as v])) (deftest test-validate (let [slicedef {:dimensions ["state_abbr" "county" "county_code" "city" "city_abbr"] :metrics ...
3e6aff4b4859a6fe3dc12636341bc4e1f7efe8a46ba13b74e1edd169df6809d3
metosin/malli
generator_test.cljc
(ns malli.experimental.time.generator-test (:require [malli.generator :as mg] [malli.core :as m] [malli.experimental.time-test :refer [r]] [malli.experimental.time.generator] [clojure.test :as t] #?(:cljs [malli.experimental.time :refer [LocalDate LocalTime]...
null
https://raw.githubusercontent.com/metosin/malli/372ad8119300d1ed054a383e184c431b8494c697/test/malli/experimental/time/generator_test.cljc
clojure
(ns malli.experimental.time.generator-test (:require [malli.generator :as mg] [malli.core :as m] [malli.experimental.time-test :refer [r]] [malli.experimental.time.generator] [clojure.test :as t] #?(:cljs [malli.experimental.time :refer [LocalDate LocalTime]...
e13df6a123d666397a498def7969cb8b6ac68dfd6fb303629c44a3758decae92
helium/blockchain-core
hex_eqc.erl
-module(hex_eqc). -include_lib("eqc/include/eqc.hrl"). -include_lib("eunit/include/eunit.hrl"). -export([prop_hex_check/0]). prop_hex_check() -> ?FORALL({Iterations, Hash}, {elements([10000]), binary(32)}, begin Ledger = ledger(), application:set_env(blockchain, disabl...
null
https://raw.githubusercontent.com/helium/blockchain-core/9011de7537ecfd737074b85b7b16e7d8e1ceef00/eqc/hex_eqc.erl
erlang
Grab the list of parent hexes Use entropy to generate randval for running iterations Need this to match counters against assumptions Fname = "/tmp/zones_" ++ libp2p_crypto:bin_to_b58(Hash), Track all counts a node gets picked ok = file:write_file(Fname, io_lib:fwrite("~p\n", [Node]), [append]), Fucking probabili...
-module(hex_eqc). -include_lib("eqc/include/eqc.hrl"). -include_lib("eunit/include/eunit.hrl"). -export([prop_hex_check/0]). prop_hex_check() -> ?FORALL({Iterations, Hash}, {elements([10000]), binary(32)}, begin Ledger = ledger(), application:set_env(blockchain, disabl...
5b113a26a0e1733b78f7f490ab660995d05f06f1cddfd643e032e6f3c1048206
ChrisPenner/proton
Types.hs
module Proton.Types where import Data.Profunctor.Indexed import Data.Profunctor.Coindexed type Optic p s t a b = p a b -> p s t type Optic' p s a = Optic p s s a a type Optical p q s t a b = p a b -> q s t type Optical' p q s a = Optical p q s s a a type IndexedOptic i q s t a b = forall p. Indexable i p q => Optica...
null
https://raw.githubusercontent.com/ChrisPenner/proton/4ce22d473ce5bece8322c841bd2cf7f18673d57d/src/Proton/Types.hs
haskell
module Proton.Types where import Data.Profunctor.Indexed import Data.Profunctor.Coindexed type Optic p s t a b = p a b -> p s t type Optic' p s a = Optic p s s a a type Optical p q s t a b = p a b -> q s t type Optical' p q s a = Optical p q s s a a type IndexedOptic i q s t a b = forall p. Indexable i p q => Optica...
a96a341bab9abea4368ccb12ea7c6fe60f092c6ce5a0f631a475056a5e2046cc
xhtmlboi/yocaml
yocaml_yaml.mli
* A Wrapper around { { : -yaml } . This module can act as a provider to read the metadata of a file being written in Yaml . This module can act as a provider to read the metadata of a file being written in Yaml. *) (** {1 Build additions} *) * Read a file and parse metadata desribed in Yaml ...
null
https://raw.githubusercontent.com/xhtmlboi/yocaml/4d207700a94b1b78bf256d11243d7fcab603d7db/lib/yocaml_yaml/yocaml_yaml.mli
ocaml
* {1 Build additions} * {1 Types} * An alias for [Yaml.value]. * Produces a Yaml representation from a string. * {1 Validators}
* A Wrapper around { { : -yaml } . This module can act as a provider to read the metadata of a file being written in Yaml . This module can act as a provider to read the metadata of a file being written in Yaml. *) * Read a file and parse metadata desribed in Yaml in the header and returns ...
3dc6960b5a5b1e15cf34ccad68e71b1bdb39a2f768c62153581981655b3e81aa
expipiplus1/vulkan
Marshal.hs
module Marshal ( module Marshal.Struct , module Marshal.Command ) where import Marshal.Command import Marshal.Struct
null
https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/generate-new/src/Marshal.hs
haskell
module Marshal ( module Marshal.Struct , module Marshal.Command ) where import Marshal.Command import Marshal.Struct
585b8d4bcf5ff511f4efa20ee89fbdb8246e5939c64ef9704a5f147af2e5e886
leithaus/rhocaml
rho.ml
(* -*- mode: Tuareg;-*- *) Filename : RHO.ml (* Authors: lgm *) Creation : Tue Dec 28 12:55:02 2004 Copy...
null
https://raw.githubusercontent.com/leithaus/rhocaml/7b0c7bfa99dd98059a1e8899007c4b5d258f99ed/rho.ml
ocaml
-*- mode: Tuareg;-*- Authors: lgm See LICENSE.BIOSIM in the license directory. Description: -------------------...
Filename : RHO.ml Creation : Tue Dec 28 12:55:02 2004 Copyright : Biosimilarity LLC 2004 - 2006 . All rights reserved . type process = Zero | Input of action * process | Lift of name * process ...
e953423cfd0cbc209bcdaa3c17ccbd52b902cfb87c02b82f6587d9b7fe12eed3
armedbear/abcl
rotatef.lisp
;;; rotatef.lisp ;;; Copyright ( C ) 2004 $ Id$ ;;; ;;; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . ;;; ;;;...
null
https://raw.githubusercontent.com/armedbear/abcl/0631ea551523bb93c06263e772fbe849008e2f68/src/org/armedbear/lisp/rotatef.lisp
lisp
rotatef.lisp This program is free software; you can redistribute it and/or either version 2 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License fo...
Copyright ( C ) 2004 $ Id$ modify it under the terms of the GNU General Public License of the License , or ( at your option ) any later version . You should have received a copy of the GNU General Public License Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA . Adapte...
b21ec47b4af035f839187c62c5a98466cd2d5242fe932b8efd98e5cf7b2b64c0
hexlet-codebattle/battle_asserts
rna_transcription.clj
(ns battle-asserts.issues.rna-transcription (:require [clojure.string :as s] [clojure.test.check.generators :as gen])) (def level :elementary) (def tags ["strings"]) (def description {:en "Given a DNA strand, return its RNA complement. Both DNA and RNA strands are a sequence of nucleotides. ...
null
https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/21355f84c964b2e92333d03e503c482738716a54/src/battle_asserts/issues/rna_transcription.clj
clojure
(ns battle-asserts.issues.rna-transcription (:require [clojure.string :as s] [clojure.test.check.generators :as gen])) (def level :elementary) (def tags ["strings"]) (def description {:en "Given a DNA strand, return its RNA complement. Both DNA and RNA strands are a sequence of nucleotides. ...
f3bc255bcbb59c3a1cd84d337f514ea070aa00826e819eaaab855f65ce6ab9a7
henryw374/cljc.java-time
non_shadow_tests.clj
(ns non-shadow-tests (:require [com.widdindustries.vanilla-release-compile :as vrc] [com.widdindustries.tiadough-cljs2 :as cljs2])) (defn cljsjs [{:keys [compile-mode]}] (cljs2/start-funnel) (vrc/build "cljsjs-test" {:preloads ['lambdaisland.chui.remote] :closure-defines {'lambdaisland.funn...
null
https://raw.githubusercontent.com/henryw374/cljc.java-time/c7f8766da7f2497240f9577e51a65a97a9a1bf88/dev/non_shadow_tests.clj
clojure
(ns non-shadow-tests (:require [com.widdindustries.vanilla-release-compile :as vrc] [com.widdindustries.tiadough-cljs2 :as cljs2])) (defn cljsjs [{:keys [compile-mode]}] (cljs2/start-funnel) (vrc/build "cljsjs-test" {:preloads ['lambdaisland.chui.remote] :closure-defines {'lambdaisland.funn...
3dc3cc4f4732a277deda1e1b051e4468495b9468110163e426cfead9d8f358dc
imvu/dtm-redis
redis_command.erl
Copyright ( C ) 2011 - 2013 IMVU Inc. %% %% 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 the Software without restriction , including without limitation the rights to %% use, copy, modify, merge, publ...
null
https://raw.githubusercontent.com/imvu/dtm-redis/719bca5903ed513d28be3b5e1a210b3e18dcc309/apps/dtm_redis/src/redis_command.erl
erlang
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 so, subject to the following conditions: The above copyright notice and this ...
Copyright ( C ) 2011 - 2013 IMVU Inc. the Software without restriction , including without limitation the rights to of the Software , and to permit persons to whom the Software is furnished to do copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND...
87b70dc71538b1e7b23d917a77fd4283230e61fae1260aaa37c782931df112b3
cruxlang/crux
ParseTest.hs
# OPTIONS_GHC -F -pgmF htfpp # {-# LANGUAGE OverloadedStrings #-} module ParseTest (htf_thisModulesTests) where import Crux.AST import qualified Crux.Lex as Lex import Crux.Parse import Crux.Pos (Pos(..), PosRec(..)) import Data.HashMap.Strict (fromList) import qualified Data.Text as T import Test.Framework makePos ...
null
https://raw.githubusercontent.com/cruxlang/crux/883f642d15fb85ce17d9c485ee91158d9e826a2f/tests/ParseTest.hs
haskell
# LANGUAGE OverloadedStrings #
# OPTIONS_GHC -F -pgmF htfpp # module ParseTest (htf_thisModulesTests) where import Crux.AST import qualified Crux.Lex as Lex import Crux.Parse import Crux.Pos (Pos(..), PosRec(..)) import Data.HashMap.Strict (fromList) import qualified Data.Text as T import Test.Framework makePos :: Int -> Int -> Pos makePos l c = ...
10e8197a1d726c67a4b3152bfe5a2b7d34f394906865e4ed93f546102ca11e64
LaurentMazare/ocaml-torch
serialize.mli
include module type of Torch_core.Wrapper.Serialize
null
https://raw.githubusercontent.com/LaurentMazare/ocaml-torch/a82b906a22c7c23138af16fab497a08e5167d249/src/torch/serialize.mli
ocaml
include module type of Torch_core.Wrapper.Serialize
bc65b3a530de98c5015c9074e88f043595b9ff896276dfe652e9d8ac9d95910f
buntine/Simply-Scheme-Exercises
21-2.scm
; The domain-checking function for equal? is ; ; (lambda (x y) #t) ; This seems silly ; it 's a function of two arguments that ignores both arguments and always returns Since we know ahead of time that the answer is # t , why wo n't it work to have ; equal?'s entry in the a-list be ; ( list ' equal ? equal ? 2 ...
null
https://raw.githubusercontent.com/buntine/Simply-Scheme-Exercises/c6cbf0bd60d6385b506b8df94c348ac5edc7f646/21-example_the-functions-program/21-2.scm
scheme
The domain-checking function for equal? is (lambda (x y) #t) it 's a function of two arguments that ignores both arguments and always equal?'s entry in the a-list be Solution: It must conform to the domain the program expects. The procedure that calls it an error will occur because we've provided the...
returns Since we know ahead of time that the answer is # t , why wo n't it work to have ( list ' equal ? equal ? 2 # t ) expects to see a function with two arguments . If we just return the # t value ,
e9b014185c2ba50760951563233950524bef408d34ce680a131f0b2a5ea1aab9
manuel-serrano/hop
proxy.scm
;*=====================================================================*/ * serrano / prgm / project / hop / hop / hopscript / proxy.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/manuel-serrano/hop/cbb98da5c9ea8e6e3836f0a5908e5bf782419683/hopscript/proxy.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * Reference/Global_Obj...
* serrano / prgm / project / hop / hop / hopscript / proxy.scm * / * Author : * / * Creation : Sun Dec 2 20:51:44 2018 * / * Last change : Mon Feb 7 08:10:11 2022 ( serrano ) * / * Co...
07c9a62aaaa62b65aca6dcfac006d8ba7d985616c0d76be0c8bc93634cbe4580
xguerin/bitstring
BitstringParserTest.ml
* Copyright ( c ) 2016 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE A...
null
https://raw.githubusercontent.com/xguerin/bitstring/f78f8e3c35fab2d0c9e4bcd24f1769af05ab7c28/tests/BitstringParserTest.ml
ocaml
* EXT3 superblock parsing test Blocks count Reserved blocks count Free blocks count Free inodes count Block size Fragment size # Blocks per group # Fragments per group # Inodes per group Mount time Write time Mount count * Otherwise, throw an error * GIF parser test GIF magic. ...
* Copyright ( c ) 2016 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE A...
799c01e07a1814ce7a43ee72c54e9093b9d792028570004c093d94aa69ee08a3
ghc/ghc
Core.hs
( c ) The University of Glasgow 2006 ( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998 (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE DeriveDataTypeable, FlexibleContexts #-} # LANGUAGE NamedFieldPuns # {-# LANGUAGE BangPatterns #-} -...
null
https://raw.githubusercontent.com/ghc/ghc/bb500e2a2d039dc75c8bb80d47ea2349b97fbf1b/compiler/GHC/Core.hs
haskell
# LANGUAGE DeriveDataTypeable, FlexibleContexts # # LANGUAGE BangPatterns # | GHC.Core holds all the main data types for use by for the Glasgow Haskell Compiler midsection * Main data types * In/Out type synonyms ** Simple 'Expr' access functions and predicates * Unfolding data types ** Constructing 'Unfolding's ...
( c ) The University of Glasgow 2006 ( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998 (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} # LANGUAGE NamedFieldPuns # module GHC.Core ( Expr(..), Alt(..), Bind(..), AltCon(..), Arg, CoreP...
a193d772be06d95cb97a038ba47703c452ec74dacb03f394eb936dc46d46c69c
let-def/lrgrep
Fix.ml
(******************************************************************************) (* *) (* Fix *) (* ...
null
https://raw.githubusercontent.com/let-def/lrgrep/29e64174dc9617bcd1871fd2e4fd712269568324/lib/fix/Fix.ml
ocaml
**************************************************************************** Fix ...
, Paris . All rights reserved . This file is distributed under the terms of the GNU Library General Public License version 2 , with a include Sigs Give access to the following modules as submodules . Thus , if the user has declared [ open ...
daca87df6eb7feab8ac7fde31b98f3c756158c7424eeb5e0868877f4be09c57e
typelead/eta
twins.hs
{ - # OPTIONS_GHC -fno - warn - redundant - constraints # - } # LANGUAGE RankNTypes , LiberalTypeSynonyms # -- This test checks that deep skolemisation and deep -- instantiation work right. A buggy prototype of GHC 7.0 , where the type checker generated wrong code , sent applyTypeToArgs into a loop . module Tw...
null
https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/compile/twins.hs
haskell
This test checks that deep skolemisation and deep instantiation work right. A buggy prototype
{ - # OPTIONS_GHC -fno - warn - redundant - constraints # - } # LANGUAGE RankNTypes , LiberalTypeSynonyms # of GHC 7.0 , where the type checker generated wrong code , sent applyTypeToArgs into a loop . module Twins where import Data.Data type GenericQ r = forall a. Data a => a -> r type GenericM m = forall a....
134fa786e511692c74109508f7cf5b0b3a1c842dc29a928ac3a9c566114789f8
snapframework/io-streams
Handle.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} module System.IO.Streams.Tests.Handle (tests) where ------------------------------------------------------------------------------ import Control.Exception import Control.Monad hi...
null
https://raw.githubusercontent.com/snapframework/io-streams/ae692fee732adea9fe843fb3efe0dd43a6993844/test/System/IO/Streams/Tests/Handle.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------...
# LANGUAGE CPP # module System.IO.Streams.Tests.Handle (tests) where import Control.Exception import Control.Monad hiding (mapM) import Data.ByteString.Builder (byteString) import qualified Data.ByteString.Char8 as S import Data.L...
e5ea28bd736b90384fa6ceffc4511880a4d21b2538b66a4c75c71a44070314c1
zaneli/hdbc-clickhouse
InquirySpec.hs
module Database.HDBC.ClickHouse.InquirySpec (spec) where import Database.HDBC (describeTable, getTables, hdbcDriverName) import Database.HDBC.ClickHouse (ping) import Database.HDBC.ClickHouse.TestUtil (connect, executeQuery) import Test.Hspec spec :: Spec spec = do describe "ping" $ it "get pong" $ do con...
null
https://raw.githubusercontent.com/zaneli/hdbc-clickhouse/bf2ea2583ba5de63b943e95f597f17ac336920d8/test/Database/HDBC/ClickHouse/InquirySpec.hs
haskell
module Database.HDBC.ClickHouse.InquirySpec (spec) where import Database.HDBC (describeTable, getTables, hdbcDriverName) import Database.HDBC.ClickHouse (ping) import Database.HDBC.ClickHouse.TestUtil (connect, executeQuery) import Test.Hspec spec :: Spec spec = do describe "ping" $ it "get pong" $ do con...
f04482af93bfca01f74cb473c5be3ed4feaae11e5314cd3c19b458eef9d6cb27
CatalinStefan/Clojure
Destructuring.clj
(ns s04.Destructuring) (defn Destruct [] (def myVect [1 2 3 4]) (let [[a b c] myVect] (println a b c) ) (let [[a b & rest] myVect] (println a b rest)) (def myMap {'name "John" 'lastname "Smith"}) (let [{a 'name b 'lastname} myMap] (println a b)) (let [{a 'name b 'lastname c 'noname} myMap] (println a b...
null
https://raw.githubusercontent.com/CatalinStefan/Clojure/c8a313fffe39ace8f5aae35de435c50f70b57ed9/s04/src/s04/Destructuring.clj
clojure
(ns s04.Destructuring) (defn Destruct [] (def myVect [1 2 3 4]) (let [[a b c] myVect] (println a b c) ) (let [[a b & rest] myVect] (println a b rest)) (def myMap {'name "John" 'lastname "Smith"}) (let [{a 'name b 'lastname} myMap] (println a b)) (let [{a 'name b 'lastname c 'noname} myMap] (println a b...