_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 |
|---|---|---|---|---|---|---|---|---|
b4b6cf33188e5df83bb7c7487a7f616c511d127b647ef397d615eda7d96a6940 | franklindyer/cs357-ta-materials | control_flow.rkt | #lang racket
(define x '(begin (display "x evaluated\n") #f))
(define y '(begin (display "y evaluated\n") #f))
(define z '(begin (display "z evaluated\n") #t))
(define btm '(eval btm))
'(and x y)
'(and (eval x) (eval y))
'(and (eval z) (eval x))
'(and (eval z) (eval z) (eval x) (eval z))
(define (comp-list-1 l1 l2)... | null | https://raw.githubusercontent.com/franklindyer/cs357-ta-materials/087cdc29e13d7f0796d70f2bc9e08a20f626ac92/scheme/misc/control_flow.rkt | racket | #lang racket
(define x '(begin (display "x evaluated\n") #f))
(define y '(begin (display "y evaluated\n") #f))
(define z '(begin (display "z evaluated\n") #t))
(define btm '(eval btm))
'(and x y)
'(and (eval x) (eval y))
'(and (eval z) (eval x))
'(and (eval z) (eval z) (eval x) (eval z))
(define (comp-list-1 l1 l2)... | |
944cb3b6acf06d8476af6e5d73a3581db4ee05da8f6bbd8668ed8145839ec9df | project-oak/hafnium-verification | exp.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/sledge/src/llair/exp.ml | ocaml | * Expressions
conversion
array/struct operations
comparison
arithmetic, numeric and pointer
boolean / bitwise
array/struct operations
if-then-else
array/struct constants
* NOTE: may be cyclic
* Invariant
avoid redundant representations
* Type query
* Registers are the expressions constructed by [R... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
1cfbde1f566d998b2c1ef1a4e8da4de971a5dfb680859ec9adca45d453093884 | mransan/raft | raft_protocol.ml | module Types = Raft_types
module Follower = Raft_helper.Follower
module Candidate = Raft_helper.Candidate
module Leader = Raft_helper.Leader
module Configuration = Raft_helper.Configuration
module Log = Raft_log
module Timeout_event = Raft_helper.Timeout_event
module Helper = Raft_helper
let make_result ?(msgs_to_send... | null | https://raw.githubusercontent.com/mransan/raft/292f99475183d67e960b3a199ed4fc01b1f183e2/src/raft_protocol.ml | ocaml | The heartbeat deadline is past due, the [Leader] must
* sent an [Append_entries] request.
In case of an outstanding request there is no point
* in sending a new request to that server.
* Even if the outstanding request was lost and it could be
* beneficial ... | module Types = Raft_types
module Follower = Raft_helper.Follower
module Candidate = Raft_helper.Candidate
module Leader = Raft_helper.Leader
module Configuration = Raft_helper.Configuration
module Log = Raft_log
module Timeout_event = Raft_helper.Timeout_event
module Helper = Raft_helper
let make_result ?(msgs_to_send... |
39bd99952436c7fe11b544363da8154156bb961ae675382a1e779ad4663774ac | mariari/Misc-Lisp-Scripts | cache-fstar-source.lisp |
;; (eval-when (:compile-toplevel :load-toplevel :execute)
;; (ql:quickload "inferior-shell")
;; (asdf:load-system :uiop))
(defpackage #:scripts.cache-fstar
(:use #:uiop #:inferior-shell)
(:use #:common-lisp)
(:export :generate-cache))
(in-package :scripts.cache-fstar)
;; This does not work for ulib sadly... | null | https://raw.githubusercontent.com/mariari/Misc-Lisp-Scripts/acecadc75fcbe15e6b97e084d179aacdbbde06a8/scripts/cache-fstar-source.lisp | lisp | (eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload "inferior-shell")
(asdf:load-system :uiop))
This does not work for ulib sadly, it has many finicky parameters see here
for some reason if you qualify the entire file instead of assuming current file, it
may fail with errors (looking at you... |
(defpackage #:scripts.cache-fstar
(:use #:uiop #:inferior-shell)
(:use #:common-lisp)
(:export :generate-cache))
(in-package :scripts.cache-fstar)
(defun generate-cache (starting-file &key (r-limit 5))
(labels ((rec (current-file tried-list)
(let* ((tried (nth-value 1
... |
7794c3c9afec9f558b226d39116b939ed45137ee36412e3b7997b857e30d49af | ucsd-progsys/dsolve | bsearch.ml | val arraysize: ('a).{n:nat} 'a array(n) -> int(n)
fun bs_aux key vec l u =
if u < l then NONE
else
let
val m = l + (u-l) / 2
val x = sub (vec, m)
in
if x < key then bs_aux key vec (m+1) u
else if x > key then bs_aux key vec l (m-1)
else SOME (m)
end
withtype ... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/xiog/DMLex/bsearch.ml | ocaml | val arraysize: ('a).{n:nat} 'a array(n) -> int(n)
fun bs_aux key vec l u =
if u < l then NONE
else
let
val m = l + (u-l) / 2
val x = sub (vec, m)
in
if x < key then bs_aux key vec (m+1) u
else if x > key then bs_aux key vec l (m-1)
else SOME (m)
end
withtype ... | |
010fe6d33e0bff180f70b7d0a4bd0ae60f47013333f6f0072a8b1652435bef26 | hypernumbers/hypernumbers | starling_sup.erl | -module(starling_sup).
-behaviour(supervisor).
-export([start_link/1,
init/1]).
-define(SERVER, ?MODULE).
%% Starts the supervisor.
start_link(Args) ->
supervisor:start_link(starling_sup, Args).
%% Supervisor callback. Returns restart strategy, maximum restart frequency,
%% and child specs.
init([ExtPr... | null | https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/lib/starling/src/starling_sup.erl | erlang | Starts the supervisor.
Supervisor callback. Returns restart strategy, maximum restart frequency,
and child specs. | -module(starling_sup).
-behaviour(supervisor).
-export([start_link/1,
init/1]).
-define(SERVER, ?MODULE).
start_link(Args) ->
supervisor:start_link(starling_sup, Args).
init([ExtProg, PoolSize, Group]) ->
ChildSpecs = get_childspecs(PoolSize, ExtProg, Group, []),
{ok, {{one_for_one, 3, 10},
... |
90d31fcf3a67af1ce83a49ee47b649b9f5c2d121e2ce4a867f01f32dd9c44dcb | yesodweb/yesod | Redirect.hs | # LANGUAGE QuasiQuotes , TemplateHaskell , TypeFamilies , MultiParamTypeClasses , OverloadedStrings #
module YesodCoreTest.Redirect
( specs
, Widget
, resourcesY
) where
import YesodCoreTest.YesodTest
import Yesod.Core.Handler (redirectWith, setEtag, setWeakEtag)
import qualified Network.HTTP.Types as ... | null | https://raw.githubusercontent.com/yesodweb/yesod/c59993ff287b880abbf768f1e3f56ae9b19df51e/yesod-core/test/YesodCoreTest/Redirect.hs | haskell | Note: this violates the RFC around ETag format, but is being left as is
out of concerns that it might break existing users with misbehaving clients. | # LANGUAGE QuasiQuotes , TemplateHaskell , TypeFamilies , MultiParamTypeClasses , OverloadedStrings #
module YesodCoreTest.Redirect
( specs
, Widget
, resourcesY
) where
import YesodCoreTest.YesodTest
import Yesod.Core.Handler (redirectWith, setEtag, setWeakEtag)
import qualified Network.HTTP.Types as ... |
92d3008b700e6fb3efa9129c6671269194fc298dfefe33cd840b987b87273bc6 | clojure/core.typed | contract_utils_test.clj | (ns clojure.core.typed.test.contract-utils-test
(:refer-clojure :exclude [boolean?])
(:require [clojure.core.typed.test.test-utils :refer :all]
[clojure.test :refer :all]
[clojure.core.typed.contract-utils :as con :refer :all]))
(deftest hmap-c-test
(is ((hmap-c?)
{}))
(is (not ... | null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/test/clojure/core/typed/test/contract_utils_test.clj | clojure | (ns clojure.core.typed.test.contract-utils-test
(:refer-clojure :exclude [boolean?])
(:require [clojure.core.typed.test.test-utils :refer :all]
[clojure.test :refer :all]
[clojure.core.typed.contract-utils :as con :refer :all]))
(deftest hmap-c-test
(is ((hmap-c?)
{}))
(is (not ... | |
1944d937d4d1fd605af8fc7b34ab1e5d5b796a16b0a41d0af79a3a213907932b | yakaz/yamerl | yamerl.erl | %-
Copyright ( c ) 2012 - 2014 Yakaz
Copyright ( c ) 2016 - 2022 < >
% All rights reserved.
%
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions
% are met:
1 . Redistributions of source code must retain the above copyright... | null | https://raw.githubusercontent.com/yakaz/yamerl/bf9d8b743bfc9775f2ddad9fb8d18ba5dc29d3e1/src/yamerl.erl | erlang | -
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
documen... | Copyright ( c ) 2012 - 2014 Yakaz
Copyright ( c ) 2016 - 2022 < >
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ` ` AS IS '' AND
IMPLIED WARRANTIES OF MERC... |
1d2c9b61b0fabbafc238df0da2f4d422cda9670d197f3edaa4aa9d7f8b86f730 | craigfe/compact | hashset.ml | — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Copyright ( c ) 2020–2021 < >
Distributed under the MIT license . See terms at the end of this file .
— — — — — — — — — — — — — — — — — — — — — — — — —... | null | https://raw.githubusercontent.com/craigfe/compact/daa1b516c917585b80e2fbace74690766a9ac907/src/hashset.ml | ocaml | XXX: polymorphic comparison | — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Copyright ( c ) 2020–2021 < >
Distributed under the MIT license . See terms at the end of this file .
— — — — — — — — — — — — — — — — — — — — — — — — —... |
934750efb0aa388c642374350226e09b0e1d0f8fcb4e284dda4acaf02578b25f | alexandergunnarson/quantum | format.cljc | (ns
^{:doc "An alias of the clj-time.format namespace."
:attribution "alexandergunnarson"}
quantum.core.time.format
#_(:require [quantum.core.ns :as ns #?@(:clj [:refer [alias-ns]])]))
#_(:clj (alias-ns 'clj-time.format))
| null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/core/time/format.cljc | clojure | (ns
^{:doc "An alias of the clj-time.format namespace."
:attribution "alexandergunnarson"}
quantum.core.time.format
#_(:require [quantum.core.ns :as ns #?@(:clj [:refer [alias-ns]])]))
#_(:clj (alias-ns 'clj-time.format))
| |
e83464706525c0aebe3e8840ead484e97a458fa5c63253baac0fc166113a2c99 | primetype/inspector | Main.hs | # LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# OPTIONS_GHC -fno - warn - orphans #
module Main (main) where
import Inspector
import qualified Inspector.TestVector.Types as Type
import qualified Inspector.TestVector.Value as Value
import Foundation
import Foundation.Check (Arbitrary... | null | https://raw.githubusercontent.com/primetype/inspector/bd2ee67c757729d2a725282b27d3b98458f3fe2e/example/Main.hs | haskell | # LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# OPTIONS_GHC -fno - warn - orphans #
module Main (main) where
import Inspector
import qualified Inspector.TestVector.Types as Type
import qualified Inspector.TestVector.Value as Value
import Foundation
import Foundation.Check (Arbitrary... | |
3a4971e5dd65560ed24034e0ed0699890456899a89941bd8a8f24cf21409f258 | hasktorch/hasktorch | Main.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE PolyKin... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/4e846fdcd89df5c7c6991cb9d6142007a6bb0a58/examples/static-xor-mlp/Main.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
------------------------------------------------------------------------------
------------------------------------------------------------------------------ | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE PolyKinds #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplic... |
6c41df4b5248a391f2563e9984d80d61492d54256ec6bf443267f04c94960fd1 | rescript-lang/rescript-compiler | flow_ast_utils.mli |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/0f3c02b13cb8a9c5e2586541622f4a0f5f561216/jscomp/js_parser/flow_ast_utils.mli | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
56342440755a34f4b0fc13373aeea28dd547f0cae737a0dd8803d843e4999051 | ucsd-progsys/liquidhaskell | Build.hs | {-# LANGUAGE OverloadedStrings #-}
module Test.Build where
import qualified Shelly as Sh
import Shelly (Sh)
import Test.Groups
import Test.Options (Options(..))
import System.Exit (exitSuccess, exitFailure, exitWith)
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Sys... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/a2958c5c60ba82270259434fd1e44547dc45febb/tests/harness/Test/Build.hs | haskell | # LANGUAGE OverloadedStrings #
| Wrapper around runProcess that just returns the exit code.
| Build using cabal, selecting the project file from the
`LIQUID_CABAL_PROJECT_FILE` environment variable if possible, otherwise using
the default.
^ Test groups to build
| Runs stack on the given test groups
Enables that... |
module Test.Build where
import qualified Shelly as Sh
import Shelly (Sh)
import Test.Groups
import Test.Options (Options(..))
import System.Exit (exitSuccess, exitFailure, exitWith)
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.IO as T
import System.Process.Typed
import System.Env... |
3717b2a3c037d2beb15cec61d444a4e03d07aa9e620bfd97b49b9c6863795014 | jacius/lispbuilder | functions.lisp | ;;;;; Converted from the "Functions" Processing example at:
;;;;; ""
;;;;; (C)2006 Luke J Crook
(in-package #:sdl-gfx-examples)
(defun draw-target (xloc yloc size num)
(let ((grayvalues (sdl:cast-to-int (/ 255 num)))
(steps (sdl:cast-to-int (/ size num))))
(dotimes (i num)
(sdl:with-color (col (sdl:col... | null | https://raw.githubusercontent.com/jacius/lispbuilder/e693651b95f6818e3cab70f0074af9f9511584c3/lispbuilder-sdl-gfx/examples/functions.lisp | lisp | Converted from the "Functions" Processing example at:
""
(C)2006 Luke J Crook |
(in-package #:sdl-gfx-examples)
(defun draw-target (xloc yloc size num)
(let ((grayvalues (sdl:cast-to-int (/ 255 num)))
(steps (sdl:cast-to-int (/ size num))))
(dotimes (i num)
(sdl:with-color (col (sdl:color :r (* i grayvalues) :g (* i grayvalues) :b (* i grayvalues)))
(sdl-gfx:draw-filled-ellipse (... |
9917add03c220ccc6e0a14ef8eddf6407601ba9dc8a785587d9f72b5bf951dfa | runtimeverification/haskell-backend | Sorts.hs | |
Module : . Rewrite . SMT.Representation . Sorts
Description : Builds an SMT representation for sorts .
Copyright : ( c ) Runtime Verification , 2019 - 2021
License : BSD-3 - Clause
Maintainer :
Module : Kore.Rewrite.SMT.Representation.Sorts
Description : Builds an SMT representati... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/7c5bb857080b60e57ac1d72d88ffe63faf15a718/kore/src/Kore/Rewrite/SMT/Representation/Sorts.hs | haskell | Maybe
Maybe monad | |
Module : . Rewrite . SMT.Representation . Sorts
Description : Builds an SMT representation for sorts .
Copyright : ( c ) Runtime Verification , 2019 - 2021
License : BSD-3 - Clause
Maintainer :
Module : Kore.Rewrite.SMT.Representation.Sorts
Description : Builds an SMT representati... |
cb7cfff7986594e1ff3b4c076ecf0f91c621f3676b49b0d3a5a143ba073d128d | yyna/polylith-example | core.clj | (ns greenlabs.rest-api.core
(:gen-class)
(:require [greenlabs.rest-api.handler :as handler]
[muuntaja.core :as m]
[reitit.coercion.spec]
[reitit.ring :as ring]
[reitit.ring.coercion :as rrc]
[reitit.ring.middleware.muuntaja :as muuntaja]
[reiti... | null | https://raw.githubusercontent.com/yyna/polylith-example/ef775e02269d2fbee8a599622e6d5d7b1b2dc73d/bases/rest-api/src/greenlabs/rest_api/core.clj | clojure | (ns greenlabs.rest-api.core
(:gen-class)
(:require [greenlabs.rest-api.handler :as handler]
[muuntaja.core :as m]
[reitit.coercion.spec]
[reitit.ring :as ring]
[reitit.ring.coercion :as rrc]
[reitit.ring.middleware.muuntaja :as muuntaja]
[reiti... | |
7f3156a45e65114b2bb8d1a9fea004527d573b6452dadf704c47494f4428d6b1 | ndpar/erlang | frequency_reliable.erl | %%
F.Cesarini & S.Thomson , Erlang Programming , p.150 .
%% Reliable Client/Server
%%
%% Based on frequency2.erl
%%
Test 1 : Kill the client
%%
1 > frequency_reliable : start ( ) .
%% ok
2 > frequency_reliable : allocate ( ) .
%% {ok,10}
3 > frequency_reliable : allocate ( ) .
%% {ok,11}
4 > exit(self ( ) ,... | null | https://raw.githubusercontent.com/ndpar/erlang/e215841a1d370e0fc5eb6b9ff40ea7ae78fc8763/src/frequency_reliable.erl | erlang |
Reliable Client/Server
Based on frequency2.erl
ok
{ok,10}
{ok,11}
** exception exit: killed
5> frequency_reliable:allocate().
{ok,10}
{ok,11}
ok
{ok,10}
true
Start function to create and initialize the server
Client functions | F.Cesarini & S.Thomson , Erlang Programming , p.150 .
Test 1 : Kill the client
1 > frequency_reliable : start ( ) .
2 > frequency_reliable : allocate ( ) .
3 > frequency_reliable : allocate ( ) .
4 > exit(self ( ) , kill ) .
6 > frequency_reliable : allocate ( ) .
Test 2 : Kill the server
1 > frequenc... |
e9f8754e1d362494c716be0a331b55315f1144c40fda5e5ebd6cfa2d270983cc | earl-ducaine/cl-garnet | pixmap-lab.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : DEMO - ANIMATOR ; Base : 10 -*-
;;
(defpackage :pixmap-lab
(:use :common-lisp :kr)
(:export do-go do-stop))
(in-package :pixmap-lab)
(defparameter agg nil)
(defparameter *top-win* nil)
(defparameter *xlib-display* nil)
(defparameter *pixmap-lab-std-out* *sta... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/bone-yard/pixmap-lab.lisp | lisp | Syntax : Common - Lisp ; Package : DEMO - ANIMATOR ; Base : 10 -*-
(load "src/gem/anti-alias-graphics.lisp")
(xlib::describe-trace (get-the-xlib-display *top-window*))
closing side.
(print (starts-with-p "foobar" "foo")) ; T
NIL
exclude x-render symbols
(defconstant +x-polyfillarc+ 71)
Intern... |
(defpackage :pixmap-lab
(:use :common-lisp :kr)
(:export do-go do-stop))
(in-package :pixmap-lab)
(defparameter agg nil)
(defparameter *top-win* nil)
(defparameter *xlib-display* nil)
(defparameter *pixmap-lab-std-out* *standard-output*)
(load "/home/rett/dev/garnet/cl-garnet/macro-patch.lisp")
(defun get-th... |
867f033a1a9730477648fa14f00b885c465318576a2bf578a9b455a7d7f1ee84 | jeapostrophe/racket-langserver | error-codes.rkt | #lang racket/base
;; Defined by JSON RPC
(define PARSE-ERROR -32700)
(define INVALID-REQUEST -32600)
(define METHOD-NOT-FOUND -32601)
(define INVALID-PARAMS -32602)
(define INTERNAL-ERROR -32603)
(define SERVER-ERROR-START -32099)
(define SERVER-ERROR-END -32000)
(define SERVER-NOT-INITIALIZED -32002)
(define UNKNOWN-... | null | https://raw.githubusercontent.com/jeapostrophe/racket-langserver/1a675e5bac122a4269934cb100e892e00997f304/error-codes.rkt | racket | Defined by JSON RPC | #lang racket/base
(define PARSE-ERROR -32700)
(define INVALID-REQUEST -32600)
(define METHOD-NOT-FOUND -32601)
(define INVALID-PARAMS -32602)
(define INTERNAL-ERROR -32603)
(define SERVER-ERROR-START -32099)
(define SERVER-ERROR-END -32000)
(define SERVER-NOT-INITIALIZED -32002)
(define UNKNOWN-ERROR-CODE -32001)
D... |
42078a8a3fefa34233822577dfe64987ee47abe409396ab64bad60beb2527a6a | rems-project/lem | path.mli | (**************************************************************************)
(* Lem *)
(* *)
, University of Cambridge
, INRIA Paris -... | null | https://raw.githubusercontent.com/rems-project/lem/a839114e468119d9ac0868d7dc53eae7f3cc3a6c/src/path.mli | ocaml | ************************************************************************
Lem
... | , University of Cambridge
, INRIA Paris - Rocquencourt
, University of Cambridge
, University of Cambridge
, University of Cambridge ( while working on Lem )
... |
455c33a190971c12f34b4584f6d3002e0e4b3a8e9f9b6860daf2462c2d813dc3 | volhovm/orgstat | Script.hs | -- | Script output type. We launch the executable asked after
-- injecting the environment variables related to the report.
module OrgStat.Outputs.Script
( processScriptOutput
) where
import Universum
import Control.Lens (views)
import qualified Data.Map.Strict as M
import System.Environment (lookupEnv... | null | https://raw.githubusercontent.com/volhovm/orgstat/92d55971be73d82f2e94435488654d7a14a12c0f/src/OrgStat/Outputs/Script.hs | haskell | | Script output type. We launch the executable asked after
injecting the environment variables related to the report.
| Processes script output.
Considering all the reports if none are specified.
Set env variables
logWarning $ "1: " <> show org
Execute script
"/bin/env sh " <> cmdArgument
Restore the old... |
module OrgStat.Outputs.Script
( processScriptOutput
) where
import Universum
import Control.Lens (views)
import qualified Data.Map.Strict as M
import System.Environment (lookupEnv, setEnv, unsetEnv)
import System.Process (callCommand)
import OrgStat.Ast
import OrgStat.Config (confReports, crName)
impo... |
4f72bab31581c8273481afebefa49c2ff6733495a46d12692f45775ab956ce73 | mattsta/er | er_pool.erl | -module(er_pool).
-behaviour(gen_server).
%% gen_server callbacks
-export([init/1,
handle_call/3, handle_cast/2,
handle_info/2, terminate/2, code_change/3]).
%% api callbacks
-export([start_link/0, start_link/1, start_link/3, start_link/4]).
-export([start_link_nameless/2, start_link_nameless/3, sta... | null | https://raw.githubusercontent.com/mattsta/er/7ac6dccf4952ddf32d921b6548026980a3db70c7/src/er_pool.erl | erlang | gen_server callbacks
api callbacks
retry count
retry every-N ms
====================================================================
api callbacks
====================================================================
With names
Without names
====================================================================
ge... | -module(er_pool).
-behaviour(gen_server).
-export([init/1,
handle_call/3, handle_cast/2,
handle_info/2, terminate/2, code_change/3]).
-export([start_link/0, start_link/1, start_link/3, start_link/4]).
-export([start_link_nameless/2, start_link_nameless/3, start_link_nameless/4]).
-record(state, {ip... |
37067d142612bcedf6012c2ae595047f2ba10fecbf601a57af2a3fe0f75d0e42 | janestreet/core_unix | time_functor.ml | *
Outside of Core Time appears to be a single module with a number of submodules :
- Time
- Span
- Ofday
- Zone
The reality under the covers is n't as simple for a three reasons :
- We want as much Time functionality available to Core as possible , and Core modules
should n... | null | https://raw.githubusercontent.com/janestreet/core_unix/abfad608bb4ab04d16478a081cc284a88c3b3184/time_float_unix/src/time_functor.ml | ocaml | Explicitly ignoring isdst, wday, yday (they are redundant with the other fields
and the [zone] argument)
= 8 + 1 + 12
* Pause and don't allow events to interrupt.
* Pause but allow events to interrupt. | *
Outside of Core Time appears to be a single module with a number of submodules :
- Time
- Span
- Ofday
- Zone
The reality under the covers is n't as simple for a three reasons :
- We want as much Time functionality available to Core as possible , and Core modules
should n... |
2f1b60f6ff426959d78e306be9f2e40b3d6e6113c5dac2184e959f84e358be4d | sgbj/MaximaSharp | test_readbase_lisp.lisp | (defun $test_readbase_lisp () '((mlist) 1 2 3 4 10 20 30 40))
| null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/tests/test_readbase_lisp.lisp | lisp | (defun $test_readbase_lisp () '((mlist) 1 2 3 4 10 20 30 40))
| |
16161e673bc927dfcd8563d2f004d95203d79440b9fef7585b56b7a64432bc80 | ekmett/ekmett.github.com | Lift.hs | # OPTIONS_GHC -cpp - undecidable - instances #
-------------------------------------------------------------------------------------------
-- |
-- Module : Control.Functor.Combinators.Lift
Copyright : 2008
-- License : BSD
--
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable (f... | null | https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/category-extras/_darcs/pristine/src/Control/Functor/Combinators/Lift.hs | haskell | -----------------------------------------------------------------------------------------
|
Module : Control.Functor.Combinators.Lift
License : BSD
Stability : experimental
Portability : non-portable (functional-dependencies)
transform a pair of functors with a bifunctor deriving a new functor.
this subsumes f... | # OPTIONS_GHC -cpp - undecidable - instances #
Copyright : 2008
Maintainer : < >
module Control.Functor.Combinators.Lift
( Lift(Lift,runLift)
, (:*:), runProductF
, (:+:), runCoproductF
, Ap, runAp, mkAp
) where
import Control.Applicative
import Control.Category.Hask
import Control.Functor
imp... |
3f73fd8c68360fdae24f350578a4a5479fdc19569a9f8709a25759f920a0fd5a | nasa/Common-Metadata-Repository | echo10.clj | (ns cmr.ingest.services.granule-bulk-update.utils.echo10
"Contains functions for updating ECHO10 granule xml metadata."
(:require
[clojure.data.xml :as xml]
[clojure.zip :as zip]
[cmr.common.xml :as cx]))
(def ^:private echo10-main-schema-elements
"Defines the element tags that come after OnlineAccessUR... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/39625dbee824a8d27644e60921e893fbb9282a2c/ingest-app/src/cmr/ingest/services/granule_bulk_update/utils/echo10.clj | clojure | at an OnlineResources element, replace the node with updated value
no action needs to be taken, move to the next node
at the passed in element, append to the node with the updated values
at an element after the passed in element add to the left
no action needs to be taken, move to the next node
at the end of the ... | (ns cmr.ingest.services.granule-bulk-update.utils.echo10
"Contains functions for updating ECHO10 granule xml metadata."
(:require
[clojure.data.xml :as xml]
[clojure.zip :as zip]
[cmr.common.xml :as cx]))
(def ^:private echo10-main-schema-elements
"Defines the element tags that come after OnlineAccessUR... |
4513b26d8727e1459bdc019c34ccae5aa4b743fd45f5a11b9da79c528bc8cb7a | janestreet/core_bench | exception_tests.ml | open Core
open Core_bench
exception Noarg
exception Arg1 of int
let get () = if Random.bool () then 10 else 10
let trywith =
Bench.Test.create
~name:"trywith"
(let x = get () in
let y = get () in
fun () ->
ignore
(try x with
| _ -> y))
;;
let trywithraise0 =
Bench.Tes... | null | https://raw.githubusercontent.com/janestreet/core_bench/f319e14b458131d825cbba51ed25a8168ce5404e/test/exception_tests.ml | ocaml | open Core
open Core_bench
exception Noarg
exception Arg1 of int
let get () = if Random.bool () then 10 else 10
let trywith =
Bench.Test.create
~name:"trywith"
(let x = get () in
let y = get () in
fun () ->
ignore
(try x with
| _ -> y))
;;
let trywithraise0 =
Bench.Tes... | |
c326a8844a3d1aa3707624a79b0d12af2d0764a8960fdb03be315a0e2e21316a | huangz1990/SICP-answers | 38-fold-left.scm | 38-fold-left.scm
(define (fold-left op initial sequence)
(define (iter result rest)
(if (null? rest)
result
(iter (op result (car rest))
(cdr rest))))
(iter initial sequence))
| null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/38-fold-left.scm | scheme | 38-fold-left.scm
(define (fold-left op initial sequence)
(define (iter result rest)
(if (null? rest)
result
(iter (op result (car rest))
(cdr rest))))
(iter initial sequence))
| |
56b4c2db1c84a3d41de06ef1c23039170707812cb523dbde569358a99acb1ded | dalong0514/ITstudy | 0304Koch.lisp | ------------------------== { } = = ----------------------- ; ;
;; ;;
The Koch Snowflake , devised by Swedish mathematician ; ;
in 1904 , is one of the earliest and perhaps most familiar fractal ; ;
curves . It is created by a... | null | https://raw.githubusercontent.com/dalong0514/ITstudy/8a7f1708d11856a78016795268da67b6a7521115/004%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80/07AutoLisp/04LeeMac-Library/0304Koch.lisp | lisp | ;
;;
;
;
;
form an equilateral triangle. ;;
;;
;
;
triangle whose base is the middle segment of the line, before ... |
(defun c:koch ( / 3p a0 an d1 en l1 l2 no p1 p2 p3 p4 r1 r2 )
(setq p1 (cond ((getpoint "\nSpecify Center <0,0,0>: ")) ('(0.0 0.0 0.0)))
r1 (cond ((getdist p1 "\nSpecify Radius <1.0>: ")) (1.0))
l1 (list
(cons 10 (polar p1 (/ (* 3.0 pi) 6.0) r1))
(cons 1... |
cb784a7e0bf0ee51032307c56fad7f31c690c48b4b3da8b1cb26adbf8923f0fe | pontarius/pontarius-xmpp | DataForms.hs | # LANGUAGE NoMonomorphismRestriction #
# LANGUAGE TupleSections #
{-# LANGUAGE OverloadedStrings #-}
| XEP 0004 : Data Forms ( -0004.html )
module Network.Xmpp.Xep.DataForms where
import qualified Data.Text as Text
import Data.XML.Pickle
import qualified Data.XML.Types as XML
dataFormNs :: Text.Text
da... | null | https://raw.githubusercontent.com/pontarius/pontarius-xmpp/08e4a24e6408adb6320b4e73f7be691de060b583/source/Network/Xmpp/Xep/DataForms.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoMonomorphismRestriction #
# LANGUAGE TupleSections #
| XEP 0004 : Data Forms ( -0004.html )
module Network.Xmpp.Xep.DataForms where
import qualified Data.Text as Text
import Data.XML.Pickle
import qualified Data.XML.Types as XML
dataFormNs :: Text.Text
dataFormNs = "jabber:x:data"
dataFor... |
5c1e32b838a0ed130be2d3f347d08ce5482c49a2c2a3eccc3cb4e1647cb3a718 | BradWBeer/cl-pango | library.lisp | (in-package #:cl-pango)
(cffi:define-foreign-library :libpango
(cffi-features:darwin (:or "libpango-1.0.dylib" "libpango.dylib"))
(cffi-features:unix (:or "libpango-1.0.so" "libpango-1.0.so.0"))
(cffi-features:windows "libpango.dll"))
(cffi:load-foreign-library :libpango)
(cffi:define-foreign-library :libpan... | null | https://raw.githubusercontent.com/BradWBeer/cl-pango/ee4904d19ce22d00eb2fe17a4fe42e5df8ac8701/library.lisp | lisp | (in-package #:cl-pango)
(cffi:define-foreign-library :libpango
(cffi-features:darwin (:or "libpango-1.0.dylib" "libpango.dylib"))
(cffi-features:unix (:or "libpango-1.0.so" "libpango-1.0.so.0"))
(cffi-features:windows "libpango.dll"))
(cffi:load-foreign-library :libpango)
(cffi:define-foreign-library :libpan... | |
6088157f34fcef5d20414a67b2c30da322ce7e46d548390cfd6d36a1d31fda44 | rubenbarroso/EOPL | 2-4.scm | (let ((time-stamp "Time-stamp: <2001-05-09 19:28:56 dfried>"))
(eopl:printf "2-4.scm ~a~%" (substring time-stamp 13 29)))
(define create-queue
(lambda ()
(let ((q-in '())
(q-out '()))
(letrec
((reset-queue
(lambda ()
(set! q-in '())
(set! q-out '())... | null | https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/interps/2-4.scm | scheme | (let ((time-stamp "Time-stamp: <2001-05-09 19:28:56 dfried>"))
(eopl:printf "2-4.scm ~a~%" (substring time-stamp 13 29)))
(define create-queue
(lambda ()
(let ((q-in '())
(q-out '()))
(letrec
((reset-queue
(lambda ()
(set! q-in '())
(set! q-out '())... | |
622f1947ddaf19b533e9c503b373d8c80683876688e90e466704f99828af6adb | yesodweb/wai | WaiAppEmbeddedTest.hs | # LANGUAGE TemplateHaskell , OverloadedStrings #
module WaiAppEmbeddedTest (embSpec) where
import Codec.Compression.GZip (compress)
import EmbeddedTestEntries
import Network.Wai
import Network.Wai.Application.Static (staticApp)
import Network.Wai.Test
import Test.Hspec
import WaiAppStatic.Storage.Embedded
import WaiAp... | null | https://raw.githubusercontent.com/yesodweb/wai/f59e577f865d017b4726826ac5586bb916cf315b/wai-app-static/test/WaiAppEmbeddedTest.hs | haskell | # LANGUAGE TemplateHaskell , OverloadedStrings #
module WaiAppEmbeddedTest (embSpec) where
import Codec.Compression.GZip (compress)
import EmbeddedTestEntries
import Network.Wai
import Network.Wai.Application.Static (staticApp)
import Network.Wai.Test
import Test.Hspec
import WaiAppStatic.Storage.Embedded
import WaiAp... | |
320c62122616a50c636c2b4b7299125db18fe3e63c3a6c5fa52a8d193ff4f69c | ghc/nofib | Encode.hs |
- Encode Mk 2 , using a prefix table for the codes
-
- , Systems Research , British Telecom Laboratories 1992
- Encode Mk 2, using a prefix table for the codes
-
- Paul Sanders, Systems Research, British Telecom Laboratories 1992
-}
module Encode (encode) where
import Defaults
import PTTrees
-- for... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/real/compress/Encode.hs | haskell | for convenience we make the code table type explicit
encode sets up the arguments for the real function. |
- Encode Mk 2 , using a prefix table for the codes
-
- , Systems Research , British Telecom Laboratories 1992
- Encode Mk 2, using a prefix table for the codes
-
- Paul Sanders, Systems Research, British Telecom Laboratories 1992
-}
module Encode (encode) where
import Defaults
import PTTrees
type ... |
3eae744eb3a9d6bde17a793383f54a2d0491d3a05f319fac5fc052701bc64b78 | mflatt/shrubbery-rhombus-0 | delta-text.rkt | #lang racket/base
(require racket/class)
(provide make-delta-text)
(define delta-text%
(class object%
(init-field next ; the text that this is a delta from
at-pos ; the start of a line where whitespace is inserted or deleted
delta) ; amount to insert or (when negative) delet... | null | https://raw.githubusercontent.com/mflatt/shrubbery-rhombus-0/3a27b257a49d2248a379d06dc15cee7c8959459a/shrubbery/private/delta-text.rkt | racket | the text that this is a delta from
the start of a line where whitespace is inserted or deleted
amount to insert or (when negative) delete
No effect before this position:
Simple token shifting after this position (new coordinates):
The range from `pre` to `post` is a whitespace token,
either newly extended to new... | #lang racket/base
(require racket/class)
(provide make-delta-text)
(define delta-text%
(class object%
(super-new)
(define pre at-pos)
(define post (let-values ([(s e) (send next get-token-range pre)])
(unless (= pre s) (error "bad delta construction"))
(+ e delta)... |
543ba85e623bcb003e87558f0e37f09fff76ad8cbb281ebf7dee71b6dce4bddb | yetanalytics/flint | query.cljc | (ns com.yetanalytics.flint.format.query
(:require [clojure.string :as cstr]
[com.yetanalytics.flint.format :as f]
[com.yetanalytics.flint.format.axiom]
[com.yetanalytics.flint.format.prologue]
[com.yetanalytics.flint.format.triple]
[com.yetanalytics.flint.fo... | null | https://raw.githubusercontent.com/yetanalytics/flint/85a5435ce9e04dd7e16697783dffd05a6dc240cb/src/main/com/yetanalytics/flint/format/query.cljc | clojure | (ns com.yetanalytics.flint.format.query
(:require [clojure.string :as cstr]
[com.yetanalytics.flint.format :as f]
[com.yetanalytics.flint.format.axiom]
[com.yetanalytics.flint.format.prologue]
[com.yetanalytics.flint.format.triple]
[com.yetanalytics.flint.fo... | |
725d151ce6b11aeca4eda9235f12847347e2a3a7b65e362ccedebffd81915dae | mhuebert/re-db | dev.clj | (ns re-db.dev
(:require [nextjournal.clerk :as clerk]
[nextjournal.clerk.config :as config]
[shadow.cljs.devtools.api :as shadow]))
(defn start
{:shadow/requires-server true}
[]
;; local experimenting
(try (compile 're-db.scratch.Suspension) (catch Exception e nil))
(shadow/watch ... | null | https://raw.githubusercontent.com/mhuebert/re-db/54ed1c2c4c47b4344710ff881c5a9ef1f2b5faed/src/notebooks/re_db/dev.clj | clojure | local experimenting | (ns re-db.dev
(:require [nextjournal.clerk :as clerk]
[nextjournal.clerk.config :as config]
[shadow.cljs.devtools.api :as shadow]))
(defn start
{:shadow/requires-server true}
[]
(try (compile 're-db.scratch.Suspension) (catch Exception e nil))
(shadow/watch :clerk)
(swap! config/!... |
1a4e0801277ff6d8bb03d5c18ae89df8340b9ff1797c10a7320c2d1bb206141e | eburlingame/arinc-parser | field_defs.clj | (ns arinc424.field-defs
(:require [arinc424.fields.route-type :refer :all]
[arinc424.fields.latlong :refer :all]
[arinc424.fields.navaid-class :refer :all]
[arinc424.helpers :refer :all]))
Types -plane.com/update/data/424-15s.pdf ( Ch . 5 , pg . 66 )
; TODO: Add spec defns here... | null | https://raw.githubusercontent.com/eburlingame/arinc-parser/1bef86924aef21888c27301bf51af90262ec4c52/src/arinc424/field_defs.clj | clojure | TODO: Add spec defns here
Field structure:
FIELDs looks like:
{
:len 20
:examples ["example1" "example2" ...]
:value-fn (fn (value) result)
}
or
{
:len 10
:examples ["example1" "example2" ...]
:values {
...
}
}
if the :values struct is specified... | (ns arinc424.field-defs
(:require [arinc424.fields.route-type :refer :all]
[arinc424.fields.latlong :refer :all]
[arinc424.fields.navaid-class :refer :all]
[arinc424.helpers :refer :all]))
Types -plane.com/update/data/424-15s.pdf ( Ch . 5 , pg . 66 )
: match " [ A - Z]{... |
7834c9668f586361f53d764db99fbb57d41936886457c09b9559d478e6b271bd | mnieper/unsyntax | runtime-exports.scm | Copyright © ( 2020 ) .
;; This file is part of unsyntax.
;; Permission is hereby granted, free of charge, to any person
;; obtaining a copy of this software and associated documentation files
( the " Software " ) , to deal in the Software without restriction ,
;; including without limitation the rights to use... | null | https://raw.githubusercontent.com/mnieper/unsyntax/cd12891805a93229255ff0f2c46cf0e2b5316c7c/src/unsyntax/stdlibs/runtime-exports.scm | scheme | This file is part of unsyntax.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
The above copyright notice and this permission n... | Copyright © ( 2020 ) .
( the " Software " ) , to deal in the Software without restriction ,
publish , distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Software is furnished to do so ,
portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITH... |
c7957609822ecaf64db31d0f96aad12a2b0e9938ecad1af36a852e2cbfa97eed | FieryCod/holy-lambda-ring-adapter | routes.clj | (ns example.routes
(:require
[reitit.coercion.malli :as coercion-malli]
[reitit.ring.middleware.muuntaja :as muuntaja]
[reitit.ring.coercion :as coercion]
[reitit.ring.middleware.exception :as exception]
[muuntaja.core :as m]
[ring.util.response :as response]
[reitit.ring.middleware.multipart :as... | null | https://raw.githubusercontent.com/FieryCod/holy-lambda-ring-adapter/bb78262e0694a343c2d03ac9f13c0ad0980e77cc/examples/native/src/example/routes.clj | clojure | query-params & form-params
content-negotiation
encoding response body
exception handling
decoding request body
coercing response bodys
coercing request parameters
multipart | (ns example.routes
(:require
[reitit.coercion.malli :as coercion-malli]
[reitit.ring.middleware.muuntaja :as muuntaja]
[reitit.ring.coercion :as coercion]
[reitit.ring.middleware.exception :as exception]
[muuntaja.core :as m]
[ring.util.response :as response]
[reitit.ring.middleware.multipart :as... |
7dacbe98f368700b4bb1be39bf2f2f20c43311fcba27f64e09c2bf0e8ceaf273 | dQuadrant/kuber | Core.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
module Kuber.Server.Core where
import qualified Data.Text as T
import qualified Data.Aeson as A
import Data.Text.Lazy.Encoding as TL
import qualified Data.Text.Lazy as TL
import Cardano.Api
import Control.Exception (throw, try)
import qualified Da... | null | https://raw.githubusercontent.com/dQuadrant/kuber/ead85f86ee3b38f9533ff731e09fa17bd693335d/server/src/Kuber/Server/Core.hs | haskell | # LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
module Kuber.Server.Core where
import qualified Data.Text as T
import qualified Data.Aeson as A
import Data.Text.Lazy.Encoding as TL
import qualified Data.Text.Lazy as TL
import Cardano.Api
import Control.Exception (throw, try)
import qualified Da... | |
e28bad5355cd72487f3966afab86a2badb936a842f3283818718551c9cefb15f | luc-tielen/llvm-codegen | ModuleBuilder.hs | # LANGUAGE TypeFamilies , MultiParamTypeClasses , UndecidableInstances #
module LLVM.Codegen.ModuleBuilder
( ModuleBuilderT
, ModuleBuilder
, runModuleBuilderT
, runModuleBuilder
, MonadModuleBuilder
, Module(..)
, Definition(..)
, ParameterName(..)
, FunctionAttribute(..)
, function
, global
,... | null | https://raw.githubusercontent.com/luc-tielen/llvm-codegen/84df715cb92c23a512a4a44ca92f592f676d3610/lib/LLVM/Codegen/ModuleBuilder.hs | haskell | Add more as needed..
# INLINEABLE liftModuleBuilderState #
# INLINEABLE liftModuleBuilderState #
This is done to avoid functions emitted in the body that not automatically copy the same attributes
# INLINEABLE addType #
0-terminated UTF8 string
This definition will end up before the function this is used in
NOTE: ... | # LANGUAGE TypeFamilies , MultiParamTypeClasses , UndecidableInstances #
module LLVM.Codegen.ModuleBuilder
( ModuleBuilderT
, ModuleBuilder
, runModuleBuilderT
, runModuleBuilder
, MonadModuleBuilder
, Module(..)
, Definition(..)
, ParameterName(..)
, FunctionAttribute(..)
, function
, global
,... |
5741b6e9c9e374abd6b978d649ac1481a668bd2aa22970607b5de4c2107a05dd | timmolderez/inspector-jay | core.clj | Copyright ( c ) 2013 - 2015 .
;
; All rights reserved. This program and the accompanying materials
; are made available under the terms of the 3-Clause BSD License
; which accompanies this distribution, and is available at
; -3-Clause
(ns inspector-jay.core
"Inspector Jay is a graphical inspector that lets you e... | null | https://raw.githubusercontent.com/timmolderez/inspector-jay/0035beae482c49e0f215a54e17baf405e42f2398/src/inspector_jay/core.clj | clojure |
All rights reserved. This program and the accompanying materials
are made available under the terms of the 3-Clause BSD License
which accompanies this distribution, and is available at
-3-Clause
" | Copyright ( c ) 2013 - 2015 .
(ns inspector-jay.core
"Inspector Jay is a graphical inspector that lets you examine Java/Clojure objects and data structures."
{:author "Tim Molderez"}
(:gen-class
:name inspectorjay.InspectorJay
:prefix java-
:methods [#^{:static true} [inspect [Object] Object]])
... |
808048f14a3f307c4b6dce3af4e89134ea3c8481097946f8127bca1e72e59852 | xvw/preface | bounded_meet_semilattice.ml | module Core_via_meet_and_top
(Req : Preface_specs.Bounded_meet_semilattice.WITH_MEET_AND_TOP) =
Req
module Core_over_meet_semilattice_and_via_top
(Meet_req : Preface_specs.Meet_semilattice.CORE)
(Req : Preface_specs.Bounded_meet_semilattice.WITH_TOP
with type t = Meet_req.t) =
struct
inclu... | null | https://raw.githubusercontent.com/xvw/preface/f908ba45e5d58c330781e61162628bbd7c240145/lib/preface_make/bounded_meet_semilattice.ml | ocaml | module Core_via_meet_and_top
(Req : Preface_specs.Bounded_meet_semilattice.WITH_MEET_AND_TOP) =
Req
module Core_over_meet_semilattice_and_via_top
(Meet_req : Preface_specs.Meet_semilattice.CORE)
(Req : Preface_specs.Bounded_meet_semilattice.WITH_TOP
with type t = Meet_req.t) =
struct
inclu... | |
94c24e1a3685bac8f44fb518f489e19882b4c356210f8503535ea82739a17f29 | tfausak/monadoc-5 | PingSpec.hs | module Monadoc.Handler.PingSpec where
import qualified Monadoc
import qualified Monadoc.Handler.Ping as Ping
import Monadoc.Prelude
import qualified Monadoc.Type.App as App
import qualified Monadoc.Type.Config as Config
import qualified Monadoc.Type.Context as Context
import qualified Network.HTTP.Types as Http
import... | null | https://raw.githubusercontent.com/tfausak/monadoc-5/5361dd1870072cf2771857adbe92658118ddaa27/src/test/Monadoc/Handler/PingSpec.hs | haskell | module Monadoc.Handler.PingSpec where
import qualified Monadoc
import qualified Monadoc.Handler.Ping as Ping
import Monadoc.Prelude
import qualified Monadoc.Type.App as App
import qualified Monadoc.Type.Config as Config
import qualified Monadoc.Type.Context as Context
import qualified Network.HTTP.Types as Http
import... | |
0eeaa619c0d1f183df135f8ffdde2ccbf0939a41b3a9f625a24dd98618367833 | facebook/duckling | Tests.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
module Duckling.Ordinal.KO.Tests
( tests ) where
import Prelude
import Data.String
import Test.Tasty
imp... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/tests/Duckling/Ordinal/KO/Tests.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Ordinal.KO.Tests
( tests ) where
import Prelude
import Data.String
import Test.Tasty
import Duckling.Dimensions.Types
import Duckling.Ordinal.KO.Corpus
import Duckling.Testing.Asserts
tests :: TestTree
tests = testGroup "KO Tests"
[ makeCorpusT... |
c955ac30b54b19b8553e787c02a4390ebbd79c4a43c32f24cee56d5f352ba289 | c4-project/c4f | statement_traverse.ml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fir/src/statement_traverse.ml | ocaml | * Does the legwork of implementing a particular type of traversal over
statements.
* This rather expansive functor takes a method of lifting various
sub-traversals of some [Elt] to a traversal for [Top], and instantiates
it for a load of common values of [Elt].
* Does the legwork of implementing a parti... | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
879ea4052102a492f31f8d525f91bbdab4dd1696b2fe10865e9efb2198a7c990 | vmchale/kempe | Pretty.hs | {-# LANGUAGE OverloadedStrings #-}
module Kempe.Asm.Pretty ( i4
, prettyLabel
) where
import Data.Semigroup ((<>))
import Prettyprinter (Doc, indent, pretty)
i4 :: Doc ann -> Doc ann
i4 = indent 4
prettyLabel :: Word -> Doc ann
prettyLabel l = "km... | null | https://raw.githubusercontent.com/vmchale/kempe/05ed82ad51704c092e9cb60ff3d034e4e4bb7407/src/Kempe/Asm/Pretty.hs | haskell | # LANGUAGE OverloadedStrings # |
module Kempe.Asm.Pretty ( i4
, prettyLabel
) where
import Data.Semigroup ((<>))
import Prettyprinter (Doc, indent, pretty)
i4 :: Doc ann -> Doc ann
i4 = indent 4
prettyLabel :: Word -> Doc ann
prettyLabel l = "kmp_" <> pretty l
|
65775b68bff858a8db6080b0d198c327cdbcc48601dd0abb5a2a2269827b7826 | fulcro-legacy/fulcro-lein-template | user.clj | (ns {{name}}.model.user
(:require
[com.wsscode.pathom.connect :as pc]
[{{name}}.server-components.pathom-wrappers :refer [defmutation defresolver]]
[taoensso.timbre :as log]))
(def user-database (atom {}))
(defresolver all-users-resolver
"Resolve queries for :all-users."
[env input]
{;;GIVEN nothi... | null | https://raw.githubusercontent.com/fulcro-legacy/fulcro-lein-template/41195fc3b5e4054ee8b0cfff379bbadb006be046/resources/leiningen/new/fulcro/src/main/app/model/user.clj | clojure | GIVEN nothing
I can output all users. NOTE: only ID is needed...other resolvers resolve the rest
GIVEN a user ID
I can produce a user's details
Look up the user (e.g. in a database), and return what you promised
GIVEN a user ID
I can produce address details
Returning the user id allows the UI to query for the re... | (ns {{name}}.model.user
(:require
[com.wsscode.pathom.connect :as pc]
[{{name}}.server-components.pathom-wrappers :refer [defmutation defresolver]]
[taoensso.timbre :as log]))
(def user-database (atom {}))
(defresolver all-users-resolver
"Resolve queries for :all-users."
[env input]
(log/info "All... |
87c5d73166593fef5b88c8f465a03d7b9714e1260c830ce37220112ae48aad61 | ocaml-flambda/ocaml-jst | obj.mli | # 1 "obj.mli"
(**************************************************************************)
(* *)
(* OCaml *)
(* *... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/549d75742504bb3df218cc8bcc1abf3e9ddd3217/stdlib/obj.mli | ocaml | ************************************************************************
OCaml
... | # 1 "obj.mli"
, 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! Stdlib
type t
@since 4.12
external repr : 'a -> t = "%identity"
external obj : ... |
7971d37cbb335e80733b24ad30c7a6366c64c24597b1394bb735bcbd4ef24740 | seckcoder/course-compiler | s1_36.rkt | (if (>= 2 1)
42
0)
| null | https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/s1_36.rkt | racket | (if (>= 2 1)
42
0)
| |
6b0969ca87886ca552edbe74c511c19c24ad7a91b010d318544df8e981941d29 | chef-boneyard/bookshelf | bksw_wm_object.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
%% ex: ts=4 sw=4 et
@author < >
Copyright 2012 - 2013 Opscode , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compl... | null | https://raw.githubusercontent.com/chef-boneyard/bookshelf/f9584e766d16d090812c8f7064651882dddc2512/src/bksw_wm_object.erl | erlang | ex: ts=4 sw=4 et
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Override
R... | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
@author < >
Copyright 2012 - 2013 Opscode , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the Licens... |
a67e6472a2098d102b624e22b16c716502c732e1550fcd4a9a7a4792a56a3a75 | lispbuilder/lispbuilder | ttf-font-data.lisp |
(in-package #:lispbuilder-sdl)
(export '*ttf-font-vera* :lispbuilder-sdl)
(defparameter *ttf-font-vera*
(make-instance 'ttf-font-definition
:size 32
:filename (merge-pathnames "Vera.ttf" *default-font-path*)))
| null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-sdl-ttf/sdl-ttf/ttf-font-data.lisp | lisp |
(in-package #:lispbuilder-sdl)
(export '*ttf-font-vera* :lispbuilder-sdl)
(defparameter *ttf-font-vera*
(make-instance 'ttf-font-definition
:size 32
:filename (merge-pathnames "Vera.ttf" *default-font-path*)))
| |
1139fce0f7724a053541d7a449c5d63c0cb3cbcc3eb1ca087978dbfdaead31ce | portkey-cloud/aws-clj-sdk | _2016-11-23.clj | (ns portkey.aws.states.-2016-11-23 (:require [portkey.aws]))
(def
endpoints
'{"ap-northeast-1"
{:credential-scope {:service "states", :region "ap-northeast-1"},
:ssl-common-name "states.ap-northeast-1.amazonaws.com",
:endpoint "-northeast-1.amazonaws.com",
:signature-version :v4},
"eu-west-1"
{:... | null | https://raw.githubusercontent.com/portkey-cloud/aws-clj-sdk/10623a5c86bd56c8b312f56b76ae5ff52c26a945/src/portkey/aws/states/_2016-11-23.clj | clojure | (ns portkey.aws.states.-2016-11-23 (:require [portkey.aws]))
(def
endpoints
'{"ap-northeast-1"
{:credential-scope {:service "states", :region "ap-northeast-1"},
:ssl-common-name "states.ap-northeast-1.amazonaws.com",
:endpoint "-northeast-1.amazonaws.com",
:signature-version :v4},
"eu-west-1"
{:... | |
a76ff682bb8b5c059207418b6d96f378f1b35910a5253b180e0cdb9dc1bde82a | trptcolin/reply | JlineInputReader.clj | (ns reply.reader.jline.JlineInputReader
(:gen-class
:extends java.io.Reader
:state state
:init init
:constructors {[clojure.lang.Associative] []}
:main false))
(defn -init [config]
[[] (atom (assoc config
:internal-queue (java.util.LinkedList.)))])
(defn -read-single [this]
(le... | null | https://raw.githubusercontent.com/trptcolin/reply/f0c730e7a6753494f9f90f02234bc040318da393/src/clj/reply/reader/jline/JlineInputReader.clj | clojure | (ns reply.reader.jline.JlineInputReader
(:gen-class
:extends java.io.Reader
:state state
:init init
:constructors {[clojure.lang.Associative] []}
:main false))
(defn -init [config]
[[] (atom (assoc config
:internal-queue (java.util.LinkedList.)))])
(defn -read-single [this]
(le... | |
d1139a6386bec1978f5bc5698728096b7df7033416e91927b272688fb195ab66 | uzh/canary | main.ml | let () =
Printf.printf "TODO\n" | null | https://raw.githubusercontent.com/uzh/canary/8e2914cc19f2e964938ff2438717d8d677c4a5b4/test/main.ml | ocaml | let () =
Printf.printf "TODO\n" | |
dfbcce25047ba96128ba40379acd1b9bcc50007282e6e225267ebe7ee17d1e9f | cram2/cram | negative-binomial.lisp | Negative binomial and distributions
, Sat Nov 25 2006 - 16:00
Time - stamp : < 2010 - 01 - 17 10:29:42EST negative-binomial.lisp >
;;
Copyright 2006 , 2007 , 2008 , 2009
Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modi... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/random/negative-binomial.lisp | lisp |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Publi... | Negative binomial and distributions
, Sat Nov 25 2006 - 16:00
Time - stamp : < 2010 - 01 - 17 10:29:42EST negative-binomial.lisp >
Copyright 2006 , 2007 , 2008 , 2009
Distributed under the terms of the GNU General Public License
it under the terms of the GNU General Public License as published by
th... |
5744e76792c211637d7cfeb61bef64678109f7459917fd4218e2c586d6b26ae7 | coq/coq | notationextern.ml | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/f66b58cc7e6a8e245b35c3858989181825c591ce/interp/notationextern.ml | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
6155723d5368a0c01ba24e82f784880e3a4b51e01de21c56fe5373a7bbb8d5a3 | jyh/metaprl | itt_set.ml | doc <:doc<
@module[Itt_set]
The @tt[Itt_set] module defines a ``set'' type, or more precisely,
it defines a type by quantified @emph{separation}. The form of the type is
$@set{x; T; P[x]}$, where $T$ is a type, and $P[x]$ is a type for
any element $x @in T$. The elements of the set type are those elem... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/itt/core/itt_set.ml | ocaml | ***********************************************************************
* TERMS *
***********************************************************************
***********************************************************************
* DISPLAY FORMS ... | doc <:doc<
@module[Itt_set]
The @tt[Itt_set] module defines a ``set'' type, or more precisely,
it defines a type by quantified @emph{separation}. The form of the type is
$@set{x; T; P[x]}$, where $T$ is a type, and $P[x]$ is a type for
any element $x @in T$. The elements of the set type are those elem... |
f7097391d7c58b5aa4c268cae7a168c57c185283d510b2119c71efc304345a4e | jlesquembre/clojars-publish-action | entrypoint.clj | (ns entrypoint
(:require
[clojure.data.xml :as xml]
[clojure.tools.deps.alpha.script.generate-manifest2 :as gen-manifest]
[clojure.zip :as zip]
[clojure.data.zip.xml :as zip-xml]
[clojure.string :as str]
[clojure.java.io :as io]
[clojure.edn :as edn]
[hf.depstar.uberjar :refer [build-j... | null | https://raw.githubusercontent.com/jlesquembre/clojars-publish-action/9420e56c7c8555802306a8673c022e2ad3e95e4c/src/entrypoint.clj | clojure | -install/blob/2ee355398e655e1d1b57e4f5ee658d087ccaea7f/src/main/resources/clojure#L342
(print (:out (sh "clojure" "-Spom")))
mvn deploy:deploy-file -Dfile="target/${jar_name}" -DpomFile=pom.xml \
-DrepositoryId=clojars -Durl=/ \
-Dclojars.username="${CLOJARS_USERNAME}" \
-Dclojars.password="${CLOJARS_PASSWO... | (ns entrypoint
(:require
[clojure.data.xml :as xml]
[clojure.tools.deps.alpha.script.generate-manifest2 :as gen-manifest]
[clojure.zip :as zip]
[clojure.data.zip.xml :as zip-xml]
[clojure.string :as str]
[clojure.java.io :as io]
[clojure.edn :as edn]
[hf.depstar.uberjar :refer [build-j... |
84834271ed26750a81c66f690572c7cf844698bd9b78fbd3b8a73e9cba8bcb6b | Octachron/codept | module.ml |
let debug fmt = Format.ifprintf Pp.err ("Debug:" ^^ fmt ^^"@.")
module Arg = struct
type 'a t = { name:Name.t option; signature:'a }
type 'a arg = 'a t
let pp pp ppf = function
| Some arg ->
Pp.fp ppf "(%a:%a)" Name.pp_opt arg.name pp arg.signature
| None -> Pp.fp ppf "()"
let sch sign = let o... | null | https://raw.githubusercontent.com/Octachron/codept/017c2d93cb45e96d2703dc2734a1b7679d4e9ccb/lib/module.ml | ocaml | * aka toplevel module
* Temporary module from namespace
* functor argument
* Ambiguous module, that could be an external module
* Type-level tags
* Signature with tracked origin
* Core module or alias
* Path.To.Target:
projecting this path may create new dependencies
Alias { name = M; path ... |
let debug fmt = Format.ifprintf Pp.err ("Debug:" ^^ fmt ^^"@.")
module Arg = struct
type 'a t = { name:Name.t option; signature:'a }
type 'a arg = 'a t
let pp pp ppf = function
| Some arg ->
Pp.fp ppf "(%a:%a)" Name.pp_opt arg.name pp arg.signature
| None -> Pp.fp ppf "()"
let sch sign = let o... |
1d6858242c772ee8ba88494f7f5b7c3f605307c561ac44bf2cec004f7a72164a | ogaml/ogaml | event.mli | module KeyEvent : sig
type t = {key : Keycode.t; shift : bool; control : bool; alt : bool}
end
module ButtonEvent : sig
type t = {button : Button.t; position : OgamlMath.Vector2i.t; shift : bool; control : bool; alt : bool}
end
type t =
| Closed
| Resized of OgamlMath.Vector2i.t
| KeyPressed ... | null | https://raw.githubusercontent.com/ogaml/ogaml/5e74597521abf7ba2833a9247e55780eabfbab78/src/core/event.mli | ocaml | module KeyEvent : sig
type t = {key : Keycode.t; shift : bool; control : bool; alt : bool}
end
module ButtonEvent : sig
type t = {button : Button.t; position : OgamlMath.Vector2i.t; shift : bool; control : bool; alt : bool}
end
type t =
| Closed
| Resized of OgamlMath.Vector2i.t
| KeyPressed ... | |
d6a208c142081ec78a61069e273b8fb44d141f6551773b89902613da0f2adeea | membase/cucumberl | complex_sample.erl | -module(complex_sample).
-export([setup/0, given/3, 'when'/3, then/3, main/0]).
setup() ->
[].
%% Step definitions for the sample calculator Addition feature.
given(Step, State, _) ->
complex_sample_support:given(Step, State).
'when'(Step, State, _) ->
complex_sample_support:'when'(Step, State).
then(... | null | https://raw.githubusercontent.com/membase/cucumberl/80f5cfabcbacddd751be603241eefb29b132838c/examples/complex_sample/src/complex_sample.erl | erlang | Step definitions for the sample calculator Addition feature. | -module(complex_sample).
-export([setup/0, given/3, 'when'/3, then/3, main/0]).
setup() ->
[].
given(Step, State, _) ->
complex_sample_support:given(Step, State).
'when'(Step, State, _) ->
complex_sample_support:'when'(Step, State).
then(Step, State, _) ->
complex_sample_support:then(Step, State).... |
248811aa86471c62c8a07b52daff6e9c6916031fe442bc2968cfa597c99d23c2 | KaroshiBee/weevil | next_tests.ml | include Dapper.Dap.Testing_utils
module Dap = Dapper.Dap
module D = Dap.Data
module Js = Data_encoding.Json
module StateMock = struct
include Utils.StateMock
let backend_oc t = t.oc
let set_io t oc =
t.oc <- Some oc
end
module Next = Next.T (StateMock)
let%expect_test "Check sequencing etc for next" =
... | null | https://raw.githubusercontent.com/KaroshiBee/weevil/1b166ba053062498c1ec05c885e04fba4ae7d831/lib/adapter/tests/adapter_expect_tests/next_tests.ml | ocaml | happy path | include Dapper.Dap.Testing_utils
module Dap = Dapper.Dap
module D = Dap.Data
module Js = Data_encoding.Json
module StateMock = struct
include Utils.StateMock
let backend_oc t = t.oc
let set_io t oc =
t.oc <- Some oc
end
module Next = Next.T (StateMock)
let%expect_test "Check sequencing etc for next" =
... |
99b18c25de27c4402399e220321e9a682f7e6a8b4868baba41e7636b8c8cc494 | appleshan/cl-http | perhaps-patch-cookie.lisp | (in-package :http-user)
;;; If domain is localhost, consider it legal and don't send the domain part of the cookie
(defmethod respond-to-compute-cookie-form ((url url:http-form) stream query-alist)
(flet ((clean-up (item)
(and item ; don't let NIL through
... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/acl/jkf/goodies/perhaps-patch-cookie.lisp | lisp | If domain is localhost, consider it legal and don't send the domain part of the cookie
don't let NIL through
this name will not be valid, but at least the server is not crashing
construct the cookie setting header using the defined interface.
generate another version of the form with the new values. | (in-package :http-user)
(defmethod respond-to-compute-cookie-form ((url url:http-form) stream query-alist)
(flet ((clean-up (item)
(not (null-string-p (setq item (string-trim '(#\space #\tab #\return #\Linefeed) item))))
item))
(local-domain ()
... |
77e567d9f9f33a0e2500d7dcb91c52c3ba23debadf95d8413bcb397405600711 | Bodigrim/linear-builder | Main.hs | -- |
Copyright : ( c ) 2022
Licence : BSD3
Maintainer : < >
module Main where
import Data.Bits (Bits(..), FiniteBits(..))
import Data.Foldable
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import Data.Text.Builder.Linear.Buffer
import Data.Text.Internal (Text(..))
impor... | null | https://raw.githubusercontent.com/Bodigrim/linear-builder/c1de83a8496bb3a5b1806f7a53f5cc5304578be5/test/Main.hs | haskell | |
-----------------------------------------------------------------------------
# COMPLETE Int30 # | Copyright : ( c ) 2022
Licence : BSD3
Maintainer : < >
module Main where
import Data.Bits (Bits(..), FiniteBits(..))
import Data.Foldable
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import Data.Text.Builder.Linear.Buffer
import Data.Text.Internal (Text(..))
import Dat... |
1348089caa0e113afa1bc15437831cfe81862727562e4ef78b8398dbf2c115ad | konn/subcategories | Class.hs | # LANGUAGE EmptyCase , UndecidableSuperClasses #
module Control.Subcategory.Applicative.Class (CApplicative(..)) where
import Control.Subcategory.Functor
import qualified Control.Applicative as App
infixl 4 <.>
class CFunctor f => CApplicative f where
pair :: (Dom f a, Dom f b, Dom f (a, b)) => f a -> f b -> f (a,... | null | https://raw.githubusercontent.com/konn/subcategories/2ad473e09bbf674bbe3825849bad3cca7b25f4ac/src/Control/Subcategory/Applicative/Class.hs | haskell | # LANGUAGE EmptyCase , UndecidableSuperClasses #
module Control.Subcategory.Applicative.Class (CApplicative(..)) where
import Control.Subcategory.Functor
import qualified Control.Applicative as App
infixl 4 <.>
class CFunctor f => CApplicative f where
pair :: (Dom f a, Dom f b, Dom f (a, b)) => f a -> f b -> f (a,... | |
38e1d60cf24a1ba0edd107114b7add571c722bc2860d2805f4036d2da23a7399 | ivanperez-keera/haskanoid | GameState.hs | | The state of the game during execution . It has two
-- parts: general info (level, points, etc.) and
-- the actual gameplay info (objects).
--
-- Because the game is always in some running state
-- (there are no menus, etc.) we assume that there's
-- always some gameplay info, even though it can be
-- empty.
module... | null | https://raw.githubusercontent.com/ivanperez-keera/haskanoid/cb50205bd8e1ec92eae3b689c1e4f3f2c260367d/src/GameState.hs | haskell | parts: general info (level, points, etc.) and
the actual gameplay info (objects).
Because the game is always in some running state
(there are no menus, etc.) we assume that there's
always some gameplay info, even though it can be
empty.
| The running state is given by a bunch of 'Objects' and the current genera... | | The state of the game during execution . It has two
module GameState where
import as Yampa
import Objects
data GameState = GameState
{ gameObjects :: Objects
, gameInfo :: GameInfo
}
neutralGameState :: GameState
neutralGameState = GameState
{ gameObjects = []
, gameInfo = neutralGameInfo
}... |
d81ed81772fb8ad348fdd1f2ae8e3848a8097d3ffbd294c023866bb73aef2726 | SRI-CSL/f3d | sysdef-tk.lisp | (in-package :config)
File " tk-pkg.lisp " adds exports to :
;;; These default configuration settings can be modified by $FREEDIUS/arch/<arch>/lisp/config.lisp
(defvar *tk-features* nil
"A list of keywords describing the features of the Tk library.
Permissible values: :THEMED :TRUEFONT.")
(defvar *tcltk-lib... | null | https://raw.githubusercontent.com/SRI-CSL/f3d/93285f582198bfbab33ca96ff71efda539b1bec7/f3d-tk/lisp-tk/sysdef-tk.lisp | lisp | These default configuration settings can be modified by $FREEDIUS/arch/<arch>/lisp/config.lisp
other systems, these libraries are loaded automatically.
One also has the option of using an installed binary version of
reverting to the assumed cygwin default, but how should this be
file. Something is wonky with the ... | (in-package :config)
File " tk-pkg.lisp " adds exports to :
(defvar *tk-features* nil
"A list of keywords describing the features of the Tk library.
Permissible values: :THEMED :TRUEFONT.")
(defvar *tcltk-library-files* nil)
Windows users will need to explicitly load the Tcl and Tk DLLs ( as
well as ... |
ff7a81ea11ac66bd706612c757d992f055e6f54bc0ffc13e0bc1f1403f06c7b9 | samrushing/irken-compiler | t_frb1.scm | ;; -*- Mode: Irken -*-
(include "lib/core.scm")
(include "lib/pair.scm")
(include "lib/string.scm")
(include "lib/frb.scm")
(define (t0)
(let ((t (tree/make int-cmp
(1 "time")
(2 "flies")
(3 "like")
(4 "a")
(5 "banana")
)))
(printn t... | null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_frb1.scm | scheme | -*- Mode: Irken -*- |
(include "lib/core.scm")
(include "lib/pair.scm")
(include "lib/string.scm")
(include "lib/frb.scm")
(define (t0)
(let ((t (tree/make int-cmp
(1 "time")
(2 "flies")
(3 "like")
(4 "a")
(5 "banana")
)))
(printn t)
(tree/dump 0 (lam... |
2474a1bdb57067d96260f8a77edd0c7aeed62d9cd4874a5a84759ae30b0641d7 | rixed/ramen | heavyhitters_test.ml | A small program that benchmark the HeavyHitters module , either for
* correctness or speed .
* It receives the top parameters on the command line and then generate as
* many entries as needed with a configurable distribution .
* Every time a value is added the top is asked to classify the point ( either
... | null | https://raw.githubusercontent.com/rixed/ramen/11b1b34c3bf73ee6c69d7eb5c5fbf30e6dd2df4f/src/heavyhitters_test.ml | ocaml | Generate a random integer according to a given distribution
Test the rank function rather than is_in_top:
Build a top for integers (TODO: string of size n)
Return a random hitter
Just in case it could help the top algorithm that the heavier hitter
* are the smaller values, scramble the values (need to be ... | A small program that benchmark the HeavyHitters module , either for
* correctness or speed .
* It receives the top parameters on the command line and then generate as
* many entries as needed with a configurable distribution .
* Every time a value is added the top is asked to classify the point ( either
... |
3cc25cb3b60938e68cdfae30a9391737661753da12f55c2aa93ebf4da356525c | HaskellZhangSong/Introduction_to_Haskell_2ed_source | State.hs | import Control.Monad
newtype State s a = State { runState :: s -> (a,s) }
deriving Functor
newtype Reader r a = Reader { runReader :: r -> a }
deriving Functor
instance Monad (State s) where
return x = State $ \s ->... | null | https://raw.githubusercontent.com/HaskellZhangSong/Introduction_to_Haskell_2ed_source/140c50fdccfe608fe499ecf2d8a3732f531173f5/C12/State.hs | haskell | h :: a -> (a, s)
g :: (s -> (b, s))
| import Control.Monad
newtype State s a = State { runState :: s -> (a,s) }
deriving Functor
newtype Reader r a = Reader { runReader :: r -> a }
deriving Functor
instance Monad (State s) where
return x = State $ \s ->... |
eda2cee3ce9e3be23e61a2b0390cb32fcc638b409675c562f7eab2a48af3f535 | webyrd/n-grams-for-synthesis | combined-simplified-dynamic-ml-infer-evalo.scm | (load "prelude.scm")
;; ngrams-statistics structure:
;;
;; (((context form) . count) ...)
(define ngrams-statistics (read-data-from-file "tmp/statistics.scm"))
(define unique
(lambda (l)
(if (null? l)
'()
(cons (car l) (remove (car l) (unique (cdr l)))))))
(define all-contexts (unique (map caar ngr... | null | https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/combined-simplified-dynamic-ml-infer-evalo.scm | scheme | ngrams-statistics structure:
(((context form) . count) ...)
orderings-alist structure:
((context . (eval-relation ...)) ...)
ctx-stats has the structure:
((form . count) ...)
For example,
context -> list of eval-relations
(error 'eval-expo (string-append "bad context " (symbol->string context)))
symbol? d... | (load "prelude.scm")
(define ngrams-statistics (read-data-from-file "tmp/statistics.scm"))
(define unique
(lambda (l)
(if (null? l)
'()
(cons (car l) (remove (car l) (unique (cdr l)))))))
(define all-contexts (unique (map caar ngrams-statistics)))
(define orderings-alist
(let ((ordering-for-cont... |
d3dd361a1b336a9f29e7c37a671763c22730a3767b61d501dd3d9a6854ddc0d4 | jumarko/clojure-experiments | drop_every_nth_item.clj | (ns four-clojure.drop-every-nth-item)
;;;
;;; Write a function which drops every nth item from a sequence
(defn drop-nth-item [coll index]
(let [nth-items-to-nil (map-indexed (fn [idx element]
(when (not= 0 (mod (inc idx) index))
ele... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/f0f9c091959e7f54c3fb13d0585a793ebb09e4f9/src/clojure_experiments/four_clojure/drop_every_nth_item.clj | clojure |
Write a function which drops every nth item from a sequence
simpler solution using keep-indexed
most concise solution using partition-all
my custom check for repetitive elements | (ns four-clojure.drop-every-nth-item)
(defn drop-nth-item [coll index]
(let [nth-items-to-nil (map-indexed (fn [idx element]
(when (not= 0 (mod (inc idx) index))
element))
coll)]
(remove nil? ... |
81a19c54ea3393b49a16d1e76c16a0913c51a14e3e3f3823df941817b93c604f | tari3x/csec-modex | ciloptions.ml |
*
* Copyright ( c ) 2001 - 2003 ,
* < >
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
* ... | null | https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/deps/cil-1.7.3/src/ciloptions.ml | ocaml | Processign of output file arguments
Parsing of files with additional names
next char to look at
start of the word,
or -1 if none
Just move on to the next line
whitespace
non-whitespace
General Options
Little-used:
"--noignore-merge-conflicts",
Arg.Clear Mer... |
*
* Copyright ( c ) 2001 - 2003 ,
* < >
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
* ... |
140f4c4c98894ac401eb75d864470c8ca8932cb14746bb6528798711ed4a507d | janestreet/shell | filename_extended.mli | (** Extensions to [Core.Core_filename]. *)
(** [normalize path] Removes as much "." and ".." from the path as possible. If the path
is absolute they will all be removed. *)
val normalize : string -> string
(** [parent path] The parent of the root directory is the root directory @return the path
to the parent ... | null | https://raw.githubusercontent.com/janestreet/shell/d3e2163268e29d468a8eaa3c9ab74a1f95486fab/filename_extended/src/filename_extended.mli | ocaml | * Extensions to [Core.Core_filename].
* [normalize path] Removes as much "." and ".." from the path as possible. If the path
is absolute they will all be removed.
* [parent path] The parent of the root directory is the root directory @return the path
to the parent of [path].
* [make_relative ~to_:src f] retu... |
val normalize : string -> string
val parent : string -> string
val make_relative : ?to_:string -> string -> string
val make_absolute : string -> string
val expand : ?from:string -> string -> string
val explode : string -> string list
val implode : string list -> string
val normalize_path : string list -> string... |
9ed6255bec0558797988b634b65dc4cf614f666cf0eeff0d74ea2e12ee8edf52 | mfelleisen/Acquire | board-intf.rkt | #lang racket
;; ---------------------------------------------------------------------------------------------------
;; interface specification for inspecting and manipulating the Acquire board, its spots, and tiles
;; also provides all tiles: A1 ... I12 via tiles+spots submodule
(require "basics.rkt" "Lib/auxiliari... | null | https://raw.githubusercontent.com/mfelleisen/Acquire/5b39df6c757c7c1cafd7ff198641c99d30072b91/board-intf.rkt | racket | ---------------------------------------------------------------------------------------------------
interface specification for inspecting and manipulating the Acquire board, its spots, and tiles
also provides all tiles: A1 ... I12 via tiles+spots submodule
creation of tiles, spots
properties
externalize tile... | #lang racket
(require "basics.rkt" "Lib/auxiliaries.rkt" "Lib/contract.rkt" 2htdp/image)
(interface basics&
[row? (-> any/c boolean?)]
[string->row (-> string? (maybe/c row?))]
[column? (-> any/c boolean?)]
[string->column (-> string? (maybe/c column?))]
[tile (-> column? row?... |
4168170f82b012c01e5217cbdc54c162da60811558d4446173a7fdf95a621a66 | tsloughter/kuberl | kuberl_v1beta1_daemon_set_status.erl | -module(kuberl_v1beta1_daemon_set_status).
-export([encode/1]).
-export_type([kuberl_v1beta1_daemon_set_status/0]).
-type kuberl_v1beta1_daemon_set_status() ::
#{ 'collisionCount' => integer(),
'conditions' => list(),
'currentNumberScheduled' := integer(),
'desiredNumberScheduled' := integer... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1beta1_daemon_set_status.erl | erlang | -module(kuberl_v1beta1_daemon_set_status).
-export([encode/1]).
-export_type([kuberl_v1beta1_daemon_set_status/0]).
-type kuberl_v1beta1_daemon_set_status() ::
#{ 'collisionCount' => integer(),
'conditions' => list(),
'currentNumberScheduled' := integer(),
'desiredNumberScheduled' := integer... | |
0d77d71e931cb8b15a67b9c2114e8e84f061e1d2b2ab1c316c1cf1e726174f3b | BranchTaken/Hemlock | test_mul.ml | open! Basis.Rudiments
open! Basis
open Nat
let test () =
let rec test_pairs = function
| [] -> ()
| (x, y) :: pairs' -> begin
let z = (x * y) in
File.Fmt.stdout
|> fmt ~alt:true ~radix:Radix.Hex x
|> Fmt.fmt " * "
|> fmt ~alt:true ~radix:Radix.Hex y
|> Fmt.fmt ... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/nat/test_mul.ml | ocaml | open! Basis.Rudiments
open! Basis
open Nat
let test () =
let rec test_pairs = function
| [] -> ()
| (x, y) :: pairs' -> begin
let z = (x * y) in
File.Fmt.stdout
|> fmt ~alt:true ~radix:Radix.Hex x
|> Fmt.fmt " * "
|> fmt ~alt:true ~radix:Radix.Hex y
|> Fmt.fmt ... | |
5a2a0b4674c79ceecb6f5c722e1bd68f73f67ae6923999f9a75e3e1787e04000 | input-output-hk/hydra | VerificationKey.hs | # OPTIONS_GHC -Wno - orphans #
module Hydra.Cardano.Api.VerificationKey where
import Hydra.Cardano.Api.Prelude
-- * Orphans
-- XXX: This is quite specific to payment keys
instance ToJSON (VerificationKey PaymentKey) where
toJSON = toJSON . serialiseToTextEnvelope Nothing
instance FromJSON (VerificationKey Payme... | null | https://raw.githubusercontent.com/input-output-hk/hydra/7bdb54c4c87ddfe3f951028798558e586f1610d3/hydra-cardano-api/src/Hydra/Cardano/Api/VerificationKey.hs | haskell | * Orphans
XXX: This is quite specific to payment keys | # OPTIONS_GHC -Wno - orphans #
module Hydra.Cardano.Api.VerificationKey where
import Hydra.Cardano.Api.Prelude
instance ToJSON (VerificationKey PaymentKey) where
toJSON = toJSON . serialiseToTextEnvelope Nothing
instance FromJSON (VerificationKey PaymentKey) where
parseJSON v = do
env <- parseJSON v
c... |
983f17d9800675351e3ca96e5b04f3cfb7f9e8bfad9e0ceb41321a1ee9c62969 | stbuehler/haskell-nettle | AES.hs |
module KAT.AES
( katAES
, katAES128
, katAES192
, katAES256
) where
import KAT.Utils
import HexUtils
katAES, katAES128, katAES192, katAES256 :: KATs
katAES = concatKATs
[ katAES128
, katAES192
, katAES256
]
katAES128 = concatKATs
[ katAES128Nettle
, katAES128NIST
]
katAES192 = concatKATs
[ katAES192Nett... | null | https://raw.githubusercontent.com/stbuehler/haskell-nettle/0fb94a24c72efd1ef74c368669301bb755977f37/src/Tests/KAT/AES.hs | haskell | source: nettle tests
nettle "test_invert"
nettle "test_invert"
nettle "test_invert"
F.1.1 ECB-AES128-Encrypt
F.1.3 ECB-AES192-Encrypt
F.1.5 ECB-AES256-Encrypt |
module KAT.AES
( katAES
, katAES128
, katAES192
, katAES256
) where
import KAT.Utils
import HexUtils
katAES, katAES128, katAES192, katAES256 :: KATs
katAES = concatKATs
[ katAES128
, katAES192
, katAES256
]
katAES128 = concatKATs
[ katAES128Nettle
, katAES128NIST
]
katAES192 = concatKATs
[ katAES192Nett... |
ebe15c330499ae6167ec8feb9ed1c4b1ecf488030f06d704e72e84c0c741a593 | goldfirere/units | Factor.hs | Data / Metrology . Factor.hs
The units Package
Copyright ( c ) 2013
This file defines the Factor kind and operations over lists of Factors .
Factors represents dimensions and units raised to a power of integers , and the lists of Factors represents monomials of dimensions and units .
... | null | https://raw.githubusercontent.com/goldfirere/units/4941c3b4325783ad3c5b6486231f395279d8511e/units/Data/Metrology/Factor.hs | haskell | | This will only be used at the kind level. It holds a dimension or unit
with its exponent.
--------------------------------------------------------
- Set-like operations ----------------------------------
--------------------------------------------------------
| Do these Factors represent the same dimension?
@
... | Data / Metrology . Factor.hs
The units Package
Copyright ( c ) 2013
This file defines the Factor kind and operations over lists of Factors .
Factors represents dimensions and units raised to a power of integers , and the lists of Factors represents monomials of dimensions and units .
... |
a02bc1d75f29e121f25f37342b122abfc2c99ba323ccce68223b0587b0a8789e | stchang/macrotypes | exist.rkt | #lang s-exp macrotypes/typecheck
(extends "stlc+reco+var.rkt")
;; existential types
;; Types:
- types from stlc+reco+var.rkt
;; - ∃
;; Terms:
- terms from stlc+reco+var.rkt
;; - pack and open
(provide ∃ pack open)
(define-binding-type ∃ #:bvs = 1)
(define-typed-syntax pack
[(_ (τ:type e) as ∃τ:type)
#:with... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/macrotypes-example/macrotypes/examples/exist.rkt | racket | existential types
Types:
- ∃
Terms:
- pack and open
The subst below appears to be a hack, but it's not really.
It's the (TaPL) type rule itself that is fast and loose.
Leveraging the macro system's management of binding reveals this.
Γ ⊢ e_packed : {∃X,τ_body}
------------------------------
Γ ⊢ (open [x <=... | #lang s-exp macrotypes/typecheck
(extends "stlc+reco+var.rkt")
- types from stlc+reco+var.rkt
- terms from stlc+reco+var.rkt
(provide ∃ pack open)
(define-binding-type ∃ #:bvs = 1)
(define-typed-syntax pack
[(_ (τ:type e) as ∃τ:type)
#:with (~∃ (τ_abstract) τ_body) #'∃τ.norm
#:with [e- τ_e] (infer+erase... |
8a32c7cfb57e2a4b547041fca0dacbb5c3e123807050608ba6083d828eda68fe | Risto-Stevcev/bastet | Test_JsEndo.ml | open BsMocha.Mocha
let ( <. ) = Function.Infix.( <. )
;;
describe "Endo" (fun () -> ())
| null | https://raw.githubusercontent.com/Risto-Stevcev/bastet/030db286f57d2e316897f0600d40b34777eabba6/bastet_js/test/Test_JsEndo.ml | ocaml | open BsMocha.Mocha
let ( <. ) = Function.Infix.( <. )
;;
describe "Endo" (fun () -> ())
| |
160a2d2dae7af6793da7bdae8bb86330430915cf3323ad1d37af7e4c7ba67e8d | solita/laundry | pdf.clj | (ns laundry.pdf
(:require
[clojure.java.io :as io]
[compojure.api.sweet :as sweet :refer [POST]]
[laundry.machines :as machines :refer [badness-resp]]
[laundry.util :refer [shell-out!]]
[ring.middleware.multipart-params :refer [wrap-multipart-params]]
[ring.swagger.upload :as upload]
[ring.util.h... | null | https://raw.githubusercontent.com/solita/laundry/4e1fe96ebae19cde14c3ba5396929ba1578b7715/src/laundry/pdf.clj | clojure | pdf/a converter
pdf → txt conversion
cleanup if VM is terminated
cleanup if VM is terminated
cleanup if VM is terminated | (ns laundry.pdf
(:require
[clojure.java.io :as io]
[compojure.api.sweet :as sweet :refer [POST]]
[laundry.machines :as machines :refer [badness-resp]]
[laundry.util :refer [shell-out!]]
[ring.middleware.multipart-params :refer [wrap-multipart-params]]
[ring.swagger.upload :as upload]
[ring.util.h... |
ea22685aaab76f999619535d07a91f4dd3aa1ef7562bc8c2123ca25cca120a88 | kudu-dynamics/blaze | Solver.hs | HLINT ignore " Use if "
{-# LANGUAGE RankNTypes #-}
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
module Blaze.Pil.Solver
( module Blaze.Pil.Solver
, module Blaze.Types.Pil.Solver
, module Exports
) where
import Blaze.Prelude hiding (error, zero, natVal, isSigned)
import qualified Prelude as P
import qua... | null | https://raw.githubusercontent.com/kudu-dynamics/blaze/2220a07d372a817e79525ec2707984b189fe98c9/src/Blaze/Pil/Solver.hs | haskell | # LANGUAGE RankNTypes #
| Convert a `DeepSymType` to an SBV Kind.
Any symbolic Sign types are concretized to False.
ignore recursion, and hope for the best
Ch.TPointer bwt ptrElemType -> case ptrElemType of
alen constraint is handled at sym var creation
-- TODO: structs. good luck
TODO: Will this show the erro... | HLINT ignore " Use if "
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
module Blaze.Pil.Solver
( module Blaze.Pil.Solver
, module Blaze.Types.Pil.Solver
, module Exports
) where
import Blaze.Prelude hiding (error, zero, natVal, isSigned)
import qualified Prelude as P
import qualified Blaze.Types.Pil as Pi... |
aff575a002a2738ea3526111f3ef9dffff9094b7732ec7a97bc93161e19eea3c | fragnix/fragnix | Network.Wai.Handler.Warp.IORef.hs | # LANGUAGE Haskell98 #
# LINE 1 " Network / Wai / Handler / Warp / IORef.hs " #
# LANGUAGE CPP #
module Network.Wai.Handler.Warp.IORef (
module Data.IORef
) where
import Data.IORef
| null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/application/Network.Wai.Handler.Warp.IORef.hs | haskell | # LANGUAGE Haskell98 #
# LINE 1 " Network / Wai / Handler / Warp / IORef.hs " #
# LANGUAGE CPP #
module Network.Wai.Handler.Warp.IORef (
module Data.IORef
) where
import Data.IORef
| |
d89e20c5b9db4ad4f0000aa202e7d5d39c67c8e017c932955f807e6fa28cac91 | lambdacube3d/lambdacube-edsl | texturedCube.hs | # LANGUAGE OverloadedStrings , , TypeOperators , DataKinds , FlexibleContexts , GADTs #
import qualified Graphics.UI.GLFW as GLFW
import Control.Monad
import Data.Vect
import qualified Data.Trie as T
import qualified Data.Vector.Storable as SV
import LambdaCube.GL
import LambdaCube.GL.Mesh
import Comm... | null | https://raw.githubusercontent.com/lambdacube3d/lambdacube-edsl/4347bb0ed344e71c0333136cf2e162aec5941df7/lambdacube-samples/texturedCube.hs | haskell | renderer <- compileRenderer $ ScreenOut $ frameImage
renderer <- compileRenderer $ ScreenOut $ blur gaussFilter9 $ frameImage
"uvtemplate.bmp" | # LANGUAGE OverloadedStrings , , TypeOperators , DataKinds , FlexibleContexts , GADTs #
import qualified Graphics.UI.GLFW as GLFW
import Control.Monad
import Data.Vect
import qualified Data.Trie as T
import qualified Data.Vector.Storable as SV
import LambdaCube.GL
import LambdaCube.GL.Mesh
import Comm... |
ab02f140ef3ec967fc5edec93ec9cd7690a6945646c0b36f4fa7883ccce132de | GlideAngle/flare-timing | StopTestMain.hs | module Main (main) where
import Test.Tasty (TestTree, testGroup, defaultMain)
import Test.Tasty.SmallCheck as SC
import Test.Tasty.QuickCheck as QC
import Stopped
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests =
testGroup
"Tests"
[ units
, properties
]
properties... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/gap-stop/test-suite-stop/StopTestMain.hs | haskell | module Main (main) where
import Test.Tasty (TestTree, testGroup, defaultMain)
import Test.Tasty.SmallCheck as SC
import Test.Tasty.QuickCheck as QC
import Stopped
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests =
testGroup
"Tests"
[ units
, properties
]
properties... | |
7528c20913a261f4be5fbfee48b62f4b33cbe55ee0cb3017b088d9ffd8576cf4 | kazu-yamamoto/http2 | RingOfQueuesSTMSpec.hs | {-# LANGUAGE BangPatterns #-}
module RingOfQueuesSTMSpec where
import Control.Concurrent.STM
import Data.IORef (readIORef)
import Data.List (group, sort)
import Test.Hspec
import qualified RingOfQueuesSTM as P
spec :: Spec
spec = do
describe "base priority queue" $ do
it "queues entries based on weight"... | null | https://raw.githubusercontent.com/kazu-yamamoto/http2/3c29763be147a3d482eff28f427ad80f1d4df706/bench-priority/test/RingOfQueuesSTMSpec.hs | haskell | # LANGUAGE BangPatterns # |
module RingOfQueuesSTMSpec where
import Control.Concurrent.STM
import Data.IORef (readIORef)
import Data.List (group, sort)
import Test.Hspec
import qualified RingOfQueuesSTM as P
spec :: Spec
spec = do
describe "base priority queue" $ do
it "queues entries based on weight" $ do
q <- atomica... |
1bb706c03610c7710417bbea7617c3dcd8d067efb8e1bfa8dba261f1805c61bf | swtwsk/vinci-lang | CleanControlFlow.hs | # LANGUAGE LambdaCase #
module SSA.Optimizations.CleanControlFlow (
cleanControlFlow,
countPrecedessors,
postOrder
) where
import Control.Monad.Reader
import Control.Monad.State
import Data.Bifunctor (bimap, first)
import qualified Data.Map as Map
import SSA.AST
import SSA.LabelGraph
type CleanM = Sta... | null | https://raw.githubusercontent.com/swtwsk/vinci-lang/9c7e01953e0b1cf135af7188e0c71fe6195bdfa1/src/SSA/Optimizations/CleanControlFlow.hs | haskell | # LANGUAGE LambdaCase #
module SSA.Optimizations.CleanControlFlow (
cleanControlFlow,
countPrecedessors,
postOrder
) where
import Control.Monad.Reader
import Control.Monad.State
import Data.Bifunctor (bimap, first)
import qualified Data.Map as Map
import SSA.AST
import SSA.LabelGraph
type CleanM = Sta... | |
256c438930ace95fe6cf83a8849379c7cb1aac102e1f91af65a3cc4b427ccb60 | igorhvr/bedlam | fmt-pretty.scm | ;;;; fmt-pretty.scm -- pretty printing format combinator
;;
Copyright ( c ) 2006 - 2007 . All rights reserved .
;; BSD-style license:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; additional settings
(define (fmt-shares st) (fmt-ref st 'shares))
(define (fmt-set-shares! st x) (fm... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/fmt/fmt-0.8.1/fmt-pretty.scm | scheme | fmt-pretty.scm -- pretty printing format combinator
BSD-style license:
additional settings
utilities
pretty printing
(and indent-rule (not (pair? (car ls))))
all on separate lines
the elements may be shared, just checking the top level list
structure
quote or other abbrev | Copyright ( c ) 2006 - 2007 . All rights reserved .
(define (fmt-shares st) (fmt-ref st 'shares))
(define (fmt-set-shares! st x) (fmt-set! st 'shares x))
(define (fmt-copy-shares st)
(fmt-set-shares! (copy-fmt-state st) (copy-shares (fmt-shares st))))
(define (copy-shares shares)
(let ((tab (make-eq?-table... |
3dbd6421d945e312aca5f3823d85c56ad24aa81e4d7e293163f04471ed3315ab | BitGameEN/bitgamex | ecrn_test.erl | , LLC . All Rights Reserved .
%%%
This file is provided to you under the BSD License ; you may not use
%%% this file except in compliance with the License.
-module(ecrn_test).
-include_lib("eunit/include/eunit.hrl").
%%%===================================================================
%%% Types
%%%===========... | null | https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/erlcron/src/ecrn_test.erl | erlang |
this file except in compliance with the License.
===================================================================
Types
===================================================================
The alarm should trigger this nearly immediately.
The alarm should trigger this 1 second later.
There is no event-driven wa... | , LLC . All Rights Reserved .
This file is provided to you under the BSD License ; you may not use
-module(ecrn_test).
-include_lib("eunit/include/eunit.hrl").
cron_test_() ->
{setup,
fun() ->
ecrn_app:manual_start()
end,
fun(_) ->
ecrn_app:manual_stop()
end,
... |
81663978facd2018a31b5f12520a41afbeab7827b9f2a85623d5346286dfe17b | HaskellEmbedded/data-stm32 | SPI.hs | --
-- SPI.hs --- SPI peripheral
--
module Ivory.BSP.STM32.Peripheral.SPI
( module Ivory.BSP.STM32.Peripheral.SPI.Peripheral
, module Ivory.BSP.STM32.Peripheral.SPI.Regs
, module Ivory.BSP.STM32.Peripheral.SPI.RegTypes
, module Ivory.BSP.STM32.Peripheral.SPI.Pins
) where
import Ivory.BSP.STM32.Peripheral.SPI... | null | https://raw.githubusercontent.com/HaskellEmbedded/data-stm32/204aff53eaae422d30516039719a6ec7522a6ab7/templates/STM32/Peripheral/SPI.hs | haskell |
SPI.hs --- SPI peripheral
|
module Ivory.BSP.STM32.Peripheral.SPI
( module Ivory.BSP.STM32.Peripheral.SPI.Peripheral
, module Ivory.BSP.STM32.Peripheral.SPI.Regs
, module Ivory.BSP.STM32.Peripheral.SPI.RegTypes
, module Ivory.BSP.STM32.Peripheral.SPI.Pins
) where
import Ivory.BSP.STM32.Peripheral.SPI.Peripheral
import Ivory.BSP.STM32.... |
f035ec8ed3065e8bb9525d781b8228f07ff844bc6b7b6536f6e48f70f8ed68aa | d-plaindoux/transept | literals.mli | module Make (Parser : Transept_specs.PARSER with type e = char) : sig
val space : char Parser.t
val spaces : string Parser.t
val alpha : char Parser.t
val digit : char Parser.t
val ident : string Parser.t
val natural : int Parser.t
val integer : int Parser.t
val float : float Parser.t
val stri... | null | https://raw.githubusercontent.com/d-plaindoux/transept/8567803721f6c3f5d876131b15cb301cb5b084a4/lib/transept_extension/literals.mli | ocaml | module Make (Parser : Transept_specs.PARSER with type e = char) : sig
val space : char Parser.t
val spaces : string Parser.t
val alpha : char Parser.t
val digit : char Parser.t
val ident : string Parser.t
val natural : int Parser.t
val integer : int Parser.t
val float : float Parser.t
val stri... | |
ab21f0e509628f7454ebc2272fbb805b28b812fd45b7a8f6c2a1667098aab6de | nikita-volkov/rerebase | Base.hs | module Data.Vector.Unboxed.Base
(
module Rebase.Data.Vector.Unboxed.Base
)
where
import Rebase.Data.Vector.Unboxed.Base
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Data/Vector/Unboxed/Base.hs | haskell | module Data.Vector.Unboxed.Base
(
module Rebase.Data.Vector.Unboxed.Base
)
where
import Rebase.Data.Vector.Unboxed.Base
| |
e6214cd2451bb08fdba2779dbfdc3f29c99d983e9ac33df596554b3c47b2bb99 | TDacik/Deadlock | lockset_gui.ml | Experimental visualisation of lockset analysis results
*
* TODO : Refactoring
*
* Author : ( ) , 2021
*
* TODO: Refactoring
*
* Author: Tomas Dacik (), 2021
*)
open !Deadlock_top
open Dgraph_helper
open Pretty_source
open Gtk_helper
open Gui_utils
open Graph_views
open Cil_types
open Cil_da... | null | https://raw.githubusercontent.com/TDacik/Deadlock/b8b551610bd1fd8eeb33dea2df863c014a1be447/src/deadlock_gui/lockset_gui.ml | ocaml | * Statement summary
Create label with callback
* Callback: selection of element in the source code.
Statements
Declaration and definition of functior or variable
Otherwise empty table
* Initialisation of new tabe in lower notebook. *
Create page in lower notebook and store reference to it. | Experimental visualisation of lockset analysis results
*
* TODO : Refactoring
*
* Author : ( ) , 2021
*
* TODO: Refactoring
*
* Author: Tomas Dacik (), 2021
*)
open !Deadlock_top
open Dgraph_helper
open Pretty_source
open Gtk_helper
open Gui_utils
open Graph_views
open Cil_types
open Cil_da... |
d3f315459b2c68167439c494f0bbe87b6527973a3a339dfc8d88ea57c667bf44 | pflanze/chj-schemelib | string-case-bench.scm | Copyright 2018 by < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
;;; (at your option) any later version.
(require easy
str... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/string-case-bench.scm | scheme | This file is free software; you can redistribute it and/or modify
(at your option) any later version. | Copyright 2018 by < >
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
(require easy
string-case
memcmp
test-random)
(include "cj-standarddeclares.scm")
(namespace ("string-case-bench#" t1 t2 t3))
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.