_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 |
|---|---|---|---|---|---|---|---|---|
8b353fd011c73aaa3cb371bbcc1ef2b72cdda40bc8bfc370299a84743ce28cd8 | jship/monad-logger-aeson | MetadataYesThreadContextYes.hs | # LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
module TestCase.LogDebugNS.MetadataYesThreadContextYes
( testCase
) where
import Control.Monad.Logger.Aeson
( (.=), Loc(..), LogLevel(..), LoggedMessage(..), Message(..), logDebugNS, withThreadContext
)
import Data.Aeson.QQ... | null | https://raw.githubusercontent.com/jship/monad-logger-aeson/b983befb790818628f1c4a5f02a2b96b08dcf6ce/monad-logger-aeson/test-suite/TestCase/LogDebugNS/MetadataYesThreadContextYes.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NamedFieldPuns #
# LANGUAGE QuasiQuotes #
module TestCase.LogDebugNS.MetadataYesThreadContextYes
( testCase
) where
import Control.Monad.Logger.Aeson
( (.=), Loc(..), LogLevel(..), LoggedMessage(..), Message(..), logDebugNS, withThreadContext
)
import Data.Aeson.QQ.Simple (aesonQQ)
import Data.Time ... |
47c4bc886de7b3b1abe45ccf90b0d516abf511d377dc0b13102b2ad3763edb3a | GrammaticalFramework/gf-core | CommonCommands.hs | -- | Commands that work in any type of environment, either because they don't
use the PGF , or because they are just documented here and implemented
-- elsewhere
module GF.Command.CommonCommands where
import Data.List(sort)
import Data.Char (isSpace)
import GF.Command.CommandInfo
import qualified Data.Map as Map
impo... | null | https://raw.githubusercontent.com/GrammaticalFramework/gf-core/1b66bf2773b0feda528d3b22fbaf06227a51b864/src/compiler/GF/Command/CommonCommands.hs | haskell | | Commands that work in any type of environment, either because they don't
elsewhere
Map.union is left-biased
mkEx "ps -lexer=code | p -cat=Exp -- parse code-like input",
++ " " ++ tmpi
-
-
** Converting command input | use the PGF , or because they are just documented here and implemented
module GF.Command.CommonCommands where
import Data.List(sort)
import Data.Char (isSpace)
import GF.Command.CommandInfo
import qualified Data.Map as Map
import GF.Infra.SIO
import GF.Infra.UseIO(writeUTF8File)
import GF.Infra.Option(renameEncoding)... |
f572970f2cc43eaf5b1662cf3d9563bd590448635682679c30ddd18e6511c1c6 | shayan-najd/NativeMetaprogramming | T9178DataType.hs |
module T9178DataType where
data T9178_Type
| null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/warnings/should_compile/T9178DataType.hs | haskell |
module T9178DataType where
data T9178_Type
| |
07df68400e52d589d5a126a919174335c39af5c0d23af15819f4daa7ead6dafe | j14159/erlang-and-thrift | example_client.erl | -module(example_client).
%% need this to get access to the records representing Thrift message
%% defined in thrift/example.thrift:
-include("example_constants.hrl").
-export([request/4]).
request(Host, Port, Id, Msg) ->
Req = #message{id = Id, text = Msg},
{ok, Client} = thrift_client_util:new(Host, Port, e... | null | https://raw.githubusercontent.com/j14159/erlang-and-thrift/b87a15844559c5fd4eff4d96d15e9c40514fae28/src/example_client.erl | erlang | need this to get access to the records representing Thrift message
defined in thrift/example.thrift:
"hello" function per our service definition in thrift/example.thrift: | -module(example_client).
-include("example_constants.hrl").
-export([request/4]).
request(Host, Port, Id, Msg) ->
Req = #message{id = Id, text = Msg},
{ok, Client} = thrift_client_util:new(Host, Port, exampleService_thrift, []),
{ClientAgain, {ok, Response}} = thrift_client:call(Client, hello, [Req]),
... |
f18cb72840699070b3b104face4c3cff0757107f3036fd8e5222c8c6a5550b36 | damn/cdq | ns_without_deps.clj | (ns game.ns-without-deps
(:require
game.music
game.serialization
game.monster.monsters
game.item.instance-impl
game.player.skill.learnable-impl
game.components.body-render))
other solution : ( initialize ( require ' the - impl - ns ) ) dort wo .
; doesnt work with compile, so here.
| null | https://raw.githubusercontent.com/damn/cdq/5093dbdba91c445e403f53ce96ead05d5ed8262b/src/game/ns_without_deps.clj | clojure | doesnt work with compile, so here. | (ns game.ns-without-deps
(:require
game.music
game.serialization
game.monster.monsters
game.item.instance-impl
game.player.skill.learnable-impl
game.components.body-render))
other solution : ( initialize ( require ' the - impl - ns ) ) dort wo .
|
d14a1a2f3c2f044ea21e75f2cccb42a3b975b830c69e34d65fd52a5db50a713d | fused-effects/fused-effects | Interpret.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# LANGUAGE Un... | null | https://raw.githubusercontent.com/fused-effects/fused-effects/eca98eff01d7507b5259002f8414a7594024b919/src/Control/Carrier/Interpret.hs | haskell | # LANGUAGE RankNTypes #
| Provides an 'InterpretC' carrier capable of interpreting an arbitrary effect using a passed-in higher order function to interpret that effect. This is suitable for prototyping new effects quickly.
* Interpret carrier
* Re-exports
For more information on this technique, see the @reflection@... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
modul... |
1df288a7d42da238ef94e37d9a35742ca4a7497905410af54d6735b6f2ffff92 | gedge-platform/gs-broker | jose_curve25519_libdecaf.erl | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
%% vim: ts=4 sw=4 ft=erlang noet
%%%-------------------------------------------------------------------
@author < >
2014 - 2016 ,
%%% @doc
%%%
%%% @end
Created : 01 Mar 2016 by < >
%%%---------------------------... | null | https://raw.githubusercontent.com/gedge-platform/gs-broker/c4c1ad39e563537d46553eae1363317cf75aff26/broker-server/deps/jose/src/jose_curve25519_libdecaf.erl | erlang | vim: ts=4 sw=4 ft=erlang noet
-------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
jose_curve25519 callbacks
====================================================================
jose_curve25519 callbacks
=================... | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
@author < >
2014 - 2016 ,
Created : 01 Mar 2016 by < >
-module(jose_curve25519_libdecaf).
-behaviour(jose_curve25519).
-export([eddsa_keypair/0]).
-export([eddsa_keypair/1]).
-export([eddsa_secret_to_public/1]... |
8f12ad06306dd35d9ca63173a670c0cfc74311573711ea153fb3deb49926624c | input-output-hk/project-icarus-importer | Translate.hs | # LANGUAGE GeneralizedNewtypeDeriving #
module UTxO.Translate (
* context for the translation from the DSL to Cardano
TranslateT
, Translate
, runTranslateT
, runTranslate
, runTranslateNoErrors
, withConfig
, mapTranslateErrors
, catchTranslateErrors
, catchSomeTranslateErrors
-- * Convenien... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet-new/test/unit/UTxO/Translate.hs | haskell | * Convenience wrappers
* Interface to the verifier
* Convenience re-exports
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------------------------------------------------------------------------}
-------... | # LANGUAGE GeneralizedNewtypeDeriving #
module UTxO.Translate (
* context for the translation from the DSL to Cardano
TranslateT
, Translate
, runTranslateT
, runTranslate
, runTranslateNoErrors
, withConfig
, mapTranslateErrors
, catchTranslateErrors
, catchSomeTranslateErrors
, translateFirst... |
4e8f8bd8eefe137038df46ededace51996f180df098463b3d9146a6f0b3b692d | overtone/overtone | audio_in.clj | (ns overtone.sc.cgens.audio-in
(:use [overtone.sc defcgen ugens]
[overtone.helpers seq]))
(defcgen sound-in
"read audio from hardware inputs"
[bus {:default 0 :doc "the channel (or array of channels) to read in. These start at 0, which will correspond to the first audio input." :modulatable false}]
"Re... | null | https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/sc/cgens/audio_in.clj | clojure | (ns overtone.sc.cgens.audio-in
(:use [overtone.sc defcgen ugens]
[overtone.helpers seq]))
(defcgen sound-in
"read audio from hardware inputs"
[bus {:default 0 :doc "the channel (or array of channels) to read in. These start at 0, which will correspond to the first audio input." :modulatable false}]
"Re... | |
ef85bbab13f9c00c44e48f31ba5774113b6619130613416de2e5ea4aef4132b9 | uwplse/Cassius | layout.rkt | #lang racket
(require "../common.rkt" "../smt.rkt" "css-properties.rkt" "browser.rkt")
(provide layout-definitions boxref-definitions)
(define (get-px-or-% prop wrt b)
(define r `(computed-style (box-elt ,b)))
(define type (slower (css-type prop)))
(define out
`(ite (,(sformat "is-~a/px" type) (,(sformat "st... | null | https://raw.githubusercontent.com/uwplse/Cassius/edcb8302c43b7b149280504c00672d8133219b44/src/spec/layout.rkt | racket | No pl because text-indent
These parts don't check (has-clearance) because they're
computed "as if" there were no clearance
If it has block-level children, the height is the distance between the
top margin-edge of the topmost block-level child box and the
bottom margin-edge of the bottommost block-level child box.... | #lang racket
(require "../common.rkt" "../smt.rkt" "css-properties.rkt" "browser.rkt")
(provide layout-definitions boxref-definitions)
(define (get-px-or-% prop wrt b)
(define r `(computed-style (box-elt ,b)))
(define type (slower (css-type prop)))
(define out
`(ite (,(sformat "is-~a/px" type) (,(sformat "st... |
d5cc4da99111244b8462ac5c14b01f7ea4cbeff439b4637ef9376ee4d28e248f | grin-compiler/ghc-wpc-sample-programs | WithDefault.hs | # LANGUAGE KindSignatures #
{-# LANGUAGE DataKinds #-}
| Potentially uninitialised Booleans
-- The initial motivation for this small library is to be able to distinguish
-- between a boolean option with a default value and an option which has been
set to what happens to be the default value . In one case the... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/Agda-2.6.1/src/full/Agda/Utils/WithDefault.hs | haskell | # LANGUAGE DataKinds #
The initial motivation for this small library is to be able to distinguish
between a boolean option with a default value and an option which has been
overriden (e.g. --cubical implies --without-K) while in the other case the
user has made a mistake which they need to fix.
We don't want ... | # LANGUAGE KindSignatures #
| Potentially uninitialised Booleans
set to what happens to be the default value . In one case the default can be
module Agda.Utils.WithDefault where
import Agda.Utils.TypeLits
data WithDefault (b :: Bool) = Default | Value Bool
deriving (Eq, Show)
is to toggle them one way or... |
38872c11396540f235af66a4c4ecfe8e6d200b32f9f49a8f93603cd7d0a2b7df | charlieg/Sparser | count-lines data.lisp | On 9/18/09 with a "checkpoint" load
sparser> (count-lines-in-system)
; Loading
/Users / ddm / ws / nlp / Sparser / code / s / init / versions / v3.1 / loaders / master - loader.lisp
;; (format t "~%~A~4,2T~A~10,2T~S"
;; toplevel-forms line-count raw-namestring)
6 6 "tools;basics:loader"
; Loadin... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/documentation/in%20progress/count-lines%20data.lisp | lisp | Loading
(format t "~%~A~4,2T~A~10,2T~S"
toplevel-forms line-count raw-namestring)
Loading /Users/ddm/ws/nlp/Sparser/code/s/tools/basics/loader.lisp
Loading
/Users/ddm/ws/nlp/Sparser/code/s/tools/basics/syntactic-sugar/loader.lisp
Loading
Loading
Loading
Loading
Loading
Loadi... | On 9/18/09 with a "checkpoint" load
sparser> (count-lines-in-system)
/Users / ddm / ws / nlp / Sparser / code / s / init / versions / v3.1 / loaders / master - loader.lisp
6 6 "tools;basics:loader"
8 8 "sugar;loader"
3 9 "sugar;then-and-else"
5 50 "sugar;strings"
6 53 "sugar;alists... |
89e86bcbd582a65911a4e2480369dc91f04959875b6dcd63a0533e9b458ebc2d | statusfailed/cartographer-string-diagrammatic-reasoning | Examples.hs | module Data.Hypergraph.Examples where
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.Bimap (Bimap)
import qualified Data.Bimap as Bimap
import Data.Hypergraph.Type
import Data.Hypergraph.Match
import Data.Hypergraph.Rewrite
-------------------------------
A simple example : two 1... | null | https://raw.githubusercontent.com/statusfailed/cartographer-string-diagrammatic-reasoning/7559db3f6de17dfa2dc13a6bf29f95c9cebcf7c4/cartographer/src/Data/Hypergraph/Examples.hs | haskell | -----------------------------
if we apply a rewrite rule forwards then backwards, we should get back the
same graph (modulo IDs) - meaning the twice-applied rule graph should match
-----------------------------
The paper's non-convex matching example
----\/-----
/\
-e1---e2---
wires from left to right
gen 1... | module Data.Hypergraph.Examples where
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.Bimap (Bimap)
import qualified Data.Bimap as Bimap
import Data.Hypergraph.Type
import Data.Hypergraph.Match
import Data.Hypergraph.Rewrite
A simple example : two 1x1 generators , matching
data Si... |
11e6517f5c014e385fd79eb366ff57456549c84fe34e684be7f90fef4b7f1735 | brendanhay/amazonka | DeleteConnector.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused -... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-transfer/gen/Amazonka/Transfer/DeleteConnector.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Module : Amazonka.Transfer.DeleteConnector
Stability : auto-generated
Deletes the agreement that\'s specified in the provided @ConnectorId@.
* Creating a Request
* Request Lenses
* Destructuring the Response
| /See:/ 'newDeleteConnector' smart con... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
De... |
33927b2bc6e2da4b0b24c343b5beaf9f3dcd697eb7dc9689057b15326e97c8ee | markandrus/twilio-haskell | Call.hs | # LANGUAGE MultiParamTypeClasses #
{-#LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
-------------------------------------------------------------------------------
-- |
Module : Twilio . Call
Copyright : ( C ) 2017-
-- License : BSD-style (see the file LICENSE)
Maintainer : ... | null | https://raw.githubusercontent.com/markandrus/twilio-haskell/00704dc86dbf2117b855b1e2dcf8b6c0eff5bfbe/src/Twilio/Call.hs | haskell | #LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Stability : provisional
-----------------------------------------------------------------------------
* Resource
* Types
"date_created" is initially null... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE ViewPatterns #
Module : Twilio . Call
Copyright : ( C ) 2017-
Maintainer : < >
module Twilio.Call
Call(..)
, CallSID
, Twilio.Call.get
, AnsweredBy(..)
, CallDirection(..)
, CallStatus(..)
) where
import Control.Error.Safe
impo... |
46dea8cd0751935f92d166364c2150bcb76d7b761a3d290a4761c8f1a0893a9f | snowleopard/hadrian | Expression.hs | # LANGUAGE MultiParamTypeClasses , TypeFamilies #
module Hadrian.Expression (
-- * Expressions
Expr, Predicate, Args,
-- ** Construction and modification
expr, exprIO, arg, remove,
-- ** Predicates
(?), input, inputs, output, outputs, VerboseCommand (..), verboseCommand,
-- ** Evaluation
... | null | https://raw.githubusercontent.com/snowleopard/hadrian/b9a3f9521b315942e1dabb006688ee7c9902f5fe/src/Hadrian/Expression.hs | haskell | * Expressions
** Construction and modification
** Predicates
** Evaluation
* Convenient accessors
TODO: The 'Semigroup a' constraint will at some point become redundant.
| Expressions that compute lists of arguments to be passed to builders.
monad.
| Remove given elements from a list expression.
| Values that... | # LANGUAGE MultiParamTypeClasses , TypeFamilies #
module Hadrian.Expression (
Expr, Predicate, Args,
expr, exprIO, arg, remove,
(?), input, inputs, output, outputs, VerboseCommand (..), verboseCommand,
interpret, interpretInContext,
getBuildRoot, getContext, getBuilder, getOutputs, getInputs, ge... |
34eaa732c8de325ad6c88ed0babf478a6259d011b6ee477731b7a65e0297c218 | anoma/juvix | Base.hs | module Juvix.Data.Effect.Files.Base
( module Juvix.Data.Effect.Files.Base,
module Juvix.Data.Uid,
)
where
import Juvix.Data.Uid
import Juvix.Prelude.Base
import Path
data RecursorArgs = RecursorArgs
{ _recCurDir :: Path Rel Dir,
_recDirs :: [Path Rel Dir],
_recFiles :: [Path Rel File]
}
data Recu... | null | https://raw.githubusercontent.com/anoma/juvix/88ab62235378f669799e3112603277dca00e58c6/src/Juvix/Data/Effect/Files/Base.hs | haskell | module Juvix.Data.Effect.Files.Base
( module Juvix.Data.Effect.Files.Base,
module Juvix.Data.Uid,
)
where
import Juvix.Data.Uid
import Juvix.Prelude.Base
import Path
data RecursorArgs = RecursorArgs
{ _recCurDir :: Path Rel Dir,
_recDirs :: [Path Rel Dir],
_recFiles :: [Path Rel File]
}
data Recu... | |
2034ce99d0ea95eed9ebcf87f41f2d58a84c462e988db4e6b7c0713d006443e2 | josefs/Gradualizer | record_union_with_any_should_pass.erl | -module(record_union_with_any_should_pass).
-export([f/1,
g/0]).
-record(r, {field}).
-spec f(_) -> #r{} | any().
f(R) ->
R#r{field = val}.
-spec g() -> #r{} | any().
g() ->
#r{field = val}.
| null | https://raw.githubusercontent.com/josefs/Gradualizer/eb8fc7431275d00ff41f266297e4b3b7de5330b9/test/should_pass/record_union_with_any_should_pass.erl | erlang | -module(record_union_with_any_should_pass).
-export([f/1,
g/0]).
-record(r, {field}).
-spec f(_) -> #r{} | any().
f(R) ->
R#r{field = val}.
-spec g() -> #r{} | any().
g() ->
#r{field = val}.
| |
1f4e976744faa9282533bf6a9711841bf3e16feef029bdc36b403cbf2271a9e5 | kupl/LearnML | patch.ml | let rec iter ((n : int), (f : 'a -> 'a)) : 'a -> 'a =
match n with
| 0 -> fun (__s5 : int) -> __s5
| 1 -> f
| _ -> fun (__s6 : int) -> iter (n - 1, f) (f __s6)
| null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/iter/sub5/patch.ml | ocaml | let rec iter ((n : int), (f : 'a -> 'a)) : 'a -> 'a =
match n with
| 0 -> fun (__s5 : int) -> __s5
| 1 -> f
| _ -> fun (__s6 : int) -> iter (n - 1, f) (f __s6)
| |
c274516a05271e27ed970f807641cfee9588d254b8936d6aa8f057e3cda0ffb3 | nikita-volkov/rebase | Group.hs | module Rebase.Data.Group
(
module Data.Group
)
where
import Data.Group
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/ba6cc42adf0b4a2026055d77e78020527aa5c535/library/Rebase/Data/Group.hs | haskell | module Rebase.Data.Group
(
module Data.Group
)
where
import Data.Group
| |
93fa31760e9600a44a81078f3e1c80829508082c4fdfc33fc1b9edc3095eb016 | DanielG/ghc-mod | GhcTestcase.hs | $ ghc -package ghc -package ghc - paths GhcTestcase.hs
# LANGUAGE ScopedTypeVariables #
module Main where
import GHC
import GHC.Paths (libdir)
import DynFlags
import System.Environment
main :: IO ()
main = do
args <- getArgs
defaultErrorHandler defaultFatalMessager defaultFlushOut $
runGhc (Just libdir) $
... | null | https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/test/manual/not-interpreted-error/GhcTestcase.hs | haskell | $ ghc -package ghc -package ghc - paths GhcTestcase.hs
# LANGUAGE ScopedTypeVariables #
module Main where
import GHC
import GHC.Paths (libdir)
import DynFlags
import System.Environment
main :: IO ()
main = do
args <- getArgs
defaultErrorHandler defaultFatalMessager defaultFlushOut $
runGhc (Just libdir) $
... | |
72cf23eeb9dd8414f1f04f66330e9c324bdaef2c29e70c3bbf6063bf6a15fff2 | clj-kondo/clj-kondo | namespace.clj | (ns clj-kondo.impl.namespace
{:no-doc true}
(:refer-clojure :exclude [ns-name])
(:require
[clj-kondo.impl.analysis :as analysis]
[clj-kondo.impl.analysis.java :as java]
[clj-kondo.impl.config :as config]
[clj-kondo.impl.findings :as findings]
[clj-kondo.impl.utils :as utils
:refer [export-ns-sy... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/7c1881753e271fc01185be2489a6504bc6195f96/src/clj_kondo/impl/namespace.clj | clojure | declare is idempotent
TODO: and lang = :clj
TODO: can we do this via the ctx only?
TODO:
(lint-duplicate-imports! ctx (:required ns) ...)
this is set because of linting macro bodies
before removing this, check script/diff
unresolved namespaces in an excluded unresolved symbols call are not reported
since the u... | (ns clj-kondo.impl.namespace
{:no-doc true}
(:refer-clojure :exclude [ns-name])
(:require
[clj-kondo.impl.analysis :as analysis]
[clj-kondo.impl.analysis.java :as java]
[clj-kondo.impl.config :as config]
[clj-kondo.impl.findings :as findings]
[clj-kondo.impl.utils :as utils
:refer [export-ns-sy... |
fa9bf155d09dc80761b6b9d5cd32e4fd972aa985e0b6f0c0e983061fdd76453a | brianhempel/maniposynth | queue.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/brianhempel/maniposynth/8c8e72f2459f1ec05fefcb994253f99620e377f3/ocaml-4.07.1/stdlib/queue.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
, Jane Street Europe
Copyright 2002 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
exception Empty
type 'a cell =
| Nil
| Con... |
af3b5b22a4c8cd4dc08448c78ff978efc05639f89c5ab7a5c8e1245e020795c3 | gafiatulin/codewars | Collatz.hs | -- Collatz
-- /
module Collatz where
collatz :: Int -> String
collatz 1 = "1"
collatz n = show n ++ "->" ++ collatz (if odd n then 3 * n + 1 else n `div` 2)
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/6%20kyu/Collatz.hs | haskell | Collatz
/ |
module Collatz where
collatz :: Int -> String
collatz 1 = "1"
collatz n = show n ++ "->" ++ collatz (if odd n then 3 * n + 1 else n `div` 2)
|
0c56d301233011fcd5d8fe37134132df429a1b48723c418a15cd1d8053cdc7e4 | bravit/hid-examples | div.hs | {-# LANGUAGE DeriveAnyClass #-}
import Control.Exception (throw, throwIO)
import Control.Monad.Catch
data MyArithException = DivByZero | OtherArithException
deriving (Show, Exception)
divPure :: Int -> Int -> Int
divPure _ 0 = throw DivByZero
divPure a b = a `div` b
mult :: Int -> Int -> Int
mult 0 _ = 0
mult a b ... | null | https://raw.githubusercontent.com/bravit/hid-examples/913e116b7ee9c7971bba10fe70ae0b61bfb9391b/ch07/div.hs | haskell | # LANGUAGE DeriveAnyClass # |
import Control.Exception (throw, throwIO)
import Control.Monad.Catch
data MyArithException = DivByZero | OtherArithException
deriving (Show, Exception)
divPure :: Int -> Int -> Int
divPure _ 0 = throw DivByZero
divPure a b = a `div` b
mult :: Int -> Int -> Int
mult 0 _ = 0
mult a b = a * b
divIO :: Int -> Int -> ... |
9de9c8e5080856cca9a6448527e8ef137b43f83196244fcb1d81720ae51bdcb1 | tweag/asterius | T12136.hs | # LANGUAGE CPP #
#include "MachDeps.h"
module Main where
import Data.Bits
#if WORD_SIZE_IN_BITS != 64 && WORD_SIZE_IN_BITS != 32
# error unsupported WORD_SIZE_IN_BITS config
#endif
a negative integer the size of
negativeBigInteger :: Integer
negativeBigInteger = 1 - (1 `shiftL` (64 * 2))
main = do
-- rigt ... | null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/numeric/T12136.hs | haskell | rigt shift by GMP_LIMB_BITS | # LANGUAGE CPP #
#include "MachDeps.h"
module Main where
import Data.Bits
#if WORD_SIZE_IN_BITS != 64 && WORD_SIZE_IN_BITS != 32
# error unsupported WORD_SIZE_IN_BITS config
#endif
a negative integer the size of
negativeBigInteger :: Integer
negativeBigInteger = 1 - (1 `shiftL` (64 * 2))
main = do
print $ ... |
5748574fe4257a5cab9b2f439e0365e5a27c40fd0381ca57563451962a795d5a | expipiplus1/vulkan | Promoted_From_VK_EXT_tooling_info.hs | {-# language CPP #-}
No documentation found for Chapter " Promoted_From_VK_EXT_tooling_info "
module Vulkan.Core13.Promoted_From_VK_EXT_tooling_info ( getPhysicalDeviceToolProperties
, PhysicalDeviceToolProperties(..)
... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/src/Vulkan/Core13/Promoted_From_VK_EXT_tooling_info.hs | haskell | # language CPP #
| vkGetPhysicalDeviceToolProperties - Reports properties of tools active
on the specified physical device
= Description
If @pToolProperties@ is @NULL@, then the number of tools currently
active on @physicalDevice@ is returned in @pToolCount@. Otherwise,
@pToolCount@ /must/ point to a variable s... | No documentation found for Chapter " Promoted_From_VK_EXT_tooling_info "
module Vulkan.Core13.Promoted_From_VK_EXT_tooling_info ( getPhysicalDeviceToolProperties
, PhysicalDeviceToolProperties(..)
, Struct... |
3b9141f2320901fdfd709415f4774753ebd534f69e9cf2e396289238ae70d37f | inconvergent/weir | rel-neigh.lisp | #!/usr/local/bin/sbcl --script
; set your path to sbcl above. i would use env, but it does not appear to work
; with the --script argument. alternately, delete the shebang and the load
; below. and run from repl. let me know if you have a better suggestion for
; making this easily runnable from terminal
(load "load"... | null | https://raw.githubusercontent.com/inconvergent/weir/3c364e3a0e15526f0d6985f08a57b312b5c35f7d/examples/rel-neigh.lisp | lisp | set your path to sbcl above. i would use env, but it does not appear to work
with the --script argument. alternately, delete the shebang and the load
below. and run from repl. let me know if you have a better suggestion for
making this easily runnable from terminal | #!/usr/local/bin/sbcl --script
(load "load")
(defun -dot-split (wer e xp plane-point plane-vec g)
(weir:ldel-edge! wer e :g g)
(destructuring-bind (a b) e
(if (> (vec:3dot plane-vec (vec:3sub (weir:3get-vert wer a) plane-point)) 0d0)
(progn (weir:add-edge! wer (weir:3add-vert! wer xp) b :g g)
... |
8b5c23060792caae6034979666b331dafa2ec92a594065e891f7a1f9b540a696 | gilith/hol-light | natural-fibonacci.ml | (* ========================================================================= *)
(* FIBONACCI NUMBERS *)
(* *)
(* See ... | null | https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/opentheory/theories/natural-fibonacci/natural-fibonacci.ml | ocaml | =========================================================================
FIBONACCI NUMBERS
See
============================================================... |
import_theories
["base";
"stream";
"probability"];;
export_interpretation
"opentheory/theories/natural-fibonacci/natural-fibonacci.int";;
export_theory "natural-fibonacci-exists";;
let fibonacci_induction = prove
(`!p : num -> bool.
... |
819ea14307d9daa5be3dd7b27de5a67a043341273abf06f7ddb3071836a916c3 | elastic/eui-cljs | eui_panel_styles.cljs | (ns eui.eui-panel-styles
(:require ["@elastic/eui/lib/components/panel/panel.style.js" :as eui]))
(def euiPanelStyles eui/euiPanelStyles)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/eui_panel_styles.cljs | clojure | (ns eui.eui-panel-styles
(:require ["@elastic/eui/lib/components/panel/panel.style.js" :as eui]))
(def euiPanelStyles eui/euiPanelStyles)
| |
ed2de471715f60790cef7d6250d4be7d2bf466589b04ba6332dff9689e60063e | facebook/pyre-check | callableTest.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/518f5ef44d7079c68b273ff8bcbfd4a8bdd985d6/source/analysis/test/integration/callableTest.ml | ocaml | We filter errors related to patching. |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
267b98750414a4c2f5e455f03ac3f0756101a60e74f6314d596cdead07a8f976 | ocsigen/js_of_ocaml | ppx_js_rewriter.mli | Js_of_ocaml library
* /
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your option ) any la... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/58210fabc947c4839b6e71ffbbf353a4ede0dbb7/ppx/ppx_js/lib/ppx_js_rewriter.mli | ocaml | */* | Js_of_ocaml library
* /
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your option ) any la... |
efb97bc93279972240da79aed5555e36634005738a609daadec69a2f1d92aba5 | Raynes/lein-bin | project.clj | (defproject lein-bin "0.3.4"
:description "A leiningen plugin for generating standalone console executables for your project."
:url "-bin"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[me.raynes/fs "1.4.0"]]
:eval-in-leiningen true)
| null | https://raw.githubusercontent.com/Raynes/lein-bin/c0fd6afc39a296ac6f9f5f485592df9867da1a0e/project.clj | clojure | (defproject lein-bin "0.3.4"
:description "A leiningen plugin for generating standalone console executables for your project."
:url "-bin"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[me.raynes/fs "1.4.0"]]
:eval-in-leiningen true)
| |
ada9ccd10522d7e6e1d207dfdb2b3bfe6189ff1c9fd0f02e573128851675c6c6 | fresnel/fresnel | Internal.hs | module Fresnel.Prism.Internal
( IsPrism
) where
import Control.Arrow (Kleisli)
import Data.Profunctor (Choice, Forget, Star)
import Fresnel.Iso.Internal
import Fresnel.Profunctor.OptionalStar (OptionalStar)
import Fresnel.Profunctor.Recall (Recall)
class (IsIso p, Choice p) => IsPrism p
instance IsPrism (->)
instanc... | null | https://raw.githubusercontent.com/fresnel/fresnel/8f0d267779703049568694834c25f619034ca74d/fresnel/src/Fresnel/Prism/Internal.hs | haskell | module Fresnel.Prism.Internal
( IsPrism
) where
import Control.Arrow (Kleisli)
import Data.Profunctor (Choice, Forget, Star)
import Fresnel.Iso.Internal
import Fresnel.Profunctor.OptionalStar (OptionalStar)
import Fresnel.Profunctor.Recall (Recall)
class (IsIso p, Choice p) => IsPrism p
instance IsPrism (->)
instanc... | |
d83c09862526a3be6003b5eb7a480387a30a23f0959a0ca2cfcd460b914b64f6 | mirage/ocaml-xenstore-server | perms.mli |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... | null | https://raw.githubusercontent.com/mirage/ocaml-xenstore-server/2a8ae397d2f9291107b5d9e9cfc6085fde8c0982/server/perms.mli | ocaml | * A role containing a set of privileges
* The [superuser] role has all privileges
* The role associated with a specific domain id
* ability to read the value associated with a node
* ability to modify the value associated with a node
* ability to invoke debug operations
* ability to grant access to other domains ... |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... |
851c1599f89c4c6db15cda87678eabe9959adb61df1df8a4a249a5b78e0bc27d | ucsd-progsys/dsolve | na_bsearch.ml | let bsearch key vec =
let rec look lo hi =
let hi_minus = hi - 1 in
if lo < hi_minus then
let hl = hi + lo in
let m = hl / 2 in
let x = Junkarray2.get vec m in
let diff = key - x in
let m_plus = m + 1 in
let m_minus = m - 1 in
(if diff < 0 then loo... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2010/na_bsearch.ml | ocaml | let bsearch key vec =
let rec look lo hi =
let hi_minus = hi - 1 in
if lo < hi_minus then
let hl = hi + lo in
let m = hl / 2 in
let x = Junkarray2.get vec m in
let diff = key - x in
let m_plus = m + 1 in
let m_minus = m - 1 in
(if diff < 0 then loo... | |
2e1b68fcfd1ae5698c04be960dbd3f9f08f590049573f2ce4b455654706af0f2 | kurtharriger/shadow-cljs-reframe-template | dom.cljs | (ns cljsjs.react.dom
(:require ["react-dom" :as react-dom]))
(js/goog.exportSymbol "ReactDOM" react-dom) | null | https://raw.githubusercontent.com/kurtharriger/shadow-cljs-reframe-template/cfeb1dc2ed89a3e4289aa5dee01f80d2a1e89403/src/cljs/cljsjs/react/dom.cljs | clojure | (ns cljsjs.react.dom
(:require ["react-dom" :as react-dom]))
(js/goog.exportSymbol "ReactDOM" react-dom) | |
fc1e8d813100e34943130ccbcd0f0fec00cb7dc2092eb9b836e5fe1389276d16 | directrix1/DuplicateBridgeTeamSteele | basiclex.lisp | (in-package "ACL2")
(include-book "list-utilities" :dir :teachpacks)
; ds = delimiters to look for (list)
; xs = object to search in (list)
( split - at - delimiter ds xs ) = ( before at+ )
; where before = longest prefix of xs with no values from ds (list)
; at+ = rest of xs (list)
(defun s... | null | https://raw.githubusercontent.com/directrix1/DuplicateBridgeTeamSteele/0f0d0312569fb1d26d568e2b87d66ac160ac60c3/timpl/dropbox/basiclex.lisp | lisp | ds = delimiters to look for (list)
xs = object to search in (list)
where before = longest prefix of xs with no values from ds (list)
at+ = rest of xs (list)
ps = list of signals to pass by (no constraints on signals)
xs = list of signals (no constraints on signals)
ps = prefix to look for ... | (in-package "ACL2")
(include-book "list-utilities" :dir :teachpacks)
( split - at - delimiter ds xs ) = ( before at+ )
(defun split-at-delimiter (ds xs)
(if (or (endp xs) (member-equal (car xs) ds))
(list nil xs)
(let* ((cdr-split (split-at-delimiter ds (cdr xs))))
(list (cons (car xs)... |
0162e344d9f672be42e76990e9247e282cf1b268ee43ff20f0d4590b2f2ca163 | sol/http-kit | Toolkit.hs | # OPTIONS_GHC -fno - warn - deprecations #
module Network.HTTP.Toolkit (
-- * Exceptions
-- |
-- * All functions that consume input fail with `UnexpectedEndOfInput` if the
-- input ends before the function can completely successfully.
--
-- * All cases where a function may fail with an exception other than
-- @Unex... | null | https://raw.githubusercontent.com/sol/http-kit/cc7eb6f1cb3ad6044c822286ad1352e26c112c69/src/Network/HTTP/Toolkit.hs | haskell | * Exceptions
|
* All functions that consume input fail with `UnexpectedEndOfInput` if the
input ends before the function can completely successfully.
* All cases where a function may fail with an exception other than
@UnexpectedEndOfInput@ are documented thoroughly on a per function level.
* Input handling... | # OPTIONS_GHC -fno - warn - deprecations #
module Network.HTTP.Toolkit (
ToolkitError(..)
, InputStream
, makeInputStream
, inputStreamFromHandle
, RequestPath
, Request(..)
, readRequestWithLimit
, readRequest
, sendRequest
, Response(..)
, readResponseWithLimit
, readResponse
, sendResponse
, simpleResponse
, B... |
b3061b79c5d8053c78f9aed6bf59231bc7b438a29be909e898f693180417f3eb | agajews/soup-lang | Parser.hs | module Soup.Parser (
Parser(..),
parserToVal,
contToVal,
liftEval,
catchFail,
parserFail,
parseType,
parseString,
parseIf,
parseWhile,
parseWhile',
parseMany,
parseMany',
parseInterspersed,
parseInterspersed',
logDebug,
) where
import Soup.Debugger
import... | null | https://raw.githubusercontent.com/agajews/soup-lang/1c926f5853fe18244e33f0f90830db49f7fb827e/Soup/Parser.hs | haskell | module Soup.Parser (
Parser(..),
parserToVal,
contToVal,
liftEval,
catchFail,
parserFail,
parseType,
parseString,
parseIf,
parseWhile,
parseWhile',
parseMany,
parseMany',
parseInterspersed,
parseInterspersed',
logDebug,
) where
import Soup.Debugger
import... | |
eadccb9b305c22068c70cdbc9876daa3d9a67cf281ad7c732e6d41ebf21011bb | FlowForwarding/of_config | of_config_tests.erl | %%------------------------------------------------------------------------------
Copyright 2012 FlowForwarding.org
%%
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/FlowForwarding/of_config/958a68280808f2454b46d7a63551eb80f6aca353/test/of_config_tests.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, eithe... | Copyright 2012 FlowForwarding.org
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author Erlang Solutions Ltd. < >
@author < >
2012 FlowForwarding.org
@doc eUnit suite for testing OF - Config protocol .
@pr... |
5a62d38dee87e98c4b34c9af0088eec8989aea839102030b563d22827220cc31 | melange-re/melange | inline_edge_cases.mli | val v : int
| null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/inline_edge_cases.mli | ocaml | val v : int
| |
a2c43daf2b4e8036bd03961c500ad9d16356907205df290f9b0d4be7f1f20ece | mokus0/dependent-sum-template | TH.hs | # LANGUAGE CPP , TemplateHaskell #
module Data.GADT.Show.TH
( DeriveGShow(..)
, DeriveShowTagIdentity(..)
) where
import Control.Applicative
import Control.Monad
import Data.Dependent.Sum
import Data.Dependent.Sum.TH.Internal
import Data.Functor.Identity
import Data.GADT.Show
import Data.Traversable (for)
... | null | https://raw.githubusercontent.com/mokus0/dependent-sum-template/4b85b8fc6fd016ef03f4ea97e31a2a573d30f2ae/src/Data/GADT/Show/TH.hs | haskell | A type class purely for overloading purposes | # LANGUAGE CPP , TemplateHaskell #
module Data.GADT.Show.TH
( DeriveGShow(..)
, DeriveShowTagIdentity(..)
) where
import Control.Applicative
import Control.Monad
import Data.Dependent.Sum
import Data.Dependent.Sum.TH.Internal
import Data.Functor.Identity
import Data.GADT.Show
import Data.Traversable (for)
... |
b2e34e40322363062583991014652e0e2827889991f05f5173d442d3c6cda6e0 | garrigue/labltk | frx_entry.ml | (***********************************************************************)
(* *)
MLTk , Tcl / Tk interface of OCaml
(* *)
, , and ... | null | https://raw.githubusercontent.com/garrigue/labltk/c7f50b4faed57f1ac03cb3c9aedc35b10d36bdb6/frx/frx_entry.ml | ocaml | *********************************************************************
described in file LICENSE found in the... | MLTk , Tcl / Tk interface of OCaml
, , and
projet Cristal , INRIA Rocquencourt
, Kyoto University RIMS
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique and... |
f6bc09033543c245c9bb24c91cf2bfe3ca1adc6b7c49822dd55bf52407c376ed | clojure-interop/java-jdk | MessageContext.clj | (ns javax.xml.ws.handler.MessageContext
"The interface MessageContext abstracts the message
context that is processed by a handler in the handle
method.
The MessageContext interface provides methods to
manage a property set. MessageContext properties
enable handlers in a handler chain to share processing r... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/ws/handler/MessageContext.clj | clojure | (ns javax.xml.ws.handler.MessageContext
"The interface MessageContext abstracts the message
context that is processed by a handler in the handle
method.
The MessageContext interface provides methods to
manage a property set. MessageContext properties
enable handlers in a handler chain to share processing r... | |
0635916d622b61a69af1287552eb90585f8b6e0d487723948a075b7cf68f2994 | gregr/dKanren | benchmarks.rkt | #lang racket/base
(require
(rename-in "lifted-closure-encoding.rkt"
(term? term-lifted-closure?)
(eval-term eval-term-lifted-closure)
(initial-env initial-env-lifted-closure))
(rename-in "closure-encoding.rkt"
(term? term-closure-encoded?)
(eval-term... | null | https://raw.githubusercontent.com/gregr/dKanren/2f05275b00dfba5c2f0ca196a514c377b3b60798/dkanren-benchmarks/benchmarks.rkt | racket | Use this size to differentiate immediate and runtime scheme eval, but
remember to turn off the slow evaluators!
TODO: this needs to require racket/match
(scheme-eval-eval ,run/scheme-eval-eval)
TODO: port these to Chez Scheme
deterministic evaluation benchmark ideas to measure sources of overhead
across programs:... | #lang racket/base
(require
(rename-in "lifted-closure-encoding.rkt"
(term? term-lifted-closure?)
(eval-term eval-term-lifted-closure)
(initial-env initial-env-lifted-closure))
(rename-in "closure-encoding.rkt"
(term? term-closure-encoded?)
(eval-term... |
36f9066f4b7509f8fb6324689b5b914aa8a68d7c8ffddd23639ed0e4d9bb63b3 | xapi-project/xen-api-libs | test_server.ml | open Threadext
let finished = ref false
let finished_m = Mutex.create ()
let finished_c = Condition.create ()
let _ =
let port = ref 8080 in
let use_fastpath = ref false in
Arg.parse [
"-p", Arg.Set_int port, "port to listen on";
"-fast", Arg.Set use_fastpath, "use HTTP fastpath";
] (fun x -> Printf.fprintf s... | null | https://raw.githubusercontent.com/xapi-project/xen-api-libs/d603ee2b8456bc2aac99b0a4955f083e22f4f314/http-svr/test_server.ml | ocaml | open Threadext
let finished = ref false
let finished_m = Mutex.create ()
let finished_c = Condition.create ()
let _ =
let port = ref 8080 in
let use_fastpath = ref false in
Arg.parse [
"-p", Arg.Set_int port, "port to listen on";
"-fast", Arg.Set use_fastpath, "use HTTP fastpath";
] (fun x -> Printf.fprintf s... | |
ff86d056a12a0b6cc5fe6fb96f34f851bfcd306be7a12dc2db39d6e2564cf228 | DavidAlphaFox/RabbitMQ | websocket_handler_init_shutdown.erl | %% Feel free to use, reuse and abuse the code in this file.
-module(websocket_handler_init_shutdown).
-behaviour(cowboy_http_handler).
-behaviour(cowboy_http_websocket_handler).
-export([init/3, handle/2, terminate/2]).
-export([websocket_init/3, websocket_handle/3,
websocket_info/3, websocket_terminate/3]).
init(_A... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/cowboy-wrapper/cowboy-git/test/websocket_handler_init_shutdown.erl | erlang | Feel free to use, reuse and abuse the code in this file. |
-module(websocket_handler_init_shutdown).
-behaviour(cowboy_http_handler).
-behaviour(cowboy_http_websocket_handler).
-export([init/3, handle/2, terminate/2]).
-export([websocket_init/3, websocket_handle/3,
websocket_info/3, websocket_terminate/3]).
init(_Any, _Req, _Opts) ->
{upgrade, protocol, cowboy_http_websock... |
c9c798bd733608fbde48cf136a6d8f9639a60d7ff3447be1b62497dcda3dd947 | burkaydurdu/mock-ui | core_test.cljs | (ns mock-ui.core-test
(:require [cljs.test :refer-macros [deftest testing is]]
[mock-ui.core :as core]))
(deftest fake-test
(testing "fake description"
(is (= 1 2))))
| null | https://raw.githubusercontent.com/burkaydurdu/mock-ui/eb92657a33100ca10b80827abf7c7acdf7d397bb/test/mock_ui/core_test.cljs | clojure | (ns mock-ui.core-test
(:require [cljs.test :refer-macros [deftest testing is]]
[mock-ui.core :as core]))
(deftest fake-test
(testing "fake description"
(is (= 1 2))))
| |
9d9a856fb948c9763238308c8e8b6de8500c9eb8ebe2c8fbb079b9f757783a86 | music-suite/music-score | Juxtapose.hs |
module Music.Time.Juxtapose (
module Music.Time.Split,
module Music.Time.Reverse,
-- * Align without composition
lead,
follow,
-- * Standard composition
after,
before,
during,
(|>),
(<|),
-- ** More exotic
sustai... | null | https://raw.githubusercontent.com/music-suite/music-score/aa7182d8ded25c03a56b83941fc625123a7931f8/src/Music/Time/Juxtapose.hs | haskell | * Align without composition
* Standard composition
** More exotic
* Catenation
* Repetition
|
@
(a `lead` b)^.'offset' = b^.'onset'
@
|
@
a^.'offset' = (a `follow` b)^.'onset'
@
|
A value followed by its reverse (retrograde).
|
An infix alias for 'after'.
|
An infix alias for 'before'.
|
Comp... |
module Music.Time.Juxtapose (
module Music.Time.Split,
module Music.Time.Reverse,
lead,
follow,
after,
before,
during,
(|>),
(<|),
sustain,
palindrome,
scat,
pcat,
times,
) where
import Con... |
248b9a1c593c0ed91f9d40151906381cf94e281a22e3ff35414f97ad976262fd | rossberg/1ml | main.ml |
* ( c ) 2014
* (c) 2014 Andreas Rossberg
*)
let name = "1ML"
let version = "0.2"
let interactive_flag = ref false
let trace_flag = ref false
let ast_flag = ref false
let result_flag = ref false
let no_run_flag = ref false
let run_f_flag = ref false
let trace_phase name = if !trace_flag then print_endline (... | null | https://raw.githubusercontent.com/rossberg/1ml/028859a6a687d874981f440bdc5be5f8daa4a777/main.ml | ocaml |
* ( c ) 2014
* (c) 2014 Andreas Rossberg
*)
let name = "1ML"
let version = "0.2"
let interactive_flag = ref false
let trace_flag = ref false
let ast_flag = ref false
let result_flag = ref false
let no_run_flag = ref false
let run_f_flag = ref false
let trace_phase name = if !trace_flag then print_endline (... | |
8529769ae4a5f523dec198a32dd3a67cdcfa193bd608c51ae2a58dbc8ff75280 | uw-unsat/serval-sosp19 | x32-alu32-k.rkt |
#lang racket
(require "../x32.rkt")
(require serval/lib/unittest)
(define tests
(test-suite+
"x32-alu32-k tests"
(jit-test-case '(BPF_ALU BPF_MOV BPF_K))
(jit-test-case '(BPF_ALU BPF_ADD BPF_K))
(jit-test-case '(BPF_ALU BPF_SUB BPF_K))
(jit-test-case '(BPF_ALU BPF_AND BPF_K))
(jit-test-case... | null | https://raw.githubusercontent.com/uw-unsat/serval-sosp19/175c42660fad84b44e4c9f6f723fd3c9450d65d4/bpf/jit/test/x32-alu32-k.rkt | racket |
#lang racket
(require "../x32.rkt")
(require serval/lib/unittest)
(define tests
(test-suite+
"x32-alu32-k tests"
(jit-test-case '(BPF_ALU BPF_MOV BPF_K))
(jit-test-case '(BPF_ALU BPF_ADD BPF_K))
(jit-test-case '(BPF_ALU BPF_SUB BPF_K))
(jit-test-case '(BPF_ALU BPF_AND BPF_K))
(jit-test-case... | |
cc67f7bf63ce13dbd9cfaec40682d3d52a65d99e51a2c57973285aadb02b257b | pa-ba/compdata | Eval.hs | # LANGUAGE
GADTs ,
TemplateHaskell ,
MultiParamTypeClasses ,
FlexibleInstances ,
FlexibleContexts ,
UndecidableInstances ,
TypeOperators ,
ScopedTypeVariables ,
TypeSynonymInstances #
GADTs,
TemplateHaskell,
MultiParamTypeClasses,
FlexibleInstances,
FlexibleContexts,
Unde... | null | https://raw.githubusercontent.com/pa-ba/compdata/5783d0e11129097e045cabba61643114b154e3f2/benchmark/Multi/Functions/Comp/Eval.hs | haskell | evaluation | # LANGUAGE
GADTs ,
TemplateHaskell ,
MultiParamTypeClasses ,
FlexibleInstances ,
FlexibleContexts ,
UndecidableInstances ,
TypeOperators ,
ScopedTypeVariables ,
TypeSynonymInstances #
GADTs,
TemplateHaskell,
MultiParamTypeClasses,
FlexibleInstances,
FlexibleContexts,
Unde... |
f69a233714eef90a8c06c8a047222512496b0e25e9c5d10ded1182722d835309 | 3b/3bgl-misc | package.lisp | (defpackage #:3bgl-splines
(:use :cl)
(:export #:interpolate-quadratic
#:evaluate-quadratic
#:evaluate-quadratic-normal
#:evaluate-quadratic-tangent
#:subdivide-quadratic))
| null | https://raw.githubusercontent.com/3b/3bgl-misc/e3bf2781d603feb6b44e5c4ec20f06225648ffd9/spline/package.lisp | lisp | (defpackage #:3bgl-splines
(:use :cl)
(:export #:interpolate-quadratic
#:evaluate-quadratic
#:evaluate-quadratic-normal
#:evaluate-quadratic-tangent
#:subdivide-quadratic))
| |
a3cdf5df1adeebfd0a9f88b14e48085f514d4c272345f8b10fa498143766038a | lambdamikel/DLMAPS | result-inspector2.lisp | -*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : SPATIAL - SUBSTRATE ; Base : 10 -*-
(in-package spatial-substrate)
(defconstant +x-no-of-thumbnails+ 6)
(defconstant +y-no-of-thumbnails+ 6)
(defconstant +spacing+ 10)
(defconstant +offset-radius+ 100)
(defconstant +light-blue+ (make-rgb-color 0.5 0.5 ... | null | https://raw.githubusercontent.com/lambdamikel/DLMAPS/7f8dbb9432069d41e6a7d9c13dc5b25602ad35dc/src/map-viewer/result-inspector2.lisp | lisp | Syntax : Ansi - Common - Lisp ; Package : SPATIAL - SUBSTRATE ; Base : 10 -*-
Achtung: die Spatial Atoms (s. spatial-substrate;compiler5.lisp)
können NUR compiliert werden! -> *runtime-evaluation* = NIL
bei NIL werden
(define-presentation-method presentation-refined-position-test (... |
(in-package spatial-substrate)
(defconstant +x-no-of-thumbnails+ 6)
(defconstant +y-no-of-thumbnails+ 6)
(defconstant +spacing+ 10)
(defconstant +offset-radius+ 100)
(defconstant +light-blue+ (make-rgb-color 0.5 0.5 1))
(defconstant +inspector-text-style+
(make-text-style :sans-serif :bold :large))
(defcon... |
3246c05d1922ca87e8a1964119fe7d8141860de33635f1426fb928edb08703d6 | davdar/maam | Syntax.hs | module Lang.LamIf.Syntax where
import FP
newtype RawName = RawName { getRawName :: String }
deriving (Eq, Ord)
type SRawName = Stamped BdrNum RawName
data GenName = GenName
{ genNameMark :: Maybe Int
, genNameRawName :: RawName
}
deriving (Eq, Ord)
newtype LocNum = LocNum Int deriving (Eq, Ord, PartialOrder... | null | https://raw.githubusercontent.com/davdar/maam/2cc3ff3511a7a4daadcd44c60c4b08862c01e183/src/Lang/LamIf/Syntax.hs | haskell | module Lang.LamIf.Syntax where
import FP
newtype RawName = RawName { getRawName :: String }
deriving (Eq, Ord)
type SRawName = Stamped BdrNum RawName
data GenName = GenName
{ genNameMark :: Maybe Int
, genNameRawName :: RawName
}
deriving (Eq, Ord)
newtype LocNum = LocNum Int deriving (Eq, Ord, PartialOrder... | |
71a2fa785415fa071b16f37135c40747f35e3bc8958957341a90c02c45eded0e | Clozure/ccl-tests | union.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Apr 20 07:41:24 2003
;;;; Contains: Tests of UNION
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
(deftest union.1
(union nil nil)
nil)
(deftest union.2
(union-with-check (list 'a) nil)
(a))
(deftest union.3
(union-with-check (list 'a) (l... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/union.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of UNION
Do large numbers of random units
if bignums are eq, the test is worthless
Check that union does not reverse the arguments to :test, :test-not
Order of evaluation tests
Keyword tests
Error tests
that goes beyond the 'be prepared to signal an error' requirement,
if... | Author :
Created : Sun Apr 20 07:41:24 2003
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
(deftest union.1
(union nil nil)
nil)
(deftest union.2
(union-with-check (list 'a) nil)
(a))
(deftest union.3
(union-with-check (list 'a) (list 'a))
(a))
(deftest union-4
(union-with-check ... |
5cc43d0a8c5187b2da2bc850ba3e027e57eac5c88e00df0cbf572bba5788e3d7 | yrashk/socket.io-erlang | socketio_http.erl | -module(socketio_http).
-include_lib("../include/socketio.hrl").
-behaviour(gen_server).
%% API
-export([start_link/6]).
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-define(SERVER, ?MODULE).
-record(state, {
default_http_han... | null | https://raw.githubusercontent.com/yrashk/socket.io-erlang/7a6c768a28cf18d58efd7abe0eb276a22dbc7974/src/socketio_http.erl | erlang | API
gen_server callbacks
very dirty hack
===================================================================
API
===================================================================
--------------------------------------------------------------------
@doc
Starts the server
@end
----------------------------------... | -module(socketio_http).
-include_lib("../include/socketio.hrl").
-behaviour(gen_server).
-export([start_link/6]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-define(SERVER, ?MODULE).
-record(state, {
default_http_handler,
sessions,
... |
186f2cea2722c587184eab5510f2d6f9ad1041f405d9dc541fce4e51e43dbafb | Octachron/olivine | vk__extension_sig.ml | module type Device = sig val x: Vk__Types__Device.t end
module type Instance = sig val x: Vk__Types__Instance.t end
module type extension = sig
val foreign: string -> ('a -> 'b) Ctypes.fn -> 'a -> 'b
end
module Foreign_device(X:Device): extension = struct
let foreign name typ=
let name = name in
let open ... | null | https://raw.githubusercontent.com/Octachron/olivine/e93df595ad1e8bad5a8af689bac7d150753ab9fb/lib_aux/vk__extension_sig.ml | ocaml | module type Device = sig val x: Vk__Types__Device.t end
module type Instance = sig val x: Vk__Types__Instance.t end
module type extension = sig
val foreign: string -> ('a -> 'b) Ctypes.fn -> 'a -> 'b
end
module Foreign_device(X:Device): extension = struct
let foreign name typ=
let name = name in
let open ... | |
b2cf0fe132cb5e57bd09b6c68d1a382860a63538d37e5a5351eed842cab2a6fa | kelamg/HtDP2e-workthrough | ex200.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-beginner-abbr-reader.ss" "lang")((modname ex200) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decima... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Arbitrarily-Large-Data/ex200.rkt | racket | about the language level of this file in a form that our tools can easily process.
itunes export file from:
– '()
– (cons Track LTracks)
(define-struct track
[name artist album time track# added play# played])
A Track is a structure:
interpretation An instance records in order: the track's
title, its producin... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex200) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/batch-io)
(require 2htdp/itunes)
(defi... |
51c2522d87d6f9b17824d14c7453702a4aeb3b85360e26b888370be1a2276d12 | project-oak/hafnium-verification | equality.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/sledge/src/symbheap/equality.mli | ocaml | * Constraints representing equivalence relations over uninterpreted
functions and linear rational arithmetic
* The diagonal relation, which only equates each term with itself.
* Conjoin an equation to a relation.
* Conjunction.
* Disjunction.
* Apply a renaming substitution to the relation.
* The variables oc... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
dc61910740a158cadc2dcc1eab34e9d52b4cc0c877a97ea15f7fc58c9f478bd7 | fossas/fossa-cli | TextSpec.hs | module Extra.TextSpec (
spec,
) where
import Data.Text.Extra
import Test.Hspec qualified as Test
import Prelude
spec :: Test.Spec
spec = do
Test.describe "Text splitOnceOn" $
Test.it "should split a string once from the start" $
splitOnceOn "-" "1-2-3" `Test.shouldBe` ("1", "2-3")
Test.describe "Text... | null | https://raw.githubusercontent.com/fossas/fossa-cli/be8839e734b813369c67183b286220a7f41a8481/test/Extra/TextSpec.hs | haskell | module Extra.TextSpec (
spec,
) where
import Data.Text.Extra
import Test.Hspec qualified as Test
import Prelude
spec :: Test.Spec
spec = do
Test.describe "Text splitOnceOn" $
Test.it "should split a string once from the start" $
splitOnceOn "-" "1-2-3" `Test.shouldBe` ("1", "2-3")
Test.describe "Text... | |
f4831c6397c076171be3ba7b3d0a585e4c1c013729c3064516a1479e3bd51673 | joelburget/lvca | List_nat.ml | module Language = struct
let nat = [%lvca.abstract_syntax "nat := Z() | S(nat);"]
let list = [%lvca.abstract_syntax "list a := Nil() | Cons(a; list a);"]
let rec nat_to_list = function
| Nonbinding . Operator ( _ , " Z " , [ ] ) - > Nonbinding . Operator ( ( ) , " Nil " , [ ] )
| Operator ( i , " S... | null | https://raw.githubusercontent.com/joelburget/lvca/dc1a9b2fbaed013c5d57d7fe63dd4a05062c93d5/pages/List_nat.ml | ocaml | module Language = struct
let nat = [%lvca.abstract_syntax "nat := Z() | S(nat);"]
let list = [%lvca.abstract_syntax "list a := Nil() | Cons(a; list a);"]
let rec nat_to_list = function
| Nonbinding . Operator ( _ , " Z " , [ ] ) - > Nonbinding . Operator ( ( ) , " Nil " , [ ] )
| Operator ( i , " S... | |
739f2a5a44eb93d692ecaf62bcd5857f96aa142183c4a4aeef24f6d2bcbb1e97 | TheClimateCorporation/lemur | minimal-sample-jobdef.clj | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Minimal Sample
;;; This is a small example, sufficient for many jobs.
;;; See sample-jobdef.clj for a more complete example with docs on each option
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(use-b... | null | https://raw.githubusercontent.com/TheClimateCorporation/lemur/00eb21b6f534ceefe354ab89042826188d156991/examples/minimal-sample-jobdef.clj | clojure |
Minimal Sample
This is a small example, sufficient for many jobs.
See sample-jobdef.clj for a more complete example with docs on each option
optional, lemur.base is always included automatically
:keep-alive? true
A value for --num-days that is only relevant when running with the :test profile
These are example a... |
(use-base
'your.org.base)
(catch-args
:num-days "Number of days of history to run.")
(defcluster sample-cluster
:metajob-hipchat-room "marctest"
:comment "This is a the Minimal Sample."
:num-instances 1
:slave-instance-type "m1.xlarge"
:master-instance-type "m1.large"
:upload ["/tmp/junk/a/foo.txt" "... |
9ff3eb948af30fe27b267844ee4b38319f6bcbec30693864c9c20910b310146a | engstrand-config/farg | packages.scm | (define-module (farg packages)
#:use-module (guix packages)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages python-xyz))
HACK : Upstreamed pywal does not propagate imagemagick which
;; means that it is not available during runtime.
(define-public python-pywal-farg
(package
(inherit pyth... | null | https://raw.githubusercontent.com/engstrand-config/farg/a6645960993583e65c4c882ad415ead544a466ef/farg/packages.scm | scheme | means that it is not available during runtime. | (define-module (farg packages)
#:use-module (guix packages)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages python-xyz))
HACK : Upstreamed pywal does not propagate imagemagick which
(define-public python-pywal-farg
(package
(inherit python-pywal)
(name "python-pywal-farg")
(inputs... |
2a8d27e2d96904b7996b74d0c6981478a2efb64d8f4af17963343a66476487e7 | basho/riak_test | secondary_index_tests.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2012 Basho Technologies , Inc.
%%
This file is provided to you 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 Li... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/secondary_index_tests.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2012 Basho Technologies , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(secondary_index_tests).
... |
152f65d48128956a34eba1443eebec53b80527a964122a3637d91c4281a58449 | semilin/layoup | CTGAP-3.0.lisp |
(MAKE-LAYOUT :NAME "CTGAP-3.0" :MATRIX
(APPLY #'KEY-MATRIX '("vplcfkuoyj" "rntsd'aeih" "zbmgwx,.;q"))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/CTGAP-3.0.lisp | lisp |
(MAKE-LAYOUT :NAME "CTGAP-3.0" :MATRIX
(APPLY #'KEY-MATRIX '("vplcfkuoyj" "rntsd'aeih" "zbmgwx,.;q"))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | |
1e04e5cda860bd8ccd82b59499f8bf0682c9331c1241222d2bc92edb79193782 | namin/3-proto-lisp | boot.lsp | (cl:in-package 3-proto-lisp)
(3pl:read-normalize-print)
| null | https://raw.githubusercontent.com/namin/3-proto-lisp/203f9eb14ee1c48061f25c204965a63622bdac38/boot.lsp | lisp | (cl:in-package 3-proto-lisp)
(3pl:read-normalize-print)
| |
ca97fbf714ed85cdae50def350345f6905f48e11d40a1cfb8b24aaa3ce5e7d6c | day8/re-frame-test | test.cljc | (ns day8.re-frame.test
#?(:cljs (:require-macros day8.re-frame.test))
(:require #?(:cljs [cljs.test :as test]
:clj [clojure.test :as test])
[re-frame.core :as rf]
[re-frame.router :as rf.router]
[re-frame.db :as rf.db]
[re-frame.interop :as rf.int])
... | null | https://raw.githubusercontent.com/day8/re-frame-test/3238d7e2907f0effba005f79e801ea519f77be0c/src/day8/re_frame/test.cljc | clojure |
General test utils
Async tests
Execute the test code itself on the same thread as the
re-frame event handlers run, so that we accurately
that we don't have to worry about making the JVM
`:wait-for-depth` and `:max-wait-for-depth` are used together to track how
"deep" we are in callback functions as the test ... | (ns day8.re-frame.test
#?(:cljs (:require-macros day8.re-frame.test))
(:require #?(:cljs [cljs.test :as test]
:clj [clojure.test :as test])
[re-frame.core :as rf]
[re-frame.router :as rf.router]
[re-frame.db :as rf.db]
[re-frame.interop :as rf.int])
... |
2ed7d9be352a1ca4778813b0062226689a0c5cbdef1f9fc627e82cd160d06470 | fare/command-line-arguments | pkgdcl.lisp | #+xcvb (module ())
(cl:defpackage :command-line-arguments
(:use :cl :uiop)
(:export
#:*command-line-arguments*
#:*command-line-options*
#:*command-line-option-specification*
#:process-command-line-options
#:compute-and-process-command-line-options
#:get-command-line-arguments
#:handle-command-... | null | https://raw.githubusercontent.com/fare/command-line-arguments/fbac862fb01c0e368141204f3f639920462c23fe/pkgdcl.lisp | lisp | #+xcvb (module ())
(cl:defpackage :command-line-arguments
(:use :cl :uiop)
(:export
#:*command-line-arguments*
#:*command-line-options*
#:*command-line-option-specification*
#:process-command-line-options
#:compute-and-process-command-line-options
#:get-command-line-arguments
#:handle-command-... | |
fb60efa5aa08e9b7b06befc11d2792db5ba7adc53f6d448c071cecf22e274df7 | riak-haskell-client/riak-haskell-client | Main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Criterion.Main
import Network.Riak.Connection.Pool as Pool (Pool, create, withConnection)
import Network.Riak.Connection (defaultClient)
import Network.Riak.CRDT
import qualified Data.ByteString.Char8 as B
import Control.Applicative
import Control.Monad
impo... | null | https://raw.githubusercontent.com/riak-haskell-client/riak-haskell-client/a1eafc4c16b85a98b2d29e306165f4d93819609f/riak/benchmarks/Main.hs | haskell | # LANGUAGE OverloadedStrings #
| * Common things
| Key names
| Map things
| n-elem map with counters
| n-depth map with a counter | module Main where
import Criterion.Main
import Network.Riak.Connection.Pool as Pool (Pool, create, withConnection)
import Network.Riak.Connection (defaultClient)
import Network.Riak.CRDT
import qualified Data.ByteString.Char8 as B
import Control.Applicative
import Control.Monad
import Data.Maybe
import Data.String
im... |
bc9905fde1da8d5b9a063af1cad0d5cac3e0e576f1327b97bde3df743bb0dd61 | victorvianna/mini-gcc | ptree.mli |
(* Arbres de syntaxe abstraite issus du parsing *)
type loc = Lexing.position * Lexing.position
type ident = { id: string; id_loc: loc }
type typ =
| Tint
| Tstructp of ident
type unop =
| Unot | Uminus
type binop =
| Beq | Bneq | Blt | Ble | Bgt | Bge | Badd | Bsub | Bmul | Bdiv
| Band | Bor
type expr... | null | https://raw.githubusercontent.com/victorvianna/mini-gcc/04659816d0a1097ae12b57243572fff9e91c0b13/ptree.mli | ocaml | Arbres de syntaxe abstraite issus du parsing |
type loc = Lexing.position * Lexing.position
type ident = { id: string; id_loc: loc }
type typ =
| Tint
| Tstructp of ident
type unop =
| Unot | Uminus
type binop =
| Beq | Bneq | Blt | Ble | Bgt | Bge | Badd | Bsub | Bmul | Bdiv
| Band | Bor
type expr =
{ expr_node: expr_node;
expr_loc : loc }
... |
6b1936fa33e8b472198d9ae9885d4cd8366574d329b4cabbd17d919c07779904 | def-/time.gif | LZWEncoding.hs | # LANGUAGE BangPatterns , CPP #
module Codec.Picture.Gif.LZWEncoding( lzwEncode ) where
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative( (<$>) )
import Data.Monoid( mempty )
#endif
import Control.Monad.ST( runST )
import qualified Data.ByteString.Lazy as L
import Data.Maybe( fromMaybe )
import Data.Word( Word... | null | https://raw.githubusercontent.com/def-/time.gif/24bd06b2d496f1e45345f6489e80c679b8a7497b/Codec/Picture/Gif/LZWEncoding.hs | haskell | # UNPACK # | # LANGUAGE BangPatterns , CPP #
module Codec.Picture.Gif.LZWEncoding( lzwEncode ) where
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative( (<$>) )
import Data.Monoid( mempty )
#endif
import Control.Monad.ST( runST )
import qualified Data.ByteString.Lazy as L
import Data.Maybe( fromMaybe )
import Data.Word( Word... |
28e70e114c3d7aa4ccd1e40b17f81e8503b5363eec73e95e9129071a41240376 | intolerable/intolerable-bot | Bot.hs | module Bot where
import Args
import Control.Applicative.Trans.Either
import Control.Concurrent.WriteSem
import Control.Concurrent
import Control.Concurrent.Async
import Control.Exception (catchJust)
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Trans.Class
import Control.Monad.Trans.Reader
i... | null | https://raw.githubusercontent.com/intolerable/intolerable-bot/245f687ea8c6d7af5e74f412409bae4a75b816fb/src/Bot.hs | haskell | module Bot where
import Args
import Control.Applicative.Trans.Either
import Control.Concurrent.WriteSem
import Control.Concurrent
import Control.Concurrent.Async
import Control.Exception (catchJust)
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Trans.Class
import Control.Monad.Trans.Reader
i... | |
6a2058fc2644ac33b5598a3b33974a8eb6270aa188fc743c5782c30d0928cf48 | typedclojure/typedclojure | local.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/45556897356f3c9cbc7b1b6b4df263086a9d5803/typed/clj.checker/src/typed/cljc/checker/check/local.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns typed.cljc.checker.check.local
(:require [typed.cljc.checker.local-result :as local-result]
[typed.cljc.checker.utils :as u]))
(defn check-local [{sym :name :as expr} expected]
(assoc expr
u/expr-type (local-result/local-result expr sym expected... |
69c83278d324a975511dda6102c1a41d07fcdd5bbe4a81922bd3135b36ab1f2d | mejgun/haskell-tdlib | GetEmojiReaction.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Query.GetEmojiReaction where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
-- |
Returns information about a emoji reaction . Returns a 404 error if the reaction is not found @emoji Text representation of the rea... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/e5c8059a74f88073b27dbfafb6908de0729af110/src/TD/Query/GetEmojiReaction.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
| |
module TD.Query.GetEmojiReaction where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
Returns information about a emoji reaction . Returns a 404 error if the reaction is not found @emoji Text representation of the reaction
data GetEmojiReaction = GetEmojiReactio... |
88709873b6a92f7c1d01ddf0ac6dc7bd4cb0bd21a1b42c17b2c4fec177dab787 | kana/sicp | ex-4.32.scm | Exercise 4.32 . Give some examples that illustrate the difference between
the streams of chapter 3 and the ` ` lazier '' lazy lists described in this
;;; section. How can you take advantage of this extra laziness?
; We can construct linear lists of infinite length with the streams,
; but we can construct trees o... | null | https://raw.githubusercontent.com/kana/sicp/912bda4276995492ffc2ec971618316701e196f6/ex-4.32.scm | scheme | section. How can you take advantage of this extra laziness?
We can construct linear lists of infinite length with the streams,
but we can construct trees of infinite depth with the lazier lazy lists.
For example... | Exercise 4.32 . Give some examples that illustrate the difference between
the streams of chapter 3 and the ` ` lazier '' lazy lists described in this
(load "./sec-4.1.1.scm")
(load "./sec-4.1.2.scm")
(load "./sec-4.1.3.scm")
(load "./sec-4.1.4.scm")
(load "./sec-4.2.2.scm")
(define code
'((define (cons x y)
... |
e1cbc1cd777b07e8cf11f8b2b36c38734278dd86c34cc31b4f6b8176f1fa464a | racket/plot | low-level-tests.rkt | #lang racket
(module typed-tests typed/racket
(require typed/rackunit
(except-in racket/date find-seconds)
plot
plot/utils
plot/private/common/utils
plot/private/common/math
plot/private/common/date-time
plot/private/common/format)
(re... | null | https://raw.githubusercontent.com/racket/plot/c4126001f2c609e36c3aa12f300e9c673ab1a806/plot-test/plot/tests/low-level-tests.rkt | racket | =================================================================================================
Formatting
=================================================================================================
Date rounding
==============================================================================================... | #lang racket
(module typed-tests typed/racket
(require typed/rackunit
(except-in racket/date find-seconds)
plot
plot/utils
plot/private/common/utils
plot/private/common/math
plot/private/common/date-time
plot/private/common/format)
(re... |
028a5f45a756ff312c124eba767eb305bd633876e2e1ea4bd5856627b31ffb31 | cxphoe/SICP-solutions | 3.8.rkt | (define (delay value)
(let ((previous value))
(lambda (x)
(begin (set! previous value)
(set! value (+ value x))
previous))))
(define f1 (delay 0))
(define f2 (delay 0))
(+ (f1 0) (f1 1))
(+ (f2 1) (f2 0)) | null | https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%203-Modeling%20with%20Mutable%20Data/1.Assignment%20and%20Local%20state/3.8.rkt | racket | (define (delay value)
(let ((previous value))
(lambda (x)
(begin (set! previous value)
(set! value (+ value x))
previous))))
(define f1 (delay 0))
(define f2 (delay 0))
(+ (f1 0) (f1 1))
(+ (f2 1) (f2 0)) | |
d1257c50105864395fad9474e141ec6f7c8e5698e70d39a115532b1f5ee54525 | antono/guix-debian | geeqie.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/geeqie.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 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages geeqie)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module ... |
a514e03d737a46a20b7c79ef069ebdd9a5cd7fc39c2967fbe3531aa44a75fd47 | wireapp/saml2-web-sso | MockResponse.hs | {-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
module SAML2.WebSSO.Test.MockResponse where
import Control.Lens
import Control.Monad.IO.Class
import Data.Generics.Uniplate.Data
import Data.String.Conversions
import Data.UUID as UUID
import GHC.Stack
import SAML2.Util
import SAML2... | null | https://raw.githubusercontent.com/wireapp/saml2-web-sso/ac88b934bb4a91d4d4bb90c620277188e4087043/src/SAML2/WebSSO/Test/MockResponse.hs | haskell | # LANGUAGE OverloadedStrings #
| See tests on how this is used.
| Replace the 'NameID' child of the 'Subject' with a given one.
(There is some code sharing between this and 'mkAuthnResponseWithRawSubj', but reducing it would
make both functions more complex.)
| Delete all children of 'Subject' and insert some new... | # OPTIONS_GHC -Wno - incomplete - uni - patterns #
module SAML2.WebSSO.Test.MockResponse where
import Control.Lens
import Control.Monad.IO.Class
import Data.Generics.Uniplate.Data
import Data.String.Conversions
import Data.UUID as UUID
import GHC.Stack
import SAML2.Util
import SAML2.WebSSO
import Text.Hamlet.XML (xml... |
69f62ab81b5966e8e1ff555289bc95becad6d03ba38926b90a3992cf21456210 | ocaml-batteries-team/batteries-included | batOrd.mli |
type order = Lt | Eq | Gt
* An algebraic datatype for ordering .
Traditional OCaml code , under the influence of C comparison
functions , has used int - returning comparisons ( < 0 , 0 or >
0 ) . Using an algebraic datatype instead is actually nicer , both
for comparison producers ( no arbitra... | null | https://raw.githubusercontent.com/ocaml-batteries-team/batteries-included/f143ef5ec583d87d538b8f06f06d046d64555e90/src/batOrd.mli | ocaml | * The type of ordering functions returning an [order] variant.
* Returns a variant ordering from a legacy comparison
* Returns an legacy comparison from a variant ordering
* Reverse a given ordering. If [Int.ord] sorts integer by increasing
order, [rev Int.ord] will sort them by decreasing order.
* The type for... |
type order = Lt | Eq | Gt
* An algebraic datatype for ordering .
Traditional OCaml code , under the influence of C comparison
functions , has used int - returning comparisons ( < 0 , 0 or >
0 ) . Using an algebraic datatype instead is actually nicer , both
for comparison producers ( no arbitra... |
d52b611cc3cc6e0b20fe2b4d65238ef838bdf7de7ba11af8fbb7ea3cb6445ce2 | mdsebald/link_blox_app | lblx_template.erl | % INSTRUCTIONS: Copy this module and modify as appropriate
% for the function this block will perform.
% Comments marked "INSTRUCTIONS:" may be deleted
% Instructions: Follow the formatting of the @doc comment block exactly as shown
It is used for generating LinkBlox web p... | null | https://raw.githubusercontent.com/mdsebald/link_blox_app/64034fa5854759ad16625b93e3dde65a9c65f615/src/block_types/lblx_template.erl | erlang | INSTRUCTIONS: Copy this module and modify as appropriate
for the function this block will perform.
Comments marked "INSTRUCTIONS:" may be deleted
Instructions: Follow the formatting of the @doc comment block exactly as shown
@doc
DESCRIPTION
INSTRUCTIONS: Insert description of bloc... |
It is used for generating LinkBlox web pages
BLOCKTYPE
INSTRUCTIONS : Insert a one line description of the block here
INSTRUCTIONS : Insert URL(s ) here , ( one per line )
to uniquely identify them as LinkBlox block type modules .
to the block_type_names ( ) map in each Language Module ,
... |
364bab26f6cedb937ce860ea8cb42e5b772cec395d04251042396cc3a8fcb42a | splittist/docxplora | sml-namespaces.lisp | ;;;; sml-namespaces.lisp
(in-package #:sml)
(defparameter *workbook-namespaces*
'((nil . "")
("r" . "")
("mc" . "-compatibility/2006")
("x14ac" . "")
("x15" . "")
("x16r2" . "")
("xr" . "")
("xr2" . "")
("xr3" . "")
("xr4" . "")
("xr6" . "")
("xr10" . "")
... | null | https://raw.githubusercontent.com/splittist/docxplora/1c843677f243ae9d2e4a71cac27859dcc1381075/sml/sml-namespaces.lisp | lisp | sml-namespaces.lisp
|
(in-package #:sml)
(defparameter *workbook-namespaces*
'((nil . "")
("r" . "")
("mc" . "-compatibility/2006")
("x14ac" . "")
("x15" . "")
("x16r2" . "")
("xr" . "")
("xr2" . "")
("xr3" . "")
("xr4" . "")
("xr6" . "")
("xr10" . "")
("xlrd" . "")
("... |
c55ab93b2b9e6feeced867ab000d60b532148b8cbb4bca675080b524dda04170 | bytekid/mkbtt | selectionParser.mli | type token =
| SIZE_MAX
| SIZE_SUM
| SUM
| MIN
| CP
| DATA
| ELABEL
| FLOAT of (string)
| RANDOM
| COUNT
| PLUS
| MINUS
| TIMESTAMP
| E
| R
| C
| LPAREN
| RPAREN
| COMMA
| COLON
| EOF
val start :
(Lexing.lexbuf -> token) -> Lexing.lexbuf -> SelectionStrategy.t
| null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mkbtt/selectionParser.mli | ocaml | type token =
| SIZE_MAX
| SIZE_SUM
| SUM
| MIN
| CP
| DATA
| ELABEL
| FLOAT of (string)
| RANDOM
| COUNT
| PLUS
| MINUS
| TIMESTAMP
| E
| R
| C
| LPAREN
| RPAREN
| COMMA
| COLON
| EOF
val start :
(Lexing.lexbuf -> token) -> Lexing.lexbuf -> SelectionStrategy.t
| |
55451a8310507fd33b109ccedfb2ee95c4fde549f26d9a342c51ad3e9d6fdd5c | noinia/hgeometry | Webview.hs | {-# LANGUAGE OverloadedStrings #-}
module Language.Javascript.JSaddle.Webview where
import Control.Concurrent
import qualified Data.Text as T (unpack, pack)
import qualified Graphics.UI.Webviewhs as WHS
import Language.Javascript.JSaddle (JSM, Results)
import qualified Language.Javascript.... | null | https://raw.githubusercontent.com/noinia/hgeometry/a6abecb1ce4a7fd96b25cc1a5c65cd4257ecde7a/hgeometry-web/src/Language/Javascript/JSaddle/Webview.hs | haskell | # LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
pwd <- getCurrentDirectory
let uri = "file://" <> T.pack pwd <> "/" | module Language.Javascript.JSaddle.Webview where
import Control.Concurrent
import qualified Data.Text as T (unpack, pack)
import qualified Graphics.UI.Webviewhs as WHS
import Language.Javascript.JSaddle (JSM, Results)
import qualified Language.Javascript.JSaddle.Warp as JSaddle
import Sys... |
cecb7fcc09826692c75430c899c409d59cb2cc3d37d0888202cfb8f2595ad15f | pascal-knodel/haskell-craft | E'7'30.hs | --
--
--
-----------------
-- Exercise 7.30.
-----------------
--
--
--
module E'7'30 where
import Prelude hiding ( getLine )
import E'7'27 ( Line , Word , getLine , dropLine )
import GHC.List ( elem , splitAt )
import Data.List.Split ( splitOneOf )
import Test.QuickCheck
Note : there is a problem with the ... | null | https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'7'30.hs | haskell |
---------------
Exercise 7.30.
---------------
Craft3e-0.1.0.10 :
< 100 ( ? )
Craft3e-0.1.0.10:
lineLength < 100 (?)
'endless loop of [[] ..]'
Subchapter 7.6 (relevant definitions of it):
...
+-%3E+[String]
Besides the different set of white space characters
this is the standard function... | module E'7'30 where
import Prelude hiding ( getLine )
import E'7'27 ( Line , Word , getLine , dropLine )
import GHC.List ( elem , splitAt )
import Data.List.Split ( splitOneOf )
import Test.QuickCheck
Note : there is a problem with the Craft3e-0.1.0.10 release ,
it occurs if a word is longer than " ... |
61ee9aeae60f92b8f886727a931f181a6afb918e806f3fca472c966c847702fa | pbrisbin/yesod-paginator | Main.hs | # LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wno - missing - deriving - strategies #
# OPTIONS_GHC -Wno - missing - local - signatures #
{-# OPTIONS_GHC -Wno-unused-top-binds #-}
module Main
( ma... | null | https://raw.githubusercontent.com/pbrisbin/yesod-paginator/7c9aa7981bd5252b919737f2f61546b3b41d14d9/example/Main.hs | haskell | # LANGUAGE OverloadedStrings #
# OPTIONS_GHC -Wno-unused-top-binds #
> | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wno - missing - deriving - strategies #
# OPTIONS_GHC -Wno - missing - local - signatures #
module Main
( main
) where
import Prelude
import Network.Wai.Handler.Warp (run)
import ... |
ea2b2cdcc309a134e2bae13bb2d4b7735c74e88eb88d40d74a699906f7cc13a9 | bortexz/resocket | resocket.clj | (ns bortexz.resocket
(:require [clojure.core.async :as a])
(:import (java.net.http WebSocket$Listener WebSocket$Builder HttpClient WebSocket)
(java.io ByteArrayOutputStream)
(java.nio.channels Channels)
(java.nio ByteBuffer)
(java.time Duration)
(java.net URI C... | null | https://raw.githubusercontent.com/bortexz/resocket/67cfea0e3c69a3a3c91160d5795e067a221d358a/src/bortexz/resocket.clj | clojure |
Public API
| (ns bortexz.resocket
(:require [clojure.core.async :as a])
(:import (java.net.http WebSocket$Listener WebSocket$Builder HttpClient WebSocket)
(java.io ByteArrayOutputStream)
(java.nio.channels Channels)
(java.nio ByteBuffer)
(java.time Duration)
(java.net URI C... |
486d18570aee48324efa10b84578e90d0296c71501f4f9e80394c63c95a60637 | bcc32/advent-of-code | main.ml | open! Core
open! Async
open! Import
let parse_line =
let re =
let open Re in
compile (seq [ group (rep1 wordc); str " => "; group (rep1 wordc) ])
in
fun line ->
let group = Re.exec re line in
let lhs = Re.Group.get group 1 in
let rhs = Re.Group.get group 2 in
lhs, rhs
;;
let parse_lines ... | null | https://raw.githubusercontent.com/bcc32/advent-of-code/86a9387c3d6be2afe07d2657a0607749217b1b77/2015/day_19/main.ml | ocaml | open! Core
open! Async
open! Import
let parse_line =
let re =
let open Re in
compile (seq [ group (rep1 wordc); str " => "; group (rep1 wordc) ])
in
fun line ->
let group = Re.exec re line in
let lhs = Re.Group.get group 1 in
let rhs = Re.Group.get group 2 in
lhs, rhs
;;
let parse_lines ... | |
00ba456871e07f696a2feb008111bc36597defae847c3e1b4ff9ecf508efbb28 | cyclone-scheme/clojurian | test.scm | (import (scheme base)
(scheme inexact)
(srfi 1)
(cyclone test)
(cyclone clojurian))
Original tests by on
;;
(define add1 (lambda (x) (+ 1 x)))
(test-group "clojurian-syntax"
(test (vector 1 2)
(doto (make-vector 2)
(vector-set! 0 1)
(vector-s... | null | https://raw.githubusercontent.com/cyclone-scheme/clojurian/ae389f911702d075f521288a13947daa2786f3eb/test.scm | scheme | (import (scheme base)
(scheme inexact)
(srfi 1)
(cyclone test)
(cyclone clojurian))
Original tests by on
(define add1 (lambda (x) (+ 1 x)))
(test-group "clojurian-syntax"
(test (vector 1 2)
(doto (make-vector 2)
(vector-set! 0 1)
(vector-set! ... | |
ebbc4f64c287724533375ce9bf6c28cf14396bae188533f3879d3a0af6835abc | gilith/hol-light | grobner.ml | (* ========================================================================= *)
(* Generic Grobner basis algorithm. *)
(* *)
(* Whatever the instantiation, it basically solves the universal theory of *)
... | null | https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/grobner.ml | ocaml | =========================================================================
Generic Grobner basis algorithm.
Whatever the instantiation, it basically solves the universal theory of
the complex num... | ( c ) Copyright , 1998 - 2007
needs "normalizer.ml";;
type history =
Start of int
| Mmul of (num * (int list)) * history
| Add of history * history;;
let RING_AND_IDEAL_CONV =
let morder_lt =
let rec lexorder l1 l2 =
match (l1,l2) with
[],[] -> f... |
3c532751cfc78c355d15bffc4d58df4099efddb1fbdac04913efb4388248982a | bobzhang/fan | fan_args.ml | * TODO : add an unit test for import DDSL
(* %import{ *)
(* Prelude: *)
(* parse_file *)
(* parse_interf *)
(* parse_implem *)
(* ; *)
(* Format: *)
(* printf *)
(* ; *)
(* };; *)
let parse_file = Prelude.parse_file
let eprintf = Format.eprintf
let fprintf = Format.fprintf
let printf = Format... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/cold/fan_args.ml | ocaml | %import{
Prelude:
parse_file
parse_interf
parse_implem
;
Format:
printf
;
};;
* parse the file, apply the filter and pipe it to the backend
local variables:
end: | * TODO : add an unit test for import DDSL
let parse_file = Prelude.parse_file
let eprintf = Format.eprintf
let fprintf = Format.fprintf
let printf = Format.printf
open Util
let just_print_filters () =
let pp = eprintf in
let p_tbl f tbl = Hashtbl.iter (fun k _v -> fprintf f "%s@;" k) tbl in... |
5cc87328efb92d565ab0ec5d4ee8f3b3ec66c021fec76930db8bd06514bf1db4 | a-nikolaev/wanderers | item.ml | Wanderers - open world adventure game .
Copyright ( C ) 2013 - 2014 .
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at... | null | https://raw.githubusercontent.com/a-nikolaev/wanderers/054c1cdc6dd833d8938357e6d898def510531d67/src/item.ml | ocaml | unified quality measure
extremely bad, poor quality
perfect, flawless
kind size mat variant
the parameter 'stackable' tells you the max size of the stack of such objects
integer map
container
put the whole bunch
get the whole bunch
move everything (as much as possible) from csrc to cdst
move the it... | Wanderers - open world adventure game .
Copyright ( C ) 2013 - 2014 .
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at... |
be1b91df262681b19d2ea54c7b7939bd541f5f99765c5de7cc0d47c61feebaf2 | mainland/dph | Pretty.hs |
module DPH.Core.Pretty
( module DPH.Base.Pretty
, pprModGuts
, pprTopBinds)
where
import DPH.Base.Pretty
import HscTypes
import Avail
import CoreSyn
import Type
import Coercion
import Var
import Name
import OccName
import DataCon
import Literal
import Id
import Unique
import qualified UniqFM a... | null | https://raw.githubusercontent.com/mainland/dph/742078c9e18b7dcf6526348e08d2dd16e2334739/dph-plugin/DPH/Core/Pretty.hs | haskell | Guts -----------------------------------------------------------------------
| An AvailInfo carries an exported name.
Top Binds ------------------------------------------------------------------
Binding --------------------------------------------------------------------
Expr --------------------------------------... |
module DPH.Core.Pretty
( module DPH.Base.Pretty
, pprModGuts
, pprTopBinds)
where
import DPH.Base.Pretty
import HscTypes
import Avail
import CoreSyn
import Type
import Coercion
import Var
import Name
import OccName
import DataCon
import Literal
import Id
import Unique
import qualified UniqFM a... |
daea19c9c9cb9b01a09f2d627239d733b6d30369ed09f25102fd48d9802cd963 | bobzhang/fan | pr4329.ml | open Camlp4.PreCast ;
module G = Camlp4.PreCast.Gram;
value ab_eoi = G.Entry.mk "ab_eoi" ;
value a_or_ab = G.Entry.mk "a_or_ab" ;
value a_or_ab_eoi = G.Entry.mk "a_or_ab_eoi" ;
value c_a_or_ab_eoi = G.Entry.mk "c_a_or_ab_eoi" ;
EXTEND G
ab_eoi: [[ "a"; "b"; `EOI -> () ]];
a_or_ab: [[ "a" -> () | "a"; "b" -> () ]];
a_... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/test/fixtures/pr4329.ml | ocaml | Consider the following syntax errors: | open Camlp4.PreCast ;
module G = Camlp4.PreCast.Gram;
value ab_eoi = G.Entry.mk "ab_eoi" ;
value a_or_ab = G.Entry.mk "a_or_ab" ;
value a_or_ab_eoi = G.Entry.mk "a_or_ab_eoi" ;
value c_a_or_ab_eoi = G.Entry.mk "c_a_or_ab_eoi" ;
EXTEND G
ab_eoi: [[ "a"; "b"; `EOI -> () ]];
a_or_ab: [[ "a" -> () | "a"; "b" -> () ]];
a_... |
32415ff1dd3f00881e42123462f8ea8860fdba46c19c7e090561668ef06f9b11 | ocaml/dune | wrap.ml | let t = Shared.t ^ "melange"
| null | https://raw.githubusercontent.com/ocaml/dune/445005f3da4c27dea34b130f7ceaf62ec7b86765/test/blackbox-tests/test-cases/melange/virtual_lib.t/impl_melange/wrap.ml | ocaml | let t = Shared.t ^ "melange"
| |
ec75140a24528dee3c74109c70745f0c15ba60872b00c2c327994bff8b107ef0 | tomcobley/haskell-final-exams | Tries.hs | module Tries where
import Data.List hiding (insert)
import Data.Bits
import Types
import HashFunctions
import Examples
--------------------------------------------------------------------
-- Part I
Use this if you 're counting the number of 1s in every
four - bit block ...
bitTable :: [Int]
bitTable
= [0,1,1,... | null | https://raw.githubusercontent.com/tomcobley/haskell-final-exams/49807e0da0ee7121d19eacff3ccc5ff5d0e4d4a2/2020-hash-array-mapped-tries/Tries.hs | haskell | ------------------------------------------------------------------
Part I
Pre: the index is less than the length of the list
Pre: the index is less than or equal to the length of the list
------------------------------------------------------------------
Part II
Predefined functions using sumTrie:
--------------... | module Tries where
import Data.List hiding (insert)
import Data.Bits
import Types
import HashFunctions
import Examples
Use this if you 're counting the number of 1s in every
four - bit block ...
bitTable :: [Int]
bitTable
= [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
countOnes :: Int -> Int
countOnes n
| n == 0 =... |
5acf7e6ef59cb5ab0efa54883cb1213d181555a66f910c41c83024ab0c1eddb6 | aeternity/enoise | enoise_tests.erl | %%%-------------------------------------------------------------------
( C ) 2018 , Aeternity Anstalt
%%%-------------------------------------------------------------------
-module(enoise_tests).
-include_lib("eunit/include/eunit.hrl").
noise_interactive_test_() ->
Test vectors from -c/master/tests/vector/noise... | null | https://raw.githubusercontent.com/aeternity/enoise/991d7390ea49216f0b170d7b9662b3ff0a925aaa/test/enoise_tests.erl | erlang | -------------------------------------------------------------------
-------------------------------------------------------------------
Generate a static key-pair for Client and Server
Talks to local echo-server (noise-c)
client_test() ->
TestProtocol = enoise_protocol:from_name("Noise_XK_25519_ChaChaPoly_BLAKE... | ( C ) 2018 , Aeternity Anstalt
-module(enoise_tests).
-include_lib("eunit/include/eunit.hrl").
noise_interactive_test_() ->
Test vectors from -c/master/tests/vector/noise-c-basic.txt
{setup,
fun() -> test_utils:noise_test_vectors() end,
fun(_X) -> ok end,
fun(Tests) ->
[ ... |
e03a0902d5bfa0de95b4785ae648007d66160e969b41a51c6932f287986e9df9 | static-analysis-engineering/codehawk | bCHMIPSAssemblyInstructions.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/dd2c3b9f84b4b5f3c88898505ee912e1e461e809/CodeHawk/CHB/bchlibmips32/bCHMIPSAssemblyInstructions.mli | ocaml | bchlib
bchlibmips32
* Return a reference to the class wrapper of the array of assembly
instructions.
* Create an array of the given size to hold the assembly instructions.
* Initialize the instruction array with instructions
length in bytes of the combined executable sections
address of code base
* [set_mi... | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.