_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 |
|---|---|---|---|---|---|---|---|---|
94abd028738738f538fed6ac951eb833a62491239da47b8af020e76afde7fae3 | nineties-retro/sps | sps-input-file.scm | ;
;
;
(define sps:input:file::buffer-size 16384)
; SPSINFIL
(define sps:input:file::tag-value #x56512F17)
(define (sps:input:file::tag i)
(sps:word-vector:ref i 0))
(define (sps:input:file::tag! i v)
(sps:word-vector:set! i 0 v))
(define (sps:input:file? i)
(= (sps:input:file... | null | https://raw.githubusercontent.com/nineties-retro/sps/bf15b415f4cdf5d6d69ae2f39c250db2090c0817/sps-input-file.scm | scheme |
SPSINFIL | (define sps:input:file::buffer-size 16384)
(define sps:input:file::tag-value #x56512F17)
(define (sps:input:file::tag i)
(sps:word-vector:ref i 0))
(define (sps:input:file::tag! i v)
(sps:word-vector:set! i 0 v))
(define (sps:input:file? i)
(= (sps:input:file::tag i) sps:input:file::tag-value))
(define (sps:... |
2af7e2eda92e2540b70ac4c7cb466ff54ba53a4f256f881e51df5a6b223a8305 | bsaleil/lc | etape1-sub1.scm | (println (- 7 3))
(println (- -7 3))
(println (- 7 -3))
(println (- -7 -3))
4
;-10
10
;-4
| null | https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/unit-tests/IFT3065/1/etape1-sub1.scm | scheme | -10
-4 | (println (- 7 3))
(println (- -7 3))
(println (- 7 -3))
(println (- -7 -3))
4
10
|
15d21ad71a38a7cfecf455e87633dc737b0a03eb3693edc0831b811ab3ac19cb | re-ops/re-cog | disk.clj | (ns re-cog.resources.disk
"Disk managment resources"
(:require
[clojure.core.strint :refer (<<)]
[re-cog.common.resources :refer (run-)]
[re-cog.common.functions :refer (require-functions)]
[re-cog.common.defs :refer (def-serial)]))
(require-functions)
(def-serial partition-
"Create a single partiti... | null | https://raw.githubusercontent.com/re-ops/re-cog/4b8fa5ab81f51af2f6e41a6f5e2655128b4be5cb/src/re_cog/resources/disk.clj | clojure | (ns re-cog.resources.disk
"Disk managment resources"
(:require
[clojure.core.strint :refer (<<)]
[re-cog.common.resources :refer (run-)]
[re-cog.common.functions :refer (require-functions)]
[re-cog.common.defs :refer (def-serial)]))
(require-functions)
(def-serial partition-
"Create a single partiti... | |
a26cf4a1449edde9aac578dbed99a686eeb1190d5387f60ada1b8590b0afadd9 | jnjcc/cl-qrencode-deprecated | qr-errc-testcase.lisp | Copyright ( C ) 2010 , 2011 johnc < >
;;
;; 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 , or ( at your option )
;; any later version.
;;
;; This program is distributed in ... | null | https://raw.githubusercontent.com/jnjcc/cl-qrencode-deprecated/b31498adf81d771310be871ff6a50bd54f574336/tests/qr-errc-testcase.lisp | lisp |
This program is free software; you can redistribute it and/or modify
either version 2 , or ( 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. Se... | Copyright ( C ) 2010 , 2011 johnc < >
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
This file contains some testcase to Reed - Solomon Error Correction
(in-package #:cl-qrencode)
INPUT : ( coff1 exp1 ) ( coff2 exp2... |
520e424eb57ad5b808b98194678360e6a190e7b696c6754891ebd569eca07d63 | 0xYUANTI/stdlib2 | prelude_tests.erl | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% @doc WRITEME
%%% @end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%_* Module declaration ===============================================
-module(prelude_tests).
%%%_* Exports =====================... | null | https://raw.githubusercontent.com/0xYUANTI/stdlib2/0c334200fd9c7ddd79f6dcc3a63c0aa5de5d3a33/test/prelude_tests.erl | erlang |
@doc WRITEME
@end
_* Module declaration ===============================================
_* Exports ==========================================================
_* Includes =========================================================
_* Tests ============================================================
_* Emacs =========... |
-module(prelude_tests).
-export([
]).
-include_lib("eunit/include/eunit.hrl").
-include_lib("stdlib2/include/prelude.hrl").
erlang - indent - level : 2
|
e67b079a047feb6ed0d9a1e946af21d67ba0ccd4055d95ccc08d5febaa2ec55b | ghc/testsuite | tcfail034.hs |
From : < @ >
To : glasgow - haskell - bugs
Subject : Unfriendly error message
Date : Thu , 25 Jun 1992
Hello again ,
I came across a rather nasty error message when I gave a function an
incorrect type signature ( the context is wrong ) . I can remember reading
in the source about this problem - I ... | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail034.hs | haskell |
From : < @ >
To : glasgow - haskell - bugs
Subject : Unfriendly error message
Date : Thu , 25 Jun 1992
Hello again ,
I came across a rather nasty error message when I gave a function an
incorrect type signature ( the context is wrong ) . I can remember reading
in the source about this problem - I ... | |
df367c273fa4c5e2ef494705c3c702ef4080cda5722177634504e029f0b1a22c | phaazon/luminance | Framebuffer.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE MultiWayIf #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UndecidableInstances #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
-----------------------------------------------------------------------------
-- |
Copyright ... | null | https://raw.githubusercontent.com/phaazon/luminance/88b8f40b8d1ceec1f8fd1a111ccaffec5d9283a8/src/Graphics/Luminance/Core/Framebuffer.hs | haskell | # LANGUAGE MultiWayIf #
---------------------------------------------------------------------------
|
License : BSD3
Stability : experimental
Portability : portable
---------------------------------------------------------------------------
--------------------------------------------------------------------... | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UndecidableInstances #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
Copyright : ( C ) 2015 , 2016
Maintainer : < >
module Graphics.Luminance.Core.Framebuffer where
import Contr... |
a7ed0e7bcec80114914109d0cbde30648da741ed6ee816f517a25e5d9351e522 | scrintal/heroicons-reagent | newspaper.cljs | (ns com.scrintal.heroicons.solid.newspaper)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M4.125 3C3.089 3 2.25 3.84 2.25 4.875V18a3 3 0 003 3h15a3 3 0 01-3-3V4.875C17.25... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/newspaper.cljs | clojure | (ns com.scrintal.heroicons.solid.newspaper)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M4.125 3C3.089 3 2.25 3.84 2.25 4.875V18a3 3 0 003 3h15a3 3 0 01-3-3V4.875C17.25... | |
fdbca980043b3fbb745e846e779339cf6a795f8c58ee189ec1777a8f2781fbd9 | pfdietz/ansi-test | load.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Mon Apr 7 07:16:44 2003
;;;; Contains: Forms to load files containing tests of number concepts
(compile-and-load "ANSI-TESTS:AUX;numbers-aux.lsp")
(compile-and-load "ANSI-TESTS:AUX;random-aux.lsp")
(compile-and-load "ANSI-TESTS:AUX;floor-aux.lsp")
(compile-and-lo... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/numbers/load.lsp | lisp | -*- Mode: Lisp -*-
Contains: Forms to load files containing tests of number concepts
transcendental functions go here | Author :
Created : Mon Apr 7 07:16:44 2003
(compile-and-load "ANSI-TESTS:AUX;numbers-aux.lsp")
(compile-and-load "ANSI-TESTS:AUX;random-aux.lsp")
(compile-and-load "ANSI-TESTS:AUX;floor-aux.lsp")
(compile-and-load "ANSI-TESTS:AUX;ffloor-aux.lsp")
(compile-and-load "ANSI-TESTS:AUX;ceiling-aux.lsp")
(compil... |
e2db926b389f8816b7dd185fde2209d62f061423d0bb43bafae0f88f04486296 | toschoo/mom | Bridge.hs | module Network.Mom.Patterns.Broker.Bridge
where
import Network.Mom.Patterns.Streams.Types
import Network.Mom.Patterns.Streams.Streams
import Network.Mom.Patterns.Broker.Common
import Network.Mom.Patterns.Broker.Client
import Network.Mom.Patterns.Broker.Server... | null | https://raw.githubusercontent.com/toschoo/mom/b58ca23d05c98ab50d9e981bd4ad2cdb76846399/src/patterns/src/Network/Mom/Patterns/Broker/Bridge.hs | haskell | now we forget the client! | module Network.Mom.Patterns.Broker.Bridge
where
import Network.Mom.Patterns.Streams.Types
import Network.Mom.Patterns.Streams.Streams
import Network.Mom.Patterns.Broker.Common
import Network.Mom.Patterns.Broker.Client
import Network.Mom.Patterns.Broker.Server... |
15da8a01a0ade31113b1852f76308bd88d2c03f8fdd5151f4b90335c483221a4 | realworldocaml/book | known_protocol.ml | open! Core
type t =
| Krb
| Krb_test_mode
| Rpc
[@@deriving compare, enumerate, sexp, bin_io]
let magic_word = function
| Krb -> "KRB2"
| Krb_test_mode -> "KBT"
| Rpc -> "RPC"
;;
let magic_number_bin_size = 5
let gen_magic_number word =
String.to_list_rev word
|> List.fold ~init:0 ~f:(fun acc c -> (... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/protocol_version_header/src/known_protocol.ml | ocaml | No duplicate magic numbers
Ensure tests break if the magic numbers are changed | open! Core
type t =
| Krb
| Krb_test_mode
| Rpc
[@@deriving compare, enumerate, sexp, bin_io]
let magic_word = function
| Krb -> "KRB2"
| Krb_test_mode -> "KBT"
| Rpc -> "RPC"
;;
let magic_number_bin_size = 5
let gen_magic_number word =
String.to_list_rev word
|> List.fold ~init:0 ~f:(fun acc c -> (... |
f3377818a451e8e48e83130ece0646c78c9fa230d5f70dff993bd32d2a6a82b2 | grin-compiler/ghc-whole-program-compiler-project | FromStg.hs | # LANGUAGE LambdaCase , TupleSections , StandaloneDeriving , TypeSynonymInstances , FlexibleInstances , RecordWildCards , OverloadedStrings #
module Lambda.Stg.FromStg (codegenLambda, CGStat(..)) where
import Data.List (intercalate, partition)
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map.Stri... | null | https://raw.githubusercontent.com/grin-compiler/ghc-whole-program-compiler-project/88a5d2590ecb5a5367347bdce426f3c850092bec/lambda/src/Lambda/Stg/FromStg.hs | haskell | Lambda
bind chain handling
derive new name related and defined names
data constructors
logging
current module info
name shadowing related
HINT: current scope name
HINT: substitution map for shadowed names, original name -> unique name
HINT: shadowed (original) names defined in the current scope
code name map... | # LANGUAGE LambdaCase , TupleSections , StandaloneDeriving , TypeSynonymInstances , FlexibleInstances , RecordWildCards , OverloadedStrings #
module Lambda.Stg.FromStg (codegenLambda, CGStat(..)) where
import Data.List (intercalate, partition)
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map.Stri... |
fa41a736ef1e3b2a342171ad602716c3e52acce846f55a32436a070c5f0daf99 | borodust/bodge-ui | check-box.lisp | (cl:in-package :bodge-ui)
;;;
;;;
;;;
(defclass check-box (widget)
((label :initarg :label :initform "")
(checked-p :initarg :enabled-p :initform nil :accessor checked)
(click-listener :initarg :on-click :initform nil)))
(defmethod compose ((this check-box))
(with-slots ((this-checked-p checked-p) click-li... | null | https://raw.githubusercontent.com/borodust/bodge-ui/db896ca3be9026444398e0192a48b048aa7db574/src/elements/check-box.lisp | lisp | (cl:in-package :bodge-ui)
(defclass check-box (widget)
((label :initarg :label :initform "")
(checked-p :initarg :enabled-p :initform nil :accessor checked)
(click-listener :initarg :on-click :initform nil)))
(defmethod compose ((this check-box))
(with-slots ((this-checked-p checked-p) click-listener label... | |
ea50e1a216b37ddf9d5a3ec08d8ba07fdd1da3a203d6e81a7ae2ee8e6994e18e | fogus/minderbinder | substance.clj | (ns minderbinder.substance
(:require [minderbinder.core :refer (defunits-of)]))
(defunits-of substance :mol
""
;; The amount of substance of a system which contains as many
elementary entities as there are atoms in 0.012 kg of
carbon 12 . The elementary entities must be specified and
;; may be atoms, mol... | null | https://raw.githubusercontent.com/fogus/minderbinder/35b10b279b241fbeab38f63af568e6302f40930a/src/minderbinder/substance.clj | clojure | The amount of substance of a system which contains as many
may be atoms, molecules, ions, electrons, or other
particles or groups of particles. It is understood that
state, are referred to. | (ns minderbinder.substance
(:require [minderbinder.core :refer (defunits-of)]))
(defunits-of substance :mol
""
elementary entities as there are atoms in 0.012 kg of
carbon 12 . The elementary entities must be specified and
unbound atoms of carbon 12 , at rest and in the ground
:mol #{:mole}) |
7995507ef09ff9c83f7e8da5eb8a97d2790d54b61afab783b3194b0179ecfd7c | zcaudate/hara | system_classloader.clj | (ns hara.module.classloader.system-classloader
(:require [hara.string :as string]
[hara.data.base.seq :as seq]
[hara.module.classloader.common :as common]
[hara.protocol.classloader :as protocol.classloader]
[hara.object.query :as reflect])
(:import (clojure.lang RT)
... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/module/classloader/system_classloader.clj | clojure | util.ArrayList
util.ArrayList
find entry in paths
find entry in stack and delete it
find loader in lookup
remove entries from loader and stack | (ns hara.module.classloader.system-classloader
(:require [hara.string :as string]
[hara.data.base.seq :as seq]
[hara.module.classloader.common :as common]
[hara.protocol.classloader :as protocol.classloader]
[hara.object.query :as reflect])
(:import (clojure.lang RT)
... |
5f955859e4e546f44e4288884e8273a1f8b5054b2a3a48176d6352fba30225a3 | martijnbastiaan/doctest-parallel | Foo.hs | module It.Foo where
-- |
--
-- >>> :t 'a'
' a ' : :
--
-- >>> "foo"
-- "foo"
--
-- >>> length it
3
--
-- >>> it * it
9
--
-- >>> :t it
-- it :: Int
--
foo = undefined
| null | https://raw.githubusercontent.com/martijnbastiaan/doctest-parallel/f70d6a1c946cc0ada88571b90a39a7cd4d065452/test/integration/It/Foo.hs | haskell | |
>>> :t 'a'
>>> "foo"
"foo"
>>> length it
>>> it * it
>>> :t it
it :: Int
| module It.Foo where
' a ' : :
3
9
foo = undefined
|
b065f6c2719291e14368f676ec6edb291e12fe4614bab429e651276e2e75036f | everpeace/programming-erlang-code | lib_trigrams.erl |
-module(lib_trigrams).
-export([for_each_trigram_in_the_english_language/2,
make_tables/0, timer_tests/0,
open/0, close/1, is_word/2,
how_many_trigrams/0,
make_ets_set/0, make_ets_ordered_set/0, make_mod_set/0,
lookup_all_ets/2, lookup_all_set/2
]).
-import(lists, [reverse/1]).
make_tables() ->
{Mic... | null | https://raw.githubusercontent.com/everpeace/programming-erlang-code/8ef31aa13d15b41754dda225c50284915c29cb48/code/lib_trigrams.erl | erlang | An iterator that iterates through all trigrams in the language
scan the word looking for \r\n
has to be reversed when we find \r\n or run out of characters
access routines
open() -> Table
close(Table)
is_word(Table, String) -> Bool |
-module(lib_trigrams).
-export([for_each_trigram_in_the_english_language/2,
make_tables/0, timer_tests/0,
open/0, close/1, is_word/2,
how_many_trigrams/0,
make_ets_set/0, make_ets_ordered_set/0, make_mod_set/0,
lookup_all_ets/2, lookup_all_set/2
]).
-import(lists, [reverse/1]).
make_tables() ->
{Mic... |
dc83409f7438d583c1e8cda88625a3a73dba09545ac21f01182bd920a3602b9d | VisionsGlobalEmpowerment/webchange | wrapper.cljs | (ns webchange.interpreter.renderer.scene.components.image.wrapper
(:require
[webchange.interpreter.renderer.scene.components.image.utils :as image-utils]
[webchange.interpreter.renderer.scene.components.utils :as utils]
[webchange.interpreter.renderer.scene.components.wrapper :refer [create-wrapper]]
... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/146f820376d8effd56ac95f50b90d6bc5f5a3b1f/src/cljs/webchange/interpreter/renderer/scene/components/image/wrapper.cljs | clojure | (ns webchange.interpreter.renderer.scene.components.image.wrapper
(:require
[webchange.interpreter.renderer.scene.components.image.utils :as image-utils]
[webchange.interpreter.renderer.scene.components.utils :as utils]
[webchange.interpreter.renderer.scene.components.wrapper :refer [create-wrapper]]
... | |
fb8cb849d20fe41962af9f8aff652aac552da22a3b15f3324614ad3143694771 | REPROSEC/dolev-yao-star | Vale_Interop_Views.ml | open Prims
let (get8_def :
(FStar_UInt8.t, unit) FStar_Seq_Properties.lseq -> FStar_UInt8.t) =
fun s -> FStar_Seq_Base.index s Prims.int_zero
let (get8 : (FStar_UInt8.t, unit) FStar_Seq_Properties.lseq -> FStar_UInt8.t)
= Vale_Def_Opaque_s.opaque_make get8_def
let (up_view8 : (FStar_UInt8.t, FStar_UInt8.t) L... | null | https://raw.githubusercontent.com/REPROSEC/dolev-yao-star/d97a8dd4d07f2322437f186e4db6a1f4d5ee9230/concrete/hacl-star-snapshot/ml/Vale_Interop_Views.ml | ocaml | open Prims
let (get8_def :
(FStar_UInt8.t, unit) FStar_Seq_Properties.lseq -> FStar_UInt8.t) =
fun s -> FStar_Seq_Base.index s Prims.int_zero
let (get8 : (FStar_UInt8.t, unit) FStar_Seq_Properties.lseq -> FStar_UInt8.t)
= Vale_Def_Opaque_s.opaque_make get8_def
let (up_view8 : (FStar_UInt8.t, FStar_UInt8.t) L... | |
f9c964d4a48850bfb66f80cac7cbc08be0a9a37a37d3c3b22f2a3bf5b09b9393 | fortytools/holumbus | SmallDocuments.hs | # LANGUAGE BangPatterns , FlexibleInstances , MultiParamTypeClasses #
-- ----------------------------------------------------------------------------
|
Module : Holumbus . Index . SmallDocuments
Copyright : Copyright ( C ) 2008 ,
License : MIT
Maintainer : ( )
Stability :... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/searchengine/source/Holumbus/Index/SmallDocuments.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
* Documents type
* Construction
| The table which is used to map a document to an artificial id and vice versa.
^ A mapping from a document id to the document i... | # LANGUAGE BangPatterns , FlexibleInstances , MultiParamTypeClasses #
|
Module : Holumbus . Index . SmallDocuments
Copyright : Copyright ( C ) 2008 ,
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
A bijective ... |
d1b220c1888eb26a50cce17e8882ed40970e5aa21eb7dc1761a803147d031c13 | deepfire/holotype | Cairostress.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UnicodeSyntax #
import Control.Monad (forever)
import qualified Foreign as F
import qualified Foreign.ForeignPtr.Unsafe as F
import qualified Foreign.Concurrent ... | null | https://raw.githubusercontent.com/deepfire/holotype/d33052f588b74616560b81616ffc4a0142f8a617/tests/Cairostress.hs | haskell | # LANGUAGE OverloadedStrings #
|
Create a new 'GI.Pango.Objects.Layout.Layout' object with attributes initialized to
default values for a particular 'GI.Pango.Objects.Context.Context'.
^ /@context@/: a 'GI.Pango.Objects.Context.Context'
full = do
grccfptr ∷ F.ForeignPtr GRC.Cairo
← F.new... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE UnicodeSyntax #
import Control.Monad (forever)
import qualified Foreign as F
import qualified Foreign.ForeignPtr.Unsafe as F
import qualified Foreign.Concurrent as FC
import qualified Syst... |
8ba372b853f9a7b4f99eeae07f0a2ad96c7db6160af9fd9e76b3addd53e394e9 | fredrick/melee | consensus_test.clj | (ns melee.consensus-test
(:use [clojure.java.io :only [file]]
[melee.core]
[melee.consensus]
[melee.log]
[melee.journal]
[midje.sweet]))
(facts "Raft consensus"
(let [id (uuid)
journal (journal (file "test"))
node1 (state id :follower 0 nil [] journal 0 0)
... | null | https://raw.githubusercontent.com/fredrick/melee/8010f1e3bc09f24a30f39a8c50bff622be27d005/test/melee/consensus_test.clj | clojure | (ns melee.consensus-test
(:use [clojure.java.io :only [file]]
[melee.core]
[melee.consensus]
[melee.log]
[melee.journal]
[midje.sweet]))
(facts "Raft consensus"
(let [id (uuid)
journal (journal (file "test"))
node1 (state id :follower 0 nil [] journal 0 0)
... | |
3feedc4e05092b06e81483a266bc977d191c7c7f4833214a0172e2eff7d2d6bd | OCamlPro/typerex-lint | parsetree_map.mli | (**************************************************************************)
(* *)
(* OCamlPro Typerex *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/libs/ocplib-compiler/parsetree_map.mli | ocaml | ************************************************************************
OCamlPro Typerex
This file is distributed ... | Copyright OCamlPro 2011 - 2016 . All rights reserved .
( GNU General Public Licence version 3.0 ) .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE... |
7a47660d41e797f9a2306ec8140a4552fa9afe7e290e924d96fcd5c20a544757 | gregnwosu/haskellbook | Spec.hs | module Spec where
import Test.QuickCheck
import Test.Hspec
import ChapterExercises
import Data.Char
import Text.Parser.Combinators
import Control.Applicative
import Text.RawString.QQ
import qualified Text.Trifecta as T
import Data.Time.Format
import Data.Time
import Data.Time.LocalTime
import Data.Fixed
import Test.... | null | https://raw.githubusercontent.com/gregnwosu/haskellbook/b21fb6772e58f07cff334d9c551d0477ec856897/chapter24/test/Spec.hs | haskell | module Spec where
import Test.QuickCheck
import Test.Hspec
import ChapterExercises
import Data.Char
import Text.Parser.Combinators
import Control.Applicative
import Text.RawString.QQ
import qualified Text.Trifecta as T
import Data.Time.Format
import Data.Time
import Data.Time.LocalTime
import Data.Fixed
import Test.... | |
c1d1ddd05160ef23bba28ce69a24b8d91248913f318c44fa46110b9d4e45540c | tmattio/js-bindings | querystring.mli | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem
[@@@ocaml.warning "-7-11-32-33-39"]
]
open Ts2ocaml_baselib
(*
unknown identifiers:
- NodeJS.Dict<T1>
*)
[@@@js.stop]
module type Missing = sig
module NodeJS : sig
module Dict : sig
type 'T1 t_1
val t_1_to_js: ('T1 -> Ojs.t) -> 'T1 t_1 -> Ojs.... | null | https://raw.githubusercontent.com/tmattio/js-bindings/fe1d40a5b8cae157af85fa84ca482fb6b0ddf1e0/lib/node/_gen/querystring.mli | ocaml |
unknown identifiers:
- NodeJS.Dict<T1>
export * from 'querystring'; | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem
[@@@ocaml.warning "-7-11-32-33-39"]
]
open Ts2ocaml_baselib
[@@@js.stop]
module type Missing = sig
module NodeJS : sig
module Dict : sig
type 'T1 t_1
val t_1_to_js: ('T1 -> Ojs.t) -> 'T1 t_1 -> Ojs.t
val t_1_of_js: (Ojs.t -> 'T1) -> Ojs.t -> '... |
f0c298da022e18ee2b69488d168af039b037bb04af10e5ef2ecfcd24078ff303 | GriffinScribe-LLC/clojure-aes | inverse_mix_columns.clj | (ns clojure-aes.decrypt.inverse-mix-columns
(:require [clojure-aes.constants :as c]
[clojure-aes.shared :as shared]
[clojure-aes.utils :as utils]))
(defn inv-mixColumns
"This transformation is the inverse of mixColumns. (see Section 5.3.3) of FIPS 197"
[state round-num]
(let [state-tran... | null | https://raw.githubusercontent.com/GriffinScribe-LLC/clojure-aes/cf9643503a89abea5b0243877c905889f9136219/src/clojure_aes/decrypt/inverse_mix_columns.clj | clojure | (ns clojure-aes.decrypt.inverse-mix-columns
(:require [clojure-aes.constants :as c]
[clojure-aes.shared :as shared]
[clojure-aes.utils :as utils]))
(defn inv-mixColumns
"This transformation is the inverse of mixColumns. (see Section 5.3.3) of FIPS 197"
[state round-num]
(let [state-tran... | |
6810e756ea71a9e2383ebc1f3422de10852b82ecda9c7284a178fb0419c322da | monadbobo/ocaml-core | conv_error.ml | Conv_error : Module for Handling Errors during Automated S - expression
Conversions
Conversions *)
open Printf
open Conv
(* Errors concerning tuples *)
let tuple_of_size_n_expected loc n sexp =
of_sexp_error (sprintf "%s_of_sexp: tuple of size %d expected" loc n) sexp
(* Errors concerning sum types *)
... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/sexplib/lib/conv_error.ml | ocaml | Errors concerning tuples
Errors concerning sum types
Errors concerning records
Errors concerning polymorphic variants | Conv_error : Module for Handling Errors during Automated S - expression
Conversions
Conversions *)
open Printf
open Conv
let tuple_of_size_n_expected loc n sexp =
of_sexp_error (sprintf "%s_of_sexp: tuple of size %d expected" loc n) sexp
let stag_no_args loc sexp =
of_sexp_error (loc ^ "_of_sexp: su... |
0bb632b33773068cbb6d3993b9d345ef0c65e51cdd384b11d8613a662f6554fd | mirage/qubes-mirage-firewall | firewall.ml | Copyright ( C ) 2015 , < >
See the README file for details .
See the README file for details. *)
open Packet
open Lwt.Infix
let src = Logs.Src.create "firewall" ~doc:"Packet handler"
module Log = (val Logs.src_log src : Logs.LOG)
Transmission
let transmit_ipv4 packet iface =
Lwt.catch
(fun () -... | null | https://raw.githubusercontent.com/mirage/qubes-mirage-firewall/065c8bb69a0bc1d77c07a99ab276782fc4264bae/firewall.ml | ocaml | Some existing connection or redirect | Copyright ( C ) 2015 , < >
See the README file for details .
See the README file for details. *)
open Packet
open Lwt.Infix
let src = Logs.Src.create "firewall" ~doc:"Packet handler"
module Log = (val Logs.src_log src : Logs.LOG)
Transmission
let transmit_ipv4 packet iface =
Lwt.catch
(fun () -... |
4f19a43dc2ee1bfcdc8ecd64eb15245f5910fb3e7ae1af4af5aa5a5e9ca5d511 | gahag/FSQL | Version.hs | FSQL : Version.hs -- Version info
-
- Copyright ( C ) 2015 gahag
- All rights reserved .
-
- This software may be modified and distributed under the terms
- of the BSD license . See the LICENSE file for details .
-
- Copyright (C) 2015 gahag
- All rights reserved.
-
- This software may be mo... | null | https://raw.githubusercontent.com/gahag/FSQL/5c68cb8af68e7e66876bc2b937b91ddb363b2db7/src/Version.hs | haskell | Version info | -
- Copyright ( C ) 2015 gahag
- All rights reserved .
-
- This software may be modified and distributed under the terms
- of the BSD license . See the LICENSE file for details .
-
- Copyright (C) 2015 gahag
- All rights reserved.
-
- This software may be modified and distributed under the term... |
bca8574e6c664f5e9b219c0ab9f06fab33472ffba642f8c0b0ea301c920968fc | tweag/funflow2 | Run.hs | {-# LANGUAGE Arrows #-}
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedLabels #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ... | null | https://raw.githubusercontent.com/tweag/funflow2/3f8e9c3bccaabc80f5726bd3c1d01d7870894ef4/funflow/src/Funflow/Run.hs | haskell | # LANGUAGE Arrows #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| This module defines how to run your flows
* Flow execution
| Flow execution configuration
Optional config file for configuring task arguments
| Run a flow, parsing any required `Configurable` values from their respectiv... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedLabels #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
module Funflow.Run
( runFlow... |
3a989d63a223035f19df64c2b54d783c58701bd70c889247cfd26f1248b649e5 | HaskellZhangSong/Introduction_to_Haskell_2ed_source | Rome.hs | -- Rome.hs
romeNotation :: [String]
romeNotation= ["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]
romeAmount :: [Int]
romeAmount = [1000,900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]
pair :: [(Int, String)]
pair = zip romeAmount romeNotation
subtrahend :: Int -> (Int, String)
subtrahend n =... | null | https://raw.githubusercontent.com/HaskellZhangSong/Introduction_to_Haskell_2ed_source/140c50fdccfe608fe499ecf2d8a3732f531173f5/C05/Rome.hs | haskell | Rome.hs
| romeNotation :: [String]
romeNotation= ["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]
romeAmount :: [Int]
romeAmount = [1000,900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]
pair :: [(Int, String)]
pair = zip romeAmount romeNotation
subtrahend :: Int -> (Int, String)
subtrahend n = head (dropW... |
e23eaab5e137e251f854045833609f3779aecb78be33e03c48e4744a8b12aa49 | scmlab/gcl | Abstract.hs | module Syntax.Abstract
( module Syntax.Abstract.Types,
)
where
import Syntax.Abstract.Types
import Syntax.Abstract.Instances.Located ()
import Syntax.Abstract.Instances.Json ()
| null | https://raw.githubusercontent.com/scmlab/gcl/ca72db6ad62fb1feaa53ef32dded5a5ed0d251f1/src/Syntax/Abstract.hs | haskell | module Syntax.Abstract
( module Syntax.Abstract.Types,
)
where
import Syntax.Abstract.Types
import Syntax.Abstract.Instances.Located ()
import Syntax.Abstract.Instances.Json ()
| |
4bf7cf75d0733cd117504868405174edf14b7ea1a71020def348647fb19d7880 | nd/bird | 3.4.3.hs | -- (floor (floor x)) == (floor x)
--
-- it is the case if x is integer, because for integer (floor x) == x
--
but sinse ( floor x ) gives us integer ( floor ( floor x ) ) = = ( floor x ) also for all real numbers | null | https://raw.githubusercontent.com/nd/bird/06dba97af7cfb11f558eaeb31a75bd04cacf7201/ch03/3.4.3.hs | haskell | (floor (floor x)) == (floor x)
it is the case if x is integer, because for integer (floor x) == x
| but sinse ( floor x ) gives us integer ( floor ( floor x ) ) = = ( floor x ) also for all real numbers |
c7d78dfd1e36d367f9bec9a05c249909f15f7d9682c6a33280f2dd7355d2e00c | mstksg/advent-of-code-2022 | Day01.hs | -- |
-- Module : AOC.Challenge.Day01
-- License : BSD3
--
-- Stability : experimental
-- Portability : non-portable
--
Day 1 . See " AOC.Solver " for the types used in this module !
module AOC.Challenge.Day01
( day01a
, day01b
)
where
import AOC.Solver ((:~>) (..))
import Data.List (sort)
import D... | null | https://raw.githubusercontent.com/mstksg/advent-of-code-2022/de9ceee002d3a62746468492c746b8d7ca3fc8a0/src/AOC/Challenge/Day01.hs | haskell | |
Module : AOC.Challenge.Day01
License : BSD3
Stability : experimental
Portability : non-portable
| Day 1 . See " AOC.Solver " for the types used in this module !
module AOC.Challenge.Day01
( day01a
, day01b
)
where
import AOC.Solver ((:~>) (..))
import Data.List (sort)
import Data.List.Split (splitOn)
import Safe.Exact (takeExactMay)
import Safe.Foldable (maximumMay)
import Text.Read (readMaybe)
day01a :... |
1b0acedfaa9abe3505a85ee241626a0bb3a8570be662930a866618fe6b4b5558 | RichiH/git-annex | Env.hs | Adjusting the environment while running git commands .
-
- Copyright 2014 - 2016 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2014-2016 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Git.Env where
import Common
import Git... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Git/Env.hs | haskell | Copies the current environment, so it can be adjusted when running a git
- command.
Use with any action that makes a commit to set metadata. | Adjusting the environment while running git commands .
-
- Copyright 2014 - 2016 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2014-2016 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Git.Env where
import Common
import Git... |
4f92247f33ad3fe02f14b34fe064147f65bff046a0616f9b0a0b4199ee221b35 | sweirich/trellys | Main.hs | {-# LANGUAGE RankNTypes #-}
module Main where
To hide the 3.1.1 version of parsec , type at the prompt
ghc - pkg hide parsec-3.1.1
import qualified Control.Exception as Ex
import Control.Monad(foldM,when)
import Data.IORef(IORef)
import System.IO(hFlush,stdout)
import Text.PrettyPrint.HughesPJ(Doc,text,int,(<>... | null | https://raw.githubusercontent.com/sweirich/trellys/63ea89d8fa09929c23504665c55a3d909fe047c5/nax/src/Main.hs | haskell | # LANGUAGE RankNTypes #
-----------------------------------------------------------------------
| Fold 'checkEval' over decls, updating env.
Returns most recent env on exception.
---------------------------------------------
control the printing environment
---------------------------------------------
------------... |
module Main where
To hide the 3.1.1 version of parsec , type at the prompt
ghc - pkg hide parsec-3.1.1
import qualified Control.Exception as Ex
import Control.Monad(foldM,when)
import Data.IORef(IORef)
import System.IO(hFlush,stdout)
import Text.PrettyPrint.HughesPJ(Doc,text,int,(<>),(<+>),($$),($+$)
... |
f79d0c0e7e6e768c4a1aaa610d7d046db09e215024288def423c9bc568d11ec5 | murtaza52/almonds | elastic_ip.clj | (ns almonds.resources.elastic-ip
(:require [amazonica.aws.ec2 :as aws-ec2]
[almonds.utils :refer :all]
[almonds.contract :refer :all]
[almonds.api :refer :all]
[almonds.api-utils :refer :all]
[almonds.state :refer :all]))
(defmethod validate :elastic-ip [m]... | null | https://raw.githubusercontent.com/murtaza52/almonds/f7c5879833316ce395788bcf304eedab8315f0e5/src/almonds/resources/elastic_ip.clj | clojure | create a new address
put in the address when it is created
associate an address
adding the almonds-type here as it is not supported by aws
needed for preparing the almonds-tags
restoring the instance-id which will be now replaced during sanitize | (ns almonds.resources.elastic-ip
(:require [amazonica.aws.ec2 :as aws-ec2]
[almonds.utils :refer :all]
[almonds.contract :refer :all]
[almonds.api :refer :all]
[almonds.api-utils :refer :all]
[almonds.state :refer :all]))
(defmethod validate :elastic-ip [m]... |
4b73ca78ac6c13acb230edb9f16b689bb5b6b52f73487ab74f7c407e47d4df42 | stassats/storage | io-sbcl.lisp | ;;; -*- Mode: Lisp -*-
;;; This software is in the public domain and is
;;; provided with absolutely no warranty.
(in-package #:storage)
(defconstant +buffer-size+ 8192)
(deftype buffer-length ()
'(integer 0 #.(* +buffer-size+ 2)))
(deftype word () 'sb-vm:word)
(declaim (ftype (function * (values t &optional))
... | null | https://raw.githubusercontent.com/stassats/storage/6e6865333e029ce9782afd8381f30fda026d1498/io-sbcl.lisp | lisp | -*- Mode: Lisp -*-
This software is in the public domain and is
provided with absolutely no warranty.
sap wrappers
alignment
|
(in-package #:storage)
(defconstant +buffer-size+ 8192)
(deftype buffer-length ()
'(integer 0 #.(* +buffer-size+ 2)))
(deftype word () 'sb-vm:word)
(declaim (ftype (function * (values t &optional))
fill-input-buffer refill-input-buffer
flush-output-buffer))
(defmacro define-sap... |
7772429a73a14399a2ae7fdd8405b8f935a74dd9b970fb4afc952b5f6ae9731a | liquidz/misaki | config.clj | (ns misaki.config
"Configuration Manager"
(:require
[misaki.util [file :refer :all]
[string :refer :all]
[sequence :refer :all]]
[clj-time.core :refer [date-time year month day]]
[text-decoration.core :refer [cyan red bold]]
[clojure.string :as... | null | https://raw.githubusercontent.com/liquidz/misaki/b8104e632058e3b3da4487513d10e666e5914ec9/src/misaki/config.clj | clojure | =read-config
=load-compiler-publics
=make-basic-config-map
=with-config
=config-file?
=post-file?
=index-file?
=get-date-from-file
last = filename
=remove-date-from-name
=sort-type->sort-fn
default
=get-index-filename
=make-post-output-filename
=make-regular-output-filename
=make-index-output-filename
... | (ns misaki.config
"Configuration Manager"
(:require
[misaki.util [file :refer :all]
[string :refer :all]
[sequence :refer :all]]
[clj-time.core :refer [date-time year month day]]
[text-decoration.core :refer [cyan red bold]]
[clojure.string :as... |
b4bf56f04289fc8356f1ffdf60e45daed7fc741950aa96fd80a5779e10f937be | antono/guix-debian | download.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 , 2014 < >
Copyright © 2013 , 2014 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU 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 Sof... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/guix/download.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2013 , 2014 < >
Copyright © 2013 , 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix download)
#:use-module (ice-9 match)
#:use... |
a42c8306f273cad9b085cdf0ba09caa044d125b2c0a05412403fe00873b20bd7 | picty/parsifal | tls.ml | open BasePTypes
open Parsifal
open PTypes
open TlsEnums
(* Suite description *)
let ciphersuite_descriptions = Hashtbl.create 300
let find_csdescr cs =
try Hashtbl.find ciphersuite_descriptions cs
with Not_found -> {
suite_name = cs;
kx = KX_Unknown; au = AU_Unknown;
enc = ENC_Unknown; mac = MAC_Unk... | null | https://raw.githubusercontent.com/picty/parsifal/767a1d558ea6da23ada46d8d96a057514b0aa2a8/ssl/tls.ml | ocaml | Suite description
Simple TLS records
Handshake extensions records and choices
Explicit ("name_type")
RFC 6066 states this for backward compatibility
TODO: Implement the commented extensions
| HE_UserMapping -> UserMapping of ?
| HE_ServerAuthz -> ServerAuthz of ?
| HE_CertType -> CertType of ?
| HE_S... | open BasePTypes
open Parsifal
open PTypes
open TlsEnums
let ciphersuite_descriptions = Hashtbl.create 300
let find_csdescr cs =
try Hashtbl.find ciphersuite_descriptions cs
with Not_found -> {
suite_name = cs;
kx = KX_Unknown; au = AU_Unknown;
enc = ENC_Unknown; mac = MAC_Unknown;
prf = PRF_Unkn... |
8b8579f9ba7fe9c630b27ffde34c039013f0cbff4a292971495090b3b5816446 | sealchain-project/sealchain | Full.hs | {-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
module Pos.Logic.Full
( LogicWorkMode
, logicFull
) where
import Universum hiding (id)
import Control.Lens (at, to)
import Data.Conduit (ConduitT)
import qualified Data.HashMap.Strict as HM
import ... | null | https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/lib/src/Pos/Logic/Full.hs | haskell | # LANGUAGE RecordWildCards #
The full logic layer uses existing pieces from the former monolithic
approach, in which there was no distinction between networking and
blockchain logic (any piece could use the network via some class constraint
on the monad). The class-based approach is not problematic for
integra... | # LANGUAGE ScopedTypeVariables #
module Pos.Logic.Full
( LogicWorkMode
, logicFull
) where
import Universum hiding (id)
import Control.Lens (at, to)
import Data.Conduit (ConduitT)
import qualified Data.HashMap.Strict as HM
import Data.Tagged (Tagged (..), tagWith)
... |
c3a9d2a82f9ce64f21705e80f42e3a1aa7dc86071eda9fa61928fcfc79bca484 | AndrasKovacs/setoidtt | EvalCxt.hs |
module EvalCxt
(eval, force, quote, Eval.forceU, Eval.vProj1, Eval.vProj2, Eval.vApp, vEq,
Eval.vAppSE, Eval.vAppSI, Eval.vAppPE, Eval.vAppPI)
where
import Lens.Micro.Platform
import Types
import qualified Evaluation as Eval
eval :: Dbg => Cxt -> Tm -> Val
eval cxt = Eval.eval (cxt^.vals) (cxt^.len)
# inline... | null | https://raw.githubusercontent.com/AndrasKovacs/setoidtt/621aef2c4ae5a6acb418fa1153575b21e2dc48d2/proto/EvalCxt.hs | haskell | # inline quote # |
module EvalCxt
(eval, force, quote, Eval.forceU, Eval.vProj1, Eval.vProj2, Eval.vApp, vEq,
Eval.vAppSE, Eval.vAppSI, Eval.vAppPE, Eval.vAppPI)
where
import Lens.Micro.Platform
import Types
import qualified Evaluation as Eval
eval :: Dbg => Cxt -> Tm -> Val
eval cxt = Eval.eval (cxt^.vals) (cxt^.len)
# inline... |
79f89fe477e96c25ff6810870a478f502a20e74c410812523eb9329fb2f829af | elastic/stream2es | stacktrace.clj | (ns stream2es.util.stacktrace)
(defn nice-element [elem]
(let [[_ package file line]
(re-find #"([^(]+)\(([^:]+):([0-9]+)\)" (str elem))]
(format "%7s %-20s %s" line file package)))
(defn stacktrace [throwable]
(with-out-str
(let [st (.getStackTrace throwable)]
(doseq [elem st]
(prin... | null | https://raw.githubusercontent.com/elastic/stream2es/275f67a6f61762212f0ee38a25f6c64b300c1599/src/stream2es/util/stacktrace.clj | clojure | (ns stream2es.util.stacktrace)
(defn nice-element [elem]
(let [[_ package file line]
(re-find #"([^(]+)\(([^:]+):([0-9]+)\)" (str elem))]
(format "%7s %-20s %s" line file package)))
(defn stacktrace [throwable]
(with-out-str
(let [st (.getStackTrace throwable)]
(doseq [elem st]
(prin... | |
868099437bb35b342977accdd6cc8190efec37f3dde0c97ed0a50a3ac364a983 | karamellpelle/grid | World.hs | grid is a game written in Haskell
Copyright ( C ) 2018
--
-- This file is part of grid.
--
-- grid 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 optio... | null | https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/Game/World.hs | haskell |
This file is part of grid.
grid is free software: you can redistribute it and/or modify
(at your option) any later version.
grid 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
GN... | grid is a game written in Haskell
Copyright ( C ) 2018
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
# LANGUAGE MultiParamTypeClasses , FunctionalDepend... |
5525062c90a7493f85718b3ca1681832f9181691fc0249d688e672b3c26db9ce | Incanus3/ExiL | impl-util.lisp | ;;;; impl-util.lisp
(in-package #:ql-impl-util)
(definterface call-with-quiet-compilation (fun)
(:documentation
"Call FUN with warnings, style-warnings, and other verbose messages
suppressed.")
(:implementation t
(let ((*load-verbose* nil)
(*compile-verbose* nil)
(*load-print* nil)
... | null | https://raw.githubusercontent.com/Incanus3/ExiL/de0f7c37538cecb7032cc1f2aa070524b0bc048d/src/dependencies/quicklisp/impl-util.lisp | lisp | impl-util.lisp
probe-file is specified to return the truename of the path,
truenamize it .
The init-file is somewhere outside of the home directory
Directory write date
Deleting a directory tree
|
(in-package #:ql-impl-util)
(definterface call-with-quiet-compilation (fun)
(:documentation
"Call FUN with warnings, style-warnings, and other verbose messages
suppressed.")
(:implementation t
(let ((*load-verbose* nil)
(*compile-verbose* nil)
(*load-print* nil)
(*compile-p... |
b91e81124c0719377a13eec51faa8901da8a02ec808a9fd3496f74b075fa5af9 | ocamllabs/ocaml-modular-implicits | ident.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/typing/ident.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
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 .
type t = { stamp: int; name: string; m... |
e92c44052789d0fd3aaf4d64d1da8c06e83972389c08f9dd3830451b66b8e43d | uhc/uhc | General.hs | {-# OPTIONS -fglasgow-exts -fallow-undecidable-instances #-}
-----------------------------------------------------------------------------
-- | License : GPL
--
-- Maintainer :
-- Stability : provisional
-- Portability : non-portable (requires extensions)
-----------------------------------------... | null | https://raw.githubusercontent.com/uhc/uhc/8eb6914df3ba2ba43916a1a4956c6f25aa0e07c5/EHC/src/top/Implementation/General.hs | haskell | # OPTIONS -fglasgow-exts -fallow-undecidable-instances #
---------------------------------------------------------------------------
| License : GPL
Maintainer :
Stability : provisional
Portability : non-portable (requires extensions)
---------------------------------------------------------... |
module Top.Implementation.General
( module Top.Implementation.General
, module Top.Util.Empty
) where
import Top.Util.Embedding
import Top.Util.Empty
import Top.Monad.Select
class (Show s, Empty s) => SolveState s where
showState :: s -> String
stateName :: s -> String
stateOptions :: s -... |
9c2b710d2931732cfe56520db21ee7726695ecd3443b58448a842884e3e13697 | agda/agda | Base.hs | # OPTIONS_GHC -fno - cse #
# OPTIONS_GHC -fno - warn - orphans #
module Agda.Interaction.Base where
import Control.Concurrent.STM.TChan
import Control.Concurrent.STM.TVar
import Control.Monad ( mplus, liftM2, liftM4 )
import Control.Monad.Except
import ... | null | https://raw.githubusercontent.com/agda/agda/c859b5e8737a006b559723a1048bba10806bda2d/src/full/Agda/Interaction/Base.hs | haskell | # SOURCE #
----------------------------------------------------------------------
| Auxiliary state of an interactive computation.
^ The interaction points of the buffer, in the order in which
they appear in the buffer. The interaction points are
recorded in 'theTCState', but when new interaction points are
... | # OPTIONS_GHC -fno - cse #
# OPTIONS_GHC -fno - warn - orphans #
module Agda.Interaction.Base where
import Control.Concurrent.STM.TChan
import Control.Concurrent.STM.TVar
import Control.Monad ( mplus, liftM2, liftM4 )
import Control.Monad.Except
import ... |
b9fc22b2074162901abb555fea292140c46c74f44f78d4632f472e5761608061 | joshaber/clojurem | core.clj | Copyright ( c ) . 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 bound by
; ... | null | https://raw.githubusercontent.com/joshaber/clojurem/cf60fc6a8ef0e9065a1219c33ca39176ee88c2de/src/clj/cljm/core.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 ) . All rights reserved .
(ns cljm.core
(:refer-clojure :exclude [-> ->> .. amap and areduce alength aclone assert binding bound-fn case comment cond condp
declare definline definterface defmethod defmulti defn defn- defonce
defprotocol defr... |
09fce0f3cce81264b722eaae0516d18a8f5eefb9b0ea63f84b7e63569b0a3ba3 | hhucn/decide3 | participant_list.cljs | (ns decide.ui.process.moderator.participant-list
(:require
[com.fulcrologic.fulcro-i18n.i18n :as i18n]
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.fulcro.data-fetch :as df]
[com.fulcrologic.fulcro.dom :as dom]
[com.fulcrologic.fulcro.mutations :as m :refer [defmuta... | null | https://raw.githubusercontent.com/hhucn/decide3/5867db2647db28ebfca05fe45c41c0c634c7bab6/src/main/decide/ui/process/moderator/participant_list.cljs | clojure | :clearOnEscape true
js->clj seems to break things.. | (ns decide.ui.process.moderator.participant-list
(:require
[com.fulcrologic.fulcro-i18n.i18n :as i18n]
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.fulcro.data-fetch :as df]
[com.fulcrologic.fulcro.dom :as dom]
[com.fulcrologic.fulcro.mutations :as m :refer [defmuta... |
9dac2c0cc2b7a20ed1ff192aa8544c1ba89151d32967003f98c6192a3012aea9 | tamarit/pn_suite | pn_khan.erl | -module( pn_khan ).
-export( [slice_abs/2] ).
-include("pn.hrl").
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Abstract slicing algorithm for Low-level Petri nets
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
slice_abs(PN0, SC) ->
PN = #petri_net{transitions = T, digraph = G} =
pn_lib:new_pn_fresh_digraph(PN0),
PDone =
... | null | https://raw.githubusercontent.com/tamarit/pn_suite/d497add0d2e60f0bdcc5d2ffb1aedec166be3542/src/pn_khan.erl | erlang |
Abstract slicing algorithm for Low-level Petri nets
io:format("T_: ~p\n", [lists:sort(sets:to_list(T_))]),
io:format("P_: ~p\n", [lists:sort(sets:to_list(P_))]),
Discard loops as in the algorithm
Neutral Transitions Removal
| -module( pn_khan ).
-export( [slice_abs/2] ).
-include("pn.hrl").
slice_abs(PN0, SC) ->
PN = #petri_net{transitions = T, digraph = G} =
pn_lib:new_pn_fresh_digraph(PN0),
PDone =
sets:new(),
SetSC =
sets:from_list(SC),
T_ =
sets:from_list(
lists:... |
f29678e5a0a3d0c8fe8990621e8e3722d85a48870715b5f4460abb962a66206c | crategus/cl-cffi-gtk | application-inhibit.lisp | ;;;; Application Inhibit - 2021-10-11
;; TODO: This examples does not seem to work as expected. Try to work out an
;; example that demonstrates the gtk-application-inhibit function.
(in-package :gtk-application)
(defun application-inhibit (&rest argv)
(let (;; Create an application
(app (make-instance 'gtk... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/7f5a09f78d8004a71efa82794265f2587fff98ab/demo/gtk-application/application-inhibit.lisp | lisp | Application Inhibit - 2021-10-11
TODO: This examples does not seem to work as expected. Try to work out an
example that demonstrates the gtk-application-inhibit function.
Create an application
Create an application window
Quit the application
Show the application window
Leave the main loop on shutdown of the ap... |
(in-package :gtk-application)
(defun application-inhibit (&rest argv)
(app (make-instance 'gtk-application
:application-id "com.crategus.application-inhibit"
:flags :none)))
Connect signal " activate " to the applicaton
(g-signal-connect app "acti... |
2743e8d8083fcee1880f56f1313d0597b4027190a6c94a02a524b5c1ea6e8c3d | metosin/malli | demosci.clj | (ns malli.graalvm.demosci
(:gen-class)
(:require [sci.core]
[malli.core :as m]
[malli.edn :as edn]
[malli.error :as me]
[malli.transform :as mt]))
(defn -main [& [?schema ?value]]
(println " ?schema:" (pr-str ?schema))
(println " ?value:" (pr-str ?value))
(l... | null | https://raw.githubusercontent.com/metosin/malli/7ce3567f30f3b0f7d176b351d29145f0fa35ab60/graal-test/src/malli/graalvm/demosci.clj | clojure | (ns malli.graalvm.demosci
(:gen-class)
(:require [sci.core]
[malli.core :as m]
[malli.edn :as edn]
[malli.error :as me]
[malli.transform :as mt]))
(defn -main [& [?schema ?value]]
(println " ?schema:" (pr-str ?schema))
(println " ?value:" (pr-str ?value))
(l... | |
4ff6e380284603ad629394e783d831c910c701d4e6a2511e636af89cb1fd8ce0 | SKS-Keyserver/sks-keyserver | keydb.ml | (***********************************************************************)
keydb.ml - Interface for dealing with underlying key database
(* *)
Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 ,
2011... | null | https://raw.githubusercontent.com/SKS-Keyserver/sks-keyserver/a4e5267d817cddbdfee13d07a7fb38a9b94b3eee/keydb.ml | ocaml | *********************************************************************
redistribute it and/or modify it under the terms of the GNU General
... | keydb.ml - Interface for dealing with underlying key database
Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 ,
2011 , 2012 , 2013 and Contributors
This file is part of SKS . SKS is free software ; you can
Public License as published b... |
eda323e121f2b2c56271ef080c6a50f303a2e958ad8fe9fcd891f650ba451002 | camsaul/methodical | common_test.clj | (ns methodical.impl.method-table.common-test
(:require
[clojure.test :as t]
[methodical.impl.method-table.common :as method-table.common]))
(t/deftest describe-programmatic-method-test
;; I guess this is okay output. Not great, but it is ok for now.
(t/is (= "* `:default`, "
(#'method-table.co... | null | https://raw.githubusercontent.com/camsaul/methodical/05ced088550dd212e9722c9c901183ce52bd37c0/test/methodical/impl/method_table/common_test.clj | clojure | I guess this is okay output. Not great, but it is ok for now. | (ns methodical.impl.method-table.common-test
(:require
[clojure.test :as t]
[methodical.impl.method-table.common :as method-table.common]))
(t/deftest describe-programmatic-method-test
(t/is (= "* `:default`, "
(#'method-table.common/describe-method :default nil))))
|
4d4a6ca2d5e7468beb99e5bb3b5df7bcc2a929d3c19ce583c7eaf12ac8e7df3d | jacobobryant/flub | middleware.clj | (ns flub.middleware
(:require
[clojure.stacktrace :as st]
[flub.core :as flub]
[muuntaja.middleware :as muuntaja]
[ring.middleware.defaults :as rd]))
(defn wrap-flat-keys [handler]
(fn [{:keys [session params] :as req}]
(some-> req
(merge
(flub/prepend-keys "session" session)
... | null | https://raw.githubusercontent.com/jacobobryant/flub/4fda7386ec2e1d08ce7c695df593c18b5732d420/middleware/src/flub/middleware.clj | clojure | (ns flub.middleware
(:require
[clojure.stacktrace :as st]
[flub.core :as flub]
[muuntaja.middleware :as muuntaja]
[ring.middleware.defaults :as rd]))
(defn wrap-flat-keys [handler]
(fn [{:keys [session params] :as req}]
(some-> req
(merge
(flub/prepend-keys "session" session)
... | |
26063c185547f327836b4ff5f29a8fb295194a3b1b9774d712a57e073a769f9c | yminsky/incremental-tutorial | ex2.ml |
Now it 's time look at a more real - world example !
For the rest of this tutorial we are going to work on an
application that monitors the state and the health of a collection
of machines , e.g. all boxes in a datacenter .
To understand the setup , take a look at [ shared / protocol.ml ] whi... | null | https://raw.githubusercontent.com/yminsky/incremental-tutorial/756dfe36ec1b0a102128b3fa78a6c6762bdab90a/solutions/ex2.ml | ocaml | From here on in is just command-line specification. |
Now it 's time look at a more real - world example !
For the rest of this tutorial we are going to work on an
application that monitors the state and the health of a collection
of machines , e.g. all boxes in a datacenter .
To understand the setup , take a look at [ shared / protocol.ml ] whi... |
5f24967bcc583a721088cbd36fd797fffc6f519dbe9286ccb94ac56aea1f0abd | coccinelle/herodotos | debug.ml |
*
* Copyright ( C ) 2010 INRIA , University of Copenhagen DIKU
* Copyright ( C ) 1998 - 2009
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , wit... | null | https://raw.githubusercontent.com/coccinelle/herodotos/5da230a18962ca445ed2368bc21abe0a8402e00f/herodotos/commons/debug.ml | ocaml | ----------------------------------------------------------------------
subtil: don't forget to give all argumens to f, otherwise partial app
* and will profile nothing.
*
* todo: try also detect when complexity augment each time, so can
* detect the situation for a function gets worse and worse ?
add a '*' to... |
*
* Copyright ( C ) 2010 INRIA , University of Copenhagen DIKU
* Copyright ( C ) 1998 - 2009
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , wit... |
de020031cc693ed6d219a8e28394090e993ac5dadfc5c1a2d6c2723afeb53671 | default-kramer/fission-flare | setup-panel.rkt | #lang racket/gui
(provide build-settings setup-panel%)
#;("Methods of setup-panel%"
(make-game-settings) ; (-> GameSettings)
( - > MultiplayerSettings )
; set-constraints returns #t if something changed and #f otherwise
( - > MultiplayerSettings Boolean )
)
(require "../util/assert.rkt"
"../co... | null | https://raw.githubusercontent.com/default-kramer/fission-flare/f13d74dfe86373f9f475050c35c8b27c3e63a975/src/ui/setup-panel.rkt | racket | ("Methods of setup-panel%"
(-> GameSettings)
set-constraints returns #t if something changed and #f otherwise
A handicap is a percentage that boosts your attack power.
the lowest value is 100 ( not 1.0 ) which gives you no boost .
Builds game settings assuming not time-attack mode
IMO it is not obvious when a sli... | #lang racket/gui
(provide build-settings setup-panel%)
( - > MultiplayerSettings )
( - > MultiplayerSettings Boolean )
)
(require "../util/assert.rkt"
"../core.rkt"
)
(define no-handicap 100)
(define handicap-choices
'#(100 110 120 135 150 175 200 250 300 400 500))
(define (hc-scale hand... |
58d665c3f5e3c5622f6ce25f37196e5204918cda84d45d9c38d4ec32dac00d04 | w33tmaricich/kawa | project.clj | (defproject w33t/kawa "0.1.2"
:description "Wrapper for ffmpeg command line tools."
:url "/"
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[me.raynes/conch "0.8.0"]
[org.clojure/clojure "1.10.0"]]
:repl-options {:init-ns ka... | null | https://raw.githubusercontent.com/w33tmaricich/kawa/6574929d6d5f2362e3ab256afa803a27d82d3a50/project.clj | clojure | (defproject w33t/kawa "0.1.2"
:description "Wrapper for ffmpeg command line tools."
:url "/"
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[me.raynes/conch "0.8.0"]
[org.clojure/clojure "1.10.0"]]
:repl-options {:init-ns ka... | |
076f42a949679e592a72f807a4664ad588ae73cfd10bd2d400a53ce231c09494 | karamellpelle/grid | Segment.hs | grid is a game written in Haskell
Copyright ( C ) 2018
--
-- This file is part of grid.
--
-- grid 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 optio... | null | https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/source/Game/Grid/GridWorld/Segment.hs | haskell |
This file is part of grid.
grid is free software: you can redistribute it and/or modify
(at your option) any later version.
grid 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
GN... | grid is a game written in Haskell
Copyright ( C ) 2018
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
module Game.Grid.GridWorld.Segment
(
Segmen... |
b6a8b5b5f49fa8872881d963cc427d7a816a01446b9671b81566bcecbe2cfb9d | smucclaw/dsl | InterpreterSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module LS.InterpreterSpec where
import Test.Hspec
import LS.Types
import LS.Rule
import AnyAll
import qualified Data.Map as Map
import LS.Interpreter
spec :: Spec
spec = do
describe "expandBSR'" $ do
it "expand Leaf" $ do
let
emptyInt = L4I {classtable = CT Map.e... | null | https://raw.githubusercontent.com/smucclaw/dsl/29f3822c9579a22aafb2760a8bd381c87c135329/lib/haskell/natural4/test/LS/InterpreterSpec.hs | haskell | # LANGUAGE OverloadedStrings # | module LS.InterpreterSpec where
import Test.Hspec
import LS.Types
import LS.Rule
import AnyAll
import qualified Data.Map as Map
import LS.Interpreter
spec :: Spec
spec = do
describe "expandBSR'" $ do
it "expand Leaf" $ do
let
emptyInt = L4I {classtable = CT Map.empty, scopetable = Map.empty, origr... |
a6517f8928dea81b4f95b3665dba93a0958378b89f50fd9fa29e2d6a44046c87 | racket/typed-racket | optional-shallow-id-1.rkt | #lang racket/base
;; shallow should protect itself from optional
(module uuu racket/base
(provide bad-list)
(define bad-list '(X X)))
(module sss typed/racket/optional
(require/typed (submod ".." uuu)
(bad-list (Listof (List Symbol))))
(provide f)
(: f (-> (-> (List Symbol) Symbol) (Listof Symbol)))... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/optional/optional-shallow-id-1.rkt | racket | shallow should protect itself from optional | #lang racket/base
(module uuu racket/base
(provide bad-list)
(define bad-list '(X X)))
(module sss typed/racket/optional
(require/typed (submod ".." uuu)
(bad-list (Listof (List Symbol))))
(provide f)
(: f (-> (-> (List Symbol) Symbol) (Listof Symbol)))
(define (f x)
(map x bad-list)))
(modul... |
055043d7c16276ffe9a6d790657514dd6e0abb4462a2052a7701b211b0482b22 | onyx-platform/onyx | doc.cljc | (ns onyx.doc
(:require [onyx.information-model :refer [model]]))
(defn lookup-categories [model kw]
(->> (keys model)
(map (fn [k]
[(set (keys (get-in model [k :model]))) k]))
(filter (fn [[s k]]
(s kw)))
(map second)))
(defn lookup-doc [kw]
(mapv (fn [cat] (g... | null | https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/src/onyx/doc.cljc | clojure | (ns onyx.doc
(:require [onyx.information-model :refer [model]]))
(defn lookup-categories [model kw]
(->> (keys model)
(map (fn [k]
[(set (keys (get-in model [k :model]))) k]))
(filter (fn [[s k]]
(s kw)))
(map second)))
(defn lookup-doc [kw]
(mapv (fn [cat] (g... | |
357a4511c77596169127b3c5ffc92a091271fda831c38e43f785cf2470215615 | nvim-treesitter/nvim-treesitter | highlights.scm | ;; highlight queries.
;; See the syntax at -sitter.github.io/tree-sitter/using-parsers#pattern-matching-with-queries
See also -treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#parser-configurations
;; for a list of recommended @ tags, though not all of them have matching
highlights in neovim .
[
"abort"
... | null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/4db66966720541c2286dc7451be3c8ff9f273bb9/queries/ada/highlights.scm | scheme | highlight queries.
See the syntax at -sitter.github.io/tree-sitter/using-parsers#pattern-matching-with-queries
for a list of recommended @ tags, though not all of them have matching
spell-check comments
spell-check strings
Highlight the name of subprograms
Some keywords should take different categories depending... | See also -treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#parser-configurations
highlights in neovim .
[
"abort"
"abs"
"abstract"
"accept"
"access"
"all"
"array"
"at"
"begin"
"declare"
"delay"
"delta"
"digits"
"do"
"end"
"entry"
"exit"
"generic"
"inte... |
d22b67504bdbaa35a8bb57439ad392da63938c9ac1f78be84cf25280bcbb3967 | uditkarode/montype | Descriptor.hs | # LANGUAGE DataKinds #
module Parser.Descriptor where
import Parser.Descriptors.Array (arrayDescriptor)
import Parser.Descriptors.Helpers (anyDescriptor, shorthandDescriptor)
import Parser.Descriptors.Object (objDescriptor)
import Parser.Descriptors.Types (Descriptor)
impo... | null | https://raw.githubusercontent.com/uditkarode/montype/fa7ae2302731e740005609fcce20b046d8f35c1c/src/Parser/Descriptor.hs | haskell | Parses the right hand side of a | # LANGUAGE DataKinds #
module Parser.Descriptor where
import Parser.Descriptors.Array (arrayDescriptor)
import Parser.Descriptors.Helpers (anyDescriptor, shorthandDescriptor)
import Parser.Descriptors.Object (objDescriptor)
import Parser.Descriptors.Types (Descriptor)
impo... |
feafc8cd06dee53e1ee5068ff99230de8b94c2e7c57f72ea4d5b896194b4a659 | samply/blaze | util.clj | (ns blaze.handler.util
"HTTP/REST Handler Utils"
(:require
[blaze.anomaly :as ba]
[blaze.async.comp :as ac]
[blaze.fhir.spec.type :as type]
[blaze.http.util :as hu]
[clojure.string :as str]
[cognitect.anomalies :as anom]
[io.aviso.exception :as aviso]
[reitit.ring]
[ring.util.res... | null | https://raw.githubusercontent.com/samply/blaze/993a97f729d428d8cedf017b17887f34b3605b7c/modules/rest-util/src/blaze/handler/util.clj | clojure | (ns blaze.handler.util
"HTTP/REST Handler Utils"
(:require
[blaze.anomaly :as ba]
[blaze.async.comp :as ac]
[blaze.fhir.spec.type :as type]
[blaze.http.util :as hu]
[clojure.string :as str]
[cognitect.anomalies :as anom]
[io.aviso.exception :as aviso]
[reitit.ring]
[ring.util.res... | |
917be1d53eef42cc7894c7e236f64d946ea77d5974b81e201a3426e1495dff7e | osa1/psc-lua | Options.hs | module Language.PureScript.Lua.Options where
import qualified Language.PureScript.Options as P
-- | The data type of compiler options
data Options = Options
-- | Perform type checks at runtime
{ optionsPerformRuntimeTypeChecks :: Bool
-- | When specified, checks the type of `main` in the module, and
-- gene... | null | https://raw.githubusercontent.com/osa1/psc-lua/0ee80dc259a70122c3cd271f0c576b6ede8857ad/src/Language/PureScript/Lua/Options.hs | haskell | | The data type of compiler options
| Perform type checks at runtime
| When specified, checks the type of `main` in the module, and
generate a call to run main after the module definitions.
| Verbose error message
| Default compiler options
to be used for
psc internal functions. | module Language.PureScript.Lua.Options where
import qualified Language.PureScript.Options as P
data Options = Options
{ optionsPerformRuntimeTypeChecks :: Bool
, optionsMain :: Maybe String
, optionsVerboseErrors :: Bool
} deriving Show
defaultOptions :: Options
defaultOptions = Options False Nothing Fals... |
eeb444830c3180d8df488822ddaf322f1a56ac05f0333ddc8b128f1e7b88cef1 | Ramarren/cl-transactional | tchan.lisp | (in-package :cl-transactional-tests)
(defclass tchan ()
((tvar :initarg :tvar :initform (make-tvar (fset:empty-seq)) :accessor tvar-of)
(length :initarg :length :initform (make-tvar 5) :accessor length-of)
(count :initform (make-tvar 0) :accessor count-of))
(:documentation "Transactional channel"))
(defgene... | null | https://raw.githubusercontent.com/Ramarren/cl-transactional/7276c3edbb1572cc58a271db935e14a4854c0735/tests/tchan.lisp | lisp | (in-package :cl-transactional-tests)
(defclass tchan ()
((tvar :initarg :tvar :initform (make-tvar (fset:empty-seq)) :accessor tvar-of)
(length :initarg :length :initform (make-tvar 5) :accessor length-of)
(count :initform (make-tvar 0) :accessor count-of))
(:documentation "Transactional channel"))
(defgene... | |
884654cd57eeae253ec7dc21a01bb0383843fcf2d6fa64fe9d17a376e3ab5620 | casperschipper/ocaml-cisp | cisp1.ml | open Cisp
open Midi
open Seq
open Reader.Ops
simple mod of controller 1 onto pitch
let sr = ref 44100.0
let pitchControl =
MidiState.getControlR (MidiCh 0) (MidiCtrl 0)
>>= (fun (MidiVal ctrl1) ->
MidiState.getControlR (MidiCh 0) (MidiCtrl 1) >>=
(fun (MidiVal ctrl2) ->
MidiState.triggerR 30... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/examples/cisp_backup/sliders2/cisp1.ml | ocaml | a seq of (x,y) make it (seq x, seq y)
myseq
this maps midi input msg to an output msg (raw midi)
take msg, make it a state
run a bunch of readers to extract properties
the result is then used to contruct streams
turn back into raw midi | open Cisp
open Midi
open Seq
open Reader.Ops
simple mod of controller 1 onto pitch
let sr = ref 44100.0
let pitchControl =
MidiState.getControlR (MidiCh 0) (MidiCtrl 0)
>>= (fun (MidiVal ctrl1) ->
MidiState.getControlR (MidiCh 0) (MidiCtrl 1) >>=
(fun (MidiVal ctrl2) ->
MidiState.triggerR 30... |
80a348ee427e7097b3d67319cad7cfaa560c63ced55c8d1c7a85f60bdd29a6f3 | 6502/JSLisp | browser.lisp | (import * from gui)
(import * from layout)
(defun browser ()
(let** ((w (window 0 0 0.75 0.75 title: "Browser"))
(address (add-widget w (input "address" autofocus: true)))
(go (add-widget w (button "go" #'go default: true)))
(page (add-widget w (create-element "iframe")))
(#'g... | null | https://raw.githubusercontent.com/6502/JSLisp/9a4aa1a9116f0cfc598ec9f3f30b59d99810a728/examples/browser.lisp | lisp | (import * from gui)
(import * from layout)
(defun browser ()
(let** ((w (window 0 0 0.75 0.75 title: "Browser"))
(address (add-widget w (input "address" autofocus: true)))
(go (add-widget w (button "go" #'go default: true)))
(page (add-widget w (create-element "iframe")))
(#'g... | |
a348e254f908319a6183e3eda22d8ceb4dd2734cc8dcace17f5aa39a6a73502b | rm-hull/wireframes | canvas.cljs | ;; HTML5 canvas renderer
(ns wireframes.renderer.canvas
(:require
[wireframes.transform :as t]
[wireframes.renderer :refer [get-3d-points get-2d-points priority-fill shader compute-scale order-polygons]]
[monet.canvas :refer [save restore stroke-width stroke-cap stroke-style fill fill-style
... | null | https://raw.githubusercontent.com/rm-hull/wireframes/7df78cc6e2040cd0de026795f2e63ad129e4fee5/src/cljs/wireframes/renderer/canvas.cljs | clojure | HTML5 canvas renderer |
(ns wireframes.renderer.canvas
(:require
[wireframes.transform :as t]
[wireframes.renderer :refer [get-3d-points get-2d-points priority-fill shader compute-scale order-polygons]]
[monet.canvas :refer [save restore stroke-width stroke-cap stroke-style fill fill-style
begin-path l... |
c687b3ce2a0f2042105b87cba748249e7a124020a783418e2923e2693cd6d6d3 | ad-si/TaskLite | Main.hs | # LANGUAGE TypeFamilies #
# LANGUAGE PartialTypeSignatures #
module Main where
import Protolude as P hiding (get, put)
import Crypto.JWT as Crypto hiding (param)
import Control.Lens
import Data.Acid as Acid
import Data.Aeson as Aeson (Value(..), object, eitherDecode)
import Data.List.Extra as List (chunksOf)
import ... | null | https://raw.githubusercontent.com/ad-si/TaskLite/32d010642b5785f63b20cdd65ec5d4b9f34f3b2b/tasklite-server/source-old/Main.hs | haskell | TODO: Remove duplication with `refreshTokenToAccessToken`
Refresh JWT
User Login
User Logout
User Signup
Get All Registered Users
get "/admin/users" $ do
Get Current User's Info
Add Idea
Get all Ideas
get "/admin/ideas" $ do
Get all ideas of current user
Update Idea
Delete an Idea | # LANGUAGE TypeFamilies #
# LANGUAGE PartialTypeSignatures #
module Main where
import Protolude as P hiding (get, put)
import Crypto.JWT as Crypto hiding (param)
import Control.Lens
import Data.Acid as Acid
import Data.Aeson as Aeson (Value(..), object, eitherDecode)
import Data.List.Extra as List (chunksOf)
import ... |
4f6ce439446be68d04b6ed1a8d737e19eb4d83c1855af084b226ee5ff01625df | screenshotbot/screenshotbot-oss | bundle.lisp | ;; Copyright 2018-Present Modern Interpreters Inc.
;;
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(uiop:define-package :screenshotbot/sdk/bundle
(:use #:cl
#:alexandria)
(:exp... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/f5e08d020c7739ef6e89553f28f59aa3a7e9ca67/src/screenshotbot/sdk/bundle.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
| This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(uiop:define-package :screenshotbot/sdk/bundle
(:use #:cl
#:alexandria)
(:export
#:image-stream))
(in-package :screenshotbot/sdk... |
dc54af6860ac487abc8bb6c9e12c10e084ddf8386ff5e9e5eab5986592e210a2 | ocamllabs/ocaml-modular-implicits | includestruct.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/basic/includestruct.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 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 .
module A =
struct
type t = int
... |
3f47207792a717fbf41e8a6fb9852529c8a84c5d6e8a06ea833edeedabdb136e | SKA-ScienceDataProcessor/RC | map-reduce.hs | # LANGUAGE TemplateHaskell #
module Main(main) where
import Data.Char
import Data.Ord
import Data.List
import qualified Data.Map as Map
import DNA
wordMapper :: Mapper () (String,Int)
wordMapper = mapper
(\_ -> initWord)
splitWord
shuffle
where
Read data . We hardcode fact that we have 4 mapper h... | null | https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS2/dna-programs/map-reduce.hs | haskell | Get single word
--------------------------------------------------------------
Distributed dot product
--------------------------------------------------------------
Start mapper
Start reducer | # LANGUAGE TemplateHaskell #
module Main(main) where
import Data.Char
import Data.Ord
import Data.List
import qualified Data.Map as Map
import DNA
wordMapper :: Mapper () (String,Int)
wordMapper = mapper
(\_ -> initWord)
splitWord
shuffle
where
Read data . We hardcode fact that we have 4 mapper h... |
ff7f64d3bbd6a2079fafec475dda258a96df90b2fc784a1b6537ff2cfc6a7861 | ReedOei/Enki | CodeGen.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE UndecidableInstances #
module Enki.Compiler.CodeGen where
import Control.Arrow ((***))
import Control.Lens
import Control.Monad.Trans.State.Lazy
import Control.Monad
import Data.C... | null | https://raw.githubusercontent.com/ReedOei/Enki/6b92f2e33e5cf25385068c230caa8c9d46a74315/src/Enki/Compiler/CodeGen.hs | haskell | The result of this is not really used, but we return it anyway for consistency's sake
Nothing to check here
Check using whatever the typeCheckerName is
| Generates the type checking predicates.
indentConj = indent . conjunction . concatMap prettyPrint | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE UndecidableInstances #
module Enki.Compiler.CodeGen where
import Control.Arrow ((***))
import Control.Lens
import Control.Monad.Trans.State.Lazy
import Control.Monad
import Data.C... |
dd4eef732d5b9f55946a8c419e94ca12c20479b366e963e90b87b9dd9080eeb7 | pbevin/cardelli | TypeSpec.hs | module TypeSpec where
import Test.Hspec
import qualified Data.Map as Map
import Control.Monad.State
import ParseType
import Type
import TypeEnv
spec :: Spec
spec = do
let a = TypeVariable "a"
b = TypeVariable "b"
c = TypeVariable "c"
d = TypeVariable "d"
e = parseType "a -> I... | null | https://raw.githubusercontent.com/pbevin/cardelli/bf239351289d379796fa68c25bb6c56be0e67925/hs/test/TypeSpec.hs | haskell | module TypeSpec where
import Test.Hspec
import qualified Data.Map as Map
import Control.Monad.State
import ParseType
import Type
import TypeEnv
spec :: Spec
spec = do
let a = TypeVariable "a"
b = TypeVariable "b"
c = TypeVariable "c"
d = TypeVariable "d"
e = parseType "a -> I... | |
2b71f290ef5e74b0e5a6f14569248df1ec1ba1320b08e0a5aac0eb9e703fcd5c | facet-lang/facet | Eval.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UndecidableInstances #
module Facet.Eval
( -- * Evaluation
eval
-- * Machinery
, Handler(..)
, Eval(..)
-- * Values
, Value(..)
, unit
-- * Quotation
, quoteV
) where
import Control.Algebra hiding (Handler)
import Control.Carrier.Re... | null | https://raw.githubusercontent.com/facet-lang/facet/4626eed1395cd91acc2d38910f27809ad6e753fa/src/Facet/Eval.hs | haskell | # LANGUAGE OverloadedStrings #
* Evaluation
* Machinery
* Values
* Quotation
Machinery
Values
| Neutral; variables, only used during quotation
| Value; data constructors.
| Value; strings.
| Computation; lambdas.
| Computation; continuations, used in effect handlers.
Elimination
FIXME: probably not a good ... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE UndecidableInstances #
module Facet.Eval
eval
, Handler(..)
, Eval(..)
, Value(..)
, unit
, quoteV
) where
import Control.Algebra hiding (Handler)
import Control.Carrier.Reader
import Control.Monad (ap, guard, liftM, (>=>))
import Control.Monad.Trans.Class
import Data.Fold... |
9cc07056cc5d8b40a6f2454f6fb406bafaacf2fad8cb12c6d8c8c5247ec11a16 | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | GetCoupons.hs | {-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
| Contains the different functions to run the operation getCoupons
module StripeAPI.Operati... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Operations/GetCoupons.hs | haskell | # LANGUAGE ExplicitForAll #
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| > GET /v1/coupons
| Contains all available parameters of this operation (query and path parameters)
| Monadic computation which returns the result of the operation
| queryCreated: Represents the parameter named \'created\'
A fil... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
| Contains the different functions to run the operation getCoupons
module StripeAPI.Operations.GetCoupons where
import qualified Control.Monad.Fail
import qualified Control.Monad.Trans.... |
82a4e964a0f6a47b8d472d4e356d9b814c4a2215c9f9464d8ef19ccac43aa7f3 | kupl/LearnML | original.ml | type aexp =
| Const of int
| Var of string
| Power of (string * int)
| Times of aexp list
| Sum of aexp list
let rec diff ((exp : aexp), (x : string)) : aexp =
match exp with
| Const n -> Const 0
| Var s -> Const 1
| Power (str, pow) ->
if pow = 1 then Const 1 else Times [ Const pow; Power (str... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/diff/sub189/original.ml | ocaml | type aexp =
| Const of int
| Var of string
| Power of (string * int)
| Times of aexp list
| Sum of aexp list
let rec diff ((exp : aexp), (x : string)) : aexp =
match exp with
| Const n -> Const 0
| Var s -> Const 1
| Power (str, pow) ->
if pow = 1 then Const 1 else Times [ Const pow; Power (str... | |
f208b862cc3d4d456d97f6a089212a295ffe365639de9e7f00914d7fac82622a | GlideAngle/flare-timing | Place.hs | |
Module : Flight . Track . Point
Copyright : ( c ) Block Scope Limited 2017
License : MPL-2.0
Maintainer :
Stability : experimental
Task placing .
Module : Flight.Track.Point
Copyright : (c) Block Scope Limited 2017
License : MPL-2.0
Maintainer :
Stability : experiment... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/34873946be9b93c37048ed118ef5b4649c71d630/lang-haskell/comp/library/Flight/Track/Place.hs | haskell | >>> reIndex []
[]
>>> reIndex [(1,[1,1]),(2,[2]),(3,[3]),(4,[4])]
[(1,[1,1]),(3,[2]),(4,[3]),(5,[4])]
1,2=,2=,2=,2=,2=,2=,8=,8=,10
[(1,[1]),(2,[2,2,2,2,2,2]),(8,[3,3]),(10,[4])]
1,2=,2=,4
>>> reIndex [(1,[1]),(3,[2,2]),(4,[3])]
[(1,[1]),(2,[2,2]),(4,[3])]
1,2=,2=,4
>>> reIndex [(3,[1]),(2,[2,2]),(1,[3])]... | |
Module : Flight . Track . Point
Copyright : ( c ) Block Scope Limited 2017
License : MPL-2.0
Maintainer :
Stability : experimental
Task placing .
Module : Flight.Track.Point
Copyright : (c) Block Scope Limited 2017
License : MPL-2.0
Maintainer :
Stability : experiment... |
500ee5a74269cc64d04b4a63d41d13bbdcd8d9d193a3a0d5e6763364fcb2f4cd | int-index/kalium | FuncUpdate.hs | # LANGUAGE FlexibleContexts #
module Kalium.Nucleus.Vector.FuncUpdate where
import Kalium.Prelude
import Kalium.Util
import Control.Monad.Trans.Maybe
import qualified Data.Map as M
import Kalium.Nucleus.Vector.Program
import Kalium.Nucleus.Vector.Name (mentions)
type FuncUpdate m = Name -> Name -> Func -> MaybeT m ... | null | https://raw.githubusercontent.com/int-index/kalium/0653b4229001880322acf3016de595360de726ec/src/Kalium/Nucleus/Vector/FuncUpdate.hs | haskell | # LANGUAGE FlexibleContexts #
module Kalium.Nucleus.Vector.FuncUpdate where
import Kalium.Prelude
import Kalium.Util
import Control.Monad.Trans.Maybe
import qualified Data.Map as M
import Kalium.Nucleus.Vector.Program
import Kalium.Nucleus.Vector.Name (mentions)
type FuncUpdate m = Name -> Name -> Func -> MaybeT m ... | |
0a78014457dc7f4fd763ee5a8f4f2dc43e6bfc2e7af2f399815da00b73d5331e | Helium4Haskell/helium | BackQuoteHint1.hs | main = 3 'div' 4
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/parser/BackQuoteHint1.hs | haskell | main = 3 'div' 4
| |
a5e1c46bc7cde06ba1db5bbac6e63db1fb46762e69679fe282f1e77806693047 | jamesdabbs/pi-base.hs | Proof.hs | module Model.Proof
( proofTraits
, proofTheorem
) where
import Import hiding ((==.), on)
import Database.Esqueleto
proofTraits :: ProofId -> Handler [Entity Trait]
proofTraits pid = runDB . select $
from $ \(assumptions `InnerJoin` traits) -> do
on (assumptions ^. AssumptionTraitId ==. traits ^. TraitId)
where_... | null | https://raw.githubusercontent.com/jamesdabbs/pi-base.hs/1c7cb1f87c6525bd4844842b3f9442634f8dccd3/Model/Proof.hs | haskell | module Model.Proof
( proofTraits
, proofTheorem
) where
import Import hiding ((==.), on)
import Database.Esqueleto
proofTraits :: ProofId -> Handler [Entity Trait]
proofTraits pid = runDB . select $
from $ \(assumptions `InnerJoin` traits) -> do
on (assumptions ^. AssumptionTraitId ==. traits ^. TraitId)
where_... | |
87f85304cc35b7141f64895a19bc50d87cc53fb8b57da760ce6123bcc48bfc54 | racket/racket7 | optimize.rkt | #lang racket/base
(require "match.rkt"
"wrap.rkt"
"import.rkt"
"known.rkt"
"find-known.rkt"
"mutated-state.rkt"
"literal.rkt")
(provide optimize)
;; Perform shallow optimizations. The `schemify` pass calls `optimize`
;; on each schemified form, which means that su... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/schemify/optimize.rkt | racket | Perform shallow optimizations. The `schemify` pass calls `optimize`
on each schemified form, which means that subexpressions of the
immediate expression have already been optimized.
Note: we can't do `known-copy?` here, because a copy of
an imported or exported name will need to be schemified
to a different name | #lang racket/base
(require "match.rkt"
"wrap.rkt"
"import.rkt"
"known.rkt"
"find-known.rkt"
"mutated-state.rkt"
"literal.rkt")
(provide optimize)
(define (optimize v prim-knowns knowns imports mutated)
(match v
[`(if ,t ,e1 ,e2)
(if (literal? t)
... |
c7571e2950d5897ec9c1a4a62ead5d46a099625a5ad18c7bbc3432db56bb8cb3 | dyzsr/ocaml-selectml | codegen_main.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tools/codegen_main.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
open Clflags
let write_asm_file = ref false
let compile_file filename =
if !write_asm_file then begin
... |
65e292672e09b082e916881afc7879919165bff7932697ef21e6b458ce334601 | jwiegley/notes | FreerErrors.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/FreerErrors.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
| For a web browser, we might want to render errors much differently,
allowing the user to drill down into associated bits of info. The default
requires that it least be enough information to be equvialent to Show,
monad that collects the... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
module FreerErrors where
import Control.Applicative
... |
385bdf821982217ccdf58791bf2895e92966cf2023fe6ac0a056627e4f31b5d2 | gebi/jungerl | prfTarg.erl | %%%-------------------------------------------------------------------
%%% File : prfTarg.erl
Author : Mats < qthmacr@duna283 >
%%% Description :
%%%
Created : 1 Dec 2003 by Mats < qthmacr@duna283 >
%%%-------------------------------------------------------------------
-module(prfTarg).
-export([subscrib... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/prf/src/prfTarg.erl | erlang | -------------------------------------------------------------------
File : prfTarg.erl
Description :
-------------------------------------------------------------------
-export([netload/2]).
interface %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
runs on host %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... | Author : Mats < qthmacr@duna283 >
Created : 1 Dec 2003 by Mats < qthmacr@duna283 >
-module(prfTarg).
-export([subscribe/3,unsubscribe/3]).
internal ; otp r5 compatible !
-import(gb_trees,[empty/0,insert/3,iterator/1,
lookup/2,next/1,update/3,to_list/1]).
-record(st, {collectors=empty()}).
-record(colle... |
3c0f7816b8a848a75392f096db0cc75ff8dd6bcd4481008f18623440d8d35ece | fyquah/hardcaml_zprize | test_half_width_multiplier.ml | open! Base
open! Hardcaml
open! Field_ops_lib
open! Bits
module Half_width_multiplier_377 = Half_width_multiplier.With_interface_multiply (struct
let bits = 377
end)
module Config = Half_width_multiplier.Config
module I = Half_width_multiplier_377.I
module O = Half_width_multiplier_377.O
module Sim = Cyclesim.With_... | null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/field_ops/test/test_half_width_multiplier.ml | ocaml | open! Base
open! Hardcaml
open! Field_ops_lib
open! Bits
module Half_width_multiplier_377 = Half_width_multiplier.With_interface_multiply (struct
let bits = 377
end)
module Config = Half_width_multiplier.Config
module I = Half_width_multiplier_377.I
module O = Half_width_multiplier_377.O
module Sim = Cyclesim.With_... | |
4b17c71b1b76f4d80e23aa1235a27c370d786e7d73c458c3c363924defdaa1fa | sebashack/servantRestfulAPI | Operations.hs | {-# LANGUAGE OverloadedStrings #-}
module Repositories.ReservationRepo.Operations where
import Data.Time
import HelperLibs.MySQL.ReservationRepo
import Control.Monad.IO.Class
import Control.Monad.Trans.Reader
import Data.ByteString (ByteString)
import qualified Schemas.SQL.User as USCH
import qualified Schemas.SQL... | null | https://raw.githubusercontent.com/sebashack/servantRestfulAPI/e625535d196acefaff4f5bf03108816be668fe4d/libs/Repositories/ReservationRepo/Operations.hs | haskell | # LANGUAGE OverloadedStrings #
assumed that the reservation was made by an admin.
Also note that if the reservation was made by an admin its state defaults to Accepted, otherwise it defaults
to Pending
By default the guest is asumed as not arrived.
Update the state of a reservation
Update a reservation's arrival... |
module Repositories.ReservationRepo.Operations where
import Data.Time
import HelperLibs.MySQL.ReservationRepo
import Control.Monad.IO.Class
import Control.Monad.Trans.Reader
import Data.ByteString (ByteString)
import qualified Schemas.SQL.User as USCH
import qualified Schemas.SQL.DbTypes as DbT
import qualified Da... |
32d70efdc0b26a3848a92700e69a6935f11ca942f31c65501983a62ba0972f3e | music-suite/abcnotation | Parser.hs |
-------------------------------------------------------------------------------------
-- |
Copyright : ( c ) 2012
--
-- License : BSD-style
--
Maintainer :
-- Stability : experimental
-- Portability : portable
--
-------------------------------------------------------------------------------------
m... | null | https://raw.githubusercontent.com/music-suite/abcnotation/b0a9ef74f52387285a94e3f90a8459367ad1e2ae/src/Data/Music/Abc/Parser.hs | haskell | -----------------------------------------------------------------------------------
|
License : BSD-style
Stability : experimental
Portability : portable
-----------------------------------------------------------------------------------
* Limited support for *volatile* features
* No mnemonics
*... |
Copyright : ( c ) 2012
Maintainer :
module Data.Music.Abc.Parser (
parse
) where
import Data.Monoid
import Data.Either
import Control.Monad
import Control.Applicative hiding ((<|>), optional, many)
import Text.Parsec hiding (parse)
import Text.Parsec.Token
import Text.Parsec.String
import Data... |
39a2c3b9b99df94c4e817b393fe84eb19bef3f75a7d5aec7c6657859cedbd247 | cheecheeo/stats | stats.hs | {-# LANGUAGE OverloadedStrings #-}
import qualified Statistics.Quantile as S
import qualified Statistics.Sample as SS
import qualified Data.Char as C
import qualified Data.Function as F
import qualified Data.List as L
import Data.String (IsString)
import qualified Data.St... | null | https://raw.githubusercontent.com/cheecheeo/stats/dd59acae5de731812324b7704b9a487b95a91ad5/stats.hs | haskell | # LANGUAGE OverloadedStrings # |
import qualified Statistics.Quantile as S
import qualified Statistics.Sample as SS
import qualified Data.Char as C
import qualified Data.Function as F
import qualified Data.List as L
import Data.String (IsString)
import qualified Data.String as Str
import ... |
2d6548e7132a450adc208d8da1e7ac3e5b2814d77a5fcf904b575cbf7467ff2f | rfkm/zou | container_test.clj | (ns zou.framework.container-test
(:require [clojure.test :as t]
[midje.sweet :refer :all]
[zou.component :as c]
[zou.framework.container :as sut]
[zou.framework.container.impl :as impl]))
(defrecord Foo []
c/Lifecycle
(start [this]
(assoc this :started true))
... | null | https://raw.githubusercontent.com/rfkm/zou/228feefae3e008f56806589cb8019511981f7b01/framework/test/zou/framework/container_test.clj | clojure | lifecycle test
should stop user systems too | (ns zou.framework.container-test
(:require [clojure.test :as t]
[midje.sweet :refer :all]
[zou.component :as c]
[zou.framework.container :as sut]
[zou.framework.container.impl :as impl]))
(defrecord Foo []
c/Lifecycle
(start [this]
(assoc this :started true))
... |
6d64f902e1ac8646087d8b26f9c3dbc91f15539f373dc3c479e841f6a3a4adc6 | gulige/neuroevo | xor_get_input.erl | -module(xor_get_input).
-export([sense/4]).
-include_lib("ne_common/src/include/common.hrl").
-include("records.hrl").
The function contacts the XOR simulator and requests the sensory vector , which in this case should be a binary vector of length 2 .
The sensor checks that the incoming sensory signal , the perce... | null | https://raw.githubusercontent.com/gulige/neuroevo/09e67928c2417f2b27ec6522acc82f8b3c844949/apps/neuroevo/src/sensors/xor_get_input.erl | erlang | printed to the console and a dummy vector of appropriate length is constructed. | -module(xor_get_input).
-export([sense/4]).
-include_lib("ne_common/src/include/common.hrl").
-include("records.hrl").
The function contacts the XOR simulator and requests the sensory vector , which in this case should be a binary vector of length 2 .
The sensor checks that the incoming sensory signal , the perce... |
7920cb54c8fe70bbec5aa8d20837e649ab2180b2eeb7a0db7a9563d8c14d6f27 | sondresl/AdventOfCode | 22.hs | import Data.List.Extra
import Data.Complex
import qualified Data.Map.Strict as M
type Grid = M.Map Pos Status
type Pos = (Int, Int)
type Dir = Complex Float
data Status = Clean
| Infected
| Weak
| Flagged
deriving (Eq, Show)
data Burst = B { _grid :: Grid
... | null | https://raw.githubusercontent.com/sondresl/AdventOfCode/a460af1866077639e0c58947354d750d1b96975c/2017/Haskell/22.hs | haskell | Up
Left
Right
Down | import Data.List.Extra
import Data.Complex
import qualified Data.Map.Strict as M
type Grid = M.Map Pos Status
type Pos = (Int, Int)
type Dir = Complex Float
data Status = Clean
| Infected
| Weak
| Flagged
deriving (Eq, Show)
data Burst = B { _grid :: Grid
... |
5cc817939aad3f246db6f7b5ad8ae0e330b1d486118b2bf6a86b05ffc7fa483a | camllight/camllight | fstring.ml | (* Operations on strings, without sanity checks *)
#open "int";;
#open "eq";;
#open "ref";;
#open "fchar";;
#open "exc";;
let make_string len init =
let s = create_string len in
fill_string s 0 len init; s
;;
let prefix ^ s1 s2 =
let l1 = string_length s1
and l2 = string_length s2 in
let s = create_strin... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/windows/src/lib/fstring.ml | ocaml | Operations on strings, without sanity checks |
#open "int";;
#open "eq";;
#open "ref";;
#open "fchar";;
#open "exc";;
let make_string len init =
let s = create_string len in
fill_string s 0 len init; s
;;
let prefix ^ s1 s2 =
let l1 = string_length s1
and l2 = string_length s2 in
let s = create_string (l1 + l2) in
blit_string s1 0 s 0 l1;
bli... |
705acb96e38de9d1a4801c8ef912b04836d70c03c3ef0a807b350437f71c3607 | dwysocki/hidden-markov-music | train.clj | (ns hidden-markov-music.model.train
(:require [hidden-markov-music.hmm :as hmm]
[hidden-markov-music.util :as util]
[hidden-markov-music.music.music :as music]
[hidden-markov-music.music.jfugue :as jfugue]
[clojure.tools.cli :refer [parse-opts]]
[clojure.str... | null | https://raw.githubusercontent.com/dwysocki/hidden-markov-music/5601e17dd582d0a73be16fe98fec099296303c95/src/hidden_markov_music/model/train.clj | clojure | (ns hidden-markov-music.model.train
(:require [hidden-markov-music.hmm :as hmm]
[hidden-markov-music.util :as util]
[hidden-markov-music.music.music :as music]
[hidden-markov-music.music.jfugue :as jfugue]
[clojure.tools.cli :refer [parse-opts]]
[clojure.str... | |
6ee12b1aed4dee47833e87eef900ff6ca17c06a8117804dbb77ea91d7f462247 | ygrek/mldonkey | g2Handler.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/networks/gnutella2/g2Handler.ml | ocaml | TODO: try to find a more general function
We have sent a UPROC request, this is the reply of the client
Now, we can extend our current searches on this host
server_send_query ss.search_uid words NoConnection s
Upon receiving a query, a node should:
Verify its authentication
... | 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
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.