_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 |
|---|---|---|---|---|---|---|---|---|
59c9f21580e64bacb35373c373fb7f66f2bbb8e48da833f0aa0b978681544615 | tweag/ormolu | unicode.hs | # LANGUAGE UnicodeSyntax #
foo ∷ ∀a. Show a ⇒ a → String
foo = const ()
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/signature/type/unicode.hs | haskell | # LANGUAGE UnicodeSyntax #
foo ∷ ∀a. Show a ⇒ a → String
foo = const ()
| |
c555c9aa8eca254e9386c067998831fb910387dacdbe291a2c7661355235c749 | snoyberg/photosorter | HomeTest.hs | {-# LANGUAGE OverloadedStrings #-}
module HomeTest
( homeSpecs
) where
import TestImport
homeSpecs :: Specs
homeSpecs =
describe "These are some example tests" $
it "loads the index and checks it looks right" $ do
get_ "/"
statusIs 200
htmlAllContain "h1" "Hello"
post "/" $ do
... | null | https://raw.githubusercontent.com/snoyberg/photosorter/c02cf37094d24762ceca4c05fe89580a4be0bec1/tests/HomeTest.hs | haskell | # LANGUAGE OverloadedStrings #
talk about self-reference | module HomeTest
( homeSpecs
) where
import TestImport
homeSpecs :: Specs
homeSpecs =
describe "These are some example tests" $
it "loads the index and checks it looks right" $ do
get_ "/"
statusIs 200
htmlAllContain "h1" "Hello"
post "/" $ do
addNonce
byLabel "Wh... |
b80dfb7bb29d683cb1a6a5688e2f01a38a9d8f90b0c2077d18fb5e8d8df7495e | 8c6794b6/haskell-sc-scratch | Pat02.hs | |
Module : $ Header$
CopyRight : ( c ) 8c6794b6
License : :
Stability : unstable
Portability : non - portable
Using lam , app , z and s with pattern , take 2 .
Module : $Header$
CopyRight : (c) 8c6794b6
License : BSD3
Maintainer :
Stability : unstable
Portability : n... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/Oleg/TTF/Extra/Pat02.hs | haskell | |
Module : $ Header$
CopyRight : ( c ) 8c6794b6
License : :
Stability : unstable
Portability : non - portable
Using lam , app , z and s with pattern , take 2 .
Module : $Header$
CopyRight : (c) 8c6794b6
License : BSD3
Maintainer :
Stability : unstable
Portability : n... | |
e106c8d725c7cbaa531e4c1d03ed1f082cdadc4e1fe6f55464aa362e7ee88f23 | HunterYIboHu/htdp2-solution | ex377-replace-hello.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex377-replace-hello) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t construc... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter4/Section22-the-commerce-of-XML/ex377-replace-hello.rkt | racket | about the language level of this file in a form that our tools can easily process.
data difinitions
An XItem.v2 is one of:
– (cons 'li (cons [List-of Attribute] XWords))
– (cons 'li (cons [List-of Attribute] XEnums))
An XEnum.v2 is one of:
– (cons 'ul [List-of XItem.v2])
– (cons 'ul (cons [List-of Attribute]... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex377-replace-hello) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/image)
– ( cons ' li (... |
0d11af0ded04e9b4ea58898536248c857bc2e9990232dd6cf42dd31e6e5e0bbf | lspitzner/brittany | Test521.hs | -- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
autocheckCases =
[ ("Never Deadlocks", representative deadlocksNever)
, ("No Exceptions", representative exceptionsNever)
, ("Consistent Result", alwaysSame) -- already representative
]
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test521.hs | haskell | brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
already representative | autocheckCases =
[ ("Never Deadlocks", representative deadlocksNever)
, ("No Exceptions", representative exceptionsNever)
]
|
4b2e182f29a5435058fa9c6be9df43854f67911c8643ef45c1ede8abe5d587f0 | nukep/doom-calculator | core.clj | (ns doomcalc.core
(:require [doomcalc.write-pwad :refer [spit-pwad]]
[doomcalc.wad-builder :as w]
[doomcalc.machine-builder :refer [compile-machines]]
[doomcalc.components :as c]))
(defn level []
(let [di01 (c/digit-input-and-display {:x 388 :y 400})
di00 (c/digit-input-... | null | https://raw.githubusercontent.com/nukep/doom-calculator/624e2f0abd791528828728d1203b333d5e03ac39/src/doomcalc/core.clj | clojure | (ns doomcalc.core
(:require [doomcalc.write-pwad :refer [spit-pwad]]
[doomcalc.wad-builder :as w]
[doomcalc.machine-builder :refer [compile-machines]]
[doomcalc.components :as c]))
(defn level []
(let [di01 (c/digit-input-and-display {:x 388 :y 400})
di00 (c/digit-input-... | |
166570ef4ad65ee7365bf2f6ae98033c67890adecbd12646c1bc3d2f4542534b | runtimeverification/haskell-backend | NonExecutable.hs | |
Copyright : ( c ) Runtime Verification , 2019 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2019-2021
License : BSD-3-Clause
-}
module Kore.Attribute.Axiom.NonExecutable (
NonExecutable (..),
nonExecutableId,
nonExecutableSymbol,
nonExecutableAttribute,
) ... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/b06757e252ee01fdd5ab8f07de2910711997d845/kore/src/Kore/Attribute/Axiom/NonExecutable.hs | haskell | | Kore identifier representing the @non-executable@ attribute symbol.
| Kore symbol representing the @non-executable@ attribute.
| Kore pattern representing the @non-executable@ attribute. | |
Copyright : ( c ) Runtime Verification , 2019 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2019-2021
License : BSD-3-Clause
-}
module Kore.Attribute.Axiom.NonExecutable (
NonExecutable (..),
nonExecutableId,
nonExecutableSymbol,
nonExecutableAttribute,
) ... |
4306fffbd11ad2f94217757023a567d69a30e69f735f9357616d53287e146a8c | wdhowe/clojure-snippets | exceptions.clj | ;; Exception handling
(def x 10)
(def y 0)
try / catch / finally similar to Java
(try (/ x y)
(catch ArithmeticException e (println "divide by zero"))
(finally (println "cleanup")))
; throwing exceptions
(try (throw (Exception. "something bad happened"))
(catch Exception e (.getMessage e)))
| null | https://raw.githubusercontent.com/wdhowe/clojure-snippets/0c3247ce99a563312b549d03f080b8cf449b541d/flow_control/exceptions.clj | clojure | Exception handling
throwing exceptions |
(def x 10)
(def y 0)
try / catch / finally similar to Java
(try (/ x y)
(catch ArithmeticException e (println "divide by zero"))
(finally (println "cleanup")))
(try (throw (Exception. "something bad happened"))
(catch Exception e (.getMessage e)))
|
fdb65ae29d07d58131aa79a65e8997eb9d83cd643f668f89170e2f2283b4fc56 | esl/MongooseIM | mongoose_cover_helper.erl | %%==============================================================================
Copyright 2014 Erlang Solutions Ltd.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
... | null | https://raw.githubusercontent.com/esl/MongooseIM/481774b6449215a70a99555a913e7e0c87bc40ce/src/mongoose_cover_helper.erl | erlang | ==============================================================================
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either ex... | Copyright 2014 Erlang Solutions Ltd.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(mongoose_cover_helper).
-export([start/1, analyze/0, stop/0]).
-ignore_xref([analyze/0, start/1, stop/0]).
-spec start([atom()... |
b1ef700b1a753a1a2818a541b2844304ebdd3235784afa4bb9c39908718d66cb | stevebleazard/ocaml-jsonxt | parser.ml | module type Parser = sig
module Compliance : Compliance.S
val decode
: reader : (unit -> Tokens.token)
-> (Compliance.json option, string) result
end
module Make (Compliance : Compliance.S) : Parser
with module Compliance = Compliance
= struct
module Compliance = Compliance
exception Parse_error ... | null | https://raw.githubusercontent.com/stevebleazard/ocaml-jsonxt/fe982b6087dd76ca003d8fbc19ae9a519f54b828/lib/parser.ml | ocaml | module type Parser = sig
module Compliance : Compliance.S
val decode
: reader : (unit -> Tokens.token)
-> (Compliance.json option, string) result
end
module Make (Compliance : Compliance.S) : Parser
with module Compliance = Compliance
= struct
module Compliance = Compliance
exception Parse_error ... | |
e211e261469ff634314390f3fe131e8bc7891406957951e8c72b5aedc09f37a4 | hyper-systems/ocaml-coap | Coap.ml |
type error = Coap_core.error
let pp_error = Coap_core.pp_error
module Request = Coap_core.Request
module Response = Coap_core.Response
module Message = Coap_core.Message
module Server = Coap_server_lwt
| null | https://raw.githubusercontent.com/hyper-systems/ocaml-coap/8195715ded4b057b480b8d5f89324c18b4eb753b/coap/Coap.ml | ocaml |
type error = Coap_core.error
let pp_error = Coap_core.pp_error
module Request = Coap_core.Request
module Response = Coap_core.Response
module Message = Coap_core.Message
module Server = Coap_server_lwt
| |
5faa500caf9ecbc0b8c2d0eb994b15beb1fb7dd7269f5e288264a297e403595e | SuYi1995/game_server | sup_acceptor.erl | %%%-------------------------------------------------------------------
%%% @author sy
( C ) 2019 , < COMPANY >
%%% @doc
%%% @end
Created : 29 . 9月 2019 15:30
%%%-------------------------------------------------------------------
-module(sup_acceptor).
-author("sy").
-behaviour(supervisor).
%% API
-export([sta... | null | https://raw.githubusercontent.com/SuYi1995/game_server/b9a8574589075a1264c3d1f9a564d6d2ea8ae574/src/base/sys/sup_acceptor.erl | erlang | -------------------------------------------------------------------
@author sy
@doc
@end
-------------------------------------------------------------------
API
Supervisor callbacks
===================================================================
API functions
==================================================... | ( C ) 2019 , < COMPANY >
Created : 29 . 9月 2019 15:30
-module(sup_acceptor).
-author("sy").
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
-spec(start_link() -> {ok, Pid :: pid()} | ignore | {error, Reason :: term()}).
start_link() ->
supervisor:start_link(... |
a6ae9b8fb2fb61c04a2ee1907d8cdf92aedf2adadcb817848c56a63c35036f37 | ddssff/refact-global-hse | Move.hs | -- Example:
runhaskell scripts / Move.hs --move = FoldDeclared , Symbols ,
# LANGUAGE RankNTypes , ScopedTypeVariables , TemplateHaskell #
import Control.Lens (makeLenses, over, set, view)
import Data.Default (def)
import Data.List (groupBy)
import Data.Monoid ((<>))
import Decls (moveDeclsAndClean)
import MoveSp... | null | https://raw.githubusercontent.com/ddssff/refact-global-hse/519a017009cae8aa1a3db1b46eb560d76bd9895d/tests/input/rgh/scripts/Move.hs | haskell | Example:
move = FoldDeclared , Symbols ,
map (makeRelative (view topDir params))
<$>
view topDir params </>
map (makeRelative (view topDir params))
<$>
view topDir params </> |
# LANGUAGE RankNTypes , ScopedTypeVariables , TemplateHaskell #
import Control.Lens (makeLenses, over, set, view)
import Data.Default (def)
import Data.List (groupBy)
import Data.Monoid ((<>))
import Decls (moveDeclsAndClean)
import MoveSpec (instClassPred, splicePred)
import LoadModule (loadModules)
import MoveSpec ... |
dadf92842bfcc58b3f23f0aab3b9b5ce571ba558169b7fbd0472b4ae6d21ae37 | janegca/htdp2e | Exercise-413-find-root.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-413-find-root) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t const... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/05-GenerativeRecursion/Exercise-413-find-root.rkt | racket | about the language level of this file in a form that our tools can easily process.
different values for TOLERANCE.
Number -> Number
computes the root of a binomial
N[>=0] -> Boolean
true if (poly value) is between minus plus or minus tolerance
[Number -> Number] Number Number -> Number
determines R such that ... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-413-find-root) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
Exercise 413 .
Add the test from exer... |
7ded25a56985c55eb0793f2857fae9a77cb7993c35208cf92c330ee498a0ccbc | rowangithub/DOrder | 12.ml | let rec loopa flag a b s t =
if ((Random.bool ())) then
let a = a+1 in
let b = b+1 in
let s = s+a in
let t = t+b in
let t = if (flag > 0) then t+a else t in
loopa flag a b s t
else
(
s, t)
let rec loopb x y =
if y <= x then
let y = if ((Random.bool ())) then y+1 else y+2 in
loop... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/hola/12.ml | ocaml | let rec loopa flag a b s t =
if ((Random.bool ())) then
let a = a+1 in
let b = b+1 in
let s = s+a in
let t = t+b in
let t = if (flag > 0) then t+a else t in
loopa flag a b s t
else
(
s, t)
let rec loopb x y =
if y <= x then
let y = if ((Random.bool ())) then y+1 else y+2 in
loop... | |
8f0e8bd69cd3aa6bf03fe1d45ac8bbfaed1199bf0c127f543e1adb03bb43add6 | bpringe/auth-template | server.clj | (ns auth-template.server
(:gen-class)
(:require [io.pedestal.http :as http]
[io.pedestal.http.route :as route]
[auth-template.service :as service]))
(defonce runnable-service (http/create-server service/service))
(defonce dev-server (atom nil))
(defn start-dev
[& args]
(println "\nCre... | null | https://raw.githubusercontent.com/bpringe/auth-template/af0350009f19339d60b959d77ddc6b058b5c2299/src/auth_template/server.clj | clojure | start with production configuration | (ns auth-template.server
(:gen-class)
(:require [io.pedestal.http :as http]
[io.pedestal.http.route :as route]
[auth-template.service :as service]))
(defonce runnable-service (http/create-server service/service))
(defonce dev-server (atom nil))
(defn start-dev
[& args]
(println "\nCre... |
1e77f37e4360a434aeba6d55b1c95c3f0c66114d47dec492a3f68509dfc8d586 | Decentralized-Pictures/T4L3NT | alpha_context.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_012_Psithaca/lib_protocol/alpha_context.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2019 - 2021 Nomadic Labs < >
Copyright ( c ) 2021 , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to ... |
06f282ce3ddcbc48d7bd34ef047ec199e296f94282b0ec69cda5e0c45979727b | kazu-yamamoto/quic | PacketNumber.hs | # LANGUAGE RecordWildCards #
module Network.QUIC.Connection.PacketNumber (
nextPacketNumber
, setPeerPacketNumber
, getPeerPacketNumber
) where
import Network.QUIC.Connection.Types
import Network.QUIC.Connector
import Network.QUIC.Imports hiding (range)
import Network.QUIC.Types
---------------------------... | null | https://raw.githubusercontent.com/kazu-yamamoto/quic/3e980db0f31648c082093f471531209bf6ce7f3c/Network/QUIC/Connection/PacketNumber.hs | haskell | --------------------------------------------------------------
My packet numbers
-------------------------------------------------------------- | # LANGUAGE RecordWildCards #
module Network.QUIC.Connection.PacketNumber (
nextPacketNumber
, setPeerPacketNumber
, getPeerPacketNumber
) where
import Network.QUIC.Connection.Types
import Network.QUIC.Connector
import Network.QUIC.Imports hiding (range)
import Network.QUIC.Types
nextPacketNumber :: Connec... |
453718852127d754e9190ccb289d5d596bc3430cded5c5f6c543e7f09f95cab4 | gebi/jungerl | ssh_dist.erl | %%% File : ssh_dist.erl
Author : < >
%%% Description : SSH distribution
Created : 29 Aug 2004 by < >
-module(ssh_dist).
-vsn("$Revision$ ").
-rcsid("$Id$\n").
Handles the connection setup phase with other Erlang nodes .
-export([listen/1, accept/1, accept_connection/5,
setup/5, close/1, select/1... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/ssh/src/ssh_dist.erl | erlang | File : ssh_dist.erl
Description : SSH distribution
internal exports
------------------------------------------------------------
Select this protocol based on node name
select(Node) => Bool
Node names MUST have the form <name> @ ssh: <hostname>
FIXME:
a) epmd accesible do not use ssh
b)... | Author : < >
Created : 29 Aug 2004 by < >
-module(ssh_dist).
-vsn("$Revision$ ").
-rcsid("$Id$\n").
Handles the connection setup phase with other Erlang nodes .
-export([listen/1, accept/1, accept_connection/5,
setup/5, close/1, select/1, is_node_name/1]).
-export([accept_loop/2,do_accept/6,do_se... |
4434503cfabe2ef494361d5bb60f88aa29e132b3a05d80b1f99410c8ad6e4205 | ml4tp/tcoq | globnames.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/library/globnames.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
s Global reference is a kernel side ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open CErrors
open Names
open ... |
65b8f724ffeb4fe208eebf23ae734f5c7befea6c2d25cbe5eb95ba7ab3ac1729 | michaelmelanson/monsoon | util.erl | %%%-------------------------------------------------------------------
%%% File : util.erl
Author :
%%% Description :
%%%
Created : 2008 - 03 - 18 by
%%%-------------------------------------------------------------------
-module(util).
%% API
-compile(export_all).
%%=====================================... | null | https://raw.githubusercontent.com/michaelmelanson/monsoon/58dd3fb78da0bdbdba2adc2ba28374cb5364afaa/src/util.erl | erlang | -------------------------------------------------------------------
File : util.erl
Description :
-------------------------------------------------------------------
API
====================================================================
API
====================================================================... | Author :
Created : 2008 - 03 - 18 by
-module(util).
-compile(export_all).
pmap(F, L) ->
S = self(),
Pids = lists:map(fun(I) -> spawn(fun() -> pmap_f(S, F, I) end) end, L),
pmap_gather(Pids).
pmap_gather([H|T]) ->
receive
{H, Ret} -> [Ret|pmap_gather(T)]
end;
pmap_gather([]) ->
... |
7faeabe98349d056734a5b4f6f97cdfcfc6c8b329145dd579e7afda564e5c8a5 | grin-compiler/ghc-wpc-sample-programs | Float.hs | # LANGUAGE CPP #
-- | Logically consistent comparison of floating point numbers.
module Agda.Utils.Float
( normaliseNaN
, doubleToWord64
, floatEq
, floatLt
, toStringWithoutDotZero
) where
import Data.Maybe ( fromMaybe )
import Data.Word
import Numeric.IEEE ( IEEE(identicalIEEE, nan) )
#if __GL... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/Agda-2.6.1/src/full/Agda/Utils/Float.hs | haskell | | Logically consistent comparison of floating point numbers.
| Remove suffix @.0@ from printed floating point number. | # LANGUAGE CPP #
module Agda.Utils.Float
( normaliseNaN
, doubleToWord64
, floatEq
, floatLt
, toStringWithoutDotZero
) where
import Data.Maybe ( fromMaybe )
import Data.Word
import Numeric.IEEE ( IEEE(identicalIEEE, nan) )
#if __GLASGOW_HASKELL__ >= 804
import GHC.Float ( castDoubleToWor... |
9474fe96c21f5c3c351b5eae420ca6ff78fe6163c6e386fb0cedabd6062668e3 | mbutterick/typesetting | tests.rkt | #lang racket/base
(require (submod hyphenate safe) txexpr/base rackunit)
(define omit-em-tag (λ (x) (member (car x) '(em))))
(define omit-p-tag (λ (x) (member (car x) '(p))))
(define omit-foo-zam-tag (λ (x) (member (car x) '(foo zam))))
(define ends-with-s (λ (x) (regexp-match #rx"s$" x)))
(define omit-script-tag (λ (... | null | https://raw.githubusercontent.com/mbutterick/typesetting/8eedb97bb64cb2ff0cd9646eb1b0e46b67f1af44/hyphenate/hyphenate/tests.rkt | racket | word without matching patterns
exception words
test these last so exceptions have been set up already
(check-equal? (word->hyphenation-points "polymorphism") '("poly" "mor" "phism"))
(check-equal? (word->hyphenation-points "present") '("present")) ; exception word
(check-true (exception-word? "foobar"))
(check-false... | #lang racket/base
(require (submod hyphenate safe) txexpr/base rackunit)
(define omit-em-tag (λ (x) (member (car x) '(em))))
(define omit-p-tag (λ (x) (member (car x) '(p))))
(define omit-foo-zam-tag (λ (x) (member (car x) '(foo zam))))
(define ends-with-s (λ (x) (regexp-match #rx"s$" x)))
(define omit-script-tag (λ (... |
24e436f65d2d41ee631f545aa9fd5de961cc72954482144fd30962219689ffbf | pgj/mirage-kfreebsd | flow.ml |
* Copyright ( c ) 2011 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS... | null | https://raw.githubusercontent.com/pgj/mirage-kfreebsd/0ff5b2cd7ab0975e3f2ee1bd89f8e5dbf028b102/packages/mirage-net/lib/flow.ml | ocaml | optional IP address * port
specific IP address * port
block for window to open
full write
Shared mem communication across VMs, not yet implemented |
* Copyright ( c ) 2011 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS... |
d33479016dba62c704326938f8412a6e3e0d46b61b49d25f62a72e97229299da | faylang/fay | pats.hs | module Pats where
main :: Fay ()
main = do
case [1,2] of
[] -> putStrLn "got []"
[a] -> putStrLn "got one value."
[a,b] -> putStrLn "got two values."
case [1,2] of
(([1,2])) -> putStrLn "parens"
| null | https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/tests/pats.hs | haskell | module Pats where
main :: Fay ()
main = do
case [1,2] of
[] -> putStrLn "got []"
[a] -> putStrLn "got one value."
[a,b] -> putStrLn "got two values."
case [1,2] of
(([1,2])) -> putStrLn "parens"
| |
c6e70fb9a9e9d025b51a4319421e21c0aff948b8e80be860e7a5c59e80357c9a | mgaare/clojure-polyline | project.clj | (defproject com.michaelgaare/clojure-polyline "0.4.0"
:description "library to encode and decode google polyline algorithm"
:url "-polyline"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]]
:profiles {:dev {:dependencies [[org.clojure/tools.n... | null | https://raw.githubusercontent.com/mgaare/clojure-polyline/fc7f2f690f018b9d9f25647fb8d2a414154d6e4a/project.clj | clojure | (defproject com.michaelgaare/clojure-polyline "0.4.0"
:description "library to encode and decode google polyline algorithm"
:url "-polyline"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]]
:profiles {:dev {:dependencies [[org.clojure/tools.n... | |
ba08b324f6c8939bf48dc29c6292697dc8ea348b6e0e46472461a9e89c514392 | o1-labs/snarkyjs-crypto | elliptic_curve.ml | let ( = ) = `Don't_use_polymorphic_compare
module Make (N : sig
type t
val test_bit : t -> int -> bool
val num_bits : t -> int
end) (Fq : sig
type t
val equal : t -> t -> bool
val zero : t
val one : t
val inv : t -> t
val ( * ) : t -> t -> t
val square : t -> t
val negate : t -> ... | null | https://raw.githubusercontent.com/o1-labs/snarkyjs-crypto/626f2d3a591447e9803f11955e734e84c1edaa71/src/elliptic_curve.ml | ocaml | Double case | let ( = ) = `Don't_use_polymorphic_compare
module Make (N : sig
type t
val test_bit : t -> int -> bool
val num_bits : t -> int
end) (Fq : sig
type t
val equal : t -> t -> bool
val zero : t
val one : t
val inv : t -> t
val ( * ) : t -> t -> t
val square : t -> t
val negate : t -> ... |
d8bd5f25fb83a11b4bfc2f01015b1f610f323e7b399e24747319acf54a629625 | mhuebert/re-view | project.clj | (defproject re-view/prosemirror "0.2.3-SNAPSHOT"
:description "Rich text editors built with ProseMirror in Re-View"
:url "-view/tree/master/re_view_prosemirror"
:license {:name "MIT License"
:url "-license.php"}
:min-lein-version "2.7.1"
:dependencies [[thheller/shadow-cljs "2.0.20"]
... | null | https://raw.githubusercontent.com/mhuebert/re-view/ba38cd09b78b3c6db6a2983f3e2cf1bd6294564f/prosemirror/project.clj | clojure | (defproject re-view/prosemirror "0.2.3-SNAPSHOT"
:description "Rich text editors built with ProseMirror in Re-View"
:url "-view/tree/master/re_view_prosemirror"
:license {:name "MIT License"
:url "-license.php"}
:min-lein-version "2.7.1"
:dependencies [[thheller/shadow-cljs "2.0.20"]
... | |
2c15156c89b3651efb55ab19b0a6c2fcd63e5ef8af5695c2598958c3ce7c7578 | nikita-volkov/hasql | Prelude.hs | module Hasql.Private.Prelude
( module Exports,
LazyByteString,
ByteStringBuilder,
LazyText,
TextBuilder,
forMToZero_,
forMFromZero_,
strictCons,
mapLeft,
)
where
import Control.Applicative as Exports hiding (WrappedArrow (..))
import Control.Arrow as Exports hiding (first, second)
i... | null | https://raw.githubusercontent.com/nikita-volkov/hasql/554f097702c1500e885f714f224883f5563078a2/library/Hasql/Private/Prelude.hs | haskell | module Hasql.Private.Prelude
( module Exports,
LazyByteString,
ByteStringBuilder,
LazyText,
TextBuilder,
forMToZero_,
forMFromZero_,
strictCons,
mapLeft,
)
where
import Control.Applicative as Exports hiding (WrappedArrow (..))
import Control.Arrow as Exports hiding (first, second)
i... | |
2e71c34036e3a89d8d2699d5ccdb4852a26a13718011ae9ebea727d6b1dff554 | jaspervdj/number-six | BitLy.hs | --------------------------------------------------------------------------------
-- | Provides URL shortening through the bit.ly API
{-# LANGUAGE OverloadedStrings #-}
module NumberSix.Util.BitLy
( shorten
, textAndUrl
) where
-------------------------------------------------------------------------------... | null | https://raw.githubusercontent.com/jaspervdj/number-six/1aba681786bd85bd20f79406c681ea581b982cd6/src/NumberSix/Util/BitLy.hs | haskell | ------------------------------------------------------------------------------
| Provides URL shortening through the bit.ly API
# LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
--... | module NumberSix.Util.BitLy
( shorten
, textAndUrl
) where
import Data.Text (Text)
import qualified Data.Text as T
import Text.XmlHtml
import Text.XmlHtml.Cursor
import NumberSix.Message
import NumberSix.Util
import NumberSi... |
8e976e48275bfea7da872accab32c38c48003c702c09acb01ffc41b85b467416 | jcrossley3/lein-modules | versionization_test.clj | (ns lein-modules.versionization-test
(:use clojure.test
lein-modules.versionization)
(:require [leiningen.core.project :as prj]))
(deftest versionization
(let [child (versionize (prj/read "test-resources/grandparent/parent/child/project.clj"))
deps (-> child :dependencies set)]
(is (= "3.0" (... | null | https://raw.githubusercontent.com/jcrossley3/lein-modules/8282ca9b214cd34ca0d222be670478982e1d55b5/test/lein_modules/versionization_test.clj | clojure | (ns lein-modules.versionization-test
(:use clojure.test
lein-modules.versionization)
(:require [leiningen.core.project :as prj]))
(deftest versionization
(let [child (versionize (prj/read "test-resources/grandparent/parent/child/project.clj"))
deps (-> child :dependencies set)]
(is (= "3.0" (... | |
87d5ffe6c52e16c4f2886b90d37ad86ac38ded9bb4e42e3490332ebf08706e38 | democracyworks/datomic-toolbox | core_test.clj | (ns datomic-toolbox.core-test
(:require [clojure.test :refer :all]
[datomic-toolbox.core :refer :all]
[datomic.api :as d])
(:refer-clojure :exclude [partition]))
(defn recreate-db
[f]
(when-let [old-uri (uri)]
(d/delete-database old-uri))
(initialize {:uri (str "datomic:mem-toolbo... | null | https://raw.githubusercontent.com/democracyworks/datomic-toolbox/670d6da7d8b3195df18616ad1e4c292146859ab5/test/datomic_toolbox/core_test.clj | clojure | initialize is implicitly called via the recreate-db fixture
initialize is implicitly called via the recreate-db fixture | (ns datomic-toolbox.core-test
(:require [clojure.test :refer :all]
[datomic-toolbox.core :refer :all]
[datomic.api :as d])
(:refer-clojure :exclude [partition]))
(defn recreate-db
[f]
(when-let [old-uri (uri)]
(d/delete-database old-uri))
(initialize {:uri (str "datomic:mem-toolbo... |
e5392a2845e03b13012b38b0655074fdedef0a13d19a99c830a41f8f514d8047 | asivitz/Hickory | Editor.hs | module Hickory.FRP.Editor
( editorNetwork
, mkPostEditorState
, readGraphicsParams
, drawPostUI
, GraphicsParams(..)
, Object(..)
, drawObject
, defaultGraphicsParams
, Component(..)
, Attribute(..)
, SomeAttribute(..)
, mkComponent
, mkComponent2
, mkComponent3
, mkComponent4
) where
i... | null | https://raw.githubusercontent.com/asivitz/Hickory/53c44c0e9653e31f6c117ef6be32fae68a18f97a/FRP/Hickory/FRP/Editor.hs | haskell | module Hickory.FRP.Editor
( editorNetwork
, mkPostEditorState
, readGraphicsParams
, drawPostUI
, GraphicsParams(..)
, Object(..)
, drawObject
, defaultGraphicsParams
, Component(..)
, Attribute(..)
, SomeAttribute(..)
, mkComponent
, mkComponent2
, mkComponent3
, mkComponent4
) where
i... | |
021335edcfebabd14c8565d76e81d5e80f17eaa3230bc43b4c6e2baecd4a8b9e | erlang/otp | dirty_bif_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2010 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/f02ae58612b257d187ad030d72b9e8b67ce471ef/erts/emulator/test/dirty_bif_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2010 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(dirty_bif_SUITE).
-define(CHECK(Exp,Got), check(Exp,Got,?LINE)).
-include_lib("common_test/include/ct.hrl"... |
5899b7684eccd9fae3d2e27166cde43a570e0d2af887f5da730589a674c4a2a9 | janestreet/universe | bench.ml | open Core_kernel
module Hash = Base.Hash
module Bench (Hash : Hash.S) = struct
let%bench_module "" [@name_suffix Hash.description] =
(module struct
module Ppx_hash_lib = struct
module Std = struct module Hash = Base.Hash.F(Hash) end
end
module Hash = Ppx_hash_lib.Std.Hash
open ... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ppx_hash/runtime-lib/bench/bench.ml | ocaml | hsv
arg
This module is a verbatim copy of the above, except that we use Hashtbl.hash every
where.
This module enforces the rules described in ../hash_intf.ml | open Core_kernel
module Hash = Base.Hash
module Bench (Hash : Hash.S) = struct
let%bench_module "" [@name_suffix Hash.description] =
(module struct
module Ppx_hash_lib = struct
module Std = struct module Hash = Base.Hash.F(Hash) end
end
module Hash = Ppx_hash_lib.Std.Hash
open ... |
7f489b80f3b5e2cc76033824f0bee4215cad06d77fa943b030dc72aa9031115a | rixed/ramen | RamenSyncZMQServer.ml | (* The actual running sync server daemon *)
open Batteries
open Stdint
open RamenConsts
open RamenHelpersNoLog
open RamenHelpers
open RamenLog
open RamenSync
module Archivist = RamenArchivist
module Default = RamenConstsDefault
module ExitCodes = RamenConstsExitCodes
module Files = RamenFiles
module Metric = RamenCons... | null | https://raw.githubusercontent.com/rixed/ramen/4516b2c3c8286c9467b1ef3628e1706586ac02eb/src/RamenSyncZMQServer.ml | ocaml | The actual running sync server daemon
Create the minimal set of (sticky) keys:
Add a few examples:
* The service: populate the initial conf and implement the message queue.
* Also timeout last tuples.
$< Snapshot
Must ensure no upgrade will be attempted after restart:
Be wary of replay requests found at ... | open Batteries
open Stdint
open RamenConsts
open RamenHelpersNoLog
open RamenHelpers
open RamenLog
open RamenSync
module Archivist = RamenArchivist
module Default = RamenConstsDefault
module ExitCodes = RamenConstsExitCodes
module Files = RamenFiles
module Metric = RamenConstsMetric
module Server = RamenSyncServer.Mak... |
753fe8d72daa6819764a8f00b0c79c89dc9e1111e004e4c9f4711ace344f5bb4 | RutledgePaulV/piped | project.clj | (defproject org.clojars.rutledgepaulv/piped "0.1.8-SNAPSHOT"
:description
"A library for processing AWS SQS messages from a Clojure application."
:url
""
:license
{:name "MIT License" :url "" :year 2020 :key "mit"}
:scm
{:name "git" :url ""}
:pom-addition
[:developers
[:developer
[:name ... | null | https://raw.githubusercontent.com/RutledgePaulV/piped/0faedf40f651b88da7cbeb0570bc21764f955a1e/project.clj | clojure | (defproject org.clojars.rutledgepaulv/piped "0.1.8-SNAPSHOT"
:description
"A library for processing AWS SQS messages from a Clojure application."
:url
""
:license
{:name "MIT License" :url "" :year 2020 :key "mit"}
:scm
{:name "git" :url ""}
:pom-addition
[:developers
[:developer
[:name ... | |
84d5e0db36d196bd49bb09fb99169c167f7ce7283bcdbb16aadffd40995d0ae6 | danidiaz/streamy | tests.hs | module Main where
import Test.Tasty
import Test.Pipes.Common
import Test.Pipes.PipeStreaming
import Test.Streaming.Common
import Test.Streaming.PipeStreaming
import Test.Conduit.Common
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests =
testGroup "All"
[ testGroup "Pipes"
[ testGrou... | null | https://raw.githubusercontent.com/danidiaz/streamy/2d167569f3a3ea82eeb1b664d444a5c637618859/streamy-testsuite/tests/tests.hs | haskell | module Main where
import Test.Tasty
import Test.Pipes.Common
import Test.Pipes.PipeStreaming
import Test.Streaming.Common
import Test.Streaming.PipeStreaming
import Test.Conduit.Common
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests =
testGroup "All"
[ testGroup "Pipes"
[ testGrou... | |
c3820f6a10674fd2281d7c306bd2ee01694232c1f6a6e3e8fda5dacb16cab8ed | tonyg/kali-scheme | r5-system.scm | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
; Link script.
(define (link-revised^5-system)
(let ((structures-to-open (struct-list scheme)))
(link-reified-system structures-to-open
'revised^5
`(start ',(map car structures-to-o... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/debug/r5-system.scm | scheme | Link script.
Extra stuff (from more-packages.scm) | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
(define (link-revised^5-system)
(let ((structures-to-open (struct-list scheme)))
(link-reified-system structures-to-open
'revised^5
`(start ',(map car structures-to-open))
initi... |
b99ececc6cf7e65fcb9c405c56ae3c579dd5b31f181483702878784e288b546e | jonascarpay/calligraphy | Spec.hs | import Test.Hspec
import qualified Test.LexTree as TS
main :: IO ()
main =
hspec $ do
TS.spec
| null | https://raw.githubusercontent.com/jonascarpay/calligraphy/58fb0c087bbd0cb9587c7bfde0fc6e879d6060d1/test/Spec.hs | haskell | import Test.Hspec
import qualified Test.LexTree as TS
main :: IO ()
main =
hspec $ do
TS.spec
| |
5afa106f6dcd4d6b5ff33febfffec9ebb098953a5e9ae1c33b60b7f67e40a2a0 | psholtz/MIT-SICP | exercise1-26.scm | ;;
Exercise 1.26
;;
is having great difficulty doing exercise 1.24 . This " fast - prime ? " test seems to
run more slowly than this " prime ? " test . calls his friend over to help . When
they examine ' code , they find that he has rewritten the expmod procedure to use an explicit
;; multiplication, rat... | null | https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-1.2/mit-scheme/exercise1-26.scm | scheme |
multiplication, rather than calling "square":
((even? exp)
m))
(else
(remainder (* base (expmod base (- exp 1) m))
m))))
"procedure like that you have transformed the O(log n) process into a O(n) process." Explain.
For the sake of enter... | Exercise 1.26
is having great difficulty doing exercise 1.24 . This " fast - prime ? " test seems to
run more slowly than this " prime ? " test . calls his friend over to help . When
they examine ' code , they find that he has rewritten the expmod procedure to use an explicit
( define ( expmod base exp... |
5ff795d35a0a64e97cda777cfecc15299e93f911501b2ead4489af2b02a4f308 | klange/cs421 | mp2.ml | CS421 - Fall 2011
* MP2
*
* Please keep in mind that there may be more than one
* way to solve a problem . You will want to change how a number of these start .
* MP2
*
* Please keep in mind that there may be more than one
* way to solve a problem. You will want to change how a number o... | null | https://raw.githubusercontent.com/klange/cs421/8db4619db63169bbc2ca7e1998fa4e95f002a5c4/mp2grader/mp2.ml | ocaml | Extra credit | CS421 - Fall 2011
* MP2
*
* Please keep in mind that there may be more than one
* way to solve a problem . You will want to change how a number of these start .
* MP2
*
* Please keep in mind that there may be more than one
* way to solve a problem. You will want to change how a number o... |
a2d01b85700c9d1f18c2e3a21e14a1a7873785d07dcda256e0160e9517c558f6 | processone/ejabberd | mod_mix_sql.erl | %%%-------------------------------------------------------------------
Created : 1 Dec 2018 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by t... | null | https://raw.githubusercontent.com/processone/ejabberd/b860a25c82515ba51b044e13ea4e040e3b9bbc41/src/mod_mix_sql.erl | erlang | -------------------------------------------------------------------
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHA... | Created : 1 Dec 2018 by < >
ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
with this program ;... |
6cb8c7c7428c0d57d1e1f5457c9d715528f80c3659260724276629f3c713650a | Rhywun/get-programming-with-haskell | sum.hs | import Control.Monad
import System.Environment
-- All the logic is wrapped up in IO - sad!
main :: IO ()
main = do
args <- getArgs
putStrLn " : "
-- mapM_ putStrLn args
let count = if not (null args) then read (head args) else 0
numbers <- replicateM count getLine
let ints = map read ... | null | https://raw.githubusercontent.com/Rhywun/get-programming-with-haskell/b9cf06f725b2ef038d69ed49f7d2900f55e98ca3/Unit04/Lesson22/sum.hs | haskell | All the logic is wrapped up in IO - sad!
mapM_ putStrLn args | import Control.Monad
import System.Environment
main :: IO ()
main = do
args <- getArgs
putStrLn " : "
let count = if not (null args) then read (head args) else 0
numbers <- replicateM count getLine
let ints = map read numbers :: [Int]
print (sum ints)
|
be8bb48f63717849fd32b68ff49cab5b1fe12eee4c164df638705bf388192700 | auser/hermes | thrift_sup.erl | %%%-------------------------------------------------------------------
%%% File: thrift_sup.erl
@author < > [ ]
2009
%%% @doc
%%%
%%% @end
%%%
@since 2009 - 04 - 04 by
%%%-------------------------------------------------------------------
-module(thrift_sup).
-author('').
-behaviour(superviso... | null | https://raw.githubusercontent.com/auser/hermes/32741eb75398ebbcbf640e2c73dfd2a54f0d1241/deps/thrift/src/thrift_sup.erl | erlang | -------------------------------------------------------------------
File: thrift_sup.erl
@doc
@end
-------------------------------------------------------------------
API
Supervisor callbacks
====================================================================
API functions
============================... | @author < > [ ]
2009
@since 2009 - 04 - 04 by
-module(thrift_sup).
-author('').
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
( ) - > { ok , Pid } | ignore | { error , Error }
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, [])... |
e7d206fa2413a3e7c3078cdd82fe077e08a8dbfb35b46e8d03213ea4815bf046 | Wizek/hs-di | GhcidTest.hs | module GhcidTest where
import GhcidTest2
import DI
injG
xxxI = 123
xxx2 = asd2val + 1
| null | https://raw.githubusercontent.com/Wizek/hs-di/4e7d11f4341a155667cb856b6f231d7b6af2c935/test/GhcidTest.hs | haskell | module GhcidTest where
import GhcidTest2
import DI
injG
xxxI = 123
xxx2 = asd2val + 1
| |
30a070b726edf8a5e3d99536b585837dcd58c7905bf7b8919dfe23c30472d307 | UBTECH-Walker/WalkerSimulationFor2020WAIC | JointTrajectory.lisp | ; Auto-generated. Do not edit!
(cl:in-package baxter_core_msgs-msg)
// ! \htmlinclude JointTrajectory.msg.html
(cl:defclass <JointTrajectory> (roslisp-msg-protocol:ros-message)
((mode
:reader mode
:initarg :mode
:type cl:integer
:initform 0)
(position
:reader position
:initarg :positio... | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_18.04_v1.2_20200616/walker_install/share/common-lisp/ros/baxter_core_msgs/msg/JointTrajectory.lisp | lisp | Auto-generated. Do not edit! |
(cl:in-package baxter_core_msgs-msg)
// ! \htmlinclude JointTrajectory.msg.html
(cl:defclass <JointTrajectory> (roslisp-msg-protocol:ros-message)
((mode
:reader mode
:initarg :mode
:type cl:integer
:initform 0)
(position
:reader position
:initarg :position
:type (cl:vector cl:float... |
c7b9552a7900107c366b451f3a1b2121d4a2c08f631ebfed59c947d38a4312cf | mariachris/Concuerror | workers_2.erl | -module(workers_2).
-export([workers_2/0]).
-export([scenarios/0]).
-define(LOW, 1).
-define(HIGH, 2).
-define(ADD, 10).
-define(WORKERS, 2).
-define(RETRIES, 2).
scenarios() -> [{?MODULE, inf, dpor}].
workers_2() ->
Self = self(),
Pid = spawn(fun() -> server(Self) end),
spawner(?WORKERS, Pid),
rece... | null | https://raw.githubusercontent.com/mariachris/Concuerror/87e63f10ac615bf2eeac5b0916ef54d11a933e0b/testsuite/suites/dpor/src/workers_2.erl | erlang | -module(workers_2).
-export([workers_2/0]).
-export([scenarios/0]).
-define(LOW, 1).
-define(HIGH, 2).
-define(ADD, 10).
-define(WORKERS, 2).
-define(RETRIES, 2).
scenarios() -> [{?MODULE, inf, dpor}].
workers_2() ->
Self = self(),
Pid = spawn(fun() -> server(Self) end),
spawner(?WORKERS, Pid),
rece... | |
c97f2e7079db42badddbd29a74e954428baa728ef82118c53d8cb27c58623a9e | YoshikuniJujo/test_haskell | LengthR.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE DataKinds, TypeOperators #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE FlexibleContexts , FlexibleInstances , UndecidableInstances #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Data.List.Length.LengthR (
LengthR, unfoldl, unfoldlWithBase, unfoldlM, unfoldlMWithBase,
ListToLengthR, li... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/559d581e88a65bc02156dca9402b126cf6367fd1/tribial/bugfix/try-bugfix-ranged-list/src/Data/List/Length/LengthR.hs | haskell | # LANGUAGE DataKinds, TypeOperators #
# LANGUAGE GADTs #
-------------------------------------------------------------------------
TYPE
UNFOLDL
LIST TO LENGTH RIGHT
-------------------------------------------------------------------------
TYPE
------------------------------------------------------------------------... | # LANGUAGE LambdaCase #
# LANGUAGE FlexibleContexts , FlexibleInstances , UndecidableInstances #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Data.List.Length.LengthR (
LengthR, unfoldl, unfoldlWithBase, unfoldlM, unfoldlMWithBase,
ListToLengthR, listToLengthR ) where
import GHC.TypeNats (type (-), type (<=))
im... |
06fe1fee5e7f57a6702e22c29c8612c911210b8f05a7fff8a4ee59ec2b42ff2b | ggreif/omega | Front.hs | Time - stamp : < 2010 - 06 - 15 10:56:02 cklin >
module Front where
import Types
import Data.Char
import Data.List
import System.IO
{-
-}
{- frown :-( -}
data Stack__
= Empty__
| T_1_9__ Stack__ Ident
| T_1_13__ Stack__
| T_1_4__ Stack__
| T_1_18__ Stack__ String
| T_1_2__ Stack__ ... | null | https://raw.githubusercontent.com/ggreif/omega/016a3b48313ec2c68e8d8ad60147015bc38f2767/vendor/algorithm-p/Front.hs | haskell |
frown :-(
)-: frown
----- Parse programs in files
------- Lexical analysis: top-level function
------- Lexical analysis: symbols and operators
different integer binary operators. This is hack, but as long as we
only type (but not evaluate) the programs, there really is no need to
distinguish the operators,... | Time - stamp : < 2010 - 06 - 15 10:56:02 cklin >
module Front where
import Types
import Data.Char
import Data.List
import System.IO
data Stack__
= Empty__
| T_1_9__ Stack__ Ident
| T_1_13__ Stack__
| T_1_4__ Stack__
| T_1_18__ Stack__ String
| T_1_2__ Stack__ ([Program])
| T_1_6__... |
3f5a43ffb75dfb1be8b07276364984f74f0270d5548a18c75ea9a72c237f84cf | gwathlobal/CotD | los-fov.lisp | (in-package :cotd)
(defun get-distance (sx sy tx ty)
(declare (type fixnum sx sy tx ty))
(sqrt (+ (* (- sx tx) (- sx tx)) (* (- sy ty) (- sy ty)))))
(defun get-distance-3d (sx sy sz tx ty tz)
(declare (type fixnum sx sy sz tx ty tz))
(sqrt (+ (* (- sx tx) (- sx tx)) (* (- sy ty) (- sy ty)) (* (- sz tz... | null | https://raw.githubusercontent.com/gwathlobal/CotD/d01ef486cc1d3b21d2ad670ebdb443e957290aa2/src/los-fov.lisp | lisp | prev is up, the tile above current has trait & the prev tile has trait
prev is down
iterate through all mobs
if the light emitted by a mob is positive - increase brightness
if the light emitted by a mob is negative - increase darkness
iterate through all stationary sources
insert set light func here
incr... | (in-package :cotd)
(defun get-distance (sx sy tx ty)
(declare (type fixnum sx sy tx ty))
(sqrt (+ (* (- sx tx) (- sx tx)) (* (- sy ty) (- sy ty)))))
(defun get-distance-3d (sx sy sz tx ty tz)
(declare (type fixnum sx sy sz tx ty tz))
(sqrt (+ (* (- sx tx) (- sx tx)) (* (- sy ty) (- sy ty)) (* (- sz tz... |
4122bc3ddb47b4853e003f0e10f1a4875a31e30065a194e40f6bdaed2b8608f1 | input-output-hk/cardano-ledger-byron | Interface.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Blockchain interface validation rules.
--
module Cardano.Chain.Update.Va... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger-byron/d309449e6c303a9f0dcc8dcf172df6f0b3195ed5/cardano-ledger/src/Cardano/Chain/Update/Validation/Interface.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DeriveAnyClass #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedStrings #
| Blockchain interface validation rules.
* Environment
* State
* Signal
*Error
* Interface functions
of our protocol parameters, so it seems that we need to pass it in the
environment... | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
module Cardano.Chain.Update.Validation.Interface
(
Environment(..)
, State(..)
, initialState
, Signal(..)
, Error(..)
, registerUpdate
, registerProposal
, registerVote
, registerEndorsement
,... |
b84c0dffb9335f260e2b24a7ce2cee5c4161c63915bc6f7340a5677cd372152f | haskell/deepseq | Main.hs | -- Code reused from -generics
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE TupleSections #
module Main (main) where
import Control.Concurrent.MVar
IUT
import Control.DeepSeq
import Control.Exception
import Control.Monad
import Data.Bits
import Data.IORef
import Data.Typeable
import Data... | null | https://raw.githubusercontent.com/haskell/deepseq/ae1ac1cef68e4f4f0a9807e992f2e86ec4da3530/tests/Main.hs | haskell | Code reused from -generics
# LANGUAGE DeriveDataTypeable #
--------------------------------------------------------------------------
| Set flag and raise exception is flag already set
--------------------------------------------------------------------------
--
--
--
-------------------------------------------------... | # LANGUAGE DeriveGeneric #
# LANGUAGE TupleSections #
module Main (main) where
import Control.Concurrent.MVar
IUT
import Control.DeepSeq
import Control.Exception
import Control.Monad
import Data.Bits
import Data.IORef
import Data.Typeable
import Data.Word
import GHC.Generics
import System.Exit (exitFailure)
import ... |
10db69fb65281ad76a7cd45623cbe4d9bea3ab39aecafc2976c8bfc1fd56e23b | oriansj/mes-m2 | assq.scm | GNU --- Maxwell Equations of Software
Copyright ( C ) 2008 Kragen
;;;
This file is part of GNU .
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the License , or ( ... | null | https://raw.githubusercontent.com/oriansj/mes-m2/b44fbc976ae334252de4eb82a57c361a195f2194/test/test033/assq.scm | scheme |
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Setup output file | GNU --- Maxwell Equations of Software
Copyright ( C ) 2008 Kragen
This file is part of GNU .
under the terms of the GNU General Public License as published by
GNU is distributed in the hope that it will be useful , but
You should have received a copy of the GNU General Public License
along with GNU... |
f8ae91a396641dfa67a32c80ce025eb01808838428f803e0f229e86ded46cc30 | jacekschae/learn-pedestal-course-files | server.clj | (ns cheffy.server
(:require [com.stuartsierra.component :as component]
[clojure.edn :as edn]
[cheffy.components.api-server :as api-server]
[cheffy.components.database :as database]))
(defn create-system
[config]
(component/system-map
:config config
:auth (:auth config)... | null | https://raw.githubusercontent.com/jacekschae/learn-pedestal-course-files/30666cbb8b3662444e16e7fc9ebe65795d7eb7a4/increments/57-create-account/src/main/cheffy/server.clj | clojure | (ns cheffy.server
(:require [com.stuartsierra.component :as component]
[clojure.edn :as edn]
[cheffy.components.api-server :as api-server]
[cheffy.components.database :as database]))
(defn create-system
[config]
(component/system-map
:config config
:auth (:auth config)... | |
30e98c5c1391db016abb67d2574447e771b1cccccf80fd41435294fa2b14ed9f | adbrowne/dynamodb-eventstore | Feed.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
{-# LANGUAGE ScopedTypeVariables #-}
module DynamoDbEventStore.Feed (
xmlFeed,
jsonFeed,
jsonEntry,
Feed(..),
recordedEventToFeedEntry,
streamResultsToFeed,
globalStreamResultsToFeed,
globalFeed... | null | https://raw.githubusercontent.com/adbrowne/dynamodb-eventstore/e3c16976582bf7727091a718d794662565f41280/dynamodb-eventstore-web/src/DynamoDbEventStore/Feed.hs | haskell | # LANGUAGE ScopedTypeVariables #
adapted from: -html-0.3.2.1/docs/src/Text-Blaze-Renderer-Text.html
^ Text to escape
^ Resulting text builder | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
module DynamoDbEventStore.Feed (
xmlFeed,
jsonFeed,
jsonEntry,
Feed(..),
recordedEventToFeedEntry,
streamResultsToFeed,
globalStreamResultsToFeed,
globalFeedPositionToText) where
import ... |
d4dde122a961f877f32378705f9f3c12f0b03d29a30ba66bebc4100588616a3e | FranklinChen/learn-you-some-erlang | ppool_worker_sup.erl | -module(ppool_worker_sup).
-export([start_link/1, init/1]).
-behaviour(supervisor).
start_link(MFA = {_,_,_}) ->
supervisor:start_link(?MODULE, MFA).
init({M,F,A}) ->
MaxRestart = 5,
MaxTime = 3600,
{ok, {{simple_one_for_one, MaxRestart, MaxTime},
[{ppool_worker,
{M,F,A},
... | null | https://raw.githubusercontent.com/FranklinChen/learn-you-some-erlang/878c8bc2011a12862fe72dd7fdc6c921348c79d6/ppool-1.0/src/ppool_worker_sup.erl | erlang | -module(ppool_worker_sup).
-export([start_link/1, init/1]).
-behaviour(supervisor).
start_link(MFA = {_,_,_}) ->
supervisor:start_link(?MODULE, MFA).
init({M,F,A}) ->
MaxRestart = 5,
MaxTime = 3600,
{ok, {{simple_one_for_one, MaxRestart, MaxTime},
[{ppool_worker,
{M,F,A},
... | |
9da373468a3dc60036fe887e27506c3e29230362e13140f1ca5c716cec1bd749 | swlkr/majestic-web | core.clj | (ns {{name}}.core
(:require [{{name}}.server :as server]
[{{name}}.utils :as utils])
(:gen-class))
(def start server/start)
(def stop server/stop)
(def restart server/restart)
(defn -main [& [port]]
(server/run! port))
| null | https://raw.githubusercontent.com/swlkr/majestic-web/3d247f6b5ccc4ff3662a64544a4ca27beada971b/resources/leiningen/new/majestic_web/core.clj | clojure | (ns {{name}}.core
(:require [{{name}}.server :as server]
[{{name}}.utils :as utils])
(:gen-class))
(def start server/start)
(def stop server/stop)
(def restart server/restart)
(defn -main [& [port]]
(server/run! port))
| |
c40bf9dba5a7856afacc275d438ab83153556043916e5f10d7899685b178c1f3 | igraves/peparser-haskell | Parser.hs | module Data.PE.Parser (buildFile, buildFileFromBS) where
import Data.PE.Structures
import Data.PE.Utils
import qualified Data.ByteString.Lazy as B
import Data.Binary.Get
import Data.Maybe
-- |Supply a filename of a PE file in the form of a string. Returns a PEFile structure
buildFile :: String -- ^The file na... | null | https://raw.githubusercontent.com/igraves/peparser-haskell/a953a72f697a5831e1c1cb5a485954b5f16f3843/Data/PE/Parser.hs | haskell | |Supply a filename of a PE file in the form of a string. Returns a PEFile structure
^The file name
|Supply a bytestring to be parsed as if it were a PE Binary. Returns a PEFile structure
^ByteString representing a PE file
^The data structure returned
chew through
chew through
chew through
chew throug... | module Data.PE.Parser (buildFile, buildFileFromBS) where
import Data.PE.Structures
import Data.PE.Utils
import qualified Data.ByteString.Lazy as B
import Data.Binary.Get
import Data.Maybe
^The resulting data structure in the IO monad
buildFile fName = do
fbstring <- B.readFile fName
... |
99f71cf6fb73688fdb84547fef2ed65597354d143c55e88ab346242b62cc16c6 | igrishaev/book-sessions | server.clj | (ns book.systems.mount.server
(:require
[book.systems.mount.config :refer [config]]
[mount.core :as mount :refer [defstate]]
[ring.adapter.jetty :refer [run-jetty]]))
(def app (constantly {:status 200 :body "Hello"}))
(defstate ^{:on-reload :noop} server
:start (run-jetty app {:join? false :port 8080})
... | null | https://raw.githubusercontent.com/igrishaev/book-sessions/c62af1230e91b8ab9e4e456798e894d1b4145dfc/src/book/systems/mount/server.clj | clojure | (ns book.systems.mount.server
(:require
[book.systems.mount.config :refer [config]]
[mount.core :as mount :refer [defstate]]
[ring.adapter.jetty :refer [run-jetty]]))
(def app (constantly {:status 200 :body "Hello"}))
(defstate ^{:on-reload :noop} server
:start (run-jetty app {:join? false :port 8080})
... | |
6c7505872bc24dca7e7fc1a90492471f9973be8f3fd8765553e76fd09bdc2c52 | luposlip/json-schema | infer.clj | (ns json-schema.infer
(:require [clojure.walk :as walk]
[cheshire.core :as json]))
(defn eradicate-lists [m]
(if (or (associative? m)
(sequential? m))
(walk/postwalk
#(if (sequential? %)
(vec %) %)
m)
m))
(defn key-paths
"Returns a sequence of all key paths in a ... | null | https://raw.githubusercontent.com/luposlip/json-schema/8a07329d8f31b29b15a4b53fcd1be57f330d197d/src/json_schema/infer.clj | clojure | bc/o mutual recursion
required
optional | (ns json-schema.infer
(:require [clojure.walk :as walk]
[cheshire.core :as json]))
(defn eradicate-lists [m]
(if (or (associative? m)
(sequential? m))
(walk/postwalk
#(if (sequential? %)
(vec %) %)
m)
m))
(defn key-paths
"Returns a sequence of all key paths in a ... |
a52e9289cc84f7fe6eda36c23539f04f42cb59a0e5632e66f21c5461da69cd3e | aryx/xix | diff_unified.mli | (*s: version_control/diff_unified.mli *)
(*s: signature [[Diff_unified.show_change]] *)
val show_change: Change.t -> unit
(*e: signature [[Diff_unified.show_change]] *)
(* internals *)
val show_unified_diff: Diff.diff -> unit
(*e: version_control/diff_unified.mli *)
| null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/version_control/diff_unified.mli | ocaml | s: version_control/diff_unified.mli
s: signature [[Diff_unified.show_change]]
e: signature [[Diff_unified.show_change]]
internals
e: version_control/diff_unified.mli |
val show_change: Change.t -> unit
val show_unified_diff: Diff.diff -> unit
|
556e9f227b725aa603d7dd855310784208395b6d091555281aebe202cfbb0a77 | sellout/quid-pro-quo | missing-advice.lisp | (in-package #:quid-pro-quo)
(defmacro defcontract (name type lambda-list &body body)
(declare (ignore type lambda-list body))
`(progn
(warn "Could not add contract to ~A: ~A does not seem to have any ability
to wrap functions."
',name (lisp-implementation-type))
(function ,name)))
| null | https://raw.githubusercontent.com/sellout/quid-pro-quo/c35156d5883efb15e21ad4db932a57e353f4d329/src/missing-advice.lisp | lisp | (in-package #:quid-pro-quo)
(defmacro defcontract (name type lambda-list &body body)
(declare (ignore type lambda-list body))
`(progn
(warn "Could not add contract to ~A: ~A does not seem to have any ability
to wrap functions."
',name (lisp-implementation-type))
(function ,name)))
| |
b526ec1db8bd9327a19cb9e2f6eace7ae696def8cf4f6f0451dd6bc7c9e48d56 | mfoemmel/erlang-otp | mnesia_power_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/test_server/src/things/mnesia_power_SUITE.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(mnesia_power_SUITE).
-compile([expo... |
ec9d060fc2de95629888b4c3f78e3141aae5fe2cd033d718ebcad8d519482f98 | gfngfn/SATySFi | config.mli |
open MyUtil
exception PackageNotFound of string * abs_path list
exception LibraryFileNotFound of lib_path * abs_path list
exception LibraryFilesNotFound of lib_path list * abs_path list
exception ImportedFileNotFound of string * abs_path list
val initialize : string list -> unit
val resolve_lib_file_opt : lib_p... | null | https://raw.githubusercontent.com/gfngfn/SATySFi/9dbd61df0ab05943b3394830c371e927df45251a/src/config.mli | ocaml |
open MyUtil
exception PackageNotFound of string * abs_path list
exception LibraryFileNotFound of lib_path * abs_path list
exception LibraryFilesNotFound of lib_path list * abs_path list
exception ImportedFileNotFound of string * abs_path list
val initialize : string list -> unit
val resolve_lib_file_opt : lib_p... | |
88dafb7cecc1aa99277353a203f04e4b7954cc3a16ef75f35464695ffc4ffb30 | vernemq/vernemq | vmq_pulse_sup.erl | Copyright 2019 Octavo Labs AG Switzerland ( )
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, softw... | null | https://raw.githubusercontent.com/vernemq/vernemq/234d253250cb5371b97ebb588622076fdabc6a5f/apps/vmq_pulse/src/vmq_pulse_sup.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2019 Octavo Labs AG Switzerland ( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(vmq_pulse_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
-defin... |
4943992c30e8e5e2dcde43be6cbc955d6821ec84f8f4eede97d7611cae390668 | VisionsGlobalEmpowerment/webchange | icon_spread_text_left_bottom.cljs | (ns webchange.ui.components.icon.layout.icon-spread-text-left-bottom)
(def data
[:svg {:xmlns ""
:width "231" :height "142" :viewBox "0 0 231 142"
:fill "none" :stroke "#DCE3F5" :stroke-width "2"
:class-name "stroke-colored"}
[:path {:d "M117 1L117 140"}]
[:path {:d "... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/0df52dd08d54f14d4ec5d2717f48031849a7ee16/src/cljs/webchange/ui/components/icon/layout/icon_spread_text_left_bottom.cljs | clojure | (ns webchange.ui.components.icon.layout.icon-spread-text-left-bottom)
(def data
[:svg {:xmlns ""
:width "231" :height "142" :viewBox "0 0 231 142"
:fill "none" :stroke "#DCE3F5" :stroke-width "2"
:class-name "stroke-colored"}
[:path {:d "M117 1L117 140"}]
[:path {:d "... | |
e3180bfc0e1f969f68e44e7863ebb37890f5468daed593a9ce619ff93fce8932 | nomasystems/nthrottle | nthrottle_util.erl | Copyright 2022 Nomasystems , S.L.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distri... | null | https://raw.githubusercontent.com/nomasystems/nthrottle/3b0dcf8c5c229fbf1af2de8ba70d35787bcada09/src/nthrottle_util.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2022 Nomasystems , S.L.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(nthrottle_util).
-export([from_rps/1, notify/1, safe_split/2, safe_substract/2]).
from_rps(Rps) when Rps < 1 andalso Rps > 0 ->
... |
5d109b25cc9584dfbd0bef6c78bc9bf9ab6e6df3d5f5e5f36b0546c6ddb991e6 | TrustInSoft/tis-interpreter | cfgDump.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/cfgDump.ml | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Soft... |
97f864ed927e5538b16ff4789abb830c6abcf27820e86cf0b97189e709f8fa2d | jmorag/open-strings | ShortestPath.hs | {-# LANGUAGE BangPatterns #-}
-- |
Module : Graph . ShortestPath
module Graph.ShortestPath (shortestPath, pathCost, nEdges) where
import Control.Monad
import Control.Monad.ST
import Data.Function
import Data.List (minimumBy)
import Data.List.NonEmpty (NonEmpty (..))
import Data.Vector (Vector)
import qualified Data... | null | https://raw.githubusercontent.com/jmorag/open-strings/4e6f67aec993343576959c45396b5900945398c2/src/Graph/ShortestPath.hs | haskell | # LANGUAGE BangPatterns #
|
-3rd%20Edition.pdf
------------------------------------------------------------------------------
for each vertex u, taken in topologically sorted order
RELAX(u,v,w)
------------------------------------------------------------------------------
v.d = ∞
s.d = 0
---------------... |
Module : Graph . ShortestPath
module Graph.ShortestPath (shortestPath, pathCost, nEdges) where
import Control.Monad
import Control.Monad.ST
import Data.Function
import Data.List (minimumBy)
import Data.List.NonEmpty (NonEmpty (..))
import Data.Vector (Vector)
import qualified Data.Vector as V
import qualified Data.... |
47067edca46df35a50a02438b08dd133e836ddde87a1fb06d52c7763f884a718 | spechub/Hets | TiDecorateATC.der.hs | # LANGUAGE CPP , StandaloneDeriving , DeriveDataTypeable #
|
Module : ./Haskell / TiDecorateATC.der.hs
Description : ShATermConvertible instances
Copyright : ( c ) , Uni Bremen 2006
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portab... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/Haskell/TiDecorateATC.der.hs | haskell | # LANGUAGE CPP , StandaloneDeriving , DeriveDataTypeable #
|
Module : ./Haskell / TiDecorateATC.der.hs
Description : ShATermConvertible instances
Copyright : ( c ) , Uni Bremen 2006
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portab... | |
fe4ac08439ee7f8fb91342f3d70f9a30ae2a14567e8ebacc0eae78983d4f123d | basho/riak_search | search.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
%%
%% -------------------------------------------------------------------
Convenience module for interacting with Search from the Erlang
%%% command line. Allows t... | null | https://raw.githubusercontent.com/basho/riak_search/79c034350f37706a1db42ffca8f6449d4cce99e1/src/search.erl | erlang | -------------------------------------------------------------------
-------------------------------------------------------------------
command line. Allows the user to search for keys and docs, explain
queries, index documents in a directory, index a set of fields,
de-index (delete) documents in a directory, an... | Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
Convenience module for interacting with Search from the Erlang
It provides convenience in three main ways :
1 . Takes care of instantiating the riak_search_client
2 . Wraps arguments into structures such as the # riak_idx_doc .
3... |
daeac83a07726e3c677d01da906d3e871b34caf7a036ecb3903cac8b6373aae5 | haskell/ghcide | RuleTypes.hs | # LANGUAGE TypeFamilies #
module Development.IDE.Plugin.CodeAction.RuleTypes
(PackageExports(..)
,IdentInfo(..)
) where
import Data.Hashable (Hashable)
import Control.DeepSeq (NFData)
import Data.Binary (Binary)
import Development.IDE.GHC.Util
import Development.IDE.Types.Exports
import Development.Shake (... | null | https://raw.githubusercontent.com/haskell/ghcide/3ef4ef99c4b9cde867d29180c32586947df64b9e/src/Development/IDE/Plugin/CodeAction/RuleTypes.hs | haskell | Rule type for caching Package Exports | # LANGUAGE TypeFamilies #
module Development.IDE.Plugin.CodeAction.RuleTypes
(PackageExports(..)
,IdentInfo(..)
) where
import Data.Hashable (Hashable)
import Control.DeepSeq (NFData)
import Data.Binary (Binary)
import Development.IDE.GHC.Util
import Development.IDE.Types.Exports
import Development.Shake (... |
1cadff1c9c312dcb8621d28c3b2a0002680c0488871f9176783b42edab10a162 | nomasystems/ndto | ndto_SUITE.erl | Copyright 2022 Nomasystems , S.L.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distri... | null | https://raw.githubusercontent.com/nomasystems/ndto/5d546e6945c070a0e2c7ddd729c828f393113951/test/ndto_SUITE.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2022 Nomasystems , S.L.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(ndto_SUITE).
-compile([export_all, nowarn_export_all]).
all() ->
[
{group, types},
{group, subschemas},
... |
eb2b73c66f8bf4c8f21e496105d40d799d59add5eb25708cd502d98e7df0b7ae | tommaisey/aeon | derived.scm | (define add3 sum3)
(define add4 sum4)
(define as-local-buf
(lambda (l)
(let* ((b (local-buf (length l) 1))
(s (set-buf* b 0 l)))
(mrg2 b s))))
(define buf-rd-c (lambda (nc r b p l) (buf-rd nc r b p l 4)))
(define buf-rd-l (lambda (nc r b p l) (buf-rd nc r b p l 2)))
(define buf-rd-n (lambda (nc... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/src/derived.scm | scheme | mce -> int -> ugen
ugen|mce -> ugen
int -> (int -> ugen) -> ugen
Rate -> UGen -> UGen -> Warp -> UGen -> UGen
[m] -> [p] -> [#, m, p...]
[[m, p]] -> [#, m, p...]
double -> void
double -> void
port -> ugen -> ()
rate -> ugen -> ugen -> ugen -> ugen -> ugen
the cardinality input is derived from the values inpu... | (define add3 sum3)
(define add4 sum4)
(define as-local-buf
(lambda (l)
(let* ((b (local-buf (length l) 1))
(s (set-buf* b 0 l)))
(mrg2 b s))))
(define buf-rd-c (lambda (nc r b p l) (buf-rd nc r b p l 4)))
(define buf-rd-l (lambda (nc r b p l) (buf-rd nc r b p l 2)))
(define buf-rd-n (lambda (nc... |
6d8e0ef5df9ea5e3709fcac15b7d0d1d0dde6b8dd674378bff9ed22f4308fadf | xh4/web-toolkit | api.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - UNICODE ; Base : 10 -*-
$ Header : /usr / local / cvsrep / cl - unicode / api.lisp , v 1.32 2012 - 05 - 04 21:17:44 edi Exp $
Copyright ( c ) 2008 - 2012 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or witho... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/cl-unicode-20190521-git/api.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - UNICODE ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | $ Header : /usr / local / cvsrep / cl - unicode / api.lisp , v 1.32 2012 - 05 - 04 21:17:44 edi Exp $
Copyright ( c ) 2008 - 2012 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-packa... |
a44303bfabf5416f21c591df10d8be5ef70a7c71584987f892e0dcf614f2a125 | weblocks-framework/weblocks | listedit.lisp |
(in-package :weblocks)
(export '(listedit))
(defwidget listedit (dataedit-mixin datalist)
()
(:documentation "A widget based on the 'datalist' that enhances it
with user interface to add, remove, and modify data entries."))
(defmethod dataedit-create-new-item-widget ((obj listedit))
(make-quickform (dataedi... | null | https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/src/widgets/listedit.lisp | lisp | Renders the body of the listedit. Essentially, just calls
datalist's render method, except that proper controls (add item,
delete item, etc.) are added or removed depending on the settings |
(in-package :weblocks)
(export '(listedit))
(defwidget listedit (dataedit-mixin datalist)
()
(:documentation "A widget based on the 'datalist' that enhances it
with user interface to add, remove, and modify data entries."))
(defmethod dataedit-create-new-item-widget ((obj listedit))
(make-quickform (dataedi... |
28f9046e0be960c47d3e576dce4a185b667ddba852d41fb634499f1fd796a564 | gar1t/erlang-czmq | czmq_test.erl | %% ===================================================================
@author < >
2014
%%
@doc Tests for erlang - czmq .
%%
%% @end
%% ===================================================================
-module(czmq_test).
-export([test/0,
zstr_send_recv/1,
sendmem_framerecv/1,
... | null | https://raw.githubusercontent.com/gar1t/erlang-czmq/530c976ee4d0892294ac0468e366ad65c70e6a50/src/czmq_test.erl | erlang | ===================================================================
@end
===================================================================
--------------------------------------------------------------------
@doc The list of tests to execute.
Add new tests here to run them as a part of the test suite.
gener... | @author < >
2014
@doc Tests for erlang - czmq .
-module(czmq_test).
-export([test/0,
zstr_send_recv/1,
sendmem_framerecv/1,
zauth/1,
poller/1,
router_dealer/1,
push_pull/1,
req_rep/1,
pub_sub/1,
sockopts/1,
large_mes... |
b527d1ca41987c59aac22f35c78d0819788535af8f918eba36791c359d7f4eb7 | spilgames/erl-memcache | memcache_app.erl | -module(memcache_app).
-behaviour(application).
-include("memcache.hrl").
%% Application callbacks
-export([start/2, stop/1, prep_stop/1]).
%%%===================================================================
%%% Application callbacks
%%%===================================================================
@priv... | null | https://raw.githubusercontent.com/spilgames/erl-memcache/aacadbac15328a9fa726f95fae313c188ad586c7/src/memcache_app.erl | erlang | Application callbacks
===================================================================
Application callbacks
=================================================================== | -module(memcache_app).
-behaviour(application).
-include("memcache.hrl").
-export([start/2, stop/1, prep_stop/1]).
@private
-spec start(normal, []) -> {ok, pid()}.
start(_StartType, _StartArgs) ->
memcache_sup:start_link().
@private
-spec stop(any()) -> ok.
stop(_State) ->
ok.
@private
-spec prep_s... |
e6c36c0d8f8486df9ccc789007fc909cc66ab4bf4bf3d44a54bc6daf8a56c53e | ragkousism/Guix-on-Hurd | profiles.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 , 2014 , 2015 , 2016 < >
Copyright © 2013 < >
Copyright © 2014 , 2016 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2016 < >
Copyright © 2016 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is f... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/guix/profiles.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 , 2014 , 2015 , 2016 < >
Copyright © 2013 < >
Copyright © 2014 , 2016 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2016 < >
Copyright © 2016 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the ... |
c21b978f80707f1218436cae7a65facc587838dea700f898e9ef6ea289cd3fca | MLstate/opalang | qmlMakeTyper.ml |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/libqmlcompil/qmlMakeTyper.ml | ocaml | *
Top level typing loop.
depends
shorthands
aliases
refactoring in progress
* Error Managment
* All default values are specified on the right (empty or dummy version for bypass_typer)
* fun _ e -> raise e
* false
*
the wrapper with annot checks
check input annotmap
call the typer
check the resul... |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... |
b478fecff0b7189bc94469f946ec68f8e4bd0ea769b9a90727eba66415f373a2 | souenzzo/souenzzo.github.io | data_readers.clj | {ipfs/cid ipfs.main/->ref} | null | https://raw.githubusercontent.com/souenzzo/souenzzo.github.io/30a811c4e5633ad07bba1d58d19eb091dac222e9/ipfs/src/data_readers.clj | clojure | {ipfs/cid ipfs.main/->ref} | |
a85d13835c85de7c9fd1a16b201df375a48323ac20b4358d435b007d66146483 | joedevivo/chatterbox | http2c.erl | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% PLEASE ONLY USE FOR TESTING
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-module(http2c).
-behaviour(gen_server).
-include("http2.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
%... | null | https://raw.githubusercontent.com/joedevivo/chatterbox/c0506c707bd10d2d2071647f53e188b9740041f2/test/http2c.erl | erlang |
PLEASE ONLY USE FOR TESTING
gen_server
start on a socket.
send the preamble
send/recv settings
now the gen_server has a connection
{request, [Frames]}
A frame that is too big should know how to break itself up.
API
gen_server callbacks
Starts a server. Should probably take args eventually
send_binary/2 ... | -module(http2c).
-behaviour(gen_server).
-include("http2.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
{ request , Headers , Data }
That might mean into Continutations
-export([
start_link/0,
send_binary/2,
send_unaltered_frames/2,
... |
80dc5bde516eb73d78489df9df0b8b555b16954499d451372c7675b9163decf8 | chrisnc/tangaroa | Sender.hs | module Network.Tangaroa.Sender
( sendAppendEntries
, sendAppendEntriesResponse
, sendRequestVote
, sendRequestVoteResponse
, sendAllAppendEntries
, sendAllRequestVotes
, sendResults
, sendRPC
) where
import Control.Lens
import Data.Foldable (traverse_)
import Data.Sequence (Seq)
import qualified Data... | null | https://raw.githubusercontent.com/chrisnc/tangaroa/5dc68d9de0bdc23506e58f86357576f2c4a0c178/src/Network/Tangaroa/Sender.hs | haskell | given a replica's nextIndex, get the index and term to send as
prevLog(Index/Term)
this shouldn't happen, because nextIndex - 1 should always be at
most our last entry | module Network.Tangaroa.Sender
( sendAppendEntries
, sendAppendEntriesResponse
, sendRequestVote
, sendRequestVoteResponse
, sendAllAppendEntries
, sendAllRequestVotes
, sendResults
, sendRPC
) where
import Control.Lens
import Data.Foldable (traverse_)
import Data.Sequence (Seq)
import qualified Data... |
cc5ebf3313bc916b09d698074cfc30e6a9f84c19e3a8095a012be809aa082779 | petitnau/algoml | frontend.ml | open Static
exception Error of exn * (int * int * string)
let parse_buf (lexbuf:Lexing.lexbuf) =
try
let ast = Parser.contract Lexer.read lexbuf in
check_program ast;
if not(check_aclauses_funcclause ast) then failwith "Not all atomic clauses have one function clause"
else if not(check_create_in_c... | null | https://raw.githubusercontent.com/petitnau/algoml/c0122c85004114ba634b4946549a78325ff844ee/src/frontend/frontend.ml | ocaml | open Static
exception Error of exn * (int * int * string)
let parse_buf (lexbuf:Lexing.lexbuf) =
try
let ast = Parser.contract Lexer.read lexbuf in
check_program ast;
if not(check_aclauses_funcclause ast) then failwith "Not all atomic clauses have one function clause"
else if not(check_create_in_c... | |
96ecc07633619132083cdf5409cdd40b3a22c89520ec987e26157885eddb5d80 | RyanGlScott/gists | TypeLevelGlambda.hs | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 810
# LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneKindSignatures #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
#endif
module ... | null | https://raw.githubusercontent.com/RyanGlScott/gists/1ec747a310f0ff54576fdf8000fa15f4e848fa41/src/TypeLevelGlambda.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 810
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneKindSignatures #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
#endif
module TypeLevelGlambda where
... |
75bb359b92ad623f94b6048a2edca6a69ac8fdeb043fb17c65918e2b9b992918 | thephoeron/quipper-language | TimeStep.hs | This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the
-- file COPYRIGHT for a list of authors, copyright holders, licensing,
-- and other details. All rights reserved.
--
-- ======================================================================
import Quipper
import QuipperLib.Qureg
import Alg... | null | https://raw.githubusercontent.com/thephoeron/quipper-language/15e555343a15c07b9aa97aced1ada22414f04af6/tests/TimeStep.hs | haskell | file COPYRIGHT for a list of authors, copyright holders, licensing,
and other details. All rights reserved.
======================================================================
time step /dt/ to (/a/,/b/,/r/). Here /a/ and /b/ are /m/-qubit | This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the
import Quipper
import QuipperLib.Qureg
import Algorithms.BWT.Definitions
| Algorithm 3 . @timestep ( a , b , r , dt , m)@ : Apply the
registers while /r/ is a single qubit .
timestep :: (Qureg, Qureg, Qubit, Timestep, Int) -> Circ ()
ti... |
918c5956dac92aba4bcbd5d98c249b09ccab179cd2804ff0a77a2e00a5cb4d12 | johnelse/mkaudio | fun.mli | val (>>=) :
('a, 'b) Result.result ->
('a -> ('c, 'b) Result.result) ->
('c, 'b) Result.result
val (>|=) :
('a, 'b) Result.result ->
('a -> 'c) ->
('c, 'b) Result.result
| null | https://raw.githubusercontent.com/johnelse/mkaudio/172fc14443feafae2f0542948e53c1621f42bed2/lib/fun.mli | ocaml | val (>>=) :
('a, 'b) Result.result ->
('a -> ('c, 'b) Result.result) ->
('c, 'b) Result.result
val (>|=) :
('a, 'b) Result.result ->
('a -> 'c) ->
('c, 'b) Result.result
| |
3e5ce96d0b60589a4c027c4aabee2dd03c093eb2e56d00a6df1c88b554d2fcdc | ghcjs/ghcjs | Main.hs | {-# LANGUAGE BangPatterns #-}
--
The Computer Language Benchmarks Game
-- /
--
Contributed by and .
--
-- To be compiled with:
--
-O2 -fglasgow - exts -funbox - strict - fields -fbang - patterns -optc - O
--
Do n't enable -optc - mfpmath = sse -optc - , this triggers a gcc bug on x86
--
import Foreign
im... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/nofib/shootout/n-body/Main.hs | haskell | # LANGUAGE BangPatterns #
/
To be compiled with:
----------------------------------------------------------------------
----------------------------------------------------------------------
----------------------------------------------------------------------
allocates
---------------------------------------... | The Computer Language Benchmarks Game
Contributed by and .
-O2 -fglasgow - exts -funbox - strict - fields -fbang - patterns -optc - O
Do n't enable -optc - mfpmath = sse -optc - , this triggers a gcc bug on x86
import Foreign
import Foreign.Storable
import Foreign.Marshal.Alloc
import Data.IORef
import C... |
1a6c41bad6ff31c1dafcc4d892d4743aac35df0b91b7975ed41079c4759a817d | day8/re-com | add_at_macro.clj | #!/usr/bin/env bb
(require '[babashka.deps :as deps])
(deps/add-deps
'{:deps {docopt/docopt {:git/url ""
:sha "12b997548381b607ddb246e4f4c54c01906e70aa"}}})
(ns add-at-macro
(:require
[clojure.java.io :as io]
[rewrite-clj.zip :as z]
[clojure.set :as clj-set]
... | null | https://raw.githubusercontent.com/day8/re-com/e50ab11d57f289e0d672cc0df69aa5f32097b7ec/scripts/add-at-macro/add_at_macro.clj | clojure | Referred keywords
If at macro is already loaded.
recom form already loads at macro
TODO: actually remove empty :refer ?
Check if :src option is added already
space to be added to `(at) which is calculated as.
(initial identation of the values in a component) - (space occupied by `:src `) - (indentation of keys ... | #!/usr/bin/env bb
(require '[babashka.deps :as deps])
(deps/add-deps
'{:deps {docopt/docopt {:git/url ""
:sha "12b997548381b607ddb246e4f4c54c01906e70aa"}}})
(ns add-at-macro
(:require
[clojure.java.io :as io]
[rewrite-clj.zip :as z]
[clojure.set :as clj-set]
... |
0b1151f58078a97624ae59c3df3e4c58a673078b37e8ffd3b36f8fae88838cb7 | metaocaml/ber-metaocaml | variants_errors_test.ml | (* TEST
* expect
*)
module M1 : sig
type t =
| Foo of int * int
end = struct
type t =
| Foo of float * int
end;;
[%%expect{|
Lines 4-7, characters 6-3:
4 | ......struct
5 | type t =
6 | | Foo of float * int
7 | end..
Error: Signature mismatch:
Modules do not match:
sig type t = Foo... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-modules/variants_errors_test.ml | ocaml | TEST
* expect
|
module M1 : sig
type t =
| Foo of int * int
end = struct
type t =
| Foo of float * int
end;;
[%%expect{|
Lines 4-7, characters 6-3:
4 | ......struct
5 | type t =
6 | | Foo of float * int
7 | end..
Error: Signature mismatch:
Modules do not match:
sig type t = Foo of float * int end
... |
f75fe7920e758dfe7710851ca14df12512d47e49a69df1ce430a0143f31a07e0 | IvanIvanov/fp2013 | area-of-triangle-test.scm | ;;; This file contains unit tests for the problem listed in the name
;;; of this file.
;;;
;;; To run the tests specify the relative or absolute path to the
;;; ".scm" file with the proposed solution in the (load ...) command
;;; below. Then you can either open the tests and run them in Racket
( with R5RS set as the ... | null | https://raw.githubusercontent.com/IvanIvanov/fp2013/2ac1bb1102cb65e0ecbfa8d2fb3ca69953ae4ecf/lab2-and-3/homework1/area-of-triangle-test.scm | scheme | This file contains unit tests for the problem listed in the name
of this file.
To run the tests specify the relative or absolute path to the
".scm" file with the proposed solution in the (load ...) command
below. Then you can either open the tests and run them in Racket
directly from the command line:
plt-r5... | ( with R5RS set as the language ) , or you can run the following
assuming 's bin directory is included in the PATH environment
(load "area-of-triangle.scm")
(define (__make-counter x)
(lambda ()
(set! x (+ x 1))
x))
(define __test-counter (__make-counter 0))
(define (__test-passed)
(display (... |
d7750fe4f159be7c98be776460ee241bcd9afbe47feeb8f68abd55537b67abc5 | tisnik/clojure-examples | details.clj | {:aliases {"downgrade" "upgrade"},
:checkout-deps-shares
[:source-paths
:test-paths
:resource-paths
:compile-path
"#'leiningen.core.classpath/checkout-deps-paths"],
:clean-targets [:target-path],
:compile-path
"/home/ptisnovs/src/clojure/clojure-examples/clisktest7/target/default/classes",
:dependencies
... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/bb0b3b9132aa14ef2448e278e95825404ec2aad7/clisktest7/doc/details.clj | clojure | {:aliases {"downgrade" "upgrade"},
:checkout-deps-shares
[:source-paths
:test-paths
:resource-paths
:compile-path
"#'leiningen.core.classpath/checkout-deps-paths"],
:clean-targets [:target-path],
:compile-path
"/home/ptisnovs/src/clojure/clojure-examples/clisktest7/target/default/classes",
:dependencies
... | |
7d432baa0911d456d25922352eea7d00d918e0c68fd1109cb152129fd34ba290 | snoyberg/mono-traversable | Instances.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies #-}
# OPTIONS_GHC -fno - warn - orphans #
module Data.MonoTraversable.Instances () where
import Data.DList.Instances ()
import Data.Traversable.Instances ()
import Data.Functor.Apply (MaybeApply (..), WrappedApplicative)
import... | null | https://raw.githubusercontent.com/snoyberg/mono-traversable/0cf673677f28b82fbb8647a14ff35ce69602c69a/mono-traversable-instances/src/Data/MonoTraversable/Instances.hs | haskell | # LANGUAGE CPP #
# LANGUAGE TypeFamilies #
# INLINE find #
Comonad | # OPTIONS_GHC -fno - warn - orphans #
module Data.MonoTraversable.Instances () where
import Data.DList.Instances ()
import Data.Traversable.Instances ()
import Data.Functor.Apply (MaybeApply (..), WrappedApplicative)
import Control.Comonad (Cokleisli, Comonad, extract, extend)
import Control.Comonad.Stor... |
8f49cdea598e88087e560497892c93b0a14d60010cdffa9cbc22f07a338f9c67 | RedPRL/redtt | Cx.mli | type cx
type t = cx
type value = Domain.value
val init : GlobalEnv.t -> t
val globals : t -> GlobalEnv.t
val env : t -> Domain.env
val ppenv : t -> Pp.env
val qenv : t -> Quote.env
val clear_locals : t -> t
val ext_ty : t -> nm:string option -> value -> t * value
val ext_dim : t -> nm:string option -> t * I.atom
va... | null | https://raw.githubusercontent.com/RedPRL/redtt/50689559ff970e33013b8cf8a3bbc8be18ec4e09/src/core/Cx.mli | ocaml | * Look up the classifier (either a type or the interval) of a local variable.
* Look up the type of a named constant. | type cx
type t = cx
type value = Domain.value
val init : GlobalEnv.t -> t
val globals : t -> GlobalEnv.t
val env : t -> Domain.env
val ppenv : t -> Pp.env
val qenv : t -> Quote.env
val clear_locals : t -> t
val ext_ty : t -> nm:string option -> value -> t * value
val ext_dim : t -> nm:string option -> t * I.atom
va... |
67e9293c1fec389b82c639ea15241f1f5e4deb7d28ebed77c73d710b13c2b1b3 | dradtke/Lisp-Text-Editor | package.lisp | (in-package #:cl-user)
(defpackage gtk-cffi-ext
(:use #:common-lisp #:cffi #:alexandria #:iterate
#:cffi-object #:g-object-cffi #:g-lib-cffi #:gdk-cffi
#:gtk-cffi-utils #:gtk-cffi)
(:shadowing-import-from #:gtk-cffi #:image #:window)
(:import-from #:gtk-cffi
#:tree-iter-struct #... | null | https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/quicklisp/dists/quicklisp/software/gtk-cffi-20120208-cvs/ext/package.lisp | lisp | (in-package #:cl-user)
(defpackage gtk-cffi-ext
(:use #:common-lisp #:cffi #:alexandria #:iterate
#:cffi-object #:g-object-cffi #:g-lib-cffi #:gdk-cffi
#:gtk-cffi-utils #:gtk-cffi)
(:shadowing-import-from #:gtk-cffi #:image #:window)
(:import-from #:gtk-cffi
#:tree-iter-struct #... | |
3815709c7a225566040a0a0ff5245835855f4956f5f44d452927886fd9ca6499 | clj-commons/kibit | check.clj | (ns kibit.check
"Kibit's integration point and public API"
(:require [clojure.java.io :as io]
[clojure.core.logic.unifier :as unifier]
[kibit.core :as core]
[kibit.rules :as core-rules]
[kibit.reporters :as reporters]
[kibit.monkeypatch
:refer... | null | https://raw.githubusercontent.com/clj-commons/kibit/be27e6db625564d045e71a6e13e459eb7651813b/kibit/src/kibit/check.clj | clojure |
* `check-expr` - for checking single expressions (great on the REPL)
* `check-reader` - for checking all forms passed in via a `PushbackReader`
* `check-file` - for checking any file, or string/URI/URL for a file
All other functions in this namespace exist to provide support and ease
The rule sets
----------... | (ns kibit.check
"Kibit's integration point and public API"
(:require [clojure.java.io :as io]
[clojure.core.logic.unifier :as unifier]
[kibit.core :as core]
[kibit.rules :as core-rules]
[kibit.reporters :as reporters]
[kibit.monkeypatch
:refer... |
3519bc73295bf24e6d8cfc1cfd8bee06a05f020d0e57e46d6ac99e3b4d2c3c3c | Darkkey/erlamsa | erlamsa.erl | -module(erlamsa).
-export([main/1]).
main(Args) ->
{Osfamily, _} = os:type(),
ServiceMode = length([Z || Z <- Args, Z =:= "-D"]),
Dict = erlamsa_cmdparse:parse(Args), %% check correctness of input args before proceed
case {Osfamily, ServiceMode} of
{unix, 1} ->
CmdLst = [es... | null | https://raw.githubusercontent.com/Darkkey/erlamsa/f46dde549588d15789c2c38aec4a206560024987/src/erlamsa.erl | erlang | check correctness of input args before proceed | -module(erlamsa).
-export([main/1]).
main(Args) ->
{Osfamily, _} = os:type(),
ServiceMode = length([Z || Z <- Args, Z =:= "-D"]),
case {Osfamily, ServiceMode} of
{unix, 1} ->
CmdLst = [escript:script_name() ++ "_daemon" | Args],
Cmd = lists:foldr(fun (X, Acc) -> [X,... |
32674482980b11b7be5e20d4ad810a76c108a224852dfdc1d922cf3a5f2ed6cb | bennn/iPoe | reader.rkt | #lang ipoe
#:name italian-sonnet
#:syllables 10
#:rhyme-scheme ((A B B A)
(A B B A)
(C D E C D E))
| null | https://raw.githubusercontent.com/bennn/iPoe/4a988f6537fb738b4fe842c404f9d78f658ab76f/ipoe/italian-sonnet/lang/reader.rkt | racket | #lang ipoe
#:name italian-sonnet
#:syllables 10
#:rhyme-scheme ((A B B A)
(A B B A)
(C D E C D E))
| |
a82f81033c1ec7c4b880bcbec7efdcdd356f30ce2acc9fd2415cef4ceca1361e | input-output-hk/ouroboros-network | Types.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TypeOperators #-}
module Ouroboros.Consensus.HardFork.Combinator.State.Types (
-- * Main types
Current (..)
, HardForkState (..)
, Past (..)
, se... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/af14789baae3df5c5c67ac0447954475bab9ba67/ouroboros-consensus/src/Ouroboros/Consensus/HardFork/Combinator/State/Types.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeOperators #
* Main types
* Supporting types
------------------------------------------------------------------------------
Types
------------------------------------------------------------------------------
| Generic hard fork ... | # LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
module Ouroboros.Consensus.HardFork.Combinator.State.Types (
Current (..)
, HardForkState (..)
, Past (..)
, sequenceHardForkState
, TransitionInfo (..)
, Translate (..)
, TranslateForecast (..)
) where
import Prelude
impo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.